diff options
1893 files changed, 59717 insertions, 27536 deletions
diff --git a/config.tests/unix/makeabs b/config.tests/unix/makeabs index 9d6610814f..c415cc7bda 100755 --- a/config.tests/unix/makeabs +++ b/config.tests/unix/makeabs @@ -3,7 +3,13 @@ FILE="$1" RES="$FILE" -if [ `echo $FILE | cut -b1` = "/" ]; then +CUT_ARG="-b1" +if [ `uname -s` = "QNX" ]; then + # QNX does not understand "-b1" + CUT_ARG="-c1" +fi + +if [ `echo $FILE | cut $CUT_ARG` = "/" ]; then true else RES="$PWD/$FILE" diff --git a/config.tests/unix/openssl/openssl.pri b/config.tests/unix/openssl/openssl.pri index c8703c23a1..377d6307c8 100644 --- a/config.tests/unix/openssl/openssl.pri +++ b/config.tests/unix/openssl/openssl.pri @@ -1,12 +1,5 @@ -!cross_compile { - TRY_INCLUDEPATHS = /include /usr/include /usr/local/include $$QMAKE_INCDIR $$INCLUDEPATH - # LSB doesn't allow using headers from /include or /usr/include - linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$INCLUDEPATH - for(p, TRY_INCLUDEPATHS) { - pp = $$join(p, "", "", "/openssl") - exists($$pp):INCLUDEPATH *= $$p - } -} +# Empty file since Qt 4.6 +# I'm too lazy to find all places where this file is included symbian{ TRY_INCLUDEPATHS = $${EPOCROOT}epoc32 $${EPOCROOT}epoc32/include $${EPOCROOT}epoc32/include/stdapis $${EPOCROOT}epoc32/include/stdapis/sys $$OS_LAYER_LIBC_SYSTEMINCLUDE $$QMAKE_INCDIR $$INCLUDEPATH @@ -542,9 +542,12 @@ cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache" QMakeVar add styles "cde mac motif plastique cleanlooks windows" QMakeVar add decorations "default windows styled" -QMakeVar add gfx-drivers "linuxfb" +QMakeVar add mouse-drivers "pc" +if [ "$UNAME_SYSTEM" = "Linux" ] ; then + QMakeVar add gfx-drivers "linuxfb" + QMakeVar add mouse-drivers "linuxtp" +fi QMakeVar add kbd-drivers "tty" -QMakeVar add mouse-drivers "pc linuxtp" if [ "$CFG_DEV" = "yes" ]; then QMakeVar add kbd-drivers "um" @@ -619,6 +622,12 @@ CFG_KBD_ON="tty" #default, see QMakeVar above CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb" CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above +if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then + CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx" + CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx" + CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx" +fi + CFG_ARCH= CFG_HOST_ARCH= CFG_KBD_PLUGIN_AVAILABLE= @@ -2021,6 +2030,12 @@ for e in gawk nawk awk; do fi done +# find perl +PERL="/usr/bin/perl" +if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then + PERL=`$WHICH perl` +fi + ### skip this if the user just needs help... if [ "$OPT_HELP" != "yes" ]; then @@ -2249,6 +2264,13 @@ if [ "$CFG_EMBEDDED" != "no" ]; then XPLATFORM="qws/linux-$CFG_EMBEDDED-g++" fi ;; + QNX:*) + [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++ + if [ -z "$XPLATFORM" ]; then + [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic + XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++" + fi + ;; CYGWIN*:*) CFG_EMBEDDED=x86 ;; @@ -2400,6 +2422,9 @@ if [ -z "$PLATFORM" ]; then UNIX_SV:*) PLATFORM=unixware-g++ ;; + QNX:*) + PLATFORM=unsupported/qnx-g++ + ;; *) if [ "$OPT_HELP" != "yes" ]; then echo @@ -2625,6 +2650,16 @@ if [ -z "${CFG_HOST_ARCH}" ]; then fi CFG_HOST_ARCH=sparc ;; + QNX:*:*) + case "$UNAME_MACHINE" in + x86pc) + if [ "$OPT_VERBOSE" = "yes" ]; then + echo " QNX on Intel 80x86 (i386)" + fi + CFG_HOST_ARCH=i386 + ;; + esac + ;; *:*:*) if [ "$OPT_VERBOSE" = "yes" ]; then echo " Trying '$UNAME_MACHINE'..." @@ -5723,6 +5758,13 @@ case "$PLATFORM,$CFG_MAC_COCOA" in ;; esac +# disable Qt 3 support on VxWorks +case "$XPLATFORM" in + unsupported/vxworks*) + CFG_QT3SUPPORT="no" + ;; +esac + # enable Qt 3 support functionality if [ "$CFG_QT3SUPPORT" = "yes" ]; then QT_CONFIG="$QT_CONFIG qt3support" @@ -6092,6 +6134,13 @@ case "$XPLATFORM" in ;; esac ;; + unsupported/vxworks-*-g++*) + canBuildWebKit="no" + ;; + unsupported/vxworks-*-dcc*) + canBuildWebKit="no" + canBuildQtXmlPatterns="no" + ;; *-g++*) # Check gcc's version case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in @@ -6328,10 +6377,8 @@ esac # Different edition modules: # network canvas table xml opengl sql # -# Options: -# stl -# # Things that do not affect the Qt API/ABI: +# stl # system-jpeg no-jpeg jpeg # system-mng no-mng mng # system-png no-png png @@ -6352,7 +6399,7 @@ esac # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb # Embedded: embedded freetype # -ALL_OPTIONS="stl" +ALL_OPTIONS= BUILD_CONFIG= BUILD_OPTIONS= @@ -6366,12 +6413,6 @@ for config_option in $QMAKE_CONFIG $QT_CONFIG; do BUILD_CONFIG="$config_option" ;; - stl) - # these config options affect the Qt API/ABI. they should influence - # the generation of the buildkey, so we don't skip them - SKIP="no" - ;; - *) # skip all other options since they don't affect the Qt API/ABI. ;; esac diff --git a/demos/embedded/embedded.pro b/demos/embedded/embedded.pro index 25904ef6eb..469e5432d6 100644 --- a/demos/embedded/embedded.pro +++ b/demos/embedded/embedded.pro @@ -3,8 +3,8 @@ SUBDIRS = styledemo contains(QT_CONFIG, svg) { SUBDIRS += embeddedsvgviewer \ - fluidlauncher \ desktopservices + !vxworks:!qnx:SUBDIRS += fluidlauncher } contains(QT_CONFIG, webkit) { diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml index a81eead660..006bfd07e2 100644 --- a/demos/qtdemo/xml/examples.xml +++ b/demos/qtdemo/xml/examples.xml @@ -246,5 +246,6 @@ <example filename="qobjectxmlmodel" name="QObjectXmlModel" /> <example filename="filetree" name="File Tree" /> <example filename="trafficinfo" name="Traffic Info" /> + <example filename="schema" name="XML Schema Validation" /> </category> </categories> diff --git a/demos/sub-attaq/custompropertyanimation.cpp b/demos/sub-attaq/custompropertyanimation.cpp index 9282f4202e..27a4eba6b0 100644 --- a/demos/sub-attaq/custompropertyanimation.cpp +++ b/demos/sub-attaq/custompropertyanimation.cpp @@ -96,7 +96,7 @@ void CustomPropertyAnimation::updateState(QAbstractAnimation::State oldState, QA setKeyValues(values); } - if (animProp && !startValue().isValid() && currentTime() == 0 + if ((animProp && !startValue().isValid() && currentTime() == 0) || (currentTime() == duration() && currentLoop() == (loopCount() - 1))) { setStartValue(def); } diff --git a/demos/sub-attaq/states.cpp b/demos/sub-attaq/states.cpp index d63737f52f..d6c0b5a1db 100644 --- a/demos/sub-attaq/states.cpp +++ b/demos/sub-attaq/states.cpp @@ -269,9 +269,10 @@ void UpdateScoreState::onEntry(QEvent *e) /** Win transition */ UpdateScoreTransition::UpdateScoreTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target) - : QSignalTransition(scene,SIGNAL(subMarineDestroyed(int)), QList<QAbstractState*>() << target), + : QSignalTransition(scene,SIGNAL(subMarineDestroyed(int))), game(game), scene(scene) { + setTargetState(target); } bool UpdateScoreTransition::eventTest(QEvent *event) @@ -288,9 +289,10 @@ bool UpdateScoreTransition::eventTest(QEvent *event) /** Win transition */ WinTransition::WinTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target) - : QSignalTransition(scene,SIGNAL(allSubMarineDestroyed(int)), QList<QAbstractState*>() << target), + : QSignalTransition(scene,SIGNAL(allSubMarineDestroyed(int))), game(game), scene(scene) { + setTargetState(target); } bool WinTransition::eventTest(QEvent *event) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index 6c7e450e35..7a6decfa97 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -34,9 +34,15 @@ information about a particular change. - Significant external contribution from Milan Burda for planned removal of (non-unicode) Windows 9x/ME support. + - QRegion is no longer a GDI object by default. This means it is no + longer subjuect to gui-thread only nor does it potentially impact + the 10.000 GDI object limit per process. By explicitly calling + .handle() a GDI object will be created and memory managed by + QRegion. The native handle is for reading out only. Any GDI calls + made on the HRGN handle will not affect the QRegion. **************************************************************************** -* Important Behavior Changes * +* Important Behavior Changes * **************************************************************************** - The experimental Direct3D paint engine has been removed. The reason for @@ -71,19 +77,32 @@ information about a particular change. QGraphicsItem::ItemSendsGeometryChanges (which is enabled by default by QGraphicsWidget and QGraphicsProxyWidget). -- QDesktopWidget on X11 no longer emits the resized(int) signal when screens - are added or removed. This was not done on other platforms. Use the - screenCountChanged signal instead - -- QUrl's parser is more strict when for hostnames in URLs. QUrl now - enforces STD 3 rules: - - * each individual hostname section (between dots) must be at most - 63 ASCII characters in length; - - * only letters, digits, and the hyphen character are allowed in the - ASCII range; letters outside the ASCII range follow the normal - IDN rules - - That means QUrl no longer accepts some URLs that were invalid - before, but weren't interpreted as such. + - QDesktopWidget on X11 no longer emits the resized(int) signal when screens + are added or removed. This was not done on other platforms. Use the + screenCountChanged signal instead + + - QUrl's parser is more strict when for hostnames in URLs. QUrl now + enforces STD 3 rules: + + * each individual hostname section (between dots) must be at most + 63 ASCII characters in length; + + * only letters, digits, and the hyphen character are allowed in the + ASCII range; letters outside the ASCII range follow the normal + IDN rules + + That means QUrl no longer accepts some URLs that were invalid + before, but weren't interpreted as such. + + - The Unix configure-time check for STL is stricter now in Qt + 4.6.0. This means some legacy STL implementations may fail to pass + the test and, therefore, Qt will automatically disable STL support. + + This is a binary-compatible change: existing code will continue to + work without being recompiled. However, it affects the source code, + since some STL-compatibility API will not be enabled. + + Platforms affected by this change: + * solaris-cc-* with the default (Cstd) C++ STL library + recommendation: use -library=stlport4 + See Sun Studio's documentation for the effects of this option diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc index 9a5d3ec8a0..e955a5af67 100644 --- a/doc/src/classes.qdoc +++ b/doc/src/classes.qdoc @@ -40,6 +40,18 @@ ****************************************************************************/ /*! + \group groups + \title Grouped Classes + \ingroup classlists + + This page provides a way of navigating Qt's classes by grouping + related classes together. Some classes may appear in more than one group. + + \generatelist{related} + +*/ + +/*! \page classes.html \title Qt's Classes \ingroup classlists @@ -65,3 +77,77 @@ \generatelist{namespaces} */ + +/*! + \page obsoleteclasses.html + \title Obsolete Classes + \ingroup classlists + + + This is a list of Qt classes that are obsolete (deprecated). These + classes are provided to keep old source code working but they are + no longer maintained. We strongly advise against using these + classes in new code. + + \generatelist obsoleteclasses + + \sa {Qt's Classes}, {Qt's Modules} +*/ + +/*! + \page annotated.html + \title Annotated Class Index + \ingroup classlists + + Qt's classes with brief descriptions: + + \generatelist annotatedclasses +*/ + +/*! + \page functions.html + \title Member Function Index + \ingroup classlists + + Here is the list of all the documented member functions in the Qt + API with links to the class documentation for each function. + + \generatelist functionindex +*/ + +/*! + \page hierarchy.html + + \title Class Inheritance Hierarchy + \ingroup classlists + + This list shows the C++ class inheritance relations between the + classes in the Qt API. + + \generatelist classhierarchy +*/ + +/*! + \page mainclasses.html + \title Qt's Main Classes + \ingroup classlists + + These are the most frequently used Qt classes. For the complete + list see \link classes.html Qt's Classes \endlink. + + \generatelist mainclasses +*/ + +/*! + \page compatclasses.html + \title Qt 3 Compatibility Classes + \ingroup classlists + + This is a list of the classes that Qt provides for compatibility + with Qt 3. The vast majority of these are provided by the + Qt3Support module. + + \generatelist compatclasses + + \sa {Qt's Classes}, {Qt's Modules} +*/ diff --git a/doc/src/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc index 09274bf923..09274bf923 100644 --- a/doc/src/phonon-api.qdoc +++ b/doc/src/classes/phonon-api.qdoc diff --git a/doc/src/q3asciicache.qdoc b/doc/src/classes/q3asciicache.qdoc index 43537cc242..43537cc242 100644 --- a/doc/src/q3asciicache.qdoc +++ b/doc/src/classes/q3asciicache.qdoc diff --git a/doc/src/q3asciidict.qdoc b/doc/src/classes/q3asciidict.qdoc index 9a51db13e2..9a51db13e2 100644 --- a/doc/src/q3asciidict.qdoc +++ b/doc/src/classes/q3asciidict.qdoc diff --git a/doc/src/q3cache.qdoc b/doc/src/classes/q3cache.qdoc index d8799b69a5..d8799b69a5 100644 --- a/doc/src/q3cache.qdoc +++ b/doc/src/classes/q3cache.qdoc diff --git a/doc/src/q3dict.qdoc b/doc/src/classes/q3dict.qdoc index 0e6d51da7e..0e6d51da7e 100644 --- a/doc/src/q3dict.qdoc +++ b/doc/src/classes/q3dict.qdoc diff --git a/doc/src/q3intcache.qdoc b/doc/src/classes/q3intcache.qdoc index dfff679a45..dfff679a45 100644 --- a/doc/src/q3intcache.qdoc +++ b/doc/src/classes/q3intcache.qdoc diff --git a/doc/src/q3intdict.qdoc b/doc/src/classes/q3intdict.qdoc index cef2e790e7..cef2e790e7 100644 --- a/doc/src/q3intdict.qdoc +++ b/doc/src/classes/q3intdict.qdoc diff --git a/doc/src/q3memarray.qdoc b/doc/src/classes/q3memarray.qdoc index b9c1f73e39..b9c1f73e39 100644 --- a/doc/src/q3memarray.qdoc +++ b/doc/src/classes/q3memarray.qdoc diff --git a/doc/src/q3popupmenu.qdoc b/doc/src/classes/q3popupmenu.qdoc index a2cfe0843e..a2cfe0843e 100644 --- a/doc/src/q3popupmenu.qdoc +++ b/doc/src/classes/q3popupmenu.qdoc diff --git a/doc/src/q3ptrdict.qdoc b/doc/src/classes/q3ptrdict.qdoc index 38ca0bb78b..38ca0bb78b 100644 --- a/doc/src/q3ptrdict.qdoc +++ b/doc/src/classes/q3ptrdict.qdoc diff --git a/doc/src/q3ptrlist.qdoc b/doc/src/classes/q3ptrlist.qdoc index 3000940d3d..3000940d3d 100644 --- a/doc/src/q3ptrlist.qdoc +++ b/doc/src/classes/q3ptrlist.qdoc diff --git a/doc/src/q3ptrqueue.qdoc b/doc/src/classes/q3ptrqueue.qdoc index b3af5f6e7c..b3af5f6e7c 100644 --- a/doc/src/q3ptrqueue.qdoc +++ b/doc/src/classes/q3ptrqueue.qdoc diff --git a/doc/src/q3ptrstack.qdoc b/doc/src/classes/q3ptrstack.qdoc index 1650d69467..1650d69467 100644 --- a/doc/src/q3ptrstack.qdoc +++ b/doc/src/classes/q3ptrstack.qdoc diff --git a/doc/src/q3ptrvector.qdoc b/doc/src/classes/q3ptrvector.qdoc index fa78de52e6..fa78de52e6 100644 --- a/doc/src/q3ptrvector.qdoc +++ b/doc/src/classes/q3ptrvector.qdoc diff --git a/doc/src/q3sqlfieldinfo.qdoc b/doc/src/classes/q3sqlfieldinfo.qdoc index ba064f3843..ba064f3843 100644 --- a/doc/src/q3sqlfieldinfo.qdoc +++ b/doc/src/classes/q3sqlfieldinfo.qdoc diff --git a/doc/src/q3sqlrecordinfo.qdoc b/doc/src/classes/q3sqlrecordinfo.qdoc index 64236d2f7c..64236d2f7c 100644 --- a/doc/src/q3sqlrecordinfo.qdoc +++ b/doc/src/classes/q3sqlrecordinfo.qdoc diff --git a/doc/src/q3valuelist.qdoc b/doc/src/classes/q3valuelist.qdoc index fd73763e28..fd73763e28 100644 --- a/doc/src/q3valuelist.qdoc +++ b/doc/src/classes/q3valuelist.qdoc diff --git a/doc/src/q3valuestack.qdoc b/doc/src/classes/q3valuestack.qdoc index e3ae677e11..e3ae677e11 100644 --- a/doc/src/q3valuestack.qdoc +++ b/doc/src/classes/q3valuestack.qdoc diff --git a/doc/src/q3valuevector.qdoc b/doc/src/classes/q3valuevector.qdoc index 353b7fae9b..353b7fae9b 100644 --- a/doc/src/q3valuevector.qdoc +++ b/doc/src/classes/q3valuevector.qdoc diff --git a/doc/src/qalgorithms.qdoc b/doc/src/classes/qalgorithms.qdoc index 7634322a9c..7634322a9c 100644 --- a/doc/src/qalgorithms.qdoc +++ b/doc/src/classes/qalgorithms.qdoc diff --git a/doc/src/qcache.qdoc b/doc/src/classes/qcache.qdoc index 6c88ede359..6c88ede359 100644 --- a/doc/src/qcache.qdoc +++ b/doc/src/classes/qcache.qdoc diff --git a/doc/src/qcolormap.qdoc b/doc/src/classes/qcolormap.qdoc index 95f7dc0868..95f7dc0868 100644 --- a/doc/src/qcolormap.qdoc +++ b/doc/src/classes/qcolormap.qdoc diff --git a/doc/src/qdesktopwidget.qdoc b/doc/src/classes/qdesktopwidget.qdoc index 56a882d61f..56a882d61f 100644 --- a/doc/src/qdesktopwidget.qdoc +++ b/doc/src/classes/qdesktopwidget.qdoc diff --git a/doc/src/qiterator.qdoc b/doc/src/classes/qiterator.qdoc index 416b4bce14..416b4bce14 100644 --- a/doc/src/qiterator.qdoc +++ b/doc/src/classes/qiterator.qdoc diff --git a/doc/src/qstyles.qdoc b/doc/src/classes/qmacstyle.qdoc index ae2d95b139..ae2d95b139 100644 --- a/doc/src/qstyles.qdoc +++ b/doc/src/classes/qmacstyle.qdoc diff --git a/doc/src/qnamespace.qdoc b/doc/src/classes/qnamespace.qdoc index afee5a260f..c398cf2a33 100644 --- a/doc/src/qnamespace.qdoc +++ b/doc/src/classes/qnamespace.qdoc @@ -1884,7 +1884,10 @@ We refer to a top-level window that has a parent as a \e secondary window. - \value Sheet Indicates that the widget is a Macintosh sheet. + \value Sheet Indicates that the window is a Macintosh sheet. Since + using a sheet implies window modality, the recommended + way is to use QWidget::setWindowModality(), or + QDialog::open(), instead. \value Drawer Indicates that the widget is a Macintosh drawer. diff --git a/doc/src/qpagesetupdialog.qdoc b/doc/src/classes/qpagesetupdialog.qdoc index 7f0b09ee50..7f0b09ee50 100644 --- a/doc/src/qpagesetupdialog.qdoc +++ b/doc/src/classes/qpagesetupdialog.qdoc diff --git a/doc/src/qpaintdevice.qdoc b/doc/src/classes/qpaintdevice.qdoc index 0f4e9a0446..0f4e9a0446 100644 --- a/doc/src/qpaintdevice.qdoc +++ b/doc/src/classes/qpaintdevice.qdoc diff --git a/doc/src/qpair.qdoc b/doc/src/classes/qpair.qdoc index 6d8a0f94f0..6d8a0f94f0 100644 --- a/doc/src/qpair.qdoc +++ b/doc/src/classes/qpair.qdoc diff --git a/doc/src/qpatternistdummy.cpp b/doc/src/classes/qpatternistdummy.cpp index a6901848fe..a6901848fe 100644 --- a/doc/src/qpatternistdummy.cpp +++ b/doc/src/classes/qpatternistdummy.cpp diff --git a/doc/src/qplugin.qdoc b/doc/src/classes/qplugin.qdoc index 4fbd198acc..4fbd198acc 100644 --- a/doc/src/qplugin.qdoc +++ b/doc/src/classes/qplugin.qdoc diff --git a/doc/src/qprintdialog.qdoc b/doc/src/classes/qprintdialog.qdoc index 8011f624b0..8011f624b0 100644 --- a/doc/src/qprintdialog.qdoc +++ b/doc/src/classes/qprintdialog.qdoc diff --git a/doc/src/qprinterinfo.qdoc b/doc/src/classes/qprinterinfo.qdoc index a4ffeb2bf3..a4ffeb2bf3 100644 --- a/doc/src/qprinterinfo.qdoc +++ b/doc/src/classes/qprinterinfo.qdoc diff --git a/doc/src/qset.qdoc b/doc/src/classes/qset.qdoc index 0db3775356..0db3775356 100644 --- a/doc/src/qset.qdoc +++ b/doc/src/classes/qset.qdoc diff --git a/doc/src/qsignalspy.qdoc b/doc/src/classes/qsignalspy.qdoc index 4ee7590f02..4ee7590f02 100644 --- a/doc/src/qsignalspy.qdoc +++ b/doc/src/classes/qsignalspy.qdoc diff --git a/doc/src/qsizepolicy.qdoc b/doc/src/classes/qsizepolicy.qdoc index c74beb8ad5..c74beb8ad5 100644 --- a/doc/src/qsizepolicy.qdoc +++ b/doc/src/classes/qsizepolicy.qdoc diff --git a/doc/src/classes/qtdesigner-api.qdoc b/doc/src/classes/qtdesigner-api.qdoc new file mode 100644 index 0000000000..d7c47b14cf --- /dev/null +++ b/doc/src/classes/qtdesigner-api.qdoc @@ -0,0 +1,1413 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \class QDesignerMemberSheetExtension + + \brief The QDesignerMemberSheetExtension class allows you to + manipulate a widget's member functions which is displayed when + configuring connections using Qt Designer's mode for editing + signals and slots. + + \inmodule QtDesigner + + QDesignerMemberSheetExtension is a collection of functions that is + typically used to query a widget's member functions, and to + manipulate the member functions' appearance in \QD's signals and + slots editing mode. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 2 + + When implementing a custom widget plugin, a pointer to \QD's + current QDesignerFormEditorInterface object (\c formEditor in the + example above) is provided by the + QDesignerCustomWidgetInterface::initialize() function's parameter. + + The member sheet (and any other extension), can be retrieved by + querying \QD's extension manager using the qt_extension() + function. When you want to release the extension, you only need to + delete the pointer. + + All widgets have a default member sheet used in \QD's signals and + slots editing mode with the widget's member functions. But + QDesignerMemberSheetExtension also provides an interface for + creating custom member sheet extensions. + + \warning \QD uses the QDesignerMemberSheetExtension to facilitate + the signal and slot editing mode. Whenever a connection between + two widgets is requested, \QD will query for the widgets' member + sheet extensions. If a widget has an implemented member sheet + extension, this extension will override the default member sheet. + + To create a member sheet extension, your extension class must + inherit from both QObject and QDesignerMemberSheetExtension. Then, + since we are implementing an interface, we must ensure that it's + made known to the meta object system using the Q_INTERFACES() + macro: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 3 + + This enables \QD to use qobject_cast() to query for + supported interfaces using nothing but a QObject pointer. + + In \QD the extensions are not created until they are + required. For that reason, when implementing a member sheet + extension, you must also create a QExtensionFactory, i.e a class + that is able to make an instance of your extension, and register + it using \QD's \l {QExtensionManager}{extension manager}. + + When a widget's member sheet extension is required, \QD's \l + {QExtensionManager}{extension manager} will run through all its + registered factories calling QExtensionFactory::createExtension() + for each until the first one that is able to create a member sheet + extension for that widget, is found. This factory will then make + an instance of the extension. If no such factory is found, \QD + will use the default member sheet. + + There are four available types of extensions in \QD: + QDesignerContainerExtension, QDesignerMemberSheetExtension, + QDesignerPropertySheetExtension and + QDesignerTaskMenuExtension. \QD's behavior is the same whether the + requested extension is associated with a multi page container, a + member sheet, a property sheet or a task menu. + + The QExtensionFactory class provides a standard extension + factory, and can also be used as an interface for custom + extension factories. You can either create a new + QExtensionFactory and reimplement the + QExtensionFactory::createExtension() function. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 4 + + Or you can use an existing factory, expanding the + QExtensionFactory::createExtension() function to make the factory + able to create a member sheet extension as well. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 5 + + For a complete example using an extension class, see \l + {designer/taskmenuextension}{Task Menu Extension example}. The + example shows how to create a custom widget plugin for Qt + Designer, and how to to use the QDesignerTaskMenuExtension class + to add custom items to \QD's task menu. + + \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget + Extensions} +*/ + +/*! + \fn QDesignerMemberSheetExtension::~QDesignerMemberSheetExtension() + + Destroys the member sheet extension. +*/ + +/*! + \fn int QDesignerMemberSheetExtension::count() const + + Returns the extension's number of member functions. +*/ + +/*! + \fn int QDesignerMemberSheetExtension::indexOf(const QString &name) const + + Returns the index of the member function specified by the given \a + name. + + \sa memberName() +*/ + +/*! + \fn QString QDesignerMemberSheetExtension::memberName(int index) const + + Returns the name of the member function with the given \a index. + + \sa indexOf() +*/ + +/*! + \fn QString QDesignerMemberSheetExtension::memberGroup(int index) const + + Returns the name of the member group specified for the function + with the given \a index. + + \sa indexOf(), setMemberGroup() +*/ + +/*! + \fn void QDesignerMemberSheetExtension::setMemberGroup(int index, const QString &group) + + Sets the member group of the member function with the given \a + index, to \a group. + + \sa indexOf(), memberGroup() +*/ + +/*! + \fn bool QDesignerMemberSheetExtension::isVisible(int index) const + + Returns true if the member function with the given \a index is + visible in \QD's signal and slot editor, otherwise false. + + \sa indexOf(), setVisible() +*/ + +/*! + \fn void QDesignerMemberSheetExtension::setVisible(int index, bool visible) + + If \a visible is true, the member function with the given \a index + is visible in \QD's signals and slots editing mode; otherwise the + member function is hidden. + + \sa indexOf(), isVisible() +*/ + +/*! + \fn virtual bool QDesignerMemberSheetExtension::isSignal(int index) const + + Returns true if the member function with the given \a index is a + signal, otherwise false. + + \sa indexOf() +*/ + +/*! + \fn bool QDesignerMemberSheetExtension::isSlot(int index) const + + Returns true if the member function with the given \a index is a + slot, otherwise false. + + \sa indexOf() +*/ + +/*! + \fn bool QDesignerMemberSheetExtension::inheritedFromWidget(int index) const + + Returns true if the member function with the given \a index is + inherited from QWidget, otherwise false. + + \sa indexOf() +*/ + +/*! + \fn QString QDesignerMemberSheetExtension::declaredInClass(int index) const + + Returns the name of the class in which the member function with + the given \a index is declared. + + \sa indexOf() +*/ + +/*! + \fn QString QDesignerMemberSheetExtension::signature(int index) const + + Returns the signature of the member function with the given \a + index. + + \sa indexOf() +*/ + +/*! + \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterTypes(int index) const + + Returns the parameter types of the member function with the given + \a index, as a QByteArray list. + + \sa indexOf(), parameterNames() +*/ + +/*! + \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterNames(int index) const + + Returns the parameter names of the member function with the given + \a index, as a QByteArray list. + + \sa indexOf(), parameterTypes() +*/ + + +// Doc: Interface only + +/*! + \class QDesignerLayoutDecorationExtension + \brief The QDesignerLayoutDecorationExtension class provides an extension to a layout in \QD. + \inmodule QtDesigner + \internal +*/ + +/*! + \enum QDesignerLayoutDecorationExtension::InsertMode + + This enum describes the modes that are used to insert items into a layout. + + \value InsertWidgetMode Widgets are inserted into empty cells in a layout. + \value InsertRowMode Whole rows are inserted into a vertical or grid layout. + \value InsertColumnMode Whole columns are inserted into a horizontal or grid layout. +*/ + +/*! + \fn virtual QDesignerLayoutDecorationExtension::~QDesignerLayoutDecorationExtension() + + Destroys the extension. +*/ + +/*! + \fn virtual QList<QWidget*> QDesignerLayoutDecorationExtension::widgets(QLayout *layout) const + + Returns the widgets that are managed by the given \a layout. + + \sa insertWidget(), removeWidget() +*/ + +/*! + \fn QRect QDesignerLayoutDecorationExtension::itemInfo(int index) const + + Returns the rectangle covered by the item at the given \a index in the layout. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::indexOf(QWidget *widget) const + + Returns the index of the specified \a widget in the layout. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::indexOf(QLayoutItem *item) const + + Returns the index of the specified layout \a item. +*/ + +/*! + \fn QDesignerLayoutDecorationExtension::InsertMode QDesignerLayoutDecorationExtension::currentInsertMode() const + + Returns the current insertion mode. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::currentIndex() const + + Returns the current index in the layout. +*/ + +/*! + \fn QPair<int, int> QDesignerLayoutDecorationExtension::currentCell() const + + Returns a pair containing the row and column of the current cell in the layout. +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::insertWidget(QWidget *widget, const QPair<int, int> &cell) + + Inserts the given \a widget into the specified \a cell in the layout. + + \sa removeWidget() +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::removeWidget(QWidget *widget) + + Removes the specified \a widget from the layout. + + \sa insertWidget() +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::insertRow(int row) + + Inserts a new row into the form at the position specified by \a row. +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::insertColumn(int column) + + Inserts a new column into the form at the position specified by \a column. +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::simplify() + + Simplifies the layout by removing unnecessary empty rows and columns, and by changing the + number of rows or columns spanned by widgets. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::findItemAt(const QPoint &position) const + + Returns the index of the item in the layout that covers the given \a position. +*/ + +/*! + \fn int QDesignerLayoutDecorationExtension::findItemAt(int row, int column) const + + Returns the item in the layout that occupies the specified \a row and \a column in the layout. + + Currently, this only applies to grid layouts. +*/ + +/*! + \fn void QDesignerLayoutDecorationExtension::adjustIndicator(const QPoint &position, int index) + + Adjusts the indicator for the item specified by \a index so that + it lies at the given \a position on the form. +*/ + + +// Doc: Interface only + +/*! + \class QDesignerContainerExtension + \brief The QDesignerContainerExtension class allows you to add pages to + a custom multi-page container in Qt Designer's workspace. + \inmodule QtDesigner + + QDesignerContainerExtension provide an interface for creating + custom container extensions. A container extension consists of a + collection of functions that \QD needs to manage a multi-page + container plugin, and a list of the container's pages. + + \image containerextension-example.png + + \warning This is \e not an extension for container plugins in + general, only custom \e multi-page containers. + + To create a container extension, your extension class must inherit + from both QObject and QDesignerContainerExtension. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 6 + + Since we are implementing an interface, we must ensure that it's + made known to the meta object system using the Q_INTERFACES() + macro. This enables \QD to use the qobject_cast() function to + query for supported interfaces using nothing but a QObject + pointer. + + You must reimplement several functions to enable \QD to manage a + custom multi-page container widget: \QD uses count() to keep track + of the number pages in your container, widget() to return the page + at a given index in the list of the container's pages, and + currentIndex() to return the list index of the selected page. \QD + uses the addWidget() function to add a given page to the + container, expecting it to be appended to the list of pages, while + it expects the insertWidget() function to add a given page to the + container by inserting it at a given index. + + In \QD the extensions are not created until they are + required. For that reason you must also create a + QExtensionFactory, i.e a class that is able to make an instance of + your extension, and register it using \QD's \l + {QExtensionManager}{extension manager}. + + When a container extension is required, \QD's \l + {QExtensionManager}{extension manager} will run through all its + registered factories calling QExtensionFactory::createExtension() + for each until the first one that is able to create a container + extension, is found. This factory will then create the extension + for the plugin. + + There are four available types of extensions in \QD: + QDesignerContainerExtension , QDesignerMemberSheetExtension, + QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. + \QD's behavior is the same whether the requested extension is + associated with a multi page container, a member sheet, a property + sheet or a task menu. + + The QExtensionFactory class provides a standard extension factory, + and can also be used as an interface for custom extension + factories. You can either create a new QExtensionFactory and + reimplement the QExtensionFactory::createExtension() function. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 7 + + Or you can use an existing factory, expanding the + QExtensionFactory::createExtension() function to make the factory + able to create a container extension as well. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 8 + + For a complete example using the QDesignerContainerExtension + class, see the \l {designer/containerextension}{Container + Extension example}. The example shows how to create a custom + multi-page plugin for \QD. + + \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget + Extensions} +*/ + +/*! + \fn QDesignerContainerExtension::~QDesignerContainerExtension() + + Destroys the extension. +*/ + +/*! + \fn int QDesignerContainerExtension::count() const + + Returns the number of pages in the container. +*/ + +/*! + \fn QWidget *QDesignerContainerExtension::widget(int index) const + + Returns the page at the given \a index in the extension's list of + pages. + + \sa addWidget(), insertWidget() +*/ + +/*! + \fn int QDesignerContainerExtension::currentIndex() const + + Returns the index of the currently selected page in the + container. + + \sa setCurrentIndex() +*/ + +/*! + \fn void QDesignerContainerExtension::setCurrentIndex(int index) + + Sets the currently selected page in the container to be the + page at the given \a index in the extension's list of pages. + + \sa currentIndex() +*/ + +/*! + \fn void QDesignerContainerExtension::addWidget(QWidget *page) + + Adds the given \a page to the container by appending it to the + extension's list of pages. + + \sa insertWidget(), remove(), widget() +*/ + +/*! + \fn void QDesignerContainerExtension::insertWidget(int index, QWidget *page) + + Adds the given \a page to the container by inserting it at the + given \a index in the extension's list of pages. + + \sa addWidget(), remove(), widget() +*/ + +/*! + \fn void QDesignerContainerExtension::remove(int index) + + Removes the page at the given \a index from the extension's list + of pages. + + \sa addWidget(), insertWidget() +*/ + + +// Doc: Interface only + +/*! + \class QDesignerTaskMenuExtension + \brief The QDesignerTaskMenuExtension class allows you to add custom + menu entries to Qt Designer's task menu. + \inmodule QtDesigner + + QDesignerTaskMenuExtension provides an interface for creating + custom task menu extensions. It is typically used to create task + menu entries that are specific to a plugin in \QD. + + \QD uses the QDesignerTaskMenuExtension to feed its task + menu. Whenever a task menu is requested, \QD will query + for the selected widget's task menu extension. + + \image taskmenuextension-example-faded.png + + A task menu extension is a collection of QActions. The actions + appear as entries in the task menu when the plugin with the + specified extension is selected. The image above shows the custom + \gui {Edit State...} action which appears in addition to \QD's + default task menu entries: \gui Cut, \gui Copy, \gui Paste etc. + + To create a custom task menu extension, your extension class must + inherit from both QObject and QDesignerTaskMenuExtension. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 9 + + Since we are implementing an interface, we must ensure that it + is made known to the meta-object system using the Q_INTERFACES() + macro. This enables \QD to use the qobject_cast() function to + query for supported interfaces using nothing but a QObject + pointer. + + You must reimplement the taskActions() function to return a list + of actions that will be included in \QD task menu. Optionally, you + can reimplement the preferredEditAction() function to set the + action that is invoked when selecting your plugin and pressing + \key F2. The preferred edit action must be one of the actions + returned by taskActions() and, if it's not defined, pressing the + \key F2 key will simply be ignored. + + In \QD, extensions are not created until they are required. A + task menu extension, for example, is created when you click the + right mouse button over a widget in \QD's workspace. For that + reason you must also construct an extension factory, using either + QExtensionFactory or a subclass, and register it using \QD's + \l {QExtensionManager}{extension manager}. + + When a task menu extension is required, \QD's \l + {QExtensionManager}{extension manager} will run through all its + registered factories calling QExtensionFactory::createExtension() + for each until it finds one that is able to create a task menu + extension for the selected widget. This factory will then make an + instance of the extension. + + There are four available types of extensions in \QD: + QDesignerContainerExtension, QDesignerMemberSheetExtension, + QDesignerPropertySheetExtension, and QDesignerTaskMenuExtension. + \QD's behavior is the same whether the requested extension is + associated with a container, a member sheet, a property sheet or a + task menu. + + The QExtensionFactory class provides a standard extension factory, + and can also be used as an interface for custom extension + factories. You can either create a new QExtensionFactory and + reimplement the QExtensionFactory::createExtension() function. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 10 + + Or you can use an existing factory, expanding the + QExtensionFactory::createExtension() function to make the factory + able to create a task menu extension as well. For example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 11 + + For a complete example using the QDesignerTaskMenuExtension class, + see the \l {designer/taskmenuextension}{Task Menu Extension + example}. The example shows how to create a custom widget plugin + for \QD, and how to to use the QDesignerTaskMenuExtension + class to add custom items to \QD's task menu. + + \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget + Extensions} +*/ + +/*! + \fn QDesignerTaskMenuExtension::~QDesignerTaskMenuExtension() + + Destroys the task menu extension. +*/ + +/*! + \fn QAction *QDesignerTaskMenuExtension::preferredEditAction() const + + Returns the action that is invoked when selecting a plugin with + the specified extension and pressing \key F2. + + The action must be one of the actions returned by taskActions(). +*/ + +/*! + \fn QList<QAction*> QDesignerTaskMenuExtension::taskActions() const + + Returns the task menu extension as a list of actions which will be + included in \QD's task menu when a plugin with the specified + extension is selected. + + The function must be reimplemented to add actions to the list. +*/ + + +// Doc: Interface only + +/*! + \class QDesignerCustomWidgetCollectionInterface + + \brief The QDesignerCustomWidgetCollectionInterface class allows + you to include several custom widgets in one single library. + + \inmodule QtDesigner + + When implementing a custom widget plugin, you build it as a + separate library. If you want to include several custom widget + plugins in the same library, you must in addition subclass + QDesignerCustomWidgetCollectionInterface. + + QDesignerCustomWidgetCollectionInterface contains one single + function returning a list of the collection's + QDesignerCustomWidgetInterface objects. For example, if you have + several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and + \c CustomWidgetThree, the class definition may look like this: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 12 + + In the class constructor you add the interfaces to your custom + widgets to the list which you return in the customWidgets() + function: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 13 + + Note that instead of exporting each custom widget plugin using the + Q_EXPORT_PLUGIN2() macro, you export the entire collection. The + Q_EXPORT_PLUGIN2() macro ensures that \QD can access and construct + the custom widgets. Without this macro, there is no way for \QD to + use them. + + \sa QDesignerCustomWidgetInterface, {Creating Custom Widgets for + Qt Designer} +*/ + +/*! + \fn QDesignerCustomWidgetCollectionInterface::~QDesignerCustomWidgetCollectionInterface() { + + Destroys the custom widget collection interface. +*/ + +/*! + \fn QList<QDesignerCustomWidgetInterface*> QDesignerCustomWidgetCollectionInterface::customWidgets() const + + Returns a list of interfaces to the collection's custom widgets. +*/ + + +// Doc: Interface only + +/*! + \class QDesignerCustomWidgetInterface + + \brief The QDesignerCustomWidgetInterface class enables Qt Designer + to access and construct custom widgets. + + \inmodule QtDesigner + + QDesignerCustomWidgetInterface provides a custom widget with an + interface. The class contains a set of functions that must be subclassed + to return basic information about the widget, such as its class name and + the name of its header file. Other functions must be implemented to + initialize the plugin when it is loaded, and to construct instances of + the custom widget for \QD to use. + + When implementing a custom widget you must subclass + QDesignerCustomWidgetInterface to expose your widget to \QD. For + example, this is the declaration for the plugin used in the + \l{Custom Widget Plugin Example}{Custom Widget Plugin example} that + enables an analog clock custom widget to be used by \QD: + + \snippet examples/designer/customwidgetplugin/customwidgetplugin.h 0 + + Note that the only part of the class definition that is specific + to this particular custom widget is the class name. In addition, + since we are implementing an interface, we must ensure that it's + made known to the meta object system using the Q_INTERFACES() + macro. This enables \QD to use the qobject_cast() function to + query for supported interfaces using nothing but a QObject + pointer. + + After \QD loads a custom widget plugin, it calls the interface's + initialize() function to enable it to set up any resources that it + may need. This function is called with a QDesignerFormEditorInterface + parameter that provides the plugin with a gateway to all of \QD's API. + + \QD constructs instances of the custom widget by calling the plugin's + createWidget() function with a suitable parent widget. Plugins must + construct and return an instance of a custom widget with the specified + parent widget. + + In the implementation of the class you must remember to export + your custom widget plugin to \QD using the Q_EXPORT_PLUGIN2() + macro. For example, if a library called \c libcustomwidgetplugin.so + (on Unix) or \c libcustomwidget.dll (on Windows) contains a widget + class called \c MyCustomWidget, we can export it by adding the + following line to the file containing the plugin implementation: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 14 + + This macro ensures that \QD can access and construct the custom widget. + Without this macro, there is no way for \QD to use it. + + When implementing a custom widget plugin, you build it as a + separate library. If you want to include several custom widget + plugins in the same library, you must in addition subclass + QDesignerCustomWidgetCollectionInterface. + + \warning If your custom widget plugin contains QVariant + properties, be aware that only the following \l + {QVariant::Type}{types} are supported: + + \list + \o QVariant::ByteArray + \o QVariant::Bool + \o QVariant::Color + \o QVariant::Cursor + \o QVariant::Date + \o QVariant::DateTime + \o QVariant::Double + \o QVariant::Int + \o QVariant::Point + \o QVariant::Rect + \o QVariant::Size + \o QVariant::SizePolicy + \o QVariant::String + \o QVariant::Time + \o QVariant::UInt + \endlist + + For a complete example using the QDesignerCustomWidgetInterface + class, see the \l {designer/customwidgetplugin}{Custom Widget + Example}. The example shows how to create a custom widget plugin + for \QD. + + \sa QDesignerCustomWidgetCollectionInterface {Creating Custom + Widgets for Qt Designer} +*/ + +/*! + \fn QDesignerCustomWidgetInterface::~QDesignerCustomWidgetInterface() + + Destroys the custom widget interface. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::name() const + + Returns the class name of the custom widget supplied by the interface. + + The name returned \e must be identical to the class name used for the + custom widget. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::group() const + + Returns the name of the group to which the custom widget belongs. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::toolTip() const + + Returns a short description of the widget that can be used by \QD + in a tool tip. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::whatsThis() const + + Returns a description of the widget that can be used by \QD in + "What's This?" help for the widget. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::includeFile() const + + Returns the path to the include file that \l uic uses when + creating code for the custom widget. +*/ + +/*! + \fn QIcon QDesignerCustomWidgetInterface::icon() const + + Returns the icon used to represent the custom widget in \QD's + widget box. +*/ + +/*! + \fn bool QDesignerCustomWidgetInterface::isContainer() const + + Returns true if the custom widget is intended to be used as a + container; otherwise returns false. + + Most custom widgets are not used to hold other widgets, so their + implementations of this function will return false, but custom + containers will return true to ensure that they behave correctly + in \QD. +*/ + +/*! + \fn QWidget *QDesignerCustomWidgetInterface::createWidget(QWidget *parent) + + Returns a new instance of the custom widget, with the given \a + parent. +*/ + +/*! + \fn bool QDesignerCustomWidgetInterface::isInitialized() const + + Returns true if the widget has been initialized; otherwise returns + false. + + \sa initialize() +*/ + +/*! + \fn void QDesignerCustomWidgetInterface::initialize(QDesignerFormEditorInterface *formEditor) + + Initializes the widget for use with the specified \a formEditor + interface. + + \sa isInitialized() +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::domXml() const + + Returns the XML that is used to describe the custom widget's + properties to \QD. +*/ + +/*! + \fn QString QDesignerCustomWidgetInterface::codeTemplate() const + + This function is reserved for future use by \QD. + + \omit + Returns the code template that \QD includes in forms that contain + the custom widget when they are saved. + \endomit +*/ + +/*! + \macro QDESIGNER_WIDGET_EXPORT + \relates QDesignerCustomWidgetInterface + \since 4.1 + + This macro is used when defining custom widgets to ensure that they are + correctly exported from plugins for use with \QD. + + On some platforms, the symbols required by \QD to create new widgets + are removed from plugins by the build system, making them unusable. + Using this macro ensures that the symbols are retained on those platforms, + and has no side effects on other platforms. + + For example, the \l{designer/worldtimeclockplugin}{World Time Clock Plugin} + example exports a custom widget class with the following declaration: + + \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 0 + \dots + \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 2 + + \sa {Creating Custom Widgets for Qt Designer} +*/ + + +// Doc: Abstract class + +/*! + \class QDesignerDnDItemInterface + \brief The QDesignerDnDItemInterface class provides an interface that is used to manage items + during a drag and drop operation. + \inmodule QtDesigner + \internal +*/ + +/*! + \enum QDesignerDnDItemInterface::DropType + + This enum describes the result of a drag and drop operation. + + \value MoveDrop The item was moved. + \value CopyDrop The item was copied. +*/ + +/*! + \fn QDesignerDnDItemInterface::QDesignerDnDItemInterface() + + Constructs a new interface to a drag and drop item. +*/ + +/*! + \fn QDesignerDnDItemInterface::~QDesignerDnDItemInterface() + + Destroys the interface to the item. +*/ + +/*! + \fn DomUI *QDesignerDnDItemInterface::domUi() const + + Returns a user interface object for the item. +*/ + +/*! + \fn QWidget *QDesignerDnDItemInterface::widget() const + + Returns the widget being copied or moved in the drag and drop operation. + + \sa source() +*/ + +/*! + \fn QWidget *QDesignerDnDItemInterface::decoration() const + + Returns the widget used to represent the item. +*/ + +/*! + \fn QPoint QDesignerDnDItemInterface::hotSpot() const + + Returns the cursor's hotspot. + + \sa QDrag::hotSpot() +*/ + +/*! + \fn DropType QDesignerDnDItemInterface::type() const + + Returns the type of drag and drop operation in progress. +*/ + +/*! + \fn QWidget *QDesignerDnDItemInterface::source() const + + Returns the widget that is the source of the drag and drop operation; i.e. the original + container of the widget being dragged. + + \sa widget() +*/ + + +// Doc: Abstract class + +/*! + \class QDesignerIconCacheInterface + \brief The QDesignerIconCacheInterface class provides an interface to \QD's icon cache. + \inmodule QtDesigner + \internal +*/ + +/*! + \fn QDesignerIconCacheInterface::QDesignerIconCacheInterface(QObject *parent) + + Constructs a new interface with the given \a parent. +*/ + +/*! + \fn QIcon QDesignerIconCacheInterface::nameToIcon(const QString &filePath, const QString &qrcPath) + + Returns the icon associated with the name specified by \a filePath in the resource + file specified by \a qrcPath. + + If \a qrcPath refers to a valid resource file, the name used for the file path is a path + within those resources; otherwise the file path refers to a local file. + + \sa {The Qt Resource System}, nameToPixmap() +*/ + +/*! + \fn QPixmap QDesignerIconCacheInterface::nameToPixmap(const QString &filePath, const QString &qrcPath) + + Returns the pixmap associated with the name specified by \a filePath in the resource + file specified by \a qrcPath. + + If \a qrcPath refers to a valid resource file, the name used for the file path is a path + within those resources; otherwise the file path refers to a local file. + + \sa {The Qt Resource System}, nameToIcon() +*/ + +/*! + \fn QString QDesignerIconCacheInterface::iconToFilePath(const QIcon &icon) const + + Returns the file path associated with the given \a icon. The file path is a path within + an application resources. +*/ + +/*! + \fn QString QDesignerIconCacheInterface::iconToQrcPath(const QIcon &icon) const + + Returns the path to the resource file that refers to the specified \a icon. The resource + path refers to a local file. +*/ + +/*! + \fn QString QDesignerIconCacheInterface::pixmapToFilePath(const QPixmap &pixmap) const + + Returns the file path associated with the given \a pixmap. The file path is a path within + an application resources. +*/ + +/*! + \fn QString QDesignerIconCacheInterface::pixmapToQrcPath(const QPixmap &pixmap) const + + Returns the path to the resource file that refers to the specified \a pixmap. The resource + path refers to a local file. +*/ + +/*! + \fn QList<QPixmap> QDesignerIconCacheInterface::pixmapList() const + + Returns a list of pixmaps for the icons provided by the icon cache. +*/ + +/*! + \fn QList<QIcon> QDesignerIconCacheInterface::iconList() const + + Returns a list of icons provided by the icon cache. +*/ + +/*! + \fn QString QDesignerIconCacheInterface::resolveQrcPath(const QString &filePath, const QString &qrcPath, const QString &workingDirectory) const + + Returns a path to a resource specified by the \a filePath within + the resource file located at \a qrcPath. If \a workingDirectory is + a valid path to a directory, the path returned will be relative to + that directory; otherwise an absolute path is returned. + + \omit + ### Needs checking + \endomit +*/ + + +// Doc: Interface only + +/*! + \class QDesignerPropertySheetExtension + + \brief The QDesignerPropertySheetExtension class allows you to + manipulate a widget's properties which is displayed in Qt + Designer's property editor. + + \sa QDesignerDynamicPropertySheetExtension + + \inmodule QtDesigner + + QDesignerPropertySheetExtension provides a collection of functions that + are typically used to query a widget's properties, and to + manipulate the properties' appearance in the property editor. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 15 + + Note that if you change the value of a property using the + QDesignerPropertySheetExtension::setProperty() function, the undo + stack is not updated. To ensure that a property's value can be + reverted using the undo stack, you must use the + QDesignerFormWindowCursorInterface::setProperty() function, or its + buddy \l + {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()}, + instead. + + When implementing a custom widget plugin, a pointer to \QD's + current QDesignerFormEditorInterface object (\c formEditor in the + example above) is provided by the + QDesignerCustomWidgetInterface::initialize() function's parameter. + + The property sheet, or any other extension, can be retrieved by + querying \QD's extension manager using the qt_extension() + function. When you want to release the extension, you only need to + delete the pointer. + + All widgets have a default property sheet which populates \QD's + property editor with the widget's properties (i.e the ones defined + with the Q_PROPERTY() macro). But QDesignerPropertySheetExtension + also provides an interface for creating custom property sheet + extensions. + + \warning \QD uses the QDesignerPropertySheetExtension to feed its + property editor. Whenever a widget is selected in its workspace, + \QD will query for the widget's property sheet extension. If the + selected widget has an implemented property sheet extension, this + extension will override the default property sheet. + + To create a property sheet extension, your extension class must + inherit from both QObject and + QDesignerPropertySheetExtension. Then, since we are implementing + an interface, we must ensure that it's made known to the meta + object system using the Q_INTERFACES() macro: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 16 + + This enables \QD to use qobject_cast() to query for supported + interfaces using nothing but a QObject pointer. + + In \QD the extensions are not created until they are + required. For that reason, when implementing a property sheet + extension, you must also create a QExtensionFactory, i.e a class + that is able to make an instance of your extension, and register + it using \QD's \l {QExtensionManager}{extension manager}. + + When a property sheet extension is required, \QD's \l + {QExtensionManager}{extension manager} will run through all its + registered factories calling QExtensionFactory::createExtension() + for each until the first one that is able to create a property + sheet extension for the selected widget, is found. This factory + will then make an instance of the extension. If no such factory + can be found, \QD will use the default property sheet. + + There are four available types of extensions in \QD: + QDesignerContainerExtension, QDesignerMemberSheetExtension, + QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. Qt + Designer's behavior is the same whether the requested extension is + associated with a multi page container, a member sheet, a property + sheet or a task menu. + + The QExtensionFactory class provides a standard extension factory, + and can also be used as an interface for custom extension + factories. You can either create a new QExtensionFactory and + reimplement the QExtensionFactory::createExtension() function. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 17 + + Or you can use an existing factory, expanding the + QExtensionFactory::createExtension() function to make the factory + able to create a property sheet extension extension as well. For + example: + + \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 18 + + For a complete example using an extension class, see the \l + {designer/taskmenuextension}{Task Menu Extension example}. The + example shows how to create a custom widget plugin for Qt + Designer, and how to to use the QDesignerTaskMenuExtension class + to add custom items to \QD's task menu. + + \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget + Extensions} +*/ + +/*! + \fn QDesignerPropertySheetExtension::~QDesignerPropertySheetExtension() + + Destroys the property sheet extension. +*/ + +/*! + \fn int QDesignerPropertySheetExtension::count() const + + Returns the selected widget's number of properties. +*/ + +/*! + \fn int QDesignerPropertySheetExtension::indexOf(const QString &name) const + + Returns the index for a given property \a name. + + \sa propertyName() +*/ + +/*! + \fn QString QDesignerPropertySheetExtension::propertyName(int index) const + + Returns the name of the property at the given \a index. + + \sa indexOf() +*/ + +/*! + \fn QString QDesignerPropertySheetExtension::propertyGroup(int index) const + + Returns the property group for the property at the given \a index. + + \QD's property editor supports property groups, i.e. sections of + related properties. A property can be related to a group using the + setPropertyGroup() function. The default group of any property is + the name of the class that defines it. For example, the + QObject::objectName property appears within the QObject property + group. + + \sa indexOf(), setPropertyGroup() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setPropertyGroup(int index, const QString &group) + + Sets the property group for the property at the given \a index to + \a group. + + Relating a property to a group makes it appear within that group's + section in the property editor. The default property group of any + property is the name of the class that defines it. For example, + the QObject::objectName property appears within the QObject + property group. + + \sa indexOf(), property(), propertyGroup() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::hasReset(int index) const + + Returns true if the property at the given \a index has a reset + button in \QD's property editor, otherwise false. + + \sa indexOf(), reset() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::reset(int index) + + Resets the value of the property at the given \a index, to the + default value. Returns true if a default value could be found, otherwise false. + + \sa indexOf(), hasReset(), isChanged() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::isVisible(int index) const + + Returns true if the property at the given \a index is visible in + \QD's property editor, otherwise false. + + \sa indexOf(), setVisible() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setVisible(int index, bool visible) + + If \a visible is true, the property at the given \a index is + visible in \QD's property editor; otherwise the property is + hidden. + + \sa indexOf(), isVisible() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::isAttribute(int index) const + + Returns true if the property at the given \a index is an attribute, + which will be \e excluded from the UI file, otherwise false. + + \sa indexOf(), setAttribute() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setAttribute(int index, bool attribute) + + If \a attribute is true, the property at the given \a index is + made an attribute which will be \e excluded from the UI file; + otherwise it will be included. + + \sa indexOf(), isAttribute() +*/ + +/*! + \fn QVariant QDesignerPropertySheetExtension::property(int index) const + + Returns the value of the property at the given \a index. + + \sa indexOf(), setProperty(), propertyGroup() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setProperty(int index, const QVariant &value) + + Sets the \a value of the property at the given \a index. + + \warning If you change the value of a property using this + function, the undo stack is not updated. To ensure that a + property's value can be reverted using the undo stack, you must + use the QDesignerFormWindowCursorInterface::setProperty() + function, or its buddy \l + {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()}, + instead. + + \sa indexOf(), property(), propertyGroup() +*/ + +/*! + \fn bool QDesignerPropertySheetExtension::isChanged(int index) const + + Returns true if the value of the property at the given \a index + differs from the property's default value, otherwise false. + + \sa indexOf(), setChanged(), reset() +*/ + +/*! + \fn void QDesignerPropertySheetExtension::setChanged(int index, bool changed) + + Sets whether the property at the given \a index is different from + its default value, or not, depending on the \a changed parameter. + + \sa indexOf(), isChanged() +*/ + +// Doc: Interface only + +/*! + \class QDesignerDynamicPropertySheetExtension + + \brief The QDesignerDynamicPropertySheetExtension class allows you to + manipulate a widget's dynamic properties in Qt Designer's property editor. + + \sa QDesignerPropertySheetExtension, {QObject#Dynamic Properties}{Dynamic Properties} + + \inmodule QtDesigner + \since 4.3 +*/ + +/*! + \fn QDesignerDynamicPropertySheetExtension::~QDesignerDynamicPropertySheetExtension() + + Destroys the dynamic property sheet extension. +*/ + +/*! + \fn bool QDesignerDynamicPropertySheetExtension::dynamicPropertiesAllowed() const + + Returns true if the widget supports dynamic properties; otherwise returns false. +*/ + +/*! + \fn int QDesignerDynamicPropertySheetExtension::addDynamicProperty(const QString &propertyName, const QVariant &value) + + Adds a dynamic property named \a propertyName and sets its value to \a value. + Returns the index of the property if it was added successfully; otherwise returns -1 to + indicate failure. +*/ + +/*! + \fn bool QDesignerDynamicPropertySheetExtension::removeDynamicProperty(int index) + + Removes the dynamic property at the given \a index. + Returns true if the operation succeeds; otherwise returns false. +*/ + +/*! + \fn bool QDesignerDynamicPropertySheetExtension::isDynamicProperty(int index) const + + Returns true if the property at the given \a index is a dynamic property; otherwise + returns false. +*/ + +/*! + \fn bool QDesignerDynamicPropertySheetExtension::canAddDynamicProperty(const QString &propertyName) const + + Returns true if \a propertyName is a valid, unique name for a dynamic + property; otherwise returns false. + +*/ diff --git a/doc/src/qtendian.qdoc b/doc/src/classes/qtendian.qdoc index dcffb5d5cc..dcffb5d5cc 100644 --- a/doc/src/qtendian.qdoc +++ b/doc/src/classes/qtendian.qdoc diff --git a/doc/src/qtestevent.qdoc b/doc/src/classes/qtestevent.qdoc index 2e111b3244..2e111b3244 100644 --- a/doc/src/qtestevent.qdoc +++ b/doc/src/classes/qtestevent.qdoc diff --git a/doc/src/qvarlengtharray.qdoc b/doc/src/classes/qvarlengtharray.qdoc index ac6bb6e28e..ac6bb6e28e 100644 --- a/doc/src/qvarlengtharray.qdoc +++ b/doc/src/classes/qvarlengtharray.qdoc diff --git a/doc/src/qwaitcondition.qdoc b/doc/src/classes/qwaitcondition.qdoc index ae94e35b8c..ae94e35b8c 100644 --- a/doc/src/qwaitcondition.qdoc +++ b/doc/src/classes/qwaitcondition.qdoc diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc index c67865d9f6..ab33185de7 100644 --- a/doc/src/designer-manual.qdoc +++ b/doc/src/designer-manual.qdoc @@ -402,7 +402,7 @@ while setting as few widget size constraints as possible. For a more technical perspective on Qt's layout classes, refer to the - \l{Layout Classes} document. + \l{Layout Management} documentation. */ diff --git a/doc/src/examples/collidingmice-example.qdoc b/doc/src/examples/collidingmice-example.qdoc index 5b124f95bf..f627fbf131 100644 --- a/doc/src/examples/collidingmice-example.qdoc +++ b/doc/src/examples/collidingmice-example.qdoc @@ -95,11 +95,11 @@ the global qrand() function which is a thread-safe version of the standard C++ rand() function. - Then we call the \l {QGraphicsItem::rotate()}{rotate()} function + Then we call the \l {QGraphicsItem::setRotation()}{setRotation()} function inherited from QGraphicsItem. Items live in their own local coordinate system. Their coordinates are usually centered around (0, 0), and this is also the center for all transformations. By - calling the item's \l {QGraphicsItem::rotate()}{rotate()} function + calling the item's \l {QGraphicsItem::setRotation()}{setRotation()} function we alter the direction in which the mouse will start moving. When the QGraphicsScene decides to advance the scene a frame it will call diff --git a/doc/src/examples/googlechat.qdoc b/doc/src/examples/googlechat.qdoc index 42a0198c70..7c9d7db61e 100644 --- a/doc/src/examples/googlechat.qdoc +++ b/doc/src/examples/googlechat.qdoc @@ -48,4 +48,5 @@ \image googlechat-example.png + \note The Google Talk instant messaging service is a registered trademark of Google Inc. */ diff --git a/doc/src/examples/googlesuggest.qdoc b/doc/src/examples/googlesuggest.qdoc index 1752420f3a..e3d2b1f721 100644 --- a/doc/src/examples/googlesuggest.qdoc +++ b/doc/src/examples/googlesuggest.qdoc @@ -48,4 +48,5 @@ \image googlesuggest-example.png + \note The Google Suggest suggestion service is a registered trademark of Google Inc. */ diff --git a/doc/src/groups.qdoc b/doc/src/groups.qdoc index 2733853986..f7296a3fdd 100644 --- a/doc/src/groups.qdoc +++ b/doc/src/groups.qdoc @@ -40,24 +40,6 @@ ****************************************************************************/ /*! - \group groups - \title Grouped Classes - \ingroup classlists - - This page provides a way of navigating Qt's classes by grouping - related classes together. Some classes may appear in more than one group. - - \generatelist{related} - - \omit - \row - \o \l{Component Model} - \o Interfaces and helper classes for the Qt Component Model. - \endomit - -*/ - -/*! \group advanced \title Advanced Widgets \ingroup groups @@ -147,12 +129,6 @@ */ -/* \group componentmodel - \title Component Model - - These classes and interfaces form the basis of the \l{Qt Component Model}. - -*/ /*! \group database @@ -226,22 +202,8 @@ */ /*! - \group explicitly-shared - \ingroup groups - - \title Explicitly Shared Classes - \brief Classes that use explicit sharing to manage internal data. - - \keyword explicit sharing - \keyword explicitly shared - - Unlike many of Qt's data types, which use \l{implicit sharing}, these - classes use explicit sharing to manage internal data. -*/ - -/*! \group geomanagement - \title Layout Management + \title Layout Classes \ingroup groups \brief Classes handling automatic resizing and moving of widgets, for @@ -401,103 +363,6 @@ */ /*! - \group shared - \title Implicitly Shared Classes - \ingroup architecture - \ingroup groups - - \brief Classes that use reference counting for fast copying. - - \keyword implicit data sharing - \keyword implicit sharing - \keyword implicitly shared - \keyword reference counting - \keyword shared implicitly - \keyword shared classes - - Many C++ classes in Qt use implicit data sharing to maximize - resource usage and minimize copying. Implicitly shared classes are - both safe and efficient when passed as arguments, because only a - pointer to the data is passed around, and the data is copied only - if and when a function writes to it, i.e., \e {copy-on-write}. - - \tableofcontents - - \section1 Overview - - A shared class consists of a pointer to a shared data block that - contains a reference count and the data. - - When a shared object is created, it sets the reference count to 1. The - reference count is incremented whenever a new object references the - shared data, and decremented when the object dereferences the shared - data. The shared data is deleted when the reference count becomes - zero. - - \keyword deep copy - \keyword shallow copy - - When dealing with shared objects, there are two ways of copying an - object. We usually speak about \e deep and \e shallow copies. A deep - copy implies duplicating an object. A shallow copy is a reference - copy, i.e. just a pointer to a shared data block. Making a deep copy - can be expensive in terms of memory and CPU. Making a shallow copy is - very fast, because it only involves setting a pointer and incrementing - the reference count. - - Object assignment (with operator=()) for implicitly shared objects is - implemented using shallow copies. - - The benefit of sharing is that a program does not need to duplicate - data unnecessarily, which results in lower memory use and less copying - of data. Objects can easily be assigned, sent as function arguments, - and returned from functions. - - Implicit sharing takes place behind the scenes; the programmer - does not need to worry about it. Even in multithreaded - applications, implicit sharing takes place, as explained in - \l{Threads and Implicit Sharing}. - - \section1 Implicit Sharing in Detail - - Implicit sharing automatically detaches the object from a shared - block if the object is about to change and the reference count is - greater than one. (This is often called \e {copy-on-write} or - \e {value semantics}.) - - An implicitly shared class has total control of its internal data. In - any member functions that modify its data, it automatically detaches - before modifying the data. - - The QPen class, which uses implicit sharing, detaches from the shared - data in all member functions that change the internal data. - - Code fragment: - \snippet doc/src/snippets/code/doc_src_groups.qdoc 0 - - \section1 List of Classes - - The classes listed below automatically detach from common data if - an object is about to be changed. The programmer will not even - notice that the objects are shared. Thus you should treat - separate instances of them as separate objects. They will always - behave as separate objects but with the added benefit of sharing - data whenever possible. For this reason, you can pass instances - of these classes as arguments to functions by value without - concern for the copying overhead. - - Example: - \snippet doc/src/snippets/code/doc_src_groups.qdoc 1 - - In this example, \c p1 and \c p2 share data until QPainter::begin() - is called for \c p2, because painting a pixmap will modify it. - - \warning Do not copy an implicitly shared container (QMap, - QVector, etc.) while you are iterating over it using an non-const - \l{STL-style iterator}. -*/ - -/*! \group ssl \title Secure Sockets Layer (SSL) Classes \ingroup groups diff --git a/doc/src/images/cursor-hsplit.png b/doc/src/images/cursor-hsplit.png Binary files differindex 1beda2570e..a5667e3ffb 100644 --- a/doc/src/images/cursor-hsplit.png +++ b/doc/src/images/cursor-hsplit.png diff --git a/doc/src/images/cursor-vsplit.png b/doc/src/images/cursor-vsplit.png Binary files differindex a5667e3ffb..1beda2570e 100644 --- a/doc/src/images/cursor-vsplit.png +++ b/doc/src/images/cursor-vsplit.png diff --git a/doc/src/implicit-sharing.qdoc b/doc/src/implicit-sharing.qdoc new file mode 100644 index 0000000000..85630dcb0e --- /dev/null +++ b/doc/src/implicit-sharing.qdoc @@ -0,0 +1,144 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* TODO: Move some of the documentation from QSharedDataPointer into this + document. */ + +/*! + \group shared + \title Implicitly Shared Classes + \ingroup architecture + \ingroup groups + + \brief Classes that use reference counting for fast copying. + + \keyword implicit data sharing + \keyword implicit sharing + \keyword implicitly shared + \keyword reference counting + \keyword shared implicitly + \keyword shared classes + + Many C++ classes in Qt use implicit data sharing to maximize + resource usage and minimize copying. Implicitly shared classes are + both safe and efficient when passed as arguments, because only a + pointer to the data is passed around, and the data is copied only + if and when a function writes to it, i.e., \e {copy-on-write}. + + \tableofcontents + + \section1 Overview + + A shared class consists of a pointer to a shared data block that + contains a reference count and the data. + + When a shared object is created, it sets the reference count to 1. The + reference count is incremented whenever a new object references the + shared data, and decremented when the object dereferences the shared + data. The shared data is deleted when the reference count becomes + zero. + + \keyword deep copy + \keyword shallow copy + + When dealing with shared objects, there are two ways of copying an + object. We usually speak about \e deep and \e shallow copies. A deep + copy implies duplicating an object. A shallow copy is a reference + copy, i.e. just a pointer to a shared data block. Making a deep copy + can be expensive in terms of memory and CPU. Making a shallow copy is + very fast, because it only involves setting a pointer and incrementing + the reference count. + + Object assignment (with operator=()) for implicitly shared objects is + implemented using shallow copies. + + The benefit of sharing is that a program does not need to duplicate + data unnecessarily, which results in lower memory use and less copying + of data. Objects can easily be assigned, sent as function arguments, + and returned from functions. + + Implicit sharing takes place behind the scenes; the programmer + does not need to worry about it. Even in multithreaded + applications, implicit sharing takes place, as explained in + \l{Threads and Implicit Sharing}. + + When implementing your own implicitly shared classes, use the + QSharedData and QSharedDataPointer classes. + + \section1 Implicit Sharing in Detail + + Implicit sharing automatically detaches the object from a shared + block if the object is about to change and the reference count is + greater than one. (This is often called \e {copy-on-write} or + \e {value semantics}.) + + An implicitly shared class has total control of its internal data. In + any member functions that modify its data, it automatically detaches + before modifying the data. + + The QPen class, which uses implicit sharing, detaches from the shared + data in all member functions that change the internal data. + + Code fragment: + \snippet doc/src/snippets/code/doc_src_groups.qdoc 0 + + + \section1 List of Classes + + The classes listed below automatically detach from common data if + an object is about to be changed. The programmer will not even + notice that the objects are shared. Thus you should treat + separate instances of them as separate objects. They will always + behave as separate objects but with the added benefit of sharing + data whenever possible. For this reason, you can pass instances + of these classes as arguments to functions by value without + concern for the copying overhead. + + Example: + \snippet doc/src/snippets/code/doc_src_groups.qdoc 1 + + In this example, \c p1 and \c p2 share data until QPainter::begin() + is called for \c p2, because painting a pixmap will modify it. + + \warning Do not copy an implicitly shared container (QMap, + QVector, etc.) while you are iterating over it using an non-const + \l{STL-style iterator}. +*/ diff --git a/doc/src/layout.qdoc b/doc/src/layout.qdoc index ec88089346..9350aa8fdc 100644 --- a/doc/src/layout.qdoc +++ b/doc/src/layout.qdoc @@ -42,9 +42,8 @@ /*! \page layout.html - \title Layout Classes + \title Layout Management \ingroup architecture - \ingroup classlists \brief A tour of the standard layout managers and an introduction to custom layouts. diff --git a/doc/src/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index 0d86ab3ad4..0d86ab3ad4 100644 --- a/doc/src/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc diff --git a/doc/src/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc index b6d80c22bc..b6d80c22bc 100644 --- a/doc/src/commercialeditions.qdoc +++ b/doc/src/legal/commercialeditions.qdoc diff --git a/doc/src/editions.qdoc b/doc/src/legal/editions.qdoc index 9ed4c9c3fe..9ed4c9c3fe 100644 --- a/doc/src/editions.qdoc +++ b/doc/src/legal/editions.qdoc diff --git a/doc/src/gpl.qdoc b/doc/src/legal/gpl.qdoc index 97959e8e87..97959e8e87 100644 --- a/doc/src/gpl.qdoc +++ b/doc/src/legal/gpl.qdoc diff --git a/doc/src/licenses.qdoc b/doc/src/legal/licenses.qdoc index 7597e7f5ff..4689114460 100644 --- a/doc/src/licenses.qdoc +++ b/doc/src/legal/licenses.qdoc @@ -39,6 +39,19 @@ ** ****************************************************************************/ +/*! + \group licensing + \title Licensing Information + \ingroup topics + \brief Information about licenses and licensing issues. + + These documents include information about Qt's licenses and the licenses + of third party components used in Qt. + + \generatelist{related} +*/ + + /*! \page licenses.html \title Other Licenses Used in Qt diff --git a/doc/src/opensourceedition.qdoc b/doc/src/legal/opensourceedition.qdoc index e7bb26a6cd..e7bb26a6cd 100644 --- a/doc/src/opensourceedition.qdoc +++ b/doc/src/legal/opensourceedition.qdoc diff --git a/doc/src/trademarks.qdoc b/doc/src/legal/trademarks.qdoc index 0e659d2093..0e659d2093 100644 --- a/doc/src/trademarks.qdoc +++ b/doc/src/legal/trademarks.qdoc diff --git a/doc/src/platform-notes-rtos.qdoc b/doc/src/platform-notes-rtos.qdoc new file mode 100644 index 0000000000..8a52d84fb0 --- /dev/null +++ b/doc/src/platform-notes-rtos.qdoc @@ -0,0 +1,220 @@ +/*! + \page platform-notes-vxworks.html + \title Platform Notes - VxWorks + \contentspage Platform Notes + \target VxWorks + + \note VxWorks is a community supported platform. See the + \l{Supported Platforms} page for more information. + + This page contains information about the Qt for VxWorks port. More + information about the combinations of platforms and compilers supported + by Qt can be found on the \l{Supported Platforms} page. + + \tableofcontents + + \section1 Supported Versions + + Qt has been tested on WindRiver VxWorks 6.7 in kernel mode using the + vendor supplied GCC compiler, targetting both the x86 simulator + (simpentium) and Power-PC devices (ppc). + VxWorks' RTP mode is currently not supported. + + \section1 Limitations + + The VxWorks kernel has an optional POSIX compatibility layer, but this + layer does not implement all POSIX functionality needed for a complete + Qt port. + + \table + \header \o Function \o Notes + \row \o QProcess + \o Not available - VxWorks has no concept of processes. + \row \o QSharedMemory + \o Not available - VxWorks has only a global, flat address space. + \row \o QSystemSemaphore + \o Not available - VxWorks has no concept of processes. + \row \o QLibrary + \o QLibrary is only a small stub to make it possible to build + static plugins. + \row \o QCoreApplication + \o Can only be instantiated once. Qt's Q(CoreE)Application is + tightly coupled to one address space and process, while VxWorks + only supports one global address space and has no concept of + processes. + \row \o Phonon + \o There is no standard audio backend, which could be integrated into Phonon. + \row \o Qt3Support + \o The Qt3Support library is not available on QNX. + + \endtable + + \section1 Build Instructions + + Qt for VxWorks needs to be \l{Cross-Compiling Qt for Embedded Linux + Applications}{cross-compiled} on a Linux host. \c configure and \c make + the build like you would with a standard \l{Cross-Compiling Qt for + Embedded Linux Applications}{embedded Linux cross build}. Building the + VxWorks simulator would be done like this: + + \code + <path/to/qt/sources>/configure -xplatform unsupported/vxworks-simpentium-g++ -embedded vxworks -exceptions -no-gfx-linuxfb -no-mouse-linuxtp -no-mouse-pc -no-kbd-tty + make + \endcode + + \list + \o \c{-xplatform unsupported/qws/vxworks-simpentium-g++} - selects the x86 simulator mkspec for VxWorks + \o \c{-embedded vxworks} - builds the embedded version of Qt and sets the architecture to VxWorks + \o \c{-exceptions} - see General Notes below + \o \c{-no-gfx-linuxfb}, \c{-no-mouse-linuxtp}, \c{-no-mouse-pc} and \c{-no-kbd-tty} are Linux specific and won't work on VxWorks + \endlist + + \section1 General Notes + + \list + + \o Configuring with \c{-exceptions} is necessary, because the VxWorks + 6.7 g++ headers require exceptions to be enabled when compiling C++ + code. + + \o Configure's \c{-xplatform} can be any of + \c{unsupported/vxworks-(simpentium|ppc)-(g++|dcc)}, but \c{dcc} + (WindRiver DIAB compiler) has not yet tested been tested with Qt 4.6 and + VxWorks 6.7. + + \o Building shared libraries with \c{-shared} (the default) doesn't + really build shared libraries, like e.g. on Linux, since these are not + supported by VxWorks. Instead, qmake will created partially linked + objects, that can be loaded at runtime with \c{ld}. + + \o Creating static builds with \c{-static} is fully supported. + + \o "Munching" (generating constructors/destructors for static C++ + objects) is done automatically by a special qmake extension (for both + shared libraries and executables) + + \o VxWorks does not have a file system layer, but the low level storage + drivers have to supply a file system like interface to the applications. + Since each driver implements a different subset of the functionality + supported by this interface, Qt's file system auto-tests show wildly + differing results running on different "file systems". The best results + can be achieved when running on a (writable) NFS mount, since that + provides the most Unix-ish interface. The worst results come from the + FTP file system driver, which may crash when accessed by a + \c{QFileInfo}. + + \o Keep in mind that VxWorks doesn't call your \c{main()} function with + the standard \c{argc}/\c{argv} parameters. So either add a special + \c{vxmain()} function or use a tool like \c{callmain} to translate + VxWorks' commandline arguments to an \c{argc}/\c{argv} array. + + \o Some example will fail to build, due to some missing dependencies + (e.g. shared memory) - this will be fixed in a later release. + + \endlist +*/ + +/*! + \page platform-notes-qnx.html + \title Platform Notes - QNX + \contentspage Platform Notes + \target QNX + + \note QNX is a community supported platform. See the + \l{Supported Platforms} page for more information. + + This page contains information about the Qt for QNX port. More + information about the combinations of platforms and compilers supported + by Qt can be found on the \l{Supported Platforms} page. + + Note that Qt for QNX is currently based on \l{Qt for Embedded Linux}, which + contains its own windowing system. Mixing QNX's Photon environment with + Qt for QNX is currently not possible. Building Qt for QNX with Photon's + X11 embedded server is not recommended due to missing support for X11 extensions, + resulting in poor rendering quality. + + Qt for QNX contains experimental screen and input drivers based on QNX's + \c devi-hid and \c io-display. For more information, check the class documentation + for QQnxScreen, QWSQnxKeyboardHandler and QQnxMouseHandler. See the + \l{Porting Qt for Embedded Linux to a New Architecture} document for information + on how to add custom screen or input drivers. + + \tableofcontents + + \section1 Supported Versions + + Qt has been tested on QNX 6.4 on i386 and PowerPC targets with QNX's default + gcc compiler. + + \section1 Limitations + + Some of Qt's functionality is currently not available on QNX: + + \table + \header \o Function \o Notes + \row \o QProcess + \o Not available - QNX doesn't support mixing threads and processes. + \row \o QSharedMemory + \o Not available - QNX doesn't support SYSV style shared memory. + \row \o QSystemSemaphore + \o Not available - QNX doesn't support SYSV style system semaphores. + \row \o QWS Multi Process + \o QT_NO_QWS_MULTIPROCESS is always on due to missing shared memory support. + \row \o Phonon + \o There is no standard audio backend, which could be integrated into Phonon. + \row \o Qt3Support + \o The Qt3Support library is not available on QNX. + \endtable + + \section1 Build Instructions + + Qt for QNX needs to be built either on a QNX system, or \l{Cross-Compiling Qt + for Embedded Linux Applications}{cross-compiled} on a Linux host. In either + case, The QNX Software Development Platform must be installed. + + Example configure line for cross-compiling Qt for QNX on a Linux host for an + i386 QNX target: + + \code + configure -xplatform unsupported/qws/qnx-i386-g++ -embedded i386 -no-gfx-linuxfb -no-mouse-linuxtp -no-kbd-tty -no-qt3support -qt-gfx-qnx -qt-mouse-qnx -qt-kbd-qnx -no-exceptions + \endcode + + \list + \o \c{-xplatform unsupported/qws/qnx-i386-g++} - selects the i386-g++ mkspec for QNX + \o \c{-embedded i386} - builds the embedded version of Qt and sets the architecture to i386 + \o \c{-no-gfx-linuxfb}, \c{-no-mouse-linuxtp} and \c{-no-kbd-tty} are Linux specific and won't work on QNX + \o \c{-no-qt3support} - required since the Qt3 support classes are not supported on QNX + \o \c{-no-exceptions} - reduces the size of the library by disabling exception support + \o \c{-qt-gfx-qnx} - enables the experimental \c{io-graphics} based display driver + \o \c{-qt-mouse-qnx} - enables the experimental \c{devi-hig} based mouse driver + \o \c{-qt-kbd-qnx} - enables the experimental \c{devi-hig} based keyboard driver + \endlist + + \section1 General Notes + + \list + \o To enable the experimental QNX display and input drivers, \c{io-display} needs to be + up and running. The \c devi-hid based Qt input drivers require \c devi-hid to run + in resource mode without Photon support. To enable a standard mouse and keyboard + combination, run \c devi-hid as follows: \c{/usr/photon/bin/devi-hid -Pr kbd mouse}. + Note that your current shell will not accept keyboard and mouse input anymore after + running that command, so run it either from a script that launches a Qt application + afterwards, or make sure to have remote login available to launch a Qt application. + In addition, the \c QWS_DISPLAY, \c QWS_MOUSE_PROTO and \c QWS_KEYBOARD environment + variables should all be set to \c{qnx} before running a Qt application. + + \o The 3rd party TIFF library currently doesn't build due to the missing \c inflateSync + symbol from QNX's \c{libz.so.2}. Workarounds would be to manually replace QNX's libz + with a newer version, or disable the TIFF plugin entierly by appending + \c{QT_CONFIG += no-tiff} to \c{.qmake.cache} after configuring Qt. + + \o Some of the tools, examples and demos do not compile due to dependencies on QProcess + or other classes that are not available on QNX. + \endlist + + \section1 Platform Regressions + + Qt for QNX's behavior is mostly identical with \l{Qt for Embedded Linux}. However, + some regressions were spotted in QDateTime computation around year 0 and year 1970, + which have been tracked back to faulty time zone data on some QNX versions. +*/ diff --git a/doc/src/platform-notes.qdoc b/doc/src/platform-notes.qdoc index 8aa645c3e3..d6f9328fbb 100644 --- a/doc/src/platform-notes.qdoc +++ b/doc/src/platform-notes.qdoc @@ -60,6 +60,10 @@ \tableofcontents{1 Platform Notes - Embedded Linux} \o \l{Platform Notes - Windows CE} \tableofcontents{1 Platform Notes - Windows CE} + \o \l{Platform Notes - QNX} + \tableofcontents{1 Platform Notes - QNX} + \o \l{Platform Notes - VxWorks} + \tableofcontents{1 Platform Notes - VxWorks} \endlist See also the \l{Compiler Notes} for information about compiler-specific @@ -374,7 +378,6 @@ improve support for this feature. */ - /*! \page platform-notes-windows-ce.html \title Platform Notes - Windows CE diff --git a/doc/src/properties.qdoc b/doc/src/properties.qdoc index 5490dd07f4..2d03e91398 100644 --- a/doc/src/properties.qdoc +++ b/doc/src/properties.qdoc @@ -122,6 +122,17 @@ editable property for (checkable) buttons. Note that QItemDelegate gets and sets a widget's \c USER property. + \o The presence of the \c CONSTANT attibute indicates that the property + value is constant. For a given object instance, the READ method of a + constant property must return the same value every time it is called. This + constant value may be different for different instances of the object. A + constant property cannot have a WRTE method or a NOTIFY signal. + + \o The presence of the \c FINAL attribute indicates that the property + will not be overridden by a derived class. This can be used for performance + optimizations in some cases, but is not enforced by moc. Care must be taken + never to override a \c FINAL property. + \endlist The \c READ, \c WRITE, and \c RESET functions can be inherited. diff --git a/doc/src/qtdesigner.qdoc b/doc/src/qtdesigner.qdoc index d913b32c49..0959bd96d8 100644 --- a/doc/src/qtdesigner.qdoc +++ b/doc/src/qtdesigner.qdoc @@ -166,1376 +166,3 @@ \sa {Qt Designer Manual}, {QtUiTools Module} */ - -/*! - \class QDesignerMemberSheetExtension - - \brief The QDesignerMemberSheetExtension class allows you to - manipulate a widget's member functions which is displayed when - configuring connections using Qt Designer's mode for editing - signals and slots. - - \inmodule QtDesigner - - QDesignerMemberSheetExtension is a collection of functions that is - typically used to query a widget's member functions, and to - manipulate the member functions' appearance in \QD's signals and - slots editing mode. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 2 - - When implementing a custom widget plugin, a pointer to \QD's - current QDesignerFormEditorInterface object (\c formEditor in the - example above) is provided by the - QDesignerCustomWidgetInterface::initialize() function's parameter. - - The member sheet (and any other extension), can be retrieved by - querying \QD's extension manager using the qt_extension() - function. When you want to release the extension, you only need to - delete the pointer. - - All widgets have a default member sheet used in \QD's signals and - slots editing mode with the widget's member functions. But - QDesignerMemberSheetExtension also provides an interface for - creating custom member sheet extensions. - - \warning \QD uses the QDesignerMemberSheetExtension to facilitate - the signal and slot editing mode. Whenever a connection between - two widgets is requested, \QD will query for the widgets' member - sheet extensions. If a widget has an implemented member sheet - extension, this extension will override the default member sheet. - - To create a member sheet extension, your extension class must - inherit from both QObject and QDesignerMemberSheetExtension. Then, - since we are implementing an interface, we must ensure that it's - made known to the meta object system using the Q_INTERFACES() - macro: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 3 - - This enables \QD to use qobject_cast() to query for - supported interfaces using nothing but a QObject pointer. - - In \QD the extensions are not created until they are - required. For that reason, when implementing a member sheet - extension, you must also create a QExtensionFactory, i.e a class - that is able to make an instance of your extension, and register - it using \QD's \l {QExtensionManager}{extension manager}. - - When a widget's member sheet extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until the first one that is able to create a member sheet - extension for that widget, is found. This factory will then make - an instance of the extension. If no such factory is found, \QD - will use the default member sheet. - - There are four available types of extensions in \QD: - QDesignerContainerExtension, QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension and - QDesignerTaskMenuExtension. \QD's behavior is the same whether the - requested extension is associated with a multi page container, a - member sheet, a property sheet or a task menu. - - The QExtensionFactory class provides a standard extension - factory, and can also be used as an interface for custom - extension factories. You can either create a new - QExtensionFactory and reimplement the - QExtensionFactory::createExtension() function. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 4 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a member sheet extension as well. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 5 - - For a complete example using an extension class, see \l - {designer/taskmenuextension}{Task Menu Extension example}. The - example shows how to create a custom widget plugin for Qt - Designer, and how to to use the QDesignerTaskMenuExtension class - to add custom items to \QD's task menu. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerMemberSheetExtension::~QDesignerMemberSheetExtension() - - Destroys the member sheet extension. -*/ - -/*! - \fn int QDesignerMemberSheetExtension::count() const - - Returns the extension's number of member functions. -*/ - -/*! - \fn int QDesignerMemberSheetExtension::indexOf(const QString &name) const - - Returns the index of the member function specified by the given \a - name. - - \sa memberName() -*/ - -/*! - \fn QString QDesignerMemberSheetExtension::memberName(int index) const - - Returns the name of the member function with the given \a index. - - \sa indexOf() -*/ - -/*! - \fn QString QDesignerMemberSheetExtension::memberGroup(int index) const - - Returns the name of the member group specified for the function - with the given \a index. - - \sa indexOf(), setMemberGroup() -*/ - -/*! - \fn void QDesignerMemberSheetExtension::setMemberGroup(int index, const QString &group) - - Sets the member group of the member function with the given \a - index, to \a group. - - \sa indexOf(), memberGroup() -*/ - -/*! - \fn bool QDesignerMemberSheetExtension::isVisible(int index) const - - Returns true if the member function with the given \a index is - visible in \QD's signal and slot editor, otherwise false. - - \sa indexOf(), setVisible() -*/ - -/*! - \fn void QDesignerMemberSheetExtension::setVisible(int index, bool visible) - - If \a visible is true, the member function with the given \a index - is visible in \QD's signals and slots editing mode; otherwise the - member function is hidden. - - \sa indexOf(), isVisible() -*/ - -/*! - \fn virtual bool QDesignerMemberSheetExtension::isSignal(int index) const - - Returns true if the member function with the given \a index is a - signal, otherwise false. - - \sa indexOf() -*/ - -/*! - \fn bool QDesignerMemberSheetExtension::isSlot(int index) const - - Returns true if the member function with the given \a index is a - slot, otherwise false. - - \sa indexOf() -*/ - -/*! - \fn bool QDesignerMemberSheetExtension::inheritedFromWidget(int index) const - - Returns true if the member function with the given \a index is - inherited from QWidget, otherwise false. - - \sa indexOf() -*/ - -/*! - \fn QString QDesignerMemberSheetExtension::declaredInClass(int index) const - - Returns the name of the class in which the member function with - the given \a index is declared. - - \sa indexOf() -*/ - -/*! - \fn QString QDesignerMemberSheetExtension::signature(int index) const - - Returns the signature of the member function with the given \a - index. - - \sa indexOf() -*/ - -/*! - \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterTypes(int index) const - - Returns the parameter types of the member function with the given - \a index, as a QByteArray list. - - \sa indexOf(), parameterNames() -*/ - -/*! - \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterNames(int index) const - - Returns the parameter names of the member function with the given - \a index, as a QByteArray list. - - \sa indexOf(), parameterTypes() -*/ - - -// Doc: Interface only - -/*! - \class QDesignerLayoutDecorationExtension - \brief The QDesignerLayoutDecorationExtension class provides an extension to a layout in \QD. - \inmodule QtDesigner - \internal -*/ - -/*! - \enum QDesignerLayoutDecorationExtension::InsertMode - - This enum describes the modes that are used to insert items into a layout. - - \value InsertWidgetMode Widgets are inserted into empty cells in a layout. - \value InsertRowMode Whole rows are inserted into a vertical or grid layout. - \value InsertColumnMode Whole columns are inserted into a horizontal or grid layout. -*/ - -/*! - \fn virtual QDesignerLayoutDecorationExtension::~QDesignerLayoutDecorationExtension() - - Destroys the extension. -*/ - -/*! - \fn virtual QList<QWidget*> QDesignerLayoutDecorationExtension::widgets(QLayout *layout) const - - Returns the widgets that are managed by the given \a layout. - - \sa insertWidget(), removeWidget() -*/ - -/*! - \fn QRect QDesignerLayoutDecorationExtension::itemInfo(int index) const - - Returns the rectangle covered by the item at the given \a index in the layout. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::indexOf(QWidget *widget) const - - Returns the index of the specified \a widget in the layout. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::indexOf(QLayoutItem *item) const - - Returns the index of the specified layout \a item. -*/ - -/*! - \fn QDesignerLayoutDecorationExtension::InsertMode QDesignerLayoutDecorationExtension::currentInsertMode() const - - Returns the current insertion mode. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::currentIndex() const - - Returns the current index in the layout. -*/ - -/*! - \fn QPair<int, int> QDesignerLayoutDecorationExtension::currentCell() const - - Returns a pair containing the row and column of the current cell in the layout. -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::insertWidget(QWidget *widget, const QPair<int, int> &cell) - - Inserts the given \a widget into the specified \a cell in the layout. - - \sa removeWidget() -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::removeWidget(QWidget *widget) - - Removes the specified \a widget from the layout. - - \sa insertWidget() -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::insertRow(int row) - - Inserts a new row into the form at the position specified by \a row. -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::insertColumn(int column) - - Inserts a new column into the form at the position specified by \a column. -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::simplify() - - Simplifies the layout by removing unnecessary empty rows and columns, and by changing the - number of rows or columns spanned by widgets. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::findItemAt(const QPoint &position) const - - Returns the index of the item in the layout that covers the given \a position. -*/ - -/*! - \fn int QDesignerLayoutDecorationExtension::findItemAt(int row, int column) const - - Returns the item in the layout that occupies the specified \a row and \a column in the layout. - - Currently, this only applies to grid layouts. -*/ - -/*! - \fn void QDesignerLayoutDecorationExtension::adjustIndicator(const QPoint &position, int index) - - Adjusts the indicator for the item specified by \a index so that - it lies at the given \a position on the form. -*/ - - -// Doc: Interface only - -/*! - \class QDesignerContainerExtension - \brief The QDesignerContainerExtension class allows you to add pages to - a custom multi-page container in Qt Designer's workspace. - \inmodule QtDesigner - - QDesignerContainerExtension provide an interface for creating - custom container extensions. A container extension consists of a - collection of functions that \QD needs to manage a multi-page - container plugin, and a list of the container's pages. - - \image containerextension-example.png - - \warning This is \e not an extension for container plugins in - general, only custom \e multi-page containers. - - To create a container extension, your extension class must inherit - from both QObject and QDesignerContainerExtension. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 6 - - Since we are implementing an interface, we must ensure that it's - made known to the meta object system using the Q_INTERFACES() - macro. This enables \QD to use the qobject_cast() function to - query for supported interfaces using nothing but a QObject - pointer. - - You must reimplement several functions to enable \QD to manage a - custom multi-page container widget: \QD uses count() to keep track - of the number pages in your container, widget() to return the page - at a given index in the list of the container's pages, and - currentIndex() to return the list index of the selected page. \QD - uses the addWidget() function to add a given page to the - container, expecting it to be appended to the list of pages, while - it expects the insertWidget() function to add a given page to the - container by inserting it at a given index. - - In \QD the extensions are not created until they are - required. For that reason you must also create a - QExtensionFactory, i.e a class that is able to make an instance of - your extension, and register it using \QD's \l - {QExtensionManager}{extension manager}. - - When a container extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until the first one that is able to create a container - extension, is found. This factory will then create the extension - for the plugin. - - There are four available types of extensions in \QD: - QDesignerContainerExtension , QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. - \QD's behavior is the same whether the requested extension is - associated with a multi page container, a member sheet, a property - sheet or a task menu. - - The QExtensionFactory class provides a standard extension factory, - and can also be used as an interface for custom extension - factories. You can either create a new QExtensionFactory and - reimplement the QExtensionFactory::createExtension() function. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 7 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a container extension as well. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 8 - - For a complete example using the QDesignerContainerExtension - class, see the \l {designer/containerextension}{Container - Extension example}. The example shows how to create a custom - multi-page plugin for \QD. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerContainerExtension::~QDesignerContainerExtension() - - Destroys the extension. -*/ - -/*! - \fn int QDesignerContainerExtension::count() const - - Returns the number of pages in the container. -*/ - -/*! - \fn QWidget *QDesignerContainerExtension::widget(int index) const - - Returns the page at the given \a index in the extension's list of - pages. - - \sa addWidget(), insertWidget() -*/ - -/*! - \fn int QDesignerContainerExtension::currentIndex() const - - Returns the index of the currently selected page in the - container. - - \sa setCurrentIndex() -*/ - -/*! - \fn void QDesignerContainerExtension::setCurrentIndex(int index) - - Sets the currently selected page in the container to be the - page at the given \a index in the extension's list of pages. - - \sa currentIndex() -*/ - -/*! - \fn void QDesignerContainerExtension::addWidget(QWidget *page) - - Adds the given \a page to the container by appending it to the - extension's list of pages. - - \sa insertWidget(), remove(), widget() -*/ - -/*! - \fn void QDesignerContainerExtension::insertWidget(int index, QWidget *page) - - Adds the given \a page to the container by inserting it at the - given \a index in the extension's list of pages. - - \sa addWidget(), remove(), widget() -*/ - -/*! - \fn void QDesignerContainerExtension::remove(int index) - - Removes the page at the given \a index from the extension's list - of pages. - - \sa addWidget(), insertWidget() -*/ - - -// Doc: Interface only - -/*! - \class QDesignerTaskMenuExtension - \brief The QDesignerTaskMenuExtension class allows you to add custom - menu entries to Qt Designer's task menu. - \inmodule QtDesigner - - QDesignerTaskMenuExtension provides an interface for creating - custom task menu extensions. It is typically used to create task - menu entries that are specific to a plugin in \QD. - - \QD uses the QDesignerTaskMenuExtension to feed its task - menu. Whenever a task menu is requested, \QD will query - for the selected widget's task menu extension. - - \image taskmenuextension-example-faded.png - - A task menu extension is a collection of QActions. The actions - appear as entries in the task menu when the plugin with the - specified extension is selected. The image above shows the custom - \gui {Edit State...} action which appears in addition to \QD's - default task menu entries: \gui Cut, \gui Copy, \gui Paste etc. - - To create a custom task menu extension, your extension class must - inherit from both QObject and QDesignerTaskMenuExtension. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 9 - - Since we are implementing an interface, we must ensure that it - is made known to the meta-object system using the Q_INTERFACES() - macro. This enables \QD to use the qobject_cast() function to - query for supported interfaces using nothing but a QObject - pointer. - - You must reimplement the taskActions() function to return a list - of actions that will be included in \QD task menu. Optionally, you - can reimplement the preferredEditAction() function to set the - action that is invoked when selecting your plugin and pressing - \key F2. The preferred edit action must be one of the actions - returned by taskActions() and, if it's not defined, pressing the - \key F2 key will simply be ignored. - - In \QD, extensions are not created until they are required. A - task menu extension, for example, is created when you click the - right mouse button over a widget in \QD's workspace. For that - reason you must also construct an extension factory, using either - QExtensionFactory or a subclass, and register it using \QD's - \l {QExtensionManager}{extension manager}. - - When a task menu extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until it finds one that is able to create a task menu - extension for the selected widget. This factory will then make an - instance of the extension. - - There are four available types of extensions in \QD: - QDesignerContainerExtension, QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension, and QDesignerTaskMenuExtension. - \QD's behavior is the same whether the requested extension is - associated with a container, a member sheet, a property sheet or a - task menu. - - The QExtensionFactory class provides a standard extension factory, - and can also be used as an interface for custom extension - factories. You can either create a new QExtensionFactory and - reimplement the QExtensionFactory::createExtension() function. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 10 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a task menu extension as well. For example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 11 - - For a complete example using the QDesignerTaskMenuExtension class, - see the \l {designer/taskmenuextension}{Task Menu Extension - example}. The example shows how to create a custom widget plugin - for \QD, and how to to use the QDesignerTaskMenuExtension - class to add custom items to \QD's task menu. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerTaskMenuExtension::~QDesignerTaskMenuExtension() - - Destroys the task menu extension. -*/ - -/*! - \fn QAction *QDesignerTaskMenuExtension::preferredEditAction() const - - Returns the action that is invoked when selecting a plugin with - the specified extension and pressing \key F2. - - The action must be one of the actions returned by taskActions(). -*/ - -/*! - \fn QList<QAction*> QDesignerTaskMenuExtension::taskActions() const - - Returns the task menu extension as a list of actions which will be - included in \QD's task menu when a plugin with the specified - extension is selected. - - The function must be reimplemented to add actions to the list. -*/ - - -// Doc: Interface only - -/*! - \class QDesignerCustomWidgetCollectionInterface - - \brief The QDesignerCustomWidgetCollectionInterface class allows - you to include several custom widgets in one single library. - - \inmodule QtDesigner - - When implementing a custom widget plugin, you build it as a - separate library. If you want to include several custom widget - plugins in the same library, you must in addition subclass - QDesignerCustomWidgetCollectionInterface. - - QDesignerCustomWidgetCollectionInterface contains one single - function returning a list of the collection's - QDesignerCustomWidgetInterface objects. For example, if you have - several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and - \c CustomWidgetThree, the class definition may look like this: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 12 - - In the class constructor you add the interfaces to your custom - widgets to the list which you return in the customWidgets() - function: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 13 - - Note that instead of exporting each custom widget plugin using the - Q_EXPORT_PLUGIN2() macro, you export the entire collection. The - Q_EXPORT_PLUGIN2() macro ensures that \QD can access and construct - the custom widgets. Without this macro, there is no way for \QD to - use them. - - \sa QDesignerCustomWidgetInterface, {Creating Custom Widgets for - Qt Designer} -*/ - -/*! - \fn QDesignerCustomWidgetCollectionInterface::~QDesignerCustomWidgetCollectionInterface() { - - Destroys the custom widget collection interface. -*/ - -/*! - \fn QList<QDesignerCustomWidgetInterface*> QDesignerCustomWidgetCollectionInterface::customWidgets() const - - Returns a list of interfaces to the collection's custom widgets. -*/ - - -// Doc: Interface only - -/*! - \class QDesignerCustomWidgetInterface - - \brief The QDesignerCustomWidgetInterface class enables Qt Designer - to access and construct custom widgets. - - \inmodule QtDesigner - - QDesignerCustomWidgetInterface provides a custom widget with an - interface. The class contains a set of functions that must be subclassed - to return basic information about the widget, such as its class name and - the name of its header file. Other functions must be implemented to - initialize the plugin when it is loaded, and to construct instances of - the custom widget for \QD to use. - - When implementing a custom widget you must subclass - QDesignerCustomWidgetInterface to expose your widget to \QD. For - example, this is the declaration for the plugin used in the - \l{Custom Widget Plugin Example}{Custom Widget Plugin example} that - enables an analog clock custom widget to be used by \QD: - - \snippet examples/designer/customwidgetplugin/customwidgetplugin.h 0 - - Note that the only part of the class definition that is specific - to this particular custom widget is the class name. In addition, - since we are implementing an interface, we must ensure that it's - made known to the meta object system using the Q_INTERFACES() - macro. This enables \QD to use the qobject_cast() function to - query for supported interfaces using nothing but a QObject - pointer. - - After \QD loads a custom widget plugin, it calls the interface's - initialize() function to enable it to set up any resources that it - may need. This function is called with a QDesignerFormEditorInterface - parameter that provides the plugin with a gateway to all of \QD's API. - - \QD constructs instances of the custom widget by calling the plugin's - createWidget() function with a suitable parent widget. Plugins must - construct and return an instance of a custom widget with the specified - parent widget. - - In the implementation of the class you must remember to export - your custom widget plugin to \QD using the Q_EXPORT_PLUGIN2() - macro. For example, if a library called \c libcustomwidgetplugin.so - (on Unix) or \c libcustomwidget.dll (on Windows) contains a widget - class called \c MyCustomWidget, we can export it by adding the - following line to the file containing the plugin implementation: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 14 - - This macro ensures that \QD can access and construct the custom widget. - Without this macro, there is no way for \QD to use it. - - When implementing a custom widget plugin, you build it as a - separate library. If you want to include several custom widget - plugins in the same library, you must in addition subclass - QDesignerCustomWidgetCollectionInterface. - - \warning If your custom widget plugin contains QVariant - properties, be aware that only the following \l - {QVariant::Type}{types} are supported: - - \list - \o QVariant::ByteArray - \o QVariant::Bool - \o QVariant::Color - \o QVariant::Cursor - \o QVariant::Date - \o QVariant::DateTime - \o QVariant::Double - \o QVariant::Int - \o QVariant::Point - \o QVariant::Rect - \o QVariant::Size - \o QVariant::SizePolicy - \o QVariant::String - \o QVariant::Time - \o QVariant::UInt - \endlist - - For a complete example using the QDesignerCustomWidgetInterface - class, see the \l {designer/customwidgetplugin}{Custom Widget - Example}. The example shows how to create a custom widget plugin - for \QD. - - \sa QDesignerCustomWidgetCollectionInterface {Creating Custom - Widgets for Qt Designer} -*/ - -/*! - \fn QDesignerCustomWidgetInterface::~QDesignerCustomWidgetInterface() - - Destroys the custom widget interface. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::name() const - - Returns the class name of the custom widget supplied by the interface. - - The name returned \e must be identical to the class name used for the - custom widget. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::group() const - - Returns the name of the group to which the custom widget belongs. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::toolTip() const - - Returns a short description of the widget that can be used by \QD - in a tool tip. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::whatsThis() const - - Returns a description of the widget that can be used by \QD in - "What's This?" help for the widget. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::includeFile() const - - Returns the path to the include file that \l uic uses when - creating code for the custom widget. -*/ - -/*! - \fn QIcon QDesignerCustomWidgetInterface::icon() const - - Returns the icon used to represent the custom widget in \QD's - widget box. -*/ - -/*! - \fn bool QDesignerCustomWidgetInterface::isContainer() const - - Returns true if the custom widget is intended to be used as a - container; otherwise returns false. - - Most custom widgets are not used to hold other widgets, so their - implementations of this function will return false, but custom - containers will return true to ensure that they behave correctly - in \QD. -*/ - -/*! - \fn QWidget *QDesignerCustomWidgetInterface::createWidget(QWidget *parent) - - Returns a new instance of the custom widget, with the given \a - parent. -*/ - -/*! - \fn bool QDesignerCustomWidgetInterface::isInitialized() const - - Returns true if the widget has been initialized; otherwise returns - false. - - \sa initialize() -*/ - -/*! - \fn void QDesignerCustomWidgetInterface::initialize(QDesignerFormEditorInterface *formEditor) - - Initializes the widget for use with the specified \a formEditor - interface. - - \sa isInitialized() -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::domXml() const - - Returns the XML that is used to describe the custom widget's - properties to \QD. -*/ - -/*! - \fn QString QDesignerCustomWidgetInterface::codeTemplate() const - - This function is reserved for future use by \QD. - - \omit - Returns the code template that \QD includes in forms that contain - the custom widget when they are saved. - \endomit -*/ - -/*! - \macro QDESIGNER_WIDGET_EXPORT - \relates QDesignerCustomWidgetInterface - \since 4.1 - - This macro is used when defining custom widgets to ensure that they are - correctly exported from plugins for use with \QD. - - On some platforms, the symbols required by \QD to create new widgets - are removed from plugins by the build system, making them unusable. - Using this macro ensures that the symbols are retained on those platforms, - and has no side effects on other platforms. - - For example, the \l{designer/worldtimeclockplugin}{World Time Clock Plugin} - example exports a custom widget class with the following declaration: - - \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 0 - \dots - \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 2 - - \sa {Creating Custom Widgets for Qt Designer} -*/ - - -// Doc: Abstract class - -/*! - \class QDesignerDnDItemInterface - \brief The QDesignerDnDItemInterface class provides an interface that is used to manage items - during a drag and drop operation. - \inmodule QtDesigner - \internal -*/ - -/*! - \enum QDesignerDnDItemInterface::DropType - - This enum describes the result of a drag and drop operation. - - \value MoveDrop The item was moved. - \value CopyDrop The item was copied. -*/ - -/*! - \fn QDesignerDnDItemInterface::QDesignerDnDItemInterface() - - Constructs a new interface to a drag and drop item. -*/ - -/*! - \fn QDesignerDnDItemInterface::~QDesignerDnDItemInterface() - - Destroys the interface to the item. -*/ - -/*! - \fn DomUI *QDesignerDnDItemInterface::domUi() const - - Returns a user interface object for the item. -*/ - -/*! - \fn QWidget *QDesignerDnDItemInterface::widget() const - - Returns the widget being copied or moved in the drag and drop operation. - - \sa source() -*/ - -/*! - \fn QWidget *QDesignerDnDItemInterface::decoration() const - - Returns the widget used to represent the item. -*/ - -/*! - \fn QPoint QDesignerDnDItemInterface::hotSpot() const - - Returns the cursor's hotspot. - - \sa QDrag::hotSpot() -*/ - -/*! - \fn DropType QDesignerDnDItemInterface::type() const - - Returns the type of drag and drop operation in progress. -*/ - -/*! - \fn QWidget *QDesignerDnDItemInterface::source() const - - Returns the widget that is the source of the drag and drop operation; i.e. the original - container of the widget being dragged. - - \sa widget() -*/ - - -// Doc: Abstract class - -/*! - \class QDesignerIconCacheInterface - \brief The QDesignerIconCacheInterface class provides an interface to \QD's icon cache. - \inmodule QtDesigner - \internal -*/ - -/*! - \fn QDesignerIconCacheInterface::QDesignerIconCacheInterface(QObject *parent) - - Constructs a new interface with the given \a parent. -*/ - -/*! - \fn QIcon QDesignerIconCacheInterface::nameToIcon(const QString &filePath, const QString &qrcPath) - - Returns the icon associated with the name specified by \a filePath in the resource - file specified by \a qrcPath. - - If \a qrcPath refers to a valid resource file, the name used for the file path is a path - within those resources; otherwise the file path refers to a local file. - - \sa {The Qt Resource System}, nameToPixmap() -*/ - -/*! - \fn QPixmap QDesignerIconCacheInterface::nameToPixmap(const QString &filePath, const QString &qrcPath) - - Returns the pixmap associated with the name specified by \a filePath in the resource - file specified by \a qrcPath. - - If \a qrcPath refers to a valid resource file, the name used for the file path is a path - within those resources; otherwise the file path refers to a local file. - - \sa {The Qt Resource System}, nameToIcon() -*/ - -/*! - \fn QString QDesignerIconCacheInterface::iconToFilePath(const QIcon &icon) const - - Returns the file path associated with the given \a icon. The file path is a path within - an application resources. -*/ - -/*! - \fn QString QDesignerIconCacheInterface::iconToQrcPath(const QIcon &icon) const - - Returns the path to the resource file that refers to the specified \a icon. The resource - path refers to a local file. -*/ - -/*! - \fn QString QDesignerIconCacheInterface::pixmapToFilePath(const QPixmap &pixmap) const - - Returns the file path associated with the given \a pixmap. The file path is a path within - an application resources. -*/ - -/*! - \fn QString QDesignerIconCacheInterface::pixmapToQrcPath(const QPixmap &pixmap) const - - Returns the path to the resource file that refers to the specified \a pixmap. The resource - path refers to a local file. -*/ - -/*! - \fn QList<QPixmap> QDesignerIconCacheInterface::pixmapList() const - - Returns a list of pixmaps for the icons provided by the icon cache. -*/ - -/*! - \fn QList<QIcon> QDesignerIconCacheInterface::iconList() const - - Returns a list of icons provided by the icon cache. -*/ - -/*! - \fn QString QDesignerIconCacheInterface::resolveQrcPath(const QString &filePath, const QString &qrcPath, const QString &workingDirectory) const - - Returns a path to a resource specified by the \a filePath within - the resource file located at \a qrcPath. If \a workingDirectory is - a valid path to a directory, the path returned will be relative to - that directory; otherwise an absolute path is returned. - - \omit - ### Needs checking - \endomit -*/ - - -// Doc: Interface only - -/*! - \class QDesignerPropertySheetExtension - - \brief The QDesignerPropertySheetExtension class allows you to - manipulate a widget's properties which is displayed in Qt - Designer's property editor. - - \sa QDesignerDynamicPropertySheetExtension - - \inmodule QtDesigner - - QDesignerPropertySheetExtension provides a collection of functions that - are typically used to query a widget's properties, and to - manipulate the properties' appearance in the property editor. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 15 - - Note that if you change the value of a property using the - QDesignerPropertySheetExtension::setProperty() function, the undo - stack is not updated. To ensure that a property's value can be - reverted using the undo stack, you must use the - QDesignerFormWindowCursorInterface::setProperty() function, or its - buddy \l - {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()}, - instead. - - When implementing a custom widget plugin, a pointer to \QD's - current QDesignerFormEditorInterface object (\c formEditor in the - example above) is provided by the - QDesignerCustomWidgetInterface::initialize() function's parameter. - - The property sheet, or any other extension, can be retrieved by - querying \QD's extension manager using the qt_extension() - function. When you want to release the extension, you only need to - delete the pointer. - - All widgets have a default property sheet which populates \QD's - property editor with the widget's properties (i.e the ones defined - with the Q_PROPERTY() macro). But QDesignerPropertySheetExtension - also provides an interface for creating custom property sheet - extensions. - - \warning \QD uses the QDesignerPropertySheetExtension to feed its - property editor. Whenever a widget is selected in its workspace, - \QD will query for the widget's property sheet extension. If the - selected widget has an implemented property sheet extension, this - extension will override the default property sheet. - - To create a property sheet extension, your extension class must - inherit from both QObject and - QDesignerPropertySheetExtension. Then, since we are implementing - an interface, we must ensure that it's made known to the meta - object system using the Q_INTERFACES() macro: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 16 - - This enables \QD to use qobject_cast() to query for supported - interfaces using nothing but a QObject pointer. - - In \QD the extensions are not created until they are - required. For that reason, when implementing a property sheet - extension, you must also create a QExtensionFactory, i.e a class - that is able to make an instance of your extension, and register - it using \QD's \l {QExtensionManager}{extension manager}. - - When a property sheet extension is required, \QD's \l - {QExtensionManager}{extension manager} will run through all its - registered factories calling QExtensionFactory::createExtension() - for each until the first one that is able to create a property - sheet extension for the selected widget, is found. This factory - will then make an instance of the extension. If no such factory - can be found, \QD will use the default property sheet. - - There are four available types of extensions in \QD: - QDesignerContainerExtension, QDesignerMemberSheetExtension, - QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. Qt - Designer's behavior is the same whether the requested extension is - associated with a multi page container, a member sheet, a property - sheet or a task menu. - - The QExtensionFactory class provides a standard extension factory, - and can also be used as an interface for custom extension - factories. You can either create a new QExtensionFactory and - reimplement the QExtensionFactory::createExtension() function. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 17 - - Or you can use an existing factory, expanding the - QExtensionFactory::createExtension() function to make the factory - able to create a property sheet extension extension as well. For - example: - - \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 18 - - For a complete example using an extension class, see the \l - {designer/taskmenuextension}{Task Menu Extension example}. The - example shows how to create a custom widget plugin for Qt - Designer, and how to to use the QDesignerTaskMenuExtension class - to add custom items to \QD's task menu. - - \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget - Extensions} -*/ - -/*! - \fn QDesignerPropertySheetExtension::~QDesignerPropertySheetExtension() - - Destroys the property sheet extension. -*/ - -/*! - \fn int QDesignerPropertySheetExtension::count() const - - Returns the selected widget's number of properties. -*/ - -/*! - \fn int QDesignerPropertySheetExtension::indexOf(const QString &name) const - - Returns the index for a given property \a name. - - \sa propertyName() -*/ - -/*! - \fn QString QDesignerPropertySheetExtension::propertyName(int index) const - - Returns the name of the property at the given \a index. - - \sa indexOf() -*/ - -/*! - \fn QString QDesignerPropertySheetExtension::propertyGroup(int index) const - - Returns the property group for the property at the given \a index. - - \QD's property editor supports property groups, i.e. sections of - related properties. A property can be related to a group using the - setPropertyGroup() function. The default group of any property is - the name of the class that defines it. For example, the - QObject::objectName property appears within the QObject property - group. - - \sa indexOf(), setPropertyGroup() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setPropertyGroup(int index, const QString &group) - - Sets the property group for the property at the given \a index to - \a group. - - Relating a property to a group makes it appear within that group's - section in the property editor. The default property group of any - property is the name of the class that defines it. For example, - the QObject::objectName property appears within the QObject - property group. - - \sa indexOf(), property(), propertyGroup() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::hasReset(int index) const - - Returns true if the property at the given \a index has a reset - button in \QD's property editor, otherwise false. - - \sa indexOf(), reset() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::reset(int index) - - Resets the value of the property at the given \a index, to the - default value. Returns true if a default value could be found, otherwise false. - - \sa indexOf(), hasReset(), isChanged() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::isVisible(int index) const - - Returns true if the property at the given \a index is visible in - \QD's property editor, otherwise false. - - \sa indexOf(), setVisible() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setVisible(int index, bool visible) - - If \a visible is true, the property at the given \a index is - visible in \QD's property editor; otherwise the property is - hidden. - - \sa indexOf(), isVisible() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::isAttribute(int index) const - - Returns true if the property at the given \a index is an attribute, - which will be \e excluded from the UI file, otherwise false. - - \sa indexOf(), setAttribute() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setAttribute(int index, bool attribute) - - If \a attribute is true, the property at the given \a index is - made an attribute which will be \e excluded from the UI file; - otherwise it will be included. - - \sa indexOf(), isAttribute() -*/ - -/*! - \fn QVariant QDesignerPropertySheetExtension::property(int index) const - - Returns the value of the property at the given \a index. - - \sa indexOf(), setProperty(), propertyGroup() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setProperty(int index, const QVariant &value) - - Sets the \a value of the property at the given \a index. - - \warning If you change the value of a property using this - function, the undo stack is not updated. To ensure that a - property's value can be reverted using the undo stack, you must - use the QDesignerFormWindowCursorInterface::setProperty() - function, or its buddy \l - {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()}, - instead. - - \sa indexOf(), property(), propertyGroup() -*/ - -/*! - \fn bool QDesignerPropertySheetExtension::isChanged(int index) const - - Returns true if the value of the property at the given \a index - differs from the property's default value, otherwise false. - - \sa indexOf(), setChanged(), reset() -*/ - -/*! - \fn void QDesignerPropertySheetExtension::setChanged(int index, bool changed) - - Sets whether the property at the given \a index is different from - its default value, or not, depending on the \a changed parameter. - - \sa indexOf(), isChanged() -*/ - -// Doc: Interface only - -/*! - \class QDesignerDynamicPropertySheetExtension - - \brief The QDesignerDynamicPropertySheetExtension class allows you to - manipulate a widget's dynamic properties in Qt Designer's property editor. - - \sa QDesignerPropertySheetExtension, {QObject#Dynamic Properties}{Dynamic Properties} - - \inmodule QtDesigner - \since 4.3 -*/ - -/*! - \fn QDesignerDynamicPropertySheetExtension::~QDesignerDynamicPropertySheetExtension() - - Destroys the dynamic property sheet extension. -*/ - -/*! - \fn bool QDesignerDynamicPropertySheetExtension::dynamicPropertiesAllowed() const - - Returns true if the widget supports dynamic properties; otherwise returns false. -*/ - -/*! - \fn int QDesignerDynamicPropertySheetExtension::addDynamicProperty(const QString &propertyName, const QVariant &value) - - Adds a dynamic property named \a propertyName and sets its value to \a value. - Returns the index of the property if it was added successfully; otherwise returns -1 to - indicate failure. -*/ - -/*! - \fn bool QDesignerDynamicPropertySheetExtension::removeDynamicProperty(int index) - - Removes the dynamic property at the given \a index. - Returns true if the operation succeeds; otherwise returns false. -*/ - -/*! - \fn bool QDesignerDynamicPropertySheetExtension::isDynamicProperty(int index) const - - Returns true if the property at the given \a index is a dynamic property; otherwise - returns false. -*/ - -/*! - \fn bool QDesignerDynamicPropertySheetExtension::canAddDynamicProperty(const QString &propertyName) const - - Returns true if \a propertyName is a valid, unique name for a dynamic - property; otherwise returns false. - -*/ diff --git a/doc/src/qtxmlpatterns.qdoc b/doc/src/qtxmlpatterns.qdoc index 9f8677bdf1..3177736683 100644 --- a/doc/src/qtxmlpatterns.qdoc +++ b/doc/src/qtxmlpatterns.qdoc @@ -841,6 +841,12 @@ \section2 XML Schema 1.0 + There are two ways QtXmlPatterns can be used to validate schemas: + You can use the C++ API in your Qt application using the classes + QXmlSchema and QXmlSchemaValidator, or you can use the command line + utility named xmlpatternsvalidator (located in the "bin" directory + of your Qt build). + The QtXmlPatterns implementation of XML Schema validation supports the schema specification version 1.0 in large parts. Known problems of the implementation and areas where conformancy may be questionable diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.qdoc index 377cc9c142..3c9109f0ab 100644 --- a/doc/src/snippets/code/doc_src_properties.qdoc +++ b/doc/src/snippets/code/doc_src_properties.qdoc @@ -7,7 +7,9 @@ Q_PROPERTY(type name [DESIGNABLE bool] [SCRIPTABLE bool] [STORED bool] - [USER bool]) + [USER bool] + [CONSTANT] + [FINAL]) //! [0] diff --git a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp index 2ab15ee1ec..89b4f33aed 100644 --- a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp +++ b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp @@ -13,9 +13,9 @@ info1.size(); // returns 56201 info1.symLinkTarget(); // returns "/opt/pretty++/bin/untabify" QFileInfo info2(info1.symLinkTarget()); -info1.isSymLink(); // returns false -info1.absoluteFilePath(); // returns "/opt/pretty++/bin/untabify" -info1.size(); // returns 56201 +info2.isSymLink(); // returns false +info2.absoluteFilePath(); // returns "/opt/pretty++/bin/untabify" +info2.size(); // returns 56201 #endif //! [0] diff --git a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp index 7d75e1be2c..3b9a756583 100644 --- a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp @@ -190,10 +190,10 @@ QVector<QString> vect = list.toVector(); //! [23] -QSet<double> set; -set << 20.0 << 30.0 << 40.0 << ... << 70.0; +QSet<int> set; +set << 20 << 30 << 40 << ... << 70; -QList<double> list = QList<double>::fromSet(set); +QList<int> list = QList<int>::fromSet(set); qSort(list); //! [23] diff --git a/doc/src/supported-platforms.qdoc b/doc/src/supported-platforms.qdoc index 25251fec2f..3f35e147d6 100644 --- a/doc/src/supported-platforms.qdoc +++ b/doc/src/supported-platforms.qdoc @@ -54,7 +54,7 @@ Qt is supported on a variety of 32-bit and 64-bit platforms, and can usually be built on each platform with GCC, a vendor-supplied compiler, or a third party compiler. Although Qt may be built on a range of platform-compiler - combinations, only a subset of these are actively supported by Qt. + combinations, only a subset of these are actively supported by Nokia. \tableofcontents diff --git a/doc/src/tech-preview/images/mainwindow-docks-example.png b/doc/src/tech-preview/images/mainwindow-docks-example.png Binary files differdeleted file mode 100644 index a5641fd9cd..0000000000 --- a/doc/src/tech-preview/images/mainwindow-docks-example.png +++ /dev/null diff --git a/doc/src/tech-preview/images/mainwindow-docks.png b/doc/src/tech-preview/images/mainwindow-docks.png Binary files differdeleted file mode 100644 index 96dafc3e7d..0000000000 --- a/doc/src/tech-preview/images/mainwindow-docks.png +++ /dev/null diff --git a/doc/src/tech-preview/images/plaintext-layout.png b/doc/src/tech-preview/images/plaintext-layout.png Binary files differdeleted file mode 100644 index 9a0f9c15db..0000000000 --- a/doc/src/tech-preview/images/plaintext-layout.png +++ /dev/null diff --git a/doc/src/tech-preview/known-issues.html b/doc/src/tech-preview/known-issues.html deleted file mode 100644 index 885104e564..0000000000 --- a/doc/src/tech-preview/known-issues.html +++ /dev/null @@ -1,110 +0,0 @@ -<html> -<head> -<title>Known issues</title> -<link rel="stylesheet" href="http://qtsoftware.com/trollstyle.css"> -<style type="text/css"> - H2 { position: relative; top: 10px; } - H4 { margin-left: 15px; } - .issue { margin-left: 15px; } - .workaround { margin-left: 30px; margin-right: 30px; padding: 2px; border-style: solid; border-color: #AACA00; border-width: 1px; } -</style> -</head> -<body bgcolor="#ffffff"> -<table border="0" cellpadding="0" cellspacing="0" width="100%"> - <tr bgcolor="#E5E5E5"> - <td><img src="http://doc.trolltech.com/doctitle.png" width="443" height="32" border="0"></td> - <td align="right" valign="middle"></td></tr></table> -<h1>Known Issues: Qt 4.0.0 Technology Preview 1</h1> -<p> - This is the list of known and reported issues for the Qt 4.0.0 - Technology Preview 1. This list is updated daily. -</p> -<br><br> -<table width="100%"> - <tr><td align="left"><b><a href="#buildissues">Build Issues</a></b></td></tr> - <tr><td align="left"><b><a href="#general">General</a></b></td></tr> - <tr><td align="left"><b><a href="#demos">Demos</a></b></td></tr> - <tr><td align="left"><b><a href="#window">Windows specific</a></b></td></tr> - <tr><td align="left"><b><a href="#x11">X11 specific</a></b></td></tr> - <tr><td align="left"><b><a href="#mac">Mac specific</a></b></td></tr> -</table> -<br><br> -<!-- Build section ------------------------------------------------- --> -<a name="buildissues"></a> -<h2>Build Issues</h2> - <h4>Static libraries on Mac OS X</h4> - <p class="issue">Building a static build on mac will fail the first time.</p> - <p class="workaround">Run qmake a second time.</p> - - <h4>QTDIR</h4> - <p class="issue">Some applications(e.g. uic3) need QTDIR set and QTDIR/bin in the path to work.</p> - <p class="workaround">Set QTDIR and PATH as described in INSTALL.</p> - - <h4>ODBC driver on Windows</h4> - <p class="issue">Problems compiling the ODBC driver.</p> - <p class="workaround">Change the include from qapplication.h to qcoreapplication.h</p> - - <h4>QtGui does not link because of accessibility errors</h4> - <p class="issue">undefined reference to QAccessible::setRootObject(QObject*)</p> - <p class="workaround">Rerun configure and rebuild, if that does not help, add the contents of $QTDIR/.qt.config to $QTDIR/.qmake.cache</p> - - -<!-- General section ---------------------------------------------- --> -<a name="general"></a> -<h2>General</h2> - - <h4>No connection to Oracle</h4> - <p class="issue">I cannot connect to my Oracle server</p> - <p class="workaround">Use the Oracle >= 9 client libraries, currently there is no workaround for OCI 8</p> - - <h4>QSqlModel</h4> - <p class="issue">Only the first 16 rows from a database result are displayed</p> - <p class="workaround">You are using a database driver which does not report back the size of a result set and incremental fetching is not yet implemented in the itemviews. You can either use another database like MySQL or increase the QSQL_PREFETCH in qsqlmodel.cpp</p> - - -<!-- Demos section ------------------------------------------------- --> -<a name="demos"></a> -<h2>Demos</h2> - - <h4>-</h4> - - -<!-- Windows platform section -------------------------------------- --> -<a name="window"></a> -<h2>Windows specific</h2> - - <h4>Qt Assistant</h4> - <p class="issue">Problems with zooming and laying out text. Sometimes the text overlaps.</p> - - <h4>GDI handle leak</h4> - <p class="issue">Setting fonts through QPainter::setFont() leaks GDI - handles on windows. This is for instance visible in the OpenGL - part of the Arthur demo. The issue will be fixed before the next - preview.</p> - -<!-- X11 platform section ------------------------------------------ --> -<a name="x11"></a> -<h2>X11 specific</h2> - - <h4>-</h4> - - -<!-- Mac platform section ------------------------------------------ --> -<a name="mac"></a> -<h2>Mac specific</h2> - - <h4>QComboBox</h4> - <p class="issue">Does not have the native Mac look and feel yet. It is rendered in a Windows-like style.</p> - - <h4>Clicking on widgets</h4> - <p class="issue"><i>Jaguar 10.2 only:</i> Clicking on widgets that has a focusrect may fail.</p> - <p class="workaround">Use 10.3 for now.</p> - - -<!-- [Page footer] ------------------------------------------------- --> -<table width="100%"> - <tr><td><hr size="1" noshade></td></tr> - <tr><td align="center" valign="bottom"><a href="http://qtsoftware.com">qtsoftware.com</a></td></tr> -</table> -</body> -</html> diff --git a/doc/src/topics.qdoc b/doc/src/topics.qdoc index f6deaa5b7c..0fe5c5f7c6 100644 --- a/doc/src/topics.qdoc +++ b/doc/src/topics.qdoc @@ -150,18 +150,6 @@ These guides provide specific help about specific Qt-related topics. */ /*! -\group licensing -\title Licensing Information -\ingroup topics -\brief Information about licenses and licensing issues. - -These documents include information about Qt's licenses and the licenses -of third party components used in Qt. - -\generatelist{related} -*/ - -/*! \group platform-notes \title Platform-Specific Notes \ingroup topics diff --git a/doc/src/tutorials/addressbook-fr.qdoc b/doc/src/tutorials/addressbook-fr.qdoc index 78f68216e8..739f047aa2 100644 --- a/doc/src/tutorials/addressbook-fr.qdoc +++ b/doc/src/tutorials/addressbook-fr.qdoc @@ -220,7 +220,7 @@ On remarque que le label \c AddressLabel est positionné en utilisant Qt::AlignTop comme argument optionnel. Ceci est destiné à assurer qu'il ne sera pas centré verticalement dans la cellule (1,0). Pour un aperçu rapide des layouts de Qt, - consultez la section \l{Layout Classes}. + consultez la section \l{Layout Management}. Afin d'installer l'objet layout dans un widget, il faut appeler la méthode \l{QWidget::setLayout()}{setLayout()} du widget en question: diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc index 95394eb42a..fd08bfece2 100644 --- a/doc/src/tutorials/addressbook.qdoc +++ b/doc/src/tutorials/addressbook.qdoc @@ -222,8 +222,8 @@ Notice that \c addressLabel is positioned using Qt::AlignTop as an additional argument. This is to make sure it is not vertically centered in - cell (1,0). For a basic overview on Qt Layouts, refer to the \l{Layout Classes} - document. + cell (1,0). For a basic overview on Qt Layouts, refer to the + \l{Layout Management} documentation. In order to install the layout object onto the widget, we have to invoke the widget's \l{QWidget::setLayout()}{setLayout()} function: diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp index c761d87a30..700916d223 100644 --- a/examples/animation/stickman/lifecycle.cpp +++ b/examples/animation/stickman/lifecycle.cpp @@ -56,8 +56,9 @@ public: { } KeyPressTransition(GraphicsView *receiver, Qt::Key key, QAbstractState *target) - : QSignalTransition(receiver, SIGNAL(keyPressed(int)), QList<QAbstractState*>() << target), m_key(key) + : QSignalTransition(receiver, SIGNAL(keyPressed(int))), m_key(key) { + setTargetState(target); } virtual bool eventTest(QEvent *e) @@ -78,8 +79,9 @@ class LightningStrikesTransition: public QEventTransition { public: LightningStrikesTransition(QAbstractState *target) - : QEventTransition(this, QEvent::Timer, QList<QAbstractState*>() << target) + : QEventTransition(this, QEvent::Timer) { + setTargetState(target); qsrand((uint)QDateTime::currentDateTime().toTime_t()); startTimer(1000); } diff --git a/examples/gestures/imageviewer/main.cpp b/examples/gestures/imageviewer/main.cpp index 6bda4186da..cd1928baa5 100644 --- a/examples/gestures/imageviewer/main.cpp +++ b/examples/gestures/imageviewer/main.cpp @@ -81,6 +81,9 @@ int main(int argc, char *argv[]) if (QApplication::arguments().size() > 1) w.openDirectory(QApplication::arguments().at(1)); + else + w.openDirectory(QFileDialog::getExistingDirectory(0, "Select image folder")); + return app.exec(); } diff --git a/examples/graphicsview/collidingmice/mouse.cpp b/examples/graphicsview/collidingmice/mouse.cpp index c6a67b1854..4cc29dd351 100644 --- a/examples/graphicsview/collidingmice/mouse.cpp +++ b/examples/graphicsview/collidingmice/mouse.cpp @@ -64,7 +64,7 @@ Mouse::Mouse() : angle(0), speed(0), mouseEyeDirection(0), color(qrand() % 256, qrand() % 256, qrand() % 256) { - rotate(qrand() % (360 * 16)); + setRotation(qrand() % (360 * 16)); } //! [0] @@ -195,7 +195,7 @@ void Mouse::advance(int step) qreal dx = ::sin(angle) * 10; mouseEyeDirection = (qAbs(dx / 5) < 1) ? 0 : dx / 5; - rotate(dx); + setRotation(rotation() + dx); setPos(mapToParent(0, -(3 + sin(speed) * 3))); } //! [11] diff --git a/examples/ipc/ipc.pro b/examples/ipc/ipc.pro index b758fc48dd..e70fc38ccb 100644 --- a/examples/ipc/ipc.pro +++ b/examples/ipc/ipc.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs -SUBDIRS = sharedmemory +# no QSharedMemory +!vxworks:!qnx:SUBDIRS = sharedmemory !wince*: SUBDIRS += localfortuneserver localfortuneclient # install diff --git a/examples/itemviews/chart/chart.pro b/examples/itemviews/chart/chart.pro index 3556de03af..32901705a5 100644 --- a/examples/itemviews/chart/chart.pro +++ b/examples/itemviews/chart/chart.pro @@ -4,7 +4,7 @@ RESOURCES = chart.qrc SOURCES = main.cpp \ mainwindow.cpp \ pieview.cpp -unix:!mac:!symbian:LIBS+= -lm +unix:!mac:!symbian:!vxworks:LIBS+= -lm TARGET.EPOCHEAPSIZE = 0x200000 0x800000 diff --git a/examples/network/network.pro b/examples/network/network.pro index 9e48e9a77c..69b460e62f 100644 --- a/examples/network/network.pro +++ b/examples/network/network.pro @@ -2,7 +2,6 @@ TEMPLATE = subdirs SUBDIRS = blockingfortuneclient \ broadcastreceiver \ broadcastsender \ - network-chat \ download \ downloadmanager \ fortuneclient \ @@ -15,6 +14,8 @@ SUBDIRS = blockingfortuneclient \ torrent symbian: SUBDIRS = ftp +# no QProcess +!vxworks:!qnx:SUBDIRS += network-chat contains(QT_CONFIG, openssl):SUBDIRS += securesocketclient diff --git a/examples/painting/painterpaths/painterpaths.pro b/examples/painting/painterpaths/painterpaths.pro index 6c9ba95d61..fbf2ba928d 100644 --- a/examples/painting/painterpaths/painterpaths.pro +++ b/examples/painting/painterpaths/painterpaths.pro @@ -3,7 +3,7 @@ HEADERS = renderarea.h \ SOURCES = main.cpp \ renderarea.cpp \ window.cpp -unix:!mac:!symbian:LIBS += -lm +unix:!mac:!symbian:!vxworks:LIBS += -lm # install target.path = $$[QT_INSTALL_EXAMPLES]/painting/painterpaths @@ -13,4 +13,4 @@ INSTALLS += target sources include($$QT_SOURCE_TREE/examples/examplebase.pri) -symbian:TARGET.UID3 = 0xA000A64C
\ No newline at end of file +symbian:TARGET.UID3 = 0xA000A64C diff --git a/examples/phonon/musicplayer/mainwindow.cpp b/examples/phonon/musicplayer/mainwindow.cpp index ee97c7a1a5..f123d2907d 100644 --- a/examples/phonon/musicplayer/mainwindow.cpp +++ b/examples/phonon/musicplayer/mainwindow.cpp @@ -157,9 +157,12 @@ void MainWindow::tableClicked(int row, int /* column */) mediaObject->stop(); mediaObject->clearQueue(); + if (row >= sources.size()) + return; + mediaObject->setCurrentSource(sources[row]); - if (wasPlaying) + if (wasPlaying) mediaObject->play(); else mediaObject->stop(); diff --git a/examples/qws/qws.pro b/examples/qws/qws.pro index e9f310fa18..34b1d2c918 100644 --- a/examples/qws/qws.pro +++ b/examples/qws/qws.pro @@ -1,5 +1,7 @@ TEMPLATE = subdirs -SUBDIRS = framebuffer mousecalibration simpledecoration +# no /dev/fbX +!qnx:!vxworks:SUBDIRS = framebuffer +SUBDIRS += mousecalibration simpledecoration # install sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro diff --git a/examples/script/customclass/bytearrayclass.cpp b/examples/script/customclass/bytearrayclass.cpp index 81a0b8aacd..2044a168a5 100644 --- a/examples/script/customclass/bytearrayclass.cpp +++ b/examples/script/customclass/bytearrayclass.cpp @@ -100,7 +100,7 @@ ByteArrayClass::ByteArrayClass(QScriptEngine *engine) QScriptValue global = engine->globalObject(); proto.setPrototype(global.property("Object").property("prototype")); - ctor = engine->newFunction(construct); + ctor = engine->newFunction(construct, proto); ctor.setData(qScriptValueFromValue(engine, this)); } //! [0] @@ -224,7 +224,10 @@ QScriptValue ByteArrayClass::construct(QScriptContext *ctx, QScriptEngine *) ByteArrayClass *cls = qscriptvalue_cast<ByteArrayClass*>(ctx->callee().data()); if (!cls) return QScriptValue(); - int size = ctx->argument(0).toInt32(); + QScriptValue arg = ctx->argument(0); + if (arg.instanceOf(ctx->callee())) + return cls->newInstance(qscriptvalue_cast<QByteArray>(arg)); + int size = arg.toInt32(); return cls->newInstance(size); } //! [2] @@ -240,7 +243,7 @@ QScriptValue ByteArrayClass::toScriptValue(QScriptEngine *eng, const QByteArray void ByteArrayClass::fromScriptValue(const QScriptValue &obj, QByteArray &ba) { - ba = qscriptvalue_cast<QByteArray>(obj.data()); + ba = qvariant_cast<QByteArray>(obj.data().toVariant()); } diff --git a/examples/script/customclass/main.cpp b/examples/script/customclass/main.cpp index 05aefd51f3..3b98f5c2d9 100644 --- a/examples/script/customclass/main.cpp +++ b/examples/script/customclass/main.cpp @@ -52,6 +52,7 @@ int main(int argc, char **argv) eng.globalObject().setProperty("ByteArray", baClass->constructor()); qDebug() << "ba = new ByteArray(4):" << eng.evaluate("ba = new ByteArray(4)").toString(); + qDebug() << "ba instanceof ByteArray:" << eng.evaluate("ba instanceof ByteArray").toBool(); qDebug() << "ba.length:" << eng.evaluate("ba.length").toNumber(); qDebug() << "ba[1] = 123; ba[1]:" << eng.evaluate("ba[1] = 123; ba[1]").toNumber(); qDebug() << "ba[7] = 224; ba.length:" << eng.evaluate("ba[7] = 224; ba.length").toNumber(); @@ -65,6 +66,9 @@ int main(int argc, char **argv) qDebug() << "ba.toBase64().toLatin1String():" << eng.evaluate("b64.toLatin1String()").toString(); qDebug() << "ba.valueOf():" << eng.evaluate("ba.valueOf()").toString(); qDebug() << "ba.chop(2); ba.length:" << eng.evaluate("ba.chop(2); ba.length").toNumber(); + qDebug() << "ba2 = new ByteArray(ba):" << eng.evaluate("ba2 = new ByteArray(ba)").toString(); + qDebug() << "ba2.equals(ba):" << eng.evaluate("ba2.equals(ba)").toBool(); + qDebug() << "ba2.equals(new ByteArray()):" << eng.evaluate("ba2.equals(new ByteArray())").toBool(); return 0; } diff --git a/examples/threads/mandelbrot/mandelbrot.pro b/examples/threads/mandelbrot/mandelbrot.pro index 8f552a800a..cf95ea0089 100644 --- a/examples/threads/mandelbrot/mandelbrot.pro +++ b/examples/threads/mandelbrot/mandelbrot.pro @@ -4,7 +4,7 @@ SOURCES = main.cpp \ mandelbrotwidget.cpp \ renderthread.cpp -unix:!mac:!symbian:LIBS += -lm +unix:!mac:!symbian:!vxworks:LIBS += -lm # install target.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot diff --git a/mkspecs/features/vxworks.prf b/mkspecs/features/vxworks.prf new file mode 100644 index 0000000000..a910c69d20 --- /dev/null +++ b/mkspecs/features/vxworks.prf @@ -0,0 +1,63 @@ +# VxWorks Munching Feature +# When compiling C++ sources on VxWorks in kernel mode, all .o files have to +# be processed by the so-called 'munch' script which will generate +# additional code for static c'tors and d'tors. The resulting .c file has to +# be compiled in turn and linked to the executable. +# This can only been done when linking applications, since the munch script +# generates a .c file containing static symbols: linking a lib that was +# already munched to a munched application would lead to duplicate symbols! + +isEmpty(VXWORKS_MUNCH_EXT):VXWORKS_MUNCH_EXT = vxm +isEmpty(VXWORKS_MUNCH_TOOL):VXWORKS_MUNCH_TOOL = $(WIND_BASE)/host/resource/hutils/tcl/munch.tcl + + +!exists($$VXWORKS_MUNCH_TOOL) { + error("Could not find VxWorks Munch tool: '$${VXWORKS_MUNCH_TOOL}'. Please set the environment variable WIND_BASE correctly.") +} + +# The following scope is entered for any project that specifies 'shared' as well +# as for any project specifying neither 'shared', nor 'lib', nor 'staticlib'. +# This means that for a static build only the executable is munched, while for +# a shared build, every lib, plugin and executable is munched separately. + +shared|!staticlib:!lib { + *-dcc { + VXWORKS_MUNCH_CMD = (targ=`basename $(TARGET)`; \ + ddump -Ng \"$(TARGET)\" | tclsh $$VXWORKS_MUNCH_TOOL -c $$VXWORKS_ARCH_MUNCH >\"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" && \ + $$QMAKE_CC -c $$QMAKE_CFLAGS \"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" -o \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" && \ + $$QMAKE_LINK $$QMAKE_LFLAGS -X -r5 -r4 \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" \"$(TARGET)\" -o \"$(TARGET).munched\" && \ + mv \"$(TARGET).munched\" \"$(TARGET)\" && \ + chmod +x \"$(TARGET)\") + } + *-g++ { + VXWORKS_MUNCH_CMD = (targ=`basename $(TARGET)`; \ + nm \"$(DESTDIR)$(TARGET)\" | tclsh $$VXWORKS_MUNCH_TOOL -c $$VXWORKS_ARCH_MUNCH >\"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" && \ + $$QMAKE_CC -c $$QMAKE_CFLAGS -fdollars-in-identifiers \"$(OBJECTS_DIR)/\$\${targ}_ctdt.c\" -o \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" && \ + $$QMAKE_LINK $$QMAKE_LFLAGS -nostdlib -Wl,-X -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT \"$(OBJECTS_DIR)/\$\${targ}_ctdt.o\" \"$(DESTDIR)$(TARGET)\" -o \"$(DESTDIR)$(TARGET).munched\" && \ + mv \"$(DESTDIR)$(TARGET).munched\" \"$(DESTDIR)$(TARGET)\" && \ + chmod +x \"$(DESTDIR)$(TARGET)\") + } + + # We need to create a dummy lib.a in case someone links against this lib. + # In VxWorks it's the responsibility of the run-time linker ld to resolve + # symbols, since there are no real shared libraries for the toolchain linker + # to link against. + + shared:contains(TEMPLATE, lib) { + VXWORKS_MUNCH_CMD += "&&" + VXWORKS_MUNCH_CMD += (atarg=`basename $(TARGET) .so.$${VERSION}`.a ; touch \"$(DESTDIR)\$\${atarg}\") + } + + QMAKE_POST_LINK = $$VXWORKS_MUNCH_CMD $$QMAKE_POST_LINK + silent:QMAKE_POST_LINK = @echo creating $@.$$VXWORKS_MUNCH_EXT && $$QMAKE_POST_LINK + + isEmpty(DESTDIR) { + target.targets += "`basename $(TARGET)`.$$VXWORKS_MUNCH_EXT" + QMAKE_DISTCLEAN += "`basename $(TARGET)`.$$VXWORKS_MUNCH_EXT" + } else { + target.targets += "$(DESTDIR)/`basename $(TARGET)`.$$VXWORKS_MUNCH_EXT" + QMAKE_DISTCLEAN += "$(DESTDIR)/`basename $(TARGET)`.$$VXWORKS_MUNCH_EXT" + } + *-g++:LIBS += -lgcc +} + diff --git a/mkspecs/unsupported/qnx-g++/qmake.conf b/mkspecs/unsupported/qnx-g++/qmake.conf new file mode 100644 index 0000000000..2e568dcabc --- /dev/null +++ b/mkspecs/unsupported/qnx-g++/qmake.conf @@ -0,0 +1,59 @@ +# +# qmake configuration for qnx-g++ +# +# Written for QNX RTOS v6 with X11 +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release link_prl +QT += core gui + +include(../common/g++.conf) +include(../common/unix.conf) + +QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CLFAGS_THREAD +QMAKE_COMPILER_DEFINES += __QNXNTO__ + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /opt/X11R6/include +QMAKE_LIBDIR_X11 = /opt/X11R6/lib +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +QMAKE_INCDIR_OPENGL = /opt/X11R6/include +QMAKE_LIBDIR_OPENGL = /opt/X11R6/lib + +#QMAKE_LIBS = -lunix +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm -lsocket +QMAKE_LIBS_X11SM = -lSM -lICE +QMAKE_LIBS_OPENGL = -lGLU -lGL +QMAKE_LIBS_OPENGL_QT = -lGL +QMAKE_LIBS_THREAD = +QMAKE_LIBS_NETWORK = -lsocket + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +QMAKE_AR = ar cqs +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $(COPY) +QMAKE_COPY_DIR = $(COPY) -r +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +load(qt_config) diff --git a/mkspecs/unsupported/qnx-g++/qplatformdefs.h b/mkspecs/unsupported/qnx-g++/qplatformdefs.h new file mode 100644 index 0000000000..f59922d71b --- /dev/null +++ b/mkspecs/unsupported/qnx-g++/qplatformdefs.h @@ -0,0 +1,172 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPLATFORMDEFS_H +#define QPLATFORMDEFS_H + +// Get Qt defines/settings + +#include "qglobal.h" + +// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs + +#include <unistd.h> + + +// We are hot - unistd.h should have turned on the specific APIs we requested + + +#include <pthread.h> +#include <dirent.h> +#include <fcntl.h> +#include <grp.h> +#include <pwd.h> +#include <signal.h> + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/ipc.h> +#include <sys/time.h> +// QNX doesn't have the System V <sys/shm.h> header. This is not a standard +// POSIX header, it's only documented in the Single UNIX Specification. +// The preferred POSIX compliant way to share memory is to use the functions +// in <sys/mman.h> that comply with the POSIX Real Time Interface (1003.1b). +#include <sys/mman.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <netinet/in.h> +#ifndef QT_NO_IPV6IFNAME +#include <net/if.h> +#endif + +// for htonl +#include <arpa/inet.h> + +#ifdef QT_LARGEFILE_SUPPORT +#define QT_FOPEN ::fopen64 +#define QT_FSEEK ::fseeko64 +#define QT_FTELL ::ftello64 +#define QT_FGETPOS ::fgetpos64 +#define QT_FSETPOS ::fsetpos64 +#define QT_FPOS_T fpos64_t +#define QT_OFF_T off64_t +#else +#define QT_FOPEN ::fopen +#define QT_FSEEK ::fseeko +#define QT_FTELL ::ftello +#define QT_FGETPOS ::fgetpos +#define QT_FSETPOS ::fsetpos +#define QT_FPOS_T fpos_t +#define QT_OFF_T off_t +#endif + +#ifdef QT_LARGEFILE_SUPPORT +#define QT_STATBUF struct stat64 +#define QT_STATBUF4TSTAT struct stat64 +#define QT_STAT ::stat64 +#define QT_FSTAT ::fstat64 +#define QT_LSTAT ::lstat64 +#define QT_OPEN ::open64 +#define QT_TRUNCATE ::truncate64 +#define QT_FTRUNCATE ::ftruncate64 +#define QT_LSEEK ::lseek64 +#else +#define QT_STATBUF struct stat +#define QT_STATBUF4TSTAT struct stat +#define QT_STAT ::stat +#define QT_FSTAT ::fstat +#define QT_LSTAT ::lstat +#define QT_OPEN ::open +#define QT_TRUNCATE ::truncate +#define QT_FTRUNCATE ::ftruncate +#define QT_LSEEK ::lseek +#endif + +#define QT_STAT_REG S_IFREG +#define QT_STAT_DIR S_IFDIR +#define QT_STAT_MASK S_IFMT +#define QT_STAT_LNK S_IFLNK +#define QT_SOCKET_CONNECT ::connect +#define QT_SOCKET_BIND ::bind +#define QT_FILENO fileno +#define QT_CLOSE ::close +#define QT_READ ::read +#define QT_WRITE ::write +#define QT_ACCESS ::access +#define QT_GETCWD ::getcwd +#define QT_CHDIR ::chdir +#define QT_MKDIR ::mkdir +#define QT_RMDIR ::rmdir +#define QT_OPEN_LARGEFILE O_LARGEFILE +#define QT_OPEN_RDONLY O_RDONLY +#define QT_OPEN_WRONLY O_WRONLY +#define QT_OPEN_RDWR O_RDWR +#define QT_OPEN_CREAT O_CREAT +#define QT_OPEN_TRUNC O_TRUNC +#define QT_OPEN_APPEND O_APPEND + +#define QT_SIGNAL_RETTYPE void +#define QT_SIGNAL_ARGS int +#define QT_SIGNAL_IGNORE SIG_IGN + +#define QT_SOCKLEN_T socklen_t + +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf + +// QNX6 doesn't have getpagesize() +inline int getpagesize() +{ + return ::sysconf(_SC_PAGESIZE); +} + +#include <stdlib.h> + +// QNX6 doesn't have strtof - use strtod instead +inline float strtof(const char *b, char **e) +{ + return float(strtod(b, e)); +} + +#define QT_QWS_TEMP_DIR qgetenv("TMP"); + +#endif // QPLATFORMDEFS_H diff --git a/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf new file mode 100644 index 0000000000..51fe69736c --- /dev/null +++ b/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf @@ -0,0 +1,102 @@ +# +# qmake configuration for qnx-g++ +# +# Written for QNX RTOS v6 +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release link_prl +QT += core gui + +# +# qmake configuration for common gcc +# + +QMAKE_CC = ntox86-gcc-3.3.5 +QMAKE_CFLAGS += -pipe +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += -Wall -W +QMAKE_CFLAGS_WARN_OFF += -w +QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += -fPIC +QMAKE_CFLAGS_STATIC_LIB += -fPIC +QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} +QMAKE_COMPILER_DEFINES += __QNXNTO__ + +QMAKE_CXX = ntox86-g++-3.3.5 +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden +QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + +QMAKE_LINK = ntox86-gcc-3.3.5 +QMAKE_LINK_SHLIB = ntox86-gcc-3.3.5 +QMAKE_LFLAGS += -Wl,--no-undefined +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += -Wl,-soname, +QMAKE_LFLAGS_THREAD += +QMAKE_RPATH = -Wl,-rpath, + +QMAKE_PCH_OUTPUT_EXT = .gch + +# -Bsymbolic-functions (ld) support +QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions +QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, + +#include(../../common/g++.conf) +include(../../common/unix.conf) + +QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CLFAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] + +#QMAKE_LIBS = -lunix +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_THREAD = +QMAKE_LIBS_NETWORK += -lsocket +QMAKE_LIBS_GUI += -lsocket + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +QMAKE_AR = ar cqs +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $(COPY) +QMAKE_COPY_DIR = $(COPY) -r +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +load(qt_config) diff --git a/mkspecs/unsupported/qws/qnx-generic-g++/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-generic-g++/qplatformdefs.h new file mode 100644 index 0000000000..7f0d1c4069 --- /dev/null +++ b/mkspecs/unsupported/qws/qnx-generic-g++/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../qnx-g++/qplatformdefs.h" diff --git a/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf new file mode 100644 index 0000000000..3f24cd9b4f --- /dev/null +++ b/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf @@ -0,0 +1,97 @@ +# +# qmake configuration for qnx-g++ +# +# Written for QNX RTOS v6 +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release link_prl +QT += core gui + +QMAKE_CC = ntox86-gcc-4.2.4 +QMAKE_CFLAGS += -pipe +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += -Wall -W +QMAKE_CFLAGS_WARN_OFF += -w +QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += -fPIC +QMAKE_CFLAGS_STATIC_LIB += -fPIC +QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} +QMAKE_COMPILER_DEFINES += __QNXNTO__ + +QMAKE_CXX = ntox86-g++-4.2.4 +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden +QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + +QMAKE_LINK = ntox86-g++-4.2.4 +QMAKE_LINK_SHLIB = ntox86-g++-4.2.4 +QMAKE_LFLAGS += -Wl,--no-undefined +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += -Wl,-soname, +QMAKE_LFLAGS_THREAD += +QMAKE_RPATH = -Wl,-rpath, + +QMAKE_PCH_OUTPUT_EXT = .gch + +# -Bsymbolic-functions (ld) support +QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions +QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, + +include(../../common/unix.conf) + +QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CLFAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] + +#QMAKE_LIBS = -lunix +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_THREAD = +QMAKE_LIBS_NETWORK += -lsocket +QMAKE_LIBS_GUI += -lsocket + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +QMAKE_AR = ar cqs +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $(COPY) +QMAKE_COPY_DIR = $(COPY) -r +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +load(qt_config) diff --git a/mkspecs/unsupported/qws/qnx-i386-g++/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-i386-g++/qplatformdefs.h new file mode 100644 index 0000000000..7f0d1c4069 --- /dev/null +++ b/mkspecs/unsupported/qws/qnx-i386-g++/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../qnx-g++/qplatformdefs.h" diff --git a/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf new file mode 100644 index 0000000000..56a9c66aea --- /dev/null +++ b/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf @@ -0,0 +1,97 @@ +# +# qmake configuration for qnx-g++ +# +# Written for QNX RTOS v6 +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release link_prl +QT += core gui + +QMAKE_CC = ntoppc-gcc-4.3.3 +QMAKE_CFLAGS += -pipe +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += -Wall -W +QMAKE_CFLAGS_WARN_OFF += -w +QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += -fPIC +QMAKE_CFLAGS_STATIC_LIB += -fPIC +QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} +QMAKE_COMPILER_DEFINES += __QNXNTO__ + +QMAKE_CXX = ntoppc-g++-4.3.3 +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden +QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + +QMAKE_LINK = ntoppc-g++-4.3.3 +QMAKE_LINK_SHLIB = ntoppc-g++-4.3.3 +QMAKE_LFLAGS += -Wl,--no-undefined +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += -Wl,-soname, +QMAKE_LFLAGS_THREAD += +QMAKE_RPATH = -Wl,-rpath, + +QMAKE_PCH_OUTPUT_EXT = .gch + +# -Bsymbolic-functions (ld) support +QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions +QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, + +include(../../common/unix.conf) + +QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CLFAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] + +#QMAKE_LIBS = -lunix +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_THREAD = +QMAKE_LIBS_NETWORK += -lsocket +QMAKE_LIBS_GUI += -lsocket + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +QMAKE_AR = ar cqs +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $(COPY) +QMAKE_COPY_DIR = $(COPY) -r +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +load(qt_config) diff --git a/mkspecs/unsupported/qws/qnx-ppc-g++/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-ppc-g++/qplatformdefs.h new file mode 100644 index 0000000000..7f0d1c4069 --- /dev/null +++ b/mkspecs/unsupported/qws/qnx-ppc-g++/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../qnx-g++/qplatformdefs.h" diff --git a/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf b/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf new file mode 100644 index 0000000000..a8f7e49b56 --- /dev/null +++ b/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf @@ -0,0 +1,111 @@ +# +# qmake configuration for vxworks-ppc-dcc +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl vxworks +QT += core gui network +QMAKE_INCREMENTAL_STYLE = sublib + +VXWORKS_ARCH = ppc +VXWORKS_CPU = PPC32 +VXWORKS_DIAB_SPEC = -tPPC7400FV:vxworks66 +VXWORKS_ARCH_MUNCH = ppc + +QMAKE_CC = dcc +QMAKE_CFLAGS += $$VXWORKS_DIAB_SPEC -Xkeywords=0x0 -Xcode-absolute-far -Xansi -Xforce-declarations -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=diab -DTOOL=diab -D_WRS_KERNEL -DVXWORKS -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' +QMAKE_CFLAGS_DEPS += +QMAKE_CFLAGS_WARN_ON += +QMAKE_CFLAGS_WARN_OFF += -Xsuppress-warnings +QMAKE_CFLAGS_RELEASE += +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += +QMAKE_CFLAGS_STATIC_LIB += +QMAKE_CFLAGS_YACC += +QMAKE_CFLAGS_HIDESYMS += +QMAKE_CFLAGS_PRECOMPILE += +QMAKE_CFLAGS_USE_PRECOMPILE += + +QMAKE_CXX = dcc +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS +QMAKE_CXXFLAGS_PRECOMPILE += +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + +QMAKE_LINK = dld +QMAKE_LINK_SHLIB = dld +QMAKE_LFLAGS += $$VXWORKS_DIAB_SPEC +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += -r5 +QMAKE_LFLAGS_SHLIB += +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_NOUNDEF += +QMAKE_RPATH = + +QMAKE_PCH_OUTPUT_EXT = .gch + +# -Bsymbolic-functions (ld) support +QMAKE_LFLAGS_BSYMBOLIC_FUNC = +QMAKE_LFLAGS_DYNAMIC_LIST = + +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = $(WIND_HOME)/GSS/include +QMAKE_LIBDIR_X11 = $(WIND_HOME)/GSS/lib +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +QMAKE_INCDIR_OPENGL = $$QMAKE_INCDIR_X11 +QMAKE_LIBDIR_OPENGL = $$QMAKE_LIBDIR_X11 + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_X11SM = -lSM -lICE +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGLU -lGL +QMAKE_LIBS_OPENGL_QT = -lGL +QMAKE_LIBS_THREAD = +QMAKE_LIBS_NETWORK = # -lnetwrap # only needed if kernel is missing gethostbyname and friends + + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $(COPY) +QMAKE_COPY_DIR = $(COPY) -r +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p + +include(../../common/unix.conf) +load(qt_config) + diff --git a/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h b/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h new file mode 100644 index 0000000000..4b0c24c83a --- /dev/null +++ b/mkspecs/unsupported/vxworks-ppc-dcc/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../vxworks-simpentium-g++/qplatformdefs.h" diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf new file mode 100644 index 0000000000..be8c13d0b6 --- /dev/null +++ b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf @@ -0,0 +1,37 @@ +# +# qmake configuration for vxworks-simpentium-g++ +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl vxworks +QT += core gui network +QMAKE_INCREMENTAL_STYLE = sublib +DEFINES += VXWORKS + +VXWORKS_ARCH = ppc +VXWORKS_CPU = PPC32 +VXWORKS_ARCH_MUNCH = ppc + +include(../../common/g++.conf) +include(../../common/linux.conf) + +QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH +QMAKE_CFLAGS = -fno-builtin -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' +QMAKE_CFLAGS_SHLIB = # remove -fPIC +QMAKE_CFLAGS_STATIC_LIB = # remove -fPIC +QMAKE_CXX = c++$$VXWORKS_ARCH_MUNCH +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_SHLIB= # remove -fPIC +QMAKE_CXXFLAGS_STATIC_LIB= # remove -fPIC +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LFLAGS_SHLIB = -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common # remove -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_APP += -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common +# QMAKE_LIBS_NETWORK = # -lnetwrap # only needed if kernel is missing gethostbyname() and friends +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_THREAD = + +load(qt_config) + diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h new file mode 100644 index 0000000000..4b0c24c83a --- /dev/null +++ b/mkspecs/unsupported/vxworks-ppc-g++/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../vxworks-simpentium-g++/qplatformdefs.h" diff --git a/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf new file mode 100644 index 0000000000..6228a6be3a --- /dev/null +++ b/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf @@ -0,0 +1,110 @@ +# +# qmake configuration for vxworks-simpentium-dcc +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl vxworks +QT += core gui network +QMAKE_INCREMENTAL_STYLE = sublib + +VXWORKS_ARCH = simlinux +VXWORKS_CPU = SIMLINUX +VXWORKS_DIAB_SPEC = -tX86LH:vxworks66 +VXWORKS_ARCH_MUNCH = pentium + +QMAKE_CC = dcc +QMAKE_CFLAGS += $$VXWORKS_DIAB_SPEC -Xkeywords=0x0 -Xcode-absolute-far -Xansi -Xforce-declarations -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=diab -DTOOL=diab -D_WRS_KERNEL -DVXWORKS -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' +QMAKE_CFLAGS_DEPS += +QMAKE_CFLAGS_WARN_ON += +QMAKE_CFLAGS_WARN_OFF += -Xsuppress-warnings +QMAKE_CFLAGS_RELEASE += +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += +QMAKE_CFLAGS_STATIC_LIB += +QMAKE_CFLAGS_YACC += +QMAKE_CFLAGS_HIDESYMS += +QMAKE_CFLAGS_PRECOMPILE += +QMAKE_CFLAGS_USE_PRECOMPILE += + +QMAKE_CXX = dcc +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS +QMAKE_CXXFLAGS_PRECOMPILE += +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + +QMAKE_LINK = dld +QMAKE_LINK_SHLIB = dld +QMAKE_LFLAGS += $$VXWORKS_DIAB_SPEC -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += -r5 +QMAKE_LFLAGS_SHLIB += +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_NOUNDEF += +QMAKE_RPATH = + +QMAKE_PCH_OUTPUT_EXT = .gch + +# -Bsymbolic-functions (ld) support +QMAKE_LFLAGS_BSYMBOLIC_FUNC = +QMAKE_LFLAGS_DYNAMIC_LIST = + +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = $(WIND_HOME)/GSS/include +QMAKE_LIBDIR_X11 = $(WIND_HOME)/GSS/lib +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +QMAKE_INCDIR_OPENGL = $$QMAKE_INCDIR_X11 +QMAKE_LIBDIR_OPENGL = $$QMAKE_LIBDIR_X11 + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_X11SM = -lSM -lICE +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGLU -lGL +QMAKE_LIBS_OPENGL_QT = -lGL +QMAKE_LIBS_THREAD = +QMAKE_LIBS_NETWORK = # -lnet # only needed if kernel is missing gethostbyname and friends + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $(COPY) +QMAKE_COPY_DIR = $(COPY) -r +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p + +include(../../common/unix.conf) +load(qt_config) + diff --git a/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h new file mode 100644 index 0000000000..4b0c24c83a --- /dev/null +++ b/mkspecs/unsupported/vxworks-simpentium-dcc/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../vxworks-simpentium-g++/qplatformdefs.h" diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf new file mode 100644 index 0000000000..29e9c70c5d --- /dev/null +++ b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf @@ -0,0 +1,37 @@ +# +# qmake configuration for vxworks-simpentium-g++ +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl vxworks +QT += core gui network +QMAKE_INCREMENTAL_STYLE = sublib +DEFINES += VXWORKS + +VXWORKS_ARCH = simlinux +VXWORKS_CPU = SIMLINUX +VXWORKS_ARCH_MUNCH = pentium + +include(../../common/g++.conf) +include(../../common/linux.conf) + +QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH +QMAKE_CFLAGS = -fno-builtin -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' +QMAKE_CFLAGS_SHLIB = # remove -fPIC +QMAKE_CFLAGS_STATIC_LIB = # remove -fPIC +QMAKE_CXX = c++$$VXWORKS_ARCH_MUNCH +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_SHLIB= # remove -fPIC +QMAKE_CXXFLAGS_STATIC_LIB= # remove -fPIC +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LFLAGS_SHLIB = -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common # remove -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_APP += -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common +QMAKE_LIBS_NETWORK = # -lnetwrap # only needed if kernel is missing gethostbyname() and friends +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_THREAD = + +load(qt_config) + diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h new file mode 100644 index 0000000000..90eb9552ce --- /dev/null +++ b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPLATFORMDEFS_H +#define QPLATFORMDEFS_H + +// Get Qt defines/settings + +#include "qglobal.h" +#include "qfunctions_vxworks.h" + + +#ifdef QT_LARGEFILE_SUPPORT +#define QT_STATBUF struct stat64 +#define QT_STATBUF4TSTAT struct stat64 +#define QT_STAT ::stat64 +#define QT_FSTAT ::fstat64 +#define QT_LSTAT ::stat64 +#define QT_OPEN ::open64 +#define QT_TRUNCATE ::truncate64 +#define QT_FTRUNCATE ::ftruncate64 +#define QT_LSEEK ::lseek64 +#else +#define QT_STATBUF struct stat +#define QT_STATBUF4TSTAT struct stat +#define QT_STAT ::stat +#define QT_FSTAT ::fstat +#define QT_LSTAT ::stat +#define QT_OPEN ::open +#define QT_TRUNCATE ::truncate +#define QT_FTRUNCATE ::ftruncate +#define QT_LSEEK ::lseek +#endif + +#ifdef QT_LARGEFILE_SUPPORT +#define QT_FOPEN ::fopen64 +#define QT_FSEEK ::fseeko64 +#define QT_FTELL ::ftello64 +#define QT_FGETPOS ::fgetpos64 +#define QT_FSETPOS ::fsetpos64 +#define QT_FPOS_T fpos64_t +#define QT_OFF_T off64_t +#else +#define QT_FOPEN ::fopen +#define QT_FSEEK ::fseek +#define QT_FTELL ::ftell +#define QT_FGETPOS ::fgetpos +#define QT_FSETPOS ::fsetpos +#define QT_FPOS_T fpos_t +#define QT_OFF_T long +#endif + +#define QT_STAT_REG S_IFREG +#define QT_STAT_DIR S_IFDIR +#define QT_STAT_MASK S_IFMT +#define QT_STAT_LNK S_IFLNK +#define QT_SOCKET_CONNECT(sd, to, tolen) \ + ::connect(sd, (struct sockaddr *) to, tolen) +#define QT_SOCKET_BIND ::bind +#define QT_FILENO fileno +#define QT_CLOSE ::close +#define QT_READ(fd, buf, len) ::read(fd, (char*) buf, len) +#define QT_WRITE(fd, buf, len) ::write(fd, (char*) buf, len) +#define QT_ACCESS ::access +#define QT_GETCWD ::getcwd +#define QT_CHDIR ::chdir +#define QT_MKDIR(dir, perm) ::mkdir(dir) +#define QT_RMDIR ::rmdir +#define QT_OPEN_LARGEFILE O_LARGEFILE +#define QT_OPEN_RDONLY O_RDONLY +#define QT_OPEN_WRONLY O_WRONLY +#define QT_OPEN_RDWR O_RDWR +#define QT_OPEN_CREAT O_CREAT +#define QT_OPEN_TRUNC O_TRUNC +#define QT_OPEN_APPEND O_APPEND + +#define QT_SIGNAL_RETTYPE void +#define QT_SIGNAL_ARGS int +#define QT_SIGNAL_IGNORE SIG_IGN + +// there IS a socklen_t in sys/socket.h (unsigned int), +// but sockLib.h uses int in all function declaration... +//#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T int + +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf + + +#endif // QPLATFORMDEFS_H diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 4d745735e4..c1d4601592 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2174,8 +2174,6 @@ QString MakefileGenerator::buildArgs(const QString &outdir) ret += " -unix"; else if(Option::target_mode == Option::TARG_WIN_MODE) ret += " -win32"; - else if(Option::target_mode == Option::TARG_QNX6_MODE) - ret += " -qnx6"; //configs for(QStringList::Iterator it = Option::user_configs.begin(); diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 9d3fa678aa..372d902820 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -49,9 +49,9 @@ QT_BEGIN_NAMESPACE // XML Tags --------------------------------------------------------- const char _Configuration[] = "Configuration"; const char _Configurations[] = "Configurations"; -const char _File[] = "File"; +const char q_File[] = "File"; const char _FileConfiguration[] = "FileConfiguration"; -const char _Files[] = "Files"; +const char q_Files[] = "Files"; const char _Filter[] = "Filter"; const char _Globals[] = "Globals"; const char _Platform[] = "Platform"; @@ -2402,11 +2402,11 @@ XmlOutput &operator<<(XmlOutput &xml, VCFilter &tool) } for (int i = 0; i < tool.Files.count(); ++i) { const VCFilterFile &info = tool.Files.at(i); - xml << tag(_File) + xml << tag(q_File) << attrS(_RelativePath, Option::fixPathToLocalOS(info.file)) << data(); // In case no custom builds, to avoid "/>" endings tool.outputFileConfig(xml, tool.Files.at(i).file); - xml << closetag(_File); + xml << closetag(q_File); } if (!tool.Name.isEmpty()) xml << closetag(_Filter); @@ -2442,7 +2442,7 @@ XmlOutput &operator<<(XmlOutput &xml, const VCProjectSingleConfig &tool) << tag(_Configurations) << tool.Configuration; xml << closetag(_Configurations) - << tag(_Files); + << tag(q_Files); // Add this configuration into a multi-config project, since that's where we have the flat/tree // XML output functionality VCProject tempProj; @@ -2458,7 +2458,7 @@ XmlOutput &operator<<(XmlOutput &xml, const VCProjectSingleConfig &tool) tempProj.outputFilter(xml, tempProj.ExtraCompilers.at(x)); } tempProj.outputFilter(xml, "RootFiles"); - xml << closetag(_Files) + xml << closetag(q_Files) << tag(_Globals) << data(); // No "/>" end tag return xml; @@ -2513,7 +2513,7 @@ void VCProject::outputFileConfigs(XmlOutput &xml, const VCFilterFile &info, const QString &filtername) { - xml << tag(_File) + xml << tag(q_File) << attrS(_RelativePath, Option::fixPathToLocalOS(info.file)); for (int i = 0; i < SingleProjects.count(); ++i) { VCFilter filter; @@ -2541,7 +2541,7 @@ void VCProject::outputFileConfigs(XmlOutput &xml, if (filter.Config) // only if the filter is not empty filter.outputFileConfig(xml, info.file); } - xml << closetag(_File); + xml << closetag(q_File); } // outputs a given filter for all existing configurations of a project @@ -2636,7 +2636,7 @@ XmlOutput &operator<<(XmlOutput &xml, VCProject &tool) for (int i = 0; i < tool.SingleProjects.count(); ++i) xml << tool.SingleProjects.at(i).Configuration; xml << closetag(_Configurations) - << tag(_Files); + << tag(q_Files); tool.outputFilter(xml, "Sources"); tool.outputFilter(xml, "Headers"); tool.outputFilter(xml, "GeneratedFiles"); @@ -2648,7 +2648,7 @@ XmlOutput &operator<<(XmlOutput &xml, VCProject &tool) tool.outputFilter(xml, tool.ExtraCompilers.at(x)); } tool.outputFilter(xml, "RootFiles"); - xml << closetag(_Files) + xml << closetag(q_Files) << tag(_Globals) << data(); // No "/>" end tag return xml; diff --git a/qmake/option.cpp b/qmake/option.cpp index 5f8c4f4314..230801736d 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -99,8 +99,6 @@ QStringList Option::shellPath; Option::TARG_MODE Option::target_mode = Option::TARG_WIN_MODE; #elif defined(Q_OS_MAC) Option::TARG_MODE Option::target_mode = Option::TARG_MACX_MODE; -#elif defined(Q_OS_QNX6) -Option::TARG_MODE Option::target_mode = Option::TARG_QNX6_MODE; #else Option::TARG_MODE Option::target_mode = Option::TARG_UNIX_MODE; #endif diff --git a/qmake/option.h b/qmake/option.h index 4205b03044..df2c9400d0 100644 --- a/qmake/option.h +++ b/qmake/option.h @@ -149,7 +149,7 @@ struct Option static int warn_level; static bool recursive; static QStringList before_user_vars, after_user_vars, user_configs, after_user_configs; - enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE }; + enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE }; static TARG_MODE target_mode; static QString user_template, user_template_prefix; static QStringList shellPath; diff --git a/qmake/project.cpp b/qmake/project.cpp index 92eb461fd7..2da2e3b97e 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -705,10 +705,6 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0) concat << base_concat + QDir::separator() + "mac"; concat << base_concat + QDir::separator() + "mac9"; break; - case Option::TARG_QNX6_MODE: //also a unix - concat << base_concat + QDir::separator() + "qnx6"; - concat << base_concat + QDir::separator() + "unix"; - break; } concat << base_concat; } @@ -1707,13 +1703,11 @@ QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QString return true; //mkspecs - if((Option::target_mode == Option::TARG_MACX_MODE || Option::target_mode == Option::TARG_QNX6_MODE || + if((Option::target_mode == Option::TARG_MACX_MODE || Option::target_mode == Option::TARG_UNIX_MODE) && x == "unix") return !isForSymbian(); else if(Option::target_mode == Option::TARG_MACX_MODE && x == "macx") return !isForSymbian(); - else if(Option::target_mode == Option::TARG_QNX6_MODE && x == "qnx6") - return !isForSymbian(); else if(Option::target_mode == Option::TARG_MAC9_MODE && x == "mac9") return !isForSymbian(); else if((Option::target_mode == Option::TARG_MAC9_MODE || Option::target_mode == Option::TARG_MACX_MODE) && diff --git a/src/3rdparty/freetype/builds/unix/ftsystem.c b/src/3rdparty/freetype/builds/unix/ftsystem.c index 3a740fd02d..40fa8d09d7 100644 --- a/src/3rdparty/freetype/builds/unix/ftsystem.c +++ b/src/3rdparty/freetype/builds/unix/ftsystem.c @@ -69,6 +69,9 @@ #include <string.h> #include <errno.h> +#ifdef VXWORKS +#include <ioLib.h> +#endif /*************************************************************************/ /* */ @@ -238,7 +241,7 @@ return FT_Err_Invalid_Stream_Handle; /* open the file */ - file = open( filepathname, O_RDONLY ); + file = open( filepathname, O_RDONLY, 0); if ( file < 0 ) { FT_ERROR(( "FT_Stream_Open:" )); @@ -317,7 +320,11 @@ read_count = read( file, +#ifndef VXWORKS stream->base + total_read_count, +#else + (char *) stream->base + total_read_count, +#endif stream->size - total_read_count ); if ( read_count <= 0 ) diff --git a/src/3rdparty/libjpeg/jmorecfg.h b/src/3rdparty/libjpeg/jmorecfg.h index 54a7d1c447..b0b587065e 100644 --- a/src/3rdparty/libjpeg/jmorecfg.h +++ b/src/3rdparty/libjpeg/jmorecfg.h @@ -157,7 +157,7 @@ typedef short INT16; /* INT32 must hold at least signed 32-bit values. */ -#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +#if !defined(XMD_H) && !defined(VXWORKS) /* X11/xmd.h correctly defines INT32 */ typedef long INT32; #endif @@ -183,6 +183,9 @@ typedef unsigned int JDIMENSION; /* a function called through method pointers: */ #define METHODDEF(type) static type /* a function used only in its module: */ +#if defined(VXWORKS) && defined(LOCAL) +# undef LOCAL +#endif #define LOCAL(type) static type /* a function referenced thru EXTERNs: */ #define GLOBAL(type) type diff --git a/src/3rdparty/libpng/pngconf.h b/src/3rdparty/libpng/pngconf.h index 9edb468508..e680a05533 100644 --- a/src/3rdparty/libpng/pngconf.h +++ b/src/3rdparty/libpng/pngconf.h @@ -344,7 +344,7 @@ # endif /* __linux__ */ #endif /* PNG_SETJMP_SUPPORTED */ -#ifdef BSD +#if defined(BSD) && !defined(VXWORKS) # include <strings.h> #else # include <string.h> diff --git a/src/3rdparty/libtiff/libtiff/tif_config.h b/src/3rdparty/libtiff/libtiff/tif_config.h index 324fbe89a7..9dbc469811 100644 --- a/src/3rdparty/libtiff/libtiff/tif_config.h +++ b/src/3rdparty/libtiff/libtiff/tif_config.h @@ -104,7 +104,7 @@ /* #undef HAVE_PTHREAD */ /* Define to 1 if you have the <search.h> header file. */ -#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) +#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN) && !defined(Q_OS_VXWORKS) #define HAVE_SEARCH_H 1 #endif diff --git a/src/3rdparty/patches/freetype-2.3.6-vxworks.patch b/src/3rdparty/patches/freetype-2.3.6-vxworks.patch new file mode 100644 index 0000000000..21e884cd59 --- /dev/null +++ b/src/3rdparty/patches/freetype-2.3.6-vxworks.patch @@ -0,0 +1,35 @@ +diff --git builds/unix/ftsystem.c builds/unix/ftsystem.c +index 3a740fd..40fa8d0 100644 +--- builds/unix/ftsystem.c ++++ builds/unix/ftsystem.c +@@ -69,6 +69,9 @@ + #include <string.h> + #include <errno.h> + ++#ifdef VXWORKS ++#include <ioLib.h> ++#endif + + /*************************************************************************/ + /* */ +@@ -238,7 +241,7 @@ + return FT_Err_Invalid_Stream_Handle; + + /* open the file */ +- file = open( filepathname, O_RDONLY ); ++ file = open( filepathname, O_RDONLY, 0); + if ( file < 0 ) + { + FT_ERROR(( "FT_Stream_Open:" )); +@@ -317,7 +320,11 @@ + + + read_count = read( file, ++#ifndef VXWORKS + stream->base + total_read_count, ++#else ++ (char *) stream->base + total_read_count, ++#endif + stream->size - total_read_count ); + + if ( read_count <= 0 ) diff --git a/src/3rdparty/patches/libjpeg-6b-vxworks.patch b/src/3rdparty/patches/libjpeg-6b-vxworks.patch new file mode 100644 index 0000000000..263c8d00ed --- /dev/null +++ b/src/3rdparty/patches/libjpeg-6b-vxworks.patch @@ -0,0 +1,23 @@ +diff --git jmorecfg.h jmorecfg.h +index 54a7d1c..b0b5870 100644 +--- jmorecfg.h ++++ jmorecfg.h +@@ -157,7 +157,7 @@ typedef short INT16; + + /* INT32 must hold at least signed 32-bit values. */ + +-#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ ++#if !defined(XMD_H) && !defined(VXWORKS) /* X11/xmd.h correctly defines INT32 */ + typedef long INT32; + #endif + +@@ -183,6 +183,9 @@ typedef unsigned int JDIMENSION; + /* a function called through method pointers: */ + #define METHODDEF(type) static type + /* a function used only in its module: */ ++#if defined(VXWORKS) && defined(LOCAL) ++# undef LOCAL ++#endif + #define LOCAL(type) static type + /* a function referenced thru EXTERNs: */ + #define GLOBAL(type) type diff --git a/src/3rdparty/patches/libpng-1.2.20-vxworks.patch b/src/3rdparty/patches/libpng-1.2.20-vxworks.patch new file mode 100644 index 0000000000..4c49b3fc64 --- /dev/null +++ b/src/3rdparty/patches/libpng-1.2.20-vxworks.patch @@ -0,0 +1,13 @@ +diff --git pngconf.h pngconf.h +index 19e4732..8eb7d35 100644 +--- pngconf.h ++++ pngconf.h +@@ -344,7 +344,7 @@ + # endif /* __linux__ */ + #endif /* PNG_SETJMP_SUPPORTED */ + +-#ifdef BSD ++#if defined(BSD) && !defined(VXWORKS) + # include <strings.h> + #else + # include <string.h> diff --git a/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch b/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch new file mode 100644 index 0000000000..b1b725e26d --- /dev/null +++ b/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch @@ -0,0 +1,11 @@ +--- libtiff/tif_config.h.orig ++++ libtiff/tif_config.h +@@ -104,7 +104,7 @@ + /* #undef HAVE_PTHREAD */ + + /* Define to 1 if you have the <search.h> header file. */ +-#if !defined(Q_OS_WINCE) ++#if !defined(Q_OS_WINCE) && !defined(Q_OS_VXWORKS) + #define HAVE_SEARCH_H 1 + #endif + diff --git a/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch b/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch new file mode 100644 index 0000000000..6ae65fd569 --- /dev/null +++ b/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch @@ -0,0 +1,68 @@ +--- sqlite3.c.orig ++++ sqlite3.c +@@ -383,7 +383,7 @@ SQLITE_PRIVATE void sqlite3Coverage(int); + ** + ** See also ticket #2741. + */ +-#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE ++#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE && !defined(VXWORKS) + # define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ + #endif + +@@ -440,6 +440,13 @@ SQLITE_PRIVATE void sqlite3Coverage(int); + */ + #ifndef _SQLITE3_H_ + #define _SQLITE3_H_ ++ ++#ifdef VXWORKS ++# define SQLITE_HOMEGROWN_RECURSIVE_MUTEX ++# define NO_GETTOD ++# include <ioLib.h> ++#endif ++ + #include <stdarg.h> /* Needed for the definition of va_list */ + + /* +@@ -18792,7 +18799,11 @@ SQLITE_PRIVATE sqlite3_vfs *sqlite3OsDefaultVfs(void){ + #include <sys/stat.h> + #include <fcntl.h> + #include <unistd.h> +-#include <sys/time.h> ++#ifdef VXWORKS ++# include <sys/times.h> ++#else ++# include <sys/time.h> ++#endif + #include <errno.h> + #ifdef SQLITE_ENABLE_LOCKING_STYLE + #include <sys/ioctl.h> +@@ -19728,7 +19739,11 @@ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){ + if( newOffset!=offset ){ + return -1; + } ++# ifndef VXWORKS + got = write(id->h, pBuf, cnt); ++# else ++ got = write(id->h, (char *)pBuf, cnt); ++# endif + #endif + TIMER_END; + OSTRACE5("WRITE %-3d %5d %7lld %d\n", id->h, got, offset, TIMER_ELAPSED); +@@ -21554,12 +21569,16 @@ static int unixRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ + #if !defined(SQLITE_TEST) + { + int pid, fd; +- fd = open("/dev/urandom", O_RDONLY); ++ fd = open("/dev/urandom", O_RDONLY, 0); + if( fd<0 ){ + time_t t; + time(&t); + memcpy(zBuf, &t, sizeof(t)); ++#ifndef VXWORKS + pid = getpid(); ++#else ++ pid = (int)taskIdCurrent(); ++#endif + memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid)); + }else{ + read(fd, zBuf, nBuf); diff --git a/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp b/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp index e932e70962..a9d0694551 100644 --- a/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp +++ b/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp @@ -99,8 +99,8 @@ namespace Phonon m_dstX = m_dstY = 0; if (ratio > 0) { - if (realWidth / realHeight > ratio && scaleMode == Phonon::VideoWidget::FitInView - || realWidth / realHeight < ratio && scaleMode == Phonon::VideoWidget::ScaleAndCrop) { + if ((realWidth / realHeight > ratio && scaleMode == Phonon::VideoWidget::FitInView) + || (realWidth / realHeight < ratio && scaleMode == Phonon::VideoWidget::ScaleAndCrop)) { //the height is correct, let's change the width m_dstWidth = qRound(realHeight * ratio); m_dstX = qRound((realWidth - realHeight * ratio) / 2.); diff --git a/src/3rdparty/phonon/ds9/fakesource.cpp b/src/3rdparty/phonon/ds9/fakesource.cpp index a4d4640578..4dce138b66 100644 --- a/src/3rdparty/phonon/ds9/fakesource.cpp +++ b/src/3rdparty/phonon/ds9/fakesource.cpp @@ -29,7 +29,7 @@ namespace Phonon namespace DS9 { static WAVEFORMATEX g_defaultWaveFormat = {WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, 0}; - static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, {sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0} }; + static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, {0}, 0, {sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0} }; static const AM_MEDIA_TYPE g_fakeAudioType = {MEDIATYPE_Audio, MEDIASUBTYPE_PCM, 0, 0, 2, FORMAT_WaveFormatEx, 0, sizeof(WAVEFORMATEX), reinterpret_cast<BYTE*>(&g_defaultWaveFormat)}; static const AM_MEDIA_TYPE g_fakeVideoType = {MEDIATYPE_Video, MEDIASUBTYPE_RGB32, TRUE, FALSE, 0, FORMAT_VideoInfo2, 0, sizeof(VIDEOINFOHEADER2), reinterpret_cast<BYTE*>(&g_defaultVideoInfo)}; diff --git a/src/3rdparty/phonon/ds9/iodevicereader.cpp b/src/3rdparty/phonon/ds9/iodevicereader.cpp index 38c983b385..a885a69793 100644 --- a/src/3rdparty/phonon/ds9/iodevicereader.cpp +++ b/src/3rdparty/phonon/ds9/iodevicereader.cpp @@ -167,7 +167,7 @@ namespace Phonon oldSize = currentBufferSize(); } - DWORD bytesRead = qMin(currentBufferSize(), int(length)); + int bytesRead = qMin(currentBufferSize(), int(length)); { QWriteLocker locker(&m_lock); qMemCopy(buffer, m_buffer.data(), bytesRead); diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp index 31a0622ffe..7b101769a7 100644 --- a/src/3rdparty/phonon/ds9/mediagraph.cpp +++ b/src/3rdparty/phonon/ds9/mediagraph.cpp @@ -68,6 +68,8 @@ namespace Phonon return ret; } + +/* static HRESULT saveToFile(Graph graph, const QString &filepath) { const WCHAR wszStreamName[] = L"ActiveMovieGraph"; @@ -103,7 +105,7 @@ namespace Phonon return hr; } - +*/ MediaGraph::MediaGraph(MediaObject *mo, short index) : m_graph(CLSID_FilterGraph, IID_IGraphBuilder), @@ -537,7 +539,7 @@ namespace Phonon const QList<OutputPin> outputs = BackendNode::pins(filter, PINDIR_OUTPUT); for(int i = 0; i < outputs.count(); ++i) { const OutputPin &pin = outputs.at(i); - if (VFW_E_NOT_CONNECTED == pin->ConnectedTo(inPin.pparam())) { + if (HRESULT(VFW_E_NOT_CONNECTED) == pin->ConnectedTo(inPin.pparam())) { return SUCCEEDED(pin->Connect(newIn, 0)); } } @@ -809,7 +811,7 @@ namespace Phonon for (int i = 0; i < outputs.count(); ++i) { const OutputPin &out = outputs.at(i); InputPin pin; - if (out->ConnectedTo(pin.pparam()) == VFW_E_NOT_CONNECTED) { + if (out->ConnectedTo(pin.pparam()) == HRESULT(VFW_E_NOT_CONNECTED)) { m_decoderPins += out; //unconnected outputs can be decoded outputs } } diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp index df42011368..10782c2519 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.cpp +++ b/src/3rdparty/phonon/ds9/mediaobject.cpp @@ -786,15 +786,16 @@ namespace Phonon case Phonon::PausedState: pause(); break; - case Phonon::StoppedState: - stop(); - break; case Phonon::PlayingState: play(); break; case Phonon::ErrorState: setState(Phonon::ErrorState); break; + case Phonon::StoppedState: + default: + stop(); + break; } } } diff --git a/src/3rdparty/phonon/ds9/qbasefilter.cpp b/src/3rdparty/phonon/ds9/qbasefilter.cpp index 95cab92f84..c950c4197a 100644 --- a/src/3rdparty/phonon/ds9/qbasefilter.cpp +++ b/src/3rdparty/phonon/ds9/qbasefilter.cpp @@ -92,8 +92,8 @@ namespace Phonon return E_POINTER; } - int nbfetched = 0; - while (nbfetched < int(count) && m_index < m_pins.count()) { + uint nbfetched = 0; + while (nbfetched < count && m_index < m_pins.count()) { IPin *current = m_pins[m_index]; current->AddRef(); ret[nbfetched] = current; @@ -211,7 +211,8 @@ namespace Phonon } else if (iid == IID_IMediaPosition || iid == IID_IMediaSeeking) { if (inputPins().isEmpty()) { - if (*out = getUpStreamInterface(iid)) { + *out = getUpStreamInterface(iid); + if (*out) { return S_OK; //we return here to avoid adding a reference } else { hr = E_NOINTERFACE; diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.cpp b/src/3rdparty/phonon/ds9/qmeminputpin.cpp index dca99dbc51..865b8af488 100644 --- a/src/3rdparty/phonon/ds9/qmeminputpin.cpp +++ b/src/3rdparty/phonon/ds9/qmeminputpin.cpp @@ -137,7 +137,8 @@ namespace Phonon return E_POINTER; } - if (*alloc = memoryAllocator(true)) { + *alloc = memoryAllocator(true); + if (*alloc) { return S_OK; } @@ -294,7 +295,7 @@ namespace Phonon LONG length = sample->GetActualDataLength(); HRESULT hr = alloc->Commit(); - if (hr == VFW_E_SIZENOTSET) { + if (hr == HRESULT(VFW_E_SIZENOTSET)) { ALLOCATOR_PROPERTIES prop = getDefaultAllocatorProperties(); prop.cbBuffer = qMax(prop.cbBuffer, length); ALLOCATOR_PROPERTIES actual; @@ -324,7 +325,7 @@ namespace Phonon { LONGLONG start, end; hr = sample->GetMediaTime(&start, &end); - if (hr != VFW_E_MEDIA_TIME_NOT_SET) { + if (hr != HRESULT(VFW_E_MEDIA_TIME_NOT_SET)) { hr = out->SetMediaTime(&start, &end); Q_ASSERT(SUCCEEDED(hr)); } diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp index 68a4ec0c9d..d14876b1e1 100644 --- a/src/3rdparty/phonon/ds9/qpin.cpp +++ b/src/3rdparty/phonon/ds9/qpin.cpp @@ -91,8 +91,8 @@ namespace Phonon return E_INVALIDARG; } - int nbFetched = 0; - while (nbFetched < int(count) && m_index < m_pin->mediaTypes().count()) { + uint nbFetched = 0; + while (nbFetched < count && m_index < m_pin->mediaTypes().count()) { //the caller will deallocate the memory *out = static_cast<AM_MEDIA_TYPE *>(::CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE))); const AM_MEDIA_TYPE original = m_pin->mediaTypes().at(m_index); @@ -145,9 +145,9 @@ namespace Phonon QPin::QPin(QBaseFilter *parent, PIN_DIRECTION dir, const QVector<AM_MEDIA_TYPE> &mt) : - m_memAlloc(0), m_parent(parent), m_refCount(1), m_connected(0), + m_parent(parent), m_flushing(false), m_refCount(1), m_connected(0), m_direction(dir), m_mediaTypes(mt), m_connectedType(defaultMediaType), - m_flushing(false) + m_memAlloc(0) { Q_ASSERT(m_parent); m_parent->addPin(this); diff --git a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp index 2112267556..cf5ce96115 100644 --- a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp +++ b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp @@ -194,8 +194,8 @@ namespace Phonon m_sampleBuffer = ComPointer<IMediaSample>(); #ifndef QT_NO_OPENGL freeGLResources(); -#endif // QT_NO_OPENGL m_textureUploaded = false; +#endif // QT_NO_OPENGL } void endOfStream() @@ -314,7 +314,6 @@ namespace Phonon REFERENCE_TIME m_start; HANDLE m_renderEvent, m_receiveCanWait; // Signals sample to render QSize m_size; - bool m_textureUploaded; //mixer settings qreal m_brightness, @@ -356,6 +355,7 @@ namespace Phonon bool m_checkedPrograms; bool m_usingOpenGL; + bool m_textureUploaded; GLuint m_program[2]; GLuint m_texture[3]; #endif @@ -436,7 +436,7 @@ namespace Phonon QBaseFilter(CLSID_NULL), m_inputPin(new VideoRendererSoftPin(this)), m_renderer(renderer), m_start(0) #ifndef QT_NO_OPENGL - ,m_usingOpenGL(false), m_checkedPrograms(false), m_textureUploaded(false) + , m_checkedPrograms(false), m_usingOpenGL(false), m_textureUploaded(false) #endif { m_renderEvent = ::CreateEvent(0, 0, 0, 0); diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c index 91ce30f556..7e604cb77a 100644 --- a/src/3rdparty/sqlite/sqlite3.c +++ b/src/3rdparty/sqlite/sqlite3.c @@ -383,7 +383,7 @@ SQLITE_PRIVATE void sqlite3Coverage(int); ** ** See also ticket #2741. */ -#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE +#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE && !defined(VXWORKS) # define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ #endif @@ -440,6 +440,13 @@ SQLITE_PRIVATE void sqlite3Coverage(int); */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ + +#ifdef VXWORKS +# define SQLITE_HOMEGROWN_RECURSIVE_MUTEX +# define NO_GETTOD +# include <ioLib.h> +#endif + #include <stdarg.h> /* Needed for the definition of va_list */ /* @@ -18792,7 +18799,11 @@ SQLITE_PRIVATE sqlite3_vfs *sqlite3OsDefaultVfs(void){ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> -#include <sys/time.h> +#ifdef VXWORKS +# include <sys/times.h> +#else +# include <sys/time.h> +#endif #include <errno.h> #ifdef SQLITE_ENABLE_LOCKING_STYLE #include <sys/ioctl.h> @@ -19728,7 +19739,11 @@ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){ if( newOffset!=offset ){ return -1; } +# ifndef VXWORKS got = write(id->h, pBuf, cnt); +# else + got = write(id->h, (char *)pBuf, cnt); +# endif #endif TIMER_END; OSTRACE5("WRITE %-3d %5d %7lld %d\n", id->h, got, offset, TIMER_ELAPSED); @@ -21554,12 +21569,16 @@ static int unixRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ #if !defined(SQLITE_TEST) { int pid, fd; - fd = open("/dev/urandom", O_RDONLY); + fd = open("/dev/urandom", O_RDONLY, 0); if( fd<0 ){ time_t t; time(&t); memcpy(zBuf, &t, sizeof(t)); +#ifndef VXWORKS pid = getpid(); +#else + pid = (int)taskIdCurrent(); +#endif memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid)); }else{ read(fd, zBuf, nBuf); diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index fa8e3ff6e1..a08a7b485d 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,104 @@ +2009-07-28 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Use automake 1.11 SILENT_RULES when present, for cleaner build + output. You can disable it by passing --disable-silent-rules to + configure or V=1 to make. + + * autotools/dolt.m4: + * configure.ac: + +2009-07-28 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Disable some compiler warnings for the win build + https://bugs.webkit.org/show_bug.cgi?id=27709 + + * WebKit.pri: + +2009-07-28 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + * configure.ac: bump version for 1.1.12 release. + +2009-07-24 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Remove unneeded commas from PKG_CHECK_MODULES. + + * configure.ac: + +2009-07-24 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by Xan Lopez. + + Bump pango version requirement to 1.12 which is the version that + came with Gtk 2.10. + + * configure.ac: + +2009-07-21 Roland Steiner <rolandsteiner@google.com> + + Reviewed by David Levin. + + Add ENABLE_RUBY to list of build options + https://bugs.webkit.org/show_bug.cgi?id=27324 + + * configure.ac: Added flag ENABLE_RUBY. + +2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Holger Freyther. + + [Qt] Add an option for QtLauncher to build without QtUiTools dependency + https://bugs.webkit.org/show_bug.cgi?id=27438 + + Based on Norbert Leser's work. + + * WebKit.pri: Symbian does not have UiTools + +2009-07-16 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by David Levin. + + Add --web-sockets flag and ENABLE_WEB_SOCKETS define. + https://bugs.webkit.org/show_bug.cgi?id=27206 + + Add --enable-web-sockets in configure.ac + + * configure.ac: + +2009-07-16 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Enable GNU compiler extensions to the ARM compiler + for all Qt ports using RVCT + https://bugs.webkit.org/show_bug.cgi?id=27348 + + * WebKit.pri: + +2009-07-15 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Rubber-stamped by Simon Hausmann. + + Fix the Qt/Mac build by disabling TestNetscapePlugin + + We should fix and enable this once we run DRT for Qt/Mac + + * WebKit.pro: + +2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Unreviewed build fix. Require the correct libsoup version now that + it's released. + + * configure.ac: + 2009-07-13 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Tor Arne Vestbø. diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp index fc3d0fe1bc..4a32d35bff 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp @@ -96,7 +96,7 @@ void JSGarbageCollect(JSContextRef ctx) ExecState* exec = toJS(ctx); JSGlobalData& globalData = exec->globalData(); - JSLock lock(globalData.isSharedInstance); + JSLock lock(globalData.isSharedInstance ? LockForReal : SilenceAssertionsOnly); if (!globalData.heap.isBusy()) globalData.heap.collect(); diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h index 4f67618454..c742d9620f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h @@ -34,7 +34,7 @@ #include <wtf/HashMap.h> #include <wtf/RefCounted.h> -struct StaticValueEntry { +struct StaticValueEntry : FastAllocBase { StaticValueEntry(JSObjectGetPropertyCallback _getProperty, JSObjectSetPropertyCallback _setProperty, JSPropertyAttributes _attributes) : getProperty(_getProperty), setProperty(_setProperty), attributes(_attributes) { @@ -45,7 +45,7 @@ struct StaticValueEntry { JSPropertyAttributes attributes; }; -struct StaticFunctionEntry { +struct StaticFunctionEntry : FastAllocBase { StaticFunctionEntry(JSObjectCallAsFunctionCallback _callAsFunction, JSPropertyAttributes _attributes) : callAsFunction(_callAsFunction), attributes(_attributes) { diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp index a3bdc69ab2..c358a8426a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp @@ -70,7 +70,7 @@ JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) #else { #endif - JSLock lock(true); + JSLock lock(LockForReal); return JSGlobalContextCreateInGroup(toRef(&JSGlobalData::sharedInstance()), globalObjectClass); } #endif // PLATFORM(DARWIN) @@ -82,7 +82,7 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass { initializeThreading(); - JSLock lock(true); + JSLock lock(LockForReal); RefPtr<JSGlobalData> globalData = group ? PassRefPtr<JSGlobalData>(toJS(group)) : JSGlobalData::create(); diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp index 50ee6354f9..87d36ec4fe 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp @@ -449,7 +449,7 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size return result; } -struct OpaqueJSPropertyNameArray { +struct OpaqueJSPropertyNameArray : FastAllocBase { OpaqueJSPropertyNameArray(JSGlobalData* globalData) : refCount(0) , globalData(globalData) @@ -491,7 +491,7 @@ JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array) void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array) { if (--array->refCount == 0) { - JSLock lock(array->globalData->isSharedInstance); + JSLock lock(array->globalData->isSharedInstance ? LockForReal : SilenceAssertionsOnly); delete array; } } @@ -511,7 +511,7 @@ void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef array, JSStri PropertyNameArray* propertyNames = toJS(array); propertyNames->globalData()->heap.registerThread(); - JSLock lock(propertyNames->globalData()->isSharedInstance); + JSLock lock(propertyNames->globalData()->isSharedInstance ? LockForReal : SilenceAssertionsOnly); propertyNames->add(propertyName->identifier(propertyNames->globalData())); } diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index cd46bf5699..24fc7e78db 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,1290 @@ +2009-07-28 Xan Lopez <xlopez@igalia.com> + + Add new files, fixes distcheck. + + * GNUmakefile.am: + +2009-07-28 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + + Reviewed by Simon Hausmann. + + [Qt] Determining whether to use JIT or interpreter + moved from JavaScriptCore.pri to Platform.h + + * JavaScriptCore.pri: + * wtf/Platform.h: + +2009-07-27 Brian Weinstein <bweinstein@apple.com> + + Fix of misuse of sort command. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-07-27 Brian Weinstein <bweinstein@apple.com> + + Build fix for Windows. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-07-27 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Oliver Hunt. + + Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall. + + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::preserveReturnAddressAfterCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + +2009-07-27 Alexey Proskuryakov <ap@webkit.org> + + Gtk build fix. + + * runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case. + +2009-07-27 Alexey Proskuryakov <ap@webkit.org> + + Release build fix. + + * runtime/JSLock.h: (JSC::JSLock::~JSLock): + +2009-07-27 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=27735 + Give a helpful name to JSLock constructor argument + + * API/JSBase.cpp: + (JSGarbageCollect): + * API/JSContextRef.cpp: + * API/JSObjectRef.cpp: + (JSPropertyNameArrayRelease): + (JSPropertyNameAccumulatorAddName): + * JavaScriptCore.exp: + * jsc.cpp: + (functionGC): + (cleanupGlobalData): + (jscmain): + * runtime/Collector.cpp: + (JSC::Heap::destroy): + * runtime/JSLock.cpp: + (JSC::JSLock::JSLock): + (JSC::JSLock::lock): + (JSC::JSLock::unlock): + (JSC::JSLock::DropAllLocks::DropAllLocks): + (JSC::JSLock::DropAllLocks::~DropAllLocks): + * runtime/JSLock.h: + (JSC::): + (JSC::JSLock::JSLock): + (JSC::JSLock::~JSLock): + +2009-07-25 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Eric Seidel. + + Allow custom memory allocation control for OpaqueJSPropertyNameArray struct + https://bugs.webkit.org/show_bug.cgi?id=27342 + + Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been + instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473. + + * API/JSObjectRef.cpp: + +2009-07-24 Ada Chan <adachan@apple.com> + + In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236: + Remove TCMALLOC_TRACK_DECOMMITED_SPANS. We'll always track decommitted spans. + We have tested this and show it has little impact on performance. + + Reviewed by Mark Rowe. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::New): + (WTF::TCMalloc_PageHeap::AllocLarge): + (WTF::propagateDecommittedState): + (WTF::mergeDecommittedStates): + (WTF::TCMalloc_PageHeap::Delete): + (WTF::TCMalloc_PageHeap::IncrementalScavenge): + +2009-07-24 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + + Reviewed by Darin Adler and Adam Barth. + + Build fix for x86 platforms. + https://bugs.webkit.org/show_bug.cgi?id=27602 + + * jit/JIT.cpp: + +2009-07-23 Kevin Ollivier <kevino@theolliviers.com> + + wx build fix, adding missing header. + + * jit/JIT.cpp: + +2009-07-22 Yong Li <yong.li@torchmobile.com> + + Reviewed by George Staikos. + + Add wince specific memory files into wtf/wince + https://bugs.webkit.org/show_bug.cgi?id=27550 + + * wtf/wince/FastMallocWince.h: Added. + * wtf/wince/MemoryManager.cpp: Added. + * wtf/wince/MemoryManager.h: Added. + +2009-07-23 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Simon Hausmann. + + Fix for missing mmap features in Symbian + https://bugs.webkit.org/show_bug.cgi?id=24540 + + Fix, conditionally for PLATFORM(SYMBIAN), as an alternative + to missing support for the MAP_ANON property flag in mmap. + It utilizes Symbian specific memory allocation features. + + * runtime/Collector.cpp + +2009-07-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event. + ( https://bugs.webkit.org/show_bug.cgi?id=27564 ) + + Currently we change permissions forwards and backwards for each instruction modified, + instead we should only change permissions once per complete repatching event. + + 2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled, + which recoups 1/3 of the penalty of running with this mode enabled. + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::linkBranch): + - Replace usage of MakeWritable with cacheFlush. + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::patchPointerInternal): + (JSC::ARMAssembler::repatchLoadPtrToLEA): + - Replace usage of MakeWritable with cacheFlush. + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::relinkJump): + (JSC::ARMv7Assembler::relinkCall): + (JSC::ARMv7Assembler::repatchInt32): + (JSC::ARMv7Assembler::repatchPointer): + (JSC::ARMv7Assembler::repatchLoadPtrToLEA): + (JSC::ARMv7Assembler::setInt32): + - Replace usage of MakeWritable with cacheFlush. + + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::performFinalization): + - Make explicit call to cacheFlush. + + * assembler/MacroAssemblerCodeRef.h: + (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef): + - Make size always available. + + * assembler/RepatchBuffer.h: + (JSC::RepatchBuffer::RepatchBuffer): + (JSC::RepatchBuffer::~RepatchBuffer): + - Add calls to MakeWritable & makeExecutable. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::relinkJump): + (JSC::X86Assembler::relinkCall): + (JSC::X86Assembler::repatchInt32): + (JSC::X86Assembler::repatchPointer): + (JSC::X86Assembler::repatchLoadPtrToLEA): + - Remove usage of MakeWritable. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getJITCode): + - Provide access to CodeBlock's JITCode. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::makeExecutable): + (JSC::ExecutableAllocator::cacheFlush): + - Remove MakeWritable, make cacheFlush public. + + * jit/JIT.cpp: + (JSC::ctiPatchNearCallByReturnAddress): + (JSC::ctiPatchCallByReturnAddress): + (JSC::JIT::privateCompile): + (JSC::JIT::unlinkCall): + (JSC::JIT::linkCall): + - Add CodeBlock argument to RepatchBuffer. + + * jit/JIT.h: + - Pass CodeBlock argument for use by RepatchBuffer. + + * jit/JITCode.h: + (JSC::JITCode::start): + (JSC::JITCode::size): + - Provide access to code start & size. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchMethodCallProto): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + - Add CodeBlock argument to RepatchBuffer. + + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::JITStubs::DEFINE_STUB_FUNCTION): + - Pass CodeBlock argument for use by RepatchBuffer. + +2009-07-21 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Cache not only the structure of the method, but the + structure of its prototype as well. + https://bugs.webkit.org/show_bug.cgi?id=27077 + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::~CodeBlock): + * bytecode/CodeBlock.h: + (JSC::MethodCallLinkInfo::MethodCallLinkInfo): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchMethodCallProto): + +2009-07-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes. + ( https://bugs.webkit.org/show_bug.cgi?id=27527 ) + + This allows the implementation to be defined per architecture. Specifically this addresses the + fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call + to register. Patching the call actually requires the pointer load to be patched, rather than + the call to be patched. This is implementation detail specific to MacroAssemblerX86_64, and as + such is best handled there. + + * assembler/AbstractMacroAssembler.h: + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::linkCall): + (JSC::MacroAssemblerARM::repatchCall): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::linkCall): + (JSC::MacroAssemblerARMv7::repatchCall): + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::linkCall): + (JSC::MacroAssemblerX86::repatchCall): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::linkCall): + (JSC::MacroAssemblerX86_64::repatchCall): + +2009-07-21 Adam Treat <adam.treat@torchmobile.com> + + Reviewed by George Staikos. + + Every wtf file includes other wtf files with <> style includes + except this one. Fix the exception. + + * wtf/ByteArray.h: + +2009-07-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler. + ( https://bugs.webkit.org/show_bug.cgi?id=27485 ) + + This change is the first step in a process to move code that should be in + the architecture-specific MacroAssembler classes up out of Assmbler and + AbstractMacroAssembler. + + * JavaScriptCore.xcodeproj/project.pbxproj: + - added new files + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::linkPointer): + - rename patchPointer to bring it in line with the current link/repatch naming scheme + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::linkCall): + (JSC::ARMv7Assembler::linkPointer): + (JSC::ARMv7Assembler::relinkCall): + (JSC::ARMv7Assembler::repatchInt32): + (JSC::ARMv7Assembler::repatchPointer): + (JSC::ARMv7Assembler::setInt32): + (JSC::ARMv7Assembler::setPointer): + - rename patchPointer to bring it in line with the current link/repatch naming scheme + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::linkJump): + (JSC::AbstractMacroAssembler::linkCall): + (JSC::AbstractMacroAssembler::linkPointer): + (JSC::AbstractMacroAssembler::getLinkerAddress): + (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset): + (JSC::AbstractMacroAssembler::repatchJump): + (JSC::AbstractMacroAssembler::repatchCall): + (JSC::AbstractMacroAssembler::repatchNearCall): + (JSC::AbstractMacroAssembler::repatchInt32): + (JSC::AbstractMacroAssembler::repatchPointer): + (JSC::AbstractMacroAssembler::repatchLoadPtrToLEA): + - remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler + + * assembler/LinkBuffer.h: Added. + (JSC::LinkBuffer::LinkBuffer): + (JSC::LinkBuffer::~LinkBuffer): + (JSC::LinkBuffer::link): + (JSC::LinkBuffer::patch): + (JSC::LinkBuffer::locationOf): + (JSC::LinkBuffer::locationOfNearCall): + (JSC::LinkBuffer::returnAddressOffset): + (JSC::LinkBuffer::finalizeCode): + (JSC::LinkBuffer::finalizeCodeAddendum): + (JSC::LinkBuffer::code): + (JSC::LinkBuffer::performFinalization): + - new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler + + * assembler/RepatchBuffer.h: Added. + (JSC::RepatchBuffer::RepatchBuffer): + (JSC::RepatchBuffer::relink): + (JSC::RepatchBuffer::repatch): + (JSC::RepatchBuffer::repatchLoadPtrToLEA): + (JSC::RepatchBuffer::relinkCallerToTrampoline): + (JSC::RepatchBuffer::relinkCallerToFunction): + (JSC::RepatchBuffer::relinkNearCallerToTrampoline): + - new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler + + * assembler/X86Assembler.h: + (JSC::X86Assembler::linkJump): + (JSC::X86Assembler::linkCall): + (JSC::X86Assembler::linkPointerForCall): + (JSC::X86Assembler::linkPointer): + (JSC::X86Assembler::relinkJump): + (JSC::X86Assembler::relinkCall): + (JSC::X86Assembler::repatchInt32): + (JSC::X86Assembler::repatchPointer): + (JSC::X86Assembler::setPointer): + (JSC::X86Assembler::setInt32): + (JSC::X86Assembler::setRel32): + - rename patchPointer to bring it in line with the current link/repatch naming scheme + + * jit/JIT.cpp: + (JSC::ctiPatchNearCallByReturnAddress): + (JSC::ctiPatchCallByReturnAddress): + - include new headers + - remove MacroAssembler:: specification from RepatchBuffer usage + + * jit/JITPropertyAccess.cpp: + * yarr/RegexJIT.cpp: + - include new headers + +2009-07-21 Robert Agoston <Agoston.Robert@stud.u-szeged.hu> + + Reviewed by David Levin. + + Fixed #undef typo. + https://bugs.webkit.org/show_bug.cgi?id=27506 + + * bytecode/Opcode.h: + +2009-07-21 Adam Roben <aroben@apple.com> + + Roll out r46153, r46154, and r46155 + + These changes were causing build failures and assertion failures on + Windows. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSArray.cpp: + * runtime/StringPrototype.cpp: + * runtime/UString.cpp: + * runtime/UString.h: + * wtf/FastMalloc.cpp: + * wtf/FastMalloc.h: + * wtf/Platform.h: + * wtf/PossiblyNull.h: Removed. + +2009-07-21 Roland Steiner <rolandsteiner@google.com> + + Reviewed by David Levin. + + Add ENABLE_RUBY to list of build options + https://bugs.webkit.org/show_bug.cgi?id=27324 + + * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY. + +2009-07-20 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + Build fix attempt #2 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-07-20 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + Build fix attempt #1 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-07-20 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Make it harder to misuse try* allocation routines + https://bugs.webkit.org/show_bug.cgi?id=27469 + + Jump through a few hoops to make it much harder to accidentally + miss null-checking of values returned by the try-* allocation + routines. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): + (JSC::JSArray::increaseVectorLength): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncLink): + * runtime/UString.cpp: + (JSC::allocChars): + (JSC::reallocChars): + (JSC::expandCapacity): + (JSC::UString::Rep::reserveCapacity): + (JSC::UString::expandPreCapacity): + (JSC::createRep): + (JSC::concatenate): + (JSC::UString::spliceSubstringsWithSeparators): + (JSC::UString::replaceRange): + (JSC::UString::append): + (JSC::UString::operator=): + * runtime/UString.h: + (JSC::UString::Rep::createEmptyBuffer): + * wtf/FastMalloc.cpp: + (WTF::tryFastZeroedMalloc): + (WTF::tryFastMalloc): + (WTF::tryFastCalloc): + (WTF::tryFastRealloc): + (WTF::TCMallocStats::tryFastMalloc): + (WTF::TCMallocStats::tryFastCalloc): + (WTF::TCMallocStats::tryFastRealloc): + * wtf/FastMalloc.h: + (WTF::TryMallocReturnValue::TryMallocReturnValue): + (WTF::TryMallocReturnValue::~TryMallocReturnValue): + (WTF::TryMallocReturnValue::operator Maybe<T>): + (WTF::TryMallocReturnValue::getValue): + * wtf/PossiblyNull.h: + (WTF::PossiblyNull::PossiblyNull): + (WTF::PossiblyNull::~PossiblyNull): + (WTF::PossiblyNull::getValue): + * wtf/Platform.h: + +2009-07-20 Gavin Barraclough <barraclough@apple.com> + + RS Oliver Hunt. + + Add ARM assembler files to xcodeproj, for convenience editing. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-07-20 Jessie Berlin <jberlin@apple.com> + + Reviewed by David Levin. + + Fix an incorrect assertion in Vector::remove. + + https://bugs.webkit.org/show_bug.cgi?id=27477 + + * wtf/Vector.h: + (WTF::::remove): + Assert that the position at which to start removing elements + the + length (the number of elements to remove) is less than or equal to the + size of the entire Vector. + +2009-07-20 Peter Kasting <pkasting@google.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=27468 + Back out r46060, which caused problems for some Apple developers. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + +2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Oliver Hunt. + + Allow custom memory allocation control in NewThreadContext + https://bugs.webkit.org/show_bug.cgi?id=27338 + + Inherits NewThreadContext struct from FastAllocBase because it + has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76. + + * wtf/Threading.cpp: + +2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Oliver Hunt. + + Allow custom memory allocation control in JavaScriptCore's JSClassRef.h + https://bugs.webkit.org/show_bug.cgi?id=27340 + + Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these + have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153 + and in JavaScriptCore/API/JSClassRef.cpp:166. + + * API/JSClassRef.h: + +2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Allow custom memory allocation control in JavaScriptCore's RegexPattern.h + https://bugs.webkit.org/show_bug.cgi?id=27343 + + Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase: + + CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144) + PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221) + PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446) + + * yarr/RegexPattern.h: + +2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Allow custom memory allocation control for JavaScriptCore's MatchFrame struct + https://bugs.webkit.org/show_bug.cgi?id=27344 + + Inherits MatchFrame struct from FastAllocBase because it has + been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359. + + * pcre/pcre_exec.cpp: + +2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Holger Freyther. + + Remove some outdated S60 platform specific code + https://bugs.webkit.org/show_bug.cgi?id=27423 + + * wtf/Platform.h: + +2009-07-20 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + + Reviewed by Simon Hausmann. + + Qt build fix with MSVC and MinGW. + + * jsc.pro: Make sure jsc is a console application, and turn off + exceptions and stl support to fix the build. + +2009-07-20 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Do not use C++-style comments in preprocessor directives. + + GCC does not like this in some configurations, using C-style + comments is safer. + + * wtf/Platform.h: + +2009-07-17 Peter Kasting <pkasting@google.com> + + Reviewed by Steve Falkenburg. + + https://bugs.webkit.org/show_bug.cgi?id=27323 + Only add Cygwin to the path when it isn't already there. This avoids + causing problems for people who purposefully have non-Cygwin versions of + executables like svn in front of the Cygwin ones in their paths. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + +2009-07-17 Gabor Loki <loki@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Add YARR support for generic ARM platforms (disabled by default). + https://bugs.webkit.org/show_bug.cgi?id=24986 + + Add generic ARM port for MacroAssembler. It supports the whole + MacroAssembler functionality except floating point. + + The class JmpSrc is extended with a flag which enables to patch + the jump destination offset during execution. This feature is + required for generic ARM port. + + Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + Signed off by Gabor Loki <loki@inf.u-szeged.hu> + + * JavaScriptCore.pri: + * assembler/ARMAssembler.cpp: Added. + (JSC::ARMAssembler::getLdrImmAddress): + (JSC::ARMAssembler::linkBranch): + (JSC::ARMAssembler::patchConstantPoolLoad): + (JSC::ARMAssembler::getOp2): + (JSC::ARMAssembler::genInt): + (JSC::ARMAssembler::getImm): + (JSC::ARMAssembler::moveImm): + (JSC::ARMAssembler::dataTransfer32): + (JSC::ARMAssembler::baseIndexTransfer32): + (JSC::ARMAssembler::executableCopy): + * assembler/ARMAssembler.h: Added. + (JSC::ARM::): + (JSC::ARMAssembler::ARMAssembler): + (JSC::ARMAssembler::): + (JSC::ARMAssembler::JmpSrc::JmpSrc): + (JSC::ARMAssembler::JmpSrc::enableLatePatch): + (JSC::ARMAssembler::JmpDst::JmpDst): + (JSC::ARMAssembler::JmpDst::isUsed): + (JSC::ARMAssembler::JmpDst::used): + (JSC::ARMAssembler::emitInst): + (JSC::ARMAssembler::and_r): + (JSC::ARMAssembler::ands_r): + (JSC::ARMAssembler::eor_r): + (JSC::ARMAssembler::eors_r): + (JSC::ARMAssembler::sub_r): + (JSC::ARMAssembler::subs_r): + (JSC::ARMAssembler::rsb_r): + (JSC::ARMAssembler::rsbs_r): + (JSC::ARMAssembler::add_r): + (JSC::ARMAssembler::adds_r): + (JSC::ARMAssembler::adc_r): + (JSC::ARMAssembler::adcs_r): + (JSC::ARMAssembler::sbc_r): + (JSC::ARMAssembler::sbcs_r): + (JSC::ARMAssembler::rsc_r): + (JSC::ARMAssembler::rscs_r): + (JSC::ARMAssembler::tst_r): + (JSC::ARMAssembler::teq_r): + (JSC::ARMAssembler::cmp_r): + (JSC::ARMAssembler::orr_r): + (JSC::ARMAssembler::orrs_r): + (JSC::ARMAssembler::mov_r): + (JSC::ARMAssembler::movs_r): + (JSC::ARMAssembler::bic_r): + (JSC::ARMAssembler::bics_r): + (JSC::ARMAssembler::mvn_r): + (JSC::ARMAssembler::mvns_r): + (JSC::ARMAssembler::mul_r): + (JSC::ARMAssembler::muls_r): + (JSC::ARMAssembler::mull_r): + (JSC::ARMAssembler::ldr_imm): + (JSC::ARMAssembler::ldr_un_imm): + (JSC::ARMAssembler::dtr_u): + (JSC::ARMAssembler::dtr_ur): + (JSC::ARMAssembler::dtr_d): + (JSC::ARMAssembler::dtr_dr): + (JSC::ARMAssembler::ldrh_r): + (JSC::ARMAssembler::ldrh_d): + (JSC::ARMAssembler::ldrh_u): + (JSC::ARMAssembler::strh_r): + (JSC::ARMAssembler::push_r): + (JSC::ARMAssembler::pop_r): + (JSC::ARMAssembler::poke_r): + (JSC::ARMAssembler::peek_r): + (JSC::ARMAssembler::clz_r): + (JSC::ARMAssembler::bkpt): + (JSC::ARMAssembler::lsl): + (JSC::ARMAssembler::lsr): + (JSC::ARMAssembler::asr): + (JSC::ARMAssembler::lsl_r): + (JSC::ARMAssembler::lsr_r): + (JSC::ARMAssembler::asr_r): + (JSC::ARMAssembler::size): + (JSC::ARMAssembler::ensureSpace): + (JSC::ARMAssembler::label): + (JSC::ARMAssembler::align): + (JSC::ARMAssembler::jmp): + (JSC::ARMAssembler::patchPointerInternal): + (JSC::ARMAssembler::patchConstantPoolLoad): + (JSC::ARMAssembler::patchPointer): + (JSC::ARMAssembler::repatchInt32): + (JSC::ARMAssembler::repatchPointer): + (JSC::ARMAssembler::repatchLoadPtrToLEA): + (JSC::ARMAssembler::linkJump): + (JSC::ARMAssembler::relinkJump): + (JSC::ARMAssembler::linkCall): + (JSC::ARMAssembler::relinkCall): + (JSC::ARMAssembler::getRelocatedAddress): + (JSC::ARMAssembler::getDifferenceBetweenLabels): + (JSC::ARMAssembler::getCallReturnOffset): + (JSC::ARMAssembler::getOp2Byte): + (JSC::ARMAssembler::placeConstantPoolBarrier): + (JSC::ARMAssembler::RM): + (JSC::ARMAssembler::RS): + (JSC::ARMAssembler::RD): + (JSC::ARMAssembler::RN): + (JSC::ARMAssembler::getConditionalField): + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::JmpSrc::enableLatePatch): + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::Call::enableLatePatch): + (JSC::AbstractMacroAssembler::Jump::enableLatePatch): + * assembler/MacroAssembler.h: + * assembler/MacroAssemblerARM.h: Added. + (JSC::MacroAssemblerARM::): + (JSC::MacroAssemblerARM::add32): + (JSC::MacroAssemblerARM::and32): + (JSC::MacroAssemblerARM::lshift32): + (JSC::MacroAssemblerARM::mul32): + (JSC::MacroAssemblerARM::not32): + (JSC::MacroAssemblerARM::or32): + (JSC::MacroAssemblerARM::rshift32): + (JSC::MacroAssemblerARM::sub32): + (JSC::MacroAssemblerARM::xor32): + (JSC::MacroAssemblerARM::load32): + (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch): + (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA): + (JSC::MacroAssemblerARM::load16): + (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch): + (JSC::MacroAssemblerARM::store32): + (JSC::MacroAssemblerARM::pop): + (JSC::MacroAssemblerARM::push): + (JSC::MacroAssemblerARM::move): + (JSC::MacroAssemblerARM::swap): + (JSC::MacroAssemblerARM::signExtend32ToPtr): + (JSC::MacroAssemblerARM::zeroExtend32ToPtr): + (JSC::MacroAssemblerARM::branch32): + (JSC::MacroAssemblerARM::branch16): + (JSC::MacroAssemblerARM::branchTest32): + (JSC::MacroAssemblerARM::jump): + (JSC::MacroAssemblerARM::branchAdd32): + (JSC::MacroAssemblerARM::mull32): + (JSC::MacroAssemblerARM::branchMul32): + (JSC::MacroAssemblerARM::branchSub32): + (JSC::MacroAssemblerARM::breakpoint): + (JSC::MacroAssemblerARM::nearCall): + (JSC::MacroAssemblerARM::call): + (JSC::MacroAssemblerARM::ret): + (JSC::MacroAssemblerARM::set32): + (JSC::MacroAssemblerARM::setTest32): + (JSC::MacroAssemblerARM::tailRecursiveCall): + (JSC::MacroAssemblerARM::makeTailRecursiveCall): + (JSC::MacroAssemblerARM::moveWithPatch): + (JSC::MacroAssemblerARM::branchPtrWithPatch): + (JSC::MacroAssemblerARM::storePtrWithPatch): + (JSC::MacroAssemblerARM::supportsFloatingPoint): + (JSC::MacroAssemblerARM::supportsFloatingPointTruncate): + (JSC::MacroAssemblerARM::loadDouble): + (JSC::MacroAssemblerARM::storeDouble): + (JSC::MacroAssemblerARM::addDouble): + (JSC::MacroAssemblerARM::subDouble): + (JSC::MacroAssemblerARM::mulDouble): + (JSC::MacroAssemblerARM::convertInt32ToDouble): + (JSC::MacroAssemblerARM::branchDouble): + (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32): + (JSC::MacroAssemblerARM::ARMCondition): + (JSC::MacroAssemblerARM::prepareCall): + (JSC::MacroAssemblerARM::call32): + * assembler/X86Assembler.h: + (JSC::X86Assembler::JmpSrc::enableLatePatch): + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + * wtf/Platform.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): + (JSC::Yarr::RegexGenerator::generateReturn): + +2009-07-17 Gabor Loki <loki@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Extend AssemblerBuffer with constant pool handling mechanism. + https://bugs.webkit.org/show_bug.cgi?id=24986 + + Add a platform independed constant pool framework. + This pool can store 32 or 64 bits values which is enough to hold + any integer, pointer or double constant. + + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::putIntUnchecked): + (JSC::AssemblerBuffer::putInt64Unchecked): + (JSC::AssemblerBuffer::append): + (JSC::AssemblerBuffer::grow): + * assembler/AssemblerBufferWithConstantPool.h: Added. + (JSC::): + +2009-07-17 Eric Roman <eroman@chromium.org> + + Reviewed by Darin Adler. + + Build fix for non-Darwin. + Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h + + https://bugs.webkit.org/show_bug.cgi?id=27382 + + * wtf/unicode/icu/CollatorICU.cpp: + +2009-07-17 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by John Sullivan. + + Get user default collation order via a CFLocale API when available. + + * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault): + +2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix the include path for the Symbian port + https://bugs.webkit.org/show_bug.cgi?id=27358 + + * JavaScriptCore.pri: + +2009-07-17 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + + Reviewed by David Levin. + + Build fix on platforms don't have MMAP. + https://bugs.webkit.org/show_bug.cgi?id=27365 + + * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP) + +2009-07-16 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by David Levin. + + Add --web-sockets flag and ENABLE_WEB_SOCKETS define. + https://bugs.webkit.org/show_bug.cgi?id=27206 + + Add ENABLE_WEB_SOCKETS + + * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Eric Seidel. + + Added Haiku-specific files for JavaScriptCore. + https://bugs.webkit.org/show_bug.cgi?id=26620 + + * wtf/haiku/MainThreadHaiku.cpp: Added. + (WTF::initializeMainThreadPlatform): + (WTF::scheduleDispatchFunctionsOnMainThread): + +2009-07-16 Gavin Barraclough <barraclough@apple.com> + + RS by Oliver Hunt. + + Revert r45969, this fix does not appear to be valid. + https://bugs.webkit.org/show_bug.cgi?id=27077 + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::~CodeBlock): + (JSC::CodeBlock::unlinkCallers): + * jit/JIT.cpp: + * jit/JIT.h: + +2009-07-16 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Oliver Hunt. + + Allow custom memory allocation control in ExceptionInfo and RareData struct + https://bugs.webkit.org/show_bug.cgi?id=27336 + + Inherits ExceptionInfo and RareData struct from FastAllocBase because these + have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and + in JavaScriptCore/bytecode/CodeBlock.h:453. + + Remove unnecessary WTF:: namespace from CodeBlock inheritance. + + * bytecode/CodeBlock.h: + +2009-07-16 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Geoff Garen. + + Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world. + + * Configurations/FeatureDefines.xcconfig: + +2009-07-16 Yong Li <yong.li@torchmobile.com> + + Reviewed by George Staikos. + + https://bugs.webkit.org/show_bug.cgi?id=27320 + _countof is only included in CE6; for CE5 we need to define it ourself + + * wtf/Platform.h: + +2009-07-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + + Reviewed by Oliver Hunt. + + Workers + garbage collector: weird crashes + https://bugs.webkit.org/show_bug.cgi?id=27077 + + We need to unlink cached method call sites when a function is destroyed. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::~CodeBlock): + (JSC::CodeBlock::unlinkCallers): + * jit/JIT.cpp: + (JSC::JIT::unlinkMethodCall): + * jit/JIT.h: + +2009-07-15 Steve Falkenburg <sfalken@apple.com> + + Windows Build fix. + + Visual Studio reset our intermediate directory on us. + This sets it back. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + +2009-07-15 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=26794 + Make Yacc-generated parsers to use fastMalloc/fastFree. + + Define YYMALLOC and YYFREE to fastMalloc and fastFree + respectively. + + * parser/Grammar.y: + +2009-07-15 Darin Adler <darin@apple.com> + + Fix a build for a particular Apple configuration. + + * wtf/FastAllocBase.h: Change include to use "" style for + including another wtf header. This is the style we use for + including other public headers in the same directory. + +2009-07-15 George Staikos <george.staikos@torchmobile.com> + + Reviewed by Adam Treat. + + https://bugs.webkit.org/show_bug.cgi?id=27303 + Implement createThreadInternal for WinCE. + Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com> + + * wtf/ThreadingWin.cpp: + (WTF::createThreadInternal): + +2009-07-15 Joe Mason <joe.mason@torchmobile.com> + + Reviewed by George Staikos. + + https://bugs.webkit.org/show_bug.cgi?id=27298 + Platform defines for WINCE. + Contains changes by Yong Li <yong.li@torchmobile.com>, + George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com> + + * wtf/Platform.h: + +2009-07-15 Yong Li <yong.li@torchmobile.com> + + Reviewed by Adam Treat. + + https://bugs.webkit.org/show_bug.cgi?id=27306 + Use RegisterClass instead of RegisterClassEx on WinCE. + + * wtf/win/MainThreadWin.cpp: + (WTF::initializeMainThreadPlatform): + +2009-07-15 Yong Li <yong.li@torchmobile.com> + + Reviewed by George Staikos. + + https://bugs.webkit.org/show_bug.cgi?id=27301 + Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported + Originally written by Yong Li <yong.li@torchmobile.com> and refactored by + Joe Mason <joe.mason@torchmobile.com> + + * wtf/Assertions.cpp: vprintf_stderr_common + +2009-07-15 Yong Li <yong.li@torchmobile.com> + + Reviewed by George Staikos. + + https://bugs.webkit.org/show_bug.cgi?id=27020 + msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false + + * wtf/DateMath.cpp: + (WTF::gregorianDateTimeToMS): + +2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Cleanup - Remove obsolete code from the make system + https://bugs.webkit.org/show_bug.cgi?id=27299 + + * JavaScriptCore.pro: + * jsc.pro: + +2009-07-07 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=27056 + + Alternate bool operator for codewarrior compiler (WINSCW). + Compiler (latest b482) reports error for UnspecifiedBoolType construct: + "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'" + + Same fix as in r38391. + + * JavaScriptCore/wtf/OwnArrayPtr.h: + +2009-07-15 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Darin Adler. + + Qualify include path with wtf to fix compilation + on Symbian. + https://bugs.webkit.org/show_bug.cgi?id=27055 + + * interpreter/Interpreter.h: + +2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Dave Kilzer. + + Turn off non-portable date manipulations for SYMBIAN + https://bugs.webkit.org/show_bug.cgi?id=27064 + + Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards + and place the rules for controlling the guards in Platform.h. + Turn off these newly introduced guards for SYMBIAN. + + * wtf/DateMath.cpp: + (WTF::calculateUTCOffset): + * wtf/DateMath.h: + (WTF::GregorianDateTime::GregorianDateTime): + (WTF::GregorianDateTime::operator tm): + * wtf/Platform.h: + +2009-07-15 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Simon Hausmann. + + Undef ASSERT on Symbian, to avoid excessive warnings + https://bugs.webkit.org/show_bug.cgi?id=27052 + + * wtf/Assertions.h: + +2009-07-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Simon Hausmann. + + REGRESSION: fast/js/postfix-syntax.html fails with interpreter + https://bugs.webkit.org/show_bug.cgi?id=27294 + + When postfix operators operating on locals assign to the same local + the order of operations has to be to store the incremented value, then + store the unmodified number. Rather than implementing this subtle + semantic in the interpreter I've just made the logic explicit in the + bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a + local var x). + + * parser/Nodes.cpp: + (JSC::emitPostIncOrDec): + +2009-07-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Simon Hausmann. + + REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter + https://bugs.webkit.org/show_bug.cgi?id=27259 + + The interpreter was incorrectly basing its need to create the arguments object + based on the presence of the callframe's argument reference rather than the local + arguments reference. Based on this it then overrode the local variable reference. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2009-07-14 Steve Falkenburg <sfalken@apple.com> + + Reorganize JavaScriptCore headers into: + API: include/JavaScriptCore/ + Private: include/private/JavaScriptCore/ + + Reviewed by Darin Adler. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + +2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Change JSCell's superclass to NoncopyableCustomAllocated + https://bugs.webkit.org/show_bug.cgi?id=27248 + + JSCell class customizes operator new, since Noncopyable will be + inherited from FastAllocBase, NoncopyableCustomAllocated has + to be used. + + * runtime/JSCell.h: + +2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Change all Noncopyable inheriting visibility to public. + https://bugs.webkit.org/show_bug.cgi?id=27225 + + Change all Noncopyable inheriting visibility to public because + it is needed to the custom allocation framework (bug #20422). + + * bytecode/SamplingTool.h: + * bytecompiler/RegisterID.h: + * interpreter/CachedCall.h: + * interpreter/RegisterFile.h: + * parser/Lexer.h: + * parser/Parser.h: + * runtime/ArgList.h: + * runtime/BatchedTransitionOptimizer.h: + * runtime/Collector.h: + * runtime/CommonIdentifiers.h: + * runtime/JSCell.h: + * runtime/JSGlobalObject.h: + * runtime/JSLock.h: + * runtime/JSONObject.cpp: + * runtime/SmallStrings.cpp: + * runtime/SmallStrings.h: + * wtf/CrossThreadRefCounted.h: + * wtf/GOwnPtr.h: + * wtf/Locker.h: + * wtf/MessageQueue.h: + * wtf/OwnArrayPtr.h: + * wtf/OwnFastMallocPtr.h: + * wtf/OwnPtr.h: + * wtf/RefCounted.h: + * wtf/ThreadSpecific.h: + * wtf/Threading.h: + * wtf/Vector.h: + * wtf/unicode/Collator.h: + +2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated + https://bugs.webkit.org/show_bug.cgi?id=27249 + + ParserArenaDeletable customizes operator new, to avoid double inheritance + ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated. + + * parser/Nodes.h: + +2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Add RefCountedCustomAllocated to RefCounted.h + https://bugs.webkit.org/show_bug.cgi?id=27232 + + Some class which are inherited from RefCounted customize + operator new, but RefCounted is inherited from Noncopyable + which will be inherited from FastAllocBase. To avoid + conflicts Noncopyable inheriting was moved down to RefCounted + and to avoid double inheritance this class has been added. + + * wtf/RefCounted.h: + (WTF::RefCountedCustomAllocated::deref): + (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated): + +2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Add NoncopyableCustomAllocated to Noncopyable.h. + https://bugs.webkit.org/show_bug.cgi?id=27228 + + Some classes which inherited from Noncopyable overrides operator new + since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h + needs to be extended with this new class to support the overriding. + + * wtf/Noncopyable.h: + (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated): + (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated): + +2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Allow custom memory allocation control for JavaScriptCore's IdentifierTable class + https://bugs.webkit.org/show_bug.cgi?id=27260 + + Inherits IdentifierTable class from FastAllocBase because it has been + instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70. + + * runtime/Identifier.cpp: + +2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Allow custom memory allocation control for JavaScriptCore's Profiler class + https://bugs.webkit.org/show_bug.cgi?id=27253 + + Inherits Profiler class from FastAllocBase because it has been instantiated by + 'new' in JavaScriptCore/profiler/Profiler.cpp:56. + + * profiler/Profiler.h: + +2009-07-06 George Staikos <george.staikos@torchmobile.com> + + Reviewed by Adam Treat. + + Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura + + https://bugs.webkit.org/show_bug.cgi?id=27030 + Implement custom RNG for WinCE using Mersenne Twister + + * wtf/RandomNumber.cpp: + (WTF::randomNumber): + * wtf/RandomNumberSeed.h: + (WTF::initializeRandomNumberGenerator): + * wtf/wince/mt19937ar.c: Added. + (init_genrand): + (init_by_array): + (genrand_int32): + (genrand_int31): + (genrand_real1): + (genrand_real2): + (genrand_real3): + (genrand_res53): + 2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Unreviewed make dist build fix. diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri index dbc467d2b0..b43602ea44 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri @@ -9,24 +9,26 @@ CONFIG(debug, debug|release) { OBJECTS_DIR = obj/release } -INCLUDEPATH += $$GENERATED_SOURCES_DIR \ - $$PWD \ - $$PWD/parser \ - $$PWD/bytecompiler \ - $$PWD/debugger \ - $$PWD/runtime \ - $$PWD/wtf \ - $$PWD/wtf/unicode \ - $$PWD/interpreter \ - $$PWD/jit \ - $$PWD/profiler \ - $$PWD/wrec \ - $$PWD/yarr \ - $$PWD/API \ - $$PWD/.. \ - $$PWD/ForwardingHeaders \ - $$PWD/bytecode \ - $$PWD/assembler \ +INCLUDEPATH = \ + $$PWD \ + $$PWD/.. \ + $$PWD/assembler \ + $$PWD/bytecode \ + $$PWD/bytecompiler \ + $$PWD/debugger \ + $$PWD/interpreter \ + $$PWD/jit \ + $$PWD/parser \ + $$PWD/profiler \ + $$PWD/runtime \ + $$PWD/wrec \ + $$PWD/wtf \ + $$PWD/wtf/unicode \ + $$PWD/yarr \ + $$PWD/API \ + $$PWD/ForwardingHeaders \ + $$GENERATED_SOURCES_DIR \ + $$INCLUDEPATH DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF @@ -35,34 +37,17 @@ win32-* { LIBS += -lwinmm } -# Default rules to turn JIT on/off -!contains(DEFINES, ENABLE_JIT=.) { - isEqual(QT_ARCH,i386)|isEqual(QT_ARCH,windows) { - # Require gcc >= 4.1 - CONFIG(release):linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { - DEFINES += ENABLE_JIT=1 - } - win32-msvc* { - DEFINES += ENABLE_JIT=1 - } - } +# In debug mode JIT disabled until crash fixed +win32-* { + CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0 } -# Rules when JIT enabled -contains(DEFINES, ENABLE_JIT=1) { - !contains(DEFINES, ENABLE_YARR=.): DEFINES += ENABLE_YARR=1 - !contains(DEFINES, ENABLE_YARR_JIT=.): DEFINES += ENABLE_YARR_JIT=1 - !contains(DEFINES, ENABLE_JIT_OPTIMIZE_CALL=.): DEFINES += ENABLE_JIT_OPTIMIZE_CALL=1 - !contains(DEFINES, ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=.): DEFINES += ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=1 - !contains(DEFINES, ENABLE_JIT_OPTIMIZE_ARITHMETIC=.): DEFINES += ENABLE_JIT_OPTIMIZE_ARITHMETIC=1 - linux-g++* { - !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=1 +# Rules when JIT enabled (not disabled) +!contains(DEFINES, ENABLE_JIT=0) { + linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { QMAKE_CXXFLAGS += -fno-stack-protector QMAKE_CFLAGS += -fno-stack-protector } - win32-msvc* { - !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_REGISTER=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_REGISTER=1 - } } win32-msvc*: INCLUDEPATH += $$PWD/os-win32 @@ -124,6 +109,7 @@ SOURCES += \ bytecode/CodeBlock.cpp \ bytecode/StructureStubInfo.cpp \ bytecode/JumpTable.cpp \ + assembler/ARMAssembler.cpp \ jit/JIT.cpp \ jit/JITCall.cpp \ jit/JITArithmetic.cpp \ diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro index 28f0e6bc45..f881c05607 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro @@ -33,8 +33,6 @@ INCLUDEPATH += $$GENERATED_SOURCES_DIR } } -include($$OUTPUT_DIR/config.pri) - CONFIG -= warn_on *-g++*:QMAKE_CXXFLAGS += -Wreturn-type -fno-strict-aliasing #QMAKE_CXXFLAGS += -Wall -Wno-undef -Wno-unused-parameter diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp new file mode 100644 index 0000000000..dafc482f91 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp @@ -0,0 +1,353 @@ +/* + * Copyright (C) 2009 University of Szeged + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if ENABLE(ASSEMBLER) && PLATFORM(ARM) + +#include "ARMAssembler.h" + +namespace JSC { + +// Patching helpers + +ARMWord* ARMAssembler::getLdrImmAddress(ARMWord* insn, uint32_t* constPool) +{ + // Must be an ldr ..., [pc +/- imm] + ASSERT((*insn & 0x0f7f0000) == 0x051f0000); + + if (constPool && (*insn & 0x1)) + return reinterpret_cast<ARMWord*>(constPool + ((*insn & SDT_OFFSET_MASK) >> 1)); + + ARMWord addr = reinterpret_cast<ARMWord>(insn) + 2 * sizeof(ARMWord); + if (*insn & DT_UP) + return reinterpret_cast<ARMWord*>(addr + (*insn & SDT_OFFSET_MASK)); + else + return reinterpret_cast<ARMWord*>(addr - (*insn & SDT_OFFSET_MASK)); +} + +void ARMAssembler::linkBranch(void* code, JmpSrc from, void* to) +{ + ARMWord* insn = reinterpret_cast<ARMWord*>(code) + (from.m_offset / sizeof(ARMWord)); + + if (!from.m_latePatch) { + int diff = reinterpret_cast<ARMWord*>(to) - reinterpret_cast<ARMWord*>(insn + 2); + + if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) { + *insn = B | getConditionalField(*insn) | (diff & BRANCH_MASK); + ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); + return; + } + } + ARMWord* addr = getLdrImmAddress(insn); + *addr = reinterpret_cast<ARMWord>(to); + ExecutableAllocator::cacheFlush(addr, sizeof(ARMWord)); +} + +void ARMAssembler::patchConstantPoolLoad(void* loadAddr, void* constPoolAddr) +{ + ARMWord *ldr = reinterpret_cast<ARMWord*>(loadAddr); + ARMWord diff = reinterpret_cast<ARMWord*>(constPoolAddr) - ldr; + ARMWord index = (*ldr & 0xfff) >> 1; + + ASSERT(diff >= 1); + if (diff >= 2 || index > 0) { + diff = (diff + index - 2) * sizeof(ARMWord); + ASSERT(diff <= 0xfff); + *ldr = (*ldr & ~0xfff) | diff; + } else + *ldr = (*ldr & ~(0xfff | ARMAssembler::DT_UP)) | sizeof(ARMWord); +} + +// Handle immediates + +ARMWord ARMAssembler::getOp2(ARMWord imm) +{ + int rol; + + if (imm <= 0xff) + return OP2_IMM | imm; + + if ((imm & 0xff000000) == 0) { + imm <<= 8; + rol = 8; + } + else { + imm = (imm << 24) | (imm >> 8); + rol = 0; + } + + if ((imm & 0xff000000) == 0) { + imm <<= 8; + rol += 4; + } + + if ((imm & 0xf0000000) == 0) { + imm <<= 4; + rol += 2; + } + + if ((imm & 0xc0000000) == 0) { + imm <<= 2; + rol += 1; + } + + if ((imm & 0x00ffffff) == 0) + return OP2_IMM | (imm >> 24) | (rol << 8); + + return 0; +} + +int ARMAssembler::genInt(int reg, ARMWord imm, bool positive) +{ + // Step1: Search a non-immediate part + ARMWord mask; + ARMWord imm1; + ARMWord imm2; + int rol; + + mask = 0xff000000; + rol = 8; + while(1) { + if ((imm & mask) == 0) { + imm = (imm << rol) | (imm >> (32 - rol)); + rol = 4 + (rol >> 1); + break; + } + rol += 2; + mask >>= 2; + if (mask & 0x3) { + // rol 8 + imm = (imm << 8) | (imm >> 24); + mask = 0xff00; + rol = 24; + while (1) { + if ((imm & mask) == 0) { + imm = (imm << rol) | (imm >> (32 - rol)); + rol = (rol >> 1) - 8; + break; + } + rol += 2; + mask >>= 2; + if (mask & 0x3) + return 0; + } + break; + } + } + + ASSERT((imm & 0xff) == 0); + + if ((imm & 0xff000000) == 0) { + imm1 = OP2_IMM | ((imm >> 16) & 0xff) | (((rol + 4) & 0xf) << 8); + imm2 = OP2_IMM | ((imm >> 8) & 0xff) | (((rol + 8) & 0xf) << 8); + } else if (imm & 0xc0000000) { + imm1 = OP2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8); + imm <<= 8; + rol += 4; + + if ((imm & 0xff000000) == 0) { + imm <<= 8; + rol += 4; + } + + if ((imm & 0xf0000000) == 0) { + imm <<= 4; + rol += 2; + } + + if ((imm & 0xc0000000) == 0) { + imm <<= 2; + rol += 1; + } + + if ((imm & 0x00ffffff) == 0) + imm2 = OP2_IMM | (imm >> 24) | ((rol & 0xf) << 8); + else + return 0; + } else { + if ((imm & 0xf0000000) == 0) { + imm <<= 4; + rol += 2; + } + + if ((imm & 0xc0000000) == 0) { + imm <<= 2; + rol += 1; + } + + imm1 = OP2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8); + imm <<= 8; + rol += 4; + + if ((imm & 0xf0000000) == 0) { + imm <<= 4; + rol += 2; + } + + if ((imm & 0xc0000000) == 0) { + imm <<= 2; + rol += 1; + } + + if ((imm & 0x00ffffff) == 0) + imm2 = OP2_IMM | (imm >> 24) | ((rol & 0xf) << 8); + else + return 0; + } + + if (positive) { + mov_r(reg, imm1); + orr_r(reg, reg, imm2); + } else { + mvn_r(reg, imm1); + bic_r(reg, reg, imm2); + } + + return 1; +} + +ARMWord ARMAssembler::getImm(ARMWord imm, int tmpReg, bool invert) +{ + ARMWord tmp; + + // Do it by 1 instruction + tmp = getOp2(imm); + if (tmp) + return tmp; + + tmp = getOp2(~imm); + if (tmp) { + if (invert) + return tmp | OP2_INV_IMM; + mvn_r(tmpReg, tmp); + return tmpReg; + } + + // Do it by 2 instruction + if (genInt(tmpReg, imm, true)) + return tmpReg; + if (genInt(tmpReg, ~imm, false)) + return tmpReg; + + ldr_imm(tmpReg, imm); + return tmpReg; +} + +void ARMAssembler::moveImm(ARMWord imm, int dest) +{ + ARMWord tmp; + + // Do it by 1 instruction + tmp = getOp2(imm); + if (tmp) { + mov_r(dest, tmp); + return; + } + + tmp = getOp2(~imm); + if (tmp) { + mvn_r(dest, tmp); + return; + } + + // Do it by 2 instruction + if (genInt(dest, imm, true)) + return; + if (genInt(dest, ~imm, false)) + return; + + ldr_imm(dest, imm); +} + +// Memory load/store helpers + +void ARMAssembler::dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset) +{ + if (offset >= 0) { + if (offset <= 0xfff) + dtr_u(isLoad, srcDst, base, offset); + else if (offset <= 0xfffff) { + add_r(ARM::S0, base, OP2_IMM | (offset >> 12) | (10 << 8)); + dtr_u(isLoad, srcDst, ARM::S0, offset & 0xfff); + } else { + ARMWord reg = getImm(offset, ARM::S0); + dtr_ur(isLoad, srcDst, base, reg); + } + } else { + offset = -offset; + if (offset <= 0xfff) + dtr_d(isLoad, srcDst, base, offset); + else if (offset <= 0xfffff) { + sub_r(ARM::S0, base, OP2_IMM | (offset >> 12) | (10 << 8)); + dtr_d(isLoad, srcDst, ARM::S0, offset & 0xfff); + } else { + ARMWord reg = getImm(offset, ARM::S0); + dtr_dr(isLoad, srcDst, base, reg); + } + } +} + +void ARMAssembler::baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset) +{ + ARMWord op2; + + ASSERT(scale >= 0 && scale <= 3); + op2 = lsl(index, scale); + + if (offset >= 0 && offset <= 0xfff) { + add_r(ARM::S0, base, op2); + dtr_u(isLoad, srcDst, ARM::S0, offset); + return; + } + if (offset <= 0 && offset >= -0xfff) { + add_r(ARM::S0, base, op2); + dtr_d(isLoad, srcDst, ARM::S0, -offset); + return; + } + + moveImm(offset, ARM::S0); + add_r(ARM::S0, ARM::S0, op2); + dtr_ur(isLoad, srcDst, base, ARM::S0); +} + +void* ARMAssembler::executableCopy(ExecutablePool* allocator) +{ + char* data = reinterpret_cast<char*>(m_buffer.executableCopy(allocator)); + + for (Jumps::Iterator iter = m_jumps.begin(); iter != m_jumps.end(); ++iter) { + ARMWord* ldrAddr = reinterpret_cast<ARMWord*>(data + *iter); + ARMWord* offset = getLdrImmAddress(ldrAddr); + if (*offset != 0xffffffff) + linkBranch(data, JmpSrc(*iter), data + *offset); + } + + return data; +} + +} // namespace JSC + +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h new file mode 100644 index 0000000000..d6bb43ea28 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h @@ -0,0 +1,706 @@ +/* + * Copyright (C) 2009 University of Szeged + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ARMAssembler_h +#define ARMAssembler_h + +#include <wtf/Platform.h> + +#if ENABLE(ASSEMBLER) && PLATFORM(ARM) + +#include "AssemblerBufferWithConstantPool.h" +#include <wtf/Assertions.h> +namespace JSC { + +typedef uint32_t ARMWord; + +namespace ARM { + typedef enum { + r0 = 0, + r1, + r2, + r3, + S0 = r3, + r4, + r5, + r6, + r7, + r8, + S1 = r8, + r9, + r10, + r11, + r12, + r13, + sp = r13, + r14, + lr = r14, + r15, + pc = r15 + } RegisterID; + + typedef enum { + fp0 //FIXME + } FPRegisterID; +} // namespace ARM + + class ARMAssembler { + public: + typedef ARM::RegisterID RegisterID; + typedef ARM::FPRegisterID FPRegisterID; + typedef AssemblerBufferWithConstantPool<2048, 4, 4, ARMAssembler> ARMBuffer; + typedef WTF::SegmentedVector<int, 64> Jumps; + + ARMAssembler() { } + + // ARM conditional constants + typedef enum { + EQ = 0x00000000, // Zero + NE = 0x10000000, // Non-zero + CS = 0x20000000, + CC = 0x30000000, + MI = 0x40000000, + PL = 0x50000000, + VS = 0x60000000, + VC = 0x70000000, + HI = 0x80000000, + LS = 0x90000000, + GE = 0xa0000000, + LT = 0xb0000000, + GT = 0xc0000000, + LE = 0xd0000000, + AL = 0xe0000000 + } Condition; + + // ARM instruction constants + enum { + AND = (0x0 << 21), + EOR = (0x1 << 21), + SUB = (0x2 << 21), + RSB = (0x3 << 21), + ADD = (0x4 << 21), + ADC = (0x5 << 21), + SBC = (0x6 << 21), + RSC = (0x7 << 21), + TST = (0x8 << 21), + TEQ = (0x9 << 21), + CMP = (0xa << 21), + CMN = (0xb << 21), + ORR = (0xc << 21), + MOV = (0xd << 21), + BIC = (0xe << 21), + MVN = (0xf << 21), + MUL = 0x00000090, + MULL = 0x00c00090, + DTR = 0x05000000, + LDRH = 0x00100090, + STRH = 0x00000090, + STMDB = 0x09200000, + LDMIA = 0x08b00000, + B = 0x0a000000, + BL = 0x0b000000, +#if ARM_ARCH_VERSION >= 5 + CLZ = 0x016f0f10, + BKPT = 0xe120070, +#endif + }; + + enum { + OP2_IMM = (1 << 25), + OP2_IMMh = (1 << 22), + OP2_INV_IMM = (1 << 26), + SET_CC = (1 << 20), + OP2_OFSREG = (1 << 25), + DT_UP = (1 << 23), + DT_WB = (1 << 21), + // This flag is inlcuded in LDR and STR + DT_PRE = (1 << 24), + HDT_UH = (1 << 5), + DT_LOAD = (1 << 20), + }; + + // Masks of ARM instructions + enum { + BRANCH_MASK = 0x00ffffff, + NONARM = 0xf0000000, + SDT_MASK = 0x0c000000, + SDT_OFFSET_MASK = 0xfff, + }; + + enum { + BOFFSET_MIN = -0x00800000, + BOFFSET_MAX = 0x007fffff, + SDT = 0x04000000, + }; + + enum { + padForAlign8 = 0x00, + padForAlign16 = 0x0000, + padForAlign32 = 0xee120070, + }; + + class JmpSrc { + friend class ARMAssembler; + public: + JmpSrc() + : m_offset(-1) + , m_latePatch(false) + { + } + + void enableLatePatch() { m_latePatch = true; } + private: + JmpSrc(int offset) + : m_offset(offset) + , m_latePatch(false) + { + } + + int m_offset : 31; + int m_latePatch : 1; + }; + + class JmpDst { + friend class ARMAssembler; + public: + JmpDst() + : m_offset(-1) + , m_used(false) + { + } + + bool isUsed() const { return m_used; } + void used() { m_used = true; } + private: + JmpDst(int offset) + : m_offset(offset) + , m_used(false) + { + ASSERT(m_offset == offset); + } + + int m_offset : 31; + int m_used : 1; + }; + + // Instruction formating + + void emitInst(ARMWord op, int rd, int rn, ARMWord op2) + { + ASSERT ( ((op2 & ~OP2_IMM) <= 0xfff) || (((op2 & ~OP2_IMMh) <= 0xfff)) ); + m_buffer.putInt(op | RN(rn) | RD(rd) | op2); + } + + void and_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | AND, rd, rn, op2); + } + + void ands_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | AND | SET_CC, rd, rn, op2); + } + + void eor_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | EOR, rd, rn, op2); + } + + void eors_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | EOR | SET_CC, rd, rn, op2); + } + + void sub_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | SUB, rd, rn, op2); + } + + void subs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | SUB | SET_CC, rd, rn, op2); + } + + void rsb_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | RSB, rd, rn, op2); + } + + void rsbs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | RSB | SET_CC, rd, rn, op2); + } + + void add_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | ADD, rd, rn, op2); + } + + void adds_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | ADD | SET_CC, rd, rn, op2); + } + + void adc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | ADC, rd, rn, op2); + } + + void adcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | ADC | SET_CC, rd, rn, op2); + } + + void sbc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | SBC, rd, rn, op2); + } + + void sbcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | SBC | SET_CC, rd, rn, op2); + } + + void rsc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | RSC, rd, rn, op2); + } + + void rscs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | RSC | SET_CC, rd, rn, op2); + } + + void tst_r(int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | TST | SET_CC, 0, rn, op2); + } + + void teq_r(int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | TEQ | SET_CC, 0, rn, op2); + } + + void cmp_r(int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | CMP | SET_CC, 0, rn, op2); + } + + void orr_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | ORR, rd, rn, op2); + } + + void orrs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | ORR | SET_CC, rd, rn, op2); + } + + void mov_r(int rd, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | MOV, rd, ARM::r0, op2); + } + + void movs_r(int rd, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | MOV | SET_CC, rd, ARM::r0, op2); + } + + void bic_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | BIC, rd, rn, op2); + } + + void bics_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | BIC | SET_CC, rd, rn, op2); + } + + void mvn_r(int rd, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | MVN, rd, ARM::r0, op2); + } + + void mvns_r(int rd, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | MVN | SET_CC, rd, ARM::r0, op2); + } + + void mul_r(int rd, int rn, int rm, Condition cc = AL) + { + m_buffer.putInt(static_cast<ARMWord>(cc) | MUL | RN(rd) | RS(rn) | RM(rm)); + } + + void muls_r(int rd, int rn, int rm, Condition cc = AL) + { + m_buffer.putInt(static_cast<ARMWord>(cc) | MUL | SET_CC | RN(rd) | RS(rn) | RM(rm)); + } + + void mull_r(int rdhi, int rdlo, int rn, int rm, Condition cc = AL) + { + m_buffer.putInt(static_cast<ARMWord>(cc) | MULL | RN(rdhi) | RD(rdlo) | RS(rn) | RM(rm)); + } + + void ldr_imm(int rd, ARMWord imm, Condition cc = AL) + { + m_buffer.putIntWithConstantInt(static_cast<ARMWord>(cc) | DTR | DT_LOAD | DT_UP | RN(ARM::pc) | RD(rd), imm, true); + } + + void ldr_un_imm(int rd, ARMWord imm, Condition cc = AL) + { + m_buffer.putIntWithConstantInt(static_cast<ARMWord>(cc) | DTR | DT_LOAD | DT_UP | RN(ARM::pc) | RD(rd), imm); + } + + void dtr_u(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, op2); + } + + void dtr_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm); + } + + void dtr_d(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | DTR | (isLoad ? DT_LOAD : 0), rd, rb, op2); + } + + void dtr_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | DTR | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm); + } + + void ldrh_r(int rd, int rn, int rm, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rn, rm); + } + + void ldrh_d(int rd, int rb, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | LDRH | HDT_UH | DT_PRE, rd, rb, op2); + } + + void ldrh_u(int rd, int rb, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, op2); + } + + void strh_r(int rn, int rm, int rd, Condition cc = AL) + { + emitInst(static_cast<ARMWord>(cc) | STRH | HDT_UH | DT_UP | DT_PRE, rd, rn, rm); + } + + void push_r(int reg, Condition cc = AL) + { + ASSERT(ARMWord(reg) <= 0xf); + m_buffer.putInt(cc | DTR | DT_WB | RN(ARM::sp) | RD(reg) | 0x4); + } + + void pop_r(int reg, Condition cc = AL) + { + ASSERT(ARMWord(reg) <= 0xf); + m_buffer.putInt(cc | (DTR ^ DT_PRE) | DT_LOAD | DT_UP | RN(ARM::sp) | RD(reg) | 0x4); + } + + inline void poke_r(int reg, Condition cc = AL) + { + dtr_d(false, ARM::sp, 0, reg, cc); + } + + inline void peek_r(int reg, Condition cc = AL) + { + dtr_u(true, reg, ARM::sp, 0, cc); + } + +#if ARM_ARCH_VERSION >= 5 + void clz_r(int rd, int rm, Condition cc = AL) + { + m_buffer.putInt(static_cast<ARMWord>(cc) | CLZ | RD(rd) | RM(rm)); + } +#endif + + void bkpt(ARMWord value) + { +#if ARM_ARCH_VERSION >= 5 + m_buffer.putInt(BKPT | ((value & 0xff0) << 4) | (value & 0xf)); +#else + // Cannot access to Zero memory address + dtr_dr(true, ARM::S0, ARM::S0, ARM::S0); +#endif + } + + static ARMWord lsl(int reg, ARMWord value) + { + ASSERT(reg <= ARM::pc); + ASSERT(value <= 0x1f); + return reg | (value << 7) | 0x00; + } + + static ARMWord lsr(int reg, ARMWord value) + { + ASSERT(reg <= ARM::pc); + ASSERT(value <= 0x1f); + return reg | (value << 7) | 0x20; + } + + static ARMWord asr(int reg, ARMWord value) + { + ASSERT(reg <= ARM::pc); + ASSERT(value <= 0x1f); + return reg | (value << 7) | 0x40; + } + + static ARMWord lsl_r(int reg, int shiftReg) + { + ASSERT(reg <= ARM::pc); + ASSERT(shiftReg <= ARM::pc); + return reg | (shiftReg << 8) | 0x10; + } + + static ARMWord lsr_r(int reg, int shiftReg) + { + ASSERT(reg <= ARM::pc); + ASSERT(shiftReg <= ARM::pc); + return reg | (shiftReg << 8) | 0x30; + } + + static ARMWord asr_r(int reg, int shiftReg) + { + ASSERT(reg <= ARM::pc); + ASSERT(shiftReg <= ARM::pc); + return reg | (shiftReg << 8) | 0x50; + } + + // General helpers + + int size() + { + return m_buffer.size(); + } + + void ensureSpace(int insnSpace, int constSpace) + { + m_buffer.ensureSpace(insnSpace, constSpace); + } + + JmpDst label() + { + return JmpDst(m_buffer.size()); + } + + JmpDst align(int alignment) + { + while (!m_buffer.isAligned(alignment)) + mov_r(ARM::r0, ARM::r0); + + return label(); + } + + JmpSrc jmp(Condition cc = AL) + { + int s = size(); + ldr_un_imm(ARM::pc, 0xffffffff, cc); + m_jumps.append(s); + return JmpSrc(s); + } + + void* executableCopy(ExecutablePool* allocator); + + // Patching helpers + + static ARMWord* getLdrImmAddress(ARMWord* insn, uint32_t* constPool = 0); + static void linkBranch(void* code, JmpSrc from, void* to); + + static void patchPointerInternal(intptr_t from, void* to) + { + ARMWord* insn = reinterpret_cast<ARMWord*>(from); + ARMWord* addr = getLdrImmAddress(insn); + *addr = reinterpret_cast<ARMWord>(to); + ExecutableAllocator::cacheFlush(addr, sizeof(ARMWord)); + } + + static ARMWord patchConstantPoolLoad(ARMWord load, ARMWord value) + { + value = (value << 1) + 1; + ASSERT(!(value & ~0xfff)); + return (load & ~0xfff) | value; + } + + static void patchConstantPoolLoad(void* loadAddr, void* constPoolAddr); + + // Patch pointers + + static void linkPointer(void* code, JmpDst from, void* to) + { + patchPointerInternal(reinterpret_cast<intptr_t>(code) + from.m_offset, to); + } + + static void repatchInt32(void* from, int32_t to) + { + patchPointerInternal(reinterpret_cast<intptr_t>(from), reinterpret_cast<void*>(to)); + } + + static void repatchPointer(void* from, void* to) + { + patchPointerInternal(reinterpret_cast<intptr_t>(from), to); + } + + static void repatchLoadPtrToLEA(void* from) + { + // On arm, this is a patch from LDR to ADD. It is restricted conversion, + // from special case to special case, altough enough for its purpose + ARMWord* insn = reinterpret_cast<ARMWord*>(from); + ASSERT((*insn & 0x0ff00f00) == 0x05900000); + + *insn = (*insn & 0xf00ff0ff) | 0x02800000; + ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); + } + + // Linkers + + void linkJump(JmpSrc from, JmpDst to) + { + ARMWord* insn = reinterpret_cast<ARMWord*>(m_buffer.data()) + (from.m_offset / sizeof(ARMWord)); + *getLdrImmAddress(insn, m_buffer.poolAddress()) = static_cast<ARMWord>(to.m_offset); + } + + static void linkJump(void* code, JmpSrc from, void* to) + { + linkBranch(code, from, to); + } + + static void relinkJump(void* from, void* to) + { + patchPointerInternal(reinterpret_cast<intptr_t>(from) - sizeof(ARMWord), to); + } + + static void linkCall(void* code, JmpSrc from, void* to) + { + linkBranch(code, from, to); + } + + static void relinkCall(void* from, void* to) + { + relinkJump(from, to); + } + + // Address operations + + static void* getRelocatedAddress(void* code, JmpSrc jump) + { + return reinterpret_cast<void*>(reinterpret_cast<ARMWord*>(code) + jump.m_offset / sizeof(ARMWord) + 1); + } + + static void* getRelocatedAddress(void* code, JmpDst label) + { + return reinterpret_cast<void*>(reinterpret_cast<ARMWord*>(code) + label.m_offset / sizeof(ARMWord)); + } + + // Address differences + + static int getDifferenceBetweenLabels(JmpDst from, JmpSrc to) + { + return (to.m_offset + sizeof(ARMWord)) - from.m_offset; + } + + static int getDifferenceBetweenLabels(JmpDst from, JmpDst to) + { + return to.m_offset - from.m_offset; + } + + static unsigned getCallReturnOffset(JmpSrc call) + { + return call.m_offset + sizeof(ARMWord); + } + + // Handle immediates + + static ARMWord getOp2Byte(ARMWord imm) + { + ASSERT(imm <= 0xff); + return OP2_IMMh | (imm & 0x0f) | ((imm & 0xf0) << 4) ; + } + + static ARMWord getOp2(ARMWord imm); + ARMWord getImm(ARMWord imm, int tmpReg, bool invert = false); + void moveImm(ARMWord imm, int dest); + + // Memory load/store helpers + + void dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset); + void baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + + // Constant pool hnadlers + + static ARMWord placeConstantPoolBarrier(int offset) + { + offset = (offset - sizeof(ARMWord)) >> 2; + ASSERT((offset <= BOFFSET_MAX && offset >= BOFFSET_MIN)); + return AL | B | (offset & BRANCH_MASK); + } + + private: + ARMWord RM(int reg) + { + ASSERT(reg <= ARM::pc); + return reg; + } + + ARMWord RS(int reg) + { + ASSERT(reg <= ARM::pc); + return reg << 8; + } + + ARMWord RD(int reg) + { + ASSERT(reg <= ARM::pc); + return reg << 12; + } + + ARMWord RN(int reg) + { + ASSERT(reg <= ARM::pc); + return reg << 16; + } + + static ARMWord getConditionalField(ARMWord i) + { + return i & 0xf0000000; + } + + int genInt(int reg, ARMWord imm, bool positive); + + ARMBuffer m_buffer; + Jumps m_jumps; + }; + +} // namespace JSC + +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM) + +#endif // ARMAssembler_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h index 9745d6d57e..f7e2fb4767 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h @@ -442,6 +442,7 @@ public: { } + void enableLatePatch() { } private: JmpSrc(int offset) : m_offset(offset) @@ -1528,51 +1529,51 @@ public: ASSERT(from.m_offset != -1); ASSERT(reinterpret_cast<intptr_t>(to) & 1); - patchPointer(reinterpret_cast<uint16_t*>(reinterpret_cast<intptr_t>(code) + from.m_offset) - 1, to); + setPointer(reinterpret_cast<uint16_t*>(reinterpret_cast<intptr_t>(code) + from.m_offset) - 1, to); } - static void patchPointer(void* code, JmpDst where, void* value) + static void linkPointer(void* code, JmpDst where, void* value) { - patchPointer(reinterpret_cast<char*>(code) + where.m_offset, value); + setPointer(reinterpret_cast<char*>(code) + where.m_offset, value); } static void relinkJump(void* from, void* to) { - ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(from) - 2, 2 * sizeof(uint16_t)); - ASSERT(!(reinterpret_cast<intptr_t>(from) & 1)); ASSERT(!(reinterpret_cast<intptr_t>(to) & 1)); intptr_t relative = reinterpret_cast<intptr_t>(to) - reinterpret_cast<intptr_t>(from); linkWithOffset(reinterpret_cast<uint16_t*>(from), relative); + + ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(from) - 2, 2 * sizeof(uint16_t)); } static void relinkCall(void* from, void* to) { - ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(from) - 5, 4 * sizeof(uint16_t)); - ASSERT(!(reinterpret_cast<intptr_t>(from) & 1)); ASSERT(reinterpret_cast<intptr_t>(to) & 1); - patchPointer(reinterpret_cast<uint16_t*>(from) - 1, to); + setPointer(reinterpret_cast<uint16_t*>(from) - 1, to); + + ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(from) - 5, 4 * sizeof(uint16_t)); } static void repatchInt32(void* where, int32_t value) { - ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t)); - ASSERT(!(reinterpret_cast<intptr_t>(where) & 1)); - patchInt32(where, value); + setInt32(where, value); + + ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t)); } static void repatchPointer(void* where, void* value) { - ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t)); - ASSERT(!(reinterpret_cast<intptr_t>(where) & 1)); - patchPointer(where, value); + setPointer(where, value); + + ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t)); } static void repatchLoadPtrToLEA(void* where) @@ -1582,8 +1583,8 @@ public: uint16_t* loadOp = reinterpret_cast<uint16_t*>(where) + 4; ASSERT((*loadOp & 0xfff0) == OP_LDR_reg_T2); - ExecutableAllocator::MakeWritable unprotect(loadOp, sizeof(uint16_t)); *loadOp = OP_ADD_reg_T3 | (*loadOp & 0xf); + ExecutableAllocator::cacheFlush(loadOp, sizeof(uint16_t)); } private: @@ -1610,12 +1611,10 @@ private: m_formatter.vfpOp(0x0b00ed00 | offset | (up << 7) | (isLoad << 4) | doubleRegisterMask(rd, 6, 28) | rn); } - static void patchInt32(void* code, uint32_t value) + static void setInt32(void* code, uint32_t value) { uint16_t* location = reinterpret_cast<uint16_t*>(code); - ExecutableAllocator::MakeWritable unprotect(location - 4, 4 * sizeof(uint16_t)); - uint16_t lo16 = value; uint16_t hi16 = value >> 16; @@ -1623,11 +1622,13 @@ private: spliceLo11(location - 3, lo16); spliceHi5(location - 2, hi16); spliceLo11(location - 1, hi16); + + ExecutableAllocator::cacheFlush(location - 4, 4 * sizeof(uint16_t)); } - static void patchPointer(void* code, void* value) + static void setPointer(void* code, void* value) { - patchInt32(code, reinterpret_cast<uint32_t>(value)); + setInt32(code, reinterpret_cast<uint32_t>(value)); } // Linking & patching: diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h index cf94677097..95b5afc5d9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h @@ -35,22 +35,20 @@ #if ENABLE(ASSEMBLER) -// FIXME: keep transitioning this out into MacroAssemblerX86_64. -#if PLATFORM(X86_64) -#define REPTACH_OFFSET_CALL_R11 3 -#endif - namespace JSC { +class LinkBuffer; +class RepatchBuffer; + template <class AssemblerType> class AbstractMacroAssembler { public: + typedef AssemblerType AssemblerType_T; + typedef MacroAssemblerCodePtr CodePtr; typedef MacroAssemblerCodeRef CodeRef; class Jump; - class LinkBuffer; - class RepatchBuffer; typedef typename AssemblerType::RegisterID RegisterID; typedef typename AssemblerType::FPRegisterID FPRegisterID; @@ -292,7 +290,7 @@ public: class Call { template<class TemplateAssemblerType> friend class AbstractMacroAssembler; - friend class LinkBuffer; + public: enum Flags { None = 0x0, @@ -322,8 +320,13 @@ public: return Call(jump.m_jmp, Linkable); } - private: + void enableLatePatch() + { + m_jmp.enableLatePatch(); + } + JmpSrc m_jmp; + private: Flags m_flags; }; @@ -358,6 +361,11 @@ public: masm->m_assembler.linkJump(m_jmp, label.m_label); } + void enableLatePatch() + { + m_jmp.enableLatePatch(); + } + private: JmpSrc m_jmp; }; @@ -406,254 +414,13 @@ public: }; - // Section 3: LinkBuffer - utility to finalize code generation. + // Section 3: Misc admin methods static CodePtr trampolineAt(CodeRef ref, Label label) { return CodePtr(AssemblerType::getRelocatedAddress(ref.m_code.dataLocation(), label.m_label)); } - // LinkBuffer: - // - // This class assists in linking code generated by the macro assembler, once code generation - // has been completed, and the code has been copied to is final location in memory. At this - // time pointers to labels within the code may be resolved, and relative offsets to external - // addresses may be fixed. - // - // Specifically: - // * Jump objects may be linked to external targets, - // * The address of Jump objects may taken, such that it can later be relinked. - // * The return address of a Jump object representing a call may be acquired. - // * The address of a Label pointing into the code may be resolved. - // * The value referenced by a DataLabel may be fixed. - // - // FIXME: distinguish between Calls & Jumps (make a specific call to obtain the return - // address of calls, as opposed to a point that can be used to later relink a Jump - - // possibly wrap the later up in an object that can do just that). - class LinkBuffer : public Noncopyable { - public: - // Note: Initialization sequence is significant, since executablePool is a PassRefPtr. - // First, executablePool is copied into m_executablePool, then the initialization of - // m_code uses m_executablePool, *not* executablePool, since this is no longer valid. - LinkBuffer(AbstractMacroAssembler<AssemblerType>* masm, PassRefPtr<ExecutablePool> executablePool) - : m_executablePool(executablePool) - , m_code(masm->m_assembler.executableCopy(m_executablePool.get())) - , m_size(masm->m_assembler.size()) -#ifndef NDEBUG - , m_completed(false) -#endif - { - } - - ~LinkBuffer() - { - ASSERT(m_completed); - } - - // These methods are used to link or set values at code generation time. - - void link(Call call, FunctionPtr function) - { - ASSERT(call.isFlagSet(Call::Linkable)); -#if PLATFORM(X86_64) - if (!call.isFlagSet(Call::Near)) { - char* callLocation = reinterpret_cast<char*>(AssemblerType::getRelocatedAddress(code(), call.m_jmp)) - REPTACH_OFFSET_CALL_R11; - AssemblerType::patchPointerForCall(callLocation, function.value()); - } else -#endif - AssemblerType::linkCall(code(), call.m_jmp, function.value()); - } - - void link(Jump jump, CodeLocationLabel label) - { - AssemblerType::linkJump(code(), jump.m_jmp, label.dataLocation()); - } - - void link(JumpList list, CodeLocationLabel label) - { - for (unsigned i = 0; i < list.m_jumps.size(); ++i) - AssemblerType::linkJump(code(), list.m_jumps[i].m_jmp, label.dataLocation()); - } - - void patch(DataLabelPtr label, void* value) - { - AssemblerType::patchPointer(code(), label.m_label, value); - } - - void patch(DataLabelPtr label, CodeLocationLabel value) - { - AssemblerType::patchPointer(code(), label.m_label, value.executableAddress()); - } - - // These methods are used to obtain handles to allow the code to be relinked / repatched later. - - CodeLocationCall locationOf(Call call) - { - ASSERT(call.isFlagSet(Call::Linkable)); - ASSERT(!call.isFlagSet(Call::Near)); - return CodeLocationCall(AssemblerType::getRelocatedAddress(code(), call.m_jmp)); - } - - CodeLocationNearCall locationOfNearCall(Call call) - { - ASSERT(call.isFlagSet(Call::Linkable)); - ASSERT(call.isFlagSet(Call::Near)); - return CodeLocationNearCall(AssemblerType::getRelocatedAddress(code(), call.m_jmp)); - } - - CodeLocationLabel locationOf(Label label) - { - return CodeLocationLabel(AssemblerType::getRelocatedAddress(code(), label.m_label)); - } - - CodeLocationDataLabelPtr locationOf(DataLabelPtr label) - { - return CodeLocationDataLabelPtr(AssemblerType::getRelocatedAddress(code(), label.m_label)); - } - - CodeLocationDataLabel32 locationOf(DataLabel32 label) - { - return CodeLocationDataLabel32(AssemblerType::getRelocatedAddress(code(), label.m_label)); - } - - // This method obtains the return address of the call, given as an offset from - // the start of the code. - unsigned returnAddressOffset(Call call) - { - return AssemblerType::getCallReturnOffset(call.m_jmp); - } - - // Upon completion of all patching either 'finalizeCode()' or 'finalizeCodeAddendum()' should be called - // once to complete generation of the code. 'finalizeCode()' is suited to situations - // where the executable pool must also be retained, the lighter-weight 'finalizeCodeAddendum()' is - // suited to adding to an existing allocation. - CodeRef finalizeCode() - { - performFinalization(); - - return CodeRef(m_code, m_executablePool, m_size); - } - CodeLocationLabel finalizeCodeAddendum() - { - performFinalization(); - - return CodeLocationLabel(code()); - } - - private: - // Keep this private! - the underlying code should only be obtained externally via - // finalizeCode() or finalizeCodeAddendum(). - void* code() - { - return m_code; - } - - void performFinalization() - { -#ifndef NDEBUG - ASSERT(!m_completed); - m_completed = true; -#endif - - ExecutableAllocator::makeExecutable(code(), m_size); - } - - RefPtr<ExecutablePool> m_executablePool; - void* m_code; - size_t m_size; -#ifndef NDEBUG - bool m_completed; -#endif - }; - - class RepatchBuffer { - public: - RepatchBuffer() - { - } - - void relink(CodeLocationJump jump, CodeLocationLabel destination) - { - AssemblerType::relinkJump(jump.dataLocation(), destination.dataLocation()); - } - - void relink(CodeLocationCall call, CodeLocationLabel destination) - { -#if PLATFORM(X86_64) - repatch(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11), destination.executableAddress()); -#else - AssemblerType::relinkCall(call.dataLocation(), destination.executableAddress()); -#endif - } - - void relink(CodeLocationCall call, FunctionPtr destination) - { -#if PLATFORM(X86_64) - repatch(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11), destination.executableAddress()); -#else - AssemblerType::relinkCall(call.dataLocation(), destination.executableAddress()); -#endif - } - - void relink(CodeLocationNearCall nearCall, CodePtr destination) - { - AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress()); - } - - void relink(CodeLocationNearCall nearCall, CodeLocationLabel destination) - { - AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress()); - } - - void relink(CodeLocationNearCall nearCall, FunctionPtr destination) - { - AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress()); - } - - void repatch(CodeLocationDataLabel32 dataLabel32, int32_t value) - { - AssemblerType::repatchInt32(dataLabel32.dataLocation(), value); - } - - void repatch(CodeLocationDataLabelPtr dataLabelPtr, void* value) - { - AssemblerType::repatchPointer(dataLabelPtr.dataLocation(), value); - } - - void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label) - { - relink(CodeLocationCall(CodePtr(returnAddress)), label); - } - - void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction) - { - relinkCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction)); - } - - void relinkCallerToFunction(ReturnAddressPtr returnAddress, FunctionPtr function) - { - relink(CodeLocationCall(CodePtr(returnAddress)), function); - } - - void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label) - { - relink(CodeLocationNearCall(CodePtr(returnAddress)), label); - } - - void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction) - { - relinkNearCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction)); - } - - void repatchLoadPtrToLEA(CodeLocationInstruction instruction) - { - AssemblerType::repatchLoadPtrToLEA(instruction.dataLocation()); - } - }; - - - // Section 4: Misc admin methods - size_t size() { return m_assembler.size(); @@ -712,6 +479,59 @@ public: protected: AssemblerType m_assembler; + + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkJump(void* code, Jump jump, CodeLocationLabel target) + { + AssemblerType::linkJump(code, jump.m_jmp, target.dataLocation()); + } + + static void linkPointer(void* code, typename AssemblerType::JmpDst label, void* value) + { + AssemblerType::linkPointer(code, label, value); + } + + static void* getLinkerAddress(void* code, typename AssemblerType::JmpSrc label) + { + return AssemblerType::getRelocatedAddress(code, label); + } + + static void* getLinkerAddress(void* code, typename AssemblerType::JmpDst label) + { + return AssemblerType::getRelocatedAddress(code, label); + } + + static unsigned getLinkerCallReturnOffset(Call call) + { + return AssemblerType::getCallReturnOffset(call.m_jmp); + } + + static void repatchJump(CodeLocationJump jump, CodeLocationLabel destination) + { + AssemblerType::relinkJump(jump.dataLocation(), destination.dataLocation()); + } + + static void repatchNearCall(CodeLocationNearCall nearCall, CodeLocationLabel destination) + { + AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress()); + } + + static void repatchInt32(CodeLocationDataLabel32 dataLabel32, int32_t value) + { + AssemblerType::repatchInt32(dataLabel32.dataLocation(), value); + } + + static void repatchPointer(CodeLocationDataLabelPtr dataLabelPtr, void* value) + { + AssemblerType::repatchPointer(dataLabelPtr.dataLocation(), value); + } + + static void repatchLoadPtrToLEA(CodeLocationInstruction instruction) + { + AssemblerType::repatchLoadPtrToLEA(instruction.dataLocation()); + } }; } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h index 7a5a8d322c..073906a526 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h @@ -95,12 +95,14 @@ namespace JSC { void putIntUnchecked(int value) { + ASSERT(!(m_size > m_capacity - 4)); *reinterpret_cast<int*>(&m_buffer[m_size]) = value; m_size += 4; } void putInt64Unchecked(int64_t value) { + ASSERT(!(m_size > m_capacity - 8)); *reinterpret_cast<int64_t*>(&m_buffer[m_size]) = value; m_size += 8; } @@ -137,10 +139,19 @@ namespace JSC { return memcpy(result, m_buffer, m_size); } - private: - void grow() + protected: + void append(const char* data, int size) + { + if (m_size > m_capacity - size) + grow(size); + + memcpy(m_buffer + m_size, data, size); + m_size += size; + } + + void grow(int extraCapacity = 0) { - m_capacity += m_capacity / 2; + m_capacity += m_capacity / 2 + extraCapacity; if (m_buffer == m_inlineBuffer) { char* newBuffer = static_cast<char*>(fastMalloc(m_capacity)); diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h new file mode 100644 index 0000000000..f15b7f3349 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h @@ -0,0 +1,305 @@ +/* + * Copyright (C) 2009 University of Szeged + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef AssemblerBufferWithConstantPool_h +#define AssemblerBufferWithConstantPool_h + +#include <wtf/Platform.h> + +#if ENABLE(ASSEMBLER) + +#include "AssemblerBuffer.h" +#include <wtf/SegmentedVector.h> + +namespace JSC { + +/* + On a constant pool 4 or 8 bytes data can be stored. The values can be + constants or addresses. The addresses should be 32 or 64 bits. The constants + should be double-precisions float or integer numbers which are hard to be + encoded as few machine instructions. + + TODO: The pool is desinged to handle both 32 and 64 bits values, but + currently only the 4 bytes constants are implemented and tested. + + The AssemblerBuffer can contain multiple constant pools. Each pool is inserted + into the instruction stream - protected by a jump instruction from the + execution flow. + + The flush mechanism is called when no space remain to insert the next instruction + into the pool. Three values are used to determine when the constant pool itself + have to be inserted into the instruction stream (Assembler Buffer): + + - maxPoolSize: size of the constant pool in bytes, this value cannot be + larger than the maximum offset of a PC relative memory load + + - barrierSize: size of jump instruction in bytes which protects the + constant pool from execution + + - maxInstructionSize: maximum length of a machine instruction in bytes + + There are some callbacks which solve the target architecture specific + address handling: + + - TYPE patchConstantPoolLoad(TYPE load, int value): + patch the 'load' instruction with the index of the constant in the + constant pool and return the patched instruction. + + - void patchConstantPoolLoad(void* loadAddr, void* constPoolAddr): + patch the a PC relative load instruction at 'loadAddr' address with the + final relative offset. The offset can be computed with help of + 'constPoolAddr' (the address of the constant pool) and index of the + constant (which is stored previously in the load instruction itself). + + - TYPE placeConstantPoolBarrier(int size): + return with a constant pool barrier instruction which jumps over the + constant pool. + + The 'put*WithConstant*' functions should be used to place a data into the + constant pool. +*/ + +template <int maxPoolSize, int barrierSize, int maxInstructionSize, class AssemblerType> +class AssemblerBufferWithConstantPool: public AssemblerBuffer { + typedef WTF::SegmentedVector<uint32_t, 512> LoadOffsets; +public: + enum { + UniqueConst, + ReusableConst, + UnusedEntry, + }; + + AssemblerBufferWithConstantPool() + : AssemblerBuffer() + , m_numConsts(0) + , m_maxDistance(maxPoolSize) + , m_lastConstDelta(0) + { + m_pool = static_cast<uint32_t*>(fastMalloc(maxPoolSize)); + m_mask = static_cast<char*>(fastMalloc(maxPoolSize / sizeof(uint32_t))); + } + + ~AssemblerBufferWithConstantPool() + { + fastFree(m_mask); + fastFree(m_pool); + } + + void ensureSpace(int space) + { + flushIfNoSpaceFor(space); + AssemblerBuffer::ensureSpace(space); + } + + void ensureSpace(int insnSpace, int constSpace) + { + flushIfNoSpaceFor(insnSpace, constSpace); + AssemblerBuffer::ensureSpace(insnSpace); + } + + bool isAligned(int alignment) + { + flushIfNoSpaceFor(alignment); + return AssemblerBuffer::isAligned(alignment); + } + + void putByteUnchecked(int value) + { + AssemblerBuffer::putByteUnchecked(value); + correctDeltas(1); + } + + void putByte(int value) + { + flushIfNoSpaceFor(1); + AssemblerBuffer::putByte(value); + correctDeltas(1); + } + + void putShortUnchecked(int value) + { + AssemblerBuffer::putShortUnchecked(value); + correctDeltas(2); + } + + void putShort(int value) + { + flushIfNoSpaceFor(2); + AssemblerBuffer::putShort(value); + correctDeltas(2); + } + + void putIntUnchecked(int value) + { + AssemblerBuffer::putIntUnchecked(value); + correctDeltas(4); + } + + void putInt(int value) + { + flushIfNoSpaceFor(4); + AssemblerBuffer::putInt(value); + correctDeltas(4); + } + + void putInt64Unchecked(int64_t value) + { + AssemblerBuffer::putInt64Unchecked(value); + correctDeltas(8); + } + + int size() + { + flushIfNoSpaceFor(maxInstructionSize, sizeof(uint64_t)); + return AssemblerBuffer::size(); + } + + void* executableCopy(ExecutablePool* allocator) + { + flushConstantPool(false); + return AssemblerBuffer::executableCopy(allocator); + } + + void putIntWithConstantInt(uint32_t insn, uint32_t constant, bool isReusable = false) + { + flushIfNoSpaceFor(4, 4); + + m_loadOffsets.append(AssemblerBuffer::size()); + if (isReusable) + for (int i = 0; i < m_numConsts; ++i) { + if (m_mask[i] == ReusableConst && m_pool[i] == constant) { + AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, i)); + correctDeltas(4); + return; + } + } + + m_pool[m_numConsts] = constant; + m_mask[m_numConsts] = static_cast<char>(isReusable ? ReusableConst : UniqueConst); + + AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, m_numConsts)); + ++m_numConsts; + + correctDeltas(4, 4); + } + + // This flushing mechanism can be called after any unconditional jumps. + void flushWithoutBarrier() + { + // Flush if constant pool is more than 60% full to avoid overuse of this function. + if (5 * m_numConsts > 3 * maxPoolSize / sizeof(uint32_t)) + flushConstantPool(false); + } + + uint32_t* poolAddress() + { + return m_pool; + } + +private: + void correctDeltas(int insnSize) + { + m_maxDistance -= insnSize; + m_lastConstDelta -= insnSize; + if (m_lastConstDelta < 0) + m_lastConstDelta = 0; + } + + void correctDeltas(int insnSize, int constSize) + { + correctDeltas(insnSize); + + m_maxDistance -= m_lastConstDelta; + m_lastConstDelta = constSize; + } + + void flushConstantPool(bool useBarrier = true) + { + if (m_numConsts == 0) + return; + int alignPool = (AssemblerBuffer::size() + (useBarrier ? barrierSize : 0)) & (sizeof(uint64_t) - 1); + + if (alignPool) + alignPool = sizeof(uint64_t) - alignPool; + + // Callback to protect the constant pool from execution + if (useBarrier) + AssemblerBuffer::putInt(AssemblerType::placeConstantPoolBarrier(m_numConsts * sizeof(uint32_t) + alignPool)); + + if (alignPool) { + if (alignPool & 1) + AssemblerBuffer::putByte(AssemblerType::padForAlign8); + if (alignPool & 2) + AssemblerBuffer::putShort(AssemblerType::padForAlign16); + if (alignPool & 4) + AssemblerBuffer::putInt(AssemblerType::padForAlign32); + } + + int constPoolOffset = AssemblerBuffer::size(); + append(reinterpret_cast<char*>(m_pool), m_numConsts * sizeof(uint32_t)); + + // Patch each PC relative load + for (LoadOffsets::Iterator iter = m_loadOffsets.begin(); iter != m_loadOffsets.end(); ++iter) { + void* loadAddr = reinterpret_cast<void*>(m_buffer + *iter); + AssemblerType::patchConstantPoolLoad(loadAddr, reinterpret_cast<void*>(m_buffer + constPoolOffset)); + } + + m_loadOffsets.clear(); + m_numConsts = 0; + m_maxDistance = maxPoolSize; + } + + void flushIfNoSpaceFor(int nextInsnSize) + { + if (m_numConsts == 0) + return; + if ((m_maxDistance < nextInsnSize + m_lastConstDelta + barrierSize + (int)sizeof(uint32_t))) + flushConstantPool(); + } + + void flushIfNoSpaceFor(int nextInsnSize, int nextConstSize) + { + if (m_numConsts == 0) + return; + if ((m_maxDistance < nextInsnSize + m_lastConstDelta + barrierSize + (int)sizeof(uint32_t)) || + (m_numConsts + nextConstSize / sizeof(uint32_t) >= maxPoolSize)) + flushConstantPool(); + } + + uint32_t* m_pool; + char* m_mask; + LoadOffsets m_loadOffsets; + + int m_numConsts; + int m_maxDistance; + int m_lastConstDelta; +}; + +} // namespace JSC + +#endif // ENABLE(ASSEMBLER) + +#endif // AssemblerBufferWithConstantPool_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/LinkBuffer.h b/src/3rdparty/webkit/JavaScriptCore/assembler/LinkBuffer.h new file mode 100644 index 0000000000..6d0811703c --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/LinkBuffer.h @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef LinkBuffer_h +#define LinkBuffer_h + +#include <wtf/Platform.h> + +#if ENABLE(ASSEMBLER) + +#include <MacroAssembler.h> +#include <wtf/Noncopyable.h> + +namespace JSC { + +// LinkBuffer: +// +// This class assists in linking code generated by the macro assembler, once code generation +// has been completed, and the code has been copied to is final location in memory. At this +// time pointers to labels within the code may be resolved, and relative offsets to external +// addresses may be fixed. +// +// Specifically: +// * Jump objects may be linked to external targets, +// * The address of Jump objects may taken, such that it can later be relinked. +// * The return address of a Call may be acquired. +// * The address of a Label pointing into the code may be resolved. +// * The value referenced by a DataLabel may be set. +// +class LinkBuffer : public Noncopyable { + typedef MacroAssemblerCodeRef CodeRef; + typedef MacroAssembler::Label Label; + typedef MacroAssembler::Jump Jump; + typedef MacroAssembler::JumpList JumpList; + typedef MacroAssembler::Call Call; + typedef MacroAssembler::DataLabel32 DataLabel32; + typedef MacroAssembler::DataLabelPtr DataLabelPtr; + +public: + // Note: Initialization sequence is significant, since executablePool is a PassRefPtr. + // First, executablePool is copied into m_executablePool, then the initialization of + // m_code uses m_executablePool, *not* executablePool, since this is no longer valid. + LinkBuffer(MacroAssembler* masm, PassRefPtr<ExecutablePool> executablePool) + : m_executablePool(executablePool) + , m_code(masm->m_assembler.executableCopy(m_executablePool.get())) + , m_size(masm->m_assembler.size()) +#ifndef NDEBUG + , m_completed(false) +#endif + { + } + + ~LinkBuffer() + { + ASSERT(m_completed); + } + + // These methods are used to link or set values at code generation time. + + void link(Call call, FunctionPtr function) + { + ASSERT(call.isFlagSet(Call::Linkable)); + MacroAssembler::linkCall(code(), call, function); + } + + void link(Jump jump, CodeLocationLabel label) + { + MacroAssembler::linkJump(code(), jump, label); + } + + void link(JumpList list, CodeLocationLabel label) + { + for (unsigned i = 0; i < list.m_jumps.size(); ++i) + MacroAssembler::linkJump(code(), list.m_jumps[i], label); + } + + void patch(DataLabelPtr label, void* value) + { + MacroAssembler::linkPointer(code(), label.m_label, value); + } + + void patch(DataLabelPtr label, CodeLocationLabel value) + { + MacroAssembler::linkPointer(code(), label.m_label, value.executableAddress()); + } + + // These methods are used to obtain handles to allow the code to be relinked / repatched later. + + CodeLocationCall locationOf(Call call) + { + ASSERT(call.isFlagSet(Call::Linkable)); + ASSERT(!call.isFlagSet(Call::Near)); + return CodeLocationCall(MacroAssembler::getLinkerAddress(code(), call.m_jmp)); + } + + CodeLocationNearCall locationOfNearCall(Call call) + { + ASSERT(call.isFlagSet(Call::Linkable)); + ASSERT(call.isFlagSet(Call::Near)); + return CodeLocationNearCall(MacroAssembler::getLinkerAddress(code(), call.m_jmp)); + } + + CodeLocationLabel locationOf(Label label) + { + return CodeLocationLabel(MacroAssembler::getLinkerAddress(code(), label.m_label)); + } + + CodeLocationDataLabelPtr locationOf(DataLabelPtr label) + { + return CodeLocationDataLabelPtr(MacroAssembler::getLinkerAddress(code(), label.m_label)); + } + + CodeLocationDataLabel32 locationOf(DataLabel32 label) + { + return CodeLocationDataLabel32(MacroAssembler::getLinkerAddress(code(), label.m_label)); + } + + // This method obtains the return address of the call, given as an offset from + // the start of the code. + unsigned returnAddressOffset(Call call) + { + return MacroAssembler::getLinkerCallReturnOffset(call); + } + + // Upon completion of all patching either 'finalizeCode()' or 'finalizeCodeAddendum()' should be called + // once to complete generation of the code. 'finalizeCode()' is suited to situations + // where the executable pool must also be retained, the lighter-weight 'finalizeCodeAddendum()' is + // suited to adding to an existing allocation. + CodeRef finalizeCode() + { + performFinalization(); + + return CodeRef(m_code, m_executablePool, m_size); + } + CodeLocationLabel finalizeCodeAddendum() + { + performFinalization(); + + return CodeLocationLabel(code()); + } + +private: + // Keep this private! - the underlying code should only be obtained externally via + // finalizeCode() or finalizeCodeAddendum(). + void* code() + { + return m_code; + } + + void performFinalization() + { +#ifndef NDEBUG + ASSERT(!m_completed); + m_completed = true; +#endif + + ExecutableAllocator::makeExecutable(code(), m_size); + ExecutableAllocator::cacheFlush(code(), m_size); + } + + RefPtr<ExecutablePool> m_executablePool; + void* m_code; + size_t m_size; +#ifndef NDEBUG + bool m_completed; +#endif +}; + +} // namespace JSC + +#endif // ENABLE(ASSEMBLER) + +#endif // LinkBuffer_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h index 43d27e7e10..9e1c5d3a40 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h @@ -34,6 +34,10 @@ #include "MacroAssemblerARMv7.h" namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; }; +#elif PLATFORM(ARM) +#include "MacroAssemblerARM.h" +namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; }; + #elif PLATFORM(X86) #include "MacroAssemblerX86.h" namespace JSC { typedef MacroAssemblerX86 MacroAssemblerBase; }; diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h new file mode 100644 index 0000000000..27879a956a --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h @@ -0,0 +1,797 @@ +/* + * Copyright (C) 2008 Apple Inc. + * Copyright (C) 2009 University of Szeged + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef MacroAssemblerARM_h +#define MacroAssemblerARM_h + +#include <wtf/Platform.h> + +#if ENABLE(ASSEMBLER) && PLATFORM(ARM) + +#include "ARMAssembler.h" +#include "AbstractMacroAssembler.h" + +namespace JSC { + +class MacroAssemblerARM : public AbstractMacroAssembler<ARMAssembler> { +public: + enum Condition { + Equal = ARMAssembler::EQ, + NotEqual = ARMAssembler::NE, + Above = ARMAssembler::HI, + AboveOrEqual = ARMAssembler::CS, + Below = ARMAssembler::CC, + BelowOrEqual = ARMAssembler::LS, + GreaterThan = ARMAssembler::GT, + GreaterThanOrEqual = ARMAssembler::GE, + LessThan = ARMAssembler::LT, + LessThanOrEqual = ARMAssembler::LE, + Overflow = ARMAssembler::VS, + Signed = ARMAssembler::MI, + Zero = ARMAssembler::EQ, + NonZero = ARMAssembler::NE + }; + + enum DoubleCondition { + DoubleEqual, //FIXME + DoubleNotEqual, //FIXME + DoubleGreaterThan, //FIXME + DoubleGreaterThanOrEqual, //FIXME + DoubleLessThan, //FIXME + DoubleLessThanOrEqual, //FIXME + }; + + static const RegisterID stackPointerRegister = ARM::sp; + + static const Scale ScalePtr = TimesFour; + + void add32(RegisterID src, RegisterID dest) + { + m_assembler.adds_r(dest, dest, src); + } + + void add32(Imm32 imm, Address address) + { + load32(address, ARM::S1); + add32(imm, ARM::S1); + store32(ARM::S1, address); + } + + void add32(Imm32 imm, RegisterID dest) + { + m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0)); + } + + void add32(Address src, RegisterID dest) + { + load32(src, ARM::S1); + add32(ARM::S1, dest); + } + + void and32(RegisterID src, RegisterID dest) + { + m_assembler.ands_r(dest, dest, src); + } + + void and32(Imm32 imm, RegisterID dest) + { + ARMWord w = m_assembler.getImm(imm.m_value, ARM::S0, true); + if (w & ARMAssembler::OP2_INV_IMM) + m_assembler.bics_r(dest, dest, w & ~ARMAssembler::OP2_INV_IMM); + else + m_assembler.ands_r(dest, dest, w); + } + + void lshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f)); + } + + void lshift32(RegisterID shift_amount, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.lsl_r(dest, shift_amount)); + } + + void mul32(RegisterID src, RegisterID dest) + { + if (src == dest) { + move(src, ARM::S0); + src = ARM::S0; + } + m_assembler.muls_r(dest, dest, src); + } + + void mul32(Imm32 imm, RegisterID src, RegisterID dest) + { + move(imm, ARM::S0); + m_assembler.muls_r(dest, src, ARM::S0); + } + + void not32(RegisterID dest) + { + m_assembler.mvns_r(dest, dest); + } + + void or32(RegisterID src, RegisterID dest) + { + m_assembler.orrs_r(dest, dest, src); + } + + void or32(Imm32 imm, RegisterID dest) + { + m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0)); + } + + void rshift32(RegisterID shift_amount, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.asr_r(dest, shift_amount)); + } + + void rshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.asr(dest, imm.m_value & 0x1f)); + } + + void sub32(RegisterID src, RegisterID dest) + { + m_assembler.subs_r(dest, dest, src); + } + + void sub32(Imm32 imm, RegisterID dest) + { + m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0)); + } + + void sub32(Imm32 imm, Address address) + { + load32(address, ARM::S1); + sub32(imm, ARM::S1); + store32(ARM::S1, address); + } + + void sub32(Address src, RegisterID dest) + { + load32(src, ARM::S1); + sub32(ARM::S1, dest); + } + + void xor32(RegisterID src, RegisterID dest) + { + m_assembler.eors_r(dest, dest, src); + } + + void xor32(Imm32 imm, RegisterID dest) + { + m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0)); + } + + void load32(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransfer32(true, dest, address.base, address.offset); + } + + void load32(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast<int>(address.scale), address.offset); + } + + DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) + { + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARM::S0, 0); + m_assembler.dtr_ur(true, dest, address.base, ARM::S0); + return dataLabel; + } + + Label loadPtrWithPatchToLEA(Address address, RegisterID dest) + { + Label label(this); + load32(address, dest); + return label; + } + + void load16(BaseIndex address, RegisterID dest) + { + m_assembler.add_r(ARM::S0, address.base, m_assembler.lsl(address.index, address.scale)); + if (address.offset>=0) + m_assembler.ldrh_u(dest, ARM::S0, ARMAssembler::getOp2Byte(address.offset)); + else + m_assembler.ldrh_d(dest, ARM::S0, ARMAssembler::getOp2Byte(-address.offset)); + } + + DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address) + { + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARM::S0, 0); + m_assembler.dtr_ur(false, src, address.base, ARM::S0); + return dataLabel; + } + + void store32(RegisterID src, ImplicitAddress address) + { + m_assembler.dataTransfer32(false, src, address.base, address.offset); + } + + void store32(RegisterID src, BaseIndex address) + { + m_assembler.baseIndexTransfer32(false, src, address.base, address.index, static_cast<int>(address.scale), address.offset); + } + + void store32(Imm32 imm, ImplicitAddress address) + { + move(imm, ARM::S1); + store32(ARM::S1, address); + } + + void store32(RegisterID src, void* address) + { + m_assembler.moveImm(reinterpret_cast<ARMWord>(address), ARM::S0); + m_assembler.dtr_u(false, src, ARM::S0, 0); + } + + void store32(Imm32 imm, void* address) + { + m_assembler.moveImm(reinterpret_cast<ARMWord>(address), ARM::S0); + m_assembler.moveImm(imm.m_value, ARM::S1); + m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0); + } + + void pop(RegisterID dest) + { + m_assembler.pop_r(dest); + } + + void push(RegisterID src) + { + m_assembler.push_r(src); + } + + void push(Address address) + { + load32(address, ARM::S1); + push(ARM::S1); + } + + void push(Imm32 imm) + { + move(imm, ARM::S0); + push(ARM::S0); + } + + void move(Imm32 imm, RegisterID dest) + { + m_assembler.moveImm(imm.m_value, dest); + } + + void move(RegisterID src, RegisterID dest) + { + m_assembler.mov_r(dest, src); + } + + void move(ImmPtr imm, RegisterID dest) + { + m_assembler.mov_r(dest, m_assembler.getImm(reinterpret_cast<ARMWord>(imm.m_value), ARM::S0)); + } + + void swap(RegisterID reg1, RegisterID reg2) + { + m_assembler.mov_r(ARM::S0, reg1); + m_assembler.mov_r(reg1, reg2); + m_assembler.mov_r(reg2, ARM::S0); + } + + void signExtend32ToPtr(RegisterID src, RegisterID dest) + { + if (src != dest) + move(src, dest); + } + + void zeroExtend32ToPtr(RegisterID src, RegisterID dest) + { + if (src != dest) + move(src, dest); + } + + Jump branch32(Condition cond, RegisterID left, RegisterID right) + { + m_assembler.cmp_r(left, right); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branch32(Condition cond, RegisterID left, Imm32 right) + { + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARM::S0)); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branch32(Condition cond, RegisterID left, Address right) + { + load32(right, ARM::S1); + return branch32(cond, left, ARM::S1); + } + + Jump branch32(Condition cond, Address left, RegisterID right) + { + load32(left, ARM::S1); + return branch32(cond, ARM::S1, right); + } + + Jump branch32(Condition cond, Address left, Imm32 right) + { + load32(left, ARM::S1); + return branch32(cond, ARM::S1, right); + } + + Jump branch32(Condition cond, BaseIndex left, Imm32 right) + { + load32(left, ARM::S1); + return branch32(cond, ARM::S1, right); + } + + Jump branch16(Condition cond, BaseIndex left, RegisterID right) + { + UNUSED_PARAM(cond); + UNUSED_PARAM(left); + UNUSED_PARAM(right); + ASSERT_NOT_REACHED(); + return jump(); + } + + Jump branch16(Condition cond, BaseIndex left, Imm32 right) + { + load16(left, ARM::S0); + move(right, ARM::S1); + m_assembler.cmp_r(ARM::S0, ARM::S1); + return m_assembler.jmp(ARMCondition(cond)); + } + + Jump branchTest32(Condition cond, RegisterID reg, RegisterID mask) + { + ASSERT((cond == Zero) || (cond == NonZero)); + m_assembler.tst_r(reg, mask); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + { + ASSERT((cond == Zero) || (cond == NonZero)); + ARMWord w = m_assembler.getImm(mask.m_value, ARM::S0, true); + if (w & ARMAssembler::OP2_INV_IMM) + m_assembler.bics_r(ARM::S0, reg, w & ~ARMAssembler::OP2_INV_IMM); + else + m_assembler.tst_r(reg, w); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) + { + load32(address, ARM::S1); + return branchTest32(cond, ARM::S1, mask); + } + + Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + { + load32(address, ARM::S1); + return branchTest32(cond, ARM::S1, mask); + } + + Jump jump() + { + return Jump(m_assembler.jmp()); + } + + void jump(RegisterID target) + { + move(target, ARM::pc); + } + + void jump(Address address) + { + load32(address, ARM::pc); + } + + Jump branchAdd32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + add32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + add32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + void mull32(RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) { + move(src1, ARM::S0); + src1 = ARM::S0; + } + m_assembler.mull_r(ARM::S1, dest, src2, src1); + m_assembler.cmp_r(ARM::S1, m_assembler.asr(dest, 31)); + } + + Jump branchMul32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + if (cond == Overflow) { + mull32(src, dest, dest); + cond = NonZero; + } + else + mul32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + if (cond == Overflow) { + move(imm, ARM::S0); + mull32(ARM::S0, src, dest); + cond = NonZero; + } + else + mul32(imm, src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + sub32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + sub32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + void breakpoint() + { + m_assembler.bkpt(0); + } + + Call nearCall() + { + prepareCall(); + return Call(m_assembler.jmp(), Call::LinkableNear); + } + + Call call(RegisterID target) + { + prepareCall(); + move(ARM::pc, target); + JmpSrc jmpSrc; + return Call(jmpSrc, Call::None); + } + + void call(Address address) + { + call32(address.base, address.offset); + } + + void ret() + { + pop(ARM::pc); + } + + void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + m_assembler.cmp_r(left, right); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void set32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARM::S0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + load32(address, ARM::S1); + if (mask.m_value == -1) + m_assembler.cmp_r(0, ARM::S1); + else + m_assembler.tst_r(ARM::S1, m_assembler.getImm(mask.m_value, ARM::S0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void add32(Imm32 imm, RegisterID src, RegisterID dest) + { + m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARM::S0)); + } + + void add32(Imm32 imm, AbsoluteAddress address) + { + m_assembler.moveImm(reinterpret_cast<ARMWord>(address.m_ptr), ARM::S1); + m_assembler.dtr_u(true, ARM::S1, ARM::S1, 0); + add32(imm, ARM::S1); + m_assembler.moveImm(reinterpret_cast<ARMWord>(address.m_ptr), ARM::S0); + m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0); + } + + void sub32(Imm32 imm, AbsoluteAddress address) + { + m_assembler.moveImm(reinterpret_cast<ARMWord>(address.m_ptr), ARM::S1); + m_assembler.dtr_u(true, ARM::S1, ARM::S1, 0); + sub32(imm, ARM::S1); + m_assembler.moveImm(reinterpret_cast<ARMWord>(address.m_ptr), ARM::S0); + m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0); + } + + void load32(void* address, RegisterID dest) + { + m_assembler.moveImm(reinterpret_cast<ARMWord>(address), ARM::S0); + m_assembler.dtr_u(true, dest, ARM::S0, 0); + } + + Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right) + { + load32(left.m_ptr, ARM::S1); + return branch32(cond, ARM::S1, right); + } + + Jump branch32(Condition cond, AbsoluteAddress left, Imm32 right) + { + load32(left.m_ptr, ARM::S1); + return branch32(cond, ARM::S1, right); + } + + Call call() + { + prepareCall(); + return Call(m_assembler.jmp(), Call::Linkable); + } + + Call tailRecursiveCall() + { + return Call::fromTailJump(jump()); + } + + Call makeTailRecursiveCall(Jump oldJump) + { + return Call::fromTailJump(oldJump); + } + + DataLabelPtr moveWithPatch(ImmPtr initialValue, RegisterID dest) + { + DataLabelPtr dataLabel(this); + m_assembler.ldr_un_imm(dest, reinterpret_cast<ARMWord>(initialValue.m_value)); + return dataLabel; + } + + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + { + dataLabel = moveWithPatch(initialRightValue, ARM::S1); + Jump jump = branch32(cond, left, ARM::S1); + jump.enableLatePatch(); + return jump; + } + + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + { + load32(left, ARM::S1); + dataLabel = moveWithPatch(initialRightValue, ARM::S0); + Jump jump = branch32(cond, ARM::S0, ARM::S1); + jump.enableLatePatch(); + return jump; + } + + DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address) + { + DataLabelPtr dataLabel = moveWithPatch(initialValue, ARM::S1); + store32(ARM::S1, address); + return dataLabel; + } + + DataLabelPtr storePtrWithPatch(ImplicitAddress address) + { + return storePtrWithPatch(ImmPtr(0), address); + } + + // Floating point operators + bool supportsFloatingPoint() const + { + return false; + } + + bool supportsFloatingPointTruncate() const + { + return false; + } + + void loadDouble(ImplicitAddress address, FPRegisterID dest) + { + UNUSED_PARAM(address); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + } + + void storeDouble(FPRegisterID src, ImplicitAddress address) + { + UNUSED_PARAM(src); + UNUSED_PARAM(address); + ASSERT_NOT_REACHED(); + } + + void addDouble(FPRegisterID src, FPRegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + } + + void addDouble(Address src, FPRegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + } + + void subDouble(FPRegisterID src, FPRegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + } + + void subDouble(Address src, FPRegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + } + + void mulDouble(FPRegisterID src, FPRegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + } + + void mulDouble(Address src, FPRegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + } + + void convertInt32ToDouble(RegisterID src, FPRegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + } + + Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) + { + UNUSED_PARAM(cond); + UNUSED_PARAM(left); + UNUSED_PARAM(right); + ASSERT_NOT_REACHED(); + return jump(); + } + + // Truncates 'src' to an integer, and places the resulting 'dest'. + // If the result is not representable as a 32 bit value, branch. + // May also branch for some values that are representable in 32 bits + // (specifically, in this case, INT_MIN). + Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + return jump(); + } + +protected: + ARMAssembler::Condition ARMCondition(Condition cond) + { + return static_cast<ARMAssembler::Condition>(cond); + } + + void prepareCall() + { + m_assembler.ensureSpace(3 * sizeof(ARMWord), sizeof(ARMWord)); + + // S0 might be used for parameter passing + m_assembler.add_r(ARM::S1, ARM::pc, ARMAssembler::OP2_IMM | 0x4); + m_assembler.push_r(ARM::S1); + } + + void call32(RegisterID base, int32_t offset) + { + if (base == ARM::sp) + offset += 4; + + if (offset >= 0) { + if (offset <= 0xfff) { + prepareCall(); + m_assembler.dtr_u(true, ARM::pc, base, offset); + } else if (offset <= 0xfffff) { + m_assembler.add_r(ARM::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + prepareCall(); + m_assembler.dtr_u(true, ARM::pc, ARM::S0, offset & 0xfff); + } else { + ARMWord reg = m_assembler.getImm(offset, ARM::S0); + prepareCall(); + m_assembler.dtr_ur(true, ARM::pc, base, reg); + } + } else { + offset = -offset; + if (offset <= 0xfff) { + prepareCall(); + m_assembler.dtr_d(true, ARM::pc, base, offset); + } else if (offset <= 0xfffff) { + m_assembler.sub_r(ARM::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + prepareCall(); + m_assembler.dtr_d(true, ARM::pc, ARM::S0, offset & 0xfff); + } else { + ARMWord reg = m_assembler.getImm(offset, ARM::S0); + prepareCall(); + m_assembler.dtr_dr(true, ARM::pc, base, reg); + } + } + } + +private: + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkCall(void* code, Call call, FunctionPtr function) + { + ARMAssembler::linkCall(code, call.m_jmp, function.value()); + } + + static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) + { + ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static void repatchCall(CodeLocationCall call, FunctionPtr destination) + { + ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + +}; + +} + +#endif + +#endif // MacroAssemblerARM_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h index bd83c60361..f7a84027f7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h @@ -1054,6 +1054,25 @@ protected: { return static_cast<ARMv7Assembler::Condition>(cond); } + +private: + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkCall(void* code, Call call, FunctionPtr function) + { + ARMv7Assembler::linkCall(code, call.m_jmp, function.value()); + } + + static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) + { + ARMv7Assembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static void repatchCall(CodeLocationCall call, FunctionPtr destination) + { + ARMv7Assembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } }; } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h index 50fca5bd2b..341a7ff338 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h @@ -165,28 +165,20 @@ private: class MacroAssemblerCodeRef { public: MacroAssemblerCodeRef() -#ifndef NDEBUG : m_size(0) -#endif { } MacroAssemblerCodeRef(void* code, PassRefPtr<ExecutablePool> executablePool, size_t size) : m_code(code) , m_executablePool(executablePool) + , m_size(size) { -#ifndef NDEBUG - m_size = size; -#else - UNUSED_PARAM(size); -#endif } MacroAssemblerCodePtr m_code; RefPtr<ExecutablePool> m_executablePool; -#ifndef NDEBUG size_t m_size; -#endif }; } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h index aaf98fdf23..0b9ff35d88 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h @@ -164,6 +164,24 @@ public: private: const bool m_isSSE2Present; + + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkCall(void* code, Call call, FunctionPtr function) + { + X86Assembler::linkCall(code, call.m_jmp, function.value()); + } + + static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) + { + X86Assembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static void repatchCall(CodeLocationCall call, FunctionPtr destination) + { + X86Assembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } }; } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h index ffdca7c50a..df0090ac5c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h @@ -32,6 +32,8 @@ #include "MacroAssemblerX86Common.h" +#define REPTACH_OFFSET_CALL_R11 3 + namespace JSC { class MacroAssemblerX86_64 : public MacroAssemblerX86Common { @@ -446,6 +448,29 @@ public: bool supportsFloatingPoint() const { return true; } // See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate() bool supportsFloatingPointTruncate() const { return true; } + +private: + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkCall(void* code, Call call, FunctionPtr function) + { + if (!call.isFlagSet(Call::Near)) + X86Assembler::linkPointer(code, X86Assembler::labelFor(call.m_jmp, -REPTACH_OFFSET_CALL_R11), function.value()); + else + X86Assembler::linkCall(code, call.m_jmp, function.value()); + } + + static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) + { + X86Assembler::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress()); + } + + static void repatchCall(CodeLocationCall call, FunctionPtr destination) + { + X86Assembler::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress()); + } + }; } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/RepatchBuffer.h b/src/3rdparty/webkit/JavaScriptCore/assembler/RepatchBuffer.h new file mode 100644 index 0000000000..89cbf06d1a --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/RepatchBuffer.h @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef RepatchBuffer_h +#define RepatchBuffer_h + +#include <wtf/Platform.h> + +#if ENABLE(ASSEMBLER) + +#include <MacroAssembler.h> +#include <wtf/Noncopyable.h> + +namespace JSC { + +// RepatchBuffer: +// +// This class is used to modify code after code generation has been completed, +// and after the code has potentially already been executed. This mechanism is +// used to apply optimizations to the code. +// +class RepatchBuffer { + typedef MacroAssemblerCodePtr CodePtr; + +public: + RepatchBuffer(CodeBlock* codeBlock) + { + JITCode& code = codeBlock->getJITCode(); + m_start = code.start(); + m_size = code.size(); + + ExecutableAllocator::makeWritable(m_start, m_size); + } + + ~RepatchBuffer() + { + ExecutableAllocator::makeExecutable(m_start, m_size); + } + + void relink(CodeLocationJump jump, CodeLocationLabel destination) + { + MacroAssembler::repatchJump(jump, destination); + } + + void relink(CodeLocationCall call, CodeLocationLabel destination) + { + MacroAssembler::repatchCall(call, destination); + } + + void relink(CodeLocationCall call, FunctionPtr destination) + { + MacroAssembler::repatchCall(call, destination); + } + + void relink(CodeLocationNearCall nearCall, CodePtr destination) + { + MacroAssembler::repatchNearCall(nearCall, CodeLocationLabel(destination)); + } + + void relink(CodeLocationNearCall nearCall, CodeLocationLabel destination) + { + MacroAssembler::repatchNearCall(nearCall, destination); + } + + void repatch(CodeLocationDataLabel32 dataLabel32, int32_t value) + { + MacroAssembler::repatchInt32(dataLabel32, value); + } + + void repatch(CodeLocationDataLabelPtr dataLabelPtr, void* value) + { + MacroAssembler::repatchPointer(dataLabelPtr, value); + } + + void repatchLoadPtrToLEA(CodeLocationInstruction instruction) + { + MacroAssembler::repatchLoadPtrToLEA(instruction); + } + + void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label) + { + relink(CodeLocationCall(CodePtr(returnAddress)), label); + } + + void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction) + { + relinkCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction)); + } + + void relinkCallerToFunction(ReturnAddressPtr returnAddress, FunctionPtr function) + { + relink(CodeLocationCall(CodePtr(returnAddress)), function); + } + + void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label) + { + relink(CodeLocationNearCall(CodePtr(returnAddress)), label); + } + + void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction) + { + relinkNearCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction)); + } + +private: + void* m_start; + size_t m_size; +}; + +} // namespace JSC + +#endif // ENABLE(ASSEMBLER) + +#endif // RepatchBuffer_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h index 7a8b58da98..745bc60a77 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h @@ -226,6 +226,7 @@ public: { } + void enableLatePatch() { } private: JmpSrc(int offset) : m_offset(offset) @@ -1344,6 +1345,11 @@ public: return JmpDst(m_formatter.size()); } + static JmpDst labelFor(JmpSrc jump, intptr_t offset = 0) + { + return JmpDst(jump.m_offset + offset); + } + JmpDst align(int alignment) { while (!m_formatter.isAligned(alignment)) @@ -1366,59 +1372,48 @@ public: ASSERT(to.m_offset != -1); char* code = reinterpret_cast<char*>(m_formatter.data()); - patchRel32(code + from.m_offset, code + to.m_offset); + setRel32(code + from.m_offset, code + to.m_offset); } static void linkJump(void* code, JmpSrc from, void* to) { ASSERT(from.m_offset != -1); - patchRel32(reinterpret_cast<char*>(code) + from.m_offset, to); + setRel32(reinterpret_cast<char*>(code) + from.m_offset, to); } static void linkCall(void* code, JmpSrc from, void* to) { ASSERT(from.m_offset != -1); - patchRel32(reinterpret_cast<char*>(code) + from.m_offset, to); + setRel32(reinterpret_cast<char*>(code) + from.m_offset, to); } -#if PLATFORM(X86_64) - static void patchPointerForCall(void* where, void* value) - { - reinterpret_cast<void**>(where)[-1] = value; - } -#endif - - static void patchPointer(void* code, JmpDst where, void* value) + static void linkPointer(void* code, JmpDst where, void* value) { ASSERT(where.m_offset != -1); - patchPointer(reinterpret_cast<char*>(code) + where.m_offset, value); + setPointer(reinterpret_cast<char*>(code) + where.m_offset, value); } static void relinkJump(void* from, void* to) { - ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<char*>(from) - sizeof(int32_t), sizeof(int32_t)); - patchRel32(from, to); + setRel32(from, to); } static void relinkCall(void* from, void* to) { - ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<char*>(from) - sizeof(int32_t), sizeof(int32_t)); - patchRel32(from, to); + setRel32(from, to); } static void repatchInt32(void* where, int32_t value) { - ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<char*>(where) - sizeof(int32_t), sizeof(int32_t)); - patchInt32(where, value); + setInt32(where, value); } static void repatchPointer(void* where, void* value) { - ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<char*>(where) - sizeof(void*), sizeof(void*)); - patchPointer(where, value); + setPointer(where, value); } static void repatchLoadPtrToLEA(void* where) @@ -1428,7 +1423,6 @@ public: // Skip over the prefix byte. where = reinterpret_cast<char*>(where) + 1; #endif - ExecutableAllocator::MakeWritable unprotect(where, 1); *reinterpret_cast<unsigned char*>(where) = static_cast<unsigned char>(OP_LEA); } @@ -1476,22 +1470,22 @@ public: private: - static void patchPointer(void* where, void* value) + static void setPointer(void* where, void* value) { reinterpret_cast<void**>(where)[-1] = value; } - static void patchInt32(void* where, int32_t value) + static void setInt32(void* where, int32_t value) { reinterpret_cast<int32_t*>(where)[-1] = value; } - static void patchRel32(void* from, void* to) + static void setRel32(void* from, void* to) { intptr_t offset = reinterpret_cast<intptr_t>(to) - reinterpret_cast<intptr_t>(from); ASSERT(offset == static_cast<int32_t>(offset)); - patchInt32(from, offset); + setInt32(from, offset); } class X86InstructionFormatter { diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp index 5dae9523d0..0cb3813316 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp @@ -1319,8 +1319,12 @@ CodeBlock::~CodeBlock() } for (size_t size = m_methodCallLinkInfos.size(), i = 0; i < size; ++i) { - if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) + if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) { structure->deref(); + // Both members must be filled at the same time + ASSERT(m_methodCallLinkInfos[i].cachedPrototypeStructure); + m_methodCallLinkInfos[i].cachedPrototypeStructure->deref(); + } } unlinkCallers(); diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h index 64b6c98583..e9f2697ece 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h @@ -105,6 +105,7 @@ namespace JSC { CodeLocationNearCall callReturnLocation; CodeLocationDataLabelPtr hotPathBegin; CodeLocationNearCall hotPathOther; + CodeBlock* ownerCodeBlock; CodeBlock* callee; unsigned position; @@ -115,12 +116,14 @@ namespace JSC { struct MethodCallLinkInfo { MethodCallLinkInfo() : cachedStructure(0) + , cachedPrototypeStructure(0) { } CodeLocationCall callReturnLocation; CodeLocationDataLabelPtr structureLabel; Structure* cachedStructure; + Structure* cachedPrototypeStructure; }; struct FunctionRegisterInfo { @@ -221,7 +224,7 @@ namespace JSC { } #endif - class CodeBlock : public WTF::FastAllocBase { + class CodeBlock : public FastAllocBase { friend class JIT; public: CodeBlock(ScopeNode* ownerNode); @@ -317,6 +320,7 @@ namespace JSC { #endif #if ENABLE(JIT) + JITCode& getJITCode() { return ownerNode()->generatedJITCode(); } void setJITCode(JITCode); ExecutablePool* executablePool() { return ownerNode()->getExecutablePool(); } #endif @@ -493,7 +497,7 @@ namespace JSC { SymbolTable m_symbolTable; - struct ExceptionInfo { + struct ExceptionInfo : FastAllocBase { Vector<ExpressionRangeInfo> m_expressionInfo; Vector<LineInfo> m_lineInfo; Vector<GetByIdExceptionInfo> m_getByIdExceptionInfo; @@ -504,7 +508,7 @@ namespace JSC { }; OwnPtr<ExceptionInfo> m_exceptionInfo; - struct RareData { + struct RareData : FastAllocBase { Vector<HandlerInfo> m_exceptionHandlers; // Rare Constants diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h index 27b016eeb2..2d1ca981b7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h @@ -181,7 +181,7 @@ namespace JSC { #define OPCODE_ID_LENGTHS(id, length) const int id##_length = length; FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTHS); - #undef OPCODE_ID_SIZES + #undef OPCODE_ID_LENGTHS #define OPCODE_LENGTH(opcode) opcode##_length diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h index 7d7dc9c959..fa95603a0b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h @@ -140,7 +140,7 @@ namespace JSC { friend class HostCallRecord; #if ENABLE(OPCODE_SAMPLING) - class CallRecord : Noncopyable { + class CallRecord : public Noncopyable { public: CallRecord(SamplingTool* samplingTool) : m_samplingTool(samplingTool) @@ -170,7 +170,7 @@ namespace JSC { } }; #else - class CallRecord : Noncopyable { + class CallRecord : public Noncopyable { public: CallRecord(SamplingTool*) { diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h index 0223c2a137..3532ad802c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h @@ -35,7 +35,7 @@ namespace JSC { - class RegisterID : Noncopyable { + class RegisterID : public Noncopyable { public: RegisterID() : m_refCount(0) diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp index 4e16e259ad..94b96544a3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp @@ -113,8 +113,12 @@ #include "CommonIdentifiers.h" #include "NodeInfo.h" #include "Parser.h" +#include <wtf/FastMalloc.h> #include <wtf/MathExtras.h> +#define YYMALLOC fastMalloc +#define YYFREE fastFree + #define YYMAXDEPTH 10000 #define YYENABLE_NLS 0 @@ -165,12 +169,6 @@ static ExpressionNode* combineCommaNodes(void*, ExpressionNode* list, Expression #pragma warning(disable: 4244) #pragma warning(disable: 4702) -// At least some of the time, the declarations of malloc and free that bison -// generates are causing warnings. A way to avoid this is to explicitly define -// the macros so that bison doesn't try to declare malloc and free. -#define YYMALLOC malloc -#define YYFREE free - #endif #define YYPARSE_PARAM globalPtr @@ -232,7 +230,7 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D /* Line 189 of yacc.c */ -#line 236 "JavaScriptCore/tmp/../generated/Grammar.tab.c" +#line 234 "JavaScriptCore/tmp/../generated/Grammar.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -332,7 +330,7 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 157 "../parser/Grammar.y" +#line 155 "../parser/Grammar.y" int intValue; double doubleValue; @@ -367,7 +365,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 371 "JavaScriptCore/tmp/../generated/Grammar.tab.c" +#line 369 "JavaScriptCore/tmp/../generated/Grammar.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -392,7 +390,7 @@ typedef struct YYLTYPE /* Line 264 of yacc.c */ -#line 396 "JavaScriptCore/tmp/../generated/Grammar.tab.c" +#line 394 "JavaScriptCore/tmp/../generated/Grammar.tab.c" #ifdef short # undef short @@ -946,66 +944,66 @@ static const yytype_int16 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 290, 290, 291, 292, 293, 294, 295, 304, 316, - 317, 318, 319, 320, 332, 336, 343, 344, 345, 347, - 351, 352, 353, 354, 355, 359, 360, 361, 365, 369, - 377, 378, 382, 383, 387, 388, 389, 393, 397, 404, - 405, 409, 413, 420, 421, 428, 429, 436, 437, 438, - 442, 448, 449, 450, 454, 461, 462, 466, 470, 477, - 478, 482, 483, 487, 488, 489, 493, 494, 495, 499, - 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, - 512, 513, 517, 518, 522, 523, 524, 525, 529, 530, - 532, 534, 539, 540, 541, 545, 546, 548, 553, 554, - 555, 556, 560, 561, 562, 563, 567, 568, 569, 570, - 571, 572, 575, 581, 582, 583, 584, 585, 586, 593, - 594, 595, 596, 597, 598, 602, 609, 610, 611, 612, - 613, 617, 618, 620, 622, 624, 629, 630, 632, 633, - 635, 640, 641, 645, 646, 651, 652, 656, 657, 661, - 662, 667, 668, 673, 674, 678, 679, 684, 685, 690, - 691, 695, 696, 701, 702, 707, 708, 712, 713, 718, - 719, 723, 724, 729, 730, 735, 736, 741, 742, 749, - 750, 757, 758, 765, 766, 767, 768, 769, 770, 771, - 772, 773, 774, 775, 776, 780, 781, 785, 786, 790, - 791, 795, 796, 797, 798, 799, 800, 801, 802, 803, - 804, 805, 806, 807, 808, 809, 810, 811, 815, 817, - 822, 824, 830, 837, 846, 854, 867, 874, 883, 891, - 904, 906, 912, 920, 932, 933, 937, 941, 945, 949, - 951, 956, 959, 969, 971, 973, 975, 981, 988, 997, - 1003, 1014, 1015, 1019, 1020, 1024, 1028, 1032, 1036, 1043, - 1046, 1049, 1052, 1058, 1061, 1064, 1067, 1073, 1079, 1085, - 1086, 1095, 1096, 1100, 1106, 1116, 1117, 1121, 1122, 1126, - 1132, 1136, 1143, 1149, 1155, 1165, 1167, 1172, 1173, 1184, - 1185, 1192, 1193, 1203, 1206, 1212, 1213, 1217, 1218, 1223, - 1230, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1251, 1252, - 1253, 1254, 1255, 1259, 1260, 1264, 1265, 1266, 1268, 1272, - 1273, 1274, 1275, 1276, 1280, 1281, 1282, 1286, 1287, 1290, - 1292, 1296, 1297, 1301, 1302, 1303, 1304, 1305, 1309, 1310, - 1311, 1312, 1316, 1317, 1321, 1322, 1326, 1327, 1328, 1329, - 1333, 1334, 1335, 1336, 1340, 1341, 1345, 1346, 1350, 1351, - 1355, 1356, 1360, 1361, 1362, 1366, 1367, 1368, 1372, 1373, - 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1385, - 1386, 1390, 1391, 1395, 1396, 1397, 1398, 1402, 1403, 1404, - 1405, 1409, 1410, 1411, 1415, 1416, 1417, 1421, 1422, 1423, - 1424, 1428, 1429, 1430, 1431, 1435, 1436, 1437, 1438, 1439, - 1440, 1441, 1445, 1446, 1447, 1448, 1449, 1450, 1454, 1455, - 1456, 1457, 1458, 1459, 1460, 1464, 1465, 1466, 1467, 1468, - 1472, 1473, 1474, 1475, 1476, 1480, 1481, 1482, 1483, 1484, - 1488, 1489, 1493, 1494, 1498, 1499, 1503, 1504, 1508, 1509, - 1513, 1514, 1518, 1519, 1523, 1524, 1528, 1529, 1533, 1534, - 1538, 1539, 1543, 1544, 1548, 1549, 1553, 1554, 1558, 1559, - 1563, 1564, 1568, 1569, 1573, 1574, 1578, 1579, 1583, 1584, - 1588, 1589, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, - 1601, 1602, 1603, 1604, 1608, 1609, 1613, 1614, 1618, 1619, - 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, - 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1643, 1644, 1648, - 1649, 1653, 1654, 1655, 1656, 1660, 1661, 1662, 1663, 1667, - 1668, 1672, 1673, 1677, 1678, 1682, 1686, 1690, 1694, 1695, - 1699, 1700, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, - 1714, 1716, 1719, 1721, 1725, 1726, 1727, 1728, 1732, 1733, - 1734, 1735, 1739, 1740, 1741, 1742, 1746, 1750, 1754, 1755, - 1758, 1760, 1764, 1765, 1769, 1770, 1774, 1775, 1779, 1783, - 1784, 1788, 1789, 1790, 1794, 1795, 1799, 1800, 1804, 1805, - 1806, 1807, 1811, 1812, 1815, 1817, 1821, 1822 + 0, 288, 288, 289, 290, 291, 292, 293, 302, 314, + 315, 316, 317, 318, 330, 334, 341, 342, 343, 345, + 349, 350, 351, 352, 353, 357, 358, 359, 363, 367, + 375, 376, 380, 381, 385, 386, 387, 391, 395, 402, + 403, 407, 411, 418, 419, 426, 427, 434, 435, 436, + 440, 446, 447, 448, 452, 459, 460, 464, 468, 475, + 476, 480, 481, 485, 486, 487, 491, 492, 493, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, + 510, 511, 515, 516, 520, 521, 522, 523, 527, 528, + 530, 532, 537, 538, 539, 543, 544, 546, 551, 552, + 553, 554, 558, 559, 560, 561, 565, 566, 567, 568, + 569, 570, 573, 579, 580, 581, 582, 583, 584, 591, + 592, 593, 594, 595, 596, 600, 607, 608, 609, 610, + 611, 615, 616, 618, 620, 622, 627, 628, 630, 631, + 633, 638, 639, 643, 644, 649, 650, 654, 655, 659, + 660, 665, 666, 671, 672, 676, 677, 682, 683, 688, + 689, 693, 694, 699, 700, 705, 706, 710, 711, 716, + 717, 721, 722, 727, 728, 733, 734, 739, 740, 747, + 748, 755, 756, 763, 764, 765, 766, 767, 768, 769, + 770, 771, 772, 773, 774, 778, 779, 783, 784, 788, + 789, 793, 794, 795, 796, 797, 798, 799, 800, 801, + 802, 803, 804, 805, 806, 807, 808, 809, 813, 815, + 820, 822, 828, 835, 844, 852, 865, 872, 881, 889, + 902, 904, 910, 918, 930, 931, 935, 939, 943, 947, + 949, 954, 957, 967, 969, 971, 973, 979, 986, 995, + 1001, 1012, 1013, 1017, 1018, 1022, 1026, 1030, 1034, 1041, + 1044, 1047, 1050, 1056, 1059, 1062, 1065, 1071, 1077, 1083, + 1084, 1093, 1094, 1098, 1104, 1114, 1115, 1119, 1120, 1124, + 1130, 1134, 1141, 1147, 1153, 1163, 1165, 1170, 1171, 1182, + 1183, 1190, 1191, 1201, 1204, 1210, 1211, 1215, 1216, 1221, + 1228, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1249, 1250, + 1251, 1252, 1253, 1257, 1258, 1262, 1263, 1264, 1266, 1270, + 1271, 1272, 1273, 1274, 1278, 1279, 1280, 1284, 1285, 1288, + 1290, 1294, 1295, 1299, 1300, 1301, 1302, 1303, 1307, 1308, + 1309, 1310, 1314, 1315, 1319, 1320, 1324, 1325, 1326, 1327, + 1331, 1332, 1333, 1334, 1338, 1339, 1343, 1344, 1348, 1349, + 1353, 1354, 1358, 1359, 1360, 1364, 1365, 1366, 1370, 1371, + 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1383, + 1384, 1388, 1389, 1393, 1394, 1395, 1396, 1400, 1401, 1402, + 1403, 1407, 1408, 1409, 1413, 1414, 1415, 1419, 1420, 1421, + 1422, 1426, 1427, 1428, 1429, 1433, 1434, 1435, 1436, 1437, + 1438, 1439, 1443, 1444, 1445, 1446, 1447, 1448, 1452, 1453, + 1454, 1455, 1456, 1457, 1458, 1462, 1463, 1464, 1465, 1466, + 1470, 1471, 1472, 1473, 1474, 1478, 1479, 1480, 1481, 1482, + 1486, 1487, 1491, 1492, 1496, 1497, 1501, 1502, 1506, 1507, + 1511, 1512, 1516, 1517, 1521, 1522, 1526, 1527, 1531, 1532, + 1536, 1537, 1541, 1542, 1546, 1547, 1551, 1552, 1556, 1557, + 1561, 1562, 1566, 1567, 1571, 1572, 1576, 1577, 1581, 1582, + 1586, 1587, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, + 1599, 1600, 1601, 1602, 1606, 1607, 1611, 1612, 1616, 1617, + 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, + 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1641, 1642, 1646, + 1647, 1651, 1652, 1653, 1654, 1658, 1659, 1660, 1661, 1665, + 1666, 1670, 1671, 1675, 1676, 1680, 1684, 1688, 1692, 1693, + 1697, 1698, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, + 1712, 1714, 1717, 1719, 1723, 1724, 1725, 1726, 1730, 1731, + 1732, 1733, 1737, 1738, 1739, 1740, 1744, 1748, 1752, 1753, + 1756, 1758, 1762, 1763, 1767, 1768, 1772, 1773, 1777, 1781, + 1782, 1786, 1787, 1788, 1792, 1793, 1797, 1798, 1802, 1803, + 1804, 1805, 1809, 1810, 1813, 1815, 1819, 1820 }; #endif @@ -2970,42 +2968,42 @@ yyreduce: case 2: /* Line 1455 of yacc.c */ -#line 290 "../parser/Grammar.y" +#line 288 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NullNode(GLOBAL_DATA), 0, 1); ;} break; case 3: /* Line 1455 of yacc.c */ -#line 291 "../parser/Grammar.y" +#line 289 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, true), 0, 1); ;} break; case 4: /* Line 1455 of yacc.c */ -#line 292 "../parser/Grammar.y" +#line 290 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, false), 0, 1); ;} break; case 5: /* Line 1455 of yacc.c */ -#line 293 "../parser/Grammar.y" +#line 291 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNumberNode(GLOBAL_DATA, (yyvsp[(1) - (1)].doubleValue)), 0, 1); ;} break; case 6: /* Line 1455 of yacc.c */ -#line 294 "../parser/Grammar.y" +#line 292 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StringNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)), 0, 1); ;} break; case 7: /* Line 1455 of yacc.c */ -#line 295 "../parser/Grammar.y" +#line 293 "../parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) @@ -3020,7 +3018,7 @@ yyreduce: case 8: /* Line 1455 of yacc.c */ -#line 304 "../parser/Grammar.y" +#line 302 "../parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) @@ -3035,35 +3033,35 @@ yyreduce: case 9: /* Line 1455 of yacc.c */ -#line 316 "../parser/Grammar.y" +#line 314 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 10: /* Line 1455 of yacc.c */ -#line 317 "../parser/Grammar.y" +#line 315 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 11: /* Line 1455 of yacc.c */ -#line 318 "../parser/Grammar.y" +#line 316 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, Identifier(GLOBAL_DATA, UString::from((yyvsp[(1) - (3)].doubleValue))), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 12: /* Line 1455 of yacc.c */ -#line 319 "../parser/Grammar.y" +#line 317 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (7)].ident), *(yyvsp[(2) - (7)].ident), 0, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); if (!(yyval.propertyNode).m_node) YYABORT; ;} break; case 13: /* Line 1455 of yacc.c */ -#line 321 "../parser/Grammar.y" +#line 319 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (8)].ident), *(yyvsp[(2) - (8)].ident), (yyvsp[(4) - (8)].parameterList).m_node.head, (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line)), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature) @@ -3077,7 +3075,7 @@ yyreduce: case 14: /* Line 1455 of yacc.c */ -#line 332 "../parser/Grammar.y" +#line 330 "../parser/Grammar.y" { (yyval.propertyList).m_node.head = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].propertyNode).m_node); (yyval.propertyList).m_node.tail = (yyval.propertyList).m_node.head; (yyval.propertyList).m_features = (yyvsp[(1) - (1)].propertyNode).m_features; @@ -3087,7 +3085,7 @@ yyreduce: case 15: /* Line 1455 of yacc.c */ -#line 336 "../parser/Grammar.y" +#line 334 "../parser/Grammar.y" { (yyval.propertyList).m_node.head = (yyvsp[(1) - (3)].propertyList).m_node.head; (yyval.propertyList).m_node.tail = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(3) - (3)].propertyNode).m_node, (yyvsp[(1) - (3)].propertyList).m_node.tail); (yyval.propertyList).m_features = (yyvsp[(1) - (3)].propertyList).m_features | (yyvsp[(3) - (3)].propertyNode).m_features; @@ -3097,70 +3095,70 @@ yyreduce: case 17: /* Line 1455 of yacc.c */ -#line 344 "../parser/Grammar.y" +#line 342 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA), 0, 0); ;} break; case 18: /* Line 1455 of yacc.c */ -#line 345 "../parser/Grammar.y" +#line 343 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (3)].propertyList).m_node.head), (yyvsp[(2) - (3)].propertyList).m_features, (yyvsp[(2) - (3)].propertyList).m_numConstants); ;} break; case 19: /* Line 1455 of yacc.c */ -#line 347 "../parser/Grammar.y" +#line 345 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (4)].propertyList).m_node.head), (yyvsp[(2) - (4)].propertyList).m_features, (yyvsp[(2) - (4)].propertyList).m_numConstants); ;} break; case 20: /* Line 1455 of yacc.c */ -#line 351 "../parser/Grammar.y" +#line 349 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ThisNode(GLOBAL_DATA), ThisFeature, 0); ;} break; case 23: /* Line 1455 of yacc.c */ -#line 354 "../parser/Grammar.y" +#line 352 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), (yylsp[(1) - (1)]).first_column), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 24: /* Line 1455 of yacc.c */ -#line 355 "../parser/Grammar.y" +#line 353 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (3)].expressionNode); ;} break; case 25: /* Line 1455 of yacc.c */ -#line 359 "../parser/Grammar.y" +#line 357 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].intValue)), 0, (yyvsp[(2) - (3)].intValue) ? 1 : 0); ;} break; case 26: /* Line 1455 of yacc.c */ -#line 360 "../parser/Grammar.y" +#line 358 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].elementList).m_node.head), (yyvsp[(2) - (3)].elementList).m_features, (yyvsp[(2) - (3)].elementList).m_numConstants); ;} break; case 27: /* Line 1455 of yacc.c */ -#line 361 "../parser/Grammar.y" +#line 359 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(4) - (5)].intValue), (yyvsp[(2) - (5)].elementList).m_node.head), (yyvsp[(2) - (5)].elementList).m_features, (yyvsp[(4) - (5)].intValue) ? (yyvsp[(2) - (5)].elementList).m_numConstants + 1 : (yyvsp[(2) - (5)].elementList).m_numConstants); ;} break; case 28: /* Line 1455 of yacc.c */ -#line 365 "../parser/Grammar.y" +#line 363 "../parser/Grammar.y" { (yyval.elementList).m_node.head = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].intValue), (yyvsp[(2) - (2)].expressionNode).m_node); (yyval.elementList).m_node.tail = (yyval.elementList).m_node.head; (yyval.elementList).m_features = (yyvsp[(2) - (2)].expressionNode).m_features; @@ -3170,7 +3168,7 @@ yyreduce: case 29: /* Line 1455 of yacc.c */ -#line 370 "../parser/Grammar.y" +#line 368 "../parser/Grammar.y" { (yyval.elementList).m_node.head = (yyvsp[(1) - (4)].elementList).m_node.head; (yyval.elementList).m_node.tail = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (4)].elementList).m_node.tail, (yyvsp[(3) - (4)].intValue), (yyvsp[(4) - (4)].expressionNode).m_node); (yyval.elementList).m_features = (yyvsp[(1) - (4)].elementList).m_features | (yyvsp[(4) - (4)].expressionNode).m_features; @@ -3180,35 +3178,35 @@ yyreduce: case 30: /* Line 1455 of yacc.c */ -#line 377 "../parser/Grammar.y" +#line 375 "../parser/Grammar.y" { (yyval.intValue) = 0; ;} break; case 32: /* Line 1455 of yacc.c */ -#line 382 "../parser/Grammar.y" +#line 380 "../parser/Grammar.y" { (yyval.intValue) = 1; ;} break; case 33: /* Line 1455 of yacc.c */ -#line 383 "../parser/Grammar.y" +#line 381 "../parser/Grammar.y" { (yyval.intValue) = (yyvsp[(1) - (2)].intValue) + 1; ;} break; case 35: /* Line 1455 of yacc.c */ -#line 388 "../parser/Grammar.y" +#line 386 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>((yyvsp[(1) - (1)].funcExprNode).m_node, (yyvsp[(1) - (1)].funcExprNode).m_features, (yyvsp[(1) - (1)].funcExprNode).m_numConstants); ;} break; case 36: /* Line 1455 of yacc.c */ -#line 389 "../parser/Grammar.y" +#line 387 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants); @@ -3218,7 +3216,7 @@ yyreduce: case 37: /* Line 1455 of yacc.c */ -#line 393 "../parser/Grammar.y" +#line 391 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); @@ -3228,7 +3226,7 @@ yyreduce: case 38: /* Line 1455 of yacc.c */ -#line 397 "../parser/Grammar.y" +#line 395 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].argumentsNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].argumentsNode).m_numConstants); @@ -3238,7 +3236,7 @@ yyreduce: case 40: /* Line 1455 of yacc.c */ -#line 405 "../parser/Grammar.y" +#line 403 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants); @@ -3248,7 +3246,7 @@ yyreduce: case 41: /* Line 1455 of yacc.c */ -#line 409 "../parser/Grammar.y" +#line 407 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); @@ -3258,7 +3256,7 @@ yyreduce: case 42: /* Line 1455 of yacc.c */ -#line 413 "../parser/Grammar.y" +#line 411 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].argumentsNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].argumentsNode).m_numConstants); @@ -3268,7 +3266,7 @@ yyreduce: case 44: /* Line 1455 of yacc.c */ -#line 421 "../parser/Grammar.y" +#line 419 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); @@ -3278,7 +3276,7 @@ yyreduce: case 46: /* Line 1455 of yacc.c */ -#line 429 "../parser/Grammar.y" +#line 427 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); @@ -3288,21 +3286,21 @@ yyreduce: case 47: /* Line 1455 of yacc.c */ -#line 436 "../parser/Grammar.y" +#line 434 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 48: /* Line 1455 of yacc.c */ -#line 437 "../parser/Grammar.y" +#line 435 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 49: /* Line 1455 of yacc.c */ -#line 438 "../parser/Grammar.y" +#line 436 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants); @@ -3312,7 +3310,7 @@ yyreduce: case 50: /* Line 1455 of yacc.c */ -#line 442 "../parser/Grammar.y" +#line 440 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); ;} @@ -3321,21 +3319,21 @@ yyreduce: case 51: /* Line 1455 of yacc.c */ -#line 448 "../parser/Grammar.y" +#line 446 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 52: /* Line 1455 of yacc.c */ -#line 449 "../parser/Grammar.y" +#line 447 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 53: /* Line 1455 of yacc.c */ -#line 450 "../parser/Grammar.y" +#line 448 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants); @@ -3345,7 +3343,7 @@ yyreduce: case 54: /* Line 1455 of yacc.c */ -#line 454 "../parser/Grammar.y" +#line 452 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); @@ -3355,21 +3353,21 @@ yyreduce: case 55: /* Line 1455 of yacc.c */ -#line 461 "../parser/Grammar.y" +#line 459 "../parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA), 0, 0); ;} break; case 56: /* Line 1455 of yacc.c */ -#line 462 "../parser/Grammar.y" +#line 460 "../parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA, (yyvsp[(2) - (3)].argumentList).m_node.head), (yyvsp[(2) - (3)].argumentList).m_features, (yyvsp[(2) - (3)].argumentList).m_numConstants); ;} break; case 57: /* Line 1455 of yacc.c */ -#line 466 "../parser/Grammar.y" +#line 464 "../parser/Grammar.y" { (yyval.argumentList).m_node.head = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].expressionNode).m_node); (yyval.argumentList).m_node.tail = (yyval.argumentList).m_node.head; (yyval.argumentList).m_features = (yyvsp[(1) - (1)].expressionNode).m_features; @@ -3379,7 +3377,7 @@ yyreduce: case 58: /* Line 1455 of yacc.c */ -#line 470 "../parser/Grammar.y" +#line 468 "../parser/Grammar.y" { (yyval.argumentList).m_node.head = (yyvsp[(1) - (3)].argumentList).m_node.head; (yyval.argumentList).m_node.tail = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (3)].argumentList).m_node.tail, (yyvsp[(3) - (3)].expressionNode).m_node); (yyval.argumentList).m_features = (yyvsp[(1) - (3)].argumentList).m_features | (yyvsp[(3) - (3)].expressionNode).m_features; @@ -3389,252 +3387,252 @@ yyreduce: case 64: /* Line 1455 of yacc.c */ -#line 488 "../parser/Grammar.y" +#line 486 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 65: /* Line 1455 of yacc.c */ -#line 489 "../parser/Grammar.y" +#line 487 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 67: /* Line 1455 of yacc.c */ -#line 494 "../parser/Grammar.y" +#line 492 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 68: /* Line 1455 of yacc.c */ -#line 495 "../parser/Grammar.y" +#line 493 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 69: /* Line 1455 of yacc.c */ -#line 499 "../parser/Grammar.y" +#line 497 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDeleteNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 70: /* Line 1455 of yacc.c */ -#line 500 "../parser/Grammar.y" +#line 498 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) VoidNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants + 1); ;} break; case 71: /* Line 1455 of yacc.c */ -#line 501 "../parser/Grammar.y" +#line 499 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeTypeOfNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 72: /* Line 1455 of yacc.c */ -#line 502 "../parser/Grammar.y" +#line 500 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 73: /* Line 1455 of yacc.c */ -#line 503 "../parser/Grammar.y" +#line 501 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 74: /* Line 1455 of yacc.c */ -#line 504 "../parser/Grammar.y" +#line 502 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 75: /* Line 1455 of yacc.c */ -#line 505 "../parser/Grammar.y" +#line 503 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 76: /* Line 1455 of yacc.c */ -#line 506 "../parser/Grammar.y" +#line 504 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnaryPlusNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 77: /* Line 1455 of yacc.c */ -#line 507 "../parser/Grammar.y" +#line 505 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNegateNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 78: /* Line 1455 of yacc.c */ -#line 508 "../parser/Grammar.y" +#line 506 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeBitwiseNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 79: /* Line 1455 of yacc.c */ -#line 509 "../parser/Grammar.y" +#line 507 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 85: /* Line 1455 of yacc.c */ -#line 523 "../parser/Grammar.y" +#line 521 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 86: /* Line 1455 of yacc.c */ -#line 524 "../parser/Grammar.y" +#line 522 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 87: /* Line 1455 of yacc.c */ -#line 525 "../parser/Grammar.y" +#line 523 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 89: /* Line 1455 of yacc.c */ -#line 531 "../parser/Grammar.y" +#line 529 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 90: /* Line 1455 of yacc.c */ -#line 533 "../parser/Grammar.y" +#line 531 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 91: /* Line 1455 of yacc.c */ -#line 535 "../parser/Grammar.y" +#line 533 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 93: /* Line 1455 of yacc.c */ -#line 540 "../parser/Grammar.y" +#line 538 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 94: /* Line 1455 of yacc.c */ -#line 541 "../parser/Grammar.y" +#line 539 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 96: /* Line 1455 of yacc.c */ -#line 547 "../parser/Grammar.y" +#line 545 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 97: /* Line 1455 of yacc.c */ -#line 549 "../parser/Grammar.y" +#line 547 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 99: /* Line 1455 of yacc.c */ -#line 554 "../parser/Grammar.y" +#line 552 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 100: /* Line 1455 of yacc.c */ -#line 555 "../parser/Grammar.y" +#line 553 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 101: /* Line 1455 of yacc.c */ -#line 556 "../parser/Grammar.y" +#line 554 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 103: /* Line 1455 of yacc.c */ -#line 561 "../parser/Grammar.y" +#line 559 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 104: /* Line 1455 of yacc.c */ -#line 562 "../parser/Grammar.y" +#line 560 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 105: /* Line 1455 of yacc.c */ -#line 563 "../parser/Grammar.y" +#line 561 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 107: /* Line 1455 of yacc.c */ -#line 568 "../parser/Grammar.y" +#line 566 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 108: /* Line 1455 of yacc.c */ -#line 569 "../parser/Grammar.y" +#line 567 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 109: /* Line 1455 of yacc.c */ -#line 570 "../parser/Grammar.y" +#line 568 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 110: /* Line 1455 of yacc.c */ -#line 571 "../parser/Grammar.y" +#line 569 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 111: /* Line 1455 of yacc.c */ -#line 572 "../parser/Grammar.y" +#line 570 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3643,7 +3641,7 @@ yyreduce: case 112: /* Line 1455 of yacc.c */ -#line 575 "../parser/Grammar.y" +#line 573 "../parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3652,35 +3650,35 @@ yyreduce: case 114: /* Line 1455 of yacc.c */ -#line 582 "../parser/Grammar.y" +#line 580 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 115: /* Line 1455 of yacc.c */ -#line 583 "../parser/Grammar.y" +#line 581 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 116: /* Line 1455 of yacc.c */ -#line 584 "../parser/Grammar.y" +#line 582 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 117: /* Line 1455 of yacc.c */ -#line 585 "../parser/Grammar.y" +#line 583 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 118: /* Line 1455 of yacc.c */ -#line 587 "../parser/Grammar.y" +#line 585 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3689,35 +3687,35 @@ yyreduce: case 120: /* Line 1455 of yacc.c */ -#line 594 "../parser/Grammar.y" +#line 592 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 121: /* Line 1455 of yacc.c */ -#line 595 "../parser/Grammar.y" +#line 593 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 122: /* Line 1455 of yacc.c */ -#line 596 "../parser/Grammar.y" +#line 594 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 123: /* Line 1455 of yacc.c */ -#line 597 "../parser/Grammar.y" +#line 595 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 124: /* Line 1455 of yacc.c */ -#line 599 "../parser/Grammar.y" +#line 597 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3726,7 +3724,7 @@ yyreduce: case 125: /* Line 1455 of yacc.c */ -#line 603 "../parser/Grammar.y" +#line 601 "../parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3735,217 +3733,217 @@ yyreduce: case 127: /* Line 1455 of yacc.c */ -#line 610 "../parser/Grammar.y" +#line 608 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 128: /* Line 1455 of yacc.c */ -#line 611 "../parser/Grammar.y" +#line 609 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 129: /* Line 1455 of yacc.c */ -#line 612 "../parser/Grammar.y" +#line 610 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 130: /* Line 1455 of yacc.c */ -#line 613 "../parser/Grammar.y" +#line 611 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 132: /* Line 1455 of yacc.c */ -#line 619 "../parser/Grammar.y" +#line 617 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 133: /* Line 1455 of yacc.c */ -#line 621 "../parser/Grammar.y" +#line 619 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 134: /* Line 1455 of yacc.c */ -#line 623 "../parser/Grammar.y" +#line 621 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 135: /* Line 1455 of yacc.c */ -#line 625 "../parser/Grammar.y" +#line 623 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 137: /* Line 1455 of yacc.c */ -#line 631 "../parser/Grammar.y" +#line 629 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 138: /* Line 1455 of yacc.c */ -#line 632 "../parser/Grammar.y" +#line 630 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 139: /* Line 1455 of yacc.c */ -#line 634 "../parser/Grammar.y" +#line 632 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 140: /* Line 1455 of yacc.c */ -#line 636 "../parser/Grammar.y" +#line 634 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 142: /* Line 1455 of yacc.c */ -#line 641 "../parser/Grammar.y" +#line 639 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 144: /* Line 1455 of yacc.c */ -#line 647 "../parser/Grammar.y" +#line 645 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 146: /* Line 1455 of yacc.c */ -#line 652 "../parser/Grammar.y" +#line 650 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 148: /* Line 1455 of yacc.c */ -#line 657 "../parser/Grammar.y" +#line 655 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 150: /* Line 1455 of yacc.c */ -#line 663 "../parser/Grammar.y" +#line 661 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 152: /* Line 1455 of yacc.c */ -#line 669 "../parser/Grammar.y" +#line 667 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 154: /* Line 1455 of yacc.c */ -#line 674 "../parser/Grammar.y" +#line 672 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 156: /* Line 1455 of yacc.c */ -#line 680 "../parser/Grammar.y" +#line 678 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 158: /* Line 1455 of yacc.c */ -#line 686 "../parser/Grammar.y" +#line 684 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 160: /* Line 1455 of yacc.c */ -#line 691 "../parser/Grammar.y" +#line 689 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 162: /* Line 1455 of yacc.c */ -#line 697 "../parser/Grammar.y" +#line 695 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 164: /* Line 1455 of yacc.c */ -#line 703 "../parser/Grammar.y" +#line 701 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 166: /* Line 1455 of yacc.c */ -#line 708 "../parser/Grammar.y" +#line 706 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 168: /* Line 1455 of yacc.c */ -#line 714 "../parser/Grammar.y" +#line 712 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 170: /* Line 1455 of yacc.c */ -#line 719 "../parser/Grammar.y" +#line 717 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 172: /* Line 1455 of yacc.c */ -#line 725 "../parser/Grammar.y" +#line 723 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 174: /* Line 1455 of yacc.c */ -#line 731 "../parser/Grammar.y" +#line 729 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 176: /* Line 1455 of yacc.c */ -#line 737 "../parser/Grammar.y" +#line 735 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 178: /* Line 1455 of yacc.c */ -#line 743 "../parser/Grammar.y" +#line 741 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3954,7 +3952,7 @@ yyreduce: case 180: /* Line 1455 of yacc.c */ -#line 751 "../parser/Grammar.y" +#line 749 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3963,7 +3961,7 @@ yyreduce: case 182: /* Line 1455 of yacc.c */ -#line 759 "../parser/Grammar.y" +#line 757 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3972,112 +3970,112 @@ yyreduce: case 183: /* Line 1455 of yacc.c */ -#line 765 "../parser/Grammar.y" +#line 763 "../parser/Grammar.y" { (yyval.op) = OpEqual; ;} break; case 184: /* Line 1455 of yacc.c */ -#line 766 "../parser/Grammar.y" +#line 764 "../parser/Grammar.y" { (yyval.op) = OpPlusEq; ;} break; case 185: /* Line 1455 of yacc.c */ -#line 767 "../parser/Grammar.y" +#line 765 "../parser/Grammar.y" { (yyval.op) = OpMinusEq; ;} break; case 186: /* Line 1455 of yacc.c */ -#line 768 "../parser/Grammar.y" +#line 766 "../parser/Grammar.y" { (yyval.op) = OpMultEq; ;} break; case 187: /* Line 1455 of yacc.c */ -#line 769 "../parser/Grammar.y" +#line 767 "../parser/Grammar.y" { (yyval.op) = OpDivEq; ;} break; case 188: /* Line 1455 of yacc.c */ -#line 770 "../parser/Grammar.y" +#line 768 "../parser/Grammar.y" { (yyval.op) = OpLShift; ;} break; case 189: /* Line 1455 of yacc.c */ -#line 771 "../parser/Grammar.y" +#line 769 "../parser/Grammar.y" { (yyval.op) = OpRShift; ;} break; case 190: /* Line 1455 of yacc.c */ -#line 772 "../parser/Grammar.y" +#line 770 "../parser/Grammar.y" { (yyval.op) = OpURShift; ;} break; case 191: /* Line 1455 of yacc.c */ -#line 773 "../parser/Grammar.y" +#line 771 "../parser/Grammar.y" { (yyval.op) = OpAndEq; ;} break; case 192: /* Line 1455 of yacc.c */ -#line 774 "../parser/Grammar.y" +#line 772 "../parser/Grammar.y" { (yyval.op) = OpXOrEq; ;} break; case 193: /* Line 1455 of yacc.c */ -#line 775 "../parser/Grammar.y" +#line 773 "../parser/Grammar.y" { (yyval.op) = OpOrEq; ;} break; case 194: /* Line 1455 of yacc.c */ -#line 776 "../parser/Grammar.y" +#line 774 "../parser/Grammar.y" { (yyval.op) = OpModEq; ;} break; case 196: /* Line 1455 of yacc.c */ -#line 781 "../parser/Grammar.y" +#line 779 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 198: /* Line 1455 of yacc.c */ -#line 786 "../parser/Grammar.y" +#line 784 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 200: /* Line 1455 of yacc.c */ -#line 791 "../parser/Grammar.y" +#line 789 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 218: /* Line 1455 of yacc.c */ -#line 815 "../parser/Grammar.y" +#line 813 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, 0), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; @@ -4085,7 +4083,7 @@ yyreduce: case 219: /* Line 1455 of yacc.c */ -#line 817 "../parser/Grammar.y" +#line 815 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].sourceElements).m_node), (yyvsp[(2) - (3)].sourceElements).m_varDeclarations, (yyvsp[(2) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (3)].sourceElements).m_features, (yyvsp[(2) - (3)].sourceElements).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; @@ -4093,7 +4091,7 @@ yyreduce: case 220: /* Line 1455 of yacc.c */ -#line 822 "../parser/Grammar.y" +#line 820 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; @@ -4101,7 +4099,7 @@ yyreduce: case 221: /* Line 1455 of yacc.c */ -#line 824 "../parser/Grammar.y" +#line 822 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} @@ -4110,7 +4108,7 @@ yyreduce: case 222: /* Line 1455 of yacc.c */ -#line 830 "../parser/Grammar.y" +#line 828 "../parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(1) - (1)].ident), 0); @@ -4123,7 +4121,7 @@ yyreduce: case 223: /* Line 1455 of yacc.c */ -#line 837 "../parser/Grammar.y" +#line 835 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); (yyval.varDeclList).m_node = node; @@ -4138,7 +4136,7 @@ yyreduce: case 224: /* Line 1455 of yacc.c */ -#line 847 "../parser/Grammar.y" +#line 845 "../parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(3) - (3)].ident), 0); @@ -4151,7 +4149,7 @@ yyreduce: case 225: /* Line 1455 of yacc.c */ -#line 855 "../parser/Grammar.y" +#line 853 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); (yyval.varDeclList).m_node = combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (4)].varDeclList).m_node, node); @@ -4166,7 +4164,7 @@ yyreduce: case 226: /* Line 1455 of yacc.c */ -#line 867 "../parser/Grammar.y" +#line 865 "../parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(1) - (1)].ident), 0); @@ -4179,7 +4177,7 @@ yyreduce: case 227: /* Line 1455 of yacc.c */ -#line 874 "../parser/Grammar.y" +#line 872 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); (yyval.varDeclList).m_node = node; @@ -4194,7 +4192,7 @@ yyreduce: case 228: /* Line 1455 of yacc.c */ -#line 884 "../parser/Grammar.y" +#line 882 "../parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(3) - (3)].ident), 0); @@ -4207,7 +4205,7 @@ yyreduce: case 229: /* Line 1455 of yacc.c */ -#line 892 "../parser/Grammar.y" +#line 890 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); (yyval.varDeclList).m_node = combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (4)].varDeclList).m_node, node); @@ -4222,7 +4220,7 @@ yyreduce: case 230: /* Line 1455 of yacc.c */ -#line 904 "../parser/Grammar.y" +#line 902 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; @@ -4230,7 +4228,7 @@ yyreduce: case 231: /* Line 1455 of yacc.c */ -#line 907 "../parser/Grammar.y" +#line 905 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} break; @@ -4238,7 +4236,7 @@ yyreduce: case 232: /* Line 1455 of yacc.c */ -#line 912 "../parser/Grammar.y" +#line 910 "../parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (1)].constDeclNode).m_node; (yyval.constDeclList).m_node.tail = (yyval.constDeclList).m_node.head; (yyval.constDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; @@ -4252,7 +4250,7 @@ yyreduce: case 233: /* Line 1455 of yacc.c */ -#line 921 "../parser/Grammar.y" +#line 919 "../parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (3)].constDeclList).m_node.head; (yyvsp[(1) - (3)].constDeclList).m_node.tail->m_next = (yyvsp[(3) - (3)].constDeclNode).m_node; (yyval.constDeclList).m_node.tail = (yyvsp[(3) - (3)].constDeclNode).m_node; @@ -4266,42 +4264,42 @@ yyreduce: case 234: /* Line 1455 of yacc.c */ -#line 932 "../parser/Grammar.y" +#line 930 "../parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), 0), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 235: /* Line 1455 of yacc.c */ -#line 933 "../parser/Grammar.y" +#line 931 "../parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node), ((*(yyvsp[(1) - (2)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 236: /* Line 1455 of yacc.c */ -#line 937 "../parser/Grammar.y" +#line 935 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 237: /* Line 1455 of yacc.c */ -#line 941 "../parser/Grammar.y" +#line 939 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 238: /* Line 1455 of yacc.c */ -#line 945 "../parser/Grammar.y" +#line 943 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) EmptyStatementNode(GLOBAL_DATA), 0, 0, 0, 0); ;} break; case 239: /* Line 1455 of yacc.c */ -#line 949 "../parser/Grammar.y" +#line 947 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; @@ -4309,7 +4307,7 @@ yyreduce: case 240: /* Line 1455 of yacc.c */ -#line 951 "../parser/Grammar.y" +#line 949 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; @@ -4317,7 +4315,7 @@ yyreduce: case 241: /* Line 1455 of yacc.c */ -#line 957 "../parser/Grammar.y" +#line 955 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; @@ -4325,7 +4323,7 @@ yyreduce: case 242: /* Line 1455 of yacc.c */ -#line 960 "../parser/Grammar.y" +#line 958 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfElseNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].statementNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node), mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_funcDeclarations, (yyvsp[(7) - (7)].statementNode).m_funcDeclarations), @@ -4337,7 +4335,7 @@ yyreduce: case 243: /* Line 1455 of yacc.c */ -#line 969 "../parser/Grammar.y" +#line 967 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; @@ -4345,7 +4343,7 @@ yyreduce: case 244: /* Line 1455 of yacc.c */ -#line 971 "../parser/Grammar.y" +#line 969 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; @@ -4353,7 +4351,7 @@ yyreduce: case 245: /* Line 1455 of yacc.c */ -#line 973 "../parser/Grammar.y" +#line 971 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WhileNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; @@ -4361,7 +4359,7 @@ yyreduce: case 246: /* Line 1455 of yacc.c */ -#line 976 "../parser/Grammar.y" +#line 974 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(3) - (9)].expressionNode).m_node, (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, false), (yyvsp[(9) - (9)].statementNode).m_varDeclarations, (yyvsp[(9) - (9)].statementNode).m_funcDeclarations, (yyvsp[(3) - (9)].expressionNode).m_features | (yyvsp[(5) - (9)].expressionNode).m_features | (yyvsp[(7) - (9)].expressionNode).m_features | (yyvsp[(9) - (9)].statementNode).m_features, (yyvsp[(3) - (9)].expressionNode).m_numConstants + (yyvsp[(5) - (9)].expressionNode).m_numConstants + (yyvsp[(7) - (9)].expressionNode).m_numConstants + (yyvsp[(9) - (9)].statementNode).m_numConstants); @@ -4372,7 +4370,7 @@ yyreduce: case 247: /* Line 1455 of yacc.c */ -#line 982 "../parser/Grammar.y" +#line 980 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(4) - (10)].varDeclList).m_node, (yyvsp[(6) - (10)].expressionNode).m_node, (yyvsp[(8) - (10)].expressionNode).m_node, (yyvsp[(10) - (10)].statementNode).m_node, true), mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_varDeclarations, (yyvsp[(10) - (10)].statementNode).m_varDeclarations), mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_funcDeclarations, (yyvsp[(10) - (10)].statementNode).m_funcDeclarations), @@ -4384,7 +4382,7 @@ yyreduce: case 248: /* Line 1455 of yacc.c */ -#line 989 "../parser/Grammar.y" +#line 987 "../parser/Grammar.y" { ForInNode* node = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (7)]).first_column, (yylsp[(3) - (7)]).last_column, (yylsp[(5) - (7)]).last_column); @@ -4398,7 +4396,7 @@ yyreduce: case 249: /* Line 1455 of yacc.c */ -#line 998 "../parser/Grammar.y" +#line 996 "../parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (8)].ident), 0, (yyvsp[(6) - (8)].expressionNode).m_node, (yyvsp[(8) - (8)].statementNode).m_node, (yylsp[(5) - (8)]).first_column, (yylsp[(5) - (8)]).first_column - (yylsp[(4) - (8)]).first_column, (yylsp[(6) - (8)]).last_column - (yylsp[(5) - (8)]).first_column); SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (8)]).first_column, (yylsp[(5) - (8)]).first_column + 1, (yylsp[(6) - (8)]).last_column); appendToVarDeclarationList(GLOBAL_DATA, (yyvsp[(8) - (8)].statementNode).m_varDeclarations, *(yyvsp[(4) - (8)].ident), DeclarationStacks::HasInitializer); @@ -4409,7 +4407,7 @@ yyreduce: case 250: /* Line 1455 of yacc.c */ -#line 1004 "../parser/Grammar.y" +#line 1002 "../parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (9)].ident), (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, (yylsp[(5) - (9)]).first_column, (yylsp[(5) - (9)]).first_column - (yylsp[(4) - (9)]).first_column, (yylsp[(5) - (9)]).last_column - (yylsp[(5) - (9)]).first_column); SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (9)]).first_column, (yylsp[(6) - (9)]).first_column + 1, (yylsp[(7) - (9)]).last_column); appendToVarDeclarationList(GLOBAL_DATA, (yyvsp[(9) - (9)].statementNode).m_varDeclarations, *(yyvsp[(4) - (9)].ident), DeclarationStacks::HasInitializer); @@ -4422,21 +4420,21 @@ yyreduce: case 251: /* Line 1455 of yacc.c */ -#line 1014 "../parser/Grammar.y" +#line 1012 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 253: /* Line 1455 of yacc.c */ -#line 1019 "../parser/Grammar.y" +#line 1017 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 255: /* Line 1455 of yacc.c */ -#line 1024 "../parser/Grammar.y" +#line 1022 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); @@ -4446,7 +4444,7 @@ yyreduce: case 256: /* Line 1455 of yacc.c */ -#line 1028 "../parser/Grammar.y" +#line 1026 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); @@ -4456,7 +4454,7 @@ yyreduce: case 257: /* Line 1455 of yacc.c */ -#line 1032 "../parser/Grammar.y" +#line 1030 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); @@ -4466,7 +4464,7 @@ yyreduce: case 258: /* Line 1455 of yacc.c */ -#line 1036 "../parser/Grammar.y" +#line 1034 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); @@ -4476,7 +4474,7 @@ yyreduce: case 259: /* Line 1455 of yacc.c */ -#line 1043 "../parser/Grammar.y" +#line 1041 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} @@ -4485,7 +4483,7 @@ yyreduce: case 260: /* Line 1455 of yacc.c */ -#line 1046 "../parser/Grammar.y" +#line 1044 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BreakNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} @@ -4494,7 +4492,7 @@ yyreduce: case 261: /* Line 1455 of yacc.c */ -#line 1049 "../parser/Grammar.y" +#line 1047 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} @@ -4503,7 +4501,7 @@ yyreduce: case 262: /* Line 1455 of yacc.c */ -#line 1052 "../parser/Grammar.y" +#line 1050 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} @@ -4512,7 +4510,7 @@ yyreduce: case 263: /* Line 1455 of yacc.c */ -#line 1058 "../parser/Grammar.y" +#line 1056 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} @@ -4521,7 +4519,7 @@ yyreduce: case 264: /* Line 1455 of yacc.c */ -#line 1061 "../parser/Grammar.y" +#line 1059 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} @@ -4530,7 +4528,7 @@ yyreduce: case 265: /* Line 1455 of yacc.c */ -#line 1064 "../parser/Grammar.y" +#line 1062 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} @@ -4539,7 +4537,7 @@ yyreduce: case 266: /* Line 1455 of yacc.c */ -#line 1067 "../parser/Grammar.y" +#line 1065 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} @@ -4548,7 +4546,7 @@ yyreduce: case 267: /* Line 1455 of yacc.c */ -#line 1073 "../parser/Grammar.y" +#line 1071 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WithNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node, (yylsp[(3) - (5)]).last_column, (yylsp[(3) - (5)]).last_column - (yylsp[(3) - (5)]).first_column), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features | WithFeature, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} @@ -4557,7 +4555,7 @@ yyreduce: case 268: /* Line 1455 of yacc.c */ -#line 1079 "../parser/Grammar.y" +#line 1077 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) SwitchNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].caseBlockNode).m_node), (yyvsp[(5) - (5)].caseBlockNode).m_varDeclarations, (yyvsp[(5) - (5)].caseBlockNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].caseBlockNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].caseBlockNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} @@ -4566,14 +4564,14 @@ yyreduce: case 269: /* Line 1455 of yacc.c */ -#line 1085 "../parser/Grammar.y" +#line 1083 "../parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].clauseList).m_node.head, 0, 0), (yyvsp[(2) - (3)].clauseList).m_varDeclarations, (yyvsp[(2) - (3)].clauseList).m_funcDeclarations, (yyvsp[(2) - (3)].clauseList).m_features, (yyvsp[(2) - (3)].clauseList).m_numConstants); ;} break; case 270: /* Line 1455 of yacc.c */ -#line 1087 "../parser/Grammar.y" +#line 1085 "../parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (5)].clauseList).m_node.head, (yyvsp[(3) - (5)].caseClauseNode).m_node, (yyvsp[(4) - (5)].clauseList).m_node.head), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_varDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_varDeclarations), (yyvsp[(4) - (5)].clauseList).m_varDeclarations), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_funcDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_funcDeclarations), (yyvsp[(4) - (5)].clauseList).m_funcDeclarations), @@ -4584,14 +4582,14 @@ yyreduce: case 271: /* Line 1455 of yacc.c */ -#line 1095 "../parser/Grammar.y" +#line 1093 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = 0; (yyval.clauseList).m_node.tail = 0; (yyval.clauseList).m_varDeclarations = 0; (yyval.clauseList).m_funcDeclarations = 0; (yyval.clauseList).m_features = 0; (yyval.clauseList).m_numConstants = 0; ;} break; case 273: /* Line 1455 of yacc.c */ -#line 1100 "../parser/Grammar.y" +#line 1098 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].caseClauseNode).m_node); (yyval.clauseList).m_node.tail = (yyval.clauseList).m_node.head; (yyval.clauseList).m_varDeclarations = (yyvsp[(1) - (1)].caseClauseNode).m_varDeclarations; @@ -4603,7 +4601,7 @@ yyreduce: case 274: /* Line 1455 of yacc.c */ -#line 1106 "../parser/Grammar.y" +#line 1104 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = (yyvsp[(1) - (2)].clauseList).m_node.head; (yyval.clauseList).m_node.tail = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (2)].clauseList).m_node.tail, (yyvsp[(2) - (2)].caseClauseNode).m_node); (yyval.clauseList).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].clauseList).m_varDeclarations, (yyvsp[(2) - (2)].caseClauseNode).m_varDeclarations); @@ -4616,35 +4614,35 @@ yyreduce: case 275: /* Line 1455 of yacc.c */ -#line 1116 "../parser/Grammar.y" +#line 1114 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node), 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); ;} break; case 276: /* Line 1455 of yacc.c */ -#line 1117 "../parser/Grammar.y" +#line 1115 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].sourceElements).m_node), (yyvsp[(4) - (4)].sourceElements).m_varDeclarations, (yyvsp[(4) - (4)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (4)].expressionNode).m_features | (yyvsp[(4) - (4)].sourceElements).m_features, (yyvsp[(2) - (4)].expressionNode).m_numConstants + (yyvsp[(4) - (4)].sourceElements).m_numConstants); ;} break; case 277: /* Line 1455 of yacc.c */ -#line 1121 "../parser/Grammar.y" +#line 1119 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0), 0, 0, 0, 0); ;} break; case 278: /* Line 1455 of yacc.c */ -#line 1122 "../parser/Grammar.y" +#line 1120 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0, (yyvsp[(3) - (3)].sourceElements).m_node), (yyvsp[(3) - (3)].sourceElements).m_varDeclarations, (yyvsp[(3) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(3) - (3)].sourceElements).m_features, (yyvsp[(3) - (3)].sourceElements).m_numConstants); ;} break; case 279: /* Line 1455 of yacc.c */ -#line 1126 "../parser/Grammar.y" +#line 1124 "../parser/Grammar.y" { LabelNode* node = new (GLOBAL_DATA) LabelNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].statementNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, (yyvsp[(3) - (3)].statementNode).m_varDeclarations, (yyvsp[(3) - (3)].statementNode).m_funcDeclarations, (yyvsp[(3) - (3)].statementNode).m_features, (yyvsp[(3) - (3)].statementNode).m_numConstants); ;} @@ -4653,7 +4651,7 @@ yyreduce: case 280: /* Line 1455 of yacc.c */ -#line 1132 "../parser/Grammar.y" +#line 1130 "../parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); @@ -4663,7 +4661,7 @@ yyreduce: case 281: /* Line 1455 of yacc.c */ -#line 1136 "../parser/Grammar.y" +#line 1134 "../parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; @@ -4673,7 +4671,7 @@ yyreduce: case 282: /* Line 1455 of yacc.c */ -#line 1143 "../parser/Grammar.y" +#line 1141 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (4)].statementNode).m_node, GLOBAL_DATA->propertyNames->nullIdentifier, false, 0, (yyvsp[(4) - (4)].statementNode).m_node), mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_varDeclarations, (yyvsp[(4) - (4)].statementNode).m_varDeclarations), mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_funcDeclarations, (yyvsp[(4) - (4)].statementNode).m_funcDeclarations), @@ -4685,7 +4683,7 @@ yyreduce: case 283: /* Line 1455 of yacc.c */ -#line 1149 "../parser/Grammar.y" +#line 1147 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, *(yyvsp[(5) - (7)].ident), ((yyvsp[(7) - (7)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (7)].statementNode).m_node, 0), mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(7) - (7)].statementNode).m_funcDeclarations), @@ -4697,7 +4695,7 @@ yyreduce: case 284: /* Line 1455 of yacc.c */ -#line 1156 "../parser/Grammar.y" +#line 1154 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (9)].statementNode).m_node, *(yyvsp[(5) - (9)].ident), ((yyvsp[(7) - (9)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (9)].statementNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_varDeclarations, (yyvsp[(7) - (9)].statementNode).m_varDeclarations), (yyvsp[(9) - (9)].statementNode).m_varDeclarations), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_funcDeclarations, (yyvsp[(7) - (9)].statementNode).m_funcDeclarations), (yyvsp[(9) - (9)].statementNode).m_funcDeclarations), @@ -4709,7 +4707,7 @@ yyreduce: case 285: /* Line 1455 of yacc.c */ -#line 1165 "../parser/Grammar.y" +#line 1163 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; @@ -4717,7 +4715,7 @@ yyreduce: case 286: /* Line 1455 of yacc.c */ -#line 1167 "../parser/Grammar.y" +#line 1165 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; @@ -4725,14 +4723,14 @@ yyreduce: case 287: /* Line 1455 of yacc.c */ -#line 1172 "../parser/Grammar.y" +#line 1170 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (7)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); (yyval.statementNode).m_funcDeclarations->data.append(static_cast<FuncDeclNode*>((yyval.statementNode).m_node)); ;} break; case 288: /* Line 1455 of yacc.c */ -#line 1174 "../parser/Grammar.y" +#line 1172 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (8)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature) @@ -4745,14 +4743,14 @@ yyreduce: case 289: /* Line 1455 of yacc.c */ -#line 1184 "../parser/Grammar.y" +#line 1182 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(5) - (6)].functionBodyNode), LEXER->sourceCode((yyvsp[(4) - (6)].intValue), (yyvsp[(6) - (6)].intValue), (yylsp[(4) - (6)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(5) - (6)].functionBodyNode), (yylsp[(4) - (6)]), (yylsp[(6) - (6)])); ;} break; case 290: /* Line 1455 of yacc.c */ -#line 1186 "../parser/Grammar.y" +#line 1184 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line), (yyvsp[(3) - (7)].parameterList).m_node.head), (yyvsp[(3) - (7)].parameterList).m_features | ClosureFeature, 0); if ((yyvsp[(3) - (7)].parameterList).m_features & ArgumentsFeature) @@ -4764,14 +4762,14 @@ yyreduce: case 291: /* Line 1455 of yacc.c */ -#line 1192 "../parser/Grammar.y" +#line 1190 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); ;} break; case 292: /* Line 1455 of yacc.c */ -#line 1194 "../parser/Grammar.y" +#line 1192 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature) @@ -4783,7 +4781,7 @@ yyreduce: case 293: /* Line 1455 of yacc.c */ -#line 1203 "../parser/Grammar.y" +#line 1201 "../parser/Grammar.y" { (yyval.parameterList).m_node.head = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)); (yyval.parameterList).m_features = (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0; (yyval.parameterList).m_node.tail = (yyval.parameterList).m_node.head; ;} @@ -4792,7 +4790,7 @@ yyreduce: case 294: /* Line 1455 of yacc.c */ -#line 1206 "../parser/Grammar.y" +#line 1204 "../parser/Grammar.y" { (yyval.parameterList).m_node.head = (yyvsp[(1) - (3)].parameterList).m_node.head; (yyval.parameterList).m_features = (yyvsp[(1) - (3)].parameterList).m_features | ((*(yyvsp[(3) - (3)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0); (yyval.parameterList).m_node.tail = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].parameterList).m_node.tail, *(yyvsp[(3) - (3)].ident)); ;} @@ -4801,28 +4799,28 @@ yyreduce: case 295: /* Line 1455 of yacc.c */ -#line 1212 "../parser/Grammar.y" +#line 1210 "../parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 296: /* Line 1455 of yacc.c */ -#line 1213 "../parser/Grammar.y" +#line 1211 "../parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 297: /* Line 1455 of yacc.c */ -#line 1217 "../parser/Grammar.y" +#line 1215 "../parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing(new (GLOBAL_DATA) SourceElements(GLOBAL_DATA), 0, 0, NoFeatures, (yylsp[(0) - (0)]).last_line, 0); ;} break; case 298: /* Line 1455 of yacc.c */ -#line 1218 "../parser/Grammar.y" +#line 1216 "../parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing((yyvsp[(1) - (1)].sourceElements).m_node, (yyvsp[(1) - (1)].sourceElements).m_varDeclarations, (yyvsp[(1) - (1)].sourceElements).m_funcDeclarations, (yyvsp[(1) - (1)].sourceElements).m_features, (yylsp[(1) - (1)]).last_line, (yyvsp[(1) - (1)].sourceElements).m_numConstants); ;} break; @@ -4830,7 +4828,7 @@ yyreduce: case 299: /* Line 1455 of yacc.c */ -#line 1223 "../parser/Grammar.y" +#line 1221 "../parser/Grammar.y" { (yyval.sourceElements).m_node = new (GLOBAL_DATA) SourceElements(GLOBAL_DATA); (yyval.sourceElements).m_node->append((yyvsp[(1) - (1)].statementNode).m_node); (yyval.sourceElements).m_varDeclarations = (yyvsp[(1) - (1)].statementNode).m_varDeclarations; @@ -4843,7 +4841,7 @@ yyreduce: case 300: /* Line 1455 of yacc.c */ -#line 1230 "../parser/Grammar.y" +#line 1228 "../parser/Grammar.y" { (yyval.sourceElements).m_node->append((yyvsp[(2) - (2)].statementNode).m_node); (yyval.sourceElements).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_varDeclarations, (yyvsp[(2) - (2)].statementNode).m_varDeclarations); (yyval.sourceElements).m_funcDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (2)].statementNode).m_funcDeclarations); @@ -4855,259 +4853,259 @@ yyreduce: case 304: /* Line 1455 of yacc.c */ -#line 1244 "../parser/Grammar.y" +#line 1242 "../parser/Grammar.y" { ;} break; case 305: /* Line 1455 of yacc.c */ -#line 1245 "../parser/Grammar.y" +#line 1243 "../parser/Grammar.y" { ;} break; case 306: /* Line 1455 of yacc.c */ -#line 1246 "../parser/Grammar.y" +#line 1244 "../parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;} break; case 307: /* Line 1455 of yacc.c */ -#line 1247 "../parser/Grammar.y" +#line 1245 "../parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;} break; case 308: /* Line 1455 of yacc.c */ -#line 1251 "../parser/Grammar.y" +#line 1249 "../parser/Grammar.y" { ;} break; case 309: /* Line 1455 of yacc.c */ -#line 1252 "../parser/Grammar.y" +#line 1250 "../parser/Grammar.y" { ;} break; case 310: /* Line 1455 of yacc.c */ -#line 1253 "../parser/Grammar.y" +#line 1251 "../parser/Grammar.y" { ;} break; case 311: /* Line 1455 of yacc.c */ -#line 1254 "../parser/Grammar.y" +#line 1252 "../parser/Grammar.y" { if (*(yyvsp[(1) - (7)].ident) != "get" && *(yyvsp[(1) - (7)].ident) != "set") YYABORT; ;} break; case 312: /* Line 1455 of yacc.c */ -#line 1255 "../parser/Grammar.y" +#line 1253 "../parser/Grammar.y" { if (*(yyvsp[(1) - (8)].ident) != "get" && *(yyvsp[(1) - (8)].ident) != "set") YYABORT; ;} break; case 316: /* Line 1455 of yacc.c */ -#line 1265 "../parser/Grammar.y" +#line 1263 "../parser/Grammar.y" { ;} break; case 317: /* Line 1455 of yacc.c */ -#line 1266 "../parser/Grammar.y" +#line 1264 "../parser/Grammar.y" { ;} break; case 318: /* Line 1455 of yacc.c */ -#line 1268 "../parser/Grammar.y" +#line 1266 "../parser/Grammar.y" { ;} break; case 322: /* Line 1455 of yacc.c */ -#line 1275 "../parser/Grammar.y" +#line 1273 "../parser/Grammar.y" { ;} break; case 517: /* Line 1455 of yacc.c */ -#line 1643 "../parser/Grammar.y" +#line 1641 "../parser/Grammar.y" { ;} break; case 518: /* Line 1455 of yacc.c */ -#line 1644 "../parser/Grammar.y" +#line 1642 "../parser/Grammar.y" { ;} break; case 520: /* Line 1455 of yacc.c */ -#line 1649 "../parser/Grammar.y" +#line 1647 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 521: /* Line 1455 of yacc.c */ -#line 1653 "../parser/Grammar.y" +#line 1651 "../parser/Grammar.y" { ;} break; case 522: /* Line 1455 of yacc.c */ -#line 1654 "../parser/Grammar.y" +#line 1652 "../parser/Grammar.y" { ;} break; case 525: /* Line 1455 of yacc.c */ -#line 1660 "../parser/Grammar.y" +#line 1658 "../parser/Grammar.y" { ;} break; case 526: /* Line 1455 of yacc.c */ -#line 1661 "../parser/Grammar.y" +#line 1659 "../parser/Grammar.y" { ;} break; case 530: /* Line 1455 of yacc.c */ -#line 1668 "../parser/Grammar.y" +#line 1666 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 533: /* Line 1455 of yacc.c */ -#line 1677 "../parser/Grammar.y" +#line 1675 "../parser/Grammar.y" { ;} break; case 534: /* Line 1455 of yacc.c */ -#line 1678 "../parser/Grammar.y" +#line 1676 "../parser/Grammar.y" { ;} break; case 539: /* Line 1455 of yacc.c */ -#line 1695 "../parser/Grammar.y" +#line 1693 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 555: /* Line 1455 of yacc.c */ -#line 1726 "../parser/Grammar.y" +#line 1724 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 557: /* Line 1455 of yacc.c */ -#line 1728 "../parser/Grammar.y" +#line 1726 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 559: /* Line 1455 of yacc.c */ -#line 1733 "../parser/Grammar.y" +#line 1731 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 561: /* Line 1455 of yacc.c */ -#line 1735 "../parser/Grammar.y" +#line 1733 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 563: /* Line 1455 of yacc.c */ -#line 1740 "../parser/Grammar.y" +#line 1738 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 565: /* Line 1455 of yacc.c */ -#line 1742 "../parser/Grammar.y" +#line 1740 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 568: /* Line 1455 of yacc.c */ -#line 1754 "../parser/Grammar.y" +#line 1752 "../parser/Grammar.y" { ;} break; case 569: /* Line 1455 of yacc.c */ -#line 1755 "../parser/Grammar.y" +#line 1753 "../parser/Grammar.y" { ;} break; case 578: /* Line 1455 of yacc.c */ -#line 1779 "../parser/Grammar.y" +#line 1777 "../parser/Grammar.y" { ;} break; case 580: /* Line 1455 of yacc.c */ -#line 1784 "../parser/Grammar.y" +#line 1782 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 585: /* Line 1455 of yacc.c */ -#line 1795 "../parser/Grammar.y" +#line 1793 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 592: /* Line 1455 of yacc.c */ -#line 1811 "../parser/Grammar.y" +#line 1809 "../parser/Grammar.y" { ;} break; /* Line 1455 of yacc.c */ -#line 5111 "JavaScriptCore/tmp/../generated/Grammar.tab.c" +#line 5109 "JavaScriptCore/tmp/../generated/Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -5326,7 +5324,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 1827 "../parser/Grammar.y" +#line 1825 "../parser/Grammar.y" static ExpressionNode* makeAssignNode(void* globalPtr, ExpressionNode* loc, Operator op, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments, int start, int divot, int end) diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h index c7d3837827..847624f472 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h @@ -112,7 +112,7 @@ typedef union YYSTYPE { /* Line 1676 of yacc.c */ -#line 157 "../parser/Grammar.y" +#line 155 "../parser/Grammar.y" int intValue; double doubleValue; diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h index f48f4f4cab..767c262acc 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h @@ -32,7 +32,7 @@ #include "Interpreter.h" namespace JSC { - class CachedCall : Noncopyable { + class CachedCall : public Noncopyable { public: CachedCall(CallFrame* callFrame, JSFunction* function, int argCount, JSValue* exception) : m_valid(false) diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index ed7e1ee21b..e4eebb2028 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -3402,7 +3402,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi register, if it has not already been initialised. */ - if (!callFrame->optionalCalleeArguments()) { + if (!callFrame->r(RegisterFile::ArgumentsRegister).jsValue()) { Arguments* arguments = new (globalData) Arguments(callFrame); callFrame->setCalleeArguments(arguments); callFrame->r(RegisterFile::ArgumentsRegister) = arguments; diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h index fa6f7db203..5331d929f3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h @@ -31,13 +31,14 @@ #include "ArgList.h" #include "FastAllocBase.h" -#include "HashMap.h" #include "JSCell.h" #include "JSValue.h" #include "JSObject.h" #include "Opcode.h" #include "RegisterFile.h" +#include <wtf/HashMap.h> + namespace JSC { class CodeBlock; diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h index 3a6e63b9e9..d46bdc918f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h @@ -32,12 +32,12 @@ #include "Collector.h" #include "ExecutableAllocator.h" #include "Register.h" +#include <stdio.h> #include <wtf/Noncopyable.h> #include <wtf/VMTags.h> #if HAVE(MMAP) #include <errno.h> -#include <stdio.h> #include <sys/mman.h> #endif @@ -92,7 +92,7 @@ namespace JSC { class JSGlobalObject; - class RegisterFile : Noncopyable { + class RegisterFile : public Noncopyable { friend class JIT; public: enum CallFrameHeaderEntry { diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h index 0de4f791cf..4ed47e3f4d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h @@ -156,7 +156,7 @@ public: return pool.release(); } -#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) || !(PLATFORM(X86) || PLATFORM(X86_64)) +#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) static void makeWritable(void* start, size_t size) { reprotectRegion(start, size, Writable); @@ -165,58 +165,47 @@ public: static void makeExecutable(void* start, size_t size) { reprotectRegion(start, size, Executable); - cacheFlush(start, size); } - - // If ASSEMBLER_WX_EXCLUSIVE protection is turned on, or on non-x86 platforms, - // we need to track start & size so we can makeExecutable/cacheFlush at the end. - class MakeWritable { - public: - MakeWritable(void* start, size_t size) - : m_start(start) - , m_size(size) - { - makeWritable(start, size); - } - - ~MakeWritable() - { - makeExecutable(m_start, m_size); - } - - private: - void* m_start; - size_t m_size; - }; #else static void makeWritable(void*, size_t) {} static void makeExecutable(void*, size_t) {} - - // On x86, without ASSEMBLER_WX_EXCLUSIVE, there is nothing to do here. - class MakeWritable { public: MakeWritable(void*, size_t) {} }; #endif -private: - -#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) || !(PLATFORM(X86) || PLATFORM(X86_64)) -#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) - static void reprotectRegion(void*, size_t, ProtectionSeting); -#else - static void reprotectRegion(void*, size_t, ProtectionSeting) {} -#endif - static void cacheFlush(void* code, size_t size) - { #if PLATFORM(X86) || PLATFORM(X86_64) - UNUSED_PARAM(code); - UNUSED_PARAM(size); + static void cacheFlush(void*, size_t) + { + } #elif PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) + static void cacheFlush(void* code, size_t size) + { sys_dcache_flush(code, size); sys_icache_invalidate(code, size); -#else -#error "ExecutableAllocator::cacheFlush not implemented on this platform." -#endif } +#elif PLATFORM(ARM) + static void cacheFlush(void* code, size_t size) + { + #if COMPILER(GCC) && (GCC_VERSION >= 30406) + __clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(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<char*>(code) + size), "r" (syscall) + : "r0", "r1", "r7"); + #endif // COMPILER(GCC) && (GCC_VERSION >= 30406) + } +#endif + +private: + +#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) + static void reprotectRegion(void*, size_t, ProtectionSeting); #endif RefPtr<ExecutablePool> m_smallAllocationPool; diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp index f1b22c0fb4..a0e462b612 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp @@ -26,6 +26,12 @@ #include "config.h" #include "JIT.h" +// This probably does not belong here; adding here for now as a quick Windows build fix. +#if ENABLE(ASSEMBLER) && PLATFORM(X86) && !PLATFORM(MAC) +#include "MacroAssembler.h" +JSC::MacroAssemblerX86Common::SSE2CheckState JSC::MacroAssemblerX86Common::s_sse2CheckState = NotCheckedSSE2; +#endif + #if ENABLE(JIT) #include "CodeBlock.h" @@ -34,6 +40,8 @@ #include "JITStubCall.h" #include "JSArray.h" #include "JSFunction.h" +#include "LinkBuffer.h" +#include "RepatchBuffer.h" #include "ResultType.h" #include "SamplingTool.h" @@ -45,21 +53,21 @@ using namespace std; namespace JSC { -void ctiPatchNearCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction) +void ctiPatchNearCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction) { - MacroAssembler::RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(codeblock); repatchBuffer.relinkNearCallerToTrampoline(returnAddress, newCalleeFunction); } -void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction) +void ctiPatchCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction) { - MacroAssembler::RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(codeblock); repatchBuffer.relinkCallerToTrampoline(returnAddress, newCalleeFunction); } -void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction) +void ctiPatchCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction) { - MacroAssembler::RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(codeblock); repatchBuffer.relinkCallerToFunction(returnAddress, newCalleeFunction); } @@ -396,7 +404,7 @@ void JIT::privateCompile() #endif // Could use a pop_m, but would need to offset the following instruction if so. - preverveReturnAddressAfterCall(regT2); + preserveReturnAddressAfterCall(regT2); emitPutToCallFrameHeader(regT2, RegisterFile::ReturnPC); Jump slowRegisterFileCheck; @@ -488,6 +496,7 @@ void JIT::privateCompile() #if ENABLE(JIT_OPTIMIZE_CALL) for (unsigned i = 0; i < m_codeBlock->numberOfCallLinkInfos(); ++i) { CallLinkInfo& info = m_codeBlock->callLinkInfo(i); + info.ownerCodeBlock = m_codeBlock; info.callReturnLocation = patchBuffer.locationOfNearCall(m_callStructureStubCompilationInfo[i].callReturnLocation); info.hotPathBegin = patchBuffer.locationOf(m_callStructureStubCompilationInfo[i].hotPathBegin); info.hotPathOther = patchBuffer.locationOfNearCall(m_callStructureStubCompilationInfo[i].hotPathOther); @@ -553,7 +562,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable loadPtr(Address(regT2, OBJECT_OFFSETOF(JSFunction, m_body)), regT3); loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionBodyNode, m_code)), regT0); Jump hasCodeBlock1 = branchTestPtr(NonZero, regT0); - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); restoreArgumentReference(); Call callJSFunction1 = call(); emitGetJITStubArg(1, regT2); @@ -565,7 +574,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable // Check argCount matches callee arity. Jump arityCheckOkay1 = branch32(Equal, Address(regT0, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1); - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); emitPutJITStubArg(regT3, 2); emitPutJITStubArg(regT0, 4); restoreArgumentReference(); @@ -579,7 +588,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable compileOpCallInitializeCallFrame(); - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); emitPutJITStubArg(regT3, 2); restoreArgumentReference(); Call callDontLazyLinkCall = call(); @@ -594,7 +603,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable loadPtr(Address(regT2, OBJECT_OFFSETOF(JSFunction, m_body)), regT3); loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionBodyNode, m_code)), regT0); Jump hasCodeBlock2 = branchTestPtr(NonZero, regT0); - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); restoreArgumentReference(); Call callJSFunction2 = call(); emitGetJITStubArg(1, regT2); @@ -606,7 +615,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable // Check argCount matches callee arity. Jump arityCheckOkay2 = branch32(Equal, Address(regT0, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1); - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); emitPutJITStubArg(regT3, 2); emitPutJITStubArg(regT0, 4); restoreArgumentReference(); @@ -620,7 +629,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable compileOpCallInitializeCallFrame(); - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); emitPutJITStubArg(regT3, 2); restoreArgumentReference(); Call callLazyLinkCall = call(); @@ -634,7 +643,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable loadPtr(Address(regT2, OBJECT_OFFSETOF(JSFunction, m_body)), regT3); loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionBodyNode, m_code)), regT0); Jump hasCodeBlock3 = branchTestPtr(NonZero, regT0); - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); restoreArgumentReference(); Call callJSFunction3 = call(); emitGetJITStubArg(1, regT2); @@ -647,7 +656,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable // Check argCount matches callee arity. Jump arityCheckOkay3 = branch32(Equal, Address(regT0, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1); - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); emitPutJITStubArg(regT3, 2); emitPutJITStubArg(regT0, 4); restoreArgumentReference(); @@ -668,7 +677,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable Label nativeCallThunk = align(); - preverveReturnAddressAfterCall(regT0); + preserveReturnAddressAfterCall(regT0); emitPutToCallFrameHeader(regT0, RegisterFile::ReturnPC); // Push return address // Load caller frame's scope chain into this callframe so that whatever we call can @@ -903,14 +912,14 @@ void JIT::unlinkCall(CallLinkInfo* callLinkInfo) // When the JSFunction is deleted the pointer embedded in the instruction stream will no longer be valid // (and, if a new JSFunction happened to be constructed at the same location, we could get a false positive // match). Reset the check so it no longer matches. - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock); repatchBuffer.repatch(callLinkInfo->hotPathBegin, JSValue::encode(JSValue())); } -void JIT::linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData) +void JIT::linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData) { ASSERT(calleeCodeBlock); - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(callerCodeBlock); // Currently we only link calls with the exact number of arguments. // If this is a native call calleeCodeBlock is null so the number of parameters is unimportant @@ -931,12 +940,3 @@ void JIT::linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode& code } // namespace JSC #endif // ENABLE(JIT) - -// This probably does not belong here; adding here for now as a quick Windows build fix. -#if ENABLE(ASSEMBLER) - -#if PLATFORM(X86) && !PLATFORM(MAC) -JSC::MacroAssemblerX86Common::SSE2CheckState JSC::MacroAssemblerX86Common::s_sse2CheckState = NotCheckedSSE2; -#endif - -#endif diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h index db3f38a2be..ceffe59b3d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h @@ -171,9 +171,9 @@ namespace JSC { }; // Near calls can only be patched to other JIT code, regular calls can be patched to JIT code or relinked to stub functions. - void ctiPatchNearCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction); - void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction); - void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction); + void ctiPatchNearCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction); + void ctiPatchCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction); + void ctiPatchCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction); class JIT : private MacroAssembler { friend class JITStubCall; @@ -379,9 +379,9 @@ namespace JSC { jit.privateCompileCTIMachineTrampolines(executablePool, globalData, ctiArrayLengthTrampoline, ctiStringLengthTrampoline, ctiVirtualCallPreLink, ctiVirtualCallLink, ctiVirtualCall, ctiNativeCallThunk); } - static void patchGetByIdSelf(StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress); - static void patchPutByIdReplace(StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress); - static void patchMethodCallProto(MethodCallLinkInfo&, JSFunction*, Structure*, JSObject*); + static void patchGetByIdSelf(CodeBlock* codeblock, StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress); + static void patchPutByIdReplace(CodeBlock* codeblock, StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress); + static void patchMethodCallProto(CodeBlock* codeblock, MethodCallLinkInfo&, JSFunction*, Structure*, JSObject*); static void compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, ReturnAddressPtr returnAddress) { @@ -389,7 +389,7 @@ namespace JSC { return jit.privateCompilePatchGetArrayLength(returnAddress); } - static void linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode&, CallLinkInfo*, int callerArgCount, JSGlobalData*); + static void linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, JITCode&, CallLinkInfo*, int callerArgCount, JSGlobalData*); static void unlinkCall(CallLinkInfo*); private: @@ -663,7 +663,7 @@ namespace JSC { void restoreArgumentReferenceForTrampoline(); Call emitNakedCall(CodePtr function = CodePtr()); - void preverveReturnAddressAfterCall(RegisterID); + void preserveReturnAddressAfterCall(RegisterID); void restoreReturnAddressBeforeReturn(RegisterID); void restoreReturnAddressBeforeReturn(Address); diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h index 7ee644bee7..b502c8a672 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h @@ -83,13 +83,16 @@ namespace JSC { m_ref.m_code.executableAddress(), registerFile, callFrame, exception, Profiler::enabledProfilerReference(), globalData)); } -#ifndef NDEBUG + void* start() + { + return m_ref.m_code.dataLocation(); + } + size_t size() { ASSERT(m_ref.m_code.executableAddress()); return m_ref.m_size; } -#endif ExecutablePool* getExecutablePool() { diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h index deca0d1c20..f03d635794 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h @@ -179,7 +179,7 @@ ALWAYS_INLINE JIT::Call JIT::emitNakedCall(CodePtr function) #if PLATFORM(X86) || PLATFORM(X86_64) -ALWAYS_INLINE void JIT::preverveReturnAddressAfterCall(RegisterID reg) +ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg) { pop(reg); } @@ -196,7 +196,7 @@ ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(Address address) #elif PLATFORM_ARM_ARCH(7) -ALWAYS_INLINE void JIT::preverveReturnAddressAfterCall(RegisterID reg) +ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg) { move(linkRegister, reg); } diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp index ed8f48f1d8..c1e5c29ddb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp @@ -34,6 +34,8 @@ #include "JSArray.h" #include "JSFunction.h" #include "Interpreter.h" +#include "LinkBuffer.h" +#include "RepatchBuffer.h" #include "ResultType.h" #include "SamplingTool.h" @@ -461,7 +463,7 @@ void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure if (willNeedStorageRealloc) { // This trampoline was called to like a JIT stub; before we can can call again we need to // remove the return address from the stack, to prevent the stack from becoming misaligned. - preverveReturnAddressAfterCall(regT3); + preserveReturnAddressAfterCall(regT3); JITStubCall stubCall(this, JITStubs::cti_op_put_by_id_transition_realloc); stubCall.addArgument(regT0); @@ -501,13 +503,13 @@ void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum(); stubInfo->stubRoutine = entryLabel; - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(m_codeBlock); repatchBuffer.relinkCallerToTrampoline(returnAddress, entryLabel); } -void JIT::patchGetByIdSelf(StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) +void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) { - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(codeBlock); // We don't want to patch more than once - in future go to cti_op_get_by_id_generic. // Should probably go to JITStubs::cti_op_get_by_id_fail, but that doesn't do anything interesting right now. @@ -525,23 +527,28 @@ void JIT::patchGetByIdSelf(StructureStubInfo* stubInfo, Structure* structure, si repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetGetByIdPropertyMapOffset), offset); } -void JIT::patchMethodCallProto(MethodCallLinkInfo& methodCallLinkInfo, JSFunction* callee, Structure* structure, JSObject* proto) +void JIT::patchMethodCallProto(CodeBlock* codeBlock, MethodCallLinkInfo& methodCallLinkInfo, JSFunction* callee, Structure* structure, JSObject* proto) { - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(codeBlock); ASSERT(!methodCallLinkInfo.cachedStructure); methodCallLinkInfo.cachedStructure = structure; structure->ref(); + Structure* prototypeStructure = proto->structure(); + ASSERT(!methodCallLinkInfo.cachedPrototypeStructure); + methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure; + prototypeStructure->ref(); + repatchBuffer.repatch(methodCallLinkInfo.structureLabel, structure); repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoObj), proto); - repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoStruct), proto->structure()); + repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoStruct), prototypeStructure); repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckPutFunction), callee); } -void JIT::patchPutByIdReplace(StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) +void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress) { - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(codeBlock); // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. // Should probably go to JITStubs::cti_op_put_by_id_fail, but that doesn't do anything interesting right now. @@ -591,7 +598,7 @@ void JIT::privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress) // Finally patch the jump to slow case back in the hot path to jump here instead. CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(m_codeBlock); repatchBuffer.relink(jumpLocation, entryLabel); // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. @@ -637,7 +644,7 @@ void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str // Finally patch the jump to slow case back in the hot path to jump here instead. CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(m_codeBlock); repatchBuffer.relink(jumpLocation, entryLabel); // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. @@ -669,7 +676,7 @@ void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Polymorphic // Finally patch the jump to slow case back in the hot path to jump here instead. CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(m_codeBlock); repatchBuffer.relink(jumpLocation, entryLabel); } @@ -714,7 +721,7 @@ void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Polymorphi // Finally patch the jump to slow case back in the hot path to jump here instead. CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(m_codeBlock); repatchBuffer.relink(jumpLocation, entryLabel); } @@ -768,7 +775,7 @@ void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Polymorphi // Finally patch the jump to slow case back in the hot path to jump here instead. CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(m_codeBlock); repatchBuffer.relink(jumpLocation, entryLabel); } @@ -816,7 +823,7 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str // Finally patch the jump to slow case back in the hot path to jump here instead. CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase); - RepatchBuffer repatchBuffer; + RepatchBuffer repatchBuffer(m_codeBlock); repatchBuffer.relink(jumpLocation, entryLabel); // We don't want to patch more than once - in future go to cti_op_put_by_id_generic. diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index 02bf7c0d7a..5049477cd5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -358,7 +358,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co // Uncacheable: give up. if (!slot.isCacheable()) { - ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic)); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic)); return; } @@ -366,13 +366,13 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co Structure* structure = baseCell->structure(); if (structure->isDictionary()) { - ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic)); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic)); return; } // If baseCell != base, then baseCell must be a proxy for another object. if (baseCell != slot.base()) { - ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic)); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic)); return; } @@ -384,7 +384,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co if (slot.type() == PutPropertySlot::NewProperty) { StructureChain* prototypeChain = structure->prototypeChain(callFrame); if (!prototypeChain->isCacheable()) { - ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic)); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic)); return; } stubInfo->initPutByIdTransition(structure->previousID(), structure, prototypeChain); @@ -394,7 +394,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co stubInfo->initPutByIdReplace(structure); - JIT::patchPutByIdReplace(stubInfo, structure, slot.cachedOffset(), returnAddress); + JIT::patchPutByIdReplace(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress); } NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot) @@ -404,7 +404,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co // FIXME: Cache property access for immediates. if (!baseValue.isCell()) { - ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic)); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic)); return; } @@ -418,13 +418,13 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co if (isJSString(globalData, baseValue) && propertyName == callFrame->propertyNames().length) { // The tradeoff of compiling an patched inline string length access routine does not seem // to pay off, so we currently only do this for arrays. - ctiPatchCallByReturnAddress(returnAddress, globalData->jitStubs.ctiStringLengthTrampoline()); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, globalData->jitStubs.ctiStringLengthTrampoline()); return; } // Uncacheable: give up. if (!slot.isCacheable()) { - ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic)); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic)); return; } @@ -432,7 +432,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co Structure* structure = baseCell->structure(); if (structure->isDictionary()) { - ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic)); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic)); return; } @@ -447,7 +447,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co // set this up, so derefStructures can do it's job. stubInfo->initGetByIdSelf(structure); - JIT::patchGetByIdSelf(stubInfo, structure, slot.cachedOffset(), returnAddress); + JIT::patchGetByIdSelf(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress); return; } @@ -475,7 +475,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co StructureChain* prototypeChain = structure->prototypeChain(callFrame); if (!prototypeChain->isCacheable()) { - ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic)); + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic)); return; } stubInfo->initGetByIdChain(structure, prototypeChain); @@ -777,7 +777,7 @@ DEFINE_STUB_FUNCTION(void, op_put_by_id) PutPropertySlot slot; stackFrame.args[0].jsValue().put(callFrame, ident, stackFrame.args[2].jsValue(), slot); - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_id_second)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_id_second)); CHECK_FOR_EXCEPTION_AT_END(); } @@ -831,7 +831,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id) PropertySlot slot(baseValue); JSValue result = baseValue.get(callFrame, ident, slot); - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_second)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_second)); CHECK_FOR_EXCEPTION_AT_END(); return JSValue::encode(result); @@ -848,7 +848,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check) PropertySlot slot(baseValue); JSValue result = baseValue.get(callFrame, ident, slot); - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_method_check_second)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_method_check_second)); CHECK_FOR_EXCEPTION_AT_END(); return JSValue::encode(result); @@ -900,7 +900,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check_second) // Check to see if the function is on the object's prototype. Patch up the code to optimize. if (slot.slotBase() == structure->prototypeForLookup(callFrame)) - JIT::patchMethodCallProto(methodCallLinkInfo, callee, structure, slotBaseObject); + JIT::patchMethodCallProto(callFrame->codeBlock(), methodCallLinkInfo, callee, structure, slotBaseObject); // Check to see if the function is on the object itself. // Since we generate the method-check to check both the structure and a prototype-structure (since this // is the common case) we have a problem - we need to patch the prototype structure check to do something @@ -908,13 +908,13 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check_second) // for now. For now it performs a check on a special object on the global object only used for this // purpose. The object is in no way exposed, and as such the check will always pass. else if (slot.slotBase() == baseValue) - JIT::patchMethodCallProto(methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject()->methodCallDummy()); + JIT::patchMethodCallProto(callFrame->codeBlock(), methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject()->methodCallDummy()); // For now let any other case be cached as a normal get_by_id. } // Revert the get_by_id op back to being a regular get_by_id - allow it to cache like normal, if it needs to. - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id)); return JSValue::encode(result); } @@ -975,10 +975,9 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail) JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), slot.cachedOffset()); if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1)) - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic)); - } else { - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic)); - } + ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic)); + } else + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic)); return JSValue::encode(result); } @@ -1024,7 +1023,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list) CHECK_FOR_EXCEPTION(); if (!baseValue.isCell() || !slot.isCacheable() || asCell(baseValue)->structure()->isDictionary()) { - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); return JSValue::encode(result); } @@ -1036,7 +1035,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list) JSObject* slotBaseObject = asObject(slot.slotBase()); if (slot.slotBase() == baseValue) - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); + ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); else if (slot.slotBase() == asCell(baseValue)->structure()->prototypeForLookup(callFrame)) { // Since we're accessing a prototype in a loop, it's a good bet that it // should not be treated as a dictionary. @@ -1049,11 +1048,11 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list) JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), slot.cachedOffset()); if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1)) - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full)); + ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full)); } else if (size_t count = countPrototypeChainEntriesAndCheckForProxies(callFrame, baseValue, slot)) { StructureChain* protoChain = structure->prototypeChain(callFrame); if (!protoChain->isCacheable()) { - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); + ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); return JSValue::encode(result); } @@ -1062,9 +1061,9 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list) JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, slot.cachedOffset()); if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1)) - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full)); + ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full)); } else - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); + ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); return JSValue::encode(result); } @@ -1271,7 +1270,7 @@ DEFINE_STUB_FUNCTION(void*, vm_dontLazyLinkCall) JSGlobalData* globalData = stackFrame.globalData; JSFunction* callee = asFunction(stackFrame.args[0].jsValue()); - ctiPatchNearCallByReturnAddress(stackFrame.args[1].returnAddress(), globalData->jitStubs.ctiVirtualCallLink()); + ctiPatchNearCallByReturnAddress(stackFrame.callFrame->callerFrame()->codeBlock(), stackFrame.args[1].returnAddress(), globalData->jitStubs.ctiVirtualCallLink()); return callee->body()->generatedJITCode().addressForCall().executableAddress(); } @@ -1290,7 +1289,7 @@ DEFINE_STUB_FUNCTION(void*, vm_lazyLinkCall) codeBlock = &callee->body()->generatedBytecode(); CallLinkInfo* callLinkInfo = &stackFrame.callFrame->callerFrame()->codeBlock()->getCallLinkInfo(stackFrame.args[1].returnAddress()); - JIT::linkCall(callee, codeBlock, jitCode, callLinkInfo, stackFrame.args[2].int32(), stackFrame.globalData); + JIT::linkCall(callee, stackFrame.callFrame->callerFrame()->codeBlock(), codeBlock, jitCode, callLinkInfo, stackFrame.args[2].int32(), stackFrame.globalData); return jitCode.addressForCall().executableAddress(); } @@ -1530,11 +1529,11 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val) result = jsArray->JSArray::get(callFrame, i); } else if (isJSString(globalData, baseValue) && asString(baseValue)->canGetIndex(i)) { // All fast byte array accesses are safe from exceptions so return immediately to avoid exception checks. - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_string)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_string)); result = asString(baseValue)->getIndex(stackFrame.globalData, i); } else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) { // All fast byte array accesses are safe from exceptions so return immediately to avoid exception checks. - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_byte_array)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_byte_array)); return JSValue::encode(asByteArray(baseValue)->getIndex(callFrame, i)); } else result = baseValue.get(callFrame, i); @@ -1566,7 +1565,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val_string) else { result = baseValue.get(callFrame, i); if (!isJSString(globalData, baseValue)) - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val)); } } else { Identifier property(callFrame, subscript.toString(callFrame)); @@ -1599,7 +1598,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val_byte_array) result = baseValue.get(callFrame, i); if (!isJSByteArray(globalData, baseValue)) - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val)); } else { Identifier property(callFrame, subscript.toString(callFrame)); result = baseValue.get(callFrame, property); @@ -1692,7 +1691,7 @@ DEFINE_STUB_FUNCTION(void, op_put_by_val) jsArray->JSArray::put(callFrame, i, value); } else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) { JSByteArray* jsByteArray = asByteArray(baseValue); - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val_byte_array)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val_byte_array)); // All fast byte array accesses are safe from exceptions so return immediately to avoid exception checks. if (value.isInt32Fast()) { jsByteArray->setIndex(i, value.getInt32Fast()); @@ -1776,7 +1775,7 @@ DEFINE_STUB_FUNCTION(void, op_put_by_val_byte_array) } if (!isJSByteArray(globalData, baseValue)) - ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val)); + ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val)); baseValue.put(callFrame, i, value); } else { Identifier property(callFrame, subscript.toString(callFrame)); diff --git a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp index 769169b9e2..190deff3de 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp @@ -221,7 +221,7 @@ JSValue JSC_HOST_CALL functionDebug(ExecState* exec, JSObject*, JSValue, const A JSValue JSC_HOST_CALL functionGC(ExecState* exec, JSObject*, JSValue, const ArgList&) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); exec->heap()->collect(); return jsUndefined(); } @@ -375,7 +375,7 @@ int main(int argc, char** argv) static void cleanupGlobalData(JSGlobalData* globalData) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); globalData->heap.destroy(); globalData->deref(); } @@ -550,7 +550,7 @@ static void parseArguments(int argc, char** argv, Options& options, JSGlobalData int jscmain(int argc, char** argv, JSGlobalData* globalData) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); Options options; parseArguments(argc, argv, options, globalData); diff --git a/src/3rdparty/webkit/JavaScriptCore/jsc.pro b/src/3rdparty/webkit/JavaScriptCore/jsc.pro new file mode 100644 index 0000000000..ba880ffbda --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/jsc.pro @@ -0,0 +1,31 @@ +TEMPLATE = app +TARGET = jsc +DESTDIR = . +SOURCES = jsc.cpp +QT -= gui +CONFIG -= app_bundle +CONFIG += building-libs +win32-*: CONFIG += console +win32-msvc*: CONFIG += exceptions_off stl_off + +include($$PWD/../WebKit.pri) + +CONFIG += link_pkgconfig + +QMAKE_RPATHDIR += $$OUTPUT_DIR/lib + +isEmpty(OUTPUT_DIR):OUTPUT_DIR=$$PWD/.. +CONFIG(debug, debug|release) { + OBJECTS_DIR = obj/debug +} else { # Release + OBJECTS_DIR = obj/release +} +OBJECTS_DIR_WTR = $$OBJECTS_DIR$${QMAKE_DIR_SEP} +include($$PWD/JavaScriptCore.pri) + +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/parser/Grammar.y b/src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y index c5ca4250a4..354c78630e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y @@ -36,8 +36,12 @@ #include "CommonIdentifiers.h" #include "NodeInfo.h" #include "Parser.h" +#include <wtf/FastMalloc.h> #include <wtf/MathExtras.h> +#define YYMALLOC fastMalloc +#define YYFREE fastFree + #define YYMAXDEPTH 10000 #define YYENABLE_NLS 0 @@ -88,12 +92,6 @@ static ExpressionNode* combineCommaNodes(void*, ExpressionNode* list, Expression #pragma warning(disable: 4244) #pragma warning(disable: 4702) -// At least some of the time, the declarations of malloc and free that bison -// generates are causing warnings. A way to avoid this is to explicitly define -// the macros so that bison doesn't try to declare malloc and free. -#define YYMALLOC malloc -#define YYFREE free - #endif #define YYPARSE_PARAM globalPtr diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h b/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h index 0e1b6188e0..25831628d6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h @@ -33,7 +33,7 @@ namespace JSC { class RegExp; - class Lexer : Noncopyable { + class Lexer : public Noncopyable { public: // Character manipulation functions. static bool isWhiteSpace(int character); diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp index 105ceaf45d..6c0d1af0c6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp @@ -495,6 +495,8 @@ static RegisterID* emitPreIncOrDec(BytecodeGenerator& generator, RegisterID* src static RegisterID* emitPostIncOrDec(BytecodeGenerator& generator, RegisterID* dst, RegisterID* srcDst, Operator oper) { + if (srcDst == dst) + return generator.emitToJSNumber(dst, srcDst); return (oper == OpPlusPlus) ? generator.emitPostInc(dst, srcDst) : generator.emitPostDec(dst, srcDst); } diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h index 34b44975c1..84e8b958ab 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h @@ -113,7 +113,7 @@ namespace JSC { void operator delete(void*); }; - class ParserArenaRefCounted : public RefCounted<ParserArenaRefCounted> { + class ParserArenaRefCounted : public RefCountedCustomAllocated<ParserArenaRefCounted> { protected: ParserArenaRefCounted(JSGlobalData*); diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Parser.h b/src/3rdparty/webkit/JavaScriptCore/parser/Parser.h index 6f4c2b7d4e..373dc00081 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Parser.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Parser.h @@ -39,7 +39,7 @@ namespace JSC { template <typename T> struct ParserArenaData : ParserArenaDeletable { T data; }; - class Parser : Noncopyable { + class Parser : public Noncopyable { public: template <class ParsedNode> PassRefPtr<ParsedNode> parse(ExecState*, Debugger*, const SourceCode&, int* errLine = 0, UString* errMsg = 0); template <class ParsedNode> PassRefPtr<ParsedNode> reparse(JSGlobalData*, ParsedNode*); diff --git a/src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp b/src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp index af770f38a9..16619d427f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp @@ -112,7 +112,7 @@ struct BracketChainNode { const UChar* bracketStart; }; -struct MatchFrame { +struct MatchFrame : FastAllocBase { ReturnLocation returnLocation; struct MatchFrame* previousFrame; diff --git a/src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h b/src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h index b37f613561..869f4192cb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h +++ b/src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h @@ -44,7 +44,7 @@ namespace JSC { class ProfileGenerator; class UString; - class Profiler { + class Profiler : public FastAllocBase { public: static Profiler** enabledProfilerReference() { diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h b/src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h index 4d571fcfe2..0899e85182 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h @@ -31,7 +31,7 @@ namespace JSC { - class MarkedArgumentBuffer : Noncopyable { + class MarkedArgumentBuffer : public Noncopyable { private: static const unsigned inlineCapacity = 8; typedef Vector<Register, inlineCapacity> VectorType; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h b/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h index 13dd95c2e5..b9f738f9b2 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h @@ -32,7 +32,7 @@ namespace JSC { - class BatchedTransitionOptimizer : Noncopyable { + class BatchedTransitionOptimizer : public Noncopyable { public: BatchedTransitionOptimizer(JSObject* object) : m_object(object) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp index 0ff97b8c76..bc5582cf84 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp @@ -48,6 +48,11 @@ #include <mach/thread_act.h> #include <mach/vm_map.h> +#elif PLATFORM(SYMBIAN) +#include <e32std.h> +#include <e32cmn.h> +#include <unistd.h> + #elif PLATFORM(WIN_OS) #include <windows.h> @@ -84,6 +89,13 @@ extern int *__libc_stack_end; #include <pthread_np.h> #endif +#if PLATFORM(QNX) +#include <fcntl.h> +#include <sys/procfs.h> +#include <stdio.h> +#include <errno.h> +#endif + #endif #define DEBUG_COLLECTOR 0 @@ -103,6 +115,11 @@ const size_t ALLOCATIONS_PER_COLLECTION = 4000; // a PIC branch in Mach-O binaries, see <rdar://problem/5971391>. #define MIN_ARRAY_SIZE (static_cast<size_t>(14)) +#if PLATFORM(SYMBIAN) +const size_t MAX_NUM_BLOCKS = 256; // Max size of collector heap set to 16 MB +static RHeap* userChunk = 0; +#endif + static void freeHeap(CollectorHeap*); #if ENABLE(JSC_MULTIPLE_THREADS) @@ -144,6 +161,26 @@ Heap::Heap(JSGlobalData* globalData) { ASSERT(globalData); +#if PLATFORM(SYMBIAN) + // Symbian OpenC supports mmap but currently not the MAP_ANON flag. + // Using fastMalloc() does not properly align blocks on 64k boundaries + // and previous implementation was flawed/incomplete. + // UserHeap::ChunkHeap allows allocation of continuous memory and specification + // of alignment value for (symbian) cells within that heap. + // + // Clarification and mapping of terminology: + // RHeap (created by UserHeap::ChunkHeap below) is continuos memory chunk, + // which can dynamically grow up to 8 MB, + // that holds all CollectorBlocks of this session (static). + // Each symbian cell within RHeap maps to a 64kb aligned CollectorBlock. + // JSCell objects are maintained as usual within CollectorBlocks. + if (!userChunk) { + userChunk = UserHeap::ChunkHeap(0, 0, MAX_NUM_BLOCKS * BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE); + if (!userChunk) + CRASH(); + } +#endif // PLATFORM(SYMBIAN) + memset(&primaryHeap, 0, sizeof(CollectorHeap)); memset(&numberHeap, 0, sizeof(CollectorHeap)); } @@ -156,7 +193,7 @@ Heap::~Heap() void Heap::destroy() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); if (!m_globalData) return; @@ -201,8 +238,12 @@ static NEVER_INLINE CollectorBlock* allocateBlock() // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: <rdar://problem/6054788>. vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT); #elif PLATFORM(SYMBIAN) - // no memory map in symbian, need to hack with fastMalloc - void* address = fastMalloc(BLOCK_SIZE); + // Allocate a 64 kb aligned CollectorBlock + unsigned char* mask = reinterpret_cast<unsigned char*>(userChunk->Alloc(BLOCK_SIZE)); + if (!mask) + CRASH(); + uintptr_t address = reinterpret_cast<uintptr_t>(mask); + memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE); #elif PLATFORM(WIN_OS) // windows virtual address granularity is naturally 64k @@ -247,7 +288,7 @@ static void freeBlock(CollectorBlock* block) #if PLATFORM(DARWIN) vm_deallocate(current_task(), reinterpret_cast<vm_address_t>(block), BLOCK_SIZE); #elif PLATFORM(SYMBIAN) - fastFree(block); + userChunk->Free(reinterpret_cast<TAny*>(block)); #elif PLATFORM(WIN_OS) VirtualFree(block, 0, MEM_RELEASE); #elif HAVE(POSIX_MEMALIGN) @@ -546,6 +587,24 @@ static inline void* currentThreadStackBase() static pthread_t stackThread; pthread_t thread = pthread_self(); if (stackBase == 0 || thread != stackThread) { +#if PLATFORM(QNX) + int fd; + struct _debug_thread_info tinfo; + memset(&tinfo, 0, sizeof(tinfo)); + tinfo.tid = pthread_self(); + fd = open("/proc/self", O_RDONLY); + if (fd == -1) { +#ifndef NDEBUG + perror("Unable to open /proc/self:"); +#endif + return 0; + } + devctl(fd, DCMD_PROC_TIDSTATUS, &tinfo, sizeof(tinfo), NULL); + close(fd); + stackBase = (void*)tinfo.stkbase; + stackSize = tinfo.stksize; + ASSERT(stackBase); +#else #if defined(QT_LINUXBASE) // LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead // see http://bugs.linuxbase.org/show_bug.cgi?id=2364 @@ -570,6 +629,7 @@ static inline void* currentThreadStackBase() (void)rc; // FIXME: Deal with error code somehow? Seems fatal. ASSERT(stackBase); pthread_attr_destroy(&sattr); +#endif stackThread = thread; } return static_cast<char*>(stackBase) + stackSize; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h index 23f9f158ef..852ac59e01 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h @@ -63,7 +63,7 @@ namespace JSC { OperationInProgress operationInProgress; }; - class Heap : Noncopyable { + class Heap : public Noncopyable { public: class Thread; typedef CollectorHeapIterator<PrimaryHeap> iterator; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h b/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h index 408d819037..7b275bd09b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h @@ -70,7 +70,7 @@ namespace JSC { - class CommonIdentifiers : Noncopyable { + class CommonIdentifiers : public Noncopyable { private: CommonIdentifiers(JSGlobalData*); friend class JSGlobalData; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp index 040c123e55..7db723b82f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp @@ -32,7 +32,7 @@ namespace JSC { typedef HashMap<const char*, RefPtr<UString::Rep>, PtrHash<const char*> > LiteralIdentifierTable; -class IdentifierTable { +class IdentifierTable : public FastAllocBase { public: ~IdentifierTable() { diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h index e0a9b4d5f2..32aa22b2cb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h @@ -31,7 +31,7 @@ namespace JSC { - class JSCell : Noncopyable { + class JSCell : public NoncopyableCustomAllocated { friend class GetterSetter; friend class Heap; friend class JIT; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h index 983274b806..7ab759ddd3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h @@ -391,7 +391,7 @@ namespace JSC { return globalData().dynamicGlobalObject; } - class DynamicGlobalObjectScope : Noncopyable { + class DynamicGlobalObjectScope : public Noncopyable { public: DynamicGlobalObjectScope(CallFrame* callFrame, JSGlobalObject* dynamicGlobalObject) : m_dynamicGlobalObjectSlot(callFrame->globalData().dynamicGlobalObject) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp index 7ece5da3d6..8f056c8174 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp @@ -60,23 +60,23 @@ static void setLockCount(intptr_t count) } JSLock::JSLock(ExecState* exec) - : m_lockingForReal(exec->globalData().isSharedInstance) + : m_lockBehavior(exec->globalData().isSharedInstance ? LockForReal : SilenceAssertionsOnly) { - lock(m_lockingForReal); + lock(m_lockBehavior); } -void JSLock::lock(bool lockForReal) +void JSLock::lock(JSLockBehavior lockBehavior) { #ifdef NDEBUG // Locking "not for real" is a debug-only feature. - if (!lockForReal) + if (lockBehavior == SilenceAssertionsOnly) return; #endif pthread_once(&createJSLockCountOnce, createJSLockCount); intptr_t currentLockCount = lockCount(); - if (!currentLockCount && lockForReal) { + if (!currentLockCount && lockBehavior == LockForReal) { int result; result = pthread_mutex_lock(&JSMutex); ASSERT(!result); @@ -84,19 +84,19 @@ void JSLock::lock(bool lockForReal) setLockCount(currentLockCount + 1); } -void JSLock::unlock(bool lockForReal) +void JSLock::unlock(JSLockBehavior lockBehavior) { ASSERT(lockCount()); #ifdef NDEBUG // Locking "not for real" is a debug-only feature. - if (!lockForReal) + if (lockBehavior == SilenceAssertionsOnly) return; #endif intptr_t newLockCount = lockCount() - 1; setLockCount(newLockCount); - if (!newLockCount && lockForReal) { + if (!newLockCount && lockBehavior == LockForReal) { int result; result = pthread_mutex_unlock(&JSMutex); ASSERT(!result); @@ -105,12 +105,12 @@ void JSLock::unlock(bool lockForReal) void JSLock::lock(ExecState* exec) { - lock(exec->globalData().isSharedInstance); + lock(exec->globalData().isSharedInstance ? LockForReal : SilenceAssertionsOnly); } void JSLock::unlock(ExecState* exec) { - unlock(exec->globalData().isSharedInstance); + unlock(exec->globalData().isSharedInstance ? LockForReal : SilenceAssertionsOnly); } bool JSLock::currentThreadIsHoldingLock() @@ -162,7 +162,7 @@ bool JSLock::currentThreadIsHoldingLock() static unsigned lockDropDepth = 0; JSLock::DropAllLocks::DropAllLocks(ExecState* exec) - : m_lockingForReal(exec->globalData().isSharedInstance) + : m_lockBehavior(exec->globalData().isSharedInstance ? LockForReal : SilenceAssertionsOnly) { pthread_once(&createJSLockCountOnce, createJSLockCount); @@ -173,11 +173,11 @@ JSLock::DropAllLocks::DropAllLocks(ExecState* exec) m_lockCount = JSLock::lockCount(); for (intptr_t i = 0; i < m_lockCount; i++) - JSLock::unlock(m_lockingForReal); + JSLock::unlock(m_lockBehavior); } -JSLock::DropAllLocks::DropAllLocks(bool lockingForReal) - : m_lockingForReal(lockingForReal) +JSLock::DropAllLocks::DropAllLocks(JSLockBehavior JSLockBehavior) + : m_lockBehavior(JSLockBehavior) { pthread_once(&createJSLockCountOnce, createJSLockCount); @@ -191,13 +191,13 @@ JSLock::DropAllLocks::DropAllLocks(bool lockingForReal) m_lockCount = JSLock::lockCount(); for (intptr_t i = 0; i < m_lockCount; i++) - JSLock::unlock(m_lockingForReal); + JSLock::unlock(m_lockBehavior); } JSLock::DropAllLocks::~DropAllLocks() { for (intptr_t i = 0; i < m_lockCount; i++) - JSLock::lock(m_lockingForReal); + JSLock::lock(m_lockBehavior); --lockDropDepth; } @@ -205,7 +205,7 @@ JSLock::DropAllLocks::~DropAllLocks() #else JSLock::JSLock(ExecState*) - : m_lockingForReal(false) + : m_lockBehavior(SilenceAssertionsOnly) { } @@ -221,11 +221,11 @@ bool JSLock::currentThreadIsHoldingLock() return true; } -void JSLock::lock(bool) +void JSLock::lock(JSLockBehavior) { } -void JSLock::unlock(bool) +void JSLock::unlock(JSLockBehavior) { } @@ -241,7 +241,7 @@ JSLock::DropAllLocks::DropAllLocks(ExecState*) { } -JSLock::DropAllLocks::DropAllLocks(bool) +JSLock::DropAllLocks::DropAllLocks(JSLockBehavior) { } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h index 3dde358942..8b015c4c88 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h @@ -50,50 +50,52 @@ namespace JSC { class ExecState; - class JSLock : Noncopyable { + enum JSLockBehavior { SilenceAssertionsOnly, LockForReal }; + + class JSLock : public Noncopyable { public: JSLock(ExecState*); - JSLock(bool lockingForReal) - : m_lockingForReal(lockingForReal) + JSLock(JSLockBehavior lockBehavior) + : m_lockBehavior(lockBehavior) { #ifdef NDEBUG // Locking "not for real" is a debug-only feature. - if (!lockingForReal) + if (lockBehavior == SilenceAssertionsOnly) return; #endif - lock(lockingForReal); + lock(lockBehavior); } ~JSLock() { #ifdef NDEBUG // Locking "not for real" is a debug-only feature. - if (!m_lockingForReal) + if (m_lockBehavior == SilenceAssertionsOnly) return; #endif - unlock(m_lockingForReal); + unlock(m_lockBehavior); } - static void lock(bool); - static void unlock(bool); + static void lock(JSLockBehavior); + static void unlock(JSLockBehavior); static void lock(ExecState*); static void unlock(ExecState*); static intptr_t lockCount(); static bool currentThreadIsHoldingLock(); - bool m_lockingForReal; + JSLockBehavior m_lockBehavior; - class DropAllLocks : Noncopyable { + class DropAllLocks : public Noncopyable { public: DropAllLocks(ExecState* exec); - DropAllLocks(bool); + DropAllLocks(JSLockBehavior); ~DropAllLocks(); private: intptr_t m_lockCount; - bool m_lockingForReal; + JSLockBehavior m_lockBehavior; }; }; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp index 4a89c55c39..2f02b1d459 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp @@ -61,7 +61,7 @@ private: mutable JSValue m_value; }; -class Stringifier : Noncopyable { +class Stringifier : public Noncopyable { public: Stringifier(ExecState*, JSValue replacer, JSValue space); ~Stringifier(); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp index 87b49f05a5..9d1f01a76a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp @@ -34,7 +34,7 @@ namespace JSC { static const unsigned numCharactersToStore = 0x100; -class SmallStringsStorage : Noncopyable { +class SmallStringsStorage : public Noncopyable { public: SmallStringsStorage(); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h b/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h index e7f11704ba..f0dd8df5fd 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h @@ -36,7 +36,7 @@ namespace JSC { class SmallStringsStorage; - class SmallStrings : Noncopyable { + class SmallStrings : public Noncopyable { public: SmallStrings(); ~SmallStrings(); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp index 098186e64b..819ed9a158 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007-2009 Torch Mobile, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +46,10 @@ #include <crtdbg.h> #endif +#if PLATFORM(WINCE) +#include <winbase.h> +#endif + extern "C" { WTF_ATTRIBUTE_PRINTF(1, 0) @@ -66,7 +71,7 @@ static void vprintf_stderr_common(const char* format, va_list args) CFRelease(str); CFRelease(cfFormat); } else -#elif COMPILER(MSVC) && !PLATFORM(WINCE) +#elif COMPILER(MSVC) && !defined(WINCEBASIC) if (IsDebuggerPresent()) { size_t size = 1024; @@ -77,7 +82,20 @@ static void vprintf_stderr_common(const char* format, va_list args) break; if (_vsnprintf(buffer, size, format, args) != -1) { +#if PLATFORM(WINCE) + // WinCE only supports wide chars + wchar_t* wideBuffer = (wchar_t*)malloc(size * sizeof(wchar_t)); + if (wideBuffer == NULL) + break; + for (unsigned int i = 0; i < size; ++i) { + if (!(wideBuffer[i] = buffer[i])) + break; + } + OutputDebugStringW(wideBuffer); + free(wideBuffer); +#else OutputDebugStringA(buffer); +#endif free(buffer); break; } @@ -101,7 +119,7 @@ static void printf_stderr_common(const char* format, ...) static void printCallSite(const char* file, int line, const char* function) { -#if PLATFORM(WIN) && defined _DEBUG +#if PLATFORM(WIN) && !PLATFORM(WINCE) && defined _DEBUG _CrtDbgReport(_CRT_WARN, file, line, NULL, "%s\n", function); #else printf_stderr_common("(%s:%d %s)\n", file, line, function); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h index ad66d067eb..59efd84214 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h @@ -136,8 +136,8 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann #undef ERROR #endif -#if PLATFORM(WIN_OS) -/* FIXME: Change to use something other than ASSERT to avoid this conflict with win32. */ +#if PLATFORM(WIN_OS) || PLATFORM(SYMBIAN) +/* FIXME: Change to use something other than ASSERT to avoid this conflict with the underlying platform */ #undef ASSERT #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h b/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h index 33f0877f06..96e9cc20f7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h @@ -26,8 +26,8 @@ #ifndef ByteArray_h #define ByteArray_h -#include "wtf/PassRefPtr.h" -#include "wtf/RefCounted.h" +#include <wtf/PassRefPtr.h> +#include <wtf/RefCounted.h> namespace WTF { class ByteArray : public RefCountedBase { diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h b/src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h index 281dfa606c..6a0521121e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h @@ -51,7 +51,7 @@ namespace WTF { // with respect to the original and any other copies. The underlying m_data is jointly // owned by the original instance and all copies. template<class T> - class CrossThreadRefCounted : Noncopyable { + class CrossThreadRefCounted : public Noncopyable { public: static PassRefPtr<CrossThreadRefCounted<T> > create(T* data) { diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp index 47c9d4415f..0b766496bc 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp @@ -2,6 +2,7 @@ * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2007-2009 Torch Mobile, Inc. * * The Original Code is Mozilla Communicator client code, released * March 31, 1998. @@ -375,14 +376,19 @@ static int32_t calculateUTCOffset() localt.tm_wday = 0; localt.tm_yday = 0; localt.tm_isdst = 0; -#if PLATFORM(WIN_OS) || PLATFORM(SOLARIS) || COMPILER(RVCT) +#if HAVE(TM_GMTOFF) + localt.tm_gmtoff = 0; +#endif +#if HAVE(TM_ZONE) + localt.tm_zone = 0; +#endif + +#if HAVE(TIMEGM) + time_t utcOffset = timegm(&localt) - mktime(&localt); +#else // Using a canned date of 01/01/2009 on platforms with weaker date-handling foo. localt.tm_year = 109; time_t utcOffset = 1230768000 - mktime(&localt); -#else - localt.tm_zone = 0; - localt.tm_gmtoff = 0; - time_t utcOffset = timegm(&localt) - mktime(&localt); #endif return static_cast<int32_t>(utcOffset * 1000); @@ -512,7 +518,7 @@ void msToGregorianDateTime(double ms, bool outputIsUTC, GregorianDateTime& tm) tm.year = year - 1900; tm.isDST = dstOff != 0.0; - tm.utcOffset = static_cast<long>((dstOff + utcOff) / msPerSecond); + tm.utcOffset = outputIsUTC ? 0 : static_cast<long>((dstOff + utcOff) / msPerSecond); tm.timeZone = NULL; } @@ -835,7 +841,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString) return NaN; int sgn = (o < 0) ? -1 : 1; - o = abs(o); + o = labs(o); if (*dateString != ':') { offset = ((o / 100) * 60 + (o % 100)) * sgn; } else { // GMT+05:00 diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h index 8690a49812..6110f766ab 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h @@ -109,14 +109,17 @@ struct GregorianDateTime : Noncopyable { , year(inTm.tm_year) , isDST(inTm.tm_isdst) { -#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !COMPILER(RVCT) +#if HAVE(TM_GMTOFF) utcOffset = static_cast<int>(inTm.tm_gmtoff); +#else + utcOffset = static_cast<int>(getUTCOffset() / msPerSecond + (isDST ? secondsPerHour : 0)); +#endif +#if HAVE(TM_ZONE) int inZoneSize = strlen(inTm.tm_zone) + 1; timeZone = new char[inZoneSize]; strncpy(timeZone, inTm.tm_zone, inZoneSize); #else - utcOffset = static_cast<int>(getUTCOffset() / msPerSecond + (isDST ? secondsPerHour : 0)); timeZone = 0; #endif } @@ -136,8 +139,10 @@ struct GregorianDateTime : Noncopyable { ret.tm_year = year; ret.tm_isdst = isDST; -#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !COMPILER(RVCT) +#if HAVE(TM_GMTOFF) ret.tm_gmtoff = static_cast<long>(utcOffset); +#endif +#if HAVE(TM_ZONE) ret.tm_zone = timeZone; #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h b/src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h index 1c8185677a..9fcbbc1c48 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h @@ -79,9 +79,9 @@ #include <stdint.h> #include <stdlib.h> #include <string.h> +#include "Assertions.h" #include "FastMalloc.h" #include "TypeTraits.h" -#include <wtf/Assertions.h> namespace WTF { diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp index d6850e6fca..c855a41a4e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp @@ -95,8 +95,6 @@ #define FORCE_SYSTEM_MALLOC 1 #endif -#define TCMALLOC_TRACK_DECOMMITED_SPANS (HAVE(VIRTUALALLOC) || HAVE(MADV_FREE_REUSE)) - #ifndef NDEBUG namespace WTF { @@ -1043,11 +1041,7 @@ struct Span { #endif }; -#if TCMALLOC_TRACK_DECOMMITED_SPANS #define ASSERT_SPAN_COMMITTED(span) ASSERT(!span->decommitted) -#else -#define ASSERT_SPAN_COMMITTED(span) -#endif #ifdef SPAN_HISTORY void Event(Span* span, char op, int v = 0) { @@ -1369,12 +1363,10 @@ inline Span* TCMalloc_PageHeap::New(Length n) { Span* result = ll->next; Carve(result, n, released); -#if TCMALLOC_TRACK_DECOMMITED_SPANS if (result->decommitted) { TCMalloc_SystemCommit(reinterpret_cast<void*>(result->start << kPageShift), static_cast<size_t>(n << kPageShift)); result->decommitted = false; } -#endif ASSERT(Check()); free_pages_ -= n; return result; @@ -1431,12 +1423,10 @@ Span* TCMalloc_PageHeap::AllocLarge(Length n) { if (best != NULL) { Carve(best, n, from_released); -#if TCMALLOC_TRACK_DECOMMITED_SPANS if (best->decommitted) { TCMalloc_SystemCommit(reinterpret_cast<void*>(best->start << kPageShift), static_cast<size_t>(n << kPageShift)); best->decommitted = false; } -#endif ASSERT(Check()); free_pages_ -= n; return best; @@ -1461,14 +1451,10 @@ Span* TCMalloc_PageHeap::Split(Span* span, Length n) { return leftover; } -#if !TCMALLOC_TRACK_DECOMMITED_SPANS -static ALWAYS_INLINE void propagateDecommittedState(Span*, Span*) { } -#else static ALWAYS_INLINE void propagateDecommittedState(Span* destination, Span* source) { destination->decommitted = source->decommitted; } -#endif inline void TCMalloc_PageHeap::Carve(Span* span, Length n, bool released) { ASSERT(n > 0); @@ -1495,9 +1481,6 @@ inline void TCMalloc_PageHeap::Carve(Span* span, Length n, bool released) { } } -#if !TCMALLOC_TRACK_DECOMMITED_SPANS -static ALWAYS_INLINE void mergeDecommittedStates(Span*, Span*) { } -#else static ALWAYS_INLINE void mergeDecommittedStates(Span* destination, Span* other) { if (destination->decommitted && !other->decommitted) { @@ -1509,7 +1492,6 @@ static ALWAYS_INLINE void mergeDecommittedStates(Span* destination, Span* other) destination->decommitted = true; } } -#endif inline void TCMalloc_PageHeap::Delete(Span* span) { ASSERT(Check()); @@ -1556,15 +1538,12 @@ inline void TCMalloc_PageHeap::Delete(Span* span) { Event(span, 'D', span->length); span->free = 1; -#if TCMALLOC_TRACK_DECOMMITED_SPANS if (span->decommitted) { if (span->length < kMaxPages) DLL_Prepend(&free_[span->length].returned, span); else DLL_Prepend(&large_.returned, span); - } else -#endif - { + } else { if (span->length < kMaxPages) DLL_Prepend(&free_[span->length].normal, span); else @@ -1596,9 +1575,7 @@ void TCMalloc_PageHeap::IncrementalScavenge(Length n) { DLL_Remove(s); TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift), static_cast<size_t>(s->length << kPageShift)); -#if TCMALLOC_TRACK_DECOMMITED_SPANS s->decommitted = true; -#endif DLL_Prepend(&slist->returned, s); scavenge_counter_ = std::max<size_t>(64UL, std::min<size_t>(kDefaultReleaseDelay, kDefaultReleaseDelay - (free_pages_ / kDefaultReleaseDelay))); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h index 8d03ff2246..4993348524 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h @@ -37,7 +37,7 @@ namespace WTF { template<> void freeOwnedGPtr<GDir>(GDir*); template<> void freeOwnedGPtr<GHashTable>(GHashTable*); - template <typename T> class GOwnPtr : Noncopyable { + template <typename T> class GOwnPtr : public Noncopyable { public: explicit GOwnPtr(T* ptr = 0) : m_ptr(ptr) { } ~GOwnPtr() { freeOwnedGPtr(m_ptr); } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h index 9feec1f3f7..41813d3f9f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h @@ -32,7 +32,7 @@ namespace WTF { -template <typename T> class Locker : Noncopyable { +template <typename T> class Locker : public Noncopyable { public: Locker(T& lockable) : m_lockable(lockable) { m_lockable.lock(); } ~Locker() { m_lockable.unlock(); } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h index 7721dba512..12291cc318 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h @@ -45,7 +45,7 @@ namespace WTF { }; template<typename DataType> - class MessageQueue : Noncopyable { + class MessageQueue : public Noncopyable { public: MessageQueue() : m_killed(false) { } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h index f241c7c989..c50c9d8d5d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h @@ -24,6 +24,8 @@ // We don't want argument-dependent lookup to pull in everything from the WTF // namespace when you use Noncopyable, so put it in its own namespace. +#include "FastAllocBase.h" + namespace WTFNoncopyable { class Noncopyable { @@ -34,8 +36,17 @@ namespace WTFNoncopyable { ~Noncopyable() { } }; + class NoncopyableCustomAllocated { + NoncopyableCustomAllocated(const NoncopyableCustomAllocated&); + NoncopyableCustomAllocated& operator=(const NoncopyableCustomAllocated&); + protected: + NoncopyableCustomAllocated() { } + ~NoncopyableCustomAllocated() { } + }; + } // namespace WTFNoncopyable using WTFNoncopyable::Noncopyable; +using WTFNoncopyable::NoncopyableCustomAllocated; #endif // WTF_Noncopyable_h diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h index 344f813f26..61375c7691 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h @@ -27,7 +27,7 @@ namespace WTF { - template <typename T> class OwnArrayPtr : Noncopyable { + template <typename T> class OwnArrayPtr : public Noncopyable { public: explicit OwnArrayPtr(T* ptr = 0) : m_ptr(ptr) { } ~OwnArrayPtr() { safeDelete(); } @@ -46,8 +46,12 @@ namespace WTF { bool operator!() const { return !m_ptr; } // This conversion operator allows implicit conversion to bool but not to other integer types. +#if COMPILER(WINSCW) + operator bool() const { return m_ptr; } +#else typedef T* OwnArrayPtr::*UnspecifiedBoolType; operator UnspecifiedBoolType() const { return m_ptr ? &OwnArrayPtr::m_ptr : 0; } +#endif void swap(OwnArrayPtr& o) { std::swap(m_ptr, o.m_ptr); } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h index 5c0d0647bf..c88235a8a9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h @@ -27,7 +27,7 @@ namespace WTF { - template<class T> class OwnFastMallocPtr : Noncopyable { + template<class T> class OwnFastMallocPtr : public Noncopyable { public: explicit OwnFastMallocPtr(T* ptr) : m_ptr(ptr) { diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h index 9e4bd32ae8..b7e62b1eab 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h @@ -34,7 +34,7 @@ namespace WTF { template <typename T> class PassOwnPtr; - template <typename T> class OwnPtr : Noncopyable { + template <typename T> class OwnPtr : public Noncopyable { public: typedef typename RemovePointer<T>::Type ValueType; typedef ValueType* PtrType; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index 5e37e09b61..c7a5be9029 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2007-2009 Torch Mobile, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -93,12 +94,10 @@ #define WTF_PLATFORM_SOLARIS 1 #endif -#if defined (__S60__) || defined (__SYMBIAN32__) +#if defined (__SYMBIAN32__) /* we are cross-compiling, it is not really windows */ #undef WTF_PLATFORM_WIN_OS #undef WTF_PLATFORM_WIN -#undef WTF_PLATFORM_CAIRO -#define WTF_PLATFORM_S60 1 #define WTF_PLATFORM_SYMBIAN 1 #endif @@ -110,17 +109,25 @@ #define WTF_PLATFORM_NETBSD 1 #endif +/* PLATFORM(QNX) */ +/* Operating system level dependencies for QNX that should be used */ +/* regardless of operating environment */ +#if defined(__QNXNTO__) +#define WTF_PLATFORM_QNX 1 +#endif + /* PLATFORM(UNIX) */ /* Operating system level dependencies for Unix-like systems that */ /* should be used regardless of operating environment */ #if PLATFORM(DARWIN) \ || PLATFORM(FREEBSD) \ - || PLATFORM(S60) \ + || PLATFORM(SYMBIAN) \ || PLATFORM(NETBSD) \ || defined(unix) \ || defined(__unix) \ || defined(__unix__) \ - || defined(_AIX) + || defined(_AIX) \ + || defined(__QNXNTO__) #define WTF_PLATFORM_UNIX 1 #endif @@ -191,7 +198,7 @@ /* Makes PLATFORM(WIN) default to PLATFORM(CAIRO) */ /* FIXME: This should be changed from a blacklist to a whitelist */ -#if !PLATFORM(MAC) && !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(CHROMIUM) +#if !PLATFORM(MAC) && !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(CHROMIUM) && !PLATFORM(WINCE) #define WTF_PLATFORM_CAIRO 1 #endif @@ -311,6 +318,7 @@ /* --gnu option of the RVCT compiler also defines __GNUC__ */ #if defined(__GNUC__) && !COMPILER(RVCT) #define WTF_COMPILER_GCC 1 +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif /* COMPILER(MINGW) */ @@ -339,11 +347,36 @@ #define ENABLE_JSC_MULTIPLE_THREADS 1 #endif +#if PLATFORM(WINCE) && !PLATFORM(QT) +#undef ENABLE_JSC_MULTIPLE_THREADS +#define ENABLE_JSC_MULTIPLE_THREADS 0 +#define USE_SYSTEM_MALLOC 0 +#define ENABLE_ICONDATABASE 0 +#define ENABLE_JAVASCRIPT_DEBUGGER 0 +#define ENABLE_FTPDIR 0 +#define ENABLE_PAN_SCROLLING 0 +#define ENABLE_WML 1 +#define HAVE_ACCESSIBILITY 0 + +#define NOMINMAX // Windows min and max conflict with standard macros +#define NOSHLWAPI // shlwapi.h not available on WinCe + +// MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file. +#define __usp10__ // disable "usp10.h" + +#define _INC_ASSERT // disable "assert.h" +#define assert(x) + +// _countof is only included in CE6; for CE5 we need to define it ourself +#ifndef _countof +#define _countof(x) (sizeof(x) / sizeof((x)[0])) +#endif + +#endif /* PLATFORM(WINCE) && !PLATFORM(QT) */ + /* for Unicode, KDE uses Qt */ #if PLATFORM(KDE) || PLATFORM(QT) #define WTF_USE_QT4_UNICODE 1 -#elif PLATFORM(SYMBIAN) -#define WTF_USE_SYMBIAN_UNICODE 1 #elif PLATFORM(GTK) /* The GTK+ Unicode backend is configurable */ #else @@ -406,6 +439,13 @@ #define HAVE_SIGNAL_H 1 #endif +#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !PLATFORM(QNX) \ + && !PLATFORM(SYMBIAN) && !COMPILER(RVCT) +#define HAVE_TM_GMTOFF 1 +#define HAVE_TM_ZONE 1 +#define HAVE_TIMEGM 1 +#endif + #if PLATFORM(DARWIN) #define HAVE_ERRNO_H 1 @@ -450,6 +490,15 @@ #define HAVE_SYS_PARAM_H 1 #endif +#elif PLATFORM(QNX) + +#define HAVE_ERRNO_H 1 +#define HAVE_MMAP 1 +#define HAVE_SBRK 1 +#define HAVE_STRINGS_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_TIME_H 1 + #else /* FIXME: is this actually used or do other platforms generate their own config.h? */ @@ -536,6 +585,7 @@ #endif #if !defined(ENABLE_JIT) + /* The JIT is tested & working on x86_64 Mac */ #if PLATFORM(X86_64) && PLATFORM(MAC) #define ENABLE_JIT 1 @@ -551,7 +601,21 @@ #elif PLATFORM(X86) && PLATFORM(WIN) #define ENABLE_JIT 1 #endif + +#if PLATFORM(X86) && PLATFORM(QT) +#if PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100 + #define ENABLE_JIT 1 + #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1 +#elif PLATFORM(WIN_OS) && COMPILER(MSVC) + #define ENABLE_JIT 1 + #define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1 +#elif PLATFORM(LINUX) && GCC_VERSION >= 40100 + #define ENABLE_JIT 1 + #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1 #endif +#endif /* PLATFORM(QT) && PLATFORM(X86) */ + +#endif /* !defined(ENABLE_JIT) */ #if ENABLE(JIT) #ifndef ENABLE_JIT_OPTIMIZE_CALL @@ -590,15 +654,29 @@ #endif /* Yet Another Regex Runtime. */ +#if !defined(ENABLE_YARR_JIT) + /* YARR supports x86 & x86-64, and has been tested on Mac and Windows. */ -#if (!defined(ENABLE_YARR_JIT) && PLATFORM(X86) && PLATFORM(MAC)) \ - || (!defined(ENABLE_YARR_JIT) && PLATFORM(X86_64) && PLATFORM(MAC)) \ +#if (PLATFORM(X86) && PLATFORM(MAC)) \ + || (PLATFORM(X86_64) && PLATFORM(MAC)) \ /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ \ - || (!defined(ENABLE_YARR_JIT) && PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) && 0) \ - || (!defined(ENABLE_YARR_JIT) && PLATFORM(X86) && PLATFORM(WIN)) + || (PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) && 0) \ + || (PLATFORM(X86) && PLATFORM(WIN)) #define ENABLE_YARR 1 #define ENABLE_YARR_JIT 1 #endif + +#if PLATFORM(X86) && PLATFORM(QT) +#if (PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \ + || (PLATFORM(WIN_OS) && COMPILER(MSVC)) \ + || (PLATFORM(LINUX) && GCC_VERSION >= 40100) +#define ENABLE_YARR 1 +#define ENABLE_YARR_JIT 1 +#endif +#endif + +#endif /* !defined(ENABLE_YARR_JIT) */ + /* Sanity Check */ #if ENABLE(YARR_JIT) && !ENABLE(YARR) #error "YARR_JIT requires YARR" @@ -609,7 +687,7 @@ #endif /* Setting this flag prevents the assembler from using RWX memory; this may improve security but currectly comes at a significant performance cost. */ -#if PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) +#if PLATFORM(ARM) #define ENABLE_ASSEMBLER_WX_EXCLUSIVE 1 #else #define ENABLE_ASSEMBLER_WX_EXCLUSIVE 0 diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp index c94d5a4b90..0e6e20830d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. - * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) + * (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,6 +34,12 @@ #include <stdint.h> #include <stdlib.h> +#if PLATFORM(WINCE) +extern "C" { +#include "wince/mt19937ar.c" +} +#endif + namespace WTF { double weakRandomNumber() @@ -74,6 +80,8 @@ double randomNumber() // Mask off the low 53bits fullRandom &= (1LL << 53) - 1; return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53); +#elif PLATFORM(WINCE) + return genrand_res53(); #else uint32_t part1 = rand() & (RAND_MAX - 1); uint32_t part2 = rand() & (RAND_MAX - 1); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h index 32291ddfb9..1c2d364edb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h @@ -39,6 +39,9 @@ #endif #if PLATFORM(WINCE) +extern "C" { +void init_by_array(unsigned long init_key[],int key_length); +} #include <ce_time.h> #endif @@ -49,8 +52,19 @@ inline void initializeRandomNumberGenerator() { #if PLATFORM(DARWIN) // On Darwin we use arc4random which initialises itself. +#elif PLATFORM(WINCE) + // initialize rand() + srand(static_cast<unsigned>(time(0))); + + // use rand() to initialize the real RNG + unsigned long initializationBuffer[4]; + initializationBuffer[0] = (rand() << 16) | rand(); + initializationBuffer[1] = (rand() << 16) | rand(); + initializationBuffer[2] = (rand() << 16) | rand(); + initializationBuffer[3] = (rand() << 16) | rand(); + init_by_array(initializationBuffer, 4); #elif COMPILER(MSVC) && defined(_CRT_RAND_S) - // On Windows we use rand_s which intialises itself + // On Windows we use rand_s which initialises itself #elif PLATFORM(UNIX) // srandomdev is not guaranteed to exist on linux so we use this poor seed, this should be improved timeval time; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h b/src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h index c174145dce..761a8566f4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h @@ -29,7 +29,7 @@ namespace WTF { // This base class holds the non-template methods and attributes. // The RefCounted class inherits from it reducing the template bloat // generated by the compiler (technique called template hoisting). -class RefCountedBase : Noncopyable { +class RefCountedBase { public: void ref() { @@ -101,7 +101,7 @@ private: }; -template<class T> class RefCounted : public RefCountedBase { +template<class T> class RefCounted : public RefCountedBase, public Noncopyable { public: void deref() { @@ -115,8 +115,23 @@ protected: } }; +template<class T> class RefCountedCustomAllocated : public RefCountedBase, public NoncopyableCustomAllocated { +public: + void deref() + { + if (derefBase()) + delete static_cast<T*>(this); + } + +protected: + ~RefCountedCustomAllocated() + { + } +}; + } // namespace WTF using WTF::RefCounted; +using WTF::RefCountedCustomAllocated; #endif // RefCounted_h diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h index b07a9a21e4..4d5d2f7512 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h @@ -59,7 +59,7 @@ namespace WTF { void ThreadSpecificThreadExit(); #endif -template<typename T> class ThreadSpecific : Noncopyable { +template<typename T> class ThreadSpecific : public Noncopyable { public: ThreadSpecific(); T* operator->(); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp index bd25ee7498..56bf43814f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp @@ -30,7 +30,7 @@ namespace WTF { -struct NewThreadContext { +struct NewThreadContext : FastAllocBase { NewThreadContext(ThreadFunction entryPoint, void* data, const char* name) : entryPoint(entryPoint) , data(data) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h index b12f41fa77..65781516f7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h @@ -159,7 +159,7 @@ typedef void* PlatformReadWriteLock; typedef void* PlatformCondition; #endif -class Mutex : Noncopyable { +class Mutex : public Noncopyable { public: Mutex(); ~Mutex(); @@ -176,7 +176,7 @@ private: typedef Locker<Mutex> MutexLocker; -class ReadWriteLock : Noncopyable { +class ReadWriteLock : public Noncopyable { public: ReadWriteLock(); ~ReadWriteLock(); @@ -193,7 +193,7 @@ private: PlatformReadWriteLock m_readWriteLock; }; -class ThreadCondition : Noncopyable { +class ThreadCondition : public Noncopyable { public: ThreadCondition(); ~ThreadCondition(); @@ -234,7 +234,7 @@ inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_ #endif -class ThreadSafeSharedBase : Noncopyable { +class ThreadSafeSharedBase : public Noncopyable { public: ThreadSafeSharedBase(int initialRefCount = 1) : m_refCount(initialRefCount) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp index ea186564b0..cccbda14ef 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -89,7 +90,14 @@ #if !USE(PTHREADS) && PLATFORM(WIN_OS) #include "ThreadSpecific.h" #endif +#if !PLATFORM(WINCE) #include <process.h> +#endif +#if HAVE(ERRNO_H) +#include <errno.h> +#else +#define NO_ERRNO +#endif #include <windows.h> #include <wtf/CurrentTime.h> #include <wtf/HashMap.h> @@ -210,9 +218,21 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con unsigned threadIdentifier = 0; ThreadIdentifier threadID = 0; ThreadFunctionInvocation* invocation = new ThreadFunctionInvocation(entryPoint, data); +#if PLATFORM(WINCE) + // This is safe on WINCE, since CRT is in the core and innately multithreaded. + // On desktop Windows, need to use _beginthreadex (not available on WinCE) if using any CRT functions + HANDLE threadHandle = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)wtfThreadEntryPoint, invocation, 0, (LPDWORD)&threadIdentifier); +#else HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThreadEntryPoint, invocation, 0, &threadIdentifier)); +#endif if (!threadHandle) { +#if PLATFORM(WINCE) + LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, ::GetLastError()); +#elif defined(NO_ERRNO) + LOG_ERROR("Failed to create thread at entry point %p with data %p.", entryPoint, data); +#else LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, errno); +#endif return 0; } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index c378fd0585..7cba4e48ad 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -268,7 +268,7 @@ namespace WTF { }; template<typename T> - class VectorBufferBase : Noncopyable { + class VectorBufferBase : public Noncopyable { public: void allocateBuffer(size_t newCapacity) { @@ -934,7 +934,7 @@ namespace WTF { inline void Vector<T, inlineCapacity>::remove(size_t position, size_t length) { ASSERT(position < size()); - ASSERT(position + length < size()); + ASSERT(position + length <= size()); T* beginSpot = begin() + position; T* endSpot = beginSpot + length; TypeOperations::destruct(beginSpot, endSpot); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h index f04779dd7d..51e8a063f2 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h @@ -39,7 +39,7 @@ struct UCollator; namespace WTF { - class Collator : Noncopyable { + class Collator : public Noncopyable { public: enum Result { Equal = 0, Greater = 1, Less = -1 }; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp index 79dec79d24..6376bb31fe 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp @@ -37,6 +37,7 @@ #include <string.h> #if PLATFORM(DARWIN) +#include "RetainPtr.h" #include <CoreFoundation/CoreFoundation.h> #endif @@ -60,11 +61,16 @@ std::auto_ptr<Collator> Collator::userDefault() { #if PLATFORM(DARWIN) && PLATFORM(CF) // Mac OS X doesn't set UNIX locale to match user-selected one, so ICU default doesn't work. - CFStringRef collationOrder = (CFStringRef)CFPreferencesCopyValue(CFSTR("AppleCollationOrder"), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); +#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE) + RetainPtr<CFLocaleRef> currentLocale(AdoptCF, CFLocaleCopyCurrent()); + CFStringRef collationOrder = (CFStringRef)CFLocaleGetValue(currentLocale.get(), kCFLocaleCollatorIdentifier); +#else + RetainPtr<CFStringRef> collationOrderRetainer(AdoptCF, (CFStringRef)CFPreferencesCopyValue(CFSTR("AppleCollationOrder"), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost)); + CFStringRef collationOrder = collationOrderRetainer.get(); +#endif char buf[256]; if (collationOrder) { CFStringGetCString(collationOrder, buf, sizeof(buf), kCFStringEncodingASCII); - CFRelease(collationOrder); return std::auto_ptr<Collator>(new Collator(buf)); } else return std::auto_ptr<Collator>(new Collator("")); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/wince/FastMallocWince.h b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/FastMallocWince.h new file mode 100644 index 0000000000..93d9f75956 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/FastMallocWince.h @@ -0,0 +1,177 @@ +/* + * This file is part of the KDE libraries + * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2007-2009 Torch Mobile, 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 + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifndef FastMallocWince_h +#define FastMallocWince_h + +#include <new.h> + +#ifdef __cplusplus +#include <new> +#include "MemoryManager.h" +extern "C" { +#endif + +void* fastMalloc(size_t n); +void* fastCalloc(size_t n_elements, size_t element_size); +void fastFree(void* p); +void* fastRealloc(void* p, size_t n); +void* fastZeroedMalloc(size_t n); +// These functions return 0 if an allocation fails. +void* tryFastMalloc(size_t n); +void* tryFastZeroedMalloc(size_t n); +void* tryFastCalloc(size_t n_elements, size_t element_size); +void* tryFastRealloc(void* p, size_t n); +char* fastStrDup(const char*); + +#ifndef NDEBUG +void fastMallocForbid(); +void fastMallocAllow(); +#endif + +#if !defined(USE_SYSTEM_MALLOC) || !USE_SYSTEM_MALLOC + +#define malloc(n) fastMalloc(n) +#define calloc(n_elements, element_size) fastCalloc(n_elements, element_size) +#define realloc(p, n) fastRealloc(p, n) +#define free(p) fastFree(p) +#define strdup(p) fastStrDup(p) + +#else + +#define strdup(p) _strdup(p) + +#endif + +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +#if !defined(USE_SYSTEM_MALLOC) || !USE_SYSTEM_MALLOC +static inline void* __cdecl operator new(size_t s) { return fastMalloc(s); } +static inline void __cdecl operator delete(void* p) { fastFree(p); } +static inline void* __cdecl operator new[](size_t s) { return fastMalloc(s); } +static inline void __cdecl operator delete[](void* p) { fastFree(p); } +static inline void* operator new(size_t s, const std::nothrow_t&) throw() { return fastMalloc(s); } +static inline void operator delete(void* p, const std::nothrow_t&) throw() { fastFree(p); } +static inline void* operator new[](size_t s, const std::nothrow_t&) throw() { return fastMalloc(s); } +static inline void operator delete[](void* p, const std::nothrow_t&) throw() { fastFree(p); } +#endif + +namespace WTF { + // This defines a type which holds an unsigned integer and is the same + // size as the minimally aligned memory allocation. + typedef unsigned long long AllocAlignmentInteger; + + namespace Internal { + enum AllocType { // Start with an unusual number instead of zero, because zero is common. + AllocTypeMalloc = 0x375d6750, // Encompasses fastMalloc, fastZeroedMalloc, fastCalloc, fastRealloc. + AllocTypeClassNew, // Encompasses class operator new from FastAllocBase. + AllocTypeClassNewArray, // Encompasses class operator new[] from FastAllocBase. + AllocTypeFastNew, // Encompasses fastNew. + AllocTypeFastNewArray, // Encompasses fastNewArray. + AllocTypeNew, // Encompasses global operator new. + AllocTypeNewArray // Encompasses global operator new[]. + }; + } + + +#if ENABLE(FAST_MALLOC_MATCH_VALIDATION) + + // Malloc validation is a scheme whereby a tag is attached to an + // allocation which identifies how it was originally allocated. + // This allows us to verify that the freeing operation matches the + // allocation operation. If memory is allocated with operator new[] + // but freed with free or delete, this system would detect that. + // In the implementation here, the tag is an integer prepended to + // the allocation memory which is assigned one of the AllocType + // enumeration values. An alternative implementation of this + // scheme could store the tag somewhere else or ignore it. + // Users of FastMalloc don't need to know or care how this tagging + // is implemented. + + namespace Internal { + + // Return the AllocType tag associated with the allocated block p. + inline AllocType fastMallocMatchValidationType(const void* p) + { + const AllocAlignmentInteger* type = static_cast<const AllocAlignmentInteger*>(p) - 1; + return static_cast<AllocType>(*type); + } + + // Return the address of the AllocType tag associated with the allocated block p. + inline AllocAlignmentInteger* fastMallocMatchValidationValue(void* p) + { + return reinterpret_cast<AllocAlignmentInteger*>(static_cast<char*>(p) - sizeof(AllocAlignmentInteger)); + } + + // Set the AllocType tag to be associaged with the allocated block p. + inline void setFastMallocMatchValidationType(void* p, AllocType allocType) + { + AllocAlignmentInteger* type = static_cast<AllocAlignmentInteger*>(p) - 1; + *type = static_cast<AllocAlignmentInteger>(allocType); + } + + // Handle a detected alloc/free mismatch. By default this calls CRASH(). + void fastMallocMatchFailed(void* p); + + } // namespace Internal + + // This is a higher level function which is used by FastMalloc-using code. + inline void fastMallocMatchValidateMalloc(void* p, Internal::AllocType allocType) + { + if (!p) + return; + + Internal::setFastMallocMatchValidationType(p, allocType); + } + + // This is a higher level function which is used by FastMalloc-using code. + inline void fastMallocMatchValidateFree(void* p, Internal::AllocType allocType) + { + if (!p) + return; + + if (Internal::fastMallocMatchValidationType(p) != allocType) + Internal::fastMallocMatchFailed(p); + Internal::setFastMallocMatchValidationType(p, Internal::AllocTypeMalloc); // Set it to this so that fastFree thinks it's OK. + } + +#else + + inline void fastMallocMatchValidateMalloc(void*, Internal::AllocType) + { + } + + inline void fastMallocMatchValidateFree(void*, Internal::AllocType) + { + } + +#endif + +} // namespace WTF + +#endif + +#endif // FastMallocWince_h + diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.cpp new file mode 100644 index 0000000000..b65b368235 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.cpp @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2008-2009 Torch Mobile Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" +#include "MemoryManager.h" + +#undef malloc +#undef calloc +#undef realloc +#undef free +#undef strdup +#undef _strdup +#undef VirtualAlloc +#undef VirtualFree + +#include <malloc.h> +#include <windows.h> + +namespace WTF { + +MemoryManager* memoryManager() +{ + static MemoryManager mm; + return &mm; +} + +MemoryManager::MemoryManager() +: m_allocationCanFail(false) +{ +} + +MemoryManager::~MemoryManager() +{ +} + +HBITMAP MemoryManager::createCompatibleBitmap(HDC hdc, int width, int height) +{ + return ::CreateCompatibleBitmap(hdc, width, height); +} + +HBITMAP MemoryManager::createDIBSection(const BITMAPINFO* pbmi, void** ppvBits) +{ + return ::CreateDIBSection(0, pbmi, DIB_RGB_COLORS, ppvBits, 0, 0); +} + +void* MemoryManager::m_malloc(size_t size) +{ + return malloc(size); +} + +void* MemoryManager::m_calloc(size_t num, size_t size) +{ + return calloc(num, size); +} + +void* MemoryManager::m_realloc(void* p, size_t size) +{ + return realloc(p, size); +} + +void MemoryManager::m_free(void* p) +{ + return free(p); +} + +bool MemoryManager::resizeMemory(void*, size_t) +{ + return false; +} + +void* MemoryManager::allocate64kBlock() +{ + return VirtualAlloc(0, 65536, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); +} + +void MemoryManager::free64kBlock(void* p) +{ + VirtualFree(p, 65536, MEM_RELEASE); +} + +bool MemoryManager::onIdle(DWORD& timeLimitMs) +{ + return false; +} + +LPVOID MemoryManager::virtualAlloc(LPVOID lpAddress, DWORD dwSize, DWORD flAllocationType, DWORD flProtect) +{ + return ::VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect); +} + +BOOL MemoryManager::virtualFree(LPVOID lpAddress, DWORD dwSize, DWORD dwFreeType) +{ + return ::VirtualFree(lpAddress, dwSize, dwFreeType); +} + + +#if defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC + +void *fastMalloc(size_t n) { return malloc(n); } +void *fastCalloc(size_t n_elements, size_t element_size) { return calloc(n_elements, element_size); } +void fastFree(void* p) { return free(p); } +void *fastRealloc(void* p, size_t n) { return realloc(p, n); } + +#else + +void *fastMalloc(size_t n) { return MemoryManager::m_malloc(n); } +void *fastCalloc(size_t n_elements, size_t element_size) { return MemoryManager::m_calloc(n_elements, element_size); } +void fastFree(void* p) { return MemoryManager::m_free(p); } +void *fastRealloc(void* p, size_t n) { return MemoryManager::m_realloc(p, n); } + +#endif + +#ifndef NDEBUG +void fastMallocForbid() {} +void fastMallocAllow() {} +#endif + +void* fastZeroedMalloc(size_t n) +{ + void* p = fastMalloc(n); + if (p) + memset(p, 0, n); + return p; +} + +void* tryFastMalloc(size_t n) +{ + MemoryAllocationCanFail canFail; + return fastMalloc(n); +} + +void* tryFastZeroedMalloc(size_t n) +{ + MemoryAllocationCanFail canFail; + return fastZeroedMalloc(n); +} + +void* tryFastCalloc(size_t n_elements, size_t element_size) +{ + MemoryAllocationCanFail canFail; + return fastCalloc(n_elements, element_size); +} + +void* tryFastRealloc(void* p, size_t n) +{ + MemoryAllocationCanFail canFail; + return fastRealloc(p, n); +} + +char* fastStrDup(const char* str) +{ + return _strdup(str); +} + +}
\ No newline at end of file diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.h b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.h new file mode 100644 index 0000000000..f405612df3 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.h @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2008-2009 Torch Mobile Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#pragma once + +#include <winbase.h> + +typedef struct HBITMAP__* HBITMAP; +typedef struct HDC__* HDC; +typedef void *HANDLE; +typedef struct tagBITMAPINFO BITMAPINFO; + +namespace WTF { + + class MemoryManager { + public: + MemoryManager(); + ~MemoryManager(); + + bool allocationCanFail() const { return m_allocationCanFail; } + void setAllocationCanFail(bool c) { m_allocationCanFail = c; } + + static HBITMAP createCompatibleBitmap(HDC hdc, int width, int height); + static HBITMAP createDIBSection(const BITMAPINFO* pbmi, void** ppvBits); + static void* m_malloc(size_t size); + static void* m_calloc(size_t num, size_t size); + static void* m_realloc(void* p, size_t size); + static void m_free(void*); + static bool resizeMemory(void* p, size_t newSize); + static void* allocate64kBlock(); + static void free64kBlock(void*); + static bool onIdle(DWORD& timeLimitMs); + static LPVOID virtualAlloc(LPVOID lpAddress, DWORD dwSize, DWORD flAllocationType, DWORD flProtect); + static BOOL virtualFree(LPVOID lpAddress, DWORD dwSize, DWORD dwFreeType); + + private: + friend MemoryManager* memoryManager(); + + bool m_allocationCanFail; + }; + + MemoryManager* memoryManager(); + + class MemoryAllocationCanFail { + public: + MemoryAllocationCanFail() : m_old(memoryManager()->allocationCanFail()) { memoryManager()->setAllocationCanFail(true); } + ~MemoryAllocationCanFail() { memoryManager()->setAllocationCanFail(m_old); } + private: + bool m_old; + }; + + class MemoryAllocationCannotFail { + public: + MemoryAllocationCannotFail() : m_old(memoryManager()->allocationCanFail()) { memoryManager()->setAllocationCanFail(false); } + ~MemoryAllocationCannotFail() { memoryManager()->setAllocationCanFail(m_old); } + private: + bool m_old; + }; +} + +using WTF::MemoryManager; +using WTF::memoryManager; +using WTF::MemoryAllocationCanFail; +using WTF::MemoryAllocationCannotFail; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/wince/mt19937ar.c b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/mt19937ar.c new file mode 100644 index 0000000000..4715958d12 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/mt19937ar.c @@ -0,0 +1,170 @@ +/* + A C-program for MT19937, with initialization improved 2002/1/26. + Coded by Takuji Nishimura and Makoto Matsumoto. + + Before using, initialize the state by using init_genrand(seed) + or init_by_array(init_key, key_length). + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + Any feedback is very welcome. + http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html + email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) +*/ + +#include <stdio.h> + +/* Period parameters */ +#define N 624 +#define M 397 +#define MATRIX_A 0x9908b0dfUL /* constant vector a */ +#define UPPER_MASK 0x80000000UL /* most significant w-r bits */ +#define LOWER_MASK 0x7fffffffUL /* least significant r bits */ + +static unsigned long mt[N]; /* the array for the state vector */ +static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */ + +/* initializes mt[N] with a seed */ +void init_genrand(unsigned long s) +{ + mt[0]= s & 0xffffffffUL; + for (mti=1; mti<N; mti++) { + mt[mti] = (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti); + /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ + /* In the previous versions, MSBs of the seed affect */ + /* only MSBs of the array mt[]. */ + /* 2002/01/09 modified by Makoto Matsumoto */ + mt[mti] &= 0xffffffffUL; + /* for >32 bit machines */ + } +} + +/* initialize by an array with array-length */ +/* init_key is the array for initializing keys */ +/* key_length is its length */ +/* slight change for C++, 2004/2/26 */ +void init_by_array(unsigned long init_key[],int key_length) +{ + int i, j, k; + init_genrand(19650218UL); + i=1; j=0; + k = (N>key_length ? N : key_length); + for (; k; k--) { + mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL)) + + init_key[j] + j; /* non linear */ + mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ + i++; j++; + if (i>=N) { mt[0] = mt[N-1]; i=1; } + if (j>=key_length) j=0; + } + for (k=N-1; k; k--) { + mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL)) + - i; /* non linear */ + mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ + i++; + if (i>=N) { mt[0] = mt[N-1]; i=1; } + } + + mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ +} + +/* generates a random number on [0,0xffffffff]-interval */ +unsigned long genrand_int32(void) +{ + unsigned long y; + static unsigned long mag01[2]={0x0UL, MATRIX_A}; + /* mag01[x] = x * MATRIX_A for x=0,1 */ + + if (mti >= N) { /* generate N words at one time */ + int kk; + + if (mti == N+1) /* if init_genrand() has not been called, */ + init_genrand(5489UL); /* a default initial seed is used */ + + for (kk=0;kk<N-M;kk++) { + y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK); + mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1UL]; + } + for (;kk<N-1;kk++) { + y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK); + mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1UL]; + } + y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK); + mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL]; + + mti = 0; + } + + y = mt[mti++]; + + /* Tempering */ + y ^= (y >> 11); + y ^= (y << 7) & 0x9d2c5680UL; + y ^= (y << 15) & 0xefc60000UL; + y ^= (y >> 18); + + return y; +} + +/* generates a random number on [0,0x7fffffff]-interval */ +long genrand_int31(void) +{ + return (long)(genrand_int32()>>1); +} + +/* generates a random number on [0,1]-real-interval */ +double genrand_real1(void) +{ + return genrand_int32()*(1.0/4294967295.0); + /* divided by 2^32-1 */ +} + +/* generates a random number on [0,1)-real-interval */ +double genrand_real2(void) +{ + return genrand_int32()*(1.0/4294967296.0); + /* divided by 2^32 */ +} + +/* generates a random number on (0,1)-real-interval */ +double genrand_real3(void) +{ + return (((double)genrand_int32()) + 0.5)*(1.0/4294967296.0); + /* divided by 2^32 */ +} + +/* generates a random number on [0,1) with 53-bit resolution*/ +double genrand_res53(void) +{ + unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6; + return(a*67108864.0+b)*(1.0/9007199254740992.0); +} diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp index 65c53cf2a8..663a524372 100644 --- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp @@ -28,6 +28,7 @@ #include "ASCIICType.h" #include "JSGlobalData.h" +#include "LinkBuffer.h" #include "MacroAssembler.h" #include "RegexCompiler.h" @@ -43,18 +44,17 @@ namespace JSC { namespace Yarr { class RegexGenerator : private MacroAssembler { friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline); -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM) static const RegisterID input = ARM::r0; static const RegisterID index = ARM::r1; static const RegisterID length = ARM::r2; - static const RegisterID output = ARM::r4; + static const RegisterID regT0 = ARM::r5; static const RegisterID regT1 = ARM::r6; static const RegisterID returnRegister = ARM::r0; -#endif -#if PLATFORM(X86) +#elif PLATFORM(X86) static const RegisterID input = X86::eax; static const RegisterID index = X86::edx; static const RegisterID length = X86::ecx; @@ -64,8 +64,7 @@ class RegexGenerator : private MacroAssembler { static const RegisterID regT1 = X86::esi; static const RegisterID returnRegister = X86::eax; -#endif -#if PLATFORM(X86_64) +#elif PLATFORM(X86_64) static const RegisterID input = X86::edi; static const RegisterID index = X86::esi; static const RegisterID length = X86::edx; @@ -1309,7 +1308,10 @@ class RegexGenerator : private MacroAssembler { #else loadPtr(Address(X86::ebp, 2 * sizeof(void*)), output); #endif -#elif PLATFORM_ARM_ARCH(7) +#elif PLATFORM(ARM) +#if !PLATFORM_ARM_ARCH(7) + push(ARM::lr); +#endif push(ARM::r4); push(ARM::r5); push(ARM::r6); @@ -1327,7 +1329,7 @@ class RegexGenerator : private MacroAssembler { pop(X86::edi); pop(X86::ebx); pop(X86::ebp); -#elif PLATFORM_ARM_ARCH(7) +#elif PLATFORM(ARM) pop(ARM::r6); pop(ARM::r5); pop(ARM::r4); diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h index fb1b0ab815..a4511318ba 100644 --- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h +++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h @@ -57,7 +57,7 @@ struct CharacterRange { } }; -struct CharacterClass { +struct CharacterClass : FastAllocBase { Vector<UChar> m_matches; Vector<CharacterRange> m_ranges; Vector<UChar> m_matchesUnicode; @@ -181,7 +181,7 @@ struct PatternTerm { } }; -struct PatternAlternative { +struct PatternAlternative : FastAllocBase { PatternAlternative(PatternDisjunction* disjunction) : m_parent(disjunction) { @@ -205,7 +205,7 @@ struct PatternAlternative { bool m_hasFixedSize; }; -struct PatternDisjunction { +struct PatternDisjunction : FastAllocBase { PatternDisjunction(PatternAlternative* parent = 0) : m_parent(parent) { diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index fc32632de4..6834134053 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 - qtwebkit-4.6-snapshot-13072009 branch/tag + qtwebkit-4.6-snapshot-29072009 branch/tag and has the sha1 checksum - b2abc0c271880b8135507861056af497f895adf5 + 07fbaeddfade72be1d0d7e7f2b947e5d3c183f4a diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 35640c58e9..7fc69b45b0 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,7330 @@ +2009-07-28 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Steve Falkenburg. + + Add output directory for VS pre-build steps to enable out-of-tree builds + + https://bugs.webkit.org/show_bug.cgi?id=27700 + + The tmp.obj file is now placed in the intermediate build directory. + + * WebCore.vcproj/WebCoreCommon.vsprops: + +2009-07-28 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Add inspected node using public console API. + + https://bugs.webkit.org/show_bug.cgi?id=27758 + + * inspector/front-end/Console.js: + (WebInspector.Console.prototype.addInspectedNode): + * inspector/front-end/ElementsPanel.js: + (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged): + (WebInspector.ElementsPanel): + +2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + [WML] <do> elements with a <noop> task shouldn't be exposed to the user + https://bugs.webkit.org/show_bug.cgi?id=27724 + + Fix WMLNoopElement to disable it's parent WMLDoElement, as required by the spec. + Moved manual-tests/wml/task-noop-in-do.wml to LayoutTests/fast/wml/task-noop-in-do.wml. + + * manual-tests/wml/task-noop-in-do.wml: Removed. + * wml/WMLNoopElement.cpp: + (WebCore::WMLNoopElement::insertedIntoDocument): + +2009-07-28 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Disable some compiler warnings for the win build + https://bugs.webkit.org/show_bug.cgi?id=27709 + + * WebCore.pro: Move the msvc options to WebKit.pri + +2009-07-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Tor Arne Vestbø + + Make equality checks for logging channel names ignore casing. + + * platform/Logging.cpp: + (WebCore::getChannelFromName): + +2009-07-28 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by Xan Lopez. + + [Gtk] Refactor ResourceHandleSoup - make start* functions static + https://bugs.webkit.org/show_bug.cgi?id=27687 + + * platform/network/ResourceHandle.h: + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::startData): + (WebCore::startHttp): + (WebCore::): + +2009-07-28 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + https://bugs.webkit.org/show_bug.cgi?id=25415 + [GTK][ATK] Please implement support for get_text_at_offset + + Do not cache the pango layout in the object, since the layout of + the page can change between calls. + + * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: + +2009-07-23 Anton Muhin <antonm@chromium.org> + + Reviewed by Adam Barth. + + Simplify management of Nodes in weak handles callbacks. + https://bugs.webkit.org/show_bug.cgi?id=27628 + + * bindings/v8/V8DOMMap.cpp: + (WebCore::weakNodeCallback): + +2009-07-28 Brian Weinstein <bweinstein@apple.com> + + Rubber-stamped by David Levin. + + Fix error handling of GetIconInfo (returns a bool). + + * platform/win/DragImageWin.cpp: + (WebCore::createDragImageIconForCachedImage): + +2009-07-27 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Jon Honeycutt. + + Fix of <rdar://5015949> Drag Icon is not produced for over sized images. + + Implemented the createDragImageIconForCachedImage function by using the Windows + SHFILEINFO structure. + + * platform/win/DragImageWin.cpp: + (WebCore::createDragImageIconForCachedImage): + +2009-07-25 Adam Barth <abarth@webkit.org> + + Reviewed by David Levin. + + [V8] Split up V8DOMMap.cpp by class + https://bugs.webkit.org/show_bug.cgi?id=27685 + + No behavior change. Just copy-and-paste. + + * WebCore.gypi: + * bindings/v8/ChildThreadDOMData.cpp: Added. + (WebCore::ChildThreadDOMData::ChildThreadDOMData): + (WebCore::ChildThreadDOMData::getStore): + * bindings/v8/ChildThreadDOMData.h: Added. + * bindings/v8/DOMData.cpp: Added. + (WebCore::DOMData::DOMData): + (WebCore::DOMData::getCurrent): + (WebCore::DOMData::getCurrentMainThread): + (WebCore::DOMData::handleWeakObject): + (WebCore::DOMData::ensureDeref): + (WebCore::DOMData::derefObject): + (WebCore::DOMData::derefDelayedObjects): + (WebCore::DOMData::derefDelayedObjectsInCurrentThread): + (WebCore::DOMData::removeObjectsFromWrapperMap): + * bindings/v8/DOMData.h: Added. + (WebCore::): + * bindings/v8/DOMDataStore.cpp: Added. + (WebCore::DOMDataStore::DOMDataStore): + (WebCore::DOMDataStore::~DOMDataStore): + (WebCore::DOMDataStore::allStores): + (WebCore::DOMDataStore::allStoresMutex): + (WebCore::DOMDataStore::getDOMWrapperMap): + (WebCore::forget): + (WebCore::DOMDataStore::weakDOMObjectCallback): + (WebCore::DOMDataStore::weakActiveDOMObjectCallback): + (WebCore::DOMDataStore::weakNodeCallback): + (WebCore::DOMDataStore::weakSVGElementInstanceCallback): + (WebCore::DOMDataStore::weakSVGObjectWithContextCallback): + * bindings/v8/DOMDataStore.h: Added. + (WebCore::DOMDataStore::): + (WebCore::DOMDataStore::InternalDOMWrapperMap::InternalDOMWrapperMap): + (WebCore::DOMDataStore::InternalDOMWrapperMap::forgetOnly): + (WebCore::DOMDataStore::domData): + (WebCore::DOMDataStore::domNodeMap): + (WebCore::DOMDataStore::domObjectMap): + (WebCore::DOMDataStore::activeDomObjectMap): + (WebCore::DOMDataStore::domSvgElementInstanceMap): + (WebCore::DOMDataStore::domSvgObjectWithContextMap): + * bindings/v8/MainThreadDOMData.cpp: Added. + (WebCore::MainThreadDOMData::MainThreadDOMData): + (WebCore::MainThreadDOMData::getStore): + * bindings/v8/MainThreadDOMData.h: Added. + * bindings/v8/ScopedDOMDataStore.cpp: Added. + (WebCore::ScopedDOMDataStore::ScopedDOMDataStore): + (WebCore::ScopedDOMDataStore::~ScopedDOMDataStore): + * bindings/v8/ScopedDOMDataStore.h: Added. + * bindings/v8/StaticDOMDataStore.cpp: Added. + (WebCore::StaticDOMDataStore::StaticDOMDataStore): + * bindings/v8/StaticDOMDataStore.h: Added. + * bindings/v8/V8DOMMap.cpp: + +2009-07-27 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7091036> REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread + + Add a method for detecting if we're being used within Microsoft Messenger. + + * WebCore.base.exp: Export applicationIsMicrosoftMessenger and sort existing entries. + * platform/mac/RuntimeApplicationChecks.h: + * platform/mac/RuntimeApplicationChecks.mm: + (WebCore::applicationIsMicrosoftMessenger): + +2009-07-27 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + [V8] Implement EventListener::reportError for V8 event listeners in worker context. + https://bugs.webkit.org/show_bug.cgi?id=27731 + + * bindings/v8/V8WorkerContextEventListener.cpp: + (WebCore::V8WorkerContextEventListener::reportError): + * bindings/v8/V8WorkerContextEventListener.h: + +2009-07-27 Stephen White <senorblanco@chromium.org> + + Reviewed by Eric Seidel and David Levin. + + Re-apply chromium/skia border fix (originally landed in r46157, + reverted in r46363), since it was not the cause of the reliability + failures in Chromium. + + http://bugs.webkit.org/show_bug.cgi?id=27388 + + * platform/graphics/skia/GraphicsContextSkia.cpp: + (WebCore::GraphicsContext::drawLine): + * platform/graphics/skia/PlatformContextSkia.cpp: + (PlatformContextSkia::setupPaintForStroking): + +2009-07-27 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Justin Garcia. + + createMarkup does not handle CSS properly + https://bugs.webkit.org/show_bug.cgi?id=27660 + + This patch isolates code that creates markup for styles in addStyleMarkup + It also makes all presentational elements (u, s, strike, i, em, b, strong) special ancestor in createMarkup + so that we can assume no text decoration style is passed to addStyleMarkup. + + * editing/markup.cpp: + (WebCore::propertyMissingOrEqualToNone): Changed the first argument from CSSMutableStyleDecleration to CSSStyleDeclaration + (WebCore::isElementPresentational): Used to be elementHasTextDecorationProperty, now supports presentational tags + (WebCore::addStyleMarkup): Adds markup for style span and div + (WebCore::createMarkup): Uses isElementPresentational and addStyleMarkup + +2009-07-27 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + fix more obvious global object lookups + https://bugs.webkit.org/show_bug.cgi?id=27745 + + No new tests for these changes. I believe in many cases + testing to be impossible. Lack of testing justification next to + each change below. The remaining pieces of bug 27634 will all + need tests. + + * bindings/js/JSDOMWindowBase.cpp: + (WebCore::JSDOMWindowBase::updateDocument): not testable. + * bindings/js/JSDataGridColumnListCustom.cpp: + (WebCore::JSDataGridColumnList::nameGetter): no testing for this incomplete feature. + * bindings/js/JSEventListener.cpp: + (WebCore::JSEventListener::handleEvent): would require outer frame to trigger an event in the inner frame + * bindings/js/JSEventTarget.cpp: + (WebCore::toJS): covered by other tests, always correct to pass the globalObject through. + * bindings/js/JSHTMLElementCustom.cpp: + (WebCore::JSHTMLElement::pushEventHandlerScope): unclear when this could be triggered. + * bindings/js/JSHTMLOptionsCollectionCustom.cpp: + (WebCore::JSHTMLOptionsCollection::remove): toJS seems superfluous here to begin with. + * bindings/js/JSLazyEventListener.cpp: + (WebCore::JSLazyEventListener::parseCode): would require outer frame to trigger inner frame event. + * bindings/js/ScriptController.cpp: + (WebCore::ScriptController::jsObjectForPluginElement): only used for NPAPI binding, unclear how to test. + * bindings/js/ScriptEventListener.cpp: + (WebCore::createAttributeEventListener): unclear how to test. + * bindings/js/ScriptObject.cpp: + (WebCore::ScriptGlobalObject::set): unclear how to test/inspector only. + * bindings/js/ScriptObjectQuarantine.cpp: + (WebCore::getQuarantinedScriptObject): unclear how to test. + * bindings/objc/DOMInternal.mm: + (-[WebScriptObject _initializeScriptDOMNodeImp]): unclear how to test. + +2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + [WML] 'title' attribute handling not correct for <a> / <anchor> elements + https://bugs.webkit.org/show_bug.cgi?id=27720 + + Unify title() implementation in WMLElement instead of several copies of the same logic. + We forgot WMLAnchorElement/WMLAElement, that lead to bugs. Fixes hovering links in the + WML manual-test suite. + + * wml/WMLCardElement.cpp: + * wml/WMLCardElement.h: + * wml/WMLElement.cpp: + (WebCore::WMLElement::title): + * wml/WMLElement.h: + * wml/WMLOptGroupElement.cpp: + * wml/WMLOptGroupElement.h: + * wml/WMLSelectElement.cpp: + * wml/WMLSelectElement.h: + +2009-07-27 Adam Treat <adam.treat@torchmobile.com> + + Speculative build fix for Windows and WinCE. + + * plugins/win/PluginPackageWin.cpp: + (WebCore::PluginPackage::load): + +2009-07-27 Ojan Vafai <ojan@chromium.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=27474 + Fixes crashes due to renderer getting destroyed in updateLayout. + We need to call updateLayout before we call into the renderer. + Removed the updateLayout call from RenderTextControl and moved it + into the calling sites. + + Also changes updateLayout to updateLayoutIgnorePendingStylesheets so + this works with pending stylesheets. Unfortunately, this seems to be + untestable. Loading an external stylesheet and then having an inline + script hit this code did not result in an pending stylesheets. + + The are other cases of this bug in the rendering code. I'll file a + followup bug to audit the calls to updateLayout. + + Test: fast/dom/text-control-crash-on-select.html + + * dom/Document.h: + (WebCore::Document::inStyleRecalc): Added so the ASSERTs in updateFocusAppearance + and setSelectionRange could deal with cases of reentrancy into updateLayout + calls. This happens in a couple layout tests. + * dom/InputElement.cpp: + (WebCore::InputElement::updateSelectionRange): + * html/HTMLInputElement.cpp: + (WebCore::isTextFieldWithRendererAfterUpdateLayout): + (WebCore::HTMLInputElement::setSelectionStart): + (WebCore::HTMLInputElement::setSelectionEnd): + (WebCore::HTMLInputElement::select): + * html/HTMLTextAreaElement.cpp: + (WebCore::rendererAfterUpdateLayout): + (WebCore::HTMLTextAreaElement::setSelectionStart): + (WebCore::HTMLTextAreaElement::setSelectionEnd): + (WebCore::HTMLTextAreaElement::select): + (WebCore::HTMLTextAreaElement::setSelectionRange): + (WebCore::HTMLTextAreaElement::updateFocusAppearance): + * rendering/RenderTextControl.cpp: + (WebCore::RenderTextControl::setSelectionRange): + +2009-07-27 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Dave Levin. + + [V8] Remove parameterless frame/window retrieval methods from V8Proxy. + https://bugs.webkit.org/show_bug.cgi?id=27737 + + Refactoring, no new behavior, covered by existing tests. + + * bindings/v8/ScriptCallStack.cpp: + (WebCore::ScriptCallStack::ScriptCallStack): + * bindings/v8/V8NPUtils.cpp: + (convertV8ObjectToNPVariant): Ditto. + * bindings/v8/V8Proxy.cpp: + (WebCore::V8Proxy::retrieve): Ditto. + (WebCore::V8Proxy::canAccessPrivate): Ditto. + * bindings/v8/V8Proxy.h: Removed parameterless retrieveWindow/retrieveProxy decls. + * bindings/v8/custom/V8DatabaseCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): Changed to use V8Proxy::retrieveFrameForCurrentContext(). + * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: + (WebCore::CALLBACK_FUNC_DECL): Ditto. + * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: + (WebCore::CALLBACK_FUNC_DECL): Ditto. + * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: + (WebCore::CALLBACK_FUNC_DECL): Ditto. + * bindings/v8/custom/V8MessageChannelConstructor.cpp: + (WebCore::CALLBACK_FUNC_DECL): Ditto. + * bindings/v8/custom/V8SQLTransactionCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): Ditto. + * bindings/v8/custom/V8WorkerCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): Ditto. + * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: + (WebCore::CALLBACK_FUNC_DECL): Ditto. + +2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + [WML] 'onpick' intrinsic event handling missing + https://bugs.webkit.org/show_bug.cgi?id=27723 + + Trigger 'onpick' intrinsic events from WMLOptionElement::setSelectedState(). + All was in place, just forgot to enable the relevant code. + + Fixes manual-tests/wml/select-onpick-event.wml + Test: wml/option-element-onpick.html + + * wml/WMLOptionElement.cpp: + (WebCore::WMLOptionElement::setSelectedState): + +2009-07-27 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=27735 + Give a helpful name to JSLock constructor argument + + * bindings/js/GCController.cpp: + (WebCore::collect): + (WebCore::GCController::gcTimerFired): + (WebCore::GCController::garbageCollectNow): + * bindings/js/JSCustomPositionCallback.cpp: + (WebCore::JSCustomPositionCallback::handleEvent): + * bindings/js/JSCustomPositionErrorCallback.cpp: + (WebCore::JSCustomPositionErrorCallback::handleEvent): + * bindings/js/JSCustomSQLStatementCallback.cpp: + (WebCore::JSCustomSQLStatementCallback::handleEvent): + * bindings/js/JSCustomSQLStatementErrorCallback.cpp: + (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): + * bindings/js/JSCustomSQLTransactionCallback.cpp: + (WebCore::JSCustomSQLTransactionCallback::handleEvent): + * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: + (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): + * bindings/js/JSCustomVoidCallback.cpp: + (WebCore::JSCustomVoidCallback::handleEvent): + * bindings/js/JSCustomXPathNSResolver.cpp: + (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): + * bindings/js/JSEventCustom.cpp: + (WebCore::toJS): + * bindings/js/JSEventListener.cpp: + (WebCore::JSEventListener::handleEvent): + * bindings/js/JSInspectorBackendCustom.cpp: + (WebCore::JSInspectorBackend::currentCallFrame): + (WebCore::JSInspectorBackend::profiles): + * bindings/js/JSNodeFilterCondition.cpp: + (WebCore::JSNodeFilterCondition::acceptNode): + * bindings/js/ScheduledAction.cpp: + (WebCore::ScheduledAction::executeFunctionInContext): + * bindings/js/ScriptArray.cpp: + (WebCore::ScriptArray::set): + (WebCore::ScriptArray::createNew): + * bindings/js/ScriptCachedFrameData.cpp: + (WebCore::ScriptCachedFrameData::ScriptCachedFrameData): + (WebCore::ScriptCachedFrameData::restore): + (WebCore::ScriptCachedFrameData::clear): + * bindings/js/ScriptController.cpp: + (WebCore::ScriptController::evaluate): + (WebCore::ScriptController::clearWindowShell): + (WebCore::ScriptController::initScript): + (WebCore::ScriptController::updateDocument): + (WebCore::ScriptController::bindingRootObject): + (WebCore::ScriptController::windowScriptNPObject): + (WebCore::ScriptController::jsObjectForPluginElement): + (WebCore::ScriptController::clearScriptObjects): + * bindings/js/ScriptControllerMac.mm: + (WebCore::ScriptController::windowScriptObject): + * bindings/js/ScriptEventListener.cpp: + (WebCore::createAttributeEventListener): + * bindings/js/ScriptFunctionCall.cpp: + (WebCore::ScriptFunctionCall::appendArgument): + (WebCore::ScriptFunctionCall::call): + (WebCore::ScriptFunctionCall::construct): + * bindings/js/ScriptObject.cpp: + (WebCore::ScriptObject::set): + (WebCore::ScriptObject::createNew): + (WebCore::ScriptGlobalObject::set): + (WebCore::ScriptGlobalObject::get): + (WebCore::ScriptGlobalObject::remove): + * bindings/js/ScriptObjectQuarantine.cpp: + (WebCore::quarantineValue): + (WebCore::getQuarantinedScriptObject): + * bindings/js/ScriptValue.cpp: + (WebCore::ScriptValue::getString): + * bindings/js/WorkerScriptController.cpp: + (WebCore::WorkerScriptController::initScript): + (WebCore::WorkerScriptController::evaluate): + * bindings/objc/WebScriptObject.mm: + (-[WebScriptObject callWebScriptMethod:withArguments:]): + (-[WebScriptObject evaluateWebScript:]): + (-[WebScriptObject setValue:forKey:]): + (-[WebScriptObject valueForKey:]): + (-[WebScriptObject removeWebScriptKey:]): + (-[WebScriptObject stringRepresentation]): + (-[WebScriptObject webScriptValueAtIndex:]): + (-[WebScriptObject setWebScriptValueAtIndex:value:]): + (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): + * bridge/NP_jsobject.cpp: + (_NPN_InvokeDefault): + (_NPN_Invoke): + (_NPN_Evaluate): + (_NPN_GetProperty): + (_NPN_SetProperty): + (_NPN_RemoveProperty): + (_NPN_HasProperty): + (_NPN_HasMethod): + (_NPN_Enumerate): + (_NPN_Construct): + * bridge/c/c_class.cpp: + (JSC::Bindings::CClass::~CClass): + (JSC::Bindings::CClass::methodsNamed): + (JSC::Bindings::CClass::fieldNamed): + * bridge/c/c_instance.cpp: + (JSC::Bindings::CInstance::moveGlobalExceptionToExecState): + (JSC::Bindings::CInstance::invokeMethod): + (JSC::Bindings::CInstance::invokeDefaultMethod): + (JSC::Bindings::CInstance::invokeConstruct): + (JSC::Bindings::CInstance::getPropertyNames): + * bridge/c/c_runtime.cpp: + (JSC::Bindings::CField::valueFromInstance): + (JSC::Bindings::CField::setValueToInstance): + * bridge/c/c_utility.cpp: + (JSC::Bindings::convertValueToNPVariant): + (JSC::Bindings::convertNPVariantToValue): + * bridge/jni/jni_class.cpp: + (JavaClass::JavaClass): + (JavaClass::~JavaClass): + * bridge/jni/jni_instance.cpp: + (JavaInstance::stringValue): + * bridge/jni/jni_jsobject.mm: + (JavaJSObject::call): + (JavaJSObject::eval): + (JavaJSObject::getMember): + (JavaJSObject::setMember): + (JavaJSObject::removeMember): + (JavaJSObject::getSlot): + (JavaJSObject::setSlot): + (JavaJSObject::toString): + (JavaJSObject::convertValueToJObject): + (JavaJSObject::convertJObjectToValue): + * bridge/jni/jni_objc.mm: + (JSC::Bindings::dispatchJNICall): + * bridge/jni/jni_runtime.cpp: + (JavaMethod::signature): + * bridge/jni/jni_runtime.h: + (JSC::Bindings::JavaString::JavaString): + (JSC::Bindings::JavaString::_commonInit): + (JSC::Bindings::JavaString::~JavaString): + (JSC::Bindings::JavaString::UTF8String): + * bridge/jni/jni_utility.cpp: + (JSC::Bindings::convertValueToJValue): + * bridge/objc/objc_instance.mm: + (ObjcInstance::moveGlobalExceptionToExecState): + (ObjcInstance::invokeMethod): + (ObjcInstance::invokeDefaultMethod): + (ObjcInstance::setValueOfUndefinedField): + (ObjcInstance::getValueOfUndefinedField): + * bridge/objc/objc_runtime.mm: + (JSC::Bindings::ObjcField::valueFromInstance): + (JSC::Bindings::ObjcField::setValueToInstance): + * bridge/objc/objc_utility.mm: + (JSC::Bindings::convertValueToObjcValue): + (JSC::Bindings::convertNSStringToString): + (JSC::Bindings::convertObjcValueToValue): + * bridge/qt/qt_instance.cpp: + (JSC::Bindings::QtRuntimeObjectImp::removeFromCache): + (JSC::Bindings::QtInstance::~QtInstance): + (JSC::Bindings::QtInstance::getQtInstance): + (JSC::Bindings::QtInstance::createRuntimeObject): + * bridge/qt/qt_runtime.cpp: + (JSC::Bindings::convertValueToQVariant): + (JSC::Bindings::convertQVariantToValue): + (JSC::Bindings::QtRuntimeMetaMethod::call): + (JSC::Bindings::QtRuntimeConnectionMethod::call): + (JSC::Bindings::QtConnectionObject::execute): + * bridge/runtime.cpp: + (JSC::Bindings::Instance::createRuntimeObject): + * inspector/InspectorController.cpp: + (WebCore::InspectorController::addScriptProfile): + * inspector/JavaScriptCallFrame.cpp: + (WebCore::JavaScriptCallFrame::evaluate): + * inspector/JavaScriptDebugServer.cpp: + (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): + * inspector/JavaScriptProfileNode.cpp: + (WebCore::getTotalTime): + (WebCore::getSelfTime): + (WebCore::getTotalPercent): + (WebCore::getSelfPercent): + (WebCore::getNumberOfCalls): + (WebCore::getChildren): + (WebCore::getParent): + (WebCore::getHead): + (WebCore::getVisible): + (WebCore::getCallUID): + * plugins/PluginView.cpp: + (WebCore::PluginView::start): + (WebCore::getString): + (WebCore::PluginView::performRequest): + (WebCore::PluginView::bindingInstance): + * plugins/gtk/PluginViewGtk.cpp: + (WebCore::PluginView::dispatchNPEvent): + (WebCore::PluginView::handleKeyboardEvent): + (WebCore::PluginView::handleMouseEvent): + (WebCore::PluginView::setNPWindowIfNeeded): + (WebCore::PluginView::stop): + (WebCore::PluginView::init): + * plugins/mac/PluginViewMac.cpp: + (WebCore::PluginView::stop): + (WebCore::PluginView::setNPWindowIfNeeded): + (WebCore::PluginView::dispatchNPEvent): + * plugins/qt/PluginViewQt.cpp: + (WebCore::PluginView::setNPWindowIfNeeded): + (WebCore::PluginView::stop): + (WebCore::PluginView::init): + * plugins/win/PluginViewWin.cpp: + (WebCore::PluginView::dispatchNPEvent): + (WebCore::PluginView::handleKeyboardEvent): + (WebCore::PluginView::handleMouseEvent): + (WebCore::PluginView::setNPWindowRect): + (WebCore::PluginView::stop): + +2009-07-27 Yong Li <yong.li@torchmobile.com> + + Reviewed by George Staikos. + + WINCE PORT: Make plugin work for WINCE + https://bugs.webkit.org/show_bug.cgi?id=27713 + + * plugins/win/PluginDatabaseWin.cpp: + (SHGetValue): + (PathRemoveFileSpec): + (WebCore::addWindowsMediaPlayerPluginDirectory): + (WebCore::addMacromediaPluginDirectories): + * plugins/win/PluginPackageWin.cpp: + (WebCore::PluginPackage::load): + * plugins/win/PluginViewWin.cpp: + (WebCore::registerPluginView): + (WebCore::PluginView::wndProc): + (WebCore::PluginView::updatePluginWidget): + (WebCore::PluginView::paintWindowedPluginIntoContext): + (WebCore::PluginView::paint): + (WebCore::PluginView::handleMouseEvent): + (WebCore::PluginView::setParent): + (WebCore::PluginView::setNPWindowRect): + (WebCore::PluginView::stop): + (WebCore::PluginView::init): + +2009-07-27 Joseph Pecoraro <joepeck02@gmail.com> + + Inspector: Tab Through Element Attributes and CSS Properties When Editing + + https://bugs.webkit.org/show_bug.cgi?id=27673 + + Reviewed by Timothy Hatcher. + + * inspector/front-end/ElementsTreeOutline.js: + (WebInspector.ElementsTreeElement): + (WebInspector.ElementsTreeElement.prototype._startEditing): refactored parameter + (WebInspector.ElementsTreeElement.prototype._addNewAttribute): refactored to remove excess + (WebInspector.ElementsTreeElement.prototype._triggerEditAttribute): provide an attribute name and this will start editing it + (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded): move between attributes + (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): + * inspector/front-end/StylesSidebarPane.js: + (WebInspector.StylePropertiesSection.prototype.onpopulate): + (WebInspector.StylePropertiesSection.prototype.findTreeElementWithName): search through treeElements for a style property name + (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty): initialize a blank property for adding new properties + (WebInspector.StylePropertyTreeElement.prototype.updateTitle): add references to the name and value elements + (WebInspector.StylePropertyTreeElement.prototype.): + (WebInspector.StylePropertyTreeElement.prototype): + * inspector/front-end/inspector.js: + (WebInspector.startEditing.editingCommitted): include the move direction as a parameter to the commit callback + (WebInspector.startEditing.element.handleKeyEvent): handle the tab key to specify the move direction + (WebInspector.startEditing): + +2009-07-27 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by Adam Treat. + + Add mapping FontWeight to QFont::Weight values as requested via FIXME. + https://bugs.webkit.org/show_bug.cgi?id=27663 + + * platform/graphics/qt/FontCacheQt.cpp: + (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): + * platform/graphics/qt/FontPlatformData.h: + (WebCore::FontPlatformData::toQFontWeight): + * platform/graphics/qt/FontPlatformDataQt.cpp: + (WebCore::FontPlatformData::FontPlatformData): + +2009-07-27 Jakub Wieczorek <faw217@gmail.com> + + Reviewed by Adam Treat. + + When clearing the plugin database, clear also the timestamp map. + + https://bugs.webkit.org/show_bug.cgi?id=27651 + + Currently, if we clear the database, it will still think that it is up + to date with the plugin directories so refreshing the database again + after changing the search paths may not work. + + * plugins/PluginDatabase.cpp: + (WebCore::PluginDatabase::clear): + +2009-07-27 Albert J. Wong <ajwong@chromium.org> + + Reviewed by David Levin. + + Add in trivial implementation of FontPlatformData::description() for + linux to fix build bustage in chromium. + + Fix chromium linux build by adding missing function implementation. + https://bugs.webkit.org/show_bug.cgi?id=27732 + + Tested with a build of chromium on linux. + + * platform/graphics/chromium/FontPlatformDataLinux.cpp: + (WebCore::FontPlatformData::description): + * platform/graphics/chromium/FontPlatformDataLinux.h: + +2009-07-27 Brent Fulgham <bfulgham@webkit.org> + + Build correct, no review. + + Final correction for WinCairo builds. + CoreServices only exists in Apple builds, but + some of its internal includes (e.g., <windows.h>) are needed + for other Windows targets. + + * WebCorePrefix.h: When building for WinCairo, make sure + to include <windows.h>, <stdio.h>, and <ConditionalMacros.h> + +2009-07-27 Michelangelo De Simone <micdesim@gmail.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=25552 + Added new "pattern" attribute to HTMLInputElement and validation code + (validity.patternMismatch) as per HTML5 specs. + http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-pattern + + Tests: fast/forms/ValidityState-002.html + fast/forms/ValidityState-patternMismatch-001.html + fast/forms/ValidityState-patternMismatch-002.html + fast/forms/ValidityState-patternMismatch-003.html + fast/forms/ValidityState-patternMismatch-004.html + fast/forms/ValidityState-patternMismatch-005.html + fast/forms/ValidityState-patternMismatch-006.html + fast/forms/ValidityState-patternMismatch-007.html + fast/forms/pattern-attribute-001.html + fast/forms/pattern-attribute-002.html + fast/forms/pattern-attribute-003.html + + * html/HTMLAttributeNames.in: pattern attribute + * html/HTMLFormControlElement.h: + (WebCore::HTMLFormControlElement::patternMismatch): method definition + * html/HTMLInputElement.cpp: + (WebCore::HTMLInputElement::patternMismatch): validation method + * html/HTMLInputElement.h: + * html/HTMLInputElement.idl: + * html/ValidityState.h: + (WebCore::ValidityState::patternMismatch): validation flag + +2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + [WML] Manual WML tests aren't properly working + https://bugs.webkit.org/show_bug.cgi?id=27718 + + Fix file paths in the manual WML layout tests, remove unneeded tests (already covered by DRT tests). + Add missing resources directory and test image. Reformat all testcases to a common style. + Add new StartTests.wml file, which should be used as starting point to crawl through the manual tests. + + Filing bugs soon for all tests exposing bugs (7 in total). + + * manual-tests/wml/StartTests.wml: Added. + * manual-tests/wml/a-br-element.wml: + * manual-tests/wml/a-element.wml: + * manual-tests/wml/a-img-element.wml: + * manual-tests/wml/access-target.wml: + * manual-tests/wml/anchor-br-element.wml: + * manual-tests/wml/anchor-element.wml: + * manual-tests/wml/anchor-img-element.wml: + * manual-tests/wml/card-newcontext-attr.wml: + * manual-tests/wml/card-onenterbackward.wml: + * manual-tests/wml/card-onenterforward.wml: + * manual-tests/wml/card-ontimer.wml: + * manual-tests/wml/card-title-attr.wml: Removed. + * manual-tests/wml/deck-access-control.wml: + * manual-tests/wml/go-element.wml: Removed. + * manual-tests/wml/input-emptyok.wml: Removed. + * manual-tests/wml/input-format.wml: + * manual-tests/wml/onevent-go.wml: + * manual-tests/wml/onevent-noop.wml: + * manual-tests/wml/onevent-prev.wml: + * manual-tests/wml/onevent-refresh.wml: + * manual-tests/wml/onevent-shadow.wml: + * manual-tests/wml/postfield-get.wml: Removed. + * manual-tests/wml/postfield-post.wml: Removed. + * manual-tests/wml/resources: Added. + * manual-tests/wml/resources/smiley.png: Added. + * manual-tests/wml/select-element.wml: + * manual-tests/wml/select-onpick-event.wml: + * manual-tests/wml/setvar-element.wml: + * manual-tests/wml/targetdeck.wml: + * manual-tests/wml/task-go-in-anchor.wml: + * manual-tests/wml/task-noop-in-do.wml: + * manual-tests/wml/task-noop-in-onevent.wml: Removed. + * manual-tests/wml/task-prev-in-anchor.wml: + * manual-tests/wml/task-refresh-in-anchor.wml: + * manual-tests/wml/template-go.wml: + * manual-tests/wml/template-onevent.wml: Removed. + * manual-tests/wml/template-ontimer.wml: + * manual-tests/wml/timer.wml: + * manual-tests/wml/variable-substitution.wml: + +2009-07-27 Nate Chapin <japhet@chromium.org> + + Reviewed by Dimitri Glazkov. + + Fix a regression introduced in r42671, which caused the js event + object to be hidden (some websites depend on being able to access it). + + https://bugs.webkit.org/show_bug.cgi?id=27719 + + * bindings/v8/V8AbstractEventListener.cpp: + (WebCore::V8AbstractEventListener::invokeEventHandler): Make the event object visible to javascript, instead of hidden. + +2009-07-27 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Dimitri Glazkov. + + Removing a no-op block of code in DatabaseTracker.cpp that + should've been removed in the patch for bug 26054. + + https://bugs.webkit.org/show_bug.cgi?id=27666 + + All tests in WebCore/storage pass. + + * storage/DatabaseTracker.cpp: + (WebCore::DatabaseTracker::fullPathForDatabase): Removed a no-op + block of code that was moved to SQLiteFileSystem.cpp and should + have been removed from DatabaseTracker.cpp + +2009-07-27 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + Fix error handling in dedicated worker and worker context. + https://bugs.webkit.org/show_bug.cgi?id=27525 + + The following problems have been fixed: + 1) The uncaught runtime script error is not reported using the + WorkerGlobalScope object's onerror attribute. + 2) If the error is still not handled afterwards (onerror attribute + is not defined as a function or it returns true), the error should + be reported back to the associated Worker object by firing an + ErrorEvent. + 3) If the error is still not handled by the associated Worker + object, the error should be reported to the user. + + Test: fast/workers/worker-script-error.html + + * bindings/js/JSEventListener.cpp: + (WebCore::JSEventListener::reportError): + * bindings/js/JSEventListener.h: + * dom/EventListener.h: + (WebCore::EventListener::reportError): adds a function to call + EventListener as a function with 3 arguments to report an error. + * workers/AbstractWorker.cpp: + (WebCore::AbstractWorker::dispatchScriptErrorEvent): + * workers/AbstractWorker.h: + * workers/DedicatedWorkerContext.cpp: + (WebCore::DedicatedWorkerContext::reportException): + * workers/WorkerContext.cpp: + (WebCore::WorkerContext::reportException): + * workers/WorkerContext.h: + * workers/WorkerMessagingProxy.cpp: + (WebCore::WorkerExceptionTask::performTask): + * workers/WorkerMessagingProxy.h: + +2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + [WML] History handling / page cache / loading is buggy and depends on several hacks + https://bugs.webkit.org/show_bug.cgi?id=27707 + + Redesign WML history/loading handling. In detail: + + - Remove FrameLoader::setForceReloadWmlDeck(). WML used to force a special loading behaviour + by calling this method from WMLGoElement & friends - instead teach FrameLoader to detect + WML content itself. + + WML content is usually a standalone WML document (isWMLDocument()=true) or as special case + an XHTML document which embeds a WML document (that's the way the WML layout tests work). + Force WML loading behaviour even for XHTML document which embed WML documents. This only + applies to our layout tests, not for any real world site. Though it gives us a perfect + way to test the WML loading code even when we're not operating on a standalone WML document. + + Whenever a WMLCardElement is inserted into the document it will check wheter it's inserted + in a standalone WML document or wheter the main frame document is different. If it differs + the main frame documents' "containsWMLContent" property is set to true. + + -> Make FrameLoader::shouldReload() use the new frameContainsWMLContent() method, which + checks if the associated frame document is a WML document or wheter it contains WML content. + + - Change FrameLoader::loadItem() to use the new frameContainsWMLContent() method for 'shouldScroll' + detection. WML documents (or those containing WML content) always want new loads even for in-page + navigation. No "scroll to anchor" mechanism should apply. + + - Modify FrameLoader::canCachePageContainingThisFrame() to check for !frameContainsWMLContent(). + WML pages should never be cached, potential security problem due the use of variables (per spec). + + Add two new WML tests which were broken before, testing onenterforward/onenterbackward event handling + and history navigation (<prev/> task). + + Tests: wml/enter-card-with-events.html + wml/enter-first-card-with-events.html + + * dom/Document.cpp: Initialize new 'm_containsWMLContent' property. + (WebCore::Document::Document): + * dom/Document.h: Add new helper methods and 'm_containsWMLContent" variable (explained above). + (WebCore::Document::setContainsWMLContent): + (WebCore::Document::containsWMLContent): + * history/BackForwardList.cpp: + (WebCore::BackForwardList::clearWMLPageHistory): Renamed from clearWmlPageHistory() & slight cleanup. + * history/BackForwardList.h: + * loader/FrameLoader.cpp: Rework WML loading behaviour (explained above). + (WebCore::FrameLoader::FrameLoader): + (WebCore::frameContainsWMLContent): + (WebCore::FrameLoader::canCachePageContainingThisFrame): + (WebCore::FrameLoader::shouldReload): + (WebCore::FrameLoader::loadItem): + * loader/FrameLoader.h: + * wml/WMLCardElement.cpp: + (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded): No need anymore to manually track history length. + (WebCore::WMLCardElement::insertedIntoDocument): Handle setting containsWMLContent on the main frame document. + * wml/WMLGoElement.cpp: + (WebCore::WMLGoElement::executeTask): Remove call to FrameLoader::setForceReloadWmlDeck() + * wml/WMLPageState.cpp: Remove 'm_historyLength' - no need anymore to track history length on our own. + (WebCore::WMLPageState::WMLPageState): + (WebCore::WMLPageState::dump): + (WebCore::WMLPageState::reset): + * wml/WMLPageState.h: + +2009-07-27 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Adam Roben. + + Fix Chromium build breakage introduced in 46388. + + https://bugs.webkit.org/show_bug.cgi?id=27705 + + * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: + (WebCore::FontPlatformData::description): + * platform/graphics/chromium/FontPlatformDataChromiumWin.h: + +2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Add some more debug logging to PluginViewMac. + + * plugins/mac/PluginViewMac.cpp: + +2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Jan Michael Alonzo. + + Remove dead code from the GTK NPAPI implementation. + + * plugins/gtk/PluginViewGtk.cpp: + +2009-07-27 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + + Reviewed by Simon Hausmann. + + [Qt] Buildfix on Windows. + https://bugs.webkit.org/show_bug.cgi?id=27702 + + * plugins/win/PluginViewWin.cpp: + (WebCore::PluginView::hookedEndPaint): + Constraint of (*endPaint) operand modified from "g" to "m" (memory) in inline + assembly, because with "g" constraint, wrong assembly code generated. + +2009-07-27 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + WebCore bindings: Implement ScriptArray bindings. + + https://bugs.webkit.org/show_bug.cgi?id=27691 + + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * bindings/js/ScriptArray.cpp: Added. + (WebCore::ScriptArray::ScriptArray): + (WebCore::handleException): + (WebCore::ScriptArray::set): + (WebCore::length): + (WebCore::ScriptArray::createNew): + * bindings/js/ScriptArray.h: Added. + (WebCore::ScriptArray::ScriptArray): + (WebCore::ScriptArray::jsArray): + * bindings/v8/ScriptArray.cpp: Added. + (WebCore::ScriptArray::ScriptArray): + (WebCore::ScriptArray::set): + (WebCore::ScriptArray::length): + (WebCore::ScriptArray::createNew): + * bindings/v8/ScriptArray.h: Added. + (WebCore::ScriptArray::ScriptArray): + (WebCore::ScriptArray::~ScriptArray): + +2009-07-27 Brent Fulgham <bfulgham@webkit.org> + + Build correct, no review. + + Change in r46407 broke Apple Windows build. + Switch to WinCairo-only test, to avoid any + other platform break. + + * WebCorePrefix.h: + +2009-07-26 Brent Fulgham <bfulgham@webkit.org> + + Build correct, no review. + + Change in r46407 broke Apple Windows build. + + * WebCorePrefix.h: Use WTF_PLATFORM_CG to decide if + CoreServices.h should be included. + +2009-07-26 Brent Fulgham <bfulgham@webkit.org> + + Build correction, no review. + + Change in r46195 broke WinCairo build. + + * WebCorePrefix.h: CoreServices should be ignored + for non-Apple build. + +2009-07-26 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Implement the breakpoints sidebar pane. + This change adds simple UI support into the existing + BreakpointSidebarPane. + + https://bugs.webkit.org/show_bug.cgi?id=11175 + + * inspector/front-end/Breakpoint.js: + (WebInspector.Breakpoint.prototype.set enabled): + (WebInspector.Breakpoint.prototype.get label): + (WebInspector.Breakpoint.prototype.get id): + * inspector/front-end/BreakpointsSidebarPane.js: + (WebInspector.BreakpointsSidebarPane): + (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): + (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement): + (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement.labelClicked): + (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint): + (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged): + * inspector/front-end/ScriptsPanel.js: + (WebInspector.ScriptsPanel): + (WebInspector.ScriptsPanel.prototype.scriptOrResourceForID): + * inspector/front-end/inspector.css: + +2009-07-16 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Oliver Hunt. + + Canvas: rotation of 'no-repeat' pattern still has small error + https://bugs.webkit.org/show_bug.cgi?id=26749 + + Use 1<<22 as steps of no-repeat pattern to make the error less + than 0.5. The previous value may cause 1 pixel errors. + + Add another test to show this bug clearly. + Also add png expected image which was missing in the previous patch. + + Test: fast/canvas/image-pattern-rotate.html + + * platform/graphics/cg/PatternCG.cpp: + (WebCore::Pattern::createPlatformPattern): + +2009-07-25 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Darin Adler. + + Windows build break due to warning C4819 + https://bugs.webkit.org/show_bug.cgi?id=27416 + + Disable C4819 warning to fix build. + + * WebCore.vcproj/QTMovieWin.vcproj: + * WebCore.vcproj/WebCore.vcproj: + +2009-07-25 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Kevin McCullough. + + Inspector: Keyboard Shortcuts to Switch Panels + https://bugs.webkit.org/show_bug.cgi?id=27286 + + * inspector/front-end/inspector.js: + (WebInspector.loaded): save a list of the order of the panels + (WebInspector.documentKeyDown): handle the keyboard shortcuts to traverse the panels + +2009-07-25 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by George Staikos. + + [Qt] Fix build break after r46369 + https://bugs.webkit.org/show_bug.cgi?id=27680 + + * WebCore.pro: + +2009-07-25 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + [WML] Variable substitution is buggy + https://bugs.webkit.org/show_bug.cgi?id=27677 + + Substitute variables upon attach() time instead of insertedIntoDocument(). Otherwhise variable substitution + won't work during inter-deck jumps (same URL, different fragment). Covered by new test fast/wml/newcontext-same-deck.html. + + * dom/Text.cpp: + (WebCore::Text::attach): + * dom/Text.h: + +2009-07-25 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + [WML] WMLDoElement doesn't update its RenderButton object upon attach() + https://bugs.webkit.org/show_bug.cgi?id=27676 + + WMLDoElement needs to implement attach() and call updateFromElement() on its associated RenderButton. + Mimics HTMLButtonElement/HTMLFormControlElement behaviour and fixes several painting/styling issues covered by existing tests in fast/wml. + + * wml/WMLDoElement.cpp: + (WebCore::WMLDoElement::attach): + * wml/WMLDoElement.h: + +2009-07-25 Pavel Feldman <pfeldman@chromium.org> + + Fix Windows build breakage introduced in 46390. + + * WebCore.vcproj/WebCore.vcproj: + +2009-07-24 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Oliver Hunt. + + Inspector: Properties Should be Sorted more Naturally + https://bugs.webkit.org/show_bug.cgi?id=27329 + + * inspector/front-end/ObjectPropertiesSection.js: + (WebInspector.ObjectPropertiesSection.prototype.update): use the displaySort when showing properties + (WebInspector.ObjectPropertiesSection.prototype._displaySort): alphaNumerical sort + (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate): use the displaySort when showing properties + * inspector/front-end/utilities.js: + (Object.sortedProperties): allow for an optional sorting function in Object.sortedProperties + +2009-07-24 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Split InspectorController into InspectorController + and InspectorBackend. Everything frontend needs from InspectorController + will slowly migrate into the InspectorBackend. + + https://bugs.webkit.org/show_bug.cgi?id=27541 + + * DerivedSources.make: + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.xcodeproj/project.pbxproj: + * WebCoreSources.bkl: + * bindings/js/JSInspectorBackendCustom.cpp: Added. + (WebCore::JSInspectorBackend::highlightDOMNode): + (WebCore::JSInspectorBackend::search): + (WebCore::JSInspectorBackend::databaseTableNames): + (WebCore::JSInspectorBackend::inspectedWindow): + (WebCore::JSInspectorBackend::setting): + (WebCore::JSInspectorBackend::setSetting): + (WebCore::JSInspectorBackend::wrapCallback): + (WebCore::JSInspectorBackend::currentCallFrame): + (WebCore::JSInspectorBackend::profiles): + * bindings/v8/custom/V8InspectorBackendCustom.cpp: Added. + (WebCore::CALLBACK_FUNC_DECL): + * bindings/js/JSInspectorControllerCustom.cpp: Removed. + * bindings/js/ScriptObject.cpp: + (WebCore::ScriptGlobalObject::set): + * bindings/js/ScriptObject.h: + * bindings/v8/DOMObjectsInclude.h: + * bindings/v8/DerivedSourcesAllInOne.cpp: + * bindings/v8/ScriptObject.cpp: + (WebCore::ScriptGlobalObject::set): + * bindings/v8/ScriptObject.h: + * bindings/v8/V8Index.cpp: + * bindings/v8/V8Index.h: + * bindings/v8/custom/V8CustomBinding.h: + * bindings/v8/custom/V8InspectorControllerCustom.cpp: Removed. + * inspector/InspectorController.cpp: + (WebCore::InspectorController::InspectorController): + (WebCore::InspectorController::windowScriptObjectAvailable): + * inspector/InspectorController.h: + (WebCore::InspectorController::inspectorBackend): + * inspector/InspectorBackend.cpp: Added. + * inspector/InspectorBackend.h: Added. + (WebCore::InspectorBackend::create): + (WebCore::InspectorBackend::inspectorController): + * inspector/InspectorBackend.idl: Added. + * inspector/InspectorController.idl: Removed. + * inspector/front-end/Resource.js: + * page/Page.cpp: + (WebCore::Page::Page): + * page/Page.h: + +2009-07-25 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by George Staikos. + + Update WebCore/page/Frame.cpp/h to conform to WebKit + Style Guidelines as identified by cpplint.py. + https://bugs.webkit.org/show_bug.cgi?id=27654 + + * page/Frame.cpp: + (WebCore::Frame::Frame): + (WebCore::Frame::~Frame): + (WebCore::Frame::setDocument): + (WebCore::Frame::firstRectForRange): + (WebCore::createRegExpForLabels): + (WebCore::Frame::searchForLabelsBeforeElement): + (WebCore::Frame::matchLabelsAgainstElement): + (WebCore::Frame::selectionLayoutChanged): + (WebCore::Frame::setZoomFactor): + (WebCore::Frame::reapplyStyles): + (WebCore::Frame::isContentEditable): + (WebCore::Frame::computeAndSetTypingStyle): + (WebCore::Frame::selectionStartStylePropertyValue): + (WebCore::Frame::selectionComputedStyle): + (WebCore::Frame::applyEditingStyleToBodyElement): + (WebCore::Frame::removeEditingStyleFromBodyElement): + (WebCore::Frame::applyEditingStyleToElement): + (WebCore::Frame::selectionBounds): + (WebCore::Frame::currentForm): + (WebCore::Frame::revealSelection): + (WebCore::Frame::styleForSelectionStart): + (WebCore::Frame::setSelectionFromNone): + (WebCore::Frame::findString): + (WebCore::Frame::markAllMatchesForText): + (WebCore::Frame::setMarkedTextMatchesAreHighlighted): + (WebCore::Frame::clearFormerDOMWindow): + (WebCore::Frame::unfocusWindow): + (WebCore::Frame::respondToChangedSelection): + (WebCore::Frame::documentAtPoint): + * page/Frame.h: + (WebCore::Frame::create): + (WebCore::Frame::displayStringModifiedByEncoding): + (WebCore::Frame::pageZoomFactor): + (WebCore::Frame::textZoomFactor): + +2009-07-24 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + Add functions to print the glyph page trees for debugging + https://bugs.webkit.org/show_bug.cgi?id=27671 + + * platform/graphics/FontData.h: Defined a description() method. + + * platform/graphics/GlyphPageTreeNode.cpp: + (WebCore::GlyphPageTreeNode::showSubtree): Added. Prints the node and + its descendants. + (showGlyphPageTrees): Added. Prints all glyph page trees. + (showGlyphPageTree): Added. Prints the glyph page tree for a given page. + * platform/graphics/GlyphPageTreeNode.h: + + * platform/graphics/SegmentedFontData.cpp: + (WebCore::SegmentedFontData::description): Added. + + * platform/graphics/SegmentedFontData.h: + * platform/graphics/SimpleFontData.cpp: + (WebCore::SimpleFontData::description): Added. Uses the platform data + as the description for non-svg, non-custom fonts. + * platform/graphics/SimpleFontData.h: + + * platform/graphics/gtk/FontPlatformData.h: + * platform/graphics/gtk/FontPlatformDataGtk.cpp: + (WebCore::FontPlatformData::description): Added. Returns a null string. + * platform/graphics/gtk/FontPlatformDataPango.cpp: + (WebCore::FontPlatformData::description): Added. Returns a null string. + + * platform/graphics/mac/FontPlatformData.h: + * platform/graphics/mac/FontPlatformDataMac.mm: + (WebCore::FontPlatformData::description): Added. Returns the + description of the CGFont, the size and the synthetic style flags, + if set. + + * platform/graphics/qt/FontPlatformData.h: + * platform/graphics/qt/FontPlatformDataQt.cpp: + (WebCore::FontPlatformData::description): Added. Returns a null string. + + * platform/graphics/win/FontPlatformData.h: + * platform/graphics/win/FontPlatformDataWin.cpp: + (WebCore::FontPlatformData::description): Added. Returns a null string. + + * platform/graphics/wince/FontPlatformData.cpp: + (WebCore::FontPlatformData::description): Added. Returns a null string. + * platform/graphics/wince/FontPlatformData.h: + + * platform/graphics/wx/FontPlatformData.h: + * platform/graphics/wx/FontPlatformDataWx.cpp: + (WebCore::FontPlatformData::description): Added. Returns a null string. + +2009-07-24 Mads Ager <ager@chromium.org> + + Reviewed by Adam Barth. + + SVG and XPath memory leaks in V8 bindings + https://bugs.webkit.org/show_bug.cgi?id=27488 + + Add proper 'create' methods to SVGPodTypeWrappers and + XPathNSResolvers in the V8 bindings to avoid memory leaks. + + Introduce convertToV8Object methods that accept PassRefPtrs and + clean up the use of get() and release() on RefPtrs. + + * bindings/scripts/CodeGeneratorV8.pm: + * bindings/v8/V8DOMWrapper.h: + (WebCore::V8DOMWrapper::convertNodeToV8Object): + (WebCore::V8DOMWrapper::convertEventToV8Object): + (WebCore::V8DOMWrapper::convertEventTargetToV8Object): + (WebCore::V8DOMWrapper::convertEventListenerToV8Object): + * bindings/v8/V8SVGPODTypeWrapper.h: + (WebCore::V8SVGPODTypeWrapperCreatorForList::create): + (WebCore::V8SVGPODTypeWrapperCreatorForList::V8SVGPODTypeWrapperCreatorForList): + (WebCore::V8SVGStaticPODTypeWrapper::create): + (WebCore::V8SVGStaticPODTypeWrapper::V8SVGStaticPODTypeWrapper): + (WebCore::V8SVGStaticPODTypeWrapperWithPODTypeParent::create): + (WebCore::V8SVGStaticPODTypeWrapperWithPODTypeParent::V8SVGStaticPODTypeWrapperWithPODTypeParent): + (WebCore::V8SVGStaticPODTypeWrapperWithParent::create): + (WebCore::V8SVGStaticPODTypeWrapperWithParent::V8SVGStaticPODTypeWrapperWithParent): + (WebCore::V8SVGDynamicPODTypeWrapper::create): + (WebCore::V8SVGDynamicPODTypeWrapper::V8SVGDynamicPODTypeWrapper): + (WebCore::V8SVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper): + * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8ClientRectListCustom.cpp: + (WebCore::INDEXED_PROPERTY_GETTER): + * bindings/v8/custom/V8CustomXPathNSResolver.cpp: + (WebCore::V8CustomXPathNSResolver::create): + * bindings/v8/custom/V8CustomXPathNSResolver.h: + * bindings/v8/custom/V8DOMWindowCustom.cpp: + (WebCore::NAMED_PROPERTY_GETTER): + * bindings/v8/custom/V8DocumentCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8ElementCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8HTMLCollectionCustom.cpp: + (WebCore::getNamedItems): + (WebCore::getItem): + * bindings/v8/custom/V8HTMLDocumentCustom.cpp: + (WebCore::NAMED_PROPERTY_GETTER): + (WebCore::ACCESSOR_GETTER): + * bindings/v8/custom/V8HTMLFormElementCustom.cpp: + (WebCore::INDEXED_PROPERTY_GETTER): + (WebCore::NAMED_PROPERTY_GETTER): + * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: + (WebCore::INDEXED_PROPERTY_GETTER): + * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp: + (WebCore::NAMED_PROPERTY_GETTER): + * bindings/v8/custom/V8InspectorControllerCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8NamedNodeMapCustom.cpp: + (WebCore::INDEXED_PROPERTY_GETTER): + (WebCore::NAMED_PROPERTY_GETTER): + * bindings/v8/custom/V8NodeIteratorCustom.cpp: + (WebCore::toV8): + * bindings/v8/custom/V8NodeListCustom.cpp: + (WebCore::NAMED_PROPERTY_GETTER): + * bindings/v8/custom/V8SVGMatrixCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8TreeWalkerCustom.cpp: + (WebCore::toV8): + * bindings/v8/custom/V8XSLTProcessorCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + +2009-07-24 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Jon Honeycutt. + + Fix of <rdar://6310538> Middle-click panning should be springloaded while dragging + https://bugs.webkit.org/show_bug.cgi?id=21794 + + Create two new booleans to determine whether we have done a springloaded pan scroll, and update + the name of setPanScrollCursor to updatePanScrollState to more accurately describe what the function + does. + + * page/EventHandler.cpp: + (WebCore::EventHandler::EventHandler): Initialized two new booleans. + (WebCore::EventHandler::autoscrollTimerFired): + (WebCore::EventHandler::updatePanScrollState): Renamed from setPanScrollCursor. + (WebCore::EventHandler::stopAutoscrollTimer): Clear the pan scrolling in progress flag. + (WebCore::EventHandler::handleMouseReleaseEvent): Clear the pan scrolling button pressed flag. + * page/EventHandler.h: + +2009-07-24 Yong Li <yong.li@torchmobile.com> + + Reviewed by George Staikos. + + https://bugs.webkit.org/show_bug.cgi?id=27657 + Add more wince port files to WebCore + + Written by Yong Li <yong.li@torchmobile.com> and Lyon Chen <lyon.chen@torchmobile.com> + + * loader/icon/wince/IconDatabaseWince.cpp: Added. + * rendering/RenderThemeWince.cpp: Added. + * rendering/RenderThemeWince.h: Added. + * storage/wince/DatabaseThreadWince.cpp: Added. + * storage/wince/DatabaseThreadWince.h: Added. + * storage/wince/LocalStorageThreadWince.cpp: Added. + * storage/wince/LocalStorageThreadWince.h: Added. + * svg/graphics/wince/SVGResourceFilterWince.cpp: Added. + +2009-07-24 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Justin Garcia. + + execCommand('underline') can modify DOM outside of the contentEditable area + https://bugs.webkit.org/show_bug.cgi?id=24333 + + highestAncestorWithTextDecoration stops at the closest unsplittable element so that if text-decoration is applied + outside of it, we don't accidently modify the style attribute. + + Tests: editing/style/textdecoration-outside-of-rooteditable.html + editing/style/textdecoration-outside-of-unsplittable-element.html + + * editing/ApplyStyleCommand.cpp: + (WebCore::StyleChange::init): + (WebCore::highestAncestorWithTextDecoration): + +2009-07-24 Daniel Bates <dbates@intudata.com> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=27639 + + Fixes false positives when evaluating certain strings that only contain + non-canonical characters. + + Test: http/tests/security/xssAuditor/script-tag-safe.html + + * page/XSSAuditor.cpp: + (WebCore::isNonCanonicalCharacter): + (WebCore::XSSAuditor::findInRequest): + +2009-07-24 Drew Wilson <atwilson@google.com> + + Reviewed by David Levin. + + Changed WorkerContext destructor to not access possibly-freed WorkerThread. + + Failed assertion in WorkerContext::~WorkerContext(). + https://bugs.webkit.org/show_bug.cgi?id=27665 + + * workers/DedicatedWorkerContext.cpp: + (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext): + * workers/WorkerContext.cpp: + (WebCore::WorkerContext::~WorkerContext): + Removed assertion that relies on WorkerThread still being alive (moved to DedicatedWorkerContext destructor). + +2009-07-24 Drew Wilson <atwilson@google.com> + + Reviewed by Adam Barth. + + Updated code generator to properly generate bindings for WorkerContext exposed functions. + + Storing a reference to WorkerContext.postMessage() and calling it later yields a TypeError + https://bugs.webkit.org/show_bug.cgi?id=27419 + + Test: fast/workers/worker-call.html + + * bindings/js/JSWorkerContextBase.cpp: + (WebCore::toJSDedicatedWorkerContext): + (WebCore::toJSWorkerContext): + Functions that convert from JSValue to the appropriate WorkerContext/DedicatedWorkerContext object. + * bindings/js/JSWorkerContextBase.h: + Added toJS*WorkerContext APIs. + * bindings/scripts/CodeGeneratorJS.pm: + Added code to appropriately check the passed-in this object when invoking functions at global scope. + +2009-07-24 Drew Wilson <atwilson@google.com> + + Reviewed by Adam Barth. + + Refactor WorkerContext to move DedicatedWorker-specific APIs into DedicatedWorkerContext + https://bugs.webkit.org/show_bug.cgi?id=27420 + + No new tests as the existing tests already provide sufficient coverage (this is just a refactoring with no new functionality). + + * DerivedSources.cpp: + Added JSDerivedWorkerContext.cpp + * DerivedSources.make: + Added DerivedWorkerContext files + * GNUmakefile.am: + Added DerivedWorkerContext files + * WebCore.gypi: + Added DerivedWorkerContext files + * WebCore.pro: + Added DerivedWorkerContext files + * WebCore.vcproj/WebCore.vcproj: + Added DerivedWorkerContext files + * WebCore.xcodeproj/project.pbxproj: + Added DerivedWorkerContext files + * bindings/js/JSDedicatedWorkerContextCustom.cpp: Added. + (WebCore::JSDedicatedWorkerContext::mark): + Custom mark function for onmessage event handler. + * bindings/js/JSEventTarget.cpp: + (WebCore::toJS): + Supports conversion to JSDedicatedWorkerContext. + (WebCore::toEventTarget): + * bindings/js/JSWorkerContextCustom.cpp: + (WebCore::JSWorkerContext::mark): + Moved onmessage mark handling into DedicatedWorkerContext. + * bindings/js/WorkerScriptController.cpp: + Added appropriate casts to DedicatedWorkerContext for postMessage(). + (WebCore::WorkerScriptController::initScript): + Manually sets up the prototype chain for the worker context. + * bindings/scripts/CodeGeneratorJS.pm: + Changed special case code for WorkerContext to be triggered by new IsWorkerContext attribute. + * bindings/scripts/CodeGeneratorV8.pm: + Changed hard-coded tests for WorkerContext to support DedicatedWorkerContext. + * bindings/v8/DOMObjectsInclude.h: + Added DedicatedWorkerContext.h + * bindings/v8/DerivedSourcesAllInOne.cpp: + Added V8DedicatedWorkerContext.cpp + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::getTemplate): + Added code to reserve extra fields for V8DedicatedWorkerContext. + * bindings/v8/V8Index.cpp: + Now includes V8DedicatedWorkerContext.h in addition to V8WorkerContext.h + * bindings/v8/V8Index.h: + Added DedicatedWorkerContext as a non-node wrapper type. + Removed WORKERCONTEXT as a valid template type. + * bindings/v8/WorkerContextExecutionProxy.cpp: + (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): + Creates DedicatedWorkerContext instead of WorkerContext. + (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object): + Returns DedicatedWorkerContext instead of WorkerContext. + (WebCore::WorkerContextExecutionProxy::retrieve): + Refactored to deal with DedicatedWorkerContext. + * bindings/v8/custom/V8AbstractWorkerCustom.cpp: + * bindings/v8/custom/V8CustomBinding.h: + * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: Added. + Moved onmessage code from V8WorkerContextCustom.cpp + (WebCore::ACCESSOR_GETTER): + (WebCore::ACCESSOR_SETTER): + * bindings/v8/custom/V8WorkerContextCustom.cpp: + Moved onmessage code to V8DedicatedWorkerContextCustom.cpp + * dom/EventTarget.cpp: + (WebCore::EventTarget::toDedicatedWorkerContext): + * dom/EventTarget.h: + * workers/DedicatedWorkerContext.cpp: Added. + Moved DedicatedWorker-only APIs from WorkerContext. + (WebCore::DedicatedWorkerContext::DedicatedWorkerContext): + (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext): + (WebCore::DedicatedWorkerContext::reportException): + (WebCore::DedicatedWorkerContext::postMessage): + (WebCore::DedicatedWorkerContext::dispatchMessage): + * workers/DedicatedWorkerContext.h: Added. + Moved DedicatedWorker-only APIs from WorkerContext. + (WebCore::DedicatedWorkerContext::create): + (WebCore::DedicatedWorkerContext::toDedicatedWorkerContext): + (WebCore::DedicatedWorkerContext::setOnmessage): + (WebCore::DedicatedWorkerContext::onmessage): + * workers/DedicatedWorkerContext.idl: Added. + * workers/WorkerContext.cpp: + (WebCore::WorkerContext::~WorkerContext): + Moved code that notifies parent that worker is closing down into DedicatedWorkerContext. + * workers/WorkerContext.h: + (WebCore::WorkerContext::isClosing): + Exposed closing flag as an API so derived classes can access it. + * workers/WorkerContext.idl: + * workers/WorkerMessagingProxy.cpp: + (WebCore::MessageWorkerContextTask::performTask): + Calls into DedicatedWorkerContext to handle message. + * workers/WorkerThread.cpp: + (WebCore::WorkerThread::workerThread): + Creates a DedicatedWorkerContext when the thread starts up. + +2009-07-24 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Move more callers to using 3 argument toJS + https://bugs.webkit.org/show_bug.cgi?id=27661 + + No functional changes, thus no tests. + These are all the places where we can't yet pass the + correct globalObject because we don't have or don't know the right one. + + * bindings/js/JSCustomPositionCallback.cpp: + (WebCore::JSCustomPositionCallback::handleEvent): + * bindings/js/JSCustomPositionErrorCallback.cpp: + (WebCore::JSCustomPositionErrorCallback::handleEvent): + * bindings/js/JSCustomSQLStatementCallback.cpp: + (WebCore::JSCustomSQLStatementCallback::handleEvent): + * bindings/js/JSCustomSQLStatementErrorCallback.cpp: + (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): + * bindings/js/JSCustomSQLTransactionCallback.cpp: + (WebCore::JSCustomSQLTransactionCallback::handleEvent): + * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: + (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): + * bindings/js/JSNodeFilterCondition.cpp: + (WebCore::JSNodeFilterCondition::acceptNode): + +2009-07-24 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Fix the last of the x-frame constructor calls to have the right prototype chains + https://bugs.webkit.org/show_bug.cgi?id=27645 + + Fix the last few constructors to use their stored globalObject pointer when + constructing objects instead of the lexicalGlobalObject(). + + * bindings/js/JSAudioConstructor.cpp: + (WebCore::constructAudio): + * bindings/js/JSImageConstructor.cpp: + (WebCore::constructImage): + * bindings/js/JSMessageChannelConstructor.cpp: + (WebCore::JSMessageChannelConstructor::construct): + * bindings/js/JSOptionConstructor.cpp: + (WebCore::constructHTMLOptionElement): + * bindings/js/JSWebKitPointConstructor.cpp: + (WebCore::constructWebKitPoint): + * bindings/js/JSWorkerConstructor.cpp: + (WebCore::constructWorker): + +2009-07-24 Jian Li <jianli@chromium.org> + + Reviewed by Adam Barth. + + [V8] Cleanup exception handling in worker evaluation code. + https://bugs.webkit.org/show_bug.cgi?id=27282 + + * bindings/v8/WorkerContextExecutionProxy.cpp: + (WebCore::WorkerContextExecutionProxy::evaluate): + * bindings/v8/WorkerContextExecutionProxy.h: + (WebCore::WorkerContextExecutionState::WorkerContextExecutionState): + * bindings/v8/WorkerScriptController.cpp: + (WebCore::WorkerScriptController::evaluate): + (WebCore::WorkerScriptController::setException): + +2009-07-24 Stephen White <senorblanco@chromium.org> + + Reviewed by David Levin. + + Reverting r46157, since it may be causing problems with Chromium + reliability (see http://crbug.com/17569). + + https://bugs.webkit.org/show_bug.cgi?id=27388 + + * platform/graphics/skia/GraphicsContextSkia.cpp: + (WebCore::GraphicsContext::drawLine): + * platform/graphics/skia/PlatformContextSkia.cpp: + (PlatformContextSkia::setupPaintForStroking): + +2009-07-24 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Timothy Hatcher. + + REGRESSION: inspector seems broken in ToT WebKit + https://bugs.webkit.org/show_bug.cgi?id=27646 + + * inspector/front-end/Console.js: + (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): + +2009-07-24 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + Add the shadow style member to the ShadowData constructor and == + operator + + * rendering/style/ShadowData.cpp: + (WebCore::ShadowData::ShadowData): + (WebCore::ShadowData::operator==): + +2009-07-24 Jian Li <jianli@chromium.org> + + Reviewed by Eric Seidel. + + [V8] More V8 bindings changes to use ErrorEvent. + https://bugs.webkit.org/show_bug.cgi?id=27630 + + * bindings/v8/DOMObjectsInclude.h: + * bindings/v8/DerivedSourcesAllInOne.cpp: + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::convertEventToV8Object): + * bindings/v8/V8Index.cpp: + * bindings/v8/V8Index.h: + +2009-07-24 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Dave Hyatt. + + Clean up dependencies on Apple support libraries for non-Apple build. + http://bugs.webkit.org/show_bug.cgi?id=27532. + + * platform/graphics/win/SimpleFontDataWin.cpp: Conditionalize references + to ApplicationServices.h and WebKitSystemInterface.h + +2009-07-24 Dan Bernstein <mitz@apple.com> + + Another attempted build fix + + * bindings/js/JSAbstractWorkerCustom.cpp: + +2009-07-24 Dan Bernstein <mitz@apple.com> + + Attempted build fix + + * bindings/js/JSAbstractWorkerCustom.cpp: + (WebCore::toJS): + +2009-07-24 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Build fix for 64 bit Linux. + + int64_t is long on Linux 64 bit and not long long, thus + getFileSize with a int64_t out value fails to build. + + Use a temporary to work around the problem. + + * loader/appcache/ApplicationCacheStorage.cpp: + (WebCore::ApplicationCacheStorage::spaceNeeded): + +2009-07-24 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Update all CREATE_DOM_*_WRAPPER callers to pass globalObject + https://bugs.webkit.org/show_bug.cgi?id=27644 + + This is another attempt at making the change for bug 27634 smaller. + I included the changes to make_names.pl as well as any file which + used CREATE_DOM_*_WRAPPER macros. + + The changes to the construct* functions are what fix the cases in + fast/dom/constructed-objects-prototypes.html + + The changes to passing globalObject through CREATE_* are what fix + fast/dom/prototype-inheritance-2.html + + * bindings/js/JSCDATASectionCustom.cpp: + (WebCore::toJSNewlyCreated): pass globalObject. + * bindings/js/JSCSSRuleCustom.cpp: + (WebCore::toJS): pass globalObject. + * bindings/js/JSCSSValueCustom.cpp: + (WebCore::toJS): pass globalObject. + * bindings/js/JSDOMBinding.h: updated macros to pass globalObject. + * bindings/js/JSDocumentCustom.cpp: + (WebCore::toJS): pass globalObject. + * bindings/js/JSElementCustom.cpp: + (WebCore::JSElement::setAttributeNode): use globalObject() for wrapping return value. + (WebCore::JSElement::setAttributeNodeNS): use globalObject() for wrapping return value. + (WebCore::toJSNewlyCreated): pass globalObject. + * bindings/js/JSEventCustom.cpp: + (WebCore::JSEvent::clipboardData): pass globalObject. + (WebCore::toJS): pass globalObject. + * bindings/js/JSHTMLCollectionCustom.cpp: + (WebCore::getNamedItems): use globalObject() for wrapping returned collection items. + (WebCore::callHTMLCollection): use globalObject() for wrapping returned collection items. + (WebCore::JSHTMLCollection::item): use globalObject() for wrapping returned collection items. + (WebCore::toJS): pass globalObject. + * bindings/js/JSImageDataCustom.cpp: + (WebCore::toJS): pass globalObject. + * bindings/js/JSNodeCustom.cpp: + (WebCore::createWrapper): pass globalObject. + * bindings/js/JSSVGPathSegCustom.cpp: + (WebCore::toJS): pass globalObject. + * bindings/js/JSStyleSheetCustom.cpp: + (WebCore::toJS): pass globalObject. + * bindings/js/JSTextCustom.cpp: + (WebCore::toJSNewlyCreated): pass globalObject. + * bindings/js/JSWebKitCSSMatrixConstructor.cpp: + (WebCore::constructWebKitCSSMatrix): use constructors globalObject when constructing + * bindings/js/JSXMLHttpRequestConstructor.cpp: + (WebCore::constructXMLHttpRequest): use constructors globalObject when constructing + * bindings/js/JSXSLTProcessorConstructor.cpp: + (WebCore::constructXSLTProcessor): use constructors globalObject when constructing + * dom/make_names.pl: + Pass globalObject through CREATE_* macros and various support functions. + +2009-07-24 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Update CodeGeneratorJS.pm to support passing JSDOMGlobalObject* to toJS calls + https://bugs.webkit.org/show_bug.cgi?id=27643 + + This is an attempt to make this change as small as possible. + I started by including all changes to CodeGeneratorJS.pm from bug 27634, + and then made the minimal amount of other changes needed to support that change. + + Most toJS implementations ignore their passed JSDOMGlobalObject. + There are stub 2-argument toJS, toJSNewlyCreated implementations to help compiling. + All places where it is not clear what we should pass as the global object + (or where the global object is simply not available, like for some SVG bindings) + we pass deprecatedGlobalObjectForPrototype instead. + + * bindings/js/JSCDATASectionCustom.cpp: + (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject* + * bindings/js/JSCSSRuleCustom.cpp: + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSCSSValueCustom.cpp: + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSDOMBinding.cpp: + (WebCore::setDOMException): pass the wrong globalObject for now + * bindings/js/JSDOMBinding.h: + Pass the wrong global object to the CREATE_ macros for now. + In the next change we'll come back and pass the correct one. + That will require changes to make_names.pl. + (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext): + (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer): + (WebCore::DOMObjectWithGlobalPointer::~DOMObjectWithGlobalPointer): + (WebCore::createDOMObjectWrapper): + (WebCore::getDOMObjectWrapper): + (WebCore::createDOMNodeWrapper): + (WebCore::getDOMNodeWrapper): + (WebCore::toJS): added to convert 2 arg calls to 3 arg calls to limit the scope of this change. + (WebCore::toJSNewlyCreated): + * bindings/js/JSDOMWindowBase.cpp: + (WebCore::toJS): DOMWindow always uses its own prototype chain. + * bindings/js/JSDOMWindowBase.h: + * bindings/js/JSDocumentCustom.cpp: + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSElementCustom.cpp: + (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject* + * bindings/js/JSEventCustom.cpp: + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSEventTarget.cpp: + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSEventTarget.h: + * bindings/js/JSHTMLCollectionCustom.cpp: + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSImageDataCustom.cpp: + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSNodeCustom.cpp: + (WebCore::createWrapper): pass globalObject to toJS(Document*) to avoid recursion + (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject* + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSSVGElementInstanceCustom.cpp: + (WebCore::toJS): pass globalObject along + * bindings/js/JSSVGMatrixCustom.cpp: + (WebCore::JSSVGMatrix::inverse): pass wrong globalObject for now. + (WebCore::JSSVGMatrix::rotateFromVector): pass wrong globalObject for now. + * bindings/js/JSSVGPathSegCustom.cpp: + (WebCore::toJS): + * bindings/js/JSSVGPathSegListCustom.cpp: + All of these methods need a globalObject, but most SVG binding don't have + space for one, so we just pass the lexicalGlobalObject for now. + (WebCore::JSSVGPathSegList::initialize): + (WebCore::JSSVGPathSegList::getItem): + (WebCore::JSSVGPathSegList::insertItemBefore): + (WebCore::JSSVGPathSegList::replaceItem): + (WebCore::JSSVGPathSegList::removeItem): + (WebCore::JSSVGPathSegList::appendItem): + * bindings/js/JSSVGPointListCustom.cpp: + (WebCore::finishGetter): pass wrong globalObject for now. + (WebCore::finishSetter): + (WebCore::finishSetterReadOnlyResult): + * bindings/js/JSSVGTransformListCustom.cpp: + (WebCore::finishGetter): pass wrong globalObject for now. + (WebCore::finishSetter): + (WebCore::finishSetterReadOnlyResult): + * bindings/js/JSStyleSheetCustom.cpp: + (WebCore::toJS): add ignored JSDOMGlobalObject* + * bindings/js/JSTextCustom.cpp: + (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject* + * bindings/js/JSWorkerContextBase.cpp: + (WebCore::toJS): WorkerContext always uses its own prototype chain since it's a GlobalObject subclass. + * bindings/js/JSWorkerContextBase.h: + * bindings/scripts/CodeGeneratorJS.pm: + All generated toJS calls now pass a globalObject. + All generated toJS implementations now expect a globalObject. + Simplified all the slot casts by using a "castedThis" local. + SVG bindings which don't have a globalObject() accessor pass the deprecated lexicalGlobalObject instead. + Simplified printing of constructor objects using a $constructorClassName variable. + All generated constructor functions follow the construct$className form to match the custom constructors. + +2009-07-24 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Timothy Hatcher. + + typing "document.__proto__" in inspector throws exception + https://bugs.webkit.org/show_bug.cgi?id=27169 + + * inspector/front-end/utilities.js: + (Object.type): + +2009-07-24 Andrei Popescu <andreip@google.com> + + Reviewed by Anders Carlsson. + + ApplicationCache should have size limit + https://bugs.webkit.org/show_bug.cgi?id=22700 + + https://lists.webkit.org/pipermail/webkit-dev/2009-May/007560.html + + This change implements a mechanism for limiting the maximum size of + the application cache file. When this size is reached, a ChromeClient + callback is invoked asynchronously and the saving of the last (failed) + cache is retried automatically. + + This change also extends the ApplicationCacheStorage API by allowing + a client to query or modify the application cache without having to + load any resources into memory. + + Test: http/tests/appcache/max-size.html + + * WebCore.base.exp: + Exports the symbols required by the DumpRenderTree test application. + * loader/EmptyClients.h: + Adds empty implementation of the new ChromeClient methods. + * loader/appcache/ApplicationCache.cpp: + * loader/appcache/ApplicationCache.h: + Adds the ability to calculate the approximate size of an ApplicationCache object. + * loader/appcache/ApplicationCacheGroup.cpp: + * loader/appcache/ApplicationCacheGroup.h: + Invokes the ChromeClient callback when the storage layer runs out of space. + After the callback is invoked, we re-attempt to store the newest cache, + in case the ChromeClient has freed some space. + * loader/appcache/ApplicationCacheResource.cpp: + * loader/appcache/ApplicationCacheResource.h: + Adds the ability to calculate the approximate size of an ApplicationCacheResource object. + * loader/appcache/ApplicationCacheStorage.cpp: + * loader/appcache/ApplicationCacheStorage.h: + Enforces a maximum size for the application cache file. + * page/ChromeClient.h: + Adds a new callback, invoked when the ApplicationCacheStorage reports that it has + reached the maximum size for its database file. + * platform/sql/SQLiteDatabase.cpp: + * platform/sql/SQLiteDatabase.h: + Adds a new method that allows querying for the amount of unused space inside the + application cache database file. + +2009-07-24 Xan Lopez <xlopez@igalia.com> + + Reviewed by Jan Alonzo. + + https://bugs.webkit.org/show_bug.cgi?id=25415 + [GTK][ATK] Please implement support for get_text_at_offset + + Use TextEncoding facilities to convert between UTF16 and UTF8 + instead of rolling our own solution. + + * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: + (convertUniCharToUTF8): + +2009-07-24 Xan Lopez <xlopez@igalia.com> + + Reviewed by Jan Alonzo. + + https://bugs.webkit.org/show_bug.cgi?id=25415 + [GTK][ATK] Please implement support for get_text_at_offset + + Fix confusion in g_substr between length in bytes and length in + characters. Was causing crashes in some situations when dealing + with non-ASCII text encoded as UTF8. + + * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: + (g_substr): + +2009-07-24 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Timothy Hatcher. + + Inspector: Impossible to add an attribute to a node without attributes + https://bugs.webkit.org/show_bug.cgi?id=21108 + + * inspector/front-end/ElementsTreeOutline.js: + (WebInspector.ElementsTreeElement): + (WebInspector.ElementsTreeElement.prototype.set hovered): + (WebInspector.ElementsTreeElement.prototype.toggleNewButton): + (WebInspector.ElementsTreeElement.prototype.ondblclick): + (WebInspector.ElementsTreeElement.prototype._startEditing): + (WebInspector.ElementsTreeElement.prototype._addNewAttribute): + (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): + * inspector/front-end/inspector.css: + +2009-07-24 Keishi Hattori <casey.hattori@gmail.com> + + Reviewed by Timothy Hatcher. + + Web Inspector: Adds support for Firebug's magic $0 variable to access inspected node + https://bugs.webkit.org/show_bug.cgi?id=17907 + + * inspector/front-end/Console.js: + (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): Added _inspectorCommandLineAPI.{ + _inspectedNodes, _addInspectedNode, $0, $1, $n} + * inspector/front-end/ElementsPanel.js: + (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged): Stores the inspected node history + in _inspectorCommandLineAPI._inspectedNodes + (WebInspector.ElementsPanel): + +2009-07-24 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Timothy Hatcher. + + Dragging a resource in the sidebar should drag it's URL + https://bugs.webkit.org/show_bug.cgi?id=14410 + + * inspector/front-end/ResourcesPanel.js: + (WebInspector.ResourceSidebarTreeElement.prototype.onattach): + +2009-07-24 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Timothy Hatcher. + + Double click on a resource in the sidebar should open that resource in Safari + https://bugs.webkit.org/show_bug.cgi?id=14409 + + * inspector/front-end/ResourcesPanel.js: + (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick): open a resource url + +2009-07-24 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by Xan Lopez. + + Bump pango version requirement to 1.12 and remove unnecessary #ifdefs. + + * platform/graphics/gtk/FontGtk.cpp: + (WebCore::getDefaultPangoLayout): + * platform/graphics/gtk/FontPlatformDataPango.cpp: + (WebCore::FontPlatformData::FontPlatformData): + * platform/gtk/Language.cpp: + +2009-07-24 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Timothy Hatcher. + + Inspector: Missing UIString and other localizedString.js fixes + https://bugs.webkit.org/show_bug.cgi?id=27288 + + * English.lproj/localizedStrings.js: + +2009-07-24 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Timothy Hatcher. + + Inspector: Should Syntax Highlight JSON + https://bugs.webkit.org/show_bug.cgi?id=27503 + + * inspector/front-end/SourceView.js: + (WebInspector.SourceView.prototype._contentLoaded): + +2009-07-24 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by Eric Seidel. + + Update WebCore/page/DOMTimer.cpp/h to conform to WebKit + Style Guidelines as identified by cpplint.py. + https://bugs.webkit.org/show_bug.cgi?id=27624 + + * page/DragController.cpp: + (WebCore::DragController::~DragController): + (WebCore::documentFragmentFromDragData): + (WebCore::DragController::dragEnded): + (WebCore::DragController::dragEntered): + (WebCore::DragController::dragExited): + (WebCore::DragController::dragUpdated): + (WebCore::DragController::performDrag): + (WebCore::asFileInput): + (WebCore::DragController::tryDocumentDrag): + (WebCore::DragController::delegateDragSourceAction): + (WebCore::DragController::concludeEditDrag): + (WebCore::DragController::canProcessDrag): + (WebCore::DragController::tryDHTMLDrag): + (WebCore::DragController::mayStartDragAtEventLocation): + (WebCore::getCachedImage): + (WebCore::getImage): + (WebCore::prepareClipboardForImageDrag): + (WebCore::dragLocForDHTMLDrag): + (WebCore::DragController::startDrag): + (WebCore::DragController::doImageDrag): + (WebCore::DragController::doSystemDrag): + (WebCore::DragController::placeDragCaret): + +2009-07-24 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by Eric Seidel. + + Update WebCore/page/Chrome.cpp to conform to WebKit + Style Guidelines as identified by cpplint.py. + https://bugs.webkit.org/show_bug.cgi?id=27608 + + * page/Chrome.cpp: + (WebCore::Chrome::runBeforeUnloadConfirmPanel): + (WebCore::Chrome::runJavaScriptAlert): + (WebCore::Chrome::runJavaScriptConfirm): + (WebCore::Chrome::runJavaScriptPrompt): + (WebCore::Chrome::shouldInterruptJavaScript): + (WebCore::Chrome::setToolTip): + (WebCore::Chrome::requestGeolocationPermissionForFrame): + (WebCore::ChromeClient::generateReplacementFile): + (WebCore::ChromeClient::paintCustomScrollbar): + +2009-07-24 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by Eric Seidel. + + Update WebCore/page/Coordinates.cpp to conform to WebKit + Style Guidelines as identified by cpplint.py. + https://bugs.webkit.org/show_bug.cgi?id=27614 + + * page/Coordinates.cpp: + (WebCore::Coordinates::toString): + +2009-07-24 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by Eric Seidel. + + Update WebCore/page/DOMSelection.cpp/h to conform to WebKit + Style Guidelines as identified by cpplint.py. + https://bugs.webkit.org/show_bug.cgi?id=27614 + + * page/DOMSelection.cpp: + (WebCore::DOMSelection::setBaseAndExtent): + (WebCore::DOMSelection::modify): + (WebCore::DOMSelection::addRange): + (WebCore::DOMSelection::deleteFromDocument): + * page/DOMSelection.h: + +2009-07-24 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by Eric Seidel. + + Update WebCore/page/DOMTimer.cpp/h to conform to WebKit + Style Guidelines as identified by cpplint.py. + https://bugs.webkit.org/show_bug.cgi?id=27618 + + * page/DOMTimer.cpp: + (WebCore::DOMTimer::DOMTimer): + (WebCore::DOMTimer::~DOMTimer): + (WebCore::DOMTimer::fired): + (WebCore::DOMTimer::suspend): + (WebCore::DOMTimer::resume): + (WebCore::DOMTimer::canSuspend): + * page/DOMTimer.h: + (WebCore::DOMTimer::minTimerInterval): + (WebCore::DOMTimer::setMinTimerInterval): + +2009-07-24 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Classes call DOMObject::mark() explicitly, should call DOMObjectWithGlobal::mark() instead + https://bugs.webkit.org/show_bug.cgi?id=27641 + + Nothing uses globalObject() yet, but this was causing crashes + in the patch for bug 27634. This is covered by fast/dom/gc-6.html. + + I decided to change these to Base:: instead of DOMObjectWithGlobal:: + for future-proofing. All autogenerated classes use a typedef Base + to avoid bugs like these. Sadly C++ does not have a built-in super:: we could use. + + * WebCore.xcodeproj/project.pbxproj: + * bindings/js/JSAbstractWorkerCustom.cpp: + (WebCore::JSAbstractWorker::mark): + * bindings/js/JSDOMApplicationCacheCustom.cpp: + (WebCore::JSDOMApplicationCache::mark): + * bindings/js/JSMessageChannelCustom.cpp: + (WebCore::JSMessageChannel::mark): + * bindings/js/JSMessagePortCustom.cpp: + (WebCore::JSMessagePort::mark): + * bindings/js/JSNamedNodesCollection.cpp: + (WebCore::JSNamedNodesCollection::getOwnPropertySlot): + * bindings/js/JSNodeCustom.cpp: + (WebCore::JSNode::mark): + * bindings/js/JSNodeFilterCustom.cpp: + (WebCore::JSNodeFilter::mark): + * bindings/js/JSNodeIteratorCustom.cpp: + (WebCore::JSNodeIterator::mark): + * bindings/js/JSSVGElementInstanceCustom.cpp: + (WebCore::JSSVGElementInstance::mark): + * bindings/js/JSTreeWalkerCustom.cpp: + (WebCore::JSTreeWalker::mark): + +2009-07-22 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Make most DOMObjects hold onto a JSDOMGlobalObject* + https://bugs.webkit.org/show_bug.cgi?id=27588 + + This change is almost entirely plumbing. Only one functional + change as part of this all (window.document.constructor has the correct prototype) + Changes are detailed below. + + inner.document.constructor is fixed because all properties on the window + object are created with the correct globalObject (instead of the lexical one). + Since all objects now carry a globalObject pointer, when document creates + HTMLDocumentConstructor it now has the right globalObject to use. + + Tests: + fast/dom/prototype-inheritance.html + fast/dom/prototype-inheritance-2.html + + * bindings/js/DOMObjectWithSVGContext.h: + (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext): + Update the comment and add an ignored globalObject argument. + * bindings/js/JSDOMBinding.h: + Pass a globalObject to all DOMObjects during creation. Currently it's the wrong global object. + Once toJS is passed a globalObject it will be the right one. + (WebCore::createDOMObjectWrapper): + (WebCore::createDOMNodeWrapper): + * bindings/js/JSDOMGlobalObject.h: + (WebCore::JSDOMGlobalObject::globalObject): Makes binding generation easier. + * bindings/js/JSDOMWindowCustom.cpp: + (WebCore::JSDOMWindow::history): JSHistory is now passed a globalObject, but since it has no custom constructor it doesn't use it. + (WebCore::JSDOMWindow::location): JSLocation is now passed a globalObject, but since it has no custom constructor it doesn't use it. + * bindings/js/JSDocumentCustom.cpp: + (WebCore::JSDocument::location): JSLocation is now passed a globalObject, but since it has no custom constructor it doesn't use it. + * bindings/js/JSHTMLAllCollection.h: + (WebCore::JSHTMLAllCollection::JSHTMLAllCollection): + * bindings/js/JSHTMLCollectionCustom.cpp: Re-factoring needed to pass globalObject to JSNamedNodesCollection constructor. + (WebCore::getNamedItems): + (WebCore::callHTMLCollection): + (WebCore::JSHTMLCollection::canGetItemsForName): + (WebCore::JSHTMLCollection::nameGetter): + (WebCore::JSHTMLCollection::item): + (WebCore::JSHTMLCollection::namedItem): + * bindings/js/JSHTMLFormElementCustom.cpp: + (WebCore::JSHTMLFormElement::nameGetter): + * bindings/js/JSNamedNodesCollection.cpp: + Now passed globalObject. This is tested by inner.document.forms.testForm. + The passed globalObject is still wrong until toJS is fixed. + (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): + * bindings/js/JSNamedNodesCollection.h: + * bindings/js/JSSharedWorkerConstructor.cpp: + Add DOMConstructorObject missed by http://trac.webkit.org/changeset/45938 + This class is not compiled by default, so not testable. + (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor): + * bindings/js/JSSharedWorkerConstructor.h: + * bindings/scripts/CodeGeneratorJS.pm: + Make all bindings objects carry a globalObject pointer using DOMObjectWithGlobalPointer. + SVG bindings which need a context() pointer do not have enough space for globalObject() too. + WorkerContext does not need a globalObject (it is one), so special case it. + Make all .constructor calls use the stored globalObject(). This is what fixes window.document.constructor. + Make all constructors inherit from DOMConstructorObject for consistency. Since the auto-bound constructors + override createStructure anyway, there is no functional change here. Just completing work started in r45938. + +2009-07-23 Brady Eidson <beidson@apple.com> + + Reviewed by Geoff Garen. + + WebCore has a few places that don't gracefully handle a null request returned from willSendRequest. + https://bugs.webkit.org/show_bug.cgi?id=27595 + + Test: http/tests/misc/will-send-request-returns-null-on-redirect.html + + * inspector/InspectorController.cpp: + (WebCore::InspectorController::removeResource): Null-check the request URL. + + * platform/network/cf/ResourceHandleCFNet.cpp: Ditto, and return null instead of creating an empty one. + (WebCore::willSendRequest): + +2009-07-23 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + Bug 27633 - AXLoadComplete can be fired off to frequently + https://bugs.webkit.org/show_bug.cgi?id=27633 + + An integration issue left out some curly braces. + + * dom/Document.cpp: + (WebCore::Document::implicitClose): + +2009-07-23 Darin Adler <darin@apple.com> + + Reviewed by Brady Eidson. + + URL appears in back/forward button menu instead of title for items with custom representation + https://bugs.webkit.org/show_bug.cgi?id=27586 + rdar://problem/5060337 + + * WebCore.base.exp: Exported DocumentLoader::setTitle for use by Mac WebKit. + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::didChangeTitle): Tightened code to check if the document + loader is the correct one; previously this would never happen because we'd + commit the load before any title changes could be registered, but now we can + encounter a case where we get a title during a provisional load. + +2009-07-23 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + [CSS3 Backgrounds and Borders] Add support for inset box shadows + https://bugs.webkit.org/show_bug.cgi?id=27582 + + Test: fast/box-shadow/inset.html + + * css/CSSComputedStyleDeclaration.cpp: + (WebCore::valueForShadow): Set the ShadowValue’s shadow style to 'inset' + as needed. + + * css/CSSParser.cpp: + (WebCore::ShadowParseContext::ShadowParseContext): Added style and allowStyle + members. Initialize the allowStyle member. + (WebCore::ShadowParseContext::commitValue): Pass the style value to the + ShadowValue constructor. Reset allowStyle. + (WebCore::ShadowParseContext::commitLength): Update allowStyle. + (WebCore::ShadowParseContext::commitColor): Ditto. + (WebCore::ShadowParseContext::commitStyle): Added. Sets the style member and + updates the state. + (WebCore::CSSParser::parseShadow): Parse the 'inset' keyword. + + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::applyProperty): Get the style value from the + shadow value and pass it to the ShadowData constructor. + + * css/ShadowValue.cpp: + (WebCore::ShadowValue::ShadowValue): Added style. + (WebCore::ShadowValue::cssText): Added style. + + * css/ShadowValue.h: + (WebCore::ShadowValue::create): Added style. + + * page/animation/AnimationBase.cpp: + (WebCore::blendFunc): Added a blend function for shadow styles. When blending + between normal and inset shadows, all intermediate values map to normal. + (WebCore::PropertyWrapperShadow::blend): Added normal style to the default + shadow. + + * rendering/InlineFlowBox.cpp: + (WebCore::InlineFlowBox::paintBoxShadow): Added a shadow style parameter, + which is passed through to RenderBoxModelObject::paintBoxShadow(). + + (WebCore::InlineFlowBox::paintBoxDecorations): Paint inset shadows on top of + the background. + + * rendering/InlineFlowBox.h: + + * rendering/RenderBox.cpp: + (WebCore::RenderBox::paintBoxDecorations): Paint inset shadows on top of the + background. + + * rendering/RenderBoxModelObject.cpp: + (WebCore::RenderBoxModelObject::paintBoxShadow): Added a shadow style + parameter, and code to paint inset shadows. + + * rendering/RenderBoxModelObject.h: + + * rendering/RenderFieldset.cpp: + (WebCore::RenderFieldset::paintBoxDecorations): Paint inset shadows on top of + the background. + + * rendering/RenderTable.cpp: + (WebCore::RenderTable::paintBoxDecorations): Ditto. + + * rendering/RenderTableCell.cpp: + (WebCore::RenderTableCell::paintBoxDecorations): Ditto. + + * rendering/style/ShadowData.h: + Added a ShadowStyle enum. + (WebCore::ShadowData::ShadowData): Add and initialize a style member. + +2009-07-23 Simon Fraser <simon.fraser@apple.com> + + Fix the build with UNUSED_PARAM(frame) for when ENABLE(3D_RENDERING) is not defined. + + * css/MediaQueryEvaluator.cpp: + (WebCore::transform_3dMediaFeatureEval): + +2009-07-23 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Adele Peterson. + + 3d-transforms media query needs to look check that accelerated compositing is enabled + https://bugs.webkit.org/show_bug.cgi?id=27621 + + When evaluating a media query with '-webkit-transform-3d', we need to check the + runtime switch that toggles accererated compositing, and therefore 3D. + + No test because we can't disable the pref dynamically in DRT. + + * css/MediaQueryEvaluator.cpp: + (WebCore::transform_3dMediaFeatureEval): + +2009-07-22 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Eric Seidel. + + execCommand('underline') can't remove <U> underlines + https://bugs.webkit.org/show_bug.cgi?id=20215 + + This patch adds support for u, s, and strike to implicitlyStyledElementShouldBeRemovedWhenApplyingStyle so that + WebKit can remove those presentational tags when necessary. + It also modifies StyleChange::init not to add "text-decoration: none". Not only is this style meaningless + (does not override inherited styles) but it was also causing WebKit to generate extra spans with this style. + + * css/CSSValueList.cpp: + (WebCore::CSSValueList::hasValue): True if the property contains the specified value + * css/CSSValueList.h: Updated prototype + * editing/ApplyStyleCommand.cpp: + (WebCore::StyleChange::init): No longer adds "text-decoration: none" + (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle): Supports text-decoration-related elements + +2009-07-23 Jessie Berlin <jberlin@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=27554 + Expose the value of text-overflow in getComputedStyle. + + Test: fast/css/getComputedStyle/getComputedStyle-text-overflow.html + + * css/CSSComputedStyleDeclaration.cpp: + (WebCore::): + Add text-overflow to the list of computedProperties. + (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): + Return the value of the text-overflow property. + +2009-07-23 Yongjun Zhang <yongjun.zhang@nokia.com> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=27510 + + [S60 QtWebKit] Don't put some intermediate generated files into the final mmp project + file for linking. This is a temporary workaround for qmake bug in Symbian port, should + be reverted after qmake is fixed. + + * WebCore.pro: + +2009-07-23 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + [V8] Fix an assert in running workers in Chrome. + https://bugs.webkit.org/show_bug.cgi?id=27620 + + The fix is to change V8DOMMap::removeAllDOMObjectsInCurrentThreadHelper + to do not call removeObjectsFromWrapperMap for certain types of DOM + objects that exist only in main thread. + + * bindings/v8/V8DOMMap.cpp: + (WebCore::removeAllDOMObjectsInCurrentThreadHelper): + +2009-07-23 David Hyatt <hyatt@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=27572 + Implement support for background-attachment:local. + + Added new test fast/overflow/overflow-with-local-attachment.html. + + * css/CSSComputedStyleDeclaration.cpp: + (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): + * css/CSSParser.cpp: + (WebCore::CSSParser::parseFillProperty): + * css/CSSPrimitiveValueMappings.h: + (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): + (WebCore::CSSPrimitiveValue::operator EFillAttachment): + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::mapFillAttachment): + * css/CSSValueKeywords.in: + * rendering/RenderBoxModelObject.cpp: + (WebCore::RenderBoxModelObject::paintFillLayerExtended): + (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): + * rendering/style/FillLayer.h: + (WebCore::FillLayer::attachment): + (WebCore::FillLayer::setAttachment): + (WebCore::FillLayer::hasFixedImage): + (WebCore::FillLayer::initialFillAttachment): + * rendering/style/RenderStyle.h: + (WebCore::InheritedFlags::backgroundAttachment): + (WebCore::InheritedFlags::maskAttachment): + * rendering/style/RenderStyleConstants.h: + (WebCore::): + +2009-07-23 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Eric Seidel. + + copyInheritableProperties and removeComputedInheritablePropertiesFrom should be deprecated + https://bugs.webkit.org/show_bug.cgi?id=27325 + + This patch deprecates copyInheritableProperties because it has been used for two different purposes: + 1. Calculating the typing style. + 2. Moving HTML subtrees and seeking to remove redundant styles. + These tasks should be broken out into two separate functions. New code should not use this function. + + It deletes removeComputedInheritablePropertiesFrom because it hasn't been used anywhere. + + There is no test since the patch does not change any behavior. + + * css/CSSComputedStyleDeclaration.cpp: removeComputedInheritablePropertiesFrom has been removed + (WebCore::CSSComputedStyleDeclaration::deprecatedCopyInheritableProperties): has been renamed from copyInheritableProperties + * css/CSSComputedStyleDeclaration.h: ditto + * editing/DeleteSelectionCommand.cpp: ditto + (WebCore::removeEnclosingAnchorStyle): ditto + (WebCore::DeleteSelectionCommand::saveTypingStyleState): ditto + * editing/EditCommand.cpp: ditto + (WebCore::EditCommand::styleAtPosition): ditto + * editing/RemoveFormatCommand.cpp: ditto + (WebCore::RemoveFormatCommand::doApply): ditto + * editing/ReplaceSelectionCommand.cpp: ditto + (WebCore::handleStyleSpansBeforeInsertion): ditto + (WebCore::ReplaceSelectionCommand::handleStyleSpans): ditto + * editing/markup.cpp: ditto + (WebCore::removeEnclosingMailBlockquoteStyle): ditto + (WebCore::removeDefaultStyles): ditto + (WebCore::createMarkup): ditto + +2009-07-22 Pierre d'Herbemont <pdherbemont@apple.com> + + Reviewed by Simon Fraser. + + Audio element at default width shouldn't have time field. + https://bugs.webkit.org/show_bug.cgi?id=27589 + + * rendering/MediaControlElements.cpp: + (WebCore::MediaControlTimeDisplayElement::setVisible): Make sure we don't + forget to remember the visibility if there is no renderer. + +2009-07-23 Beth Dakin <bdakin@apple.com> + + Reviewed by Darin Adler. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=27598 Clean up the + AccessibilityObject class + + Mostly this is just moving empty stubs into the header rather than + muddying the cpp file with them. A few functions were made pure + virtual. + + * accessibility/AccessibilityObject.cpp: + (WebCore::AccessibilityObject::isARIAControl): + (WebCore::AccessibilityObject::clickPoint): + (WebCore::AccessibilityObject::documentFrameView): + (WebCore::AccessibilityObject::actionVerb): + * accessibility/AccessibilityObject.h: + (WebCore::AccessibilityObject::intValue): + (WebCore::AccessibilityObject::layoutCount): + (WebCore::AccessibilityObject::doAccessibilityHitTest): + (WebCore::AccessibilityObject::focusedUIElement): + (WebCore::AccessibilityObject::firstChild): + (WebCore::AccessibilityObject::lastChild): + (WebCore::AccessibilityObject::previousSibling): + (WebCore::AccessibilityObject::nextSibling): + (WebCore::AccessibilityObject::parentObjectIfExists): + (WebCore::AccessibilityObject::observableObject): + (WebCore::AccessibilityObject::linkedUIElements): + (WebCore::AccessibilityObject::titleUIElement): + (WebCore::AccessibilityObject::ariaRoleAttribute): + (WebCore::AccessibilityObject::isPresentationalChildOfAriaRole): + (WebCore::AccessibilityObject::ariaRoleHasPresentationalChildren): + (WebCore::AccessibilityObject::roleValue): + (WebCore::AccessibilityObject::ariaAccessiblityName): + (WebCore::AccessibilityObject::ariaLabeledByAttribute): + (WebCore::AccessibilityObject::ariaDescribedByAttribute): + (WebCore::AccessibilityObject::accessibilityDescription): + (WebCore::AccessibilityObject::ariaSelectedTextDOMRange): + (WebCore::AccessibilityObject::axObjectCache): + (WebCore::AccessibilityObject::axObjectID): + (WebCore::AccessibilityObject::setAXObjectID): + (WebCore::AccessibilityObject::anchorElement): + (WebCore::AccessibilityObject::actionElement): + (WebCore::AccessibilityObject::boundingBoxRect): + (WebCore::AccessibilityObject::selectedTextRange): + (WebCore::AccessibilityObject::selectionStart): + (WebCore::AccessibilityObject::selectionEnd): + (WebCore::AccessibilityObject::url): + (WebCore::AccessibilityObject::selection): + (WebCore::AccessibilityObject::stringValue): + (WebCore::AccessibilityObject::title): + (WebCore::AccessibilityObject::helpText): + (WebCore::AccessibilityObject::textUnderElement): + (WebCore::AccessibilityObject::text): + (WebCore::AccessibilityObject::textLength): + (WebCore::AccessibilityObject::selectedText): + (WebCore::AccessibilityObject::accessKey): + (WebCore::AccessibilityObject::widget): + (WebCore::AccessibilityObject::widgetForAttachmentView): + (WebCore::AccessibilityObject::setFocused): + (WebCore::AccessibilityObject::setSelectedText): + (WebCore::AccessibilityObject::setSelectedTextRange): + (WebCore::AccessibilityObject::setValue): + (WebCore::AccessibilityObject::setSelected): + (WebCore::AccessibilityObject::makeRangeVisible): + (WebCore::AccessibilityObject::childrenChanged): + (WebCore::AccessibilityObject::addChildren): + (WebCore::AccessibilityObject::hasChildren): + (WebCore::AccessibilityObject::selectedChildren): + (WebCore::AccessibilityObject::visibleChildren): + (WebCore::AccessibilityObject::visiblePositionRange): + (WebCore::AccessibilityObject::visiblePositionRangeForLine): + (WebCore::AccessibilityObject::boundsForVisiblePositionRange): + (WebCore::AccessibilityObject::setSelectedVisiblePositionRange): + (WebCore::AccessibilityObject::visiblePositionForPoint): + (WebCore::AccessibilityObject::nextVisiblePosition): + (WebCore::AccessibilityObject::previousVisiblePosition): + (WebCore::AccessibilityObject::visiblePositionForIndex): + (WebCore::AccessibilityObject::indexForVisiblePosition): + (WebCore::AccessibilityObject::index): + (WebCore::AccessibilityObject::doAXRangeForLine): + (WebCore::AccessibilityObject::doAXRangeForIndex): + (WebCore::AccessibilityObject::doAXStringForRange): + (WebCore::AccessibilityObject::doAXBoundsForRange): + (WebCore::AccessibilityObject::updateBackingStore): + +2009-07-23 Brian Weinstein <bweinstein@apple.com> + + Reviewed by David Hyatt. + + Fix of <rdar://4877658> Dragging from the area between the horizontal/vertical scrollbars when status bar is showing starts a selection and autoscroll. + + * page/EventHandler.cpp: + (WebCore::EventHandler::handleMousePressEvent): + * platform/ScrollView.cpp: + (WebCore::ScrollView::wheelEvent): + * platform/ScrollView.h: + +2009-07-23 David Hyatt <hyatt@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=27581 + Drop the prefix from the box-shadow property. + + * css/CSSComputedStyleDeclaration.cpp: + (WebCore::): + (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): + * css/CSSParser.cpp: + (WebCore::CSSParser::parseValue): + (WebCore::ShadowParseContext::commitLength): + (WebCore::cssPropertyID): + * css/CSSPropertyNames.in: + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::applyProperty): + * page/animation/AnimationBase.cpp: + (WebCore::ensurePropertyMap): + +2009-07-22 Viet-Trung Luu <viettrungluu@gmail.com> + + Reviewed by David Hyatt. + + https://bugs.webkit.org/show_bug.cgi?id=27289 + When a mouse click occurs on a scrollbar without a preceding mouse move + onto it, the release isn't handled correctly (since + EventHandler::m_lastScrollbarUnderMouse isn't set on mouse down, but + only on mouse move). (Side comment: That scrollbar-handling code + in EventHandler is ugly. It should be fixed properly.) + + Tests: scrollbars/scrollbar-miss-mousemove.html + scrollbars/scrollbar-miss-mousemove-disabled.html + + * page/EventHandler.cpp: + (WebCore::EventHandler::handleMousePressEvent): + (WebCore::EventHandler::handleMouseMoveEvent): + (WebCore::EventHandler::updateLastScrollbarUnderMouse): + * page/EventHandler.h: + +2009-07-23 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by David Levin. + + Update WebCore/page/BarInfo.cpp to conform to WebKit + Style Guidelines as identified by cpplint.py. + https://bugs.webkit.org/show_bug.cgi?id=27606 + + * page/BarInfo.cpp: + (WebCore::BarInfo::visible): + +2009-07-23 Mike Fenton <mike.fenton@torchmobile.com> + + Reviewed by David Levin. + + Update WebCore/page/Console.cpp to conform to WebKit + Style Guidelines as identified by cpplint.py. + https://bugs.webkit.org/show_bug.cgi?id=27606 + + * page/Console.cpp: + (WebCore::printMessageSourceAndLevelPrefix): + (WebCore::Console::profile): + (WebCore::Console::time): + +2009-07-23 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Holger Freyther. + + Fix crashes with the QObject bindings after garbage collection. + + There is one QtInstance per wrapped QObject, and that QtInstance keeps + references to cached JSObjects for slots. When those objects get + deleted due to GC, then they becoming dangling pointers. + + When a cached member dies, it is now removed from the QtInstance's + cache. + + As we cannot track the lifetime of the children, we have to remove + them from QtInstance alltogether. They are not cached and were + only used for mark(), but we _want_ them to be subject to gc. + + * bridge/qt/qt_instance.cpp: + (JSC::Bindings::QtInstance::~QtInstance): Minor coding style cleanup, + use qDeleteAll(). + (JSC::Bindings::QtInstance::removeCachedMethod): New function, to + clean m_methods and m_defaultMethod. + (JSC::Bindings::QtInstance::mark): Avoid marking already marked objects. + (JSC::Bindings::QtField::valueFromInstance): Don't save children for + marking. + * bridge/qt/qt_instance.h: Declare removeCachedMethod. + * bridge/qt/qt_runtime.cpp: + (JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod): Call removeCachedMethod + with this on the instance. + +2009-07-23 Xan Lopez <xlopez@igalia.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=27599 + 'const unsigned' in return value + + Remove const modifier from unsigned return value, as it does not + make sense. + + * dom/ErrorEvent.h: + +2009-07-22 Jens Alfke <snej@chromium.org> + + Reviewed by David Levin. + + Bug 22784: Improve keyboard navigation of Select elements. + Home/End and PageUp/PageDn buttons do not do anything in drop down lists, + on non-Mac platforms. + https://bugs.webkit.org/show_bug.cgi?id=22784 + http://code.google.com/p/chromium/issues/detail?id=4576 + + New test: LayoutTests/fast/forms/select-popup-pagekeys.html + + * dom/SelectElement.cpp: + (WebCore::nextValidIndex): + New utility fn for traversing items of a select's list. + (WebCore::SelectElement::menuListDefaultEventHandler): + Added code to handle Home/End and PageUp/PageDn when ARROW_KEYS_POP_MENU is false. + +2009-07-23 Xan Lopez <xlopez@igalia.com> + + Reviewed by Mark Rowe. + + Fix a couple of compiler warnings. + + * platform/graphics/cairo/ImageBufferCairo.cpp: + (copySurface): + * platform/graphics/gtk/SimpleFontDataGtk.cpp: + (WebCore::SimpleFontData::containsCharacters): + +2009-07-22 Simon Hausmann <simon.hausmann@nokia.com> + + Rubber-stamped by David Levin. + + Enable HTML5 Datagrid defines for the Qt build. + + * WebCore.pro: + +2009-07-22 Adam Barth <abarth@webkit.org> + + Reviewed by David Levin. + + [V8] Make Node wrappers go fast + https://bugs.webkit.org/show_bug.cgi?id=27597 + + Profiles indicate we're spending a lot of time asking whether we're on + the main thread when looking up DOM wrappers for Nodes, but there isn't + much point in doing that work because Nodes only exist on the main + thread. I've also added an assert to keep us honest in this regard. + + * bindings/v8/V8DOMMap.cpp: + (WebCore::): + (WebCore::getDOMNodeMap): + (WebCore::DOMData::getCurrent): + (WebCore::DOMData::getCurrentMainThread): + +2009-07-22 Adam Barth <abarth@webkit.org> + + Reviewed by Alexey Proskuryakov. + + Remove unneeded virtual destructor from ScriptSourceProvider + https://bugs.webkit.org/show_bug.cgi?id=27563 + + * bindings/js/ScriptSourceProvider.h: + +2009-07-22 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Eric Seidel. + + execCommand('underline' / 'strikeThrough') doesn't work properly with multiple styles in text-decoration + https://bugs.webkit.org/show_bug.cgi?id=27476 + + executeStrikethrough and executeUnderline were toggling between "line-through" / "underline" and "none". + This patch adds executeToggleStyleInList that toggles a style in CSSValueList instead of toggling the entire value. + It modifies CSSComputedStyleDeclaration to return CSSValueList instead of CSSPrimitiveValue for text decorations, + and adds removeAll member function to CSSValueList. + + Tests: editing/execCommand/toggle-text-decorations.html + fast/css/getComputedStyle/getComputedStyle-text-decoration.html + + * css/CSSComputedStyleDeclaration.cpp: + (WebCore::renderTextDecorationFlagsToCSSValue): Creates a CSSValueList + (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Returns a CSSValueList instead of CSSValue + * css/CSSParser.cpp: + (WebCore::CSSParser::parseValue): Text decorations are space separated instead of comma separated + * css/CSSValueList.cpp: + (WebCore::CSSValueList::removeAll): Removes all values that match the specified value + * css/CSSValueList.h: + * editing/EditorCommand.cpp: + (WebCore::applyCommandToFrame): Apply style to a frame using specified command + (WebCore::executeApplyStyle): Uses applyCommandToFrame + (WebCore::executeToggleStyleInList): Uses applyCommandToFrame + (WebCore::executeToggleStyle): Toggles a style in CSSValueList + (WebCore::executeStrikethrough): Uses executeToggleStyleInList + (WebCore::executeUnderline): Uses executeToggleStyleInList + +2009-07-22 Daniel Bates <dbates@intudata.com> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=27174 + And + https://bugs.webkit.org/show_bug.cgi?id=26938 + + Code cleanup. Implements support for detecting attacks transformed by + PHP Magic Quotes/PHP addslashes(). + + Tests: http/tests/security/xssAuditor/script-tag-addslashes-backslash.html + http/tests/security/xssAuditor/script-tag-addslashes-double-quote.html + http/tests/security/xssAuditor/script-tag-addslashes-null-char.html + http/tests/security/xssAuditor/script-tag-addslashes-single-quote.html + + * page/XSSAuditor.cpp: + (WebCore::isInvalidCharacter): + (WebCore::XSSAuditor::canEvaluate): + (WebCore::XSSAuditor::canEvaluateJavaScriptURL): + (WebCore::XSSAuditor::canLoadObject): + (WebCore::XSSAuditor::normalize): Decodes HTML entities, removes backslashes, + and removes control characters that could otherwise cause a discrepancy between + the source code of a script and the outgoing HTTP parameters. + (WebCore::XSSAuditor::decodeURL): + (WebCore::XSSAuditor::decodeHTMLEntities): + (WebCore::XSSAuditor::findInRequest): + * page/XSSAuditor.h: + +2009-07-22 Oliver Hunt <oliver@apple.com> + + Reviewed by Adele Peterson. + + Null deref in JSObject::mark due to null xhr wrapper + https://bugs.webkit.org/show_bug.cgi?id=27565 + + Make event target binding for appcache and xhr behave in the same way as + it does for all other events. + + No test as I couldn't make a testcase which was remotely reliable. + + * bindings/js/JSEventTarget.cpp: + (WebCore::toJS): + +2009-07-22 Mads Ager <ager@chromium.org> + + Reviewed by David Levin. + + Inform V8 of the amount of WebCore string memory it is keeping alive. + https://bugs.webkit.org/show_bug.cgi?id=27537 + + V8 uses external strings that are backed by WebCore strings. Since + the external strings themselves are small, V8 has no way of + knowing how much memory it is actually holding on to. With this + change, we inform V8 of the amount of WebCore string data it is + holding on to with external strings. + + * bindings/v8/V8Binding.cpp: + (WebCore::WebCoreStringResource::WebCoreStringResource): + (WebCore::WebCoreStringResource::~WebCoreStringResource): + +2009-07-22 David Hyatt <hyatt@apple.com> + + Reviewed by Beth Dakin. + + https://bugs.webkit.org/show_bug.cgi?id=27562 + Add the finalized versions of background-clip and background-origin. Remove background-clip from + the background shorthand and have it be auto-set based off background-origin's value. + + Three new tests added in fast/backgrounds/size + + * css/CSSComputedStyleDeclaration.cpp: + (WebCore::): + (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): + * css/CSSMutableStyleDeclaration.cpp: + (WebCore::CSSMutableStyleDeclaration::getPropertyValue): + * css/CSSParser.cpp: + (WebCore::CSSParser::parseValue): + (WebCore::CSSParser::parseFillShorthand): + (WebCore::CSSParser::parseFillProperty): + * css/CSSPropertyLonghand.cpp: + (WebCore::initShorthandMap): + * css/CSSPropertyNames.in: + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::applyProperty): + * css/CSSValueKeywords.in: + +2009-07-22 Jens Alfke <snej@chromium.org> + + Reviewed by Darin Fisher. + + Hook up V8 bindings for DataGrid elements. + https://bugs.webkit.org/show_bug.cgi?id=27383 + http://code.google.com/p/chromium/issues/detail?id=16730 + + Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/* + to handle exceptions, check appropriate JS prototypes, and + test column-list's item() method as well as array-indexing. + + * WebCore.gypi: Added new source files. + * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes. + * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers. + * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates. + (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template. + * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource) + (WebCore::V8DataGridDataSource::V8DataGridDataSource): + (WebCore::V8DataGridDataSource::~V8DataGridDataSource): + * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource) + (WebCore::V8DataGridDataSource::create): + (WebCore::V8DataGridDataSource::isJSDataGridDataSource): + (WebCore::V8DataGridDataSource::jsDataSource): + (WebCore::asV8DataGridDataSource): + * bindings/v8/V8GCController.h: Added new handle type "DATASOURCE". + * bindings/v8/V8Index.h: Conditionalize datagrid stuff. + * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize. + * bindings/v8/custom/V8DataGridColumnListCustom.cpp: Added. + * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors. + (WebCore::ACCESSOR_GETTER): + (WebCore::ACCESSOR_SETTER): + +2009-07-22 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Eric Seidel. + + pushDownTextDecorationStyleAroundNode needs clean up + https://bugs.webkit.org/show_bug.cgi?id=27556 + + Cleaned up. pushDownTextDecorationStyleAroundNode traverses tree vertically from highestAncestor to targetNode + While traversing, it will apply the specified style to all nodes but targetNode. + i.e. the style is applies to all ancestor nodes and their siblings of targetNode. + + * editing/ApplyStyleCommand.cpp: + (WebCore::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Cleaned up and added comments + * editing/ApplyStyleCommand.h: Updated prototype + +2009-07-22 Peter Kasting <pkasting@google.com> + + Reviewed by David Kilzer. + + https://bugs.webkit.org/show_bug.cgi?id=27323 + Handle any type of line endings in WebCore/css/*CSSPropertyNames.in. + + * DerivedSources.make: + * css/makeprop.pl: + * css/makevalues.pl: + +2009-07-22 Paul Godavari <paul@chromium.org> + + Reviewed by Darin Fisher. + + Chromium has a build break after removal of JSRGBColor bindings + https://bugs.webkit.org/show_bug.cgi?id=27548 + + Fix a build break in Chromium V8 after the JSRGBColor bindings change: + https://bugs.webkit.org/show_bug.cgi?id=27242 + + * bindings/scripts/CodeGeneratorV8.pm: + +2009-07-22 Adam Langley <agl@google.com> + + Reviewed by Darin Fisher. + + Chromium Linux: add static functions to FontPlatformData which allow + for setting the global font rendering preferences. + + https://bugs.webkit.org/show_bug.cgi?id=27513 + http://code.google.com/p/chromium/issues/detail?id=12179 + + This should not affect any layout tests. + + * platform/graphics/chromium/FontPlatformDataLinux.cpp: + (WebCore::FontPlatformData::setHinting): + (WebCore::FontPlatformData::setAntiAlias): + (WebCore::FontPlatformData::setSubpixelGlyphs): + (WebCore::FontPlatformData::setupPaint): + * platform/graphics/chromium/FontPlatformDataLinux.h: + +2009-07-22 Mikhail Naganov <mnaganov@chromium.org> + + Reviewed by Timothy Hatcher. + + Move Inspector panels creation into a function to make possible introducing + custom panels. + + * inspector/front-end/inspector.js: + (WebInspector._createPanels): + (WebInspector.loaded): + +2009-07-22 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + WebInspector: Print console command message upon evaluate + selection request; Handle errors in evaluation request + properly. + + https://bugs.webkit.org/show_bug.cgi?id=27535 + + * inspector/front-end/ScriptsPanel.js: + (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): + * inspector/front-end/SourceFrame.js: + (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame): + +2009-07-22 Xan Lopez <xlopez@igalia.com> + + Attempt to fix the GTK+ build. + + * GNUmakefile.am: + +2009-07-21 Simon Hausmann <simon.hausmann@nokia.com> + + Fix the Qt build. + + * WebCore.pro: Add RGBColor.cpp to the build, remove JSRGBColor. + +2009-07-21 Daniel Bates <dbates@intudata.com> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=27494 + + Fixes an issue that can cause a crash or unexpected behavior when calling + WebCore::ScriptSourceCode::source on a cached script. + + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * bindings/js/CachedScriptSourceProvider.h: Modified to inherit from + WebCore::ScriptSourceCode. + (WebCore::CachedScriptSourceProvider::source): + (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider): + * bindings/js/ScriptSourceCode.h: + (WebCore::ScriptSourceCode::ScriptSourceCode): Separated out source provider and + rewrote to use WebCore::ScriptSourceProvider. + (WebCore::ScriptSourceCode::source): + * bindings/js/ScriptSourceProvider.h: Added. + (WebCore::ScriptSourceProvider::ScriptSourceProvider): + (WebCore::ScriptSourceProvider::~ScriptSourceProvider): + * bindings/js/StringSourceProvider.h: Modified to inherit from + WebCore::ScriptSourceCode. + (WebCore::StringSourceProvider::StringSourceProvider): + +2009-07-21 Sam Weinig <sam@webkit.org> + + Another attempt to fix the Windows build. + + * WebCore.vcproj/WebCore.vcproj: + +2009-07-21 Sam Weinig <sam@webkit.org> + + Attempt to fix the Windows build. + + * DerivedSources.cpp: + +2009-07-21 Sam Weinig <sam@webkit.org> + + Attempt to fix the GTK build. + + * GNUmakefile.am: + +2009-07-21 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Autogenerate Objective-C binding implementation for RGBColor. + + No functionality change. + + * WebCore.xcodeproj/project.pbxproj: + * bindings/objc/DOMRGBColor.mm: Removed. + * bindings/scripts/CodeGeneratorObjC.pm: Add logic to convert from + WebCore::Color to NSColor*. + * css/RGBColor.idl: + +2009-07-21 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=27242 + JSC bindings should use an auto-bound RGBColor class instead of hand-rolled JSRGBColor + + Move the JSC and Objective-C bindings onto using the RGBColor object instead + of just an unsigned int. The JSC bindings are now completely autogenerated for + this class. (Also removes the last lut from WebCore). + + * DerivedSources.make: + * GNUmakefile.am: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * WebCoreSources.bkl: + * bindings/js/JSRGBColor.cpp: Removed. + * bindings/js/JSRGBColor.h: Removed. + * bindings/objc/DOM.mm: + (-[DOMRGBColor _color]): + * bindings/objc/DOMRGBColor.mm: + (-[DOMRGBColor dealloc]): + (-[DOMRGBColor finalize]): + (-[DOMRGBColor red]): + (-[DOMRGBColor green]): + (-[DOMRGBColor blue]): + (-[DOMRGBColor alpha]): + (-[DOMRGBColor color]): + * bindings/scripts/CodeGenerator.pm: + * bindings/scripts/CodeGeneratorJS.pm: + * bindings/scripts/CodeGeneratorObjC.pm: + * css/CSSParser.cpp: + (WebCore::CSSParser::parseColor): + * css/CSSPrimitiveValue.cpp: + (WebCore::CSSPrimitiveValue::getRGBColorValue): + * css/CSSPrimitiveValue.h: + (WebCore::CSSPrimitiveValue::getRGBA32Value): + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): + * css/RGBColor.cpp: + (WebCore::RGBColor::alpha): + * css/RGBColor.h: + (WebCore::RGBColor::color): + (WebCore::RGBColor::RGBColor): + * css/RGBColor.idl: + * page/DOMWindow.idl: + * svg/SVGColor.cpp: + (WebCore::SVGColor::rgbColor): + * svg/SVGColor.h: + +2009-07-21 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + Implement AbstractWorker::dispatchScriptErrorEvent by generating an ErrorEvent. + https://bugs.webkit.org/show_bug.cgi?id=27515 + + * workers/AbstractWorker.cpp: + (WebCore::AbstractWorker::dispatchScriptErrorEvent): + +2009-07-21 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Move m_context out of generator into a superclass + https://bugs.webkit.org/show_bug.cgi?id=27521 + + Mostly this is removing code from CodeGeneratorJS + and instead using a DOMObjectWithSVGContext superclass in JSDOMBinding.h. + + DOMObjectWithSVGContext.h is its own file so that WebKit doesn't need to + know about SVGElement.h (WebKit includes JSDOMBinding.h for some reason). + + I also removed context pointer from SVGZoomEvent since it was never used. + + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * bindings/js/DOMObjectWithSVGContext.h: Added. + (WebCore::DOMObjectWithSVGContext::context): + (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext): + * bindings/js/JSDOMBinding.h: + * bindings/js/JSEventCustom.cpp: + (WebCore::toJS): + * bindings/scripts/CodeGeneratorJS.pm: + +2009-07-21 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Eric Seidel. + + REGRESSION (r46142): editing/execCommand/19087.html & editing/execCommand/19653-1.html fail in Windows build + https://bugs.webkit.org/show_bug.cgi?id=27480 + + Because m_anchorType : 2 is treated as a signed integer by cl.exe, anchorType() wasn't returning the correct value. + We made m_anchorType unsigned so that anchorType() returns the correct value. + + * dom/Position.h: + (WebCore::Position::anchorType): statically cast to AnchorType + +2009-07-21 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + [V8] Add V8 bindings for onerror in WorkerContext. + https://bugs.webkit.org/show_bug.cgi?id=27518 + + * bindings/v8/custom/V8CustomBinding.h: + * bindings/v8/custom/V8WorkerContextCustom.cpp: + (WebCore::ACCESSOR_GETTER): + (WebCore::ACCESSOR_SETTER): + +2009-07-21 Jian Li <jianli@chromium.org> + + Fix the incorrect patch being landed for bug 27516 that has already been reviewed. + https://bugs.webkit.org/show_bug.cgi?id=27516 + + * workers/WorkerContext.h: + (WebCore::WorkerContext::setOnerror): + (WebCore::WorkerContext::onerror): + * workers/WorkerContext.idl: + +2009-07-21 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + Add onerror to WorkerContext. + https://bugs.webkit.org/show_bug.cgi?id=27516 + + * bindings/js/JSWorkerContextCustom.cpp: + (WebCore::JSWorkerContext::mark): + * workers/WorkerContext.h: + (WebCore::WorkerContext::setOnerror): + (WebCore::WorkerContext::onerror): + * workers/WorkerContext.idl: + +2009-07-21 Yong Li <yong.li@torchmobile.com> + + Reviewed by George Staikos. + + https://bugs.webkit.org/show_bug.cgi?id=27509 + Add font-related files for the WinCE port. + + Written by Yong Li <yong.li@torchmobile.com> + + * platform/graphics/wince/FontCacheWince.cpp: Added. + * platform/graphics/wince/FontCustomPlatformData.cpp: Added. + * platform/graphics/wince/FontCustomPlatformData.h: Added. + * platform/graphics/wince/FontPlatformData.cpp: Added. + * platform/graphics/wince/FontPlatformData.h: Added. + * platform/graphics/wince/FontWince.cpp: Added. + * platform/graphics/wince/GlyphPageTreeNodeWince.cpp: Added. + * platform/graphics/wince/SimpleFontDataWince.cpp: Added. + +2009-07-21 Kevin Ollivier <kevino@theolliviers.com> + + Fix the Windows build, and update the comment on top now that wx uses WebCorePrefix.h too. + + * WebCorePrefix.h: + +2009-07-21 Kevin Ollivier <kevino@theolliviers.com> + + WebCorePrefix.h build fixes for non-Mac and wx / CURL builds. + + * WebCorePrefix.h: + +2009-07-21 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + All DOMConstructorObjects should hold a pointer to the JSDOMGlobalObject + https://bugs.webkit.org/show_bug.cgi?id=27478 + + This is just moving code. + I've added two new classes: DOMObjectWithGlobalPointer and DOMConstructorWithDocument. + + DOMObjectWithGlobalPointer is a new baseclass for DOMConstructorObject. + (It's a baseclass because eventually all DOMObjects will have a global pointer, but + I'll be moving them onto DOMObjectWithGlobalPointer in stages.) + + DOMConstructorWithDocument is a new baseclass for the 3 constructor objects + which require a backpointer to the Document to function. I made this a subclass of + DOMConstructorObject to make clear that most constructors can hold no-such assumptions + about having a back-pointer to the Document (since many constructors can be used from Workers). + + * bindings/js/JSAudioConstructor.cpp: + (WebCore::JSAudioConstructor::JSAudioConstructor): + * bindings/js/JSAudioConstructor.h: + * bindings/js/JSDOMBinding.h: + (WebCore::DOMObjectWithGlobalPointer::globalObject): + (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext): + (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer): + (WebCore::DOMObjectWithGlobalPointer::mark): + (WebCore::DOMConstructorObject::DOMConstructorObject): + (WebCore::DOMConstructorWithDocument::document): + (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument): + * bindings/js/JSImageConstructor.cpp: + (WebCore::JSImageConstructor::JSImageConstructor): + * bindings/js/JSImageConstructor.h: + * bindings/js/JSMessageChannelConstructor.cpp: + (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): + * bindings/js/JSMessageChannelConstructor.h: + * bindings/js/JSOptionConstructor.cpp: + (WebCore::JSOptionConstructor::JSOptionConstructor): + * bindings/js/JSOptionConstructor.h: + * bindings/js/JSWebKitCSSMatrixConstructor.cpp: + (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor): + * bindings/js/JSWebKitPointConstructor.cpp: + (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor): + * bindings/js/JSWorkerConstructor.cpp: + (WebCore::JSWorkerConstructor::JSWorkerConstructor): + * bindings/js/JSXMLHttpRequestConstructor.cpp: + (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): + * bindings/js/JSXMLHttpRequestConstructor.h: + * bindings/js/JSXSLTProcessorConstructor.cpp: + (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor): + +2009-07-21 James Hawkins <jhawkins@google.com> + + Reviewed by David Hyatt. + + https://bugs.webkit.org/show_bug.cgi?id=27453 + Initialize isInt when creating a CSSParserValue for a function. + + No change in behavior, so no tests. + + * css/CSSFunctionValue.cpp: + (WebCore::CSSFunctionValue::parserValue): + +2009-07-20 Jens Alfke <snej@google.com> + + Reviewed by David Levin. + + Bug 27448: [Chromium] On Mac, arrow keys should cause Select to pop up its menu. + Mac build of Chromium doesn't follow Mac HI guidelines to pop up the menu when + an arrow key is pressed. + https://bugs.webkit.org/show_bug.cgi?id=27448 + + No new tests; affects only control response to user input. + + * dom/SelectElement.cpp: + Changed definition of ARROW_KEYS_POP_MENU to make it true in Mac Chromium, + so it will behave compatibly with Mac HI guidelines on pop-up menus. + It's not possible to have PLATFORM(MAC) be true in the Mac build of Chromium. + +2009-07-21 Paul Godavari <paul@chromium.org> + + Reviewed by Eric Seidel. + + [Chromium] popup menus can crash when the selected index is -1 + https://bugs.webkit.org/show_bug.cgi?id=27275 + + Crash reports from users indicate a crash can occur when PopupListBox::isSelectableItem + is passed an index of less than 0 (which is possible under certain circumstances). This + change prevents such a value from causing a crash by enforcing valid index values passed + by all callers of isSelectableItem. isSelectableItem is now a private method of + PopupListBox, as there are no external callers. + + Also cleaned up a small amount of code for style and grammar errors. + + No automatic test is provided since we cannot send events to the child window used by + the popup menu. + + * platform/chromium/PopupMenuChromium.cpp: + (WebCore::PopupListBox::acceptIndex): + (WebCore::PopupListBox::selectIndex): + (WebCore::PopupListBox::isSelectableItem): + (WebCore::PopupListBox::selectPreviousRow): + +2009-07-21 Kevin Ollivier <kevino@theolliviers.com> + + wx build fix. Don't include winsock2.h on wx, it conflicts with wx's inclusion of winsock. + + * platform/network/curl/ResourceHandleManager.h: + +2009-07-21 Adam Roben <aroben@apple.com> + + Roll out r46153, r46154, and r46155 + + These changes were causing build failures and assertion failures on + Windows. + + * ForwardingHeaders/wtf/PossiblyNull.h: Removed. + * platform/graphics/cg/ImageBufferCG.cpp: + +2009-07-21 Jian Li <jianli@chromium.org> + + Reviewed by Eric Seidel. + + Implement ErrorEvent API. + https://bugs.webkit.org/show_bug.cgi?id=27387 + + * DerivedSources.cpp: + * DerivedSources.make: + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * WebCoreSources.bkl: + * bindings/js/JSEventCustom.cpp: + (WebCore::toJS): + * dom/ErrorEvent.cpp: Added. + * dom/ErrorEvent.h: Added. + * dom/ErrorEvent.idl: Added. + * dom/Event.cpp: + (WebCore::Event::isErrorEvent): + * dom/Event.h: + +2009-07-21 Priit Laes <plaes@plaes.org> + + Reviewed by Gustavo Noronha. + + [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word + https://bugs.webkit.org/show_bug.cgi?id=24602 + + Remove workaround required for <=libsoup-2.26.1 + + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::restartedCallback): + +2009-07-21 Adam Barth <abarth@webkit.org> + + Reviewed by David Levin. + + V8IsolatedWorld keeps a handle to a disposed context + https://bugs.webkit.org/show_bug.cgi?id=27397 + + Make a copy of the context handle before making it weak. We don't want + to make the original handle weak because we want it to survive for the + length of the V8IsolatedWorld::evaluate method. + + * bindings/v8/V8IsolatedWorld.cpp: + (WebCore::V8IsolatedWorld::V8IsolatedWorld): + +2009-07-21 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Add ability to evaluate selection while on break point. + + https://bugs.webkit.org/show_bug.cgi?id=27502 + + * inspector/front-end/SourceFrame.js: + (WebInspector.SourceFrame.prototype._loaded): + (WebInspector.SourceFrame.prototype._documentKeyDown): + +2009-07-21 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + WebInspector: Special case ConsolePanel opening since + it is a 'fast view'. + + https://bugs.webkit.org/show_bug.cgi?id=27493 + + * inspector/InspectorController.cpp: + (WebCore::InspectorController::setWindowVisible): + +2009-07-20 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Eric Seidel. + + Fix Qt code to follow the WebKit Coding Style. + + * platform/graphics/qt/FontQt.cpp: + (WebCore::qstring): + (WebCore::fixSpacing): + * platform/graphics/qt/FontQt43.cpp: + (WebCore::generateComponents): + (WebCore::Font::offsetForPositionForComplexText): + (WebCore::cursorToX): + * platform/graphics/qt/GradientQt.cpp: + (WebCore::Gradient::platformGradient): + * platform/graphics/qt/GraphicsContextQt.cpp: + (WebCore::toQtFillRule): + (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): + (WebCore::GraphicsContext::~GraphicsContext): + (WebCore::GraphicsContext::getCTM): + (WebCore::GraphicsContext::concatCTM): + (WebCore::GraphicsContext::getWindowsContext): + * platform/graphics/qt/IconQt.cpp: + (WebCore::Icon::paint): + * platform/graphics/qt/ImageDecoderQt.cpp: + (WebCore::ImageDecoderQt::ReadContext::read): + (WebCore::ImageDecoderQt::ReadContext::readImageLines): + (WebCore::ImageDecoderQt::setData): + * platform/graphics/qt/ImageQt.cpp: + (WebCore::Image::drawPattern): + (WebCore::BitmapImage::draw): + * platform/graphics/qt/ImageSourceQt.cpp: + (WebCore::ImageSource::frameDurationAtIndex): + (WebCore::ImageSource::frameHasAlphaAtIndex): + (WebCore::ImageSource::frameIsCompleteAtIndex): + * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: + (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): + (WebCore::MediaPlayerPrivate::create): + (WebCore::MediaPlayerPrivate::bytesLoaded): + (WebCore::MediaPlayerPrivate::updateStates): + * platform/graphics/qt/PathQt.cpp: + (WebCore::Path::addArcTo): + (WebCore::Path::isEmpty): + * platform/graphics/qt/TransformationMatrixQt.cpp: + (WebCore::TransformationMatrix::operator QTransform): + * platform/qt/ClipboardQt.cpp: + (WebCore::ClipboardQt::ClipboardQt): + (WebCore::ClipboardQt::clearData): + (WebCore::ClipboardQt::clearAllData): + (WebCore::ClipboardQt::getData): + (WebCore::ClipboardQt::setData): + (WebCore::ClipboardQt::setDragImage): + (WebCore::getCachedImage): + (WebCore::ClipboardQt::declareAndWriteDragImage): + (WebCore::ClipboardQt::writeURL): + (WebCore::ClipboardQt::writeRange): + (WebCore::ClipboardQt::hasData): + * platform/qt/ClipboardQt.h: + * platform/qt/ContextMenuItemQt.cpp: + (WebCore::ContextMenuItem::action): + (WebCore::ContextMenuItem::title): + * platform/qt/CursorQt.cpp: + (WebCore::westPanningCursor): + (WebCore::notAllowedCursor): + * platform/qt/DragDataQt.cpp: + (WebCore::DragData::containsFiles): + (WebCore::DragData::asFilenames): + (WebCore::DragData::asPlainText): + (WebCore::DragData::asFragment): + * platform/qt/DragImageQt.cpp: + (WebCore::createDragImageIconForCachedImage): + * platform/qt/FileSystemQt.cpp: + (WebCore::getFileSize): + (WebCore::unloadModule): + * platform/qt/Localizations.cpp: + (WebCore::contextMenuItemTagShowSpellingPanel): + * platform/qt/MIMETypeRegistryQt.cpp: + (WebCore::): + * platform/qt/PasteboardQt.cpp: + (WebCore::Pasteboard::Pasteboard): + (WebCore::Pasteboard::writeSelection): + (WebCore::Pasteboard::plainText): + * platform/qt/PlatformKeyboardEventQt.cpp: + (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): + * platform/qt/PlatformMouseEventQt.cpp: + (WebCore::PlatformMouseEvent::PlatformMouseEvent): + * platform/qt/PopupMenuQt.cpp: + (WebCore::PopupMenu::populate): + * platform/qt/RenderThemeQt.cpp: + (WebCore::RenderThemeQt::fallbackStyle): + (WebCore::inflateButtonRect): + (WebCore::RenderThemeQt::computeSizeBasedOnStyle): + (WebCore::RenderThemeQt::paintButton): + (WebCore::RenderThemeQt::paintMenuList): + (WebCore::RenderThemeQt::applyTheme): + (WebCore::WorldMatrixTransformer::WorldMatrixTransformer): + (WebCore::RenderThemeQt::paintMediaBackground): + (WebCore::RenderThemeQt::paintMediaFullscreenButton): + * platform/qt/RenderThemeQt.h: + * platform/qt/ScreenQt.cpp: + (WebCore::screenRect): + (WebCore::usableScreenRect): + * platform/qt/ScrollbarQt.cpp: + (WebCore::Scrollbar::contextMenu): + * platform/qt/ScrollbarThemeQt.cpp: + (WebCore::scPart): + (WebCore::scrollbarPart): + * platform/qt/ScrollbarThemeQt.h: + * platform/qt/SharedBufferQt.cpp: + (WebCore::SharedBuffer::createWithContentsOfFile): + * platform/qt/TemporaryLinkStubs.cpp: + (PluginDatabase::defaultPluginDirectories): + (PluginDatabase::getPluginPathsInDirectories): + (PluginDatabase::isPreferredPluginDirectory): + (WebCore::getSupportedKeySizes): + (WebCore::signedPublicKeyAndChallengeString): + (WebCore::userIdleTime): + (WebCore::prefetchDNS): + * platform/text/qt/StringQt.cpp: + (WebCore::String::String): + * platform/text/qt/TextBoundaries.cpp: + * platform/text/qt/TextBreakIteratorQt.cpp: + (WebCore::TextBreakIterator::following): + (WebCore::TextBreakIterator::preceding): + (WebCore::WordBreakIteratorQt::first): + (WebCore::WordBreakIteratorQt::next): + (WebCore::WordBreakIteratorQt::previous): + (WebCore::CharBreakIteratorQt::first): + (WebCore::CharBreakIteratorQt::next): + (WebCore::CharBreakIteratorQt::previous): + (WebCore::characterBreakIterator): + * plugins/qt/PluginPackageQt.cpp: + (WebCore::PluginPackage::fetchInfo): + * plugins/qt/PluginViewQt.cpp: + (WebCore::PluginView::userAgentStatic): + (WebCore::PluginView::handlePostReadFile): + (WebCore::PluginView::init): + +2009-07-21 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by David Levin. + + Added a first bunch of Haiku-specific files for WebCore. + https://bugs.webkit.org/show_bug.cgi?id=26988 + + * platform/haiku/ClipboardHaiku.cpp: Added. + (WebCore::ClipboardHaiku::ClipboardHaiku): + (WebCore::ClipboardHaiku::clearData): + (WebCore::ClipboardHaiku::clearAllData): + (WebCore::ClipboardHaiku::getData): + (WebCore::ClipboardHaiku::setData): + (WebCore::ClipboardHaiku::types): + (WebCore::ClipboardHaiku::files): + (WebCore::ClipboardHaiku::dragLocation): + (WebCore::ClipboardHaiku::dragImage): + (WebCore::ClipboardHaiku::setDragImage): + (WebCore::ClipboardHaiku::dragImageElement): + (WebCore::ClipboardHaiku::setDragImageElement): + (WebCore::ClipboardHaiku::createDragImage): + (WebCore::ClipboardHaiku::declareAndWriteDragImage): + (WebCore::ClipboardHaiku::writeURL): + (WebCore::ClipboardHaiku::writeRange): + (WebCore::ClipboardHaiku::hasData): + * platform/haiku/ClipboardHaiku.h: Added. + (WebCore::ClipboardHaiku::create): + (WebCore::ClipboardHaiku::~ClipboardHaiku): + * platform/haiku/CookieJarHaiku.cpp: Added. + (WebCore::setCookies): + (WebCore::cookies): + (WebCore::cookiesEnabled): + * platform/haiku/CursorHaiku.cpp: Added. + (WebCore::Cursor::Cursor): + (WebCore::Cursor::~Cursor): + (WebCore::Cursor::operator=): + (WebCore::pointerCursor): + (WebCore::moveCursor): + (WebCore::crossCursor): + (WebCore::handCursor): + (WebCore::iBeamCursor): + (WebCore::waitCursor): + (WebCore::helpCursor): + (WebCore::eastResizeCursor): + (WebCore::northResizeCursor): + (WebCore::northEastResizeCursor): + (WebCore::northWestResizeCursor): + (WebCore::southResizeCursor): + (WebCore::southEastResizeCursor): + (WebCore::southWestResizeCursor): + (WebCore::westResizeCursor): + (WebCore::northSouthResizeCursor): + (WebCore::eastWestResizeCursor): + (WebCore::northEastSouthWestResizeCursor): + (WebCore::northWestSouthEastResizeCursor): + (WebCore::columnResizeCursor): + (WebCore::rowResizeCursor): + (WebCore::verticalTextCursor): + (WebCore::cellCursor): + (WebCore::contextMenuCursor): + (WebCore::noDropCursor): + (WebCore::copyCursor): + (WebCore::progressCursor): + (WebCore::aliasCursor): + (WebCore::noneCursor): + (WebCore::notAllowedCursor): + (WebCore::zoomInCursor): + (WebCore::zoomOutCursor): + (WebCore::grabCursor): + (WebCore::grabbingCursor): + +2009-07-21 Albert Astals Cid <aacid@kde.org> + + Reviewed by Tor Arne Vestbø. + + Change #error line not to have a ' (single quote) + + * DerivedSources.cpp: + +2009-07-21 Roland Steiner <rolandsteiner@google.com> + + Reviewed by David Levin. + + Add ENABLE_RUBY to list of build options + https://bugs.webkit.org/show_bug.cgi?id=27324 + + Added flag ENABLE_RUBY: + + * Configurations/FeatureDefines.xcconfig: + * DerivedSources.make: + * GNUmakefile.am: + * WebCore.pro: + * WebCore.vcproj/WebCoreCommon.vsprops: + * WebCore.vcproj/build-generated-files.sh: + +2009-07-21 James Hawkins <jhawkins@google.com> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=27467 + Return an empty path in PlatformContextSkia::currentPathInLocalCoordinates + if matrix.invert() fails. This prevents the use of an uninitialized + value in inverseMatrix. + + No new tests added. Run + LayoutTests/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr.html + under valgrind and notice there are no errors. + + * platform/graphics/skia/PlatformContextSkia.cpp: + (PlatformContextSkia::currentPathInLocalCoordinates): + +2009-07-21 Stephen White <senorblanco@chromium.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=27388 + + Fix dotted and dashed borders on Chromium/skia. This follows + the logic in the Cg path, so results are much closer to Safari now + (some tests won't be exactly the same due to font layout differences). + + * platform/graphics/skia/GraphicsContextSkia.cpp: + (WebCore::GraphicsContext::drawLine): + * platform/graphics/skia/PlatformContextSkia.cpp: + (PlatformContextSkia::setupPaintForStroking): + +2009-07-20 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Make it harder to misuse try* allocation routines + https://bugs.webkit.org/show_bug.cgi?id=27469 + + Add forwarding header for PossiblyNull type, and add missing null check + to ImageBuffer creation. + + * ForwardingHeaders/wtf/PossiblyNull.h: Added. + * platform/graphics/cg/ImageBufferCG.cpp: + (WebCore::ImageBuffer::ImageBuffer): + +2009-07-20 Adam Langley <agl@google.com> + + Reviewed by Eric Seidel. + + Guard access to installedMediaEngines()[0]. + + https://bugs.webkit.org/show_bug.cgi?id=27479 + http://code.google.com/p/chromium/issues/detail?id=16541 + + Else where in the file, installedMediaEngines is always checked for + being empty because access. This patch adds a case which missed that + check. + + This triggered a crash in Chromium: + http://www.yakeze.com/chat/example-chromium-crash/ + + * platform/graphics/MediaPlayer.cpp: + (WebCore::MediaPlayer::load): + +2009-07-20 Adam Langley <agl@google.com> + + Reviewed by Eric Seidel. + + Allow search entries to render with a CSS border if the RenderTheme + doesn't paint them. + + https://bugs.webkit.org/show_bug.cgi?id=27466 + http://code.google.com/p/chromium/issues/detail?id=16958 + + <input type="search"> is very much like a text entry except that, + currently, if the RenderTheme doesn't deal with it, nothing is + rendered. With this patch, the default CSS border is rendered if the + RenderTheme requests it. + + This will affect many layout tests, but only for Chromium Linux and + those results are not currently in the WebKit tree. + + * rendering/RenderTheme.cpp: + (WebCore::RenderTheme::paintBorderOnly): + +2009-07-17 Anton Muhin <antonm@chromium.org> + + Reviewed by Adam Barth. + + Switch to faster methods to access internal fields. + https://bugs.webkit.org/show_bug.cgi?id=27372 + + Minor refactoring. + + * bindings/scripts/CodeGeneratorV8.pm: + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl): + (WebCore::V8DOMWrapper::setDOMWrapper): + * bindings/v8/V8DOMWrapper.h: + (WebCore::V8DOMWrapper::convertDOMWrapperToNative): + (WebCore::V8DOMWrapper::convertDOMWrapperToNode): + (WebCore::V8DOMWrapper::convertToNativeObject): + (WebCore::V8DOMWrapper::convertToNativeEvent): + * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8ClipboardCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8DocumentCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8ElementCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: + (WebCore::removeElement): + * bindings/v8/custom/V8InspectorControllerCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8NodeCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8XSLTProcessorCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + +2009-07-20 Adam Langley <agl@google.com> + + Reviewed by Eric Seidel. + + Chromium Linux: cache Harfbuzz faces. + + https://bugs.webkit.org/show_bug.cgi?id=27473 + + Previously, we recreated the Harfbuzz face for each script-run. With + this patch, we keep the Harfbuzz face in the FontPlatformData (created + as needed) and so they will persist for the duration of the + FontPlatformData. + + Shouldn't affect any layout tests. Results in a significant win on the + intl2 page cycler time. + + * platform/graphics/chromium/FontLinux.cpp: + (WebCore::TextRunWalker::~TextRunWalker): + (WebCore::TextRunWalker::setupFontForScriptRun): + * platform/graphics/chromium/FontPlatformDataLinux.cpp: + (WebCore::FontPlatformData::RefCountedHarfbuzzFace::~RefCountedHarfbuzzFace): + (WebCore::FontPlatformData::FontPlatformData): + (WebCore::FontPlatformData::harfbuzzFace): + * platform/graphics/chromium/FontPlatformDataLinux.h: + (WebCore::FontPlatformData::RefCountedHarfbuzzFace::create): + (WebCore::FontPlatformData::RefCountedHarfbuzzFace::face): + (WebCore::FontPlatformData::RefCountedHarfbuzzFace::RefCountedHarfbuzzFace): + * platform/graphics/chromium/HarfbuzzSkia.h: Added. + +2009-07-20 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Simon Fraser. + + REGRESSION (r46142): Need to remove showTreeThisForThis + https://bugs.webkit.org/show_bug.cgi?id=27475 + + Removes showTreeThisForThis + + * editing/IndentOutdentCommand.cpp: + (WebCore::IndentOutdentCommand::appendParagraphIntoNode): + +2009-07-19 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Eric Seidel. + + Refactoring of indentRegion to fix bugs 26816 and 25317 + https://bugs.webkit.org/show_bug.cgi?id=26816 + https://bugs.webkit.org/show_bug.cgi?id=25317 + https://bugs.webkit.org/show_bug.cgi?id=23995 (partially) + + This patch implements appendParagraphIntoNode, a simpler specialized version of moveParagraph + and replaces all calls inside indentRegion. The following is the new behavior of indentRegion. + + 1. We try to indent as many wrapping nodes as possible. + e.g. when indenting "hello" in <div>hello</div>, we try to indent div as well. + 2. We do not delete any wrapping elements + With moveParagraph, we used to remove all wrapping nodes, and replaced with a blockquote. + This was causing https://bugs.webkit.org/show_bug.cgi?id=23995 for indentation. + With appendParagraphIntoNode, we can preserve all wrapping nodes. + 3. We only split the tree until the closest block node instead of until the root editable node. + This behavioral change fixes the bug 25317. + 4. When multiple paragraphs are indented, we indent the highest common ancestor within the selection. + e.g. when a list is a child node of a div, and the entire div is intended, + we enclose the div by a single blockquote. + + Note that new behavior is more consistent with that of Internet Explorer and Firefox. + To demonstrate this, the following tests are added. + + Tests: editing/execCommand/indent-div-inside-list.html + editing/execCommand/indent-nested-blockquotes.html + editing/execCommand/indent-nested-div.html + editing/execCommand/indent-second-paragraph-in-blockquote.html + + * editing/IndentOutdentCommand.cpp: prepareBlockquoteLevelForInsertion is removed + (WebCore::IndentOutdentCommand::tryIndentingAsListItem): uses appendParagraphIntoNode now + (WebCore::IndentOutdentCommand::indentIntoBlockquote): uses appendParagraphIntoNode now + (WebCore::IndentOutdentCommand::appendParagraphIntoNode): removes a paragraph and appends it to a new node + (WebCore::IndentOutdentCommand::removeUnnecessaryLineBreakAt): removes a break element at the specified position + (WebCore::IndentOutdentCommand::indentRegion): exhibits the described behavior + * editing/IndentOutdentCommand.h: updated prototype + +2009-07-20 Dan Bernstein <mitz@apple.com> + + Try to fix release builds after r46136 + + * dom/Element.cpp: + +2009-07-17 Pierre d'Herbemont <pdherbemont@apple.com> + + Reviewed by Eric Seidel. + + Media Controls: We are specifying the text height, where it is unneeded and the slider is 2px off. + https://bugs.webkit.org/show_bug.cgi?id=27380 + + Adjust the margin of the slider and remove useless height specification to fix alignement of the media controls. + + * css/mediaControlsQT.css: + +2009-07-20 Peter Kasting <pkasting@google.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=27468 + Back out r46060, which caused problems for some Apple developers. + + * WebCore.vcproj/QTMovieWin.vcproj: + * WebCore.vcproj/WebCoreCommon.vsprops: + * WebCore.vcproj/WebCoreGenerated.vcproj: + +2009-07-20 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + When loading a custom view into a frame, the old document is still + around + <rdar://problem/5145841> + + Safari fires onload before PDF is loaded into the browser + <rdar://problem/6618869> + + Test: fast/loader/non-html-load-event.html + + * GNUmakefile.am: Added PlaceholderDocument.{cpp,h} + * WebCore.gypi: Ditto. + * WebCore.pro: Ditto. + * WebCore.vcproj/WebCore.vcproj: Ditto. + * WebCore.xcodeproj/project.pbxproj: Ditto. + * WebCoreSources.bkl: Ditto. + * dom/Document.h: + (WebCore::Document::setStyleSelector): Added this protected accessor for + PlaceholderDocument to use. + * dom/Element.cpp: + (WebCore::Element::clientWidth): Check whether the document has a + renderer. + (WebCore::Element::clientHeight): Ditto. + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::begin): Create a PlaceholderDocument for frames + that do not use an HTML view. Do not nullify the content size in + that case. + (WebCore::FrameLoader::transitionToCommitted): For frames that do not + use an HTML view, call receivedFirstData(), which sets up the + frame with a new PlaceHolderDocument. + * loader/PlaceholderDocument.cpp: Added. + (WebCore::PlaceholderDocument::attach): Sets up the style selector but + does not create a RenderView. + * loader/PlaceholderDocument.h: Added. + (WebCore::PlaceholderDocument::create): + (WebCore::PlaceholderDocument::PlaceholderDocument): + +2009-07-20 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Handle opacity and opacity animations on transform layers in Leopard + https://bugs.webkit.org/show_bug.cgi?id=27398 + + This makes two changes, and only for Leopard. + + First, whenever opacity is changed on a layer I propagate the + change into the content layer and all the children if the layer + on which opacity is set is a transform layer (preserve3D is true). + The opacity set is the accumulated opacity from this layer + and all its direct ancestor transform layers. Second, I turn off all + hardware opacity animation. + + * platform/graphics/GraphicsLayer.cpp: + (WebCore::GraphicsLayer::accumulatedOpacity): + (WebCore::GraphicsLayer::distributeOpacity): + * platform/graphics/GraphicsLayer.h: + (WebCore::GraphicsLayer::setOpacityInternal): + * platform/graphics/mac/GraphicsLayerCA.h: + * platform/graphics/mac/GraphicsLayerCA.mm: + (WebCore::GraphicsLayerCA::setPreserves3D): + (WebCore::GraphicsLayerCA::setOpacity): + (WebCore::GraphicsLayerCA::animateFloat): + (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): + (WebCore::GraphicsLayerCA::setOpacityInternal): + (WebCore::GraphicsLayerCA::updateOpacityOnLayer): + +2009-07-20 Yong Li <yong.li@torchmobile.com> + + Reviewed by Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=27349 + Add GraphicsContext implementation for the WinCE port. + + Written by Yong Li <yong.li@torchmobile.com>, George Staikos <george.staikos@torchmobile.com> and Lyon Chen <lyon.chen@torchmobile.com> + with trivial style fixes by Adam Treat <adam.treat@torchmobile.com> + + * platform/graphics/wince/GraphicsContextWince.cpp: Added. + +2009-07-20 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Dimitri Glazkov. + + Adding the Win SQLite VFS implementation for Chromium, and stubs + for the Mac and Linux VFSs. + + https://bugs.webkit.org/show_bug.cgi?id=26940 + + * WebCore.gypi: + * platform/chromium/ChromiumBridge.h: + * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Added. + * platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp: Added. + * platform/sql/chromium/SQLiteFileSystemChromiumMac.cpp: Added. + * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Added. + +2009-07-20 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + https://bugs.webkit.org/show_bug.cgi?id=27097 + [Gtk] Segfault when examining an object of ROLE_TABLE via at-spi + + Check that an object is a RenderObject before trying to access its + renderer and related node. + + * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: + (webkit_accessible_get_role): + +2009-07-20 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu> + + Reviewed by Simon Hausmann. + + [Qt] font cache reworking + https://bugs.webkit.org/show_bug.cgi?id=27265 + + Reimplemented Qt's FontCache in a way that follows the shared one. + Now we can release its elements when those became inactive. + FontFallbackList had been changed to be able to hold WebCore fonts in its list and to be able to release a FontData what is in the cache. + + No change in behavior, so no tests. + + * platform/graphics/qt/FontCacheQt.cpp: + (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): + (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue): + (WebCore::FontPlatformDataCacheKey::): Key type for the cache of FontPlatformData objects. + It can be constructed from a FontPlatformData or from a FontDescription. The keys have to be consistent + with FontPlatformData::FontPlatformData(const FontDescription&) - if we create the same + FontPlatformData from two FontDescription then we have to create the same key from them, and vica versa. + (WebCore::FontPlatformDataCacheKey::operator==): + (WebCore::FontPlatformDataCacheKey::hash): + (WebCore::FontPlatformDataCacheKey::computeHash): + (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): + (WebCore::FontPlatformDataCacheKeyHash::hash): + (WebCore::FontPlatformDataCacheKeyHash::equal): + (WebCore::FontPlatformDataCacheKeyTraits::emptyValue): + (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue): + (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue): + (WebCore::FontCache::getCachedFontPlatformData): Get a FontDescription and returns a FontPlatformData. + (WebCore::FontCache::getCachedFontData): Get a FontPlatformData and returns a SimpleFontData. + (WebCore::FontCache::releaseFontData): Get a SimpleFontData and releases it from the cache. Also releases the appropriate FontPlatformData. + (WebCore::FontCache::purgeInactiveFontData): Frees inactive elements. + (WebCore::FontCache::invalidate): Frees all inactive elements (call purgeInactiveFontData with default argument) + * platform/graphics/qt/FontFallbackListQt.cpp: + (WebCore::FontFallbackList::releaseFontData): + (WebCore::FontFallbackList::fontDataAt): + * platform/graphics/qt/FontPlatformData.h: + (WebCore::FontPlatformData::family): Getter. It is needed for FontPlatformDataCacheKey. + (WebCore::FontPlatformData::bold): Ditto. + (WebCore::FontPlatformData::italic): Ditto. + (WebCore::FontPlatformData::smallCaps): Ditto. + (WebCore::FontPlatformData::pixelSize): Ditto. + * platform/graphics/qt/FontPlatformDataQt.cpp: + (WebCore::FontPlatformData::FontPlatformData): Set m_bold. + +2009-07-20 Xan Lopez <xlopez@igalia.com> + + Reviewed by Holger Freyther. + + https://bugs.webkit.org/show_bug.cgi?id=26716 + [Gtk] Each XMLHttpRequest leaks memory. + + Free the SoupURI we create to check the URI. Fix suggested by John + Kjellberg. + + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::): + +2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Holger Freyther. + + [Qt] On Symbian link against system sqlite3 + https://bugs.webkit.org/show_bug.cgi?id=27368 + + Add an option to force linking against system sqlite3 + by adding system-sqlite to the CONFIG variable. + + The Symbian specific part of this patch is contributed by + Norbert Leser. + + * WebCore.pro: + +2009-07-20 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Change the glib version check to check for the first unstable + release with g_mapped_file_unref. Otherwise this would be useless + until 2.22 is released, a few months from now. + + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::ResourceHandle::startHttp): + +2009-07-20 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by and done with Tor Arne Vestbø. + + Fix fast/css/pseudo-required-optional-*.html in the Qt build + after r46062. + + These tests triggered a bug in RenderThemeQt where we did not fall back + to the unstyled painting of text areas and input fields when they have + a styled background. + + Our re-implementation of isControlStyled incorrectly only checked the + border for determining whether to style or not. The base-implementation + performs the same check, but also includes the background. Removing + our implementation fixes the appearance. + + * platform/qt/RenderThemeQt.cpp: Removed isControlStyled reimplementation. + * platform/qt/RenderThemeQt.h: Ditto. + +2009-07-20 Simon Hausmann <simon.hausmann@nokia.com> + + Rubber-stamped by Tor Arne Vestbø. + + Add missing (sorted) header files to the HEADERS variable in the qmake + .pro file for improved completion in IDEs. + + * WebCore.pro: + +2009-07-19 Adam Barth <abarth@webkit.org> + + Reviewed by David Levin. + + [V8] Factor V8ConsoleMessage out of V8Proxy + https://bugs.webkit.org/show_bug.cgi?id=27421 + + No behavior change. + + * WebCore.gypi: + * bindings/v8/V8ConsoleMessage.cpp: Added. + (WebCore::V8ConsoleMessage::V8ConsoleMessage): + (WebCore::V8ConsoleMessage::dispatchNow): + (WebCore::V8ConsoleMessage::dispatchLater): + (WebCore::V8ConsoleMessage::processDelayed): + (WebCore::V8ConsoleMessage::handler): + * bindings/v8/V8ConsoleMessage.h: Added. + (WebCore::V8ConsoleMessage::Scope::Scope): + (WebCore::V8ConsoleMessage::Scope::~Scope): + * bindings/v8/V8Proxy.cpp: + (WebCore::logInfo): + (WebCore::reportUnsafeAccessTo): + (WebCore::V8Proxy::runScript): + (WebCore::V8Proxy::callFunction): + (WebCore::V8Proxy::newInstance): + (WebCore::V8Proxy::initContextIfNeeded): + (WebCore::V8Proxy::processConsoleMessages): + +2009-07-19 Rob Buis <rwlbuis@gmail.com> + + Reviewed by Adam Barth. + + Remove unused member variable. + + * svg/SVGPolyElement.h: + +2009-07-19 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Dan Bernstein. + + HTMLAudioElement: constructor should set "autobuffer" attribute + https://bugs.webkit.org/show_bug.cgi?id=27422 + + Test: media/audio-constructor-autobuffer.html + + * bindings/js/JSAudioConstructor.cpp: + (WebCore::constructAudio): + Set 'autobuffer' attribute. + +2009-07-19 Thierry Bastian <thierry.bastian@nokia.com> + + Reviewed by Simon Hausmann. + + Fix the Qt build with mingw. + + * WebCore.pro: Don't use MSVC commandline options to disable warnings + with mingw. + +2009-07-19 Adam Barth <abarth@webkit.org> + + Reviewed by David Levin. + + [V8] Phase 2: Remove event listener methods from V8Proxy + https://bugs.webkit.org/show_bug.cgi?id=27415 + + No behavior change. + + * bindings/v8/V8ObjectEventListener.cpp: + (WebCore::weakObjectEventListenerCallback): + (WebCore::V8ObjectEventListener::~V8ObjectEventListener): + * bindings/v8/V8Proxy.cpp: + (WebCore::V8Proxy::disconnectEventListeners): + * bindings/v8/V8Proxy.h: + (WebCore::V8Proxy::eventListeners): + (WebCore::V8Proxy::objectListeners): + * bindings/v8/custom/V8AbstractWorkerCustom.cpp: + (WebCore::getEventListener): + * bindings/v8/custom/V8CustomEventListener.cpp: + (WebCore::V8EventListener::~V8EventListener): + * bindings/v8/custom/V8DOMWindowCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + (WebCore::ACCESSOR_SETTER): + * bindings/v8/custom/V8ElementCustom.cpp: + (WebCore::ACCESSOR_SETTER): + * bindings/v8/custom/V8MessagePortCustom.cpp: + (WebCore::ACCESSOR_SETTER): + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8NodeCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8SVGElementInstanceCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8WorkerCustom.cpp: + (WebCore::getEventListener): + * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: + (WebCore::getEventListener): + * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: + (WebCore::ACCESSOR_SETTER): + (WebCore::CALLBACK_FUNC_DECL): + +2009-07-18 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by Gustavo Noronha. + + [Gtk] soup/ResourceHandleSoup.cpp:533: error: 'g_mapped_file_free' was not declared in this scope + https://bugs.webkit.org/show_bug.cgi?id=27230 + + Use g_mapped_file_unref for GLIB version 2.22 onwards. + + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::ResourceHandle::startHttp): + +2009-07-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + Add spread radius support to -webkit-box-shadow + https://bugs.webkit.org/show_bug.cgi?id=27417 + rdar://problem/7072267 + + Test: fast/box-shadow/spread.html + + * css/CSSComputedStyleDeclaration.cpp: + (WebCore::valueForShadow): Added a property ID parameter and used it to + include the spread length for box-shadow but not for text-shadow. + (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): + Pass the property ID to valueForShadow(). + + * css/CSSParser.cpp: + (WebCore::ShadowParseContext::ShadowParseContext): Added property, + spread, and allowSpread members. Added a property ID parameter to + the constructor. Initialize the property and allowSpread members. + (WebCore::ShadowParseContext::allowLength): Added allowSpread. + (WebCore::ShadowParseContext::commitValue): Pass the spread value to + the ShadowValue constructor. Reset allowSpread. + (WebCore::ShadowParseContext::commitLength): Allow spread after blur + for the box-shadow property. + (WebCore::ShadowParseContext::commitColor): Reset allowSpread. + (WebCore::CSSParser::parseShadow): Pass the property ID to + ShadowParseContext(). + + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::applyProperty): Get the spread value from + the shadow value and pass it to the ShadowData constructor. + + * css/ShadowValue.cpp: + (WebCore::ShadowValue::ShadowValue): Added spread. + (WebCore::ShadowValue::cssText): Added spread. + + * css/ShadowValue.h: + (WebCore::ShadowValue::create): Added spread. + + * page/animation/AnimationBase.cpp: + (WebCore::blendFunc): Blend the spread value. + (WebCore::PropertyWrapperShadow::blend): Added 0 spread to the default + shadow. + + * rendering/InlineFlowBox.cpp: + (WebCore::InlineFlowBox::placeBoxesHorizontally): Account for spread in + the visual overflow calculations. + (WebCore::InlineFlowBox::placeBoxesVertically): Ditto. + (WebCore::InlineFlowBox::paint): Ditto. + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::overflowHeight): Ditto. + (WebCore::RenderBlock::overflowWidth): Ditto. + (WebCore::RenderBlock::overflowLeft): Ditto. + (WebCore::RenderBlock::overflowTop): Ditto. + (WebCore::RenderBlock::overflowRect): Ditto. + (WebCore::RenderBlock::layoutBlock): Ditto. + + * rendering/RenderBoxModelObject.cpp: + (WebCore::RenderBoxModelObject::paintBoxShadow): Inflate the shadow- + casting rect by the shadow spread value. Adjust border radii if + necessary. + + * rendering/RenderFlexibleBox.cpp: + (WebCore::RenderFlexibleBox::layoutBlock): Account for spread in the + visual overflow calculations. + * rendering/RenderLayer.cpp: + (WebCore::RenderLayer::calculateRects): Ditto. + + * rendering/RenderObject.cpp: + (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Account for spread. + (WebCore::RenderObject::adjustRectForOutlineAndShadow): Ditto. + + * rendering/RenderReplaced.cpp: + (WebCore::RenderReplaced::adjustOverflowForBoxShadowAndReflect): Ditto. + + * rendering/style/RenderStyle.cpp: + (WebCore::RenderStyle::setTextShadow): Assert that text shadows do not + have spread. + + * rendering/style/ShadowData.cpp: + (WebCore::ShadowData::ShadowData): Added spread. + (WebCore::ShadowData::operator==): Compare spread. + * rendering/style/ShadowData.h: + (WebCore::ShadowData::ShadowData): Added spread. + +2009-07-18 Adam Barth <abarth@webkit.org> + + Reviewed by Jan Alonzo. + + Minor FrameLoader.cpp cleanup + https://bugs.webkit.org/show_bug.cgi?id=27406 + + No behavior change. + + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::executeIfJavaScriptURL): + +2009-07-18 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Fisher. + + [V8] Move event listener methods from V8Proxy to V8EventListenerList + https://bugs.webkit.org/show_bug.cgi?id=27408 + + Move some event listener code out of V8Proxy and into the event + listener list. + + I'd like to remove these methods from V8Proxy entirely and just expose + getters for the lists themselves, but I'll do that in a follow up + patch. + + * bindings/v8/V8EventListenerList.cpp: + (WebCore::V8EventListenerList::findWrapper): + * bindings/v8/V8EventListenerList.h: + (WebCore::V8EventListenerList::findOrCreateWrapper): + * bindings/v8/V8ObjectEventListener.cpp: + * bindings/v8/V8Proxy.cpp: + (WebCore::V8Proxy::findV8EventListener): + (WebCore::V8Proxy::findOrCreateV8EventListener): + (WebCore::V8Proxy::removeV8EventListener): + (WebCore::V8Proxy::findObjectEventListener): + (WebCore::V8Proxy::findOrCreateObjectEventListener): + (WebCore::V8Proxy::removeObjectEventListener): + * bindings/v8/V8Proxy.h: + +2009-07-18 Jeremy Orlow <jorlow@chromium.org> + + Rubber stamped by Adam Barth. + + Revert https://bugs.webkit.org/show_bug.cgi?id=27383 + https://bugs.webkit.org/show_bug.cgi?id=27407 + + Revert Jens' patch. I believe he forgot to include a file. + + * WebCore.gypi: + * bindings/scripts/CodeGeneratorV8.pm: + * bindings/v8/DOMObjectsInclude.h: + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::getTemplate): + * bindings/v8/V8DataGridDataSource.cpp: Removed. + * bindings/v8/V8DataGridDataSource.h: Removed. + * bindings/v8/V8GCController.h: + * bindings/v8/V8Index.h: + * bindings/v8/custom/V8CustomBinding.h: + * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: + (WebCore::ACCESSOR_GETTER): + (WebCore::ACCESSOR_SETTER): + +2009-07-17 Daniel Bates <dbates@intudata.com> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=27405 + + Fixes an issue when decoding HTML entities with an unknown named entity that + caused null-characters to be inserted into the decoded result. + + Test: http/tests/security/xssAuditor/link-onclick-ampersand.html + http/tests/security/xssAuditor/javascript-link-ampersand.html + + * page/XSSAuditor.cpp: + (WebCore::XSSAuditor::decodeHTMLEntities): Added check to conditional so that + non-zero entity values are not inserted during decoding process. + +2009-07-17 Jan Michael Alonzo <jmalonzo@webkit.org> + + <http://webkit.org/b/18363> [GTK] Combo boxes cannot be opened pressing space + + Reviewed by Holger Freyther. + + Add Gtk to platforms that want to open the menulist using the + spacebar. + + * dom/SelectElement.cpp: + (WebCore::SelectElement::menuListDefaultEventHandler): + +2009-07-17 Mario Sanchez Prada <msanchez@igalia.com> + + Reviewed by Jan Alonzo. + + https://bugs.webkit.org/show_bug.cgi?id=25523 + [GTK] The text displayed by push buttons is not exposed to assistive technologies + + Add new public method text() to RenderButton and use it from + AccessibilityRenderObject::stringValue(). + + * accessibility/AccessibilityRenderObject.cpp: + (WebCore::AccessibilityRenderObject::stringValue): + * rendering/RenderButton.cpp: + (WebCore::RenderButton::text): + * rendering/RenderButton.h: + +2009-07-17 Anton Muhin <antonm@chromium.org> + + Reviewed by Dimitri Glazkov. + + Restore proxy retrieval + https://bugs.webkit.org/show_bug.cgi?id=27369 + + No new tests are needed. + + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::instantiateV8Object): + +2009-07-17 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by George Staikos. + + https://bugs.webkit.org/show_bug.cgi?id=27351 + Added platform "Symbian" to WEBCORE_NAVIGATOR_PLATFORM + Use uname to find the correct platform for Linux. + + * page/NavigatorBase.cpp: + (WebCore::NavigatorBase::platform): + +2009-07-17 Jens Alfke <snej@chromium.org> + + Reviewed by Dimitri Glazkov. + + Hook up V8 bindings for DataGrid elements. + https://bugs.webkit.org/show_bug.cgi?id=27383 + http://code.google.com/p/chromium/issues/detail?id=16730 + + Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/* + to handle exceptions, check appropriate JS prototypes, and + test column-list's item() method as well as array-indexing. + + * WebCore.gypi: Added new source files. + * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes. + * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers. + * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates. + (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template. + * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource) + (WebCore::V8DataGridDataSource::V8DataGridDataSource): + (WebCore::V8DataGridDataSource::~V8DataGridDataSource): + * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource) + (WebCore::V8DataGridDataSource::create): + (WebCore::V8DataGridDataSource::isJSDataGridDataSource): + (WebCore::V8DataGridDataSource::jsDataSource): + (WebCore::asV8DataGridDataSource): + * bindings/v8/V8GCController.h: Added new handle type "DATASOURCE". + * bindings/v8/V8Index.h: Conditionalize datagrid stuff. + * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize. + * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors. + (WebCore::ACCESSOR_GETTER): + (WebCore::ACCESSOR_SETTER): + +2009-07-17 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + StorageArea should only contain methods we intend to proxy. + https://bugs.webkit.org/show_bug.cgi?id=27181 + + Right now, StorageAreaSync takes in a StorageArea* and calls methods + like importItem. Really, StorageAreaSync should be operating directly + on StorageAreaImpl* and those methods should be removed from StorageArea + since StorageAreaSync should never be attached to anything other than a + StorageAreaImpl. + + This was pointed out in the review for + https://bugs.webkit.org/show_bug.cgi?id=27072 + + Also clean up StorageNamespaceImpl to operate directly on + StorageAreaImpl. Also, get rid of the factory for StorageArea + since nothing should ever create a StorageArea directly. + + * GNUmakefile.am: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * WebCoreSources.bkl: + * storage/StorageArea.cpp: Removed. + * storage/StorageArea.h: + (WebCore::StorageArea::~StorageArea): + * storage/StorageAreaImpl.cpp: + (WebCore::StorageAreaImpl::copy): + * storage/StorageAreaImpl.h: + * storage/StorageAreaSync.cpp: + (WebCore::StorageAreaSync::create): + (WebCore::StorageAreaSync::StorageAreaSync): + * storage/StorageAreaSync.h: + * storage/StorageNamespaceImpl.cpp: + (WebCore::StorageNamespaceImpl::copy): + (WebCore::StorageNamespaceImpl::storageArea): + * storage/StorageNamespaceImpl.h: + +2009-07-17 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Dimitri Glazkov. + + Add v8 implementation for DOM Storage ScriptObjectQuarantine. + https://bugs.webkit.org/show_bug.cgi?id=27327 + + Wrap the storage object with a generic object as is done elsewhere in + the file (but continue to hit a NOTIMPLEMENTED if DOM_STORAGE is not + enabled. + + * bindings/v8/ScriptObjectQuarantine.cpp: + (WebCore::getQuarantinedScriptObject): + +2009-07-17 Mads Ager <ager@chromium.org> + + Reviewed by Dimitri Glazkov. + + https://bugs.webkit.org/show_bug.cgi?id=27394 + Fix access to global object wrappers after navigation of their + frame in the V8 bindings. This fixes selenium test failures. + + * bindings/v8/V8Proxy.cpp: + (WebCore::V8Proxy::updateDocument): + +2009-07-17 Mark Rowe <mrowe@apple.com> + + Fix the 32-bit build by removing implicit float <-> double conversions. + + * inspector/InspectorController.cpp: + (WebCore::constrainedAttachedWindowHeight): + +2009-07-17 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Fix of <rdar://problem/5712795> Win: Cannot change the height of the docked Web Inspector (14272) + https://bugs.webkit.org/show_bug.cgi?id=14272 + + Moved preference setting for attached inspector height and inspector height calculation from + WebInspectorClient.mm into InspectorController.cpp, to make this code cross-platform and enable + Windows resizing of attached inspector. + + * inspector/InspectorController.cpp: + * inspector/InspectorController.h: + +2009-07-17 Dan Bernstein <mitz@apple.com> + + Another attempt at fixing the build after r46063 + + * WebCore.xcodeproj/project.pbxproj: Made ExceptionCode.h a private + header, because it is now included from htmlediting.h, which is + a private header. + +2009-07-17 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=27396 + Moving cursor in Thai text sometimes jumps over two characters + + Test: editing/text-iterator/thai-cursor-movement.html + + * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator): Added a special + case for five Thai characters, matching ICU/CLDR changes. + +2009-07-14 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Some constructor objects exposed on Window have the wrong prototype chain + https://bugs.webkit.org/show_bug.cgi?id=27276 + + Several Constructor classes were already being passed a global object + during construction, but they were ignoring it for prototype lookup. + I've fixed those to use the passed global object instead. + + Most of these Constructor classes should just be auto-generated, but I + refrained from changing them over to auto-gen in this patch. + + Fixed CodeGeneratorJS to pass a global object to getDOMConstructor when + available, otherwise default to deprecatedGlobalObjectForPrototype(exec) + to match existing behavior. + + Test: fast/dom/prototype-inheritance.html + + * bindings/js/JSAudioConstructor.cpp: + (WebCore::JSAudioConstructor::JSAudioConstructor): use the existing globalObject pointer for prototype lookup + * bindings/js/JSDOMBinding.h: + (WebCore::deprecatedGlobalObjectForPrototype): Make it easy to detect where the wrong global object is being used. + (WebCore::deprecatedGetDOMStructure): + * bindings/js/JSDOMGlobalObject.h: remove error-prone getDOMConstructor, require passing JSDOMGlobalObject* + * bindings/js/JSDOMWindowCustom.cpp: + (WebCore::JSDOMWindow::webKitPoint): pass "this" for the global object. + (WebCore::JSDOMWindow::webKitCSSMatrix): pass "this" for the global object. + (WebCore::JSDOMWindow::xsltProcessor): pass "this" for the global object. + (WebCore::JSDOMWindow::worker): pass "this" for the global object. + * bindings/js/JSImageConstructor.cpp: + (WebCore::JSImageConstructor::JSImageConstructor): use the existing globalObject pointer for prototype lookup + * bindings/js/JSMessageChannelConstructor.cpp: + (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): use the existing globalObject pointer for prototype lookup + * bindings/js/JSOptionConstructor.cpp: + (WebCore::JSOptionConstructor::JSOptionConstructor): use the existing globalObject pointer for prototype lookup + * bindings/js/JSWebKitCSSMatrixConstructor.cpp: + (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor): add new globalObject parameter and use it + * bindings/js/JSWebKitCSSMatrixConstructor.h: + * bindings/js/JSWebKitPointConstructor.cpp: + (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor): add new globalObject parameter and use it + * bindings/js/JSWebKitPointConstructor.h: + * bindings/js/JSWorkerConstructor.cpp: + (WebCore::JSWorkerConstructor::JSWorkerConstructor): add new globalObject parameter and use it + * bindings/js/JSWorkerConstructor.h: + * bindings/js/JSXMLHttpRequestConstructor.cpp: + (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): use the existing globalObject pointer for prototype lookup + -- XMLHttpRequest constructor was also missing a length. Added one. + * bindings/js/JSXSLTProcessorConstructor.cpp: + (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor): + * bindings/js/JSXSLTProcessorConstructor.h: + * bindings/scripts/CodeGeneratorJS.pm: + +2009-07-17 Dan Bernstein <mitz@apple.com> + + Build fix + + * editing/htmlediting.cpp: + (WebCore::visiblePositionBeforeNode): + (WebCore::visiblePositionAfterNode): + +2009-07-17 Jan Michael Alonzo <jmalonzo@webkit.org> + + Gtk build fix for symbol lookup error. + + Move AbstractWorker from SHARED_WORKERS to WORKERS as Worker derives from it now + Changed in http://trac.webkit.org/changeset/46048 + + * GNUmakefile.am: + +2009-07-17 Ryosuke Niwa <ryosuke.niwa@gmail.com> + + Reviewed by Eric Seidel. + + htmlediting.cpp needs more utility functions to fix the bug 26816 + https://bugs.webkit.org/show_bug.cgi?id=27038 + + In order to fix the bug 26816, we need several utility functions be added to htmlediting.cpp + + No tests because functions haven't been used anywhere yet. + + * dom/Range.cpp: + (WebCore::Range::create): + (WebCore::Range::comparePoint): added const qualifier + (WebCore::Range::compareNode): added const qualifier + * dom/Range.h: + * editing/htmlediting.cpp: + (WebCore::unsplittableElementForPosition): find the enclosing unsplittable element (editing root & table cell) + (WebCore::positionBeforeNode): added ASSERT(node) + (WebCore::positionAfterNode): added ASSERT(node) + (WebCore::visiblePositionBeforeNode): + (WebCore::visiblePositionAfterNode): + (WebCore::createRange): create a range object from two visible positions + (WebCore::extendRangeToWrappingNodes): extend range to include nodes that starts and ends at the boundaries + (WebCore::canMergeLists): typo + (WebCore::indexForVisiblePosition): added const qualifier + (WebCore::isVisiblyAdjacent): typo + (WebCore::isNodeVisiblyContainedWithin): determine if a node is inside a range or within the visible boundaries of the range + * editing/htmlediting.h: + +2009-07-17 Michelangelo De Simone <micdesim@gmail.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=25551 + Added support for the "required" attribute, the valueMissing flag + to the ValidityState object and :required/:optional CSS pseudoclasses. + Part of HTML5 sec. Forms specs. + http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-required + + Tests: fast/css/pseudo-required-optional-001.html + fast/css/pseudo-required-optional-002.html + fast/css/pseudo-required-optional-003.html + fast/css/pseudo-required-optional-004.html + fast/css/pseudo-required-optional-005.html + fast/css/pseudo-required-optional-006.html + fast/forms/ValidityState-valueMissing-001.html + fast/forms/ValidityState-valueMissing-002.html + fast/forms/ValidityState-valueMissing-003.html + fast/forms/ValidityState-valueMissing-004.html + fast/forms/ValidityState-valueMissing-005.html + fast/forms/ValidityState-valueMissing-006.html + fast/forms/ValidityState-valueMissing-007.html + fast/forms/ValidityState-valueMissing-008.html + fast/forms/ValidityState-valueMissing-009.html + fast/forms/required-attribute-001.html + fast/forms/required-attribute-002.html + + * css/CSSSelector.cpp: + (WebCore::CSSSelector::extractPseudoType): pseudoRequired/pseudoOptional + * css/CSSSelector.h: + (WebCore::CSSSelector::): ditto + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): ditto + * dom/Element.h: + (WebCore::Element::isOptionalFormControl): check for optional controls + (WebCore::Element::isRequiredFormControl): check for required controls + * html/HTMLAttributeNames.in: required attribute + * html/HTMLButtonElement.h: + (WebCore::HTMLButtonElement::isOptionalFormControl): ditto + * html/HTMLFormControlElement.cpp: + (WebCore::HTMLFormControlElement::required): requiredAttr getter + (WebCore::HTMLFormControlElement::setRequired): requiredAttr setter + * html/HTMLFormControlElement.h: + (WebCore::HTMLFormControlElement::valueMissing): method definition + * html/HTMLInputElement.cpp: + (WebCore::HTMLInputElement::valueMissing): validation code + (WebCore::HTMLInputElement::isRequiredFormControl): ditto + * html/HTMLInputElement.h: + (WebCore::HTMLInputElement::isOptionalFormControl): ditto + * html/HTMLInputElement.idl: required DOM attribute + * html/HTMLSelectElement.h: + (WebCore::HTMLSelectElement::isOptionalFormControl): ditto + * html/HTMLTextAreaElement.h: + (WebCore::HTMLTextAreaElement::valueMissing): validation code + (WebCore::HTMLTextAreaElement::isOptionalFormControl): ditto + (WebCore::HTMLTextAreaElement::isRequiredFormControl): ditto + * html/HTMLTextAreaElement.idl: required DOM attribute + * html/ValidityState.cpp: + * html/ValidityState.h: + (WebCore::ValidityState::valueMissing): validation flag + +2009-07-17 Beth Dakin <bdakin@apple.com> + + Reviewed by Darin Adler. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=27390 CSS custom + cursor hotspots should work in quirks mode + - and corresponding <rdar://problem/6554340> + + Enable hotspots in quirks mode. + * css/CSSParser.cpp: + (WebCore::CSSParser::parseValue): + + Update this manual test to reflect the fact that hotspots are now + expected to work in quirks mode. + * manual-tests/css3-cursor-fallback-quirks.html: + +2009-07-17 Peter Kasting <pkasting@google.com> + + Reviewed by Steve Falkenburg. + + https://bugs.webkit.org/show_bug.cgi?id=27323 + Only add Cygwin to the path when it isn't already there. This avoids + causing problems for people who purposefully have non-Cygwin versions of + executables like svn in front of the Cygwin ones in their paths. + + * WebCore.vcproj/QTMovieWin.vcproj: + * WebCore.vcproj/WebCoreCommon.vsprops: + * WebCore.vcproj/WebCoreGenerated.vcproj: + +2009-07-17 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=27384 + Random crashes in appcache/update-cache.html test + + * loader/appcache/ApplicationCacheGroup.cpp: + (WebCore::ApplicationCacheGroup::didReceiveResponse): Reorder code to avoid using a handle + after canceling it. + +2009-07-17 Drew Wilson <atwilson@google.com> + + Reviewed by David Levin. + + Need to refactor Worker to derive from AbstractWorker + https://bugs.webkit.org/show_bug.cgi?id=26948 + + Changed Worker to derive from AbstractWorker, which involved moving + AbstractWorker files from being wrapped by ENABLE_SHARED_WORKERS to + ENABLE_WORKERS. + + Removed obsolete functionality from the JS/V8 bindings that is now + inherited from AbstractWorker. + + * WebCore.pro: + Moved AbstractWorker files out of SHARED_WORKERS section and into WORKERS. + * bindings/js/JSAbstractWorkerCustom.cpp: + Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS). + * bindings/js/JSWorkerCustom.cpp: + Removed obsolete event listener code (now in base class) + (WebCore::JSWorker::mark): + No longer need to explicitly mark event listeners (handled by base class). + * bindings/v8/V8Index.h: + Moved AbstractWorker lines out of SHARED_WORKERS section and into WORKERS. + * bindings/v8/custom/V8AbstractWorkerCustom.cpp: + Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS). + * bindings/v8/custom/V8CustomBinding.h: + Moved AbstractWorker lines out of SHARED_WORKERS section and into WORKERS. + * bindings/v8/custom/V8WorkerCustom.cpp: + Removed obsolete event listener code that now lives in the base class. + (WebCore::V8WorkerConstructor): Cleaned up legacy style nits. + * workers/AbstractWorker.cpp: + Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS). + * workers/AbstractWorker.h: + Changed to be wrapped by ENABLE(WORKERS), not ENABLE(SHARED_WORKERS). + * workers/Worker.cpp: + Removed event listener code (now in base class). + (WebCore::Worker::Worker): Now derives from AbstractWorker. + (WebCore::Worker::notifyFinished): Calls dispatchLoadErrorEvent on base class. + * workers/Worker.h: + Removed APIs that now live in the base class. + * workers/Worker.idl: + Now derives from AbstractWorker. + Removed APIs that live in the base class, and added a GenerateToJS flag. + +2009-07-17 David Hyatt <hyatt@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=27379 + Absolutely-positioned elements with a scrollbar wrap prematurely. Make sure to include + the vertical scrollbar width for overflow:scroll elements. + + Added fast/css/positioned-overflow-scroll.html + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::calcPrefWidths): + * rendering/RenderFlexibleBox.cpp: + (WebCore::RenderFlexibleBox::calcPrefWidths): + +2009-07-17 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Dimitri Glazkov. + + Need a DOM_STORAGE guard in DerivedSroucesAllInOne.cpp + https://bugs.webkit.org/show_bug.cgi?id=27375 + + In https://bugs.webkit.org/show_bug.cgi?id=27360 I added Storage.cpp + and StorageEvent.cpp. Unfortunately, until later this afternoon, + DOM_STORAGE is not turned on by default in Chromium, and so these two + files are never generated. This breaks the compile. + + There are no other instances of guards in the file, which puzzles me... + but I think adding guards is the right way to go about this. + + * bindings/v8/DerivedSourcesAllInOne.cpp: Added the guard. + +2009-07-17 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=26496 + + Let WebCore always enforce the connection-per-host limit itself. + + * loader/loader.cpp: + (WebCore::Loader::Host::servePendingRequests): + +2009-07-17 Chris Marrin <cmarrin@apple.com> + + Reviewed by David Hyatt. + + Some transitions don't work correctly on Leopard + https://bugs.webkit.org/show_bug.cgi?id=27356 + + We only have code to do component animation using valueFunction. + So on Leopard we always need to do matrix animation in hardware. + This fix ensures that. + + This is currently not testable because it appears only in the + hardware animation and we can't yet do pixel tests while + hardware animating. + + * platform/graphics/mac/GraphicsLayerCA.mm: + (WebCore::GraphicsLayerCA::animateTransform): + +2009-07-17 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Gustavo Noronha. + + [GTK+] Crash in screenAvailable due a null Widget* + + JSDOMWindow::open called screenAvailableRect(0). The other + Screen methods can be called with a null widget as well, fix the + crashing test by checking for null. + + In screenRect and screenAvailableRect it is not tried to use + a default screen as the existing implementation didn't try either + in case of not having a toplevel widget. + + LayoutTests/fast/frames/crash-removed-iframe.html caused a crash. + + * platform/gtk/PlatformScreenGtk.cpp: + (WebCore::getVisual): New method to get a visual or return zero. + (WebCore::screenDepth): Use getVisual. + (WebCore::screenDepthPerComponent): Use getVisual. + (WebCore::screenIsMonochrome): Use screenDepth which will do the null checking + (WebCore::screenRect): Check for !widget. + (WebCore::screenAvailableRect): Check for !widget. + +2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix the include path for the Symbian port + https://bugs.webkit.org/show_bug.cgi?id=27358 + + * WebCore.pro: + +2009-07-17 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> + + Reviewed by Simon Hausmann. + + Make it possible to set the plugin directories from the DRT. + Part of https://bugs.webkit.org/show_bug.cgi?id=27215 + + * plugins/PluginDatabase.cpp: + (WebCore::PluginDatabase::installedPlugins): Now optionally takes + a populate argument, so we can avoid loading system plugins from the + DRT and thus avoid their strerr errors that can make tests fail. + (WebCore::PluginDatabase::clear): Make it possible to clear the + database. Called from setPluginDirectories. + * plugins/PluginDatabase.h: + (WebCore::PluginDatabase::setPluginDirectories): Make public + +2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + PluginViewMac: Stop the plugin when loading fails + + Also, prevent event propagation when in the stopped state + + * plugins/mac/PluginViewMac.cpp: + +2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + PluginViewMac: Allow query and set of drawing and event models + + We now support querying and setting of the drawing and event model, + but we still only support the CoreGraphics drawing model, and the + Carbon event model. + + If unsupported drawing or event models are detected we show the + missing-plugin icon. + + * plugins/PluginView.cpp: + * plugins/PluginView.h: + * plugins/mac/PluginViewMac.cpp: + +2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Initialize two PluginView members using memset + + m_npWindow is used on all platforms, not just for XP_UNIX, + so always initialize it. m_npCgContext on the other hand + is only used for XP_MACOSX. + + * plugins/PluginView.cpp: + +2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Add more debug logging in PluginView + + * plugins/PluginView.cpp: Add debug for setValue + * plugins/gtk/PluginViewGtk.cpp: Add debug for getValue + * plugins/mac/PluginViewMac.cpp: Add debug for getValue and more + * plugins/qt/PluginViewQt.cpp: Add debug for getValue + * plugins/win/PluginViewWin.cpp: Add debug for getValue + +2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Holger Freyther. + + Use same license in PluginDebug.cpp as in the original PluginDebug.h + + * plugins/PluginDebug.cpp: Use license from PluginDebug.h + +2009-07-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Add more debugging functionality for the WebCore NPAPI layer + + * GNUmakefile.am: Add PluginDebug.cpp + * WebCore.gypi: Add PluginDebug.cpp + * WebCore.pro: Add PluginDebug.cpp + * WebCore.vcproj/WebCore.vcproj: Add PluginDebug.cpp + * WebCoreSources.bkl: Add PluginDebug.cpp + * plugins/PluginDebug.h: Move errorStrings to PluginDebug.cpp + * plugins/PluginDebug.cpp: New file + +2009-07-17 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by David Levin. + + Fix Chromium build with DOM_STORAGE enabled. + https://bugs.webkit.org/show_bug.cgi?id=27360 + + 2 minor changes as noted below: + + * bindings/v8/DerivedSourcesAllInOne.cpp: Add the generated .cpp files. + * storage/StorageAreaImpl.cpp: #include "DOMWindow.h" + +2009-07-16 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by David Levin. + + Add --web-sockets flag and ENABLE_WEB_SOCKETS define. + https://bugs.webkit.org/show_bug.cgi?id=27206 + + Add ENABLE_WEB_SOCKETS + + * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS + * GNUmakefile.am: add ENABLE_WEB_SOCKETS + * WebCore.vcproj/WebCoreCommon.vsprops: add ENABLE_WEB_SOCKETS + * WebCore.vcproj/build-generated-files.sh: add ENABLE_WEB_SOCKETS + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Oliver Hunt. + + Added a third bunch of Haiku-specific files for WebCore. + https://bugs.webkit.org/show_bug.cgi?id=26952 + + Adding five files, EventLoopHaiku.cpp, FileChooserHaiku.cpp, + FileSystemHaiku.cpp, KeyboardCodes.h and MIMETypeRegistryHaiku.cpp + + * platform/haiku/EventLoopHaiku.cpp: Added. + (WebCore::EventLoop::cycle): + * platform/haiku/FileChooserHaiku.cpp: Added. + (WebCore::FileChooser::FileChooser): + (WebCore::FileChooser::basenameForWidth): + * platform/haiku/FileSystemHaiku.cpp: Added. + (WebCore::fileSystemRepresentation): + (WebCore::homeDirectoryPath): + (WebCore::openTemporaryFile): + (WebCore::closeFile): + (WebCore::writeToFile): + (WebCore::unloadModule): + (WebCore::listDirectory): + * platform/haiku/KeyboardCodes.h: Added. + * platform/haiku/MIMETypeRegistryHaiku.cpp: Added. + (WebCore::): + (WebCore::MIMETypeRegistry::getMIMETypeForExtension): + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Oliver Hunt. + + Added a second bunch of Haiku-specific files for WebCore. + https://bugs.webkit.org/show_bug.cgi?id=26952 + + Adding four files, ContextMenuHaiku.cpp, ContextMenuItemHaiku.cpp, + DragDataHaiku.cpp and DragImageHaiku.cpp + + * platform/haiku/ContextMenuHaiku.cpp: Added. + (WebCore::ContextMenuReceiver::ContextMenuReceiver): + (WebCore::ContextMenuReceiver::HandleMessage): + (WebCore::ContextMenuReceiver::Result): + (WebCore::ContextMenu::ContextMenu): + (WebCore::ContextMenu::~ContextMenu): + (WebCore::ContextMenu::appendItem): + (WebCore::ContextMenu::itemCount): + (WebCore::ContextMenu::insertItem): + (WebCore::ContextMenu::platformDescription): + (WebCore::ContextMenu::setPlatformDescription): + * platform/haiku/ContextMenuItemHaiku.cpp: Added. + (ContextMenuItem::ContextMenuItem): + (ContextMenuItem::~ContextMenuItem): + (ContextMenuItem::releasePlatformDescription): + (ContextMenuItem::type): + (ContextMenuItem::setType): + (ContextMenuItem::action): + (ContextMenuItem::setAction): + (ContextMenuItem::title): + (ContextMenuItem::setTitle): + (ContextMenuItem::platformSubMenu): + (ContextMenuItem::setSubMenu): + (ContextMenuItem::setChecked): + (ContextMenuItem::setEnabled): + (ContextMenuItem::enabled): + * platform/haiku/DragDataHaiku.cpp: Added. + (WebCore::DragData::canSmartReplace): + (WebCore::DragData::containsColor): + (WebCore::DragData::containsFiles): + (WebCore::DragData::asFilenames): + (WebCore::DragData::containsPlainText): + (WebCore::DragData::asPlainText): + (WebCore::DragData::asColor): + (WebCore::DragData::createClipboard): + (WebCore::DragData::containsCompatibleContent): + (WebCore::DragData::containsURL): + (WebCore::DragData::asURL): + (WebCore::DragData::asFragment): + * platform/haiku/DragImageHaiku.cpp: Added. + (WebCore::dragImageSize): + (WebCore::deleteDragImage): + (WebCore::scaleDragImage): + (WebCore::dissolveDragImageToFraction): + (WebCore::createDragImageFromImage): + (WebCore::createDragImageIconForCachedImage): + +2009-07-16 Stephen White <senorblanco@chromium.org> + + Reviewed by Darin Fisher and Brett Wilson. + + Refactor Skia implementation of gradients and patterns. + + http://bugs.webkit.org/show_bug.cgi?id=26618 + + The following layout tests were breaking on Chromium/Linux: + + LayoutTests/svg/custom/js-late-gradient-creation.svg (bad baseline PNG) + LayoutTests/svg/custom/js-late-gradient-and-object.creation.svg + LayoutTests/svg/custom/js-late-pattern-creation.svg (bad baseline PNG) + LayoutTests/svg/custom/js-late-pattern-and-object-creation.svg + + I could've fixed these the easy way, by copying the same 5 + lines of code we use everywhere we need patterns or gradients, but + I decided to fix it the hard way: by refactoring the code so that + PlatformContextSkia::setupPaintForFilling() and + PlatformContextSkia::setupPaintForStroking() do the right thing, + and also handle gradients and patterns. + + This required pushing the gradients and patterns set in + (generic) GraphicsContext::setFillPattern() and friends down into + PlatformContextSkia. For this, I followed the setPlatformXXX() + pattern used elsewhere in GraphicsContext, and stubbed them out on + the other platforms with #if !PLATFORM(SKIA). This also required + pushing changes to the gradientSpaceTransform from the Gradient into + GradientSkia. + + Since it's a Skia context, I decided to cache the values as + SkShaders. There were existing m_pattern and m_gradient SkShaders, + but they were unused, and whose use was ambiguous, so I + replaced them with one SkShader each for filling and stroking. + + * platform/graphics/Gradient.cpp: + (WebCore::Gradient::setGradientSpaceTransform): + (WebCore::Gradient::setPlatformGradientSpaceTransform): + * platform/graphics/Gradient.h: + * platform/graphics/GraphicsContext.cpp: + (WebCore::GraphicsContext::setStrokePattern): + (WebCore::GraphicsContext::setFillPattern): + (WebCore::GraphicsContext::setStrokeGradient): + (WebCore::GraphicsContext::setFillGradient): + (WebCore::GraphicsContext::setPlatformFillGradient): + (WebCore::GraphicsContext::setPlatformFillPattern): + (WebCore::GraphicsContext::setPlatformStrokeGradient): + (WebCore::GraphicsContext::setPlatformStrokePattern): + * platform/graphics/GraphicsContext.h: + * platform/graphics/skia/GradientSkia.cpp: + (WebCore::Gradient::setPlatformGradientSpaceTransform): + * platform/graphics/skia/GraphicsContextSkia.cpp: + (WebCore::GraphicsContext::fillPath): + (WebCore::GraphicsContext::fillRect): + (WebCore::GraphicsContext::setPlatformFillGradient): + (WebCore::GraphicsContext::setPlatformFillPattern): + (WebCore::GraphicsContext::setPlatformStrokeGradient): + (WebCore::GraphicsContext::setPlatformStrokePattern): + (WebCore::GraphicsContext::strokePath): + (WebCore::GraphicsContext::strokeRect): + * platform/graphics/skia/PlatformContextSkia.cpp: + (PlatformContextSkia::State::State): + (PlatformContextSkia::State::~State): + (PlatformContextSkia::drawRect): + (PlatformContextSkia::setupPaintCommon): + (PlatformContextSkia::setupPaintForFilling): + (PlatformContextSkia::setupPaintForStroking): + (PlatformContextSkia::setFillColor): + (PlatformContextSkia::setStrokeColor): + (PlatformContextSkia::setStrokeShader): + (PlatformContextSkia::setFillShader): + * platform/graphics/skia/PlatformContextSkia.h: + * platform/graphics/skia/SkiaFontWin.cpp: + (WebCore::skiaDrawText): + (WebCore::paintSkiaText): + * svg/graphics/SVGPaintServer.cpp: + (WebCore::SVGPaintServer::teardown): + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Oliver Hunt. + + Added Haiku-specific files for WebCore/platform/image-decoders/. + https://bugs.webkit.org/show_bug.cgi?id=26949 + + Adding a new file, ImageDecoderHaiku.cpp. + + * platform/image-decoders/haiku/ImageDecoderHaiku.cpp: Added. + (WebCore::RGBA32Buffer::RGBA32Buffer): + (WebCore::RGBA32Buffer::clear): + (WebCore::RGBA32Buffer::zeroFill): + (WebCore::RGBA32Buffer::copyBitmapData): + (WebCore::RGBA32Buffer::setSize): + (WebCore::RGBA32Buffer::asNewNativeImage): + (WebCore::RGBA32Buffer::hasAlpha): + (WebCore::RGBA32Buffer::setHasAlpha): + (WebCore::RGBA32Buffer::setStatus): + (WebCore::RGBA32Buffer::operator=): + (WebCore::RGBA32Buffer::width): + (WebCore::RGBA32Buffer::height): + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Eric Seidel. + + Added Haiku-specific files for WebCore/page/. + https://bugs.webkit.org/show_bug.cgi?id=26949 + + Adding three new files, DragControllerHaiku.cpp, EventHandlerHaiku.cpp + and FrameHaiku.cpp + + * page/haiku/DragControllerHaiku.cpp: Added. + (WebCore::DragController::isCopyKeyDown): + (WebCore::DragController::dragOperation): + (WebCore::DragController::maxDragImageSize): + (WebCore::DragController::cleanupAfterSystemDrag): + * page/haiku/EventHandlerHaiku.cpp: Added. + (WebCore::isKeyboardOptionTab): + (WebCore::EventHandler::invertSenseOfTabsToLinks): + (WebCore::EventHandler::tabsToAllControls): + (WebCore::EventHandler::focusDocumentView): + (WebCore::EventHandler::passWidgetMouseDownEventToWidget): + (WebCore::EventHandler::passMouseDownEventToWidget): + (WebCore::EventHandler::eventActivatedView): + (WebCore::EventHandler::passSubframeEventToSubframe): + (WebCore::EventHandler::passWheelEventToWidget): + (WebCore::EventHandler::createDraggingClipboard): + (WebCore::EventHandler::passMousePressEventToSubframe): + (WebCore::EventHandler::passMouseMoveEventToSubframe): + (WebCore::EventHandler::passMouseReleaseEventToSubframe): + (WebCore::EventHandler::accessKeyModifiers): + * page/haiku/FrameHaiku.cpp: Added. + (WebCore::Frame::dragImageForSelection): + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Eric Seidel. + + Added Haiku-specific files for WebCore/editing/. + https://bugs.webkit.org/show_bug.cgi?id=26949 + + Adding one new file, EditorHaiku.cpp + + * editing/haiku/EditorHaiku.cpp: Added. + (WebCore::Editor::newGeneralClipboard): + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Eric Seidel. + + Added Haiku-specific files for WebCore/bindings/js/. + https://bugs.webkit.org/show_bug.cgi?id=26949 + + Adding a new file, ScriptControllerHaiku.cpp + + * bindings/js/ScriptControllerHaiku.cpp: Added. + (WebCore::ScriptController::createScriptInstanceForWidget): + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Eric Seidel. + + Added Haiku-specific files for WebCore/platform/text/. + https://bugs.webkit.org/show_bug.cgi?id=26949 + + Adding two new files, StringHaiku.cpp + and TextBreakIteratorInternalICUHaiku.cpp + + * platform/text/haiku/StringHaiku.cpp: Added. + (WebCore::String::String): + (WebCore::String::operator BString): + * platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp: Added. + (WebCore::currentTextBreakLocaleID): + +2009-07-16 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Sends the basename of a selected file for non-multipart form submission. + <https://bugs.webkit.org/show_bug.cgi?id=26505> + + Test: fast/forms/get-file-upload.html + + * html/HTMLInputElement.cpp: + (WebCore::HTMLInputElement::appendFormData): + +2009-07-16 Adam Barth <abarth@webkit.org> + + Reviewed by David Levin. + + [V8] Centralize hidden property names + https://bugs.webkit.org/show_bug.cgi?id=27359 + + No behavior change. Just moving these names to a central location. + I'll move the rest of our hidden property names as I sweep though the + bindings. + + * WebCore.gypi: + * bindings/v8/V8HiddenPropertyName.cpp: Added. + (WebCore::V8HiddenPropertyName::objectPrototype): + (WebCore::V8HiddenPropertyName::isolatedWorld): + * bindings/v8/V8HiddenPropertyName.h: Added. + * bindings/v8/V8IsolatedWorld.cpp: + (WebCore::V8IsolatedWorld::V8IsolatedWorld): + (WebCore::V8IsolatedWorld::getEntered): + * bindings/v8/V8Proxy.cpp: + (WebCore::V8Proxy::getHiddenObjectPrototype): + (WebCore::V8Proxy::installHiddenObjectPrototype): + +2009-07-16 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + REGRESSION (r41238) Repainted portion of a scaled image does not line up with full image + https://bugs.webkit.org/show_bug.cgi?id=26747 + rdar://problem/7009243 + + Test: fast/repaint/background-misaligned.html + + * platform/graphics/Image.cpp: + (WebCore::Image::drawTiled): Moved a variable definition closer to where + it is used. + * platform/graphics/cg/ImageCG.cpp: + (WebCore::BitmapImage::draw): In the subimage code path, compute a + pixel-aligned source rect, because the subiamge is always pixel-aligned + in source space, and adjust the destination rect to preserve the + source -> destination mapping. Clip to the (original) destination rect + to prevent bleeding out. + +2009-07-16 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Adam Barth. + + Add a sessionStorageEnabled setting to the settings class. + https://bugs.webkit.org/show_bug.cgi?id=27318 + + Allow LocalStorage to be enabled without enabling SessionStorage at + runtime. There is a settings class setting for localStorage, but not + for sessionStorage. We want to be able to test one of these features + without necessarily enabling the other. + + SessionStorage defaults to true so as to not change behavior and + because there really aren't any security concerns around SessionStorage + (unlike LocalsStorage). The flag is needed in Chromium only because + we want to enable the compile time flag in the default build, but don't + want it on by default until it's been thoroughly tested. + + * page/DOMWindow.cpp: + (WebCore::DOMWindow::sessionStorage): Check the new flag + (WebCore::DOMWindow::localStorage): A bit of cleanup + * page/Settings.cpp: + (WebCore::Settings::Settings): Default the flag to true + (WebCore::Settings::setSessionStorageEnabled): Add the new flag + * page/Settings.h: + (WebCore::Settings::sessionStorageEnabled): Get the new flag + +2009-07-16 Adam Barth <abarth@webkit.org> + + Unreviewed. + + Revert 45987. Tests did not pass on Windows. + + * html/HTMLInputElement.cpp: + (WebCore::HTMLInputElement::appendFormData): + +2009-07-16 Drew Wilson <atwilson@google.com> + + Reviewed by David Levin. + + Added SHARED_WORKER flag to Windows build files, as well as associated .ccp/.h files. + Added missing V8 bindings to the AllInOne file + + https://bugs.webkit.org/show_bug.cgi?id=27321 + + * WebCore.vcproj/WebCore.vcproj: + Added missing files to build. + * bindings/v8/DerivedSourcesAllInOne.cpp: + Added missing V8 bindings (V8AbstractWorker.cpp and V8SharedWorker.cpp) + * DerivedSources.cpp + Added missing JS bindings (JSAbstractWorker.cpp and JSSharedWorker.cpp) + +2009-07-16 John Abd-El-Malek <jam@chromium.org> + + Reviewed by David Levin. + + Add a getter in MessagePortChannel for the PlatformMessagePortChannel. + + https://bugs.webkit.org/show_bug.cgi?id=27337 + + * dom/MessagePortChannel.h: + (WebCore::MessagePortChannel::channel): + +2009-07-16 Xiaomei Ji <xji@chromium.org> + + Reviewed by Darin Adler. + + Fix tooltip does not get its directionality from its element's directionality. + https://bugs.webkit.org/show_bug.cgi?id=24187 + + Per mitz's suggestion in comment #6, while getting the plain-text + title, we also get the directionality of the title. How to handle + the directionality is up to clients. Clients could ignore it, + or use attribute or unicode control characters to display the title + as what they want. + + WARNING: NO TEST CASES ADDED OR CHANGED + + * WebCore.base.exp: Replace 2 names due to signature change. + * loader/EmptyClients.h: + (WebCore::EmptyChromeClient::setToolTip): Add direction as 2nd parameter. + * page/Chrome.cpp: + (WebCore::Chrome::setToolTip): Calculate tooltip direction as well and pass it to client to take care when display tooltip. + * page/ChromeClient.h: Add direction as 2nd parameter to pure virtual function setToolTip(). + * page/chromium/ChromeClientChromium.h: + (WebCore::ChromeClientChromium::setToolTip): Add setToolTip() + temprarily to make chromium compile after pick up this webkit patch. + * rendering/HitTestResult.cpp: + (WebCore::HitTestResult::spellingToolTip): Besides getting the + spelling tooltip, get its directionality as well. + (WebCore::HitTestResult::title): Besides getting the title, + get its directionality as well. + * rendering/HitTestResult.h: Add 2 more methods. + +2009-07-16 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Oliver Hunt. + + [CAIRO] pattern of a canvas-element changes after modifications on canvas-element + https://bugs.webkit.org/show_bug.cgi?id=20578 + + Copy pixel image in ImageBuffer::image() just like CG and Skia glue. + + Test: fast/canvas/canvas-pattern-modify.html + + * platform/graphics/cairo/ImageBufferCairo.cpp: + (copySurface): + (WebCore::ImageBuffer::image): + +2009-07-16 David Hyatt <hyatt@apple.com> + + Reviewed by Beth Dakin. + + https://bugs.webkit.org/show_bug.cgi?id=27353 + Images mispositioned because of bug in percentage-based relative positioning. + + Added fast/css/nested-floating-relative-position-percentages.html + + * rendering/RenderBoxModelObject.cpp: + (WebCore::RenderBoxModelObject::relativePositionOffsetX): + +2009-07-16 Kent Tamura <tkent@chromium.org> + + Reviewed by Eric Seidel. + + Sends the basename of a selected file for non-multipart form submission. + <https://bugs.webkit.org/show_bug.cgi?id=26505> + + Test: fast/forms/get-file-upload.html + + * html/HTMLInputElement.cpp: + (WebCore::HTMLInputElement::appendFormData): + +2009-07-16 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Darin Adler. + + Video size sometimes jumps just after the video starts loading + https://bugs.webkit.org/show_bug.cgi?id=27352 + + Ensure that the media player is at or after the 'HaveMetadata' state so that + the instrinsic size is known before we create the layer for video. This avoids + a flash caused by computing the video rect using the default intrinsic size, and then + re-computing it when that size changes. + + * platform/graphics/mac/MediaPlayerPrivateQTKit.h: + * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: + (WebCore::MediaPlayerPrivate::isReadyForRendering): + (WebCore::MediaPlayerPrivate::updateStates): + (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering): + +2009-07-16 Brady Eidson <beidson@apple.com> + + Reviewed by Antti Koivisto. + Patch by Brady Eidson and Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=26496 + <rdar://problem/7065391> Microsoft Outlook Web Access fails because XHR stream connection blocks script loading/revalidation + + After refreshing a page and when all CachedResources on that page are in validation mode, they got an exemption + from the connection-per-host limit. Removing that exemption makes the test case load smoothly after reloads. + + * loader/loader.cpp: + (WebCore::Loader::Host::servePendingRequests): Remove the resourceIsCacheValidator exemption to the connection-per-host limit. + +2009-07-16 Adam Barth <abarth@webkit.org> + + Reviewed by Dimitri Glazkov. + + [V8] V8IsolatedWorld::evaluate needs to call didCreateIsolatedScriptContext + https://bugs.webkit.org/show_bug.cgi?id=27335 + + evaluateInNewContext makes this delegate call. evaluateInNewWorld + needs to make the same call. This does not appear to be testable with + our current technology. + + * bindings/v8/V8IsolatedWorld.cpp: + (WebCore::V8IsolatedWorld::evaluate): + +2009-07-15 Jakub Wieczorek <faw217@gmail.com> + + Reviewed by Simon Hausmann. + + Fix a typo: application/atom=xml -> application/atom+xml. + + * dom/ProcessingInstruction.cpp: + (WebCore::ProcessingInstruction::checkStyleSheet): + +2009-07-16 Dean McNamee <deanm@chromium.org> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=27292 + Improve handling of <canvas> path operations on an empty path. + Implement Skia's Path::hasCurrentPoint(). + + * html/CanvasRenderingContext2D.cpp: + (WebCore::CanvasRenderingContext2D::lineTo): + (WebCore::CanvasRenderingContext2D::quadraticCurveTo): + (WebCore::CanvasRenderingContext2D::bezierCurveTo): + * platform/graphics/skia/PathSkia.cpp: + (WebCore::Path::hasCurrentPoint): + +2009-07-15 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + Setting white-space and word-wrap via CSS in textarea doesn't override the wrap attribute + https://bugs.webkit.org/show_bug.cgi?id=26254 + + Make it so that setting white-space and word-wrap via CSS + overrides the wrap attribute. + + This involves having the shadow div in the textarea inherit + the CSS from its parent instead of hard-coding it in + RenderTextControlMultiline. + + Committer note: Earlier I reverted this change because I did it incorrectly + by leaving out css/html.css. In the patch, the filename was the old name + css/html4.css and that led to my error. + + * css/html.css: + * html/HTMLTextAreaElement.cpp: + (WebCore::HTMLTextAreaElement::parseMappedAttribute): + * rendering/RenderTextControlMultiLine.cpp: + (WebCore::RenderTextControlMultiLine::createInnerTextStyle): + +2009-07-15 James Hawkins <jhawkins@google.com> + + Reviewed by Adam Barth. + + [V8] Remove a local variable that is shadowing a function parameter. + https://bugs.webkit.org/show_bug.cgi?id=27309 + + No test required as this modification does not change the current behavior. + + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::instantiateV8Object): + +2009-07-15 Adam Langley <agl@google.com> + + No review: reverting previous change. + + Revert r45959: + + 2009-07-15 Dumitru Daniliuc <dumi@chromium.org> + Reviewed by Dimitri Glazkov. + + Adding the Win SQLite VFS implementation for Chromium. + + https://bugs.webkit.org/show_bug.cgi?id=26940 + + + The Chromium side of this patch was landed in 20839, but broke the build. It + was reverted in r20840. Thus, I'm reverting this side of the patch too. + + * WebCore.gypi: + * platform/chromium/ChromiumBridge.h: + * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Removed. + * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Removed. + +2009-07-15 David Levin <levin@chromium.org> + + Layout test fix, reverting previous change. + + Reverting r45962 as it caused several layout test failures. + + * html/HTMLTextAreaElement.cpp: + (WebCore::HTMLTextAreaElement::parseMappedAttribute): + * rendering/RenderTextControlMultiLine.cpp: + (WebCore::RenderTextControlMultiLine::createInnerTextStyle): + +2009-06-08 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Eric Seidel. + + Setting white-space and word-wrap via CSS in textarea doesn't override the wrap attribute + https://bugs.webkit.org/show_bug.cgi?id=26254 + + Make it so that setting white-space and word-wrap via CSS + overrides the wrap attribute. + + This involves having the shadow div in the textarea inherit + the CSS from its parent instead of hard-coding it in + RenderTextControlMultiline. + + * css/html4.css: + * html/HTMLTextAreaElement.cpp: + (WebCore::HTMLTextAreaElement::parseMappedAttribute): + * rendering/RenderTextControlMultiLine.cpp: + (WebCore::RenderTextControlMultiLine::createInnerTextStyle): + +2009-07-15 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Dimitri Glazkov. + + Adding the Win SQLite VFS implementation for Chromium. + + https://bugs.webkit.org/show_bug.cgi?id=26940 + + * platform/chromium/ChromiumBridge.h: + * platform/sql/chromium: Added. + * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Added. + * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Added. + +2009-07-15 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + Bug 25151 - workers that fail to load scripts not firing error event. + https://bugs.webkit.org/show_bug.cgi?id=25151 + + This fixes the problem that an error event is not fired when the worker + script fails to load. Some reasons this may occur are an invalid URL for + the worker script or a cross-origin redirect. + + We also moves the code to complete the URL and check its origin from + Worker constructor to WorkerScriptLoader loading functions in order to + move the exception throwing logic out of the scope of Worker constructor. + Due to this change, we also remove the output ExceptionCode parameter + in the worker constructor. Corresponding JS/V8 binding codes have been + updated to reflect this change. + + * bindings/js/JSWorkerConstructor.cpp: + (WebCore::constructWorker): + * bindings/v8/custom/V8WorkerCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * workers/Worker.cpp: + (WebCore::Worker::Worker): + (WebCore::Worker::notifyFinished): + * workers/Worker.h: + (WebCore::Worker::create): + * workers/WorkerContext.cpp: + (WebCore::WorkerContext::importScripts): + * workers/WorkerScriptLoader.cpp: + (WebCore::toCrossOriginRedirectPolicy): + (WebCore::WorkerScriptLoader::loadSynchronously): + (WebCore::WorkerScriptLoader::loadAsynchronously): + (WebCore::notifyLoadErrorTask): + (WebCore::WorkerScriptLoader::createResourceRequest): + (WebCore::WorkerScriptLoader::didFail): + (WebCore::WorkerScriptLoader::didFailRedirectCheck): + (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation): + (WebCore::WorkerScriptLoader::notifyError): + * workers/WorkerScriptLoader.h: + (WebCore::): + (WebCore::WorkerScriptLoader::url): + +2009-07-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + text-shadow is not drawn for text with transparent colour + https://bugs.webkit.org/show_bug.cgi?id=21374 + + Test: fast/text/shadow-translucent-fill.html + + * rendering/InlineTextBox.cpp: + (WebCore::paintTextWithShadows): If the text fill color is not opaque, + paint all shadows separately from the text, by casting them from + clipped-out opaque text. + +2009-07-15 Adam Treat <adam.treat@torchmobile.com> + + Fix the Qt build. + + * html/HTMLAreaElement.cpp: + +2009-07-15 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + Cleanup DOM Storage dependencies. + https://bugs.webkit.org/show_bug.cgi?id=27180 + + DOM Storage had several unnecessary (and probably unintended) + dependencies. This patch replaces many includes of header files with + forward declaration of classes, making some destructors explicit, and + taking some factories out of the header files. + + This will allow things like StorageAreaSync to take a StorageAreaImpl* + (as it should) rather than a StorageArea* which previously weren't + possible because the dependencies were such a tangled mess. + + * storage/LocalStorageTask.cpp: + (WebCore::LocalStorageTask::~LocalStorageTask): + * storage/LocalStorageTask.h: + * storage/Storage.cpp: + (WebCore::Storage::~Storage): + * storage/Storage.h: + * storage/StorageArea.cpp: + * storage/StorageArea.h: + * storage/StorageAreaImpl.cpp: + * storage/StorageAreaImpl.h: + * storage/StorageAreaSync.cpp: + (WebCore::StorageAreaSync::~StorageAreaSync): + * storage/StorageAreaSync.h: + * storage/StorageEvent.cpp: + (WebCore::StorageEvent::create): + (WebCore::StorageEvent::StorageEvent): + * storage/StorageEvent.h: + * storage/StorageNamespace.h: + * storage/StorageNamespaceImpl.cpp: + * storage/StorageNamespaceImpl.h: + * storage/StorageSyncManager.cpp: + (WebCore::StorageSyncManager::~StorageSyncManager): + * storage/StorageSyncManager.h: + +2009-07-15 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Incorrect animation when trying to duplicate effect of transform-origin + https://bugs.webkit.org/show_bug.cgi?id=27310 + + The bug is that matrix animation is being used when animating + a list of transform functions that match in the from and to states. + This sometimes works. But because of the way CA does matrix animation + function lists like the one shown in the testcase animate incorrectly. + + This fixes the bug by always doing component animation + as long as the function lists match. This allows CA + to animate the components and then recompose the result + into the correct matrix. + + Test: animations/transform-origin-vs-functions.html + + * platform/graphics/mac/GraphicsLayerCA.mm: + (WebCore::GraphicsLayerCA::animateTransform): + +2009-07-15 Albert J. Wong <ajwong@chromium.org> + + Reviewed by David Levin. + + Upstream the V8NPObject and NPV8Object build changes for WebCore.gypi. + + Add upstreamed V8 bindings files into WebCore.gypi so they can be seen + downstream + https://bugs.webkit.org/show_bug.cgi?id=27274 + + Changes the build file for chromium. Test built the chromium tree + to verify. + + * WebCore.gypi: + +2009-07-15 Mark Rowe <mrowe@apple.com> + + I like it when the code compiles. + + * WebCore.base.exp: + +2009-07-15 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Renamed parseURL to deprecatedParseURL. + + * bindings/js/JSAttrCustom.cpp: + (WebCore::JSAttr::setValue): Renamed. + * bindings/js/JSElementCustom.cpp: + (WebCore::allowSettingSrcToJavascriptURL): Renamed. + * bindings/js/JSHTMLFrameElementCustom.cpp: + (WebCore::allowSettingJavascriptURL): Renamed. + * bindings/js/JSHTMLIFrameElementCustom.cpp: + (WebCore::JSHTMLIFrameElement::setSrc): Renamed. + * bindings/objc/DOM.mm: + (-[DOMElement _getURLAttribute:]): Renamed. + * bindings/objc/DOMHTML.mm: + (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Renamed. + * bindings/v8/custom/V8CustomBinding.cpp: + (WebCore::allowSettingFrameSrcToJavascriptUrl): Renamed. + * css/CSSHelper.cpp: + (WebCore::deprecatedParseURL): Renamed. + * css/CSSHelper.h: Renamed and updated comment. + * html/HTMLAnchorElement.cpp: + (WebCore::HTMLAnchorElement::defaultEventHandler): Renamed. + (WebCore::HTMLAnchorElement::parseMappedAttribute): Renamed. + * html/HTMLBaseElement.cpp: + (WebCore::HTMLBaseElement::parseMappedAttribute): Renamed. + * html/HTMLBodyElement.cpp: + (WebCore::HTMLBodyElement::parseMappedAttribute): Renamed. + * html/HTMLEmbedElement.cpp: + (WebCore::HTMLEmbedElement::parseMappedAttribute): Renamed. + * html/HTMLFormElement.cpp: + (WebCore::HTMLFormElement::parseMappedAttribute): Renamed. + * html/HTMLFrameElementBase.cpp: + (WebCore::HTMLFrameElementBase::parseMappedAttribute): Renamed. + * html/HTMLImageElement.cpp: + (WebCore::HTMLImageElement::parseMappedAttribute): Renamed. + * html/HTMLImageLoader.cpp: + (WebCore::HTMLImageLoader::sourceURI): Renamed. + * html/HTMLLinkElement.cpp: + (WebCore::HTMLLinkElement::parseMappedAttribute): Renamed. + * html/HTMLObjectElement.cpp: + (WebCore::HTMLObjectElement::parseMappedAttribute): Renamed. + * html/HTMLTableElement.cpp: + (WebCore::HTMLTableElement::parseMappedAttribute): Renamed. + * html/HTMLTablePartElement.cpp: + (WebCore::HTMLTablePartElement::parseMappedAttribute): Renamed. + * html/HTMLTokenizer.cpp: + (WebCore::HTMLTokenizer::parseTag): Renamed. + * html/PreloadScanner.cpp: + (WebCore::PreloadScanner::processAttribute): Renamed. + (WebCore::PreloadScanner::emitCSSRule): Renamed. + * platform/chromium/ClipboardChromium.cpp: + (WebCore::ClipboardChromium::declareAndWriteDragImage): Renamed. + * platform/chromium/PasteboardChromium.cpp: + (WebCore::Pasteboard::writeImage): Renamed. + * platform/qt/ClipboardQt.cpp: + (WebCore::ClipboardQt::declareAndWriteDragImage): Renamed. + * platform/win/ClipboardWin.cpp: + (WebCore::ClipboardWin::declareAndWriteDragImage): Renamed. + * rendering/HitTestResult.cpp: + (WebCore::HitTestResult::absoluteImageURL): Renamed. + (WebCore::HitTestResult::absoluteMediaURL): Renamed. + (WebCore::HitTestResult::absoluteLinkURL): Renamed. + * svg/SVGAElement.cpp: + (WebCore::SVGAElement::defaultEventHandler): Renamed. + * svg/SVGImageLoader.cpp: + (WebCore::SVGImageLoader::sourceURI): Renamed. + * wml/WMLAElement.cpp: + (WebCore::WMLAElement::defaultEventHandler): Renamed. + * wml/WMLImageLoader.cpp: + (WebCore::WMLImageLoader::sourceURI): Renamed. + +2009-07-15 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + CSSHelper.h's parseURL is a function that no one should ever call + Part 1: Eliminate callers in the CSS parser. + https://bugs.webkit.org/show_bug.cgi?id=26599 + + Test: fast/css/uri-token-parsing.html + + * css/CSSHelper.h: Added a comment explaining why nobody should ever call this + function. A FIXME suggests a next step, which would be to rename it deprecatedParseURL. + + * css/CSSParser.cpp: + (WebCore::CSSParser::parseValue): Removed unneeded call to parseURL; + CSSParser::text already takes care of parsing the URI token syntax, and the + parseURL function does no good. + (WebCore::CSSParser::parseContent): Ditto. + (WebCore::CSSParser::parseFillImage): Ditto. + (WebCore::CSSParser::parseFontFaceSrc): Ditto. + (WebCore::CSSParser::parseBorderImage): Ditto. + (WebCore::isCSSWhitespace): Added. Helper function that makes the text function + easier to read. + (WebCore::CSSParser::text): Tweak logic so that leading and trailing whitespace + are both trimmed before removing the quote marks. Changed to use the + isCSSWhitespace, isASCIIHexDigit, and toASCIIHexValue functions for clarity. + + * css/CSSParser.h: Removed stray "public:" in this header. + + * platform/text/StringImpl.cpp: + (WebCore::StringImpl::substring): Optimized the case where the substring covers + the entire string, so we just share the StringImpl instead of making a new one. + This case came up in earlier versions of the CSS parser changes above. + (WebCore::StringImpl::substringCopy): Streamlined the logic here and made it + not call substring any more. Before, this was relying on the substring function + always making a copy of any non-empty substring. + +2009-07-15 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + After double-clicking a word, using Shift-arrow to select behaves unpredictably + https://bugs.webkit.org/show_bug.cgi?id=27177 + rdar://problem/7034324 + + Test: editing/selection/extend-selection-after-double-click.html + + The bug was due to the m_lastChangeWasHorizontalExtension flag, which was not + being cleared in many cases where it should have been. + + * editing/SelectionController.cpp: + (WebCore::SelectionController::setSelection): Set m_lastChangeWasHorizontalExtension + to false. This catches all sorts of cases that don't flow through the modify function. + Before, the flag would reflect the last call to the modify function, which was not + necessarily the last selection change. + (WebCore::SelectionController::willBeModified): Rearrange function for clarity. + Remove code that sets m_lastChangeWasHorizontalExtension; that is now handled elsewhere. + (WebCore::SelectionController::modify): Call setLastChangeWasHorizontalExtension after + setSelection when setting up a trial selection controller, since setSelection now + clears that flag. Also changed both trial selection controller cases to set the flag, + although it's not strictly necessary in both cases. Added code to set + m_lastChangeWasHorizontalExtension when extending the selection, which used to be + handled in willBeModified. Now we need to do it after the selection change. + +2009-07-15 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Dimitri Glazkov. + + Need to update DOM Storage files in GYPI file. + https://bugs.webkit.org/show_bug.cgi?id=27317 + + Need to update DOM Storage files in the GYPI file. They're pretty out + of date and we're on the path towards enabling them for everyone! + + * WebCore.gypi: + +2009-07-15 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=26794 + Make Yacc-generated parsers to use fastMalloc/fastFree. + + Define YYMALLOC and YYFREE to fastMalloc and fastFree + respectively. + + * css/CSSGrammar.y: + * xml/XPathGrammar.y: + +2009-07-15 David Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=27193 + Don't run in to anonymous blocks. No other browsers do this, and our implementation of run-in + is effectively broken as a result. + + No new tests. Changed fast/runin/001.html and fast/runin/generated.html to match new behavior. + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::handleRunInChild): + +2009-07-15 Yuzo Fujishima <yuzo@google.com> + + Reviewed by Darin Adler. + + Test: fast/js/instanceof-operator.html + + Fix for: Bug 25205 - XMLHttpRequest instance is not an instanceof XMLHttpRequest + https://bugs.webkit.org/show_bug.cgi?id=25205 + + In addition to for XMLHttpRequest, this also fixes for: + - Audio + - Image + - MessageChannel + - Option + - WebKitCSSMatrix + - WebKitPoint + - Worker + - XSLTProcessor + + * bindings/js/JSAudioConstructor.cpp: + (WebCore::JSAudioConstructor::JSAudioConstructor): + * bindings/js/JSAudioConstructor.h: + * bindings/js/JSDOMBinding.h: + (WebCore::DOMConstructorObject::createStructure): + (WebCore::DOMConstructorObject::DOMConstructorObject): + * bindings/js/JSImageConstructor.cpp: + (WebCore::JSImageConstructor::JSImageConstructor): + * bindings/js/JSImageConstructor.h: + * bindings/js/JSMessageChannelConstructor.cpp: + (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): + * bindings/js/JSMessageChannelConstructor.h: + * bindings/js/JSOptionConstructor.cpp: + (WebCore::JSOptionConstructor::JSOptionConstructor): + * bindings/js/JSOptionConstructor.h: + * bindings/js/JSWebKitCSSMatrixConstructor.cpp: + (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor): + * bindings/js/JSWebKitCSSMatrixConstructor.h: + * bindings/js/JSWebKitPointConstructor.cpp: + (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor): + * bindings/js/JSWebKitPointConstructor.h: + * bindings/js/JSWorkerConstructor.cpp: + (WebCore::JSWorkerConstructor::JSWorkerConstructor): + * bindings/js/JSWorkerConstructor.h: + * bindings/js/JSXMLHttpRequestConstructor.cpp: + (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): + * bindings/js/JSXMLHttpRequestConstructor.h: + * bindings/js/JSXSLTProcessorConstructor.cpp: + (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor): + * bindings/js/JSXSLTProcessorConstructor.h: + +2009-07-15 Kai Br�ning <kai@granus.net> + + Reviewed by Dave Hyatt. + + CSS21 attribute selectors not dynamic for xml. + https://bugs.webkit.org/show_bug.cgi?id=25072 + + Moved the relevant test in StyledElement::attributeChanged() + to a new function Element::recalcStyleIfNeededAfterAttributeChanged() + so it can be called from both StyledElement::attributeChanged() + and Element::attributeChanged(). + Refactored Element::attributeChanged() into + Element::updateAfterAttributeChanged() and + Element::recalcStyleIfNeededAfterAttributeChanged(), which are called + separately from StyledElement::attributeChanged(). + + Test: fast/css/attribute-selector-dynamic.xml + + * dom/Element.cpp: + (WebCore::Element::attributeChanged): + (WebCore::Element::updateAfterAttributeChanged): + (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged): + * dom/Element.h: + * dom/StyledElement.cpp: + (WebCore::StyledElement::attributeChanged): + +2009-07-15 Alpha Lam <hclam@chromium.org> + + Reviewed by David Levin. + + [V8] Layout test failures for drawImage in Canvas + https://bugs.webkit.org/show_bug.cgi?id=27311 + + Fixing several canvas layout tests failures due to a + missing return statement in CanvasRenderingContext2DDrawImage() which + was accidentally removed in r45929. + + * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: + +2009-07-15 Robert Hogan <robert@roberthogan.net> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=26969 + + If the httpMethod() of the request passed to SubresourceLoader::create is not + supported by the client we must expect to call didFail() while m_loader is still null. + + * loader/DocumentThreadableLoader.cpp: + (DocumentThreadableLoader::didFail):Changed. + +2009-07-15 Mark Rowe <mrowe@apple.com> + + Fix the Mac build. + + * WebCore.base.exp: + * css/MediaQueryEvaluator.cpp: + * rendering/SVGRenderTreeAsText.cpp: + * rendering/style/SVGRenderStyle.cpp: + * svg/graphics/SVGPaintServer.cpp: + +2009-07-07 Alpha Lam <hclam@chromium.org> + + Reviewed by Dimitri Glazkov. + + [V8] drawImage method of HTMLCanvasElement to accept HTMLVideoElement as argument + https://bugs.webkit.org/show_bug.cgi?id=27170 + + Changed CanvasRenderingContext2DDrawImage() to accept HTMLVideoElement + as a parameter of drawImage() for HTMLCanvasElement. + + * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: + +2009-07-15 Adam Barth <abarth@webkit.org> + + Reviewed by Dimitri Glazkov. + + [V8] Fix isolated world constructors + https://bugs.webkit.org/show_bug.cgi?id=27287 + + Don't enter V8Proxy::m_context before creating DOM constructors. + Instead, use getWrapperContext to get the right context. + + After this patch, all my tests pass. I'll enable the feature + downstream and land the tests. + + * bindings/scripts/CodeGeneratorV8.pm: + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::getConstructor): + (WebCore::V8DOMWrapper::lookupDOMWrapper): + * bindings/v8/V8DOMWrapper.h: + * bindings/v8/V8IsolatedWorld.cpp: + (WebCore::V8IsolatedWorld::evaluate): + * bindings/v8/V8Proxy.cpp: + (WebCore::V8Proxy::createWrapperFromCache): + (WebCore::V8Proxy::isContextInitialized): + (WebCore::V8Proxy::disposeContextHandles): + (WebCore::V8Proxy::installDOMWindow): + (WebCore::V8Proxy::initContextIfNeeded): + (WebCore::V8Proxy::getHiddenObjectPrototype): + (WebCore::V8Proxy::installHiddenObjectPrototype): + * bindings/v8/V8Proxy.h: + +2009-07-15 Antonio Gomes <antonio.gomes@openbossa.org> + + Reviewed by Darin Adler. + + useless null-check statement in visible_units.cpp@logicalStartOfLine + https://bugs.webkit.org/show_bug.cgi?id=27154 + + Simple fix. + + * editing/visible_units.cpp: + (WebCore::logicalStartOfLine): Doubled honorEditableBoundaryAtOrAfter() call removed. + +2009-07-15 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=27304 + WebKit should provide usage and eligibility information about the page cache. + + * WebCore.base.exp: + + * history/CachedFrame.cpp: + (WebCore::CachedFrame::childFrameCount): + * history/CachedFrame.h: + + * history/PageCache.cpp: + (WebCore::PageCache::frameCount): + (WebCore::PageCache::autoreleasedPageCount): + * history/PageCache.h: + (WebCore::PageCache::pageCount): + +2009-07-15 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by David Levin. + + Chromium's canvas forgets its context after fillText again + https://bugs.webkit.org/show_bug.cgi?id=27293 + + No new tests because the test for this was already added in + https://bugs.webkit.org/show_bug.cgi?id=26436 + + * platform/graphics/chromium/TransparencyWin.cpp: + (WebCore::TransparencyWin::compositeTextComposite): + +2009-07-14 David Hyatt <hyatt@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=27283 + + Implement the new 'rem' unit from CSS3. + + Added some rem-* tests in fast/css. + + * css/CSSGrammar.y: + * css/CSSParser.cpp: + (WebCore::CSSParser::validUnit): + (WebCore::unitFromString): + (WebCore::CSSParser::parseValue): + (WebCore::CSSParser::lex): + * css/CSSParserValues.cpp: + (WebCore::CSSParserValue::createCSSValue): + * css/CSSPrimitiveValue.cpp: + (WebCore::CSSPrimitiveValue::computeLengthInt): + (WebCore::CSSPrimitiveValue::computeLengthIntForLength): + (WebCore::CSSPrimitiveValue::computeLengthShort): + (WebCore::CSSPrimitiveValue::computeLengthFloat): + (WebCore::CSSPrimitiveValue::computeLengthDouble): + (WebCore::CSSPrimitiveValue::cssText): + (WebCore::CSSPrimitiveValue::parserValue): + * css/CSSPrimitiveValue.h: + (WebCore::CSSPrimitiveValue::): + (WebCore::CSSPrimitiveValue::isUnitTypeLength): + * css/CSSStyleSelector.cpp: + (WebCore::CSSStyleSelector::initForStyleResolve): + (WebCore::convertToLength): + (WebCore::CSSStyleSelector::applyProperty): + (WebCore::CSSStyleSelector::mapFillSize): + (WebCore::CSSStyleSelector::mapFillXPosition): + (WebCore::CSSStyleSelector::mapFillYPosition): + (WebCore::CSSStyleSelector::createTransformOperations): + * css/CSSStyleSelector.h: + * css/MediaQueryEvaluator.cpp: + (WebCore::device_heightMediaFeatureEval): + (WebCore::device_widthMediaFeatureEval): + (WebCore::heightMediaFeatureEval): + (WebCore::widthMediaFeatureEval): + * css/WebKitCSSMatrix.cpp: + (WebCore::WebKitCSSMatrix::setMatrixValue): + * css/tokenizer.flex: + * dom/Document.cpp: + (WebCore::Document::Document): + * dom/Document.h: + (WebCore::Document::usesRemUnits): + (WebCore::Document::setUsesRemUnits): + * dom/Element.cpp: + (WebCore::Element::recalcStyle): + * rendering/SVGRenderTreeAsText.cpp: + (WebCore::writeStyle): + * rendering/style/SVGRenderStyle.cpp: + (WebCore::SVGRenderStyle::cssPrimitiveToLength): + * svg/graphics/SVGPaintServer.cpp: + (WebCore::applyStrokeStyleToContext): + (WebCore::dashArrayFromRenderingStyle): + * svg/graphics/SVGPaintServer.h: + +2009-07-15 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, build fix. + + Remove extraneous qualifier, accidentally added in http://trac.webkit.org/changeset/45884. + + * bindings/v8/V8DOMWrapper.h: Removed extraneous qualifier. + +2009-07-15 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Fisher. + + [V8] Update bindings for ValiditeState patch. + https://bugs.webkit.org/show_bug.cgi?id=19562 + + * bindings/v8/DOMObjectsInclude.h: + * bindings/v8/DerivedSourcesAllInOne.cpp: + * bindings/v8/V8Index.cpp: + * bindings/v8/V8Index.h: + +2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Cleanup - Remove obsolete code from the make system + https://bugs.webkit.org/show_bug.cgi?id=27299 + + * WebCore.pro: + +2009-07-15 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Ariya Hidayat. + + Fix the build without media elements. + + * rendering/HitTestResult.cpp: + (WebCore::HitTestResult::absoluteMediaURL): Add #if ENABLE(VIDEO) + markers around the body of the method. + +2009-07-14 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + WebInspector: Move storeLastActivePanel out of the + ifdef ENABLE_JAVASCRIPT_DEBUGGER section in IDL; + Add default panel for the first opening of the + WebInspector. + + https://bugs.webkit.org/show_bug.cgi?id=27263 + + * inspector/InspectorController.cpp: + (InspectorController::setWindowVisible): + * inspector/InspectorController.idl: + +2009-07-14 Darin Adler <darin@apple.com> + + Try to fix Windows build. + + * bindings/scripts/CodeGeneratorCOM.pm: Add Reflect and ReflectURL support. + +2009-07-14 Pierre d'Herbemont <pdherbemont@apple.com> + + Reviewed by Oliver Hunt. + + HTMLMediaElement::supportsFullscreen() should return false + https://bugs.webkit.org/show_bug.cgi?id=27284 + + (Reverting a part of 45875) + + HTMLVideoElement::supportsFullscreen() will properly do the + job, and check if the backend supports fullscreen. + + HTMLVideoElement is the only subclass to support fullscreen + (conditionnaly). HTMLAudioElement fullscreen is not supported + and is a different kind of fullscreen, if it comes to be wanted. + + No test can be done currently given that none of the media + backends support fullscreen. + + * html/HTMLMediaElement.cpp: + * html/HTMLMediaElement.h: + (WebCore::HTMLMediaElement::supportsFullscreen): + +2009-07-14 Darin Adler <darin@apple.com> + + Reviewed by Dimitri Glazkov. + + Next step in making DOM attribute getter/setters consistently use AtomicString + https://bugs.webkit.org/show_bug.cgi?id=25425 + + This covers eight DOM classes, and for each one of the classes: + + - Changes the IDL to use the Reflect syntax for all simple cases. + - Removes unused functions in the classes, mainly newly unused ones that were + used for reflection before. + - Removes unneeded explicitly defined destructors. + - Explicitly declares destructors as virtual. + - Removes unneeded includes. + - Makes members protected or private rather than public where possible. + - Renames "doc" to "document". + - Tweaks formatting to match our latest style in a few places. + - Improves some FIXME comments. + + Over time we'll want to do this for all HTML DOM classes. + + * html/HTMLAnchorElement.cpp: + (WebCore::HTMLAnchorElement::HTMLAnchorElement): + * html/HTMLAnchorElement.h: + (WebCore::HTMLAnchorElement::endTagRequirement): + (WebCore::HTMLAnchorElement::tagPriority): + * html/HTMLAnchorElement.idl: + * html/HTMLAppletElement.cpp: + * html/HTMLAppletElement.h: + * html/HTMLAppletElement.idl: + * html/HTMLAreaElement.cpp: + (WebCore::HTMLAreaElement::parseMappedAttribute): + * html/HTMLAreaElement.h: + (WebCore::HTMLAreaElement::endTagRequirement): + (WebCore::HTMLAreaElement::tagPriority): + * html/HTMLAreaElement.idl: + * html/HTMLBRElement.cpp: + (WebCore::HTMLBRElement::parseMappedAttribute): + * html/HTMLBRElement.h: + * html/HTMLBRElement.idl: + * html/HTMLBaseElement.cpp: + (WebCore::HTMLBaseElement::HTMLBaseElement): + (WebCore::HTMLBaseElement::removedFromDocument): + (WebCore::HTMLBaseElement::process): + * html/HTMLBaseElement.h: + * html/HTMLBaseElement.idl: + * html/HTMLBaseFontElement.cpp: + (WebCore::HTMLBaseFontElement::HTMLBaseFontElement): + * html/HTMLBaseFontElement.h: + (WebCore::HTMLBaseFontElement::endTagRequirement): + (WebCore::HTMLBaseFontElement::tagPriority): + * html/HTMLBaseFontElement.idl: + * html/HTMLBlockquoteElement.cpp: + (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement): + * html/HTMLBlockquoteElement.h: + (WebCore::HTMLBlockquoteElement::tagPriority): + * html/HTMLBlockquoteElement.idl: + * html/HTMLBodyElement.cpp: + (WebCore::HTMLBodyElement::HTMLBodyElement): + (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): + * html/HTMLBodyElement.h: + (WebCore::HTMLBodyElement::endTagRequirement): + (WebCore::HTMLBodyElement::tagPriority): + * html/HTMLBodyElement.idl: + Made changes as described above. + + * loader/FrameLoader.cpp: Removed unneeded include of HTMLAnchorElement.h. + +2009-07-14 Steve Falkenburg <sfalken@apple.com> + + Reorganize JavaScriptCore headers into: + API: include/JavaScriptCore/ + Private: include/private/JavaScriptCore/ + + Reviewed by Darin Adler. + + * WebCore.vcproj/QTMovieWin.vcproj: + * WebCore.vcproj/WebCoreCommon.vsprops: + * WebCore.vcproj/build-generated-files.sh: + +2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Change all Noncopyable inheriting visibility to public. + https://bugs.webkit.org/show_bug.cgi?id=27225 + + Change all Noncopyable inheriting visibility to public because + it is needed to the custom allocation framework (bug #20422). + + * bindings/js/GCController.h: + * bindings/js/WorkerScriptController.h: + * bindings/v8/V8DOMMap.cpp: + (WebCore::): + * bridge/runtime.h: + * css/CSSSelector.h: + * css/CSSSelectorList.h: + * css/CSSStyleSelector.h: + * dom/ClassNames.h: + * dom/MessagePortChannel.h: + * dom/XMLTokenizerLibxml2.cpp: + * dom/XMLTokenizerScope.h: + * editing/ReplaceSelectionCommand.cpp: + * editing/SelectionController.h: + * editing/TextIterator.cpp: + * history/PageCache.h: + * html/CanvasRenderingContext2D.h: + * html/HTMLParser.h: + * html/HTMLParserQuirks.h: + * html/PreloadScanner.h: + * loader/Cache.h: + * loader/CrossOriginPreflightResultCache.h: + * loader/FrameLoader.h: + * loader/ProgressTracker.h: + * loader/ThreadableLoader.h: + * loader/appcache/ApplicationCacheGroup.h: + * loader/archive/ArchiveResourceCollection.h: + * loader/icon/IconDatabase.h: + * loader/icon/IconLoader.h: + * loader/icon/PageURLRecord.h: + * loader/loader.h: + * page/ContextMenuController.h: + * page/EventHandler.h: + * page/FrameTree.h: + * page/Page.h: + * page/PageGroup.h: + * page/PageGroupLoadDeferrer.h: + * page/mac/EventHandlerMac.mm: + * platform/AutodrainedPool.h: + * platform/ContextMenu.h: + * platform/EventLoop.h: + * platform/HostWindow.h: + * platform/Pasteboard.h: + * platform/PurgeableBuffer.h: + * platform/RunLoopTimer.h: + * platform/ThreadGlobalData.h: + * platform/ThreadTimers.h: + * platform/Timer.h: + * platform/TreeShared.h: + * platform/graphics/FontData.h: + * platform/graphics/GlyphWidthMap.h: + * platform/graphics/GraphicsContext.h: + * platform/graphics/ImageBuffer.h: + * platform/graphics/ImageSource.h: + * platform/graphics/MediaPlayer.h: + * platform/graphics/skia/GraphicsContextPlatformPrivate.h: + * platform/graphics/skia/PlatformContextSkia.h: + * platform/graphics/win/QTMovieWin.cpp: + * platform/mac/LocalCurrentGraphicsContext.h: + * platform/network/FormDataBuilder.h: + * platform/network/ResourceHandleInternal.h: + * platform/network/soup/ResourceHandleSoup.cpp: + * platform/text/StringBuffer.h: + * platform/text/TextCodec.h: + * platform/win/WindowMessageBroadcaster.h: + * rendering/CounterNode.h: + * rendering/LayoutState.h: + * rendering/RenderFrameSet.h: + * rendering/RenderView.h: + * rendering/TransformState.h: + * svg/SVGAnimatedProperty.h: + * svg/SynchronizableTypeWrapper.h: + * workers/WorkerMessagingProxy.h: + * workers/WorkerRunLoop.cpp: + * xml/XPathExpressionNode.h: + * xml/XPathParser.h: + * xml/XPathPredicate.h: + * xml/XPathStep.h: + +2009-07-14 Darin Fisher <darin@chromium.org> + + Reviewed by Darin Adler. + + Fails to save document state when navigating away from a page with a + reference fragment. + https://bugs.webkit.org/show_bug.cgi?id=27281 + + Test: fast/history/saves-state-after-fragment-nav.html + + * history/HistoryItem.cpp: + (WebCore::HistoryItem::isCurrentDocument): Use equalIgnoringRef + to compare URLs. + +2009-07-14 Joseph Pecoraro <joepeck02@gmail.com> + + Reviewed by Sam Weinig. + + Inspector: Remove Unintended Global Variables + https://bugs.webkit.org/show_bug.cgi?id=27203 + + * inspector/front-end/Console.js: + (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): + * inspector/front-end/DatabasesPanel.js: + (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage): + * inspector/front-end/ObjectPropertiesSection.js: + (WebInspector.ObjectPropertyTreeElement.prototype.update): + * inspector/front-end/inspector.js: + (WebInspector.animateStyle): + +2009-07-14 Michelangelo De Simone <micdesim@gmail.com> + + Reviewed by Adele Peterson. + + https://bugs.webkit.org/show_bug.cgi?id=19562 + Added build stuff and stub for the ValidityState class, part of HTML5 + section Forms: + http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate + + Test: fast/forms/ValidityState-001.html + + * DerivedSources.cpp: Inclusion of ValidityState files + * DerivedSources.make: ditto + * GNUmakefile.am: ditto + * WebCore.gypi: ditto + * WebCore.pro: ditto + * WebCore.vcproj/WebCore.vcproj: ditto + * WebCore.xcodeproj/project.pbxproj: ditto + * WebCoreSources.bkl: ditto + * html/HTMLButtonElement.idl: validity attribute + * html/HTMLFieldSetElement.idl: ditto + * html/HTMLFormControlElement.cpp: + (WebCore::HTMLFormControlElement::validity): ValidityState getter + * html/HTMLFormControlElement.h: ditto + * html/HTMLInputElement.idl: validity attribute + * html/HTMLSelectElement.idl: ditto + * html/HTMLTextAreaElement.idl: ditto + * html/ValidityState.cpp: Added. + (WebCore::ValidityState::ValidityState): + (WebCore::ValidityState::valid): validation flag + * html/ValidityState.h: Added. + (WebCore::ValidityState::create): validation flag + (WebCore::ValidityState::control): ditto + (WebCore::ValidityState::valueMissing): ditto + (WebCore::ValidityState::typeMismatch): ditto + (WebCore::ValidityState::patternMismatch): ditto + (WebCore::ValidityState::tooLong): ditto + (WebCore::ValidityState::rangeUnderflow): ditto + (WebCore::ValidityState::rangeOverflow): ditto + (WebCore::ValidityState::stepMismatch): ditto + (WebCore::ValidityState::customError): ditto + * html/ValidityState.idl: Added. + +2009-07-14 Ryosuke Niwa <rniwa@google.com> + + Reviewed by Eric Seidel. + + Outdenting a line inside a blockquote tag does nothing + https://bugs.webkit.org/show_bug.cgi?id=25316 + + The bug was caused by the code checking whether the blockquote is created by WebKit or not. + We simply remove this code to be consistent with Firefox and Internet Explorer. + Also, enclosingBlockFlow == enclosingNode in outdentParagraph isn't a sufficient condition to insert + the placeholder before the enclosingNode because there could be contents before the current paragraph. + Instead, we should split the enclosingNode (which is a blockquote) at the starting position of outdentation. + It turned out that this solves the bug 25315 also: https://bugs.webkit.org/show_bug.cgi?id=25315 + + Test: editing/execCommand/outdent-regular-blockquote.html + + * editing/IndentOutdentCommand.cpp: + (WebCore::isIndentBlockquote): no longer checks whether a blockquote is created by WebKit or not. + (WebCore::IndentOutdentCommand::outdentParagraph): takes care of the case enclosingBlockFlow == enclosingNode + +2009-07-14 Adam Barth <abarth@webkit.org> + + Reviewed by Dimitri Glazkov. + + [V8] Fix isolated world wrappers for Node prototypes + https://bugs.webkit.org/show_bug.cgi?id=27277 + + This change does two things: + + 1) We bypass the wrapper cache in the isolated world. This is because + the wrapper template cache has prototypes that lead to the main + world. We can add a template cache for the isolated world if + performance warrants. + + 2) We introduce a smarter way to grab the wrapper context for a frame + that is aware that proxy <-> context do not stand in one-to-one + correspondence. This generalizes our solution for the node wrapper + case to prototypes. + + The net result is that Node wrappers get the right prototypes. As + before, tests to follow. + + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::setHiddenWindowReference): + (WebCore::V8DOMWrapper::instantiateV8Object): + (WebCore::V8DOMWrapper::convertNodeToV8Object): + (WebCore::V8DOMWrapper::convertWindowToV8Object): + (WebCore::V8DOMWrapper::getWrapperContext): + * bindings/v8/V8DOMWrapper.h: + +2009-07-14 Adam Barth <abarth@webkit.org> + + Reviewed by Dimitri Glazkov. + + [V8] Fix isolated world wrappers for Nodes + https://bugs.webkit.org/show_bug.cgi?id=27271 + + Previously, we keepy a pointer to the DOMMap on V8Proxy, but this + caused us to miss the branch in V8DOMMap.cpp for isolated worlds. + + I have tests, but I can't land them until I get this feature under + control. + + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::convertNodeToV8Object): + * bindings/v8/V8Proxy.h: + (WebCore::V8Proxy::V8Proxy): + +2009-07-14 Adam Barth <abarth@webkit.org> + + Reviewed by Dimitri Glazkov. + + [V8] Fix isolated world crash on getting window.location + https://bugs.webkit.org/show_bug.cgi?id=27268 + + I have a test for this locally, but it requires a compile-time hack to + run. Once I get the feature's stability under control, we can turn the + feature on and add the tests. + + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::setHiddenWindowReference): + * bindings/v8/V8IsolatedWorld.h: + (WebCore::V8IsolatedWorld::context): + +2009-07-14 Brent Fulgham <bfulgham@webkit.org> + + Correct failing tests after r45875. The original patch did not + test the m_player member for null, causing crashes. This will + happen fairly frequently in real use. Was this original patch + ever tested? + https://bugs.webkit.org/show_bug.cgi?id=27246 + + Test via existing media tests. + + * html/HTMLMediaElement.cpp: + (WebCore::HTMLMediaElement::supportsFullscreen): Check for null pointer. + (WebCore::HTMLMediaElement::supportsSave): Check for null pointer. + +2009-07-14 Avi Drissman <avi@chromium.org> + + Reviewed by Darin Fisher. + + Explicitly mark the HTML generated for the Mac as being UTF-8 encoded. + The Windows clipboard format is explicitly documented as being UTF-8, + and all Linux apps assume UTF-8. On the Mac, though, unless otherwise + indicated, Windows-1252 is assumed, which is wrong. + + Bug: https://bugs.webkit.org/show_bug.cgi?id=27262 + + No new tests. + + * platform/chromium/ClipboardChromium.cpp: + (WebCore::ClipboardChromium::writeRange): + * platform/chromium/PasteboardChromium.cpp: + (WebCore::Pasteboard::writeSelection): + +2009-07-14 Albert J. Wong <ajwong@chromium.org> + + Reviewed by Dimitri Glazkov. + + Upstream V8NPObject.h and V8NPObject.cpp. + https://bugs.webkit.org/show_bug.cgi?id=27103 + + This just upstreams the files from the chromium code base. Only + minor changes to formatting and similar were done, so no testing + is required because nothing really changed. Code verified to compile. + + * bindings/v8/ScriptController.cpp: + (WebCore::ScriptController::bindToWindowObject): + (WebCore::ScriptController::createScriptInstanceForWidget): + * bindings/v8/V8NPObject.cpp: Added. + (npObjectInvokeImpl): + (npObjectMethodHandler): + (npObjectInvokeDefaultHandler): + (weakTemplateCallback): + (npObjectGetProperty): + (npObjectNamedPropertyGetter): + (npObjectIndexedPropertyGetter): + (npObjectGetNamedProperty): + (npObjectGetIndexedProperty): + (npObjectSetProperty): + (npObjectNamedPropertySetter): + (npObjectIndexedPropertySetter): + (npObjectSetNamedProperty): + (npObjectSetIndexedProperty): + (weakNPObjectCallback): + (createV8ObjectForNPObject): + (forgetV8ObjectForNPObject): + * bindings/v8/V8NPObject.h: Added. + * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp: + (WebCore::NAMED_PROPERTY_GETTER): + (WebCore::NAMED_PROPERTY_SETTER): + (WebCore::CALLBACK_FUNC_DECL): + (WebCore::INDEXED_PROPERTY_GETTER): + (WebCore::INDEXED_PROPERTY_SETTER): + + +2009-07-14 Albert J. Wong <ajwong@chromium.org> + + Reviewed by Darin Adler. + + Add HTMLMediaElement::supportSave() and a + HitTestResult::absoluteMediaURL() functions + https://bugs.webkit.org/show_bug.cgi?id=27246 + + Added an implementation of supportsSave() into HTMLMediaElement + that delegates to MediaPlayerPrivateImpl so that the media engine + is able to signal whether or not a media source supports saving. + + Also added a function to HitTestResult that allows for retrieval + of the currentSrc associated with the "hit" media element. + + These functions are just pipeing with no visible UI change so there + are no related layout test changes. + + * html/HTMLMediaElement.cpp: + (WebCore::HTMLMediaElement::supportsFullscreen): + (WebCore::HTMLMediaElement::supportsSave): + * html/HTMLMediaElement.h: + * platform/graphics/MediaPlayer.cpp: + (WebCore::MediaPlayer::supportsSave): + * platform/graphics/MediaPlayer.h: + * platform/graphics/MediaPlayerPrivate.h: + (WebCore::MediaPlayerPrivateInterface::supportsFullscreen): + (WebCore::MediaPlayerPrivateInterface::supportsSave): + * rendering/HitTestResult.cpp: + (WebCore::HitTestResult::altDisplayString): + (WebCore::HitTestResult::absoluteMediaURL): + * rendering/HitTestResult.h: + +2009-07-14 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Adam Barth. + + [V8] Implement Reflect and ReflectURL attribute support. + https://bugs.webkit.org/show_bug.cgi?id=27273 + + * bindings/scripts/CodeGeneratorV8.pm: Added support for Reflect and ReflectURL attributes. + +2009-07-14 Dmitry Titov <dimich@chromium.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=27266 + Add hasCurrentPoint() to WebCore::Path. + This fixes Skia-based Chromium regression caused by the fix for + https://bugs.webkit.org/show_bug.cgi?id=27187. + For Skia, the new method always returns 'true', pending actual implementation. + This means Chromium still will differ from Gecko behavior, but at least its Canvas + will not be completely broken. + + Existing Canvas Layout Tests should pass in Chromium after this change. + + * html/CanvasRenderingContext2D.cpp: + (WebCore::CanvasRenderingContext2D::lineTo): insteand of Path::isEmpty() test for hasCurrentPoint(). + (WebCore::CanvasRenderingContext2D::quadraticCurveTo): ditto. + (WebCore::CanvasRenderingContext2D::bezierCurveTo): ditto. + + * platform/graphics/Path.h: + * platform/graphics/cairo/PathCairo.cpp: + (WebCore::Path::hasCurrentPoint): + * platform/graphics/cg/PathCG.cpp: + (WebCore::Path::isEmpty): + (WebCore::Path::hasCurrentPoint): + * platform/graphics/qt/PathQt.cpp: + (WebCore::Path::hasCurrentPoint): + * platform/graphics/skia/PathSkia.cpp: + (WebCore::Path::hasCurrentPoint): + * platform/graphics/wx/PathWx.cpp: + (WebCore::Path::hasCurrentPoint): + All these files add a Path::hasCurrentPoint() for various platforms. + +2009-07-14 Nate Chapin <japhet@chromium.org> + + Reviewed by Sam Weinig. + + Upstream RGBColor from src.chromium.org. + + https://bugs.webkit.org/show_bug.cgi?id=27133 + + * WebCore.gypi: Add RGBColor + * css/RGBColor.cpp: Added. + (WebCore::RGBColor::create): + (WebCore::RGBColor::red): + (WebCore::RGBColor::green): + (WebCore::RGBColor::blue): + * css/RGBColor.h: Added. + (WebCore::RGBColor::RGBColor): + +2009-07-10 Matt Perry <mpcomplete@chromium.org> + + Reviewed by Darin Fisher. + + [V8] Rename the didCreate/DestroyScriptContext calls to make it + clear that that those refer to the frame's contxt. Add another + similar call for when creating contexts via evaluateInNewContext. + https://bugs.webkit.org/show_bug.cgi?id=27104 + + * bindings/v8/V8Proxy.cpp: + (WebCore::V8Proxy::evaluateInNewContext): + (WebCore::V8Proxy::disposeContextHandles): + (WebCore::V8Proxy::initContextIfNeeded): + * loader/EmptyClients.h: + (WebCore::EmptyFrameLoaderClient::didCreateScriptContextForFrame): + (WebCore::EmptyFrameLoaderClient::didDestroyScriptContextForFrame): + (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext): + * loader/FrameLoaderClient.h: + +2009-07-14 Brent Fulgham <bfulgham@webkit.org> + + Revert http://trac.webkit.org/changeset/45864 after + breaking of Windows build. + + * storage/LocalStorageTask.cpp: + * storage/LocalStorageTask.h: + * storage/Storage.cpp: + * storage/Storage.h: + * storage/StorageArea.cpp: + * storage/StorageArea.h: + * storage/StorageAreaImpl.cpp: + * storage/StorageAreaImpl.h: + * storage/StorageAreaSync.cpp: + * storage/StorageAreaSync.h: + * storage/StorageEvent.cpp: + * storage/StorageEvent.h: + (WebCore::StorageEvent::create): + (WebCore::StorageEvent::StorageEvent): + * storage/StorageNamespace.h: + * storage/StorageNamespaceImpl.cpp: + * storage/StorageNamespaceImpl.h: + * storage/StorageSyncManager.cpp: + * storage/StorageSyncManager.h: + +2009-07-11 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Adler. + + Cleanup DOM Storage dependencies. + https://bugs.webkit.org/show_bug.cgi?id=27180 + + DOM Storage had several unnecessary (and probably unintended) + dependencies. This patch replaces many includes of header files with + forward declaration of classes, making some destructors explicit, and + taking some factories out of the header files. + + This will allow things like StorageAreaSync to take a StorageAreaImpl* + (as it should) rather than a StorageArea* which previously weren't + possible because the dependencies were such a tangled mess. + + * storage/LocalStorageTask.cpp: + (WebCore::LocalStorageTask::~LocalStorageTask): + * storage/LocalStorageTask.h: + * storage/Storage.cpp: + (WebCore::Storage::~Storage): + * storage/Storage.h: + * storage/StorageArea.cpp: + * storage/StorageArea.h: + * storage/StorageAreaImpl.cpp: + * storage/StorageAreaImpl.h: + * storage/StorageAreaSync.cpp: + (WebCore::StorageAreaSync::~StorageAreaSync): + * storage/StorageAreaSync.h: + * storage/StorageEvent.cpp: + (WebCore::StorageEvent::create): + (WebCore::StorageEvent::StorageEvent): + * storage/StorageEvent.h: + * storage/StorageNamespace.h: + * storage/StorageNamespaceImpl.cpp: + * storage/StorageNamespaceImpl.h: + * storage/StorageSyncManager.cpp: + (WebCore::StorageSyncManager::~StorageSyncManager): + * storage/StorageSyncManager.h: + + +2009-07-14 Adam Treat <adam.treat@torchmobile.com> + + Reviewed by David Hyatt. + + https://bugs.webkit.org/show_bug.cgi?id=26983 + + Check to make sure the view is attached to a frame() in the visibleContentsResized() + method as it can be triggered before the view is attached by Frame::createView(...) + setting various values such as setScrollBarModes(...) for example. An ASSERT is + triggered when a view is layout before being attached to a frame(). + + * page/FrameView.cpp: + (WebCore::FrameView::visibleContentsResized): + * page/FrameView.h: + +2009-07-14 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + WebInspector: show last opened panel when invoking inspector. + + https://bugs.webkit.org/show_bug.cgi?id=27263 + + * inspector/InspectorController.cpp: + (WebCore::InspectorController::InspectorController): + (WebCore::InspectorController::setWindowVisible): + (WebCore::InspectorController::storeLastActivePanel): + (WebCore::InspectorController::specialPanelForJSName): + * inspector/InspectorController.h: + (WebCore::InspectorController::Setting::Setting): + * inspector/InspectorController.idl: + * inspector/front-end/inspector.js: + (WebInspector.set currentPanel): + (WebInspector.loaded): + +2009-07-14 Anton Muhin <antonm@chromium.org> + + Reviewed by Dimitri Glazkov. + + Speed up access to NodeList length. + https://bugs.webkit.org/show_bug.cgi?id=27264 + + That's a minimal alternation of the code. + + * bindings/v8/custom/V8NodeListCustom.cpp: + (WebCore::NAMED_PROPERTY_GETTER): 1) use AtomicString for comparison, 2) use + v8::Integer::New instead of v8::Number::New. + +2009-07-14 Anton Muhin <antonm@chromium.org> + + Reviewed by Dimitri Glazkov. + + Do not do unnecessary conversions from v8::Handle<v8::Value> to + v8::Handle<v8::Object> and accompanying changes. + https://bugs.webkit.org/show_bug.cgi?id=26953 + + Three things: + + 1) do not cast from v8::Value to v8::Object if unnecessary---casts are cheap, + but are not free (they check for emptiness of handle); + 2) inline conversion from wrapper to node; + 3) simplify case to an ASSERT. + + This is just a refactoring, so no new tests are needed. + + * bindings/scripts/CodeGeneratorV8.pm: + * bindings/v8/V8Proxy.cpp: + (WebCore::V8Proxy::evaluateInNewContext): + (WebCore::V8Proxy::convertToSVGPODTypeImpl): + * bindings/v8/V8Proxy.h: + (WebCore::V8Proxy::convertDOMWrapperToNative): + (WebCore::V8Proxy::convertToNativeObject): + (WebCore::V8Proxy::convertToNativeEvent): + * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: + (WebCore::toCanvasStyle): + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8CustomBinding.cpp: + (WebCore::V8Custom::GetTargetFrame): + * bindings/v8/custom/V8DOMWindowCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + (WebCore::V8Custom::ClearTimeoutImpl): + (WebCore::NAMED_ACCESS_CHECK): + (WebCore::INDEXED_ACCESS_CHECK): + * bindings/v8/custom/V8DocumentCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + * bindings/v8/custom/V8LocationCustom.cpp: + (WebCore::CALLBACK_FUNC_DECL): + +2009-07-14 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + Straight quotes should match fancy quotes in in-page search + https://bugs.webkit.org/show_bug.cgi?id=27217 + + Tests: fast/text/find-quotes.html + + * editing/TextIterator.cpp: + (WebCore::foldQuoteMark): Added. + (WebCore::foldQuoteMarks): Added. + (WebCore::SearchBuffer::SearchBuffer): Call foldQuoteMarks on the target string. + (WebCore::SearchBuffer::append): Call foldQuoteMarks on characters as they are + added to the search buffer. + + * platform/text/CharacterNames.h: Added more quotation mark character names. + Sorted character names with the sort tool. + +2009-07-13 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + WebInspector: handle debugger shortcuts while on source frame or on + script file selector. + + https://bugs.webkit.org/show_bug.cgi?id=27224 + + * inspector/front-end/ScriptsPanel.js: + (WebInspector.ScriptsPanel): + * inspector/front-end/SourceFrame.js: + (WebInspector.SourceFrame.prototype._loaded): + +2009-07-13 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Use standard HashCountedSet instead of a hand rolled one + in HTMLDocument. + + * html/HTMLDocument.cpp: + (WebCore::addItemToMap): + (WebCore::removeItemFromMap): + * html/HTMLDocument.h: + +2009-07-13 Erik Arvidsson <arv@chromium.org> + + Reviewed by Darin Adler and Maciej Stachowiak. + + Implement HTML5 draggable + https://bugs.webkit.org/show_bug.cgi?id=26262 + + This adds support for the HTML5 draggable attribute and its DOM binding. It maps the draggable property + to the CSS properties -webkit-user-drag and -webkit-user-select respectively. + + Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#the-draggable-attribute + + Test: fast/html/draggable.html + + * css/html.css: + * html/HTMLAnchorElement.cpp: + (WebCore::HTMLAnchorElement::draggable): + * html/HTMLAnchorElement.h: + * html/HTMLAttributeNames.in: + * html/HTMLElement.cpp: + (WebCore::HTMLElement::draggable): + (WebCore::HTMLElement::setDraggable): + * html/HTMLElement.h: + * html/HTMLElement.idl: + * html/HTMLImageElement.cpp: + (WebCore::HTMLImageElement::draggable): + * html/HTMLImageElement.h: + +2009-07-13 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + Image rendered as layer contents looks different from image rendered via CG. + <rdar://problem/7048830> + + Fix a visible color profile difference between between images rendered via Core Graphics + and those rendered via a compositing layer, by assigning the GenericRGB profile to + untagged images (which come through as having the DeviceRGB profile) when they are set + as layer contents. + + Test: compositing/color-matching/image-color-matching.html + + * platform/graphics/mac/GraphicsLayerCA.mm: + (WebCore::GraphicsLayerCA::setContentsToImage): + +2009-07-13 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=27220 + Assertion failure in createSearcher() (usearch_open() status is U_USING_DEFAULT_WARNING) + + * editing/TextIterator.cpp: + (WebCore::createSearcher): Add U_USING_DEFAULT_WARNING as a possible status code + in the assertion. Affects only the assertion. + +2009-07-13 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=26925 + <rdar://problem/7027850> URL Fragment Breaks Application Cache Loads + + Test: http/tests/appcache/main-resource-hash.html + + * loader/appcache/ApplicationCache.cpp: + (WebCore::ApplicationCache::resourceForURL): + (WebCore::ApplicationCache::resourceForRequest): + * loader/appcache/ApplicationCacheGroup.cpp: + (WebCore::ApplicationCacheGroup::cacheForMainRequest): + (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest): + (WebCore::ApplicationCacheGroup::selectCache): + (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): + (WebCore::ApplicationCacheGroup::didReceiveResponse): + (WebCore::ApplicationCacheGroup::didFail): + (WebCore::ApplicationCacheGroup::addEntry): + Remove URL fragment at appcache code borders. + + * loader/appcache/ApplicationCacheResource.h: + (WebCore::ApplicationCacheResource::create): + * loader/appcache/ApplicationCacheStorage.cpp: + (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup): + (WebCore::ApplicationCacheStorage::cacheGroupForURL): + (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): + Assert that there is no URL fragment in URL at key points in appcache code. + +2009-07-13 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=27166 + rdar://problem/7015857 + Find for strings composed entirely of spaces doesn't work + + Test: fast/text/find-spaces.html + + * editing/TextIterator.cpp: + (WebCore::findPlainText): Removed unneeded special case. + The empty string case already works correctly. + +2009-07-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Remove NPPVpluginPrivateModeBool, it was removed from the spec. + + * bridge/npapi.h: + +2009-07-13 Feng Qian <feng@chromium.org> + + Reviewed by Dimitri Glazkov. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=27237 + + Make V8DOMMap.h compiling with gcc option -Werror=non=virtual-dtor. + + * bindings/v8/V8DOMMap.h: + (WebCore::WeakReferenceMap::WeakReferenceMap): + (WebCore::WeakReferenceMap::~WeakReferenceMap): + +2009-07-13 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Fisher. + + Remove an accidental add of bidi.(cpp|h) to WebCore.gypi. + + * WebCore.gypi: Removed bidi.cpp and bidi.h + +2009-07-13 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Fisher. + + Update WebCore.gyp in preparation to hooking it up. + + * WebCore.gypi: Added files that were mid-stream while switching over. + +2009-07-13 Dmitry Titov <dimich@chromium.org> + + Not reviewed, another small fix for Chromium build. + + * bindings/v8/ScriptController.cpp: + (WebCore::ScriptController::evaluate): + +2009-07-13 Dmitry Titov <dimich@chromium.org> + + Not reviewed, fix Chromium build bustage. + + * bindings/v8/ScriptController.cpp: + (WebCore::ScriptController::evaluate): + * bindings/v8/V8Proxy.cpp: + (WebCore::JavaScriptConsoleMessage::addToPage): + * bindings/v8/WorkerContextExecutionProxy.cpp: + (WebCore::handleConsoleMessage): + +2009-07-13 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=27234 + <rdar://problem/7054356> + + Add null page check in HTMLDocument::hasFocus. + + Test: fast/dom/HTMLDocument/hasFocus-frameless-crash.html + + * html/HTMLDocument.cpp: + (WebCore::HTMLDocument::hasFocus): Add page null check. + (WebCore::HTMLDocument::createTokenizer): Cleanup page null check. + +2009-07-13 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + Disable continuous spell checking in the inspector + https://bugs.webkit.org/show_bug.cgi?id=27131 + + * inspector/front-end/inspector.html: Added spellcheck="false" to the + main-panels and console-prompt containers. + +2009-07-13 Adam Langley <agl@google.com> + + Reviewed by Eric Seidel. + + Chromium Linux: fix assertion when rendering google.com.kh + + https://bugs.webkit.org/show_bug.cgi?id=26924 + + Some shapers (i.e. Khmer) will produce cluster logs which report that + /no/ code points contributed to certain glyphs. Because of this, we + take any code point which contributed to the glyph in question, or any + subsequent glyph. If we run off the end, then we take the last code + point. + + Added LayoutTests/fast/text/international/khmar-selection.html + + * platform/graphics/chromium/FontLinux.cpp: + (WebCore::Font::offsetForPositionForComplexText): + +2009-07-13 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + spellcheck="false" is ignored + <rdar://problem/7054177> + + * editing/Editor.cpp: + (WebCore::markMisspellingsOrBadGrammar): Moved code to check the + spellcheck attribute from here... + (WebCore::Editor::spellCheckingEnabledInFocusedNode): ...to here. + (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Bail out + if spell chcking is disabled by the spellcheck attribute. + * editing/Editor.h: + +2009-07-13 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Adam Roben. + + Add new configuration flag for redistributable Windows build. + https://bugs.webkit.org/show_bug.cgi=27087 + + * WebCore.vcproj/WebCore.vcproj: Add new WinCairo.vsprops to + Debug_Cairo and Release_Cairo builds. + * config.h: Check for presence of WIN_CAIRO and select appropriate + configuration. Defaults to standard Apple build. + +2009-07-13 Peter Kasting <pkasting@google.com> + + https://bugs.webkit.org/show_bug.cgi?id=19562 + Back out previous patch for this bug (too many problems). + + * DerivedSources.cpp: + * DerivedSources.make: + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.xcodeproj/project.pbxproj: + * WebCoreSources.bkl: + * html/HTMLButtonElement.idl: + * html/HTMLFieldSetElement.idl: + * html/HTMLFormControlElement.cpp: + * html/HTMLFormControlElement.h: + (WebCore::HTMLFormControlElement::form): + * html/HTMLInputElement.idl: + * html/HTMLSelectElement.idl: + * html/HTMLTextAreaElement.idl: + * html/ValidityState.cpp: Removed. + * html/ValidityState.h: Removed. + * html/ValidityState.idl: Removed. + +2009-07-13 Nate Chapin <japhet@chromium.org> + + Reviewed by Dimitri Glazkov. + + Add HTMLAllCollection to WebCore.gypi. + + https://bugs.webkit.org/show_bug.cgi?id=27223 + + * WebCore.gypi: Add HTMLAllCollection. + +2009-07-13 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Fisher. + + [V8] Add a missing check for constructor call in WebKitCSSMatrixConstructor. + https://bugs.webkit.org/show_bug.cgi?id=27218 + + Test: fast/css/matrix-as-function-crash.html + + * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: + (WebCore::CALLBACK_FUNC_DECL): Added a check for constructor call. + 2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Unreviewed make dist build fix. @@ -2973,7 +10300,7 @@ (WebCore::RenderView::setMaximalOutlineSize): Add comment indicating that this could be optimized. -2009-07-07 Anton Muhin <antonm@chromium.org> +2009-07-14 Anton Muhin <antonm@chromium.org> Reviewed by Darin Fisher. @@ -7413,7 +14740,7 @@ (WebCore::DOMDataStore::~DOMDataStore): (WebCore::DOMDataStoreHandle::DOMDataStoreHandle): (WebCore::DOMDataStoreHandle::~DOMDataStoreHandle): - (WebCore::::forget): + (WebCore::forget): (WebCore::getDOMNodeMap): (WebCore::getDOMObjectMap): (WebCore::getActiveDOMObjectMap): diff --git a/src/3rdparty/webkit/WebCore/DerivedSources.cpp b/src/3rdparty/webkit/WebCore/DerivedSources.cpp index 69cc3e36d2..145506069d 100644 --- a/src/3rdparty/webkit/WebCore/DerivedSources.cpp +++ b/src/3rdparty/webkit/WebCore/DerivedSources.cpp @@ -25,6 +25,7 @@ // This all-in-one cpp file cuts down on template bloat to allow us to build our Windows release build. +#include "JSAbstractWorker.cpp" #include "JSAttr.cpp" #include "JSBarInfo.cpp" #include "JSCanvasGradient.cpp" @@ -56,6 +57,7 @@ #include "JSDatabase.cpp" #include "JSDataGridColumn.cpp" #include "JSDataGridColumnList.cpp" +#include "JSDedicatedWorkerContext.cpp" #include "JSDocument.cpp" #include "JSDocumentFragment.cpp" #include "JSDocumentType.cpp" @@ -68,6 +70,7 @@ #include "JSElement.cpp" #include "JSEntity.cpp" #include "JSEntityReference.cpp" +#include "JSErrorEvent.cpp" #include "JSEvent.cpp" #include "JSEventException.cpp" #include "JSFile.cpp" @@ -170,7 +173,9 @@ #include "JSRange.cpp" #include "JSRangeException.cpp" #include "JSRect.cpp" +#include "JSRGBColor.cpp" #include "JSScreen.cpp" +#include "JSSharedWorker.cpp" #include "JSSQLError.cpp" #include "JSSQLResultSet.cpp" #include "JSSQLResultSetRowList.cpp" @@ -350,5 +355,5 @@ // want StaticConstructors.h to "pollute" all the source files we #include here // accidentally, so we'll throw an error whenever any file includes it. #ifdef StaticConstructors_h -#error Don't include any file in DerivedSources.cpp that includes StaticConstructors.h +#error Do not include any file in DerivedSources.cpp that includes StaticConstructors.h #endif diff --git a/src/3rdparty/webkit/WebCore/WebCore.gypi b/src/3rdparty/webkit/WebCore/WebCore.gypi index d96da8671c..d6f248779e 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.gypi +++ b/src/3rdparty/webkit/WebCore/WebCore.gypi @@ -44,10 +44,12 @@ 'dom/Element.idl', 'dom/Entity.idl', 'dom/EntityReference.idl', + 'dom/ErrorEvent.idl', 'dom/Event.idl', 'dom/EventException.idl', 'dom/EventListener.idl', 'dom/EventTarget.idl', + 'dom/HTMLAllCollection.idl', 'dom/KeyboardEvent.idl', 'dom/MessageChannel.idl', 'dom/MessageEvent.idl', @@ -154,7 +156,7 @@ 'html/TimeRanges.idl', 'html/ValidityState.idl', 'html/VoidCallback.idl', - 'inspector/InspectorController.idl', + 'inspector/InspectorBackend.idl', 'inspector/JavaScriptCallFrame.idl', 'loader/appcache/DOMApplicationCache.idl', 'page/AbstractView.idl', @@ -332,6 +334,7 @@ 'svg/SVGZoomAndPan.idl', 'svg/SVGZoomEvent.idl', 'workers/AbstractWorker.idl', + 'workers/DedicatedWorkerContext.idl', 'workers/SharedWorker.idl', 'workers/Worker.idl', 'workers/WorkerContext.idl', @@ -397,6 +400,7 @@ 'accessibility/win/AccessibilityObjectWrapperWin.h', 'accessibility/wx/AccessibilityObjectWx.cpp', 'bindings/js/CachedScriptSourceProvider.h', + 'bindings/js/DOMObjectWithSVGContext.h', 'bindings/js/GCController.cpp', 'bindings/js/GCController.h', 'bindings/js/JSAttrCustom.cpp', @@ -431,6 +435,7 @@ 'bindings/js/JSDataGridColumnListCustom.cpp', 'bindings/js/JSDataGridDataSource.cpp', 'bindings/js/JSDataGridDataSource.h', + 'bindings/js/JSDedicatedWorkerContextCustom.cpp', 'bindings/js/JSDocumentCustom.cpp', 'bindings/js/JSDocumentFragmentCustom.cpp', 'bindings/js/JSDOMApplicationCacheCustom.cpp', @@ -481,7 +486,7 @@ 'bindings/js/JSInspectedObjectWrapper.h', 'bindings/js/JSInspectorCallbackWrapper.cpp', 'bindings/js/JSInspectorCallbackWrapper.h', - 'bindings/js/JSInspectorControllerCustom.cpp', + 'bindings/js/JSInspectorBackendCustom.cpp', 'bindings/js/JSJavaScriptCallFrameCustom.cpp', 'bindings/js/JSLazyEventListener.cpp', 'bindings/js/JSLazyEventListener.h', @@ -547,6 +552,8 @@ 'bindings/js/JSXSLTProcessorCustom.cpp', 'bindings/js/ScheduledAction.cpp', 'bindings/js/ScheduledAction.h', + 'bindings/js/ScriptArray.cpp', + 'bindings/js/ScriptArray.h', 'bindings/js/ScriptCachedFrameData.cpp', 'bindings/js/ScriptCachedFrameData.h', 'bindings/js/ScriptCallFrame.cpp', @@ -570,6 +577,7 @@ 'bindings/js/ScriptObjectQuarantine.cpp', 'bindings/js/ScriptObjectQuarantine.h', 'bindings/js/ScriptSourceCode.h', + 'bindings/js/ScriptSourceProvider.h', 'bindings/js/ScriptState.cpp', 'bindings/js/ScriptState.h', 'bindings/js/ScriptString.h', @@ -578,6 +586,8 @@ 'bindings/js/StringSourceProvider.h', 'bindings/js/WorkerScriptController.cpp', 'bindings/js/WorkerScriptController.h', + 'bindings/v8/ChildThreadDOMData.cpp', + 'bindings/v8/ChildThreadDOMData.h', 'bindings/v8/custom/V8AbstractWorkerCustom.cpp', 'bindings/v8/custom/V8AttrCustom.cpp', 'bindings/v8/custom/V8CanvasPixelArrayCustom.cpp', @@ -602,6 +612,8 @@ 'bindings/v8/custom/V8CustomXPathNSResolver.cpp', 'bindings/v8/custom/V8CustomXPathNSResolver.h', 'bindings/v8/custom/V8DatabaseCustom.cpp', + 'bindings/v8/custom/V8DataGridColumnListCustom.cpp', + 'bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp', 'bindings/v8/custom/V8DocumentLocationCustom.cpp', 'bindings/v8/custom/V8DOMParserConstructor.cpp', 'bindings/v8/custom/V8DOMWindowCustom.cpp', @@ -625,7 +637,7 @@ 'bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp', 'bindings/v8/custom/V8HTMLSelectElementCustom.cpp', 'bindings/v8/custom/V8HTMLSelectElementCustom.h', - 'bindings/v8/custom/V8InspectorControllerCustom.cpp', + 'bindings/v8/custom/V8InspectorBackendCustom.cpp', 'bindings/v8/custom/V8LocationCustom.cpp', 'bindings/v8/custom/V8MessageChannelConstructor.cpp', 'bindings/v8/custom/V8MessagePortCustom.cpp', @@ -637,6 +649,7 @@ 'bindings/v8/custom/V8NodeFilterCustom.cpp', 'bindings/v8/custom/V8NodeIteratorCustom.cpp', 'bindings/v8/custom/V8NodeListCustom.cpp', + 'bindings/v8/custom/V8StorageCustom.cpp', 'bindings/v8/custom/V8SQLResultSetRowListCustom.cpp', 'bindings/v8/custom/V8SQLTransactionCustom.cpp', 'bindings/v8/custom/V8SVGElementInstanceCustom.cpp', @@ -655,8 +668,21 @@ 'bindings/v8/custom/V8XMLSerializerConstructor.cpp', 'bindings/v8/custom/V8XPathEvaluatorConstructor.cpp', 'bindings/v8/custom/V8XSLTProcessorCustom.cpp', + 'bindings/v8/DOMData.cpp', + 'bindings/v8/DOMData.h', + 'bindings/v8/DOMDataStore.cpp', + 'bindings/v8/DOMDataStore.h', + 'bindings/v8/DOMObjectsInclude.h', + 'bindings/v8/MainThreadDOMData.cpp', + 'bindings/v8/MainThreadDOMData.h', + 'bindings/v8/NPV8Object.cpp', + 'bindings/v8/NPV8Object.h', 'bindings/v8/ScheduledAction.cpp', 'bindings/v8/ScheduledAction.h', + 'bindings/v8/ScopedDOMDataStore.cpp', + 'bindings/v8/ScopedDOMDataStore.h', + 'bindings/v8/ScriptArray.cpp', + 'bindings/v8/ScriptArray.h', 'bindings/v8/ScriptCachedFrameData.h', 'bindings/v8/ScriptCallFrame.cpp', 'bindings/v8/ScriptCallFrame.h', @@ -682,24 +708,40 @@ 'bindings/v8/ScriptString.h', 'bindings/v8/ScriptValue.cpp', 'bindings/v8/ScriptValue.h', + 'bindings/v8/StaticDOMDataStore.cpp', + 'bindings/v8/StaticDOMDataStore.h', 'bindings/v8/V8AbstractEventListener.cpp', 'bindings/v8/V8AbstractEventListener.h', 'bindings/v8/V8Binding.cpp', 'bindings/v8/V8Binding.h', 'bindings/v8/V8Collection.cpp', 'bindings/v8/V8Collection.h', + 'bindings/v8/V8ConsoleMessage.cpp', + 'bindings/v8/V8ConsoleMessage.h', + 'bindings/v8/V8DataGridDataSource.cpp', + 'bindings/v8/V8DataGridDataSource.h', 'bindings/v8/V8DOMMap.cpp', 'bindings/v8/V8DOMMap.h', + 'bindings/v8/V8DOMWrapper.cpp', + 'bindings/v8/V8DOMWrapper.h', 'bindings/v8/V8EventListenerList.cpp', 'bindings/v8/V8EventListenerList.h', + 'bindings/v8/V8GCController.cpp', + 'bindings/v8/V8GCController.h', 'bindings/v8/V8Helpers.cpp', 'bindings/v8/V8Helpers.h', + 'bindings/v8/V8HiddenPropertyName.cpp', + 'bindings/v8/V8HiddenPropertyName.h', 'bindings/v8/V8Index.cpp', 'bindings/v8/V8Index.h', 'bindings/v8/V8IsolatedWorld.cpp', 'bindings/v8/V8IsolatedWorld.h', 'bindings/v8/V8LazyEventListener.cpp', 'bindings/v8/V8LazyEventListener.h', + 'bindings/v8/V8NPObject.cpp', + 'bindings/v8/V8NPObject.h', + 'bindings/v8/V8NPUtils.cpp', + 'bindings/v8/V8NPUtils.h', 'bindings/v8/V8NodeFilterCondition.cpp', 'bindings/v8/V8NodeFilterCondition.h', 'bindings/v8/V8ObjectEventListener.cpp', @@ -717,6 +759,10 @@ 'bindings/v8/WorkerContextExecutionProxy.cpp', 'bindings/v8/WorkerScriptController.h', 'bindings/v8/WorkerScriptController.cpp', + 'bindings/v8/npruntime.cpp', + 'bindings/v8/npruntime_impl.h', + 'bindings/v8/npruntime_internal.h', + 'bindings/v8/npruntime_priv.h', 'css/CSSBorderImageValue.cpp', 'css/CSSBorderImageValue.h', 'css/CSSCanvasValue.cpp', @@ -825,6 +871,8 @@ 'css/MediaQueryExp.h', 'css/Pair.h', 'css/Rect.h', + 'css/RGBColor.cpp', + 'css/RGBColor.h', 'css/SVGCSSComputedStyleDeclaration.cpp', 'css/SVGCSSParser.cpp', 'css/SVGCSSStyleSelector.cpp', @@ -908,6 +956,8 @@ 'dom/Entity.h', 'dom/EntityReference.cpp', 'dom/EntityReference.h', + 'dom/ErrorEvent.cpp', + 'dom/ErrorEvent.h', 'dom/Event.cpp', 'dom/Event.h', 'dom/EventException.h', @@ -1349,6 +1399,8 @@ 'inspector/InspectorClient.h', 'inspector/ConsoleMessage.cpp', 'inspector/ConsoleMessage.h', + 'inspector/InspectorBackend.cpp', + 'inspector/InspectorBackend.h', 'inspector/InspectorController.cpp', 'inspector/InspectorController.h', 'inspector/InspectorDatabaseResource.cpp', @@ -1465,6 +1517,8 @@ 'loader/NavigationAction.h', 'loader/NetscapePlugInStreamLoader.cpp', 'loader/NetscapePlugInStreamLoader.h', + 'loader/PlaceholderDocument.cpp', + 'loader/PlaceholderDocument.h', 'loader/PluginDocument.cpp', 'loader/PluginDocument.h', 'loader/ProgressTracker.cpp', @@ -2293,12 +2347,16 @@ 'platform/sql/SQLiteAuthorizer.cpp', 'platform/sql/SQLiteDatabase.cpp', 'platform/sql/SQLiteDatabase.h', - 'platform/sql/SQLiteFileSystem.h', 'platform/sql/SQLiteFileSystem.cpp', + 'platform/sql/SQLiteFileSystem.h', 'platform/sql/SQLiteStatement.cpp', 'platform/sql/SQLiteStatement.h', 'platform/sql/SQLiteTransaction.cpp', 'platform/sql/SQLiteTransaction.h', + 'platform/sql/chromium/SQLiteFileSystemChromium.cpp', + 'platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp', + 'platform/sql/chromium/SQLiteFileSystemChromiumMac.cpp', + 'platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp', 'platform/symbian/FloatPointSymbian.cpp', 'platform/symbian/FloatRectSymbian.cpp', 'platform/symbian/IntPointSymbian.cpp', @@ -2581,6 +2639,7 @@ 'plugins/PluginData.h', 'plugins/PluginDatabase.cpp', 'plugins/PluginDatabase.h', + 'plugins/PluginDebug.cpp', 'plugins/PluginDebug.h', 'plugins/PluginInfoStore.cpp', 'plugins/PluginInfoStore.h', @@ -2871,10 +2930,6 @@ 'storage/DatabaseTracker.cpp', 'storage/DatabaseTracker.h', 'storage/DatabaseTrackerClient.h', - 'storage/LocalStorage.cpp', - 'storage/LocalStorage.h', - 'storage/LocalStorageArea.cpp', - 'storage/LocalStorageArea.h', 'storage/LocalStorageTask.cpp', 'storage/LocalStorageTask.h', 'storage/LocalStorageThread.cpp', @@ -2896,18 +2951,23 @@ 'storage/SQLTransaction.h', 'storage/SQLTransactionCallback.h', 'storage/SQLTransactionErrorCallback.h', - 'storage/SessionStorage.cpp', - 'storage/SessionStorage.h', - 'storage/SessionStorageArea.cpp', - 'storage/SessionStorageArea.h', 'storage/Storage.cpp', 'storage/Storage.h', - 'storage/StorageArea.cpp', 'storage/StorageArea.h', + 'storage/StorageAreaImpl.cpp', + 'storage/StorageAreaImpl.h', + 'storage/StorageAreaSync.cpp', + 'storage/StorageAreaSync.h', 'storage/StorageEvent.cpp', 'storage/StorageEvent.h', 'storage/StorageMap.cpp', 'storage/StorageMap.h', + 'storage/StorageNamespace.cpp', + 'storage/StorageNamespace.h', + 'storage/StorageNamespaceImpl.cpp', + 'storage/StorageNamespaceImpl.h', + 'storage/StorageSyncManager.cpp', + 'storage/StorageSyncManager.h', 'svg/animation/SMILTime.cpp', 'svg/animation/SMILTime.h', 'svg/animation/SMILTimeContainer.cpp', @@ -3255,6 +3315,8 @@ 'svg/SynchronizableTypeWrapper.h', 'workers/AbstractWorker.cpp', 'workers/AbstractWorker.h', + 'workers/DedicatedWorkerContext.cpp', + 'workers/DedicatedWorkerContext.h', 'workers/GenericWorkerTask.h', 'workers/SharedWorker.cpp', 'workers/SharedWorker.h', diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index b0b0290b2c..e49ab13447 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -34,15 +34,9 @@ unix { lessThan(QT_MINOR_VERSION, 4): QMAKE_PKGCONFIG_REQUIRES += QtXml } -include($$OUTPUT_DIR/config.pri) - CONFIG -= warn_on *-g++*:QMAKE_CXXFLAGS += -Wreturn-type -fno-strict-aliasing -# Disable a few warnings on Windows. The warnings are also -# disabled in WebKitLibraries/win/tools/vsprops/common.vsprops -!win32-g++:win32-*: QMAKE_CXXFLAGS += -wd4291 -wd4344 - unix:!mac:*-g++*:QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections unix:!mac:*-g++*:QMAKE_LFLAGS += -Wl,--gc-sections @@ -82,6 +76,9 @@ win32-g++ { QMAKE_LIBDIR_POST += $$split(TMPPATH,";") } +# Assume that symbian OS always comes with sqlite +symbian:!CONFIG(QTDIR_build): CONFIG += system-sqlite + # Try to locate sqlite3 source CONFIG(QTDIR_build) { SQLITE3SRCDIR = $$QT_SOURCE_TREE/src/3rdparty/sqlite/ @@ -126,6 +123,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) { !contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=0 !contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1 !contains(DEFINES, ENABLE_XHTMLMP=.): DEFINES += ENABLE_XHTMLMP=0 +!contains(DEFINES, ENABLE_DATAGRID=.): DEFINES += ENABLE_DATAGRID=1 # SVG support !contains(DEFINES, ENABLE_SVG=0) { @@ -139,6 +137,9 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) { DEFINES += ENABLE_SVG_FONTS=0 ENABLE_SVG_FOREIGN_OBJECT=0 ENABLE_SVG_ANIMATION=0 ENABLE_SVG_AS_IMAGE=0 ENABLE_SVG_USE=0 } +# HTML5 ruby support +!contains(DEFINES, ENABLE_RUBY=.): DEFINES += ENABLE_RUBY=1 + # HTML5 media support !contains(DEFINES, ENABLE_VIDEO=.) { contains(QT_CONFIG, phonon):DEFINES += ENABLE_VIDEO=1 @@ -162,65 +163,62 @@ CONFIG(compute_defaults) { error("Done computing defaults") } -# Ensure that we pick up WebCore's config.h over JavaScriptCore's -INCLUDEPATH = $$PWD $$INCLUDEPATH - -include($$PWD/../JavaScriptCore/JavaScriptCore.pri) - RESOURCES += \ $$PWD/../WebCore/inspector/front-end/WebKit.qrc \ $$PWD/../WebCore/WebCore.qrc -INCLUDEPATH += \ - $$PWD/platform/qt \ - $$PWD/platform/network/qt \ + +include($$PWD/../JavaScriptCore/JavaScriptCore.pri) + +INCLUDEPATH = \ + $$PWD \ + $$PWD/accessibility \ + $$PWD/bindings/js \ + $$PWD/bridge \ + $$PWD/bridge/c \ + $$PWD/css \ + $$PWD/dom \ + $$PWD/dom/default \ + $$PWD/editing \ + $$PWD/history \ + $$PWD/html \ + $$PWD/inspector \ + $$PWD/loader \ + $$PWD/loader/appcache \ + $$PWD/loader/archive \ + $$PWD/loader/icon \ + $$PWD/page \ + $$PWD/page/animation \ + $$PWD/platform \ + $$PWD/platform/animation \ + $$PWD/platform/graphics \ $$PWD/platform/graphics/filters \ $$PWD/platform/graphics/transforms \ - $$PWD/platform/graphics/qt \ + $$PWD/platform/image-decoders \ + $$PWD/platform/network \ + $$PWD/platform/sql \ + $$PWD/platform/text \ + $$PWD/plugins \ + $$PWD/rendering \ + $$PWD/rendering/style \ + $$PWD/storage \ + $$PWD/svg \ + $$PWD/svg/animation \ + $$PWD/svg/graphics \ + $$PWD/svg/graphics/filters \ + $$PWD/wml \ + $$PWD/workers \ + $$PWD/xml \ + $$GENERATED_SOURCES_DIR \ + $$INCLUDEPATH + +INCLUDEPATH = \ + $$PWD/bridge/qt \ $$PWD/page/qt \ + $$PWD/platform/graphics/qt \ + $$PWD/platform/network/qt \ + $$PWD/platform/qt \ $$PWD/../WebKit/qt/WebCoreSupport \ - -# Make sure storage/ appears before JavaScriptCore/. Both provide LocalStorage.h -# but the header from the former include path is included across directories while -# LocalStorage.h is included only from files within the same directory -INCLUDEPATH = $$PWD/storage $$INCLUDEPATH - -INCLUDEPATH += $$PWD/accessibility \ - $$PWD/ForwardingHeaders \ - $$PWD/platform \ - $$PWD/platform/animation \ - $$PWD/platform/network \ - $$PWD/platform/graphics \ - $$PWD/svg/animation \ - $$PWD/svg/graphics \ - $$PWD/svg/graphics/filters \ - $$PWD/platform/sql \ - $$PWD/platform/text \ - $$PWD/loader \ - $$PWD/loader/appcache \ - $$PWD/loader/archive \ - $$PWD/loader/icon \ - $$PWD/css \ - $$PWD/dom \ - $$PWD/dom/default \ - $$PWD/page \ - $$PWD/page/animation \ - $$PWD/editing \ - $$PWD/rendering \ - $$PWD/rendering/style \ - $$PWD/history \ - $$PWD/inspector \ - $$PWD/xml \ - $$PWD/html \ - $$PWD/wml \ - $$PWD/workers \ - $$PWD/bindings/js \ - $$PWD/svg \ - $$PWD/platform/image-decoders \ - $$PWD/plugins \ - $$PWD/bridge \ - $$PWD/bridge/c \ - $$PWD/bridge/qt -INCLUDEPATH *= $$GENERATED_SOURCES_DIR + $$INCLUDEPATH QT += network lessThan(QT_MINOR_VERSION, 4): QT += xml @@ -263,7 +261,6 @@ STYLESHEETS_EMBED = \ DOMLUT_FILES += \ bindings/js/JSDOMWindowBase.cpp \ - bindings/js/JSRGBColor.cpp \ bindings/js/JSWorkerContextBase.cpp IDL_BINDINGS += \ @@ -284,6 +281,7 @@ IDL_BINDINGS += \ css/CSSVariablesDeclaration.idl \ css/CSSVariablesRule.idl \ css/MediaList.idl \ + css/RGBColor.idl \ css/Rect.idl \ css/StyleSheet.idl \ css/StyleSheetList.idl \ @@ -306,6 +304,7 @@ IDL_BINDINGS += \ dom/Element.idl \ dom/Entity.idl \ dom/EntityReference.idl \ + dom/ErrorEvent.idl \ dom/Event.idl \ dom/EventException.idl \ # dom/EventListener.idl \ @@ -414,7 +413,7 @@ IDL_BINDINGS += \ html/TextMetrics.idl \ html/ValidityState.idl \ html/VoidCallback.idl \ - inspector/InspectorController.idl \ + inspector/InspectorBackend.idl \ page/BarInfo.idl \ page/Console.idl \ page/Coordinates.idl \ @@ -501,8 +500,8 @@ SOURCES += \ bindings/js/JSImageConstructor.cpp \ bindings/js/JSImageDataCustom.cpp \ bindings/js/JSInspectedObjectWrapper.cpp \ + bindings/js/JSInspectorBackendCustom.cpp \ bindings/js/JSInspectorCallbackWrapper.cpp \ - bindings/js/JSInspectorControllerCustom.cpp \ bindings/js/JSLocationCustom.cpp \ bindings/js/JSNamedNodeMapCustom.cpp \ bindings/js/JSNamedNodesCollection.cpp \ @@ -514,7 +513,6 @@ SOURCES += \ bindings/js/JSNodeListCustom.cpp \ bindings/js/JSOptionConstructor.cpp \ bindings/js/JSQuarantinedObjectWrapper.cpp \ - bindings/js/JSRGBColor.cpp \ bindings/js/JSStyleSheetCustom.cpp \ bindings/js/JSStyleSheetListCustom.cpp \ bindings/js/JSTextCustom.cpp \ @@ -534,6 +532,7 @@ SOURCES += \ bindings/js/JSEventListener.cpp \ bindings/js/JSLazyEventListener.cpp \ bindings/js/JSPluginElementFunctions.cpp \ + bindings/js/ScriptArray.cpp \ bindings/js/ScriptCachedFrameData.cpp \ bindings/js/ScriptCallFrame.cpp \ bindings/js/ScriptCallStack.cpp \ @@ -606,6 +605,7 @@ SOURCES += \ css/MediaQuery.cpp \ css/MediaQueryEvaluator.cpp \ css/MediaQueryExp.cpp \ + css/RGBColor.cpp \ css/ShadowValue.cpp \ css/StyleBase.cpp \ css/StyleList.cpp \ @@ -642,6 +642,7 @@ SOURCES += \ dom/Element.cpp \ dom/Entity.cpp \ dom/EntityReference.cpp \ + dom/ErrorEvent.cpp \ dom/Event.cpp \ dom/EventNames.cpp \ dom/EventTarget.cpp \ @@ -845,6 +846,7 @@ SOURCES += \ html/PreloadScanner.cpp \ html/ValidityState.cpp \ inspector/ConsoleMessage.cpp \ + inspector/InspectorBackend.cpp \ inspector/InspectorDatabaseResource.cpp \ inspector/InspectorDOMStorageResource.cpp \ inspector/InspectorController.cpp \ @@ -881,6 +883,7 @@ SOURCES += \ loader/MediaDocument.cpp \ loader/NavigationAction.cpp \ loader/NetscapePlugInStreamLoader.cpp \ + loader/PlaceholderDocument.cpp \ loader/PluginDocument.cpp \ loader/ProgressTracker.cpp \ loader/Request.cpp \ @@ -998,7 +1001,6 @@ SOURCES += \ platform/Scrollbar.cpp \ platform/ScrollbarThemeComposite.cpp \ platform/ScrollView.cpp \ -# platform/SearchPopupMenu.cpp \ platform/text/SegmentedString.cpp \ platform/SharedBuffer.cpp \ platform/text/String.cpp \ @@ -1018,6 +1020,7 @@ SOURCES += \ platform/text/UnicodeRange.cpp \ platform/Widget.cpp \ plugins/PluginDatabase.cpp \ + plugins/PluginDebug.cpp \ plugins/PluginInfoStore.cpp \ plugins/PluginPackage.cpp \ plugins/PluginStream.cpp \ @@ -1115,17 +1118,953 @@ SOURCES += \ xml/XMLSerializer.cpp HEADERS += \ - $$PWD/platform/graphics/qt/StillImageQt.h \ - $$PWD/platform/qt/QWebPopup.h \ + accessibility/AccessibilityARIAGridCell.h \ + accessibility/AccessibilityARIAGrid.h \ + accessibility/AccessibilityARIAGridRow.h \ + accessibility/AccessibilityImageMapLink.h \ + accessibility/AccessibilityListBox.h \ + accessibility/AccessibilityListBoxOption.h \ + accessibility/AccessibilityList.h \ + accessibility/AccessibilityObject.h \ + accessibility/AccessibilityRenderObject.h \ + accessibility/AccessibilityTableCell.h \ + accessibility/AccessibilityTableColumn.h \ + accessibility/AccessibilityTable.h \ + accessibility/AccessibilityTableHeaderContainer.h \ + accessibility/AccessibilityTableRow.h \ + accessibility/AXObjectCache.h \ + bindings/js/CachedScriptSourceProvider.h \ + bindings/js/DOMObjectWithSVGContext.h \ + bindings/js/GCController.h \ + bindings/js/JSAudioConstructor.h \ + bindings/js/JSCSSStyleDeclarationCustom.h \ + bindings/js/JSCustomPositionCallback.h \ + bindings/js/JSCustomPositionErrorCallback.h \ + bindings/js/JSCustomSQLStatementCallback.h \ + bindings/js/JSCustomSQLStatementErrorCallback.h \ + bindings/js/JSCustomSQLTransactionCallback.h \ + bindings/js/JSCustomSQLTransactionErrorCallback.h \ + bindings/js/JSCustomVoidCallback.h \ + bindings/js/JSCustomXPathNSResolver.h \ + bindings/js/JSDataGridDataSource.h \ + bindings/js/JSDOMBinding.h \ + bindings/js/JSDOMGlobalObject.h \ + bindings/js/JSDOMWindowBase.h \ + bindings/js/JSDOMWindowBase.h \ + bindings/js/JSDOMWindowCustom.h \ + bindings/js/JSDOMWindowShell.h \ + bindings/js/JSEventListener.h \ + bindings/js/JSEventTarget.h \ + bindings/js/JSHistoryCustom.h \ + bindings/js/JSHTMLAllCollection.h \ + bindings/js/JSHTMLAppletElementCustom.h \ + bindings/js/JSHTMLEmbedElementCustom.h \ + bindings/js/JSHTMLInputElementCustom.h \ + bindings/js/JSHTMLObjectElementCustom.h \ + bindings/js/JSHTMLSelectElementCustom.h \ + bindings/js/JSImageConstructor.h \ + bindings/js/JSInspectedObjectWrapper.h \ + bindings/js/JSInspectorCallbackWrapper.h \ + bindings/js/JSLazyEventListener.h \ + bindings/js/JSLocationCustom.h \ + bindings/js/JSMessageChannelConstructor.h \ + bindings/js/JSNamedNodesCollection.h \ + bindings/js/JSNodeFilterCondition.h \ + bindings/js/JSOptionConstructor.h \ + bindings/js/JSPluginElementFunctions.h \ + bindings/js/JSQuarantinedObjectWrapper.h \ + bindings/js/JSSharedWorkerConstructor.h \ + bindings/js/JSStorageCustom.h \ + bindings/js/JSWebKitCSSMatrixConstructor.h \ + bindings/js/JSWebKitPointConstructor.h \ + bindings/js/JSWorkerConstructor.h \ + bindings/js/JSWorkerContextBase.h \ + bindings/js/JSWorkerContextBase.h \ + bindings/js/JSXMLHttpRequestConstructor.h \ + bindings/js/JSXSLTProcessorConstructor.h \ + bindings/js/ScheduledAction.h \ + bindings/js/ScriptArray.h \ + bindings/js/ScriptCachedFrameData.h \ + bindings/js/ScriptCallFrame.h \ + bindings/js/ScriptCallStack.h \ + bindings/js/ScriptController.h \ + bindings/js/ScriptEventListener.h \ + bindings/js/ScriptFunctionCall.h \ + bindings/js/ScriptObject.h \ + bindings/js/ScriptObjectQuarantine.h \ + bindings/js/ScriptSourceCode.h \ + bindings/js/ScriptSourceProvider.h \ + bindings/js/ScriptState.h \ + bindings/js/ScriptValue.h \ + bindings/js/StringSourceProvider.h \ + bindings/js/WorkerScriptController.h \ + bridge/c/c_class.h \ + bridge/c/c_instance.h \ + bridge/c/c_runtime.h \ + bridge/c/c_utility.h \ + bridge/IdentifierRep.h \ + bridge/NP_jsobject.h \ + bridge/npruntime.h \ + bridge/qt/qt_class.h \ + bridge/qt/qt_instance.h \ + bridge/qt/qt_runtime.h \ + bridge/runtime_array.h \ + bridge/runtime.h \ + bridge/runtime_method.h \ + bridge/runtime_object.h \ + bridge/runtime_root.h \ + css/CSSBorderImageValue.h \ + css/CSSCanvasValue.h \ + css/CSSCharsetRule.h \ + css/CSSComputedStyleDeclaration.h \ + css/CSSCursorImageValue.h \ + css/CSSFontFace.h \ + css/CSSFontFaceRule.h \ + css/CSSFontFaceSource.h \ + css/CSSFontFaceSrcValue.h \ + css/CSSFontSelector.h \ + css/CSSFunctionValue.h \ + css/CSSGradientValue.h \ + css/CSSHelper.h \ + css/CSSImageGeneratorValue.h \ + css/CSSImageValue.h \ + css/CSSImportRule.h \ + css/CSSInheritedValue.h \ + css/CSSInitialValue.h \ + css/CSSMediaRule.h \ + css/CSSMutableStyleDeclaration.h \ + css/CSSPageRule.h \ + css/CSSParser.h \ + css/CSSParserValues.h \ + css/CSSPrimitiveValue.h \ + css/CSSProperty.h \ + css/CSSPropertyLonghand.h \ + css/CSSReflectValue.h \ + css/CSSRule.h \ + css/CSSRuleList.h \ + css/CSSSegmentedFontFace.h \ + css/CSSSelector.h \ + css/CSSSelectorList.h \ + css/CSSStyleDeclaration.h \ + css/CSSStyleRule.h \ + css/CSSStyleSelector.h \ + css/CSSStyleSheet.h \ + css/CSSTimingFunctionValue.h \ + css/CSSUnicodeRangeValue.h \ + css/CSSValueList.h \ + css/CSSVariableDependentValue.h \ + css/CSSVariablesDeclaration.h \ + css/CSSVariablesRule.h \ + css/FontFamilyValue.h \ + css/FontValue.h \ + css/MediaFeatureNames.h \ + css/MediaList.h \ + css/MediaQueryEvaluator.h \ + css/MediaQueryExp.h \ + css/MediaQuery.h \ + css/RGBColor.h \ + css/ShadowValue.h \ + css/StyleBase.h \ + css/StyleList.h \ + css/StyleSheet.h \ + css/StyleSheetList.h \ + css/WebKitCSSKeyframeRule.h \ + css/WebKitCSSKeyframesRule.h \ + css/WebKitCSSMatrix.h \ + css/WebKitCSSTransformValue.h \ + dom/ActiveDOMObject.h \ + dom/Attr.h \ + dom/Attribute.h \ + dom/BeforeTextInsertedEvent.h \ + dom/BeforeUnloadEvent.h \ + dom/CDATASection.h \ + dom/CharacterData.h \ + dom/CheckedRadioButtons.h \ + dom/ChildNodeList.h \ + dom/ClassNames.h \ + dom/ClassNodeList.h \ + dom/ClientRect.h \ + dom/ClientRectList.h \ + dom/ClipboardEvent.h \ + dom/Clipboard.h \ + dom/Comment.h \ + dom/ContainerNode.h \ + dom/CSSMappedAttributeDeclaration.h \ + dom/default/PlatformMessagePortChannel.h \ + dom/DocumentFragment.h \ + dom/Document.h \ + dom/DocumentType.h \ + dom/DOMImplementation.h \ + dom/DynamicNodeList.h \ + dom/EditingText.h \ + dom/Element.h \ + dom/Entity.h \ + dom/EntityReference.h \ + dom/Event.h \ + dom/EventNames.h \ + dom/EventTarget.h \ + dom/ExceptionBase.h \ + dom/ExceptionCode.h \ + dom/InputElement.h \ + dom/KeyboardEvent.h \ + dom/MappedAttribute.h \ + dom/MessageChannel.h \ + dom/MessageEvent.h \ + dom/MessagePortChannel.h \ + dom/MessagePort.h \ + dom/MouseEvent.h \ + dom/MouseRelatedEvent.h \ + dom/MutationEvent.h \ + dom/NamedAttrMap.h \ + dom/NamedMappedAttrMap.h \ + dom/NameNodeList.h \ + dom/NodeFilterCondition.h \ + dom/NodeFilter.h \ + dom/Node.h \ + dom/NodeIterator.h \ + dom/Notation.h \ + dom/OptionElement.h \ + dom/OptionGroupElement.h \ + dom/OverflowEvent.h \ + dom/Position.h \ + dom/PositionIterator.h \ + dom/ProcessingInstruction.h \ + dom/ProgressEvent.h \ + dom/QualifiedName.h \ + dom/Range.h \ + dom/RegisteredEventListener.h \ + dom/ScriptElement.h \ + dom/ScriptExecutionContext.h \ + dom/SelectElement.h \ + dom/SelectorNodeList.h \ + dom/StaticNodeList.h \ + dom/StyledElement.h \ + dom/StyleElement.h \ + dom/TagNodeList.h \ + dom/TextEvent.h \ + dom/Text.h \ + dom/Traversal.h \ + dom/TreeWalker.h \ + dom/UIEvent.h \ + dom/UIEventWithKeyState.h \ + dom/WebKitAnimationEvent.h \ + dom/WebKitTransitionEvent.h \ + dom/WheelEvent.h \ + dom/XMLTokenizer.h \ + dom/XMLTokenizerScope.h \ + editing/AppendNodeCommand.h \ + editing/ApplyStyleCommand.h \ + editing/BreakBlockquoteCommand.h \ + editing/CompositeEditCommand.h \ + editing/CreateLinkCommand.h \ + editing/DeleteButtonController.h \ + editing/DeleteButton.h \ + editing/DeleteFromTextNodeCommand.h \ + editing/DeleteSelectionCommand.h \ + editing/EditCommand.h \ + editing/Editor.h \ + editing/FormatBlockCommand.h \ + editing/htmlediting.h \ + editing/HTMLInterchange.h \ + editing/IndentOutdentCommand.h \ + editing/InsertIntoTextNodeCommand.h \ + editing/InsertLineBreakCommand.h \ + editing/InsertListCommand.h \ + editing/InsertNodeBeforeCommand.h \ + editing/InsertParagraphSeparatorCommand.h \ + editing/InsertTextCommand.h \ + editing/JoinTextNodesCommand.h \ + editing/markup.h \ + editing/MergeIdenticalElementsCommand.h \ + editing/ModifySelectionListLevel.h \ + editing/MoveSelectionCommand.h \ + editing/RemoveCSSPropertyCommand.h \ + editing/RemoveFormatCommand.h \ + editing/RemoveNodeCommand.h \ + editing/RemoveNodePreservingChildrenCommand.h \ + editing/ReplaceNodeWithSpanCommand.h \ + editing/ReplaceSelectionCommand.h \ + editing/SelectionController.h \ + editing/SetNodeAttributeCommand.h \ + editing/SmartReplace.h \ + editing/SplitElementCommand.h \ + editing/SplitTextNodeCommand.h \ + editing/SplitTextNodeContainingElementCommand.h \ + editing/TextIterator.h \ + editing/TypingCommand.h \ + editing/UnlinkCommand.h \ + editing/VisiblePosition.h \ + editing/VisibleSelection.h \ + editing/visible_units.h \ + editing/WrapContentsInDummySpanCommand.h \ + history/BackForwardList.h \ + history/CachedFrame.h \ + history/CachedPage.h \ + history/HistoryItem.h \ + history/PageCache.h \ + html/CanvasGradient.h \ + html/CanvasPattern.h \ + html/CanvasPixelArray.h \ + html/CanvasRenderingContext2D.h \ + html/CanvasStyle.h \ + html/CollectionCache.h \ + html/DataGridColumn.h \ + html/DataGridColumnList.h \ + html/DOMDataGridDataSource.h \ + html/File.h \ + html/FileList.h \ + html/FormDataList.h \ + html/HTMLAnchorElement.h \ + html/HTMLAppletElement.h \ + html/HTMLAreaElement.h \ + html/HTMLAudioElement.h \ + html/HTMLBaseElement.h \ + html/HTMLBaseFontElement.h \ + html/HTMLBlockquoteElement.h \ + html/HTMLBodyElement.h \ + html/HTMLBRElement.h \ + html/HTMLButtonElement.h \ + html/HTMLCanvasElement.h \ + html/HTMLCollection.h \ + html/HTMLDataGridCellElement.h \ + html/HTMLDataGridColElement.h \ + html/HTMLDataGridElement.h \ + html/HTMLDataGridRowElement.h \ + html/HTMLDirectoryElement.h \ + html/HTMLDivElement.h \ + html/HTMLDListElement.h \ + html/HTMLDocument.h \ + html/HTMLElement.h \ + html/HTMLEmbedElement.h \ + html/HTMLFieldSetElement.h \ + html/HTMLFontElement.h \ + html/HTMLFormCollection.h \ + html/HTMLFormControlElement.h \ + html/HTMLFormElement.h \ + html/HTMLFrameElementBase.h \ + html/HTMLFrameElement.h \ + html/HTMLFrameOwnerElement.h \ + html/HTMLFrameSetElement.h \ + html/HTMLHeadElement.h \ + html/HTMLHeadingElement.h \ + html/HTMLHRElement.h \ + html/HTMLHtmlElement.h \ + html/HTMLIFrameElement.h \ + html/HTMLImageElement.h \ + html/HTMLImageLoader.h \ + html/HTMLInputElement.h \ + html/HTMLIsIndexElement.h \ + html/HTMLKeygenElement.h \ + html/HTMLLabelElement.h \ + html/HTMLLegendElement.h \ + html/HTMLLIElement.h \ + html/HTMLLinkElement.h \ + html/HTMLMapElement.h \ + html/HTMLMarqueeElement.h \ + html/HTMLMediaElement.h \ + html/HTMLMenuElement.h \ + html/HTMLMetaElement.h \ + html/HTMLModElement.h \ + html/HTMLNameCollection.h \ + html/HTMLNoScriptElement.h \ + html/HTMLObjectElement.h \ + html/HTMLOListElement.h \ + html/HTMLOptGroupElement.h \ + html/HTMLOptionElement.h \ + html/HTMLOptionsCollection.h \ + html/HTMLParagraphElement.h \ + html/HTMLParamElement.h \ + html/HTMLParserErrorCodes.h \ + html/HTMLParser.h \ + html/HTMLPlugInElement.h \ + html/HTMLPlugInImageElement.h \ + html/HTMLPreElement.h \ + html/HTMLQuoteElement.h \ + html/HTMLScriptElement.h \ + html/HTMLSelectElement.h \ + html/HTMLSourceElement.h \ + html/HTMLStyleElement.h \ + html/HTMLTableCaptionElement.h \ + html/HTMLTableCellElement.h \ + html/HTMLTableColElement.h \ + html/HTMLTableElement.h \ + html/HTMLTablePartElement.h \ + html/HTMLTableRowElement.h \ + html/HTMLTableRowsCollection.h \ + html/HTMLTableSectionElement.h \ + html/HTMLTextAreaElement.h \ + html/HTMLTitleElement.h \ + html/HTMLTokenizer.h \ + html/HTMLUListElement.h \ + html/HTMLVideoElement.h \ + html/HTMLViewSourceDocument.h \ + html/ImageData.h \ + html/PreloadScanner.h \ + html/TimeRanges.h \ + html/ValidityState.h \ + inspector/ConsoleMessage.h \ + inspector/InspectorBackend.h \ + inspector/InspectorController.h \ + inspector/InspectorDatabaseResource.h \ + inspector/InspectorDOMStorageResource.h \ + inspector/InspectorFrontend.h \ + inspector/InspectorJSONObject.h \ + inspector/InspectorResource.h \ + inspector/JavaScriptCallFrame.h \ + inspector/JavaScriptDebugServer.h \ + inspector/JavaScriptProfile.h \ + inspector/JavaScriptProfileNode.h \ + loader/appcache/ApplicationCacheGroup.h \ + loader/appcache/ApplicationCache.h \ + loader/appcache/ApplicationCacheResource.h \ + loader/appcache/ApplicationCacheStorage.h \ + loader/appcache/DOMApplicationCache.h \ + loader/appcache/ManifestParser.h \ + loader/archive/ArchiveFactory.h \ + loader/archive/ArchiveResourceCollection.h \ + loader/archive/ArchiveResource.h \ + loader/CachedCSSStyleSheet.h \ + loader/CachedFont.h \ + loader/CachedImage.h \ + loader/CachedResourceClientWalker.h \ + loader/CachedResource.h \ + loader/CachedResourceHandle.h \ + loader/CachedScript.h \ + loader/CachedXSLStyleSheet.h \ + loader/Cache.h \ + loader/CrossOriginAccessControl.h \ + loader/CrossOriginPreflightResultCache.h \ + loader/DocLoader.h \ + loader/DocumentLoader.h \ + loader/DocumentThreadableLoader.h \ + loader/FormState.h \ + loader/FrameLoader.h \ + loader/FTPDirectoryDocument.h \ + loader/FTPDirectoryParser.h \ + loader/icon/IconDatabase.h \ + loader/icon/IconLoader.h \ + loader/icon/IconRecord.h \ + loader/icon/PageURLRecord.h \ + loader/ImageDocument.h \ + loader/ImageLoader.h \ + loader/loader.h \ + loader/MainResourceLoader.h \ + loader/MediaDocument.h \ + loader/NavigationAction.h \ + loader/NetscapePlugInStreamLoader.h \ + loader/PlaceholderDocument.h \ + loader/PluginDocument.h \ + loader/ProgressTracker.h \ + loader/Request.h \ + loader/ResourceLoader.h \ + loader/SubresourceLoader.h \ + loader/TextDocument.h \ + loader/TextResourceDecoder.h \ + loader/ThreadableLoader.h \ + loader/UserStyleSheetLoader.h \ + loader/WorkerThreadableLoader.h \ + page/animation/AnimationBase.h \ + page/animation/AnimationController.h \ + page/animation/CompositeAnimation.h \ + page/animation/ImplicitAnimation.h \ + page/animation/KeyframeAnimation.h \ + page/BarInfo.h \ + page/Chrome.h \ + page/Console.h \ + page/ContextMenuController.h \ + page/Coordinates.h \ + page/DOMSelection.h \ + page/DOMTimer.h \ + page/DOMWindow.h \ + page/DragController.h \ + page/EventHandler.h \ + page/FocusController.h \ + page/Frame.h \ + page/FrameTree.h \ + page/FrameView.h \ + page/Geolocation.h \ + page/Geoposition.h \ + page/History.h \ + page/Location.h \ + page/MouseEventWithHitTestResults.h \ + page/NavigatorBase.h \ + page/Navigator.h \ + page/PageGroup.h \ + page/PageGroupLoadDeferrer.h \ + page/Page.h \ + page/PrintContext.h \ + page/Screen.h \ + page/SecurityOrigin.h \ + page/Settings.h \ + page/WindowFeatures.h \ + page/WorkerNavigator.h \ + page/XSSAuditor.h \ + platform/animation/Animation.h \ + platform/animation/AnimationList.h \ + platform/Arena.h \ + platform/ContentType.h \ + platform/ContextMenu.h \ + platform/CrossThreadCopier.h \ + platform/DeprecatedPtrListImpl.h \ + platform/DragData.h \ + platform/DragImage.h \ + platform/FileChooser.h \ + platform/GeolocationService.h \ + platform/graphics/BitmapImage.h \ + platform/graphics/Color.h \ + platform/graphics/filters/FEBlend.h \ + platform/graphics/filters/FEColorMatrix.h \ + platform/graphics/filters/FEComponentTransfer.h \ + platform/graphics/filters/FEComposite.h \ + platform/graphics/filters/FilterEffect.h \ + platform/graphics/filters/SourceAlpha.h \ + platform/graphics/filters/SourceGraphic.h \ + platform/graphics/FloatPoint3D.h \ + platform/graphics/FloatPoint.h \ + platform/graphics/FloatQuad.h \ + platform/graphics/FloatRect.h \ + platform/graphics/FloatSize.h \ + platform/graphics/FontData.h \ + platform/graphics/FontDescription.h \ + platform/graphics/FontFamily.h \ + platform/graphics/Font.h \ + platform/graphics/GeneratedImage.h \ + platform/graphics/Gradient.h \ + platform/graphics/GraphicsContext.h \ + platform/graphics/GraphicsTypes.h \ + platform/graphics/Image.h \ + platform/graphics/IntRect.h \ + platform/graphics/MediaPlayer.h \ + platform/graphics/Path.h \ + platform/graphics/PathTraversalState.h \ + platform/graphics/Pattern.h \ + platform/graphics/Pen.h \ + platform/graphics/qt/FontCustomPlatformData.h \ + platform/graphics/qt/ImageDecoderQt.h \ + platform/graphics/qt/StillImageQt.h \ + platform/graphics/SegmentedFontData.h \ + platform/graphics/SimpleFontData.h \ + platform/graphics/transforms/Matrix3DTransformOperation.h \ + platform/graphics/transforms/MatrixTransformOperation.h \ + platform/graphics/transforms/PerspectiveTransformOperation.h \ + platform/graphics/transforms/RotateTransformOperation.h \ + platform/graphics/transforms/ScaleTransformOperation.h \ + platform/graphics/transforms/SkewTransformOperation.h \ + platform/graphics/transforms/TransformationMatrix.h \ + platform/graphics/transforms/TransformOperations.h \ + platform/graphics/transforms/TranslateTransformOperation.h \ + platform/KURL.h \ + platform/Length.h \ + platform/LinkHash.h \ + platform/Logging.h \ + platform/MIMETypeRegistry.h \ + platform/network/AuthenticationChallengeBase.h \ + platform/network/Credential.h \ + platform/network/FormDataBuilder.h \ + platform/network/FormData.h \ + platform/network/HTTPHeaderMap.h \ + platform/network/HTTPParsers.h \ + platform/network/NetworkStateNotifier.h \ + platform/network/ProtectionSpace.h \ + platform/network/qt/QNetworkReplyHandler.h \ + platform/network/ResourceErrorBase.h \ + platform/network/ResourceHandle.h \ + platform/network/ResourceRequestBase.h \ + platform/network/ResourceResponseBase.h \ + platform/qt/ClipboardQt.h \ + platform/qt/QWebPopup.h \ + platform/qt/RenderThemeQt.h \ + platform/qt/ScrollbarThemeQt.h \ + platform/Scrollbar.h \ + platform/ScrollbarThemeComposite.h \ + platform/ScrollView.h \ + platform/SharedBuffer.h \ + platform/sql/SQLiteDatabase.h \ + platform/sql/SQLiteFileSystem.h \ + platform/sql/SQLiteStatement.h \ + platform/sql/SQLiteTransaction.h \ + platform/sql/SQLValue.h \ + platform/text/AtomicString.h \ + platform/text/Base64.h \ + platform/text/BidiContext.h \ + platform/text/CString.h \ + platform/text/qt/TextCodecQt.h \ + platform/text/RegularExpression.h \ + platform/text/SegmentedString.h \ + platform/text/StringBuilder.h \ + platform/text/StringImpl.h \ + platform/text/TextCodec.h \ + platform/text/TextCodecLatin1.h \ + platform/text/TextCodecUserDefined.h \ + platform/text/TextCodecUTF16.h \ + platform/text/TextEncoding.h \ + platform/text/TextEncodingRegistry.h \ + platform/text/TextStream.h \ + platform/text/UnicodeRange.h \ + platform/ThreadGlobalData.h \ + platform/ThreadTimers.h \ + platform/Timer.h \ + platform/Widget.h \ + plugins/MimeTypeArray.h \ + plugins/MimeType.h \ + plugins/PluginArray.h \ + plugins/PluginDatabase.h \ + plugins/PluginData.h \ + plugins/PluginDebug.h \ + plugins/Plugin.h \ + plugins/PluginInfoStore.h \ + plugins/PluginMainThreadScheduler.h \ + plugins/PluginPackage.h \ + plugins/PluginStream.h \ + plugins/PluginView.h \ + plugins/win/PluginMessageThrottlerWin.h \ + rendering/AutoTableLayout.h \ + rendering/break_lines.h \ + rendering/CounterNode.h \ + rendering/EllipsisBox.h \ + rendering/FixedTableLayout.h \ + rendering/HitTestResult.h \ + rendering/InlineBox.h \ + rendering/InlineFlowBox.h \ + rendering/InlineTextBox.h \ + rendering/LayoutState.h \ + rendering/MediaControlElements.h \ + rendering/PointerEventsHitRules.h \ + rendering/RenderApplet.h \ + rendering/RenderArena.h \ + rendering/RenderBlock.h \ + rendering/RenderBox.h \ + rendering/RenderBoxModelObject.h \ + rendering/RenderBR.h \ + rendering/RenderButton.h \ + rendering/RenderCounter.h \ + rendering/RenderDataGrid.h \ + rendering/RenderFieldset.h \ + rendering/RenderFileUploadControl.h \ + rendering/RenderFlexibleBox.h \ + rendering/RenderForeignObject.h \ + rendering/RenderFrame.h \ + rendering/RenderFrameSet.h \ + rendering/RenderHTMLCanvas.h \ + rendering/RenderImageGeneratedContent.h \ + rendering/RenderImage.h \ + rendering/RenderInline.h \ + rendering/RenderLayer.h \ + rendering/RenderLineBoxList.h \ + rendering/RenderListBox.h \ + rendering/RenderListItem.h \ + rendering/RenderListMarker.h \ + rendering/RenderMarquee.h \ + rendering/RenderMedia.h \ + rendering/RenderMenuList.h \ + rendering/RenderObjectChildList.h \ + rendering/RenderObject.h \ + rendering/RenderPart.h \ + rendering/RenderPartObject.h \ + rendering/RenderPath.h \ + rendering/RenderReplaced.h \ + rendering/RenderReplica.h \ + rendering/RenderScrollbar.h \ + rendering/RenderScrollbarPart.h \ + rendering/RenderScrollbarTheme.h \ + rendering/RenderSlider.h \ + rendering/RenderSVGBlock.h \ + rendering/RenderSVGContainer.h \ + rendering/RenderSVGGradientStop.h \ + rendering/RenderSVGHiddenContainer.h \ + rendering/RenderSVGImage.h \ + rendering/RenderSVGInline.h \ + rendering/RenderSVGInlineText.h \ + rendering/RenderSVGModelObject.h \ + rendering/RenderSVGRoot.h \ + rendering/RenderSVGText.h \ + rendering/RenderSVGTextPath.h \ + rendering/RenderSVGTransformableContainer.h \ + rendering/RenderSVGTSpan.h \ + rendering/RenderSVGViewportContainer.h \ + rendering/RenderTableCell.h \ + rendering/RenderTableCol.h \ + rendering/RenderTable.h \ + rendering/RenderTableRow.h \ + rendering/RenderTableSection.h \ + rendering/RenderTextControl.h \ + rendering/RenderTextControlMultiLine.h \ + rendering/RenderTextControlSingleLine.h \ + rendering/RenderTextFragment.h \ + rendering/RenderText.h \ + rendering/RenderTheme.h \ + rendering/RenderTreeAsText.h \ + rendering/RenderVideo.h \ + rendering/RenderView.h \ + rendering/RenderWidget.h \ + rendering/RenderWordBreak.h \ + rendering/RootInlineBox.h \ + rendering/ScrollBehavior.h \ + rendering/style/BindingURI.h \ + rendering/style/ContentData.h \ + rendering/style/CounterDirectives.h \ + rendering/style/CursorData.h \ + rendering/style/CursorList.h \ + rendering/style/FillLayer.h \ + rendering/style/KeyframeList.h \ + rendering/style/NinePieceImage.h \ + rendering/style/RenderStyle.h \ + rendering/style/ShadowData.h \ + rendering/style/StyleBackgroundData.h \ + rendering/style/StyleBoxData.h \ + rendering/style/StyleCachedImage.h \ + rendering/style/StyleFlexibleBoxData.h \ + rendering/style/StyleGeneratedImage.h \ + rendering/style/StyleInheritedData.h \ + rendering/style/StyleMarqueeData.h \ + rendering/style/StyleMultiColData.h \ + rendering/style/StyleRareInheritedData.h \ + rendering/style/StyleRareNonInheritedData.h \ + rendering/style/StyleReflection.h \ + rendering/style/StyleSurroundData.h \ + rendering/style/StyleTransformData.h \ + rendering/style/StyleVisualData.h \ + rendering/style/SVGRenderStyleDefs.h \ + rendering/style/SVGRenderStyle.h \ + rendering/SVGCharacterLayoutInfo.h \ + rendering/SVGInlineFlowBox.h \ + rendering/SVGInlineTextBox.h \ + rendering/SVGRenderSupport.h \ + rendering/SVGRenderTreeAsText.h \ + rendering/SVGRootInlineBox.h \ + rendering/TextControlInnerElements.h \ + rendering/TransformState.h \ + svg/animation/SMILTimeContainer.h \ + svg/animation/SMILTime.h \ + svg/animation/SVGSMILElement.h \ + svg/ColorDistance.h \ + svg/graphics/filters/SVGFEConvolveMatrix.h \ + svg/graphics/filters/SVGFEDiffuseLighting.h \ + svg/graphics/filters/SVGFEDisplacementMap.h \ + svg/graphics/filters/SVGFEFlood.h \ + svg/graphics/filters/SVGFEGaussianBlur.h \ + svg/graphics/filters/SVGFEImage.h \ + svg/graphics/filters/SVGFEMerge.h \ + svg/graphics/filters/SVGFEMorphology.h \ + svg/graphics/filters/SVGFEOffset.h \ + svg/graphics/filters/SVGFESpecularLighting.h \ + svg/graphics/filters/SVGFETile.h \ + svg/graphics/filters/SVGFETurbulence.h \ + svg/graphics/filters/SVGFilterBuilder.h \ + svg/graphics/filters/SVGFilter.h \ + svg/graphics/filters/SVGLightSource.h \ + svg/graphics/SVGImage.h \ + svg/graphics/SVGPaintServerGradient.h \ + svg/graphics/SVGPaintServer.h \ + svg/graphics/SVGPaintServerLinearGradient.h \ + svg/graphics/SVGPaintServerPattern.h \ + svg/graphics/SVGPaintServerRadialGradient.h \ + svg/graphics/SVGPaintServerSolid.h \ + svg/graphics/SVGResourceClipper.h \ + svg/graphics/SVGResourceFilter.h \ + svg/graphics/SVGResource.h \ + svg/graphics/SVGResourceMarker.h \ + svg/graphics/SVGResourceMasker.h \ + svg/SVGAElement.h \ + svg/SVGAltGlyphElement.h \ + svg/SVGAngle.h \ + svg/SVGAnimateColorElement.h \ + svg/SVGAnimatedPathData.h \ + svg/SVGAnimatedPoints.h \ + svg/SVGAnimateElement.h \ + svg/SVGAnimateMotionElement.h \ + svg/SVGAnimateTransformElement.h \ + svg/SVGAnimationElement.h \ + svg/SVGCircleElement.h \ + svg/SVGClipPathElement.h \ + svg/SVGColor.h \ + svg/SVGComponentTransferFunctionElement.h \ + svg/SVGCursorElement.h \ + svg/SVGDefinitionSrcElement.h \ + svg/SVGDefsElement.h \ + svg/SVGDescElement.h \ + svg/SVGDocumentExtensions.h \ + svg/SVGDocument.h \ + svg/SVGElement.h \ + svg/SVGElementInstance.h \ + svg/SVGElementInstanceList.h \ + svg/SVGEllipseElement.h \ + svg/SVGExternalResourcesRequired.h \ + svg/SVGFEBlendElement.h \ + svg/SVGFEColorMatrixElement.h \ + svg/SVGFEComponentTransferElement.h \ + svg/SVGFECompositeElement.h \ + svg/SVGFEDiffuseLightingElement.h \ + svg/SVGFEDisplacementMapElement.h \ + svg/SVGFEDistantLightElement.h \ + svg/SVGFEFloodElement.h \ + svg/SVGFEFuncAElement.h \ + svg/SVGFEFuncBElement.h \ + svg/SVGFEFuncGElement.h \ + svg/SVGFEFuncRElement.h \ + svg/SVGFEGaussianBlurElement.h \ + svg/SVGFEImageElement.h \ + svg/SVGFELightElement.h \ + svg/SVGFEMergeElement.h \ + svg/SVGFEMergeNodeElement.h \ + svg/SVGFEOffsetElement.h \ + svg/SVGFEPointLightElement.h \ + svg/SVGFESpecularLightingElement.h \ + svg/SVGFESpotLightElement.h \ + svg/SVGFETileElement.h \ + svg/SVGFETurbulenceElement.h \ + svg/SVGFilterElement.h \ + svg/SVGFilterPrimitiveStandardAttributes.h \ + svg/SVGFitToViewBox.h \ + svg/SVGFontData.h \ + svg/SVGFontElement.h \ + svg/SVGFontFaceElement.h \ + svg/SVGFontFaceFormatElement.h \ + svg/SVGFontFaceNameElement.h \ + svg/SVGFontFaceSrcElement.h \ + svg/SVGFontFaceUriElement.h \ + svg/SVGForeignObjectElement.h \ + svg/SVGGElement.h \ + svg/SVGGlyphElement.h \ + svg/SVGGradientElement.h \ + svg/SVGHKernElement.h \ + svg/SVGImageElement.h \ + svg/SVGImageLoader.h \ + svg/SVGLangSpace.h \ + svg/SVGLength.h \ + svg/SVGLengthList.h \ + svg/SVGLinearGradientElement.h \ + svg/SVGLineElement.h \ + svg/SVGLocatable.h \ + svg/SVGMarkerElement.h \ + svg/SVGMaskElement.h \ + svg/SVGMetadataElement.h \ + svg/SVGMissingGlyphElement.h \ + svg/SVGMPathElement.h \ + svg/SVGNumberList.h \ + svg/SVGPaint.h \ + svg/SVGParserUtilities.h \ + svg/SVGPathElement.h \ + svg/SVGPathSegArc.h \ + svg/SVGPathSegClosePath.h \ + svg/SVGPathSegCurvetoCubic.h \ + svg/SVGPathSegCurvetoCubicSmooth.h \ + svg/SVGPathSegCurvetoQuadratic.h \ + svg/SVGPathSegCurvetoQuadraticSmooth.h \ + svg/SVGPathSegLineto.h \ + svg/SVGPathSegLinetoHorizontal.h \ + svg/SVGPathSegLinetoVertical.h \ + svg/SVGPathSegList.h \ + svg/SVGPathSegMoveto.h \ + svg/SVGPatternElement.h \ + svg/SVGPointList.h \ + svg/SVGPolyElement.h \ + svg/SVGPolygonElement.h \ + svg/SVGPolylineElement.h \ + svg/SVGPreserveAspectRatio.h \ + svg/SVGRadialGradientElement.h \ + svg/SVGRectElement.h \ + svg/SVGScriptElement.h \ + svg/SVGSetElement.h \ + svg/SVGStopElement.h \ + svg/SVGStringList.h \ + svg/SVGStylable.h \ + svg/SVGStyledElement.h \ + svg/SVGStyledLocatableElement.h \ + svg/SVGStyledTransformableElement.h \ + svg/SVGStyleElement.h \ + svg/SVGSVGElement.h \ + svg/SVGSwitchElement.h \ + svg/SVGSymbolElement.h \ + svg/SVGTests.h \ + svg/SVGTextContentElement.h \ + svg/SVGTextElement.h \ + svg/SVGTextPathElement.h \ + svg/SVGTextPositioningElement.h \ + svg/SVGTitleElement.h \ + svg/SVGTransformable.h \ + svg/SVGTransformDistance.h \ + svg/SVGTransform.h \ + svg/SVGTransformList.h \ + svg/SVGTRefElement.h \ + svg/SVGTSpanElement.h \ + svg/SVGURIReference.h \ + svg/SVGUseElement.h \ + svg/SVGViewElement.h \ + svg/SVGViewSpec.h \ + svg/SVGZoomAndPan.h \ + svg/SVGZoomEvent.h \ + wml/WMLAccessElement.h \ + wml/WMLAElement.h \ + wml/WMLAnchorElement.h \ + wml/WMLBRElement.h \ + wml/WMLCardElement.h \ + wml/WMLDocument.h \ + wml/WMLDoElement.h \ + wml/WMLElement.h \ + wml/WMLErrorHandling.h \ + wml/WMLEventHandlingElement.h \ + wml/WMLFieldSetElement.h \ + wml/WMLFormControlElement.h \ + wml/WMLGoElement.h \ + wml/WMLImageElement.h \ + wml/WMLImageLoader.h \ + wml/WMLInputElement.h \ + wml/WMLInsertedLegendElement.h \ + wml/WMLIntrinsicEvent.h \ + wml/WMLIntrinsicEventHandler.h \ + wml/WMLMetaElement.h \ + wml/WMLNoopElement.h \ + wml/WMLOnEventElement.h \ + wml/WMLOptGroupElement.h \ + wml/WMLOptionElement.h \ + wml/WMLPageState.h \ + wml/WMLPElement.h \ + wml/WMLPostfieldElement.h \ + wml/WMLPrevElement.h \ + wml/WMLRefreshElement.h \ + wml/WMLSelectElement.h \ + wml/WMLSetvarElement.h \ + wml/WMLTableElement.h \ + wml/WMLTaskElement.h \ + wml/WMLTemplateElement.h \ + wml/WMLTimerElement.h \ + wml/WMLVariables.h \ + workers/AbstractWorker.h \ + workers/SharedWorker.h \ + workers/WorkerContext.h \ + workers/Worker.h \ + workers/WorkerLocation.h \ + workers/WorkerMessagingProxy.h \ + workers/WorkerRunLoop.h \ + workers/WorkerScriptLoader.h \ + workers/WorkerThread.h \ + xml/DOMParser.h \ + xml/NativeXPathNSResolver.h \ + xml/XMLHttpRequest.h \ + xml/XMLHttpRequestUpload.h \ + xml/XMLSerializer.h \ + xml/XPathEvaluator.h \ + xml/XPathExpression.h \ + xml/XPathExpressionNode.h \ + xml/XPathFunctions.h \ + xml/XPathNamespace.h \ + xml/XPathNodeSet.h \ + xml/XPathNSResolver.h \ + xml/XPathParser.h \ + xml/XPathPath.h \ + xml/XPathPredicate.h \ + xml/XPathResult.h \ + xml/XPathStep.h \ + xml/XPathUtil.h \ + xml/XPathValue.h \ + xml/XPathVariableReference.h \ + xml/XSLImportRule.h \ + xml/XSLStyleSheet.h \ + xml/XSLTExtensions.h \ + xml/XSLTProcessor.h \ + xml/XSLTUnicodeSort.h \ $$PWD/../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \ - $$PWD/platform/network/qt/QNetworkReplyHandler.h \ - $$PWD/rendering/style/CursorData.h \ - $$PWD/rendering/style/CursorList.h \ - $$PWD/rendering/style/StyleInheritedData.h \ - $$PWD/rendering/style/StyleRareInheritedData.h \ - $$PWD/rendering/style/StyleRareNonInheritedData.h \ - $$PWD/rendering/style/StyleReflection.h - SOURCES += \ accessibility/qt/AccessibilityObjectQt.cpp \ @@ -1309,25 +2248,28 @@ contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=0) { DASHBOARDSUPPORTCSSPROPERTIES -= $$PWD/css/DashboardSupportCSSPropertyNames.in } +contains(DEFINES, ENABLE_DATAGRID=1) { + FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATAGRID=1 +} + contains(DEFINES, ENABLE_SQLITE=1) { - # somewhat copied from src/plugins/sqldrivers/sqlite/sqlite.pro - CONFIG(QTDIR_build):system-sqlite { - LIBS *= $$QT_LFLAGS_SQLITE - QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE - } else { - exists( $${SQLITE3SRCDIR}/sqlite3.c ) { - # we have source - use it - CONFIG(release, debug|release):DEFINES *= NDEBUG - DEFINES += SQLITE_CORE SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE - contains(DEFINES, ENABLE_SINGLE_THREADED=1) { - DEFINES+=SQLITE_THREADSAFE=0 - } + !system-sqlite:exists( $${SQLITE3SRCDIR}/sqlite3.c ) { + # Build sqlite3 into WebCore from source + # somewhat copied from $$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite/sqlite.pro INCLUDEPATH += $${SQLITE3SRCDIR} SOURCES += $${SQLITE3SRCDIR}/sqlite3.c + DEFINES += SQLITE_CORE SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE + CONFIG(release, debug|release): DEFINES *= NDEBUG + contains(DEFINES, ENABLE_SINGLE_THREADED=1): DEFINES += SQLITE_THREADSAFE=0 + } else { + # Use sqlite3 from the underlying OS + CONFIG(QTDIR_build) { + QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE + LIBS *= $$QT_LFLAGS_SQLITE } else { - # fall back to platform library - INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/ - LIBS += -lsqlite3 + INCLUDEPATH += $${SQLITE3SRCDIR} + symbian: LIBS += -lsqlite3.lib + else: LIBS += -lsqlite3 } } @@ -1377,13 +2319,25 @@ contains(DEFINES, ENABLE_DOM_STORAGE=1) { FEATURE_DEFINES_JAVASCRIPT += ENABLE_DOM_STORAGE=1 HEADERS += \ + storage/ChangeVersionWrapper.h \ + storage/DatabaseAuthorizer.h \ + storage/Database.h \ + storage/DatabaseTask.h \ + storage/DatabaseThread.h \ + storage/DatabaseTracker.h \ storage/LocalStorageTask.h \ storage/LocalStorageThread.h \ - storage/Storage.h \ + storage/OriginQuotaManager.h \ + storage/OriginUsageRecord.h \ + storage/SQLResultSet.h \ + storage/SQLResultSetRowList.h \ + storage/SQLStatement.h \ + storage/SQLTransaction.h \ storage/StorageArea.h \ storage/StorageAreaImpl.h \ storage/StorageAreaSync.h \ storage/StorageEvent.h \ + storage/Storage.h \ storage/StorageMap.h \ storage/StorageNamespace.h \ storage/StorageNamespaceImpl.h \ @@ -1423,11 +2377,15 @@ contains(DEFINES, ENABLE_WORKERS=1) { IDL_BINDINGS += \ page/WorkerNavigator.idl \ + workers/AbstractWorker.idl \ + workers/DedicatedWorkerContext.idl \ workers/Worker.idl \ workers/WorkerContext.idl \ workers/WorkerLocation.idl SOURCES += \ + bindings/js/JSAbstractWorkerCustom.cpp \ + bindings/js/JSDedicatedWorkerContextCustom.cpp \ bindings/js/JSWorkerConstructor.cpp \ bindings/js/JSWorkerContextBase.cpp \ bindings/js/JSWorkerContextCustom.cpp \ @@ -1435,6 +2393,8 @@ contains(DEFINES, ENABLE_WORKERS=1) { bindings/js/WorkerScriptController.cpp \ loader/WorkerThreadableLoader.cpp \ page/WorkerNavigator.cpp \ + workers/AbstractWorker.cpp \ + workers/DedicatedWorkerContext.cpp \ workers/Worker.cpp \ workers/WorkerContext.cpp \ workers/WorkerLocation.cpp \ @@ -1448,14 +2408,11 @@ contains(DEFINES, SHARED_WORKERS=1) { FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1 IDL_BINDINGS += \ - workers/AbstractWorker.idl \ workers/SharedWorker.idl SOURCES += \ - bindings/js/JSAbstractWorkerCustom.cpp \ bindings/js/JSSharedWorkerConstructor.cpp \ bindings/js/JSSharedWorkerCustom.cpp \ - workers/AbstractWorker.cpp \ workers/SharedWorker.cpp } @@ -2020,6 +2977,7 @@ contains(DEFINES, ENABLE_SVG=1) { cssprops.input = WALDOCSSPROPS cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$DASHBOARDSUPPORTCSSPROPERTIES $$SVGCSSPROPERTIES > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.in && cd $$GENERATED_SOURCES_DIR && perl $$PWD/css/makeprop.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.strip ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf cssprops.CONFIG = target_predeps no_link + cssprops.variable_out = cssprops.depend = ${QMAKE_FILE_NAME} DASHBOARDSUPPORTCSSPROPERTIES SVGCSSPROPERTIES addExtraCompilerWithHeader(cssprops) @@ -2028,6 +2986,7 @@ contains(DEFINES, ENABLE_SVG=1) { cssvalues.input = WALDOCSSVALUES cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$SVGCSSVALUES > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.in && cd $$GENERATED_SOURCES_DIR && perl $$PWD/css/makevalues.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.strip ${QMAKE_FILE_BASE}.gperf cssvalues.CONFIG = target_predeps no_link + cssvalues.variable_out = cssvalues.depend = ${QMAKE_FILE_NAME} SVGCSSVALUES addExtraCompilerWithHeader(cssvalues) } else { @@ -2036,6 +2995,7 @@ contains(DEFINES, ENABLE_SVG=1) { cssprops.input = WALDOCSSPROPS cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$DASHBOARDSUPPORTCSSPROPERTIES > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.in && cd $$GENERATED_SOURCES_DIR && perl $$PWD/css/makeprop.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.strip ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf cssprops.CONFIG = target_predeps no_link + cssprops.variable_out = cssprops.depend = ${QMAKE_FILE_NAME} DASHBOARDSUPPORTCSSPROPERTIES addExtraCompilerWithHeader(cssprops) @@ -2044,6 +3004,7 @@ contains(DEFINES, ENABLE_SVG=1) { cssvalues.input = WALDOCSSVALUES cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.in && cd $$GENERATED_SOURCES_DIR && perl $$PWD/css/makevalues.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.strip ${QMAKE_FILE_BASE}.gperf cssvalues.CONFIG = target_predeps no_link + cssvalues.variable_out = cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}${QMAKE_FILE_BASE}.h addExtraCompiler(cssvalues) } @@ -2100,6 +3061,7 @@ tokenizer.commands = flex -t < ${QMAKE_FILE_NAME} | perl $$PWD/css/maketokenizer tokenizer.dependency_type = TYPE_C tokenizer.input = TOKENIZER tokenizer.CONFIG += target_predeps no_link +tokenizer.variable_out = addExtraCompiler(tokenizer) # GENERATOR 4: CSS grammar @@ -2154,6 +3116,7 @@ entities.commands = gperf -a -L ANSI-C -C -G -c -o -t --key-positions="*" -N fin entities.input = ENTITIES_GPERF entities.dependency_type = TYPE_C entities.CONFIG = target_predeps no_link +entities.variable_out = entities.clean = ${QMAKE_FILE_OUT} addExtraCompiler(entities) @@ -2163,6 +3126,7 @@ doctypestrings.input = DOCTYPESTRINGS doctypestrings.commands = perl -e \"print \'$${LITERAL_HASH}include <string.h>\';\" > ${QMAKE_FILE_OUT} && echo // bogus >> ${QMAKE_FILE_OUT} && gperf -CEot -L ANSI-C --key-positions="*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT} doctypestrings.dependency_type = TYPE_C doctypestrings.CONFIG += target_predeps no_link +doctypestrings.variable_out = doctypestrings.clean = ${QMAKE_FILE_OUT} addExtraCompiler(doctypestrings) @@ -2171,6 +3135,7 @@ colordata.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}ColorData.c colordata.commands = perl -e \"print \'$${LITERAL_HASH}include <string.h>\';\" > ${QMAKE_FILE_OUT} && echo // bogus >> ${QMAKE_FILE_OUT} && gperf -CDEot -L ANSI-C --key-positions="*" -N findColor -D -s 2 < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT} colordata.input = COLORDAT_GPERF colordata.CONFIG = target_predeps no_link +colordata.variable_out = addExtraCompiler(colordata) # GENERATOR 9: diff --git a/src/3rdparty/webkit/WebCore/WebCorePrefix.h b/src/3rdparty/webkit/WebCore/WebCorePrefix.h index e857ecc822..c0d1e7090c 100644 --- a/src/3rdparty/webkit/WebCore/WebCorePrefix.h +++ b/src/3rdparty/webkit/WebCore/WebCorePrefix.h @@ -18,8 +18,8 @@ * */ -/* This prefix file is for use on Mac OS X and Windows only. It should contain only: - * 1) files to precompile on Mac OS X and Windows for faster builds +/* This prefix file should contain only: + * 1) files to precompile for faster builds * 2) in one case at least: OS-X-specific performance bug workarounds * 3) the special trick to catch us using new or delete without including "config.h" * The project should be able to build without this header, although we rarely test that. @@ -45,9 +45,11 @@ #define WINVER 0x0500 #endif +#ifndef WTF_USE_CURL #ifndef _WINSOCKAPI_ #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h #endif +#endif // If we don't define these, they get defined in windef.h. // We want to use std::min and std::max @@ -65,7 +67,13 @@ #if defined(__APPLE__) #include <regex.h> #endif + +// On Linux this causes conflicts with libpng because there are two impls. of +// longjmp - see here: https://bugs.launchpad.net/ubuntu/+source/libpng/+bug/218409 +#ifndef BUILDING_WX__ #include <setjmp.h> +#endif + #include <signal.h> #include <stdarg.h> #include <stddef.h> @@ -97,8 +105,16 @@ #include <time.h> +#ifndef BUILDING_WX__ #include <CoreFoundation/CoreFoundation.h> +#ifdef WIN_CAIRO +#include <ConditionalMacros.h> +#include <windows.h> +#include <stdio.h> +#else #include <CoreServices/CoreServices.h> +#endif +#endif #ifdef __OBJC__ #import <Cocoa/Cocoa.h> diff --git a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.cpp b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.cpp index a6cd62d95f..f1d829c800 100644 --- a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.cpp +++ b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.cpp @@ -80,31 +80,6 @@ void AccessibilityObject::detach() #endif } -AccessibilityObject* AccessibilityObject::firstChild() const -{ - return 0; -} - -AccessibilityObject* AccessibilityObject::lastChild() const -{ - return 0; -} - -AccessibilityObject* AccessibilityObject::previousSibling() const -{ - return 0; -} - -AccessibilityObject* AccessibilityObject::nextSibling() const -{ - return 0; -} - -AccessibilityObject* AccessibilityObject::parentObject() const -{ - return 0; -} - AccessibilityObject* AccessibilityObject::parentObjectUnignored() const { AccessibilityObject* parent; @@ -113,31 +88,6 @@ AccessibilityObject* AccessibilityObject::parentObjectUnignored() const return parent; } -AccessibilityObject* AccessibilityObject::parentObjectIfExists() const -{ - return 0; -} - -int AccessibilityObject::layoutCount() const -{ - return 0; -} - -String AccessibilityObject::text() const -{ - return String(); -} - -String AccessibilityObject::helpText() const -{ - return String(); -} - -String AccessibilityObject::textUnderElement() const -{ - return String(); -} - bool AccessibilityObject::isARIAInput(AccessibilityRole ariaRole) { return ariaRole == RadioButtonRole || ariaRole == CheckBoxRole || ariaRole == TextFieldRole; @@ -148,145 +98,12 @@ bool AccessibilityObject::isARIAControl(AccessibilityRole ariaRole) return isARIAInput(ariaRole) || ariaRole == TextAreaRole || ariaRole == ButtonRole || ariaRole == ComboBoxRole || ariaRole == SliderRole; } - -int AccessibilityObject::intValue() const -{ - return 0; -} - -String AccessibilityObject::stringValue() const -{ - return String(); -} - -String AccessibilityObject::ariaAccessiblityName(const String&) const -{ - return String(); -} - -String AccessibilityObject::ariaLabeledByAttribute() const -{ - return String(); -} - -String AccessibilityObject::title() const -{ - return String(); -} - -String AccessibilityObject::ariaDescribedByAttribute() const -{ - return String(); -} - -String AccessibilityObject::accessibilityDescription() const -{ - return String(); -} - -IntRect AccessibilityObject::boundingBoxRect() const -{ - return IntRect(); -} - -IntRect AccessibilityObject::elementRect() const -{ - return IntRect(); -} - -IntSize AccessibilityObject::size() const -{ - return IntSize(); -} IntPoint AccessibilityObject::clickPoint() const { IntRect rect = elementRect(); return IntPoint(rect.x() + rect.width() / 2, rect.y() + rect.height() / 2); } - -void AccessibilityObject::linkedUIElements(AccessibilityChildrenVector&) const -{ - return; -} - -AccessibilityObject* AccessibilityObject::titleUIElement() const -{ - return 0; -} - -int AccessibilityObject::textLength() const -{ - return 0; -} - -PassRefPtr<Range> AccessibilityObject::ariaSelectedTextDOMRange() const -{ - return 0; -} - -String AccessibilityObject::selectedText() const -{ - return String(); -} - -const AtomicString& AccessibilityObject::accessKey() const -{ - return nullAtom; -} - -VisibleSelection AccessibilityObject::selection() const -{ - return VisibleSelection(); -} - -PlainTextRange AccessibilityObject::selectedTextRange() const -{ - return PlainTextRange(); -} - -unsigned AccessibilityObject::selectionStart() const -{ - return selectedTextRange().start; -} - -unsigned AccessibilityObject::selectionEnd() const -{ - return selectedTextRange().length; -} - -void AccessibilityObject::setSelectedText(const String&) -{ - // TODO: set selected text (ReplaceSelectionCommand). <rdar://problem/4712125> - notImplemented(); -} - -void AccessibilityObject::setSelectedTextRange(const PlainTextRange&) -{ -} - -void AccessibilityObject::makeRangeVisible(const PlainTextRange&) -{ - // TODO: make range visible (scrollRectToVisible). <rdar://problem/4712101> - notImplemented(); -} - -KURL AccessibilityObject::url() const -{ - return KURL(); -} - -void AccessibilityObject::setFocused(bool) -{ -} - -void AccessibilityObject::setValue(const String&) -{ -} - -void AccessibilityObject::setSelected(bool) -{ -} bool AccessibilityObject::press() const { @@ -314,53 +131,6 @@ String AccessibilityObject::language() const return parent->language(); } -AXObjectCache* AccessibilityObject::axObjectCache() const -{ - return 0; -} - -Widget* AccessibilityObject::widget() const -{ - return 0; -} - -Widget* AccessibilityObject::widgetForAttachmentView() const -{ - return 0; -} - -Element* AccessibilityObject::anchorElement() const -{ - return 0; -} - -Element* AccessibilityObject::actionElement() const -{ - return 0; -} - -// This function is like a cross-platform version of - (WebCoreTextMarkerRange*)textMarkerRange. It returns -// a Range that we can convert to a WebCoreRange in the Obj-C file -VisiblePositionRange AccessibilityObject::visiblePositionRange() const -{ - return VisiblePositionRange(); -} - -VisiblePositionRange AccessibilityObject::visiblePositionRangeForLine(unsigned) const -{ - return VisiblePositionRange(); -} - -VisiblePosition AccessibilityObject::visiblePositionForIndex(int) const -{ - return VisiblePosition(); -} - -int AccessibilityObject::indexForVisiblePosition(const VisiblePosition&) const -{ - return 0; -} - VisiblePositionRange AccessibilityObject::visiblePositionRangeForUnorderedPositions(const VisiblePosition& visiblePos1, const VisiblePosition& visiblePos2) const { if (visiblePos1.isNull() || visiblePos2.isNull()) @@ -619,11 +389,6 @@ String AccessibilityObject::stringForVisiblePositionRange(const VisiblePositionR return String::adopt(resultVector); } -IntRect AccessibilityObject::boundsForVisiblePositionRange(const VisiblePositionRange&) const -{ - return IntRect(); -} - int AccessibilityObject::lengthForVisiblePositionRange(const VisiblePositionRange& visiblePositionRange) const { // FIXME: Multi-byte support @@ -651,25 +416,6 @@ int AccessibilityObject::lengthForVisiblePositionRange(const VisiblePositionRang return length; } -void AccessibilityObject::setSelectedVisiblePositionRange(const VisiblePositionRange&) const -{ -} - -VisiblePosition AccessibilityObject::visiblePositionForPoint(const IntPoint&) const -{ - return VisiblePosition(); -} - -VisiblePosition AccessibilityObject::nextVisiblePosition(const VisiblePosition& visiblePos) const -{ - return visiblePos.next(); -} - -VisiblePosition AccessibilityObject::previousVisiblePosition(const VisiblePosition& visiblePos) const -{ - return visiblePos.previous(); -} - VisiblePosition AccessibilityObject::nextWordEnd(const VisiblePosition& visiblePos) const { if (visiblePos.isNull()) @@ -818,12 +564,6 @@ VisiblePosition AccessibilityObject::previousParagraphStartPosition(const Visibl return startOfParagraph(previousPos); } -// NOTE: Consider providing this utility method as AX API -VisiblePosition AccessibilityObject::visiblePositionForIndex(unsigned, bool) const -{ - return VisiblePosition(); -} - AccessibilityObject* AccessibilityObject::accessibilityObjectForPosition(const VisiblePosition& visiblePos) const { if (visiblePos.isNull()) @@ -869,19 +609,6 @@ PlainTextRange AccessibilityObject::plainTextRangeForVisiblePositionRange(const return PlainTextRange(index1, index2 - index1); } -// NOTE: Consider providing this utility method as AX API -int AccessibilityObject::index(const VisiblePosition&) const -{ - return -1; -} - -// Given a line number, the range of characters of the text associated with this accessibility -// object that contains the line number. -PlainTextRange AccessibilityObject::doAXRangeForLine(unsigned) const -{ - return PlainTextRange(); -} - // The composed character range in the text associated with this accessibility object that // is specified by the given screen coordinates. This parameterized attribute returns the // complete range of characters (including surrogate pairs of multi-byte glyphs) at the given @@ -897,14 +624,6 @@ PlainTextRange AccessibilityObject::doAXRangeForPosition(const IntPoint& point) return PlainTextRange(i, 1); } -// The composed character range in the text associated with this accessibility object that -// is specified by the given index value. This parameterized attribute returns the complete -// range of characters (including surrogate pairs of multi-byte glyphs) at the given index. -PlainTextRange AccessibilityObject::doAXRangeForIndex(unsigned) const -{ - return PlainTextRange(); -} - // Given a character index, the range of text associated with this accessibility object // over which the style in effect at that character index applies. PlainTextRange AccessibilityObject::doAXStyleRangeForIndex(unsigned index) const @@ -913,21 +632,6 @@ PlainTextRange AccessibilityObject::doAXStyleRangeForIndex(unsigned index) const return plainTextRangeForVisiblePositionRange(range); } -// A substring of the text associated with this accessibility object that is -// specified by the given character range. -String AccessibilityObject::doAXStringForRange(const PlainTextRange&) const -{ - return String(); -} - -// The bounding rectangle of the text associated with this accessibility object that is -// specified by the given range. This is the bounding rectangle a sighted user would see -// on the display screen, in pixels. -IntRect AccessibilityObject::doAXBoundsForRange(const PlainTextRange&) const -{ - return IntRect(); -} - // Given an indexed character, the line number of the text associated with this accessibility // object that contains the character. unsigned AccessibilityObject::doAXLineForIndex(unsigned index) @@ -945,41 +649,6 @@ FrameView* AccessibilityObject::documentFrameView() const return 0; return object->documentFrameView(); -} - -AccessibilityObject* AccessibilityObject::doAccessibilityHitTest(const IntPoint&) const -{ - return 0; -} - -AccessibilityObject* AccessibilityObject::focusedUIElement() const -{ - return 0; -} - -AccessibilityObject* AccessibilityObject::observableObject() const -{ - return 0; -} - -AccessibilityRole AccessibilityObject::roleValue() const -{ - return UnknownRole; -} - -AccessibilityRole AccessibilityObject::ariaRoleAttribute() const -{ - return UnknownRole; -} - -bool AccessibilityObject::isPresentationalChildOfAriaRole() const -{ - return false; -} - -bool AccessibilityObject::ariaRoleHasPresentationalChildren() const -{ - return false; } void AccessibilityObject::clearChildren() @@ -988,33 +657,6 @@ void AccessibilityObject::clearChildren() m_children.clear(); } -void AccessibilityObject::childrenChanged() -{ - return; -} - -void AccessibilityObject::addChildren() -{ -} - -void AccessibilityObject::selectedChildren(AccessibilityChildrenVector&) -{ -} - -void AccessibilityObject::visibleChildren(AccessibilityChildrenVector&) -{ -} - -unsigned AccessibilityObject::axObjectID() const -{ - return m_id; -} - -void AccessibilityObject::setAXObjectID(unsigned axObjectID) -{ - m_id = axObjectID; -} - const String& AccessibilityObject::actionVerb() const { // FIXME: Need to add verbs for select elements. @@ -1043,9 +685,5 @@ const String& AccessibilityObject::actionVerb() const return noAction; } } - -void AccessibilityObject::updateBackingStore() -{ -} } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h index 22a7f994b1..319ace9bb5 100644 --- a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h +++ b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityObject.h @@ -30,7 +30,10 @@ #ifndef AccessibilityObject_h #define AccessibilityObject_h +#include "IntRect.h" +#include "Range.h" #include "VisiblePosition.h" +#include "VisibleSelection.h" #include <wtf/Platform.h> #include <wtf/RefPtr.h> #include <wtf/Vector.h> @@ -193,6 +196,7 @@ protected: AccessibilityObject(); public: virtual ~AccessibilityObject(); + virtual void detach(); typedef Vector<RefPtr<AccessibilityObject> > AccessibilityChildrenVector; @@ -252,93 +256,96 @@ public: bool accessibilityShouldUseUniqueId() const { return true; }; virtual bool accessibilityIsIgnored() const { return true; }; - virtual int intValue() const; + virtual int intValue() const { return 0; } virtual float valueForRange() const { return 0.0f; } virtual float maxValueForRange() const { return 0.0f; } virtual float minValueForRange() const { return 0.0f; } - virtual int layoutCount() const; + virtual int layoutCount() const { return 0; } static bool isARIAControl(AccessibilityRole); static bool isARIAInput(AccessibilityRole); - unsigned axObjectID() const; - virtual AccessibilityObject* doAccessibilityHitTest(const IntPoint&) const; - virtual AccessibilityObject* focusedUIElement() const; - virtual AccessibilityObject* firstChild() const; - virtual AccessibilityObject* lastChild() const; - virtual AccessibilityObject* previousSibling() const; - virtual AccessibilityObject* nextSibling() const; - virtual AccessibilityObject* parentObject() const; + virtual AccessibilityObject* doAccessibilityHitTest(const IntPoint&) const { return 0; } + virtual AccessibilityObject* focusedUIElement() const { return 0; } + + virtual AccessibilityObject* firstChild() const { return 0; } + virtual AccessibilityObject* lastChild() const { return 0; } + virtual AccessibilityObject* previousSibling() const { return 0; } + virtual AccessibilityObject* nextSibling() const { return 0; } + virtual AccessibilityObject* parentObject() const = 0; virtual AccessibilityObject* parentObjectUnignored() const; - virtual AccessibilityObject* parentObjectIfExists() const; - virtual AccessibilityObject* observableObject() const; - virtual void linkedUIElements(AccessibilityChildrenVector&) const; - virtual AccessibilityObject* titleUIElement() const; + virtual AccessibilityObject* parentObjectIfExists() const { return 0; } + + virtual AccessibilityObject* observableObject() const { return 0; } + virtual void linkedUIElements(AccessibilityChildrenVector&) const { } + virtual AccessibilityObject* titleUIElement() const { return 0; } virtual bool exposesTitleUIElement() const { return true; } - virtual AccessibilityRole ariaRoleAttribute() const; - virtual bool isPresentationalChildOfAriaRole() const; - virtual bool ariaRoleHasPresentationalChildren() const; - virtual AccessibilityRole roleValue() const; - virtual AXObjectCache* axObjectCache() const; + virtual AccessibilityRole ariaRoleAttribute() const { return UnknownRole; } + virtual bool isPresentationalChildOfAriaRole() const { return false; } + virtual bool ariaRoleHasPresentationalChildren() const { return false; } + virtual AccessibilityRole roleValue() const { return UnknownRole; } + virtual String ariaAccessiblityName(const String&) const { return String(); } + virtual String ariaLabeledByAttribute() const { return String(); } + virtual String ariaDescribedByAttribute() const { return String(); } + virtual String accessibilityDescription() const { return String(); } + virtual PassRefPtr<Range> ariaSelectedTextDOMRange() const { return 0; } + + virtual AXObjectCache* axObjectCache() const { return 0; } + unsigned axObjectID() const { return m_id; } + void setAXObjectID(unsigned axObjectID) { m_id = axObjectID; } - virtual Element* anchorElement() const; - virtual Element* actionElement() const; - virtual IntRect boundingBoxRect() const; - virtual IntRect elementRect() const; - virtual IntSize size() const; + virtual Element* anchorElement() const { return 0; } + virtual Element* actionElement() const { return 0; } + virtual IntRect boundingBoxRect() const { return IntRect(); } + virtual IntRect elementRect() const = 0; + virtual IntSize size() const = 0; virtual IntPoint clickPoint() const; + + virtual PlainTextRange selectedTextRange() const { return PlainTextRange(); } + unsigned selectionStart() const { return selectedTextRange().start; } + unsigned selectionEnd() const { return selectedTextRange().length; } - virtual KURL url() const; - virtual PlainTextRange selectedTextRange() const; - virtual VisibleSelection selection() const; - unsigned selectionStart() const; - unsigned selectionEnd() const; - virtual String stringValue() const; - virtual String ariaAccessiblityName(const String&) const; - virtual String ariaLabeledByAttribute() const; - virtual String title() const; - virtual String ariaDescribedByAttribute() const; - virtual String accessibilityDescription() const; - virtual String helpText() const; - virtual String textUnderElement() const; - virtual String text() const; - virtual int textLength() const; - virtual PassRefPtr<Range> ariaSelectedTextDOMRange() const; - virtual String selectedText() const; - virtual const AtomicString& accessKey() const; + virtual KURL url() const { return KURL(); } + virtual VisibleSelection selection() const { return VisibleSelection(); } + virtual String stringValue() const { return String(); } + virtual String title() const { return String(); } + virtual String helpText() const { return String(); } + virtual String textUnderElement() const { return String(); } + virtual String text() const { return String(); } + virtual int textLength() const { return 0; } + virtual String selectedText() const { return String(); } + virtual const AtomicString& accessKey() const { return nullAtom; } const String& actionVerb() const; - virtual Widget* widget() const; - virtual Widget* widgetForAttachmentView() const; + virtual Widget* widget() const { return 0; } + virtual Widget* widgetForAttachmentView() const { return 0; } virtual Document* document() const { return 0; } virtual FrameView* topDocumentFrameView() const { return 0; } virtual FrameView* documentFrameView() const; virtual String language() const; - - void setAXObjectID(unsigned); - virtual void setFocused(bool); - virtual void setSelectedText(const String&); - virtual void setSelectedTextRange(const PlainTextRange&); - virtual void setValue(const String&); - virtual void setSelected(bool); - - virtual void detach(); - virtual void makeRangeVisible(const PlainTextRange&); + + virtual void setFocused(bool) { } + virtual void setSelectedText(const String&) { } + virtual void setSelectedTextRange(const PlainTextRange&) { } + virtual void setValue(const String&) { } + virtual void setSelected(bool) { } + + virtual void makeRangeVisible(const PlainTextRange&) { } virtual bool press() const; bool performDefaultAction() const { return press(); } - virtual void childrenChanged(); + virtual void childrenChanged() { } virtual const AccessibilityChildrenVector& children() { return m_children; } - virtual void addChildren(); + virtual void addChildren() { } virtual bool canHaveChildren() const { return true; } - virtual bool hasChildren() const { return m_haveChildren; }; - virtual void selectedChildren(AccessibilityChildrenVector&); - virtual void visibleChildren(AccessibilityChildrenVector&); + virtual bool hasChildren() const { return m_haveChildren; } + virtual void selectedChildren(AccessibilityChildrenVector&) { } + virtual void visibleChildren(AccessibilityChildrenVector&) { } virtual bool shouldFocusActiveDescendant() const { return false; } virtual AccessibilityObject* activeDescendant() const { return 0; } virtual void handleActiveDescendantChanged() { } - virtual VisiblePositionRange visiblePositionRange() const; - virtual VisiblePositionRange visiblePositionRangeForLine(unsigned) const; + virtual VisiblePositionRange visiblePositionRange() const { return VisiblePositionRange(); } + virtual VisiblePositionRange visiblePositionRangeForLine(unsigned) const { return VisiblePositionRange(); } VisiblePositionRange visiblePositionRangeForUnorderedPositions(const VisiblePosition&, const VisiblePosition&) const; VisiblePositionRange positionOfLeftWord(const VisiblePosition&) const; @@ -351,13 +358,13 @@ public: VisiblePositionRange visiblePositionRangeForRange(const PlainTextRange&) const; String stringForVisiblePositionRange(const VisiblePositionRange&) const; - virtual IntRect boundsForVisiblePositionRange(const VisiblePositionRange&) const; + virtual IntRect boundsForVisiblePositionRange(const VisiblePositionRange&) const { return IntRect(); } int lengthForVisiblePositionRange(const VisiblePositionRange&) const; - virtual void setSelectedVisiblePositionRange(const VisiblePositionRange&) const; + virtual void setSelectedVisiblePositionRange(const VisiblePositionRange&) const { } - virtual VisiblePosition visiblePositionForPoint(const IntPoint&) const; - VisiblePosition nextVisiblePosition(const VisiblePosition&) const; - VisiblePosition previousVisiblePosition(const VisiblePosition&) const; + virtual VisiblePosition visiblePositionForPoint(const IntPoint&) const { return VisiblePosition(); } + VisiblePosition nextVisiblePosition(const VisiblePosition& visiblePos) const { return visiblePos.next(); } + VisiblePosition previousVisiblePosition(const VisiblePosition& visiblePos) const { return visiblePos.previous(); } VisiblePosition nextWordEnd(const VisiblePosition&) const; VisiblePosition previousWordStart(const VisiblePosition&) const; VisiblePosition nextLineEndPosition(const VisiblePosition&) const; @@ -366,23 +373,24 @@ public: VisiblePosition previousSentenceStartPosition(const VisiblePosition&) const; VisiblePosition nextParagraphEndPosition(const VisiblePosition&) const; VisiblePosition previousParagraphStartPosition(const VisiblePosition&) const; - virtual VisiblePosition visiblePositionForIndex(unsigned indexValue, bool lastIndexOK) const; + virtual VisiblePosition visiblePositionForIndex(unsigned, bool /* +lastIndexOK */) const { return VisiblePosition(); } - virtual VisiblePosition visiblePositionForIndex(int) const; - virtual int indexForVisiblePosition(const VisiblePosition&) const; + virtual VisiblePosition visiblePositionForIndex(int) const { return VisiblePosition(); } + virtual int indexForVisiblePosition(const VisiblePosition&) const { return 0; } AccessibilityObject* accessibilityObjectForPosition(const VisiblePosition&) const; int lineForPosition(const VisiblePosition&) const; PlainTextRange plainTextRangeForVisiblePositionRange(const VisiblePositionRange&) const; - virtual int index(const VisiblePosition&) const; + virtual int index(const VisiblePosition&) const { return -1; } - virtual PlainTextRange doAXRangeForLine(unsigned) const; + virtual PlainTextRange doAXRangeForLine(unsigned) const { return PlainTextRange(); } PlainTextRange doAXRangeForPosition(const IntPoint&) const; - virtual PlainTextRange doAXRangeForIndex(unsigned) const; + virtual PlainTextRange doAXRangeForIndex(unsigned) const { return PlainTextRange(); } PlainTextRange doAXStyleRangeForIndex(unsigned) const; - virtual String doAXStringForRange(const PlainTextRange&) const; - virtual IntRect doAXBoundsForRange(const PlainTextRange&) const; + virtual String doAXStringForRange(const PlainTextRange&) const { return String(); } + virtual IntRect doAXBoundsForRange(const PlainTextRange&) const { return IntRect(); } unsigned doAXLineForIndex(unsigned); @@ -408,7 +416,7 @@ public: // allows for an AccessibilityObject to update its render tree or perform // other operations update type operations - virtual void updateBackingStore(); + virtual void updateBackingStore() { } protected: unsigned m_id; diff --git a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp index 7d2ddc5a1d..65a1a7d8e8 100644 --- a/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp +++ b/src/3rdparty/webkit/WebCore/accessibility/AccessibilityRenderObject.cpp @@ -55,6 +55,7 @@ #include "LocalizedStrings.h" #include "NodeList.h" #include "Page.h" +#include "RenderButton.h" #include "RenderFieldset.h" #include "RenderFileUploadControl.h" #include "RenderHTMLCanvas.h" @@ -773,6 +774,9 @@ String AccessibilityRenderObject::stringValue() const if (m_renderer->isListMarker()) return static_cast<RenderListMarker*>(m_renderer)->text(); + if (m_renderer->isRenderButton()) + return static_cast<RenderButton*>(m_renderer)->text(); + if (isWebArea()) { if (m_renderer->document()->frame()) return String(); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/CachedScriptSourceProvider.h b/src/3rdparty/webkit/WebCore/bindings/js/CachedScriptSourceProvider.h index e943fa5b1c..1cdd8aa2c8 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/CachedScriptSourceProvider.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/CachedScriptSourceProvider.h @@ -29,11 +29,12 @@ #include "CachedResourceClient.h" #include "CachedResourceHandle.h" #include "CachedScript.h" +#include "ScriptSourceProvider.h" #include <parser/SourceCode.h> namespace WebCore { - class CachedScriptSourceProvider : public JSC::SourceProvider, public CachedResourceClient { + class CachedScriptSourceProvider : public ScriptSourceProvider, public CachedResourceClient { public: static PassRefPtr<CachedScriptSourceProvider> create(CachedScript* cachedScript) { return adoptRef(new CachedScriptSourceProvider(cachedScript)); } @@ -45,10 +46,11 @@ namespace WebCore { JSC::UString getRange(int start, int end) const { return JSC::UString(m_cachedScript->script().characters() + start, end - start); } const UChar* data() const { return m_cachedScript->script().characters(); } int length() const { return m_cachedScript->script().length(); } + const String& source() const { return m_cachedScript->script(); } private: CachedScriptSourceProvider(CachedScript* cachedScript) - : SourceProvider(cachedScript->url()) + : ScriptSourceProvider(cachedScript->url()) , m_cachedScript(cachedScript) { m_cachedScript->addClient(this); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/DOMObjectWithSVGContext.h b/src/3rdparty/webkit/WebCore/bindings/js/DOMObjectWithSVGContext.h new file mode 100644 index 0000000000..570548dc22 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/bindings/js/DOMObjectWithSVGContext.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2009 Google, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DOMObjectWithSVGContext_h +#define DOMObjectWithSVGContext_h + +#if ENABLE(SVG) + +#include "JSDOMBinding.h" +#include "SVGElement.h" + +namespace WebCore { + + // FIXME: This class (and file) should be removed once all SVG bindings + // have moved context() onto the various impl() pointers. + class DOMObjectWithSVGContext : public DOMObject { + public: + SVGElement* context() const { return m_context.get(); } + + protected: + DOMObjectWithSVGContext(PassRefPtr<JSC::Structure> structure, JSDOMGlobalObject*, SVGElement* context) + : DOMObject(structure) + , m_context(context) + { + // No space to store the JSDOMGlobalObject w/o hitting the CELL_SIZE limit. + } + + protected: // FIXME: Many custom bindings use m_context directly. Making this protected to temporariliy reduce code churn. + RefPtr<SVGElement> m_context; + }; + +} // namespace WebCore + +#endif // ENABLE(SVG) +#endif // DOMObjectWithSVGContext_h diff --git a/src/3rdparty/webkit/WebCore/bindings/js/GCController.cpp b/src/3rdparty/webkit/WebCore/bindings/js/GCController.cpp index db295c2b8e..59bcfa372d 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/GCController.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/GCController.cpp @@ -44,7 +44,7 @@ namespace WebCore { static void* collect(void*) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSDOMWindow::commonJSGlobalData()->heap.collect(); return 0; } @@ -70,13 +70,13 @@ void GCController::garbageCollectSoon() void GCController::gcTimerFired(Timer<GCController>*) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSDOMWindow::commonJSGlobalData()->heap.collect(); } void GCController::garbageCollectNow() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSDOMWindow::commonJSGlobalData()->heap.collect(); } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/GCController.h b/src/3rdparty/webkit/WebCore/bindings/js/GCController.h index 452019af6b..4c25407874 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/GCController.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/GCController.h @@ -31,7 +31,7 @@ namespace WebCore { - class GCController : Noncopyable { + class GCController : public Noncopyable { friend GCController& gcController(); public: diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSAbstractWorkerCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSAbstractWorkerCustom.cpp index 82e06e3a4f..314641344b 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSAbstractWorkerCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSAbstractWorkerCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(SHARED_WORKERS) +#if ENABLE(WORKERS) #include "JSAbstractWorker.h" @@ -45,7 +45,7 @@ namespace WebCore { void JSAbstractWorker::mark() { - DOMObject::mark(); + Base::mark(); markIfNotNull(m_impl->onerror()); @@ -82,12 +82,6 @@ JSValue JSAbstractWorker::removeEventListener(ExecState* exec, const ArgList& ar return jsUndefined(); } -JSValue toJS(ExecState* exec, AbstractWorker* baseObject) -{ - // Just call the JSEventTarget implementation of toJS(), which already differentiates between the different implementations. - return toJS(exec, static_cast<EventTarget*>(baseObject)); -} - } // namespace WebCore -#endif // ENABLE(SHARED_WORKERS) +#endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp index 4f3c8ee106..abd5ad5fc2 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp @@ -47,7 +47,7 @@ void JSAttr::setValue(ExecState* exec, JSValue value) Element* ownerElement = imp->ownerElement(); if (ownerElement && (ownerElement->hasTagName(iframeTag) || ownerElement->hasTagName(frameTag))) { - if (equalIgnoringCase(imp->name(), "src") && protocolIsJavaScript(parseURL(attrValue))) { + if (equalIgnoringCase(imp->name(), "src") && protocolIsJavaScript(deprecatedParseURL(attrValue))) { if (!checkNodeSecurity(exec, static_cast<HTMLFrameElementBase*>(ownerElement)->contentDocument())) return; } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.cpp index 74bcad5ec6..87a388073b 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.cpp @@ -42,35 +42,27 @@ namespace WebCore { const ClassInfo JSAudioConstructor::s_info = { "AudioConstructor", 0, 0, 0 }; JSAudioConstructor::JSAudioConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) - : DOMObject(JSAudioConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) - , m_globalObject(globalObject) + : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - ASSERT(globalObject->scriptExecutionContext()); - ASSERT(globalObject->scriptExecutionContext()->isDocument()); - - putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), None); putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly|DontDelete|DontEnum); } -Document* JSAudioConstructor::document() const -{ - return static_cast<Document*>(m_globalObject->scriptExecutionContext()); -} - static JSObject* constructAudio(ExecState* exec, JSObject* constructor, const ArgList& args) { + JSAudioConstructor* jsAudio = static_cast<JSAudioConstructor*>(constructor); // FIXME: Why doesn't this need the call toJS on the document like JSImageConstructor? - - Document* document = static_cast<JSAudioConstructor*>(constructor)->document(); + Document* document = jsAudio->document(); if (!document) return throwError(exec, ReferenceError, "Audio constructor associated document is unavailable"); RefPtr<HTMLAudioElement> audio = new HTMLAudioElement(HTMLNames::audioTag, document); + audio->setAutobuffer(true); if (args.size() > 0) { audio->setSrc(args.at(0).toString(exec)); audio->scheduleLoad(); } - return asObject(toJS(exec, audio.release())); + return asObject(toJS(exec, jsAudio->globalObject(), audio.release())); } ConstructType JSAudioConstructor::getConstructData(ConstructData& constructData) @@ -79,13 +71,6 @@ ConstructType JSAudioConstructor::getConstructData(ConstructData& constructData) return ConstructTypeHost; } -void JSAudioConstructor::mark() -{ - DOMObject::mark(); - if (!m_globalObject->marked()) - m_globalObject->mark(); -} - } // namespace WebCore #endif // ENABLE(VIDEO) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.h index 0a3a7ea000..3496897a23 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.h @@ -34,21 +34,15 @@ namespace WebCore { - class JSAudioConstructor : public DOMObject { + class JSAudioConstructor : public DOMConstructorWithDocument { public: JSAudioConstructor(JSC::ExecState*, JSDOMGlobalObject*); - Document* document() const; - static const JSC::ClassInfo s_info; - - virtual void mark(); private: virtual JSC::ConstructType getConstructData(JSC::ConstructData&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } - - JSDOMGlobalObject* m_globalObject; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCDATASectionCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCDATASectionCustom.cpp index 44a8957bd9..c2738cc528 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCDATASectionCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCDATASectionCustom.cpp @@ -32,12 +32,12 @@ using namespace JSC; namespace WebCore { -JSValue toJSNewlyCreated(ExecState* exec, CDATASection* section) +JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, CDATASection* section) { if (!section) return jsNull(); - - return CREATE_DOM_NODE_WRAPPER(exec, CDATASection, section); + + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, CDATASection, section); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCSSRuleCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCSSRuleCustom.cpp index 2c204315dc..1b96c06279 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCSSRuleCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCSSRuleCustom.cpp @@ -49,46 +49,45 @@ using namespace JSC; namespace WebCore { -JSValue toJS(ExecState* exec, CSSRule* rule) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, CSSRule* rule) { if (!rule) return jsNull(); DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), rule); - if (wrapper) return wrapper; switch (rule->type()) { case CSSRule::STYLE_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSStyleRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSStyleRule, rule); break; case CSSRule::MEDIA_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSMediaRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSMediaRule, rule); break; case CSSRule::FONT_FACE_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSFontFaceRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSFontFaceRule, rule); break; case CSSRule::PAGE_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSPageRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSPageRule, rule); break; case CSSRule::IMPORT_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSImportRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSImportRule, rule); break; case CSSRule::CHARSET_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSCharsetRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSCharsetRule, rule); break; case CSSRule::VARIABLES_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSVariablesRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSVariablesRule, rule); break; case CSSRule::WEBKIT_KEYFRAME_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, WebKitCSSKeyframeRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, WebKitCSSKeyframeRule, rule); break; case CSSRule::WEBKIT_KEYFRAMES_RULE: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, WebKitCSSKeyframesRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, WebKitCSSKeyframesRule, rule); break; default: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSRule, rule); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSRule, rule); } return wrapper; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCSSValueCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCSSValueCustom.cpp index ad0cee1cd2..87a5760254 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCSSValueCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCSSValueCustom.cpp @@ -44,7 +44,7 @@ using namespace JSC; namespace WebCore { -JSValue toJS(ExecState* exec, CSSValue* value) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, CSSValue* value) { if (!value) return jsNull(); @@ -55,19 +55,19 @@ JSValue toJS(ExecState* exec, CSSValue* value) return wrapper; if (value->isWebKitCSSTransformValue()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, WebKitCSSTransformValue, value); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, WebKitCSSTransformValue, value); else if (value->isValueList()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSValueList, value); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSValueList, value); #if ENABLE(SVG) else if (value->isSVGPaint()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, SVGPaint, value); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, SVGPaint, value); else if (value->isSVGColor()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, SVGColor, value); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, SVGColor, value); #endif else if (value->isPrimitiveValue()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSPrimitiveValue, value); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSPrimitiveValue, value); else - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSValue, value); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSValue, value); return wrapper; } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionCallback.cpp index 6f9efd9f9c..6abed99015 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionCallback.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionCallback.cpp @@ -48,11 +48,12 @@ void JSCustomPositionCallback::handleEvent(Geoposition* geoposition, bool& raise if (!m_frame->script()->isEnabled()) return; - + + // FIXME: This is likely the wrong globalObject (for prototype chains at least) JSGlobalObject* globalObject = m_frame->script()->globalObject(); ExecState* exec = globalObject->globalExec(); - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); JSValue function = m_callback->get(exec, Identifier(exec, "handleEvent")); CallData callData; @@ -67,10 +68,10 @@ void JSCustomPositionCallback::handleEvent(Geoposition* geoposition, bool& raise } RefPtr<JSCustomPositionCallback> protect(this); - + MarkedArgumentBuffer args; - args.append(toJS(exec, geoposition)); - + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), geoposition)); + globalObject->globalData()->timeoutChecker.start(); call(exec, function, callType, callData, m_callback, args); globalObject->globalData()->timeoutChecker.stop(); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp index cc6cd55637..cda5738f65 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp @@ -48,11 +48,12 @@ void JSCustomPositionErrorCallback::handleEvent(PositionError* positionError) if (!m_frame->script()->isEnabled()) return; - + + // FIXME: This is likely the wrong globalObject (for prototype chains at least) JSGlobalObject* globalObject = m_frame->script()->globalObject(); ExecState* exec = globalObject->globalExec(); - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); JSValue function = m_callback->get(exec, Identifier(exec, "handleEvent")); CallData callData; @@ -69,7 +70,7 @@ void JSCustomPositionErrorCallback::handleEvent(PositionError* positionError) RefPtr<JSCustomPositionErrorCallback> protect(this); MarkedArgumentBuffer args; - args.append(toJS(exec, positionError)); + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), positionError)); globalObject->globalData()->timeoutChecker.start(); call(exec, function, callType, callData, m_callback, args); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementCallback.cpp index 107a49118c..d0943dede3 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementCallback.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementCallback.cpp @@ -54,10 +54,11 @@ void JSCustomSQLStatementCallback::handleEvent(SQLTransaction* transaction, SQLR if (!m_frame->script()->isEnabled()) return; + // FIXME: This is likely the wrong globalObject (for prototype chains at least) JSGlobalObject* globalObject = m_frame->script()->globalObject(); ExecState* exec = globalObject->globalExec(); - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); JSValue function = m_callback->get(exec, Identifier(exec, "handleEvent")); CallData callData; @@ -74,8 +75,8 @@ void JSCustomSQLStatementCallback::handleEvent(SQLTransaction* transaction, SQLR RefPtr<JSCustomSQLStatementCallback> protect(this); MarkedArgumentBuffer args; - args.append(toJS(exec, transaction)); - args.append(toJS(exec, resultSet)); + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), transaction)); + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), resultSet)); globalObject->globalData()->timeoutChecker.start(); call(exec, function, callType, callData, m_callback, args); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp index 018dabdf10..6c831acccb 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp @@ -54,11 +54,12 @@ bool JSCustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, if (!m_frame->script()->isEnabled()) return true; - + + // FIXME: This is likely the wrong globalObject (for prototype chains at least) JSGlobalObject* globalObject = m_frame->script()->globalObject(); ExecState* exec = globalObject->globalExec(); - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); JSValue handleEventFunction = m_callback->get(exec, Identifier(exec, "handleEvent")); CallData handleEventCallData; @@ -77,8 +78,8 @@ bool JSCustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, RefPtr<JSCustomSQLStatementErrorCallback> protect(this); MarkedArgumentBuffer args; - args.append(toJS(exec, transaction)); - args.append(toJS(exec, error)); + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), transaction)); + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), error)); JSValue result; globalObject->globalData()->timeoutChecker.start(); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp index a41ac78797..3d42f814f6 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp @@ -94,11 +94,12 @@ void JSCustomSQLTransactionCallback::handleEvent(SQLTransaction* transaction, bo if (!m_data->frame()->script()->isEnabled()) return; - + + // FIXME: This is likely the wrong globalObject (for prototype chains at least) JSGlobalObject* globalObject = m_data->frame()->script()->globalObject(); ExecState* exec = globalObject->globalExec(); - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); JSValue handleEventFunction = m_data->callback()->get(exec, Identifier(exec, "handleEvent")); CallData handleEventCallData; @@ -117,7 +118,7 @@ void JSCustomSQLTransactionCallback::handleEvent(SQLTransaction* transaction, bo RefPtr<JSCustomSQLTransactionCallback> protect(this); MarkedArgumentBuffer args; - args.append(toJS(exec, transaction)); + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), transaction)); globalObject->globalData()->timeoutChecker.start(); if (handleEventCallType != CallTypeNone) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp index 324e2bb6fa..2d41bb824b 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp @@ -54,10 +54,11 @@ void JSCustomSQLTransactionErrorCallback::handleEvent(SQLError* error) if (!m_frame->script()->isEnabled()) return; + // FIXME: This is likely the wrong globalObject (for prototype chains at least) JSGlobalObject* globalObject = m_frame->script()->globalObject(); ExecState* exec = globalObject->globalExec(); - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); JSValue function = m_callback->get(exec, Identifier(exec, "handleEvent")); CallData callData; @@ -74,7 +75,7 @@ void JSCustomSQLTransactionErrorCallback::handleEvent(SQLError* error) RefPtr<JSCustomSQLTransactionErrorCallback> protect(this); MarkedArgumentBuffer args; - args.append(toJS(exec, error)); + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), error)); globalObject->globalData()->timeoutChecker.start(); call(exec, function, callType, callData, m_callback, args); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomVoidCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomVoidCallback.cpp index f3f76c428b..b4e525b98f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomVoidCallback.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomVoidCallback.cpp @@ -55,7 +55,7 @@ void JSCustomVoidCallback::handleEvent() JSGlobalObject* globalObject = m_frame->script()->globalObject(); ExecState* exec = globalObject->globalExec(); - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); JSValue function = m_callback->get(exec, Identifier(exec, "handleEvent")); CallData callData; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp index ffe8cf52ac..4476be583c 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp @@ -72,7 +72,7 @@ String JSCustomXPathNSResolver::lookupNamespaceURI(const String& prefix) if (!m_frame->script()->isEnabled()) return String(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSGlobalObject* globalObject = m_frame->script()->globalObject(); ExecState* exec = globalObject->globalExec(); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp index 7e8d9ce633..a7fae788e4 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp @@ -44,7 +44,7 @@ namespace WebCore { void JSDOMApplicationCache::mark() { - DOMObject::mark(); + Base::mark(); markIfNotNull(m_impl->onchecking()); markIfNotNull(m_impl->onerror()); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp index 81d59fbca9..910da12b81 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp @@ -455,31 +455,36 @@ void setDOMException(ExecState* exec, ExceptionCode ec) if (!ec || exec->hadException()) return; + // FIXME: All callers to setDOMException need to pass in the right global object + // for now, we're going to assume the lexicalGlobalObject. Which is wrong in cases like this: + // frames[0].document.createElement(null, null); // throws an exception which should have the subframes prototypes. + JSDOMGlobalObject* globalObject = deprecatedGlobalObjectForPrototype(exec); + ExceptionCodeDescription description; getExceptionCodeDescription(ec, description); JSValue errorObject; switch (description.type) { case DOMExceptionType: - errorObject = toJS(exec, DOMCoreException::create(description)); + errorObject = toJS(exec, globalObject, DOMCoreException::create(description)); break; case RangeExceptionType: - errorObject = toJS(exec, RangeException::create(description)); + errorObject = toJS(exec, globalObject, RangeException::create(description)); break; case EventExceptionType: - errorObject = toJS(exec, EventException::create(description)); + errorObject = toJS(exec, globalObject, EventException::create(description)); break; case XMLHttpRequestExceptionType: - errorObject = toJS(exec, XMLHttpRequestException::create(description)); + errorObject = toJS(exec, globalObject, XMLHttpRequestException::create(description)); break; #if ENABLE(SVG) case SVGExceptionType: - errorObject = toJS(exec, SVGException::create(description).get(), 0); + errorObject = toJS(exec, globalObject, SVGException::create(description).get(), 0); break; #endif #if ENABLE(XPATH) case XPathExceptionType: - errorObject = toJS(exec, XPathException::create(description)); + errorObject = toJS(exec, globalObject, XPathException::create(description)); break; #endif } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h index e3fd417331..3975940e17 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h @@ -2,6 +2,7 @@ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. * Copyright (C) 2007 Samuel Weinig <sam@webkit.org> + * Copyright (C) 2009 Google, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,6 +23,7 @@ #define JSDOMBinding_h #include "JSDOMGlobalObject.h" +#include "Document.h" // For DOMConstructorWithDocument #include <runtime/Completion.h> #include <runtime/Lookup.h> #include <runtime/JSFunction.h> @@ -59,6 +61,73 @@ namespace WebCore { #endif }; + // FIXME: This class should colapse into DOMObject once all DOMObjects are + // updated to store a globalObject pointer. + class DOMObjectWithGlobalPointer : public DOMObject { + public: + JSDOMGlobalObject* globalObject() const { return m_globalObject; } + + ScriptExecutionContext* scriptExecutionContext() const + { + // FIXME: Should never be 0, but can be due to bug 27640. + return m_globalObject->scriptExecutionContext(); + } + + protected: + DOMObjectWithGlobalPointer(PassRefPtr<JSC::Structure> structure, JSDOMGlobalObject* globalObject) + : DOMObject(structure) + , m_globalObject(globalObject) + { + // FIXME: This ASSERT is valid, but fires in fast/dom/gc-6.html when trying to create + // new JavaScript objects on detached windows due to DOMWindow::document() + // needing to reach through the frame to get to the Document*. See bug 27640. + // ASSERT(globalObject->scriptExecutionContext()); + } + virtual ~DOMObjectWithGlobalPointer() {} + + void mark() + { + DOMObject::mark(); + if (!m_globalObject->marked()) + m_globalObject->mark(); + } + + private: + JSDOMGlobalObject* m_globalObject; + }; + + // Base class for all constructor objects in the JSC bindings. + class DOMConstructorObject : public DOMObjectWithGlobalPointer { + public: + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, JSC::HasStandardGetOwnPropertySlot | JSC::ImplementsHasInstance)); + } + + protected: + DOMConstructorObject(PassRefPtr<JSC::Structure> structure, JSDOMGlobalObject* globalObject) + : DOMObjectWithGlobalPointer(structure, globalObject) + { + } + }; + + // Constructors using this base class depend on being in a Document and + // can never be used from a WorkerContext. + class DOMConstructorWithDocument : public DOMConstructorObject { + public: + Document* document() const + { + return static_cast<Document*>(scriptExecutionContext()); + } + + protected: + DOMConstructorWithDocument(PassRefPtr<JSC::Structure> structure, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(structure, globalObject) + { + ASSERT(globalObject->scriptExecutionContext()->isDocument()); + } + }; + DOMObject* getCachedDOMObjectWrapper(JSC::JSGlobalData&, void* objectHandle); void cacheDOMObjectWrapper(JSC::JSGlobalData&, void* objectHandle, DOMObject* wrapper); void forgetDOMObject(JSC::JSGlobalData&, void* objectHandle); @@ -80,6 +149,14 @@ namespace WebCore { JSC::JSObject* getCachedDOMConstructor(JSC::ExecState*, const JSC::ClassInfo*); void cacheDOMConstructor(JSC::ExecState*, const JSC::ClassInfo*, JSC::JSObject* constructor); + inline JSDOMGlobalObject* deprecatedGlobalObjectForPrototype(JSC::ExecState* exec) + { + // FIXME: Callers to this function should be using the global object + // from which the object is being created, instead of assuming the lexical one. + // e.g. subframe.document.body should use the subframe's global object, not the lexical one. + return static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()); + } + template<class WrapperClass> inline JSC::Structure* getDOMStructure(JSC::ExecState* exec, JSDOMGlobalObject* globalObject) { if (JSC::Structure* structure = getCachedDOMStructure(globalObject, &WrapperClass::s_info)) @@ -89,69 +166,69 @@ namespace WebCore { template<class WrapperClass> inline JSC::Structure* deprecatedGetDOMStructure(JSC::ExecState* exec) { // FIXME: This function is wrong. It uses the wrong global object for creating the prototype structure. - return getDOMStructure<WrapperClass>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())); + return getDOMStructure<WrapperClass>(exec, deprecatedGlobalObjectForPrototype(exec)); } template<class WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject) { return static_cast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(exec, static_cast<JSDOMGlobalObject*>(globalObject))->storedPrototype())); } - #define CREATE_DOM_OBJECT_WRAPPER(exec, className, object) createDOMObjectWrapper<JS##className>(exec, static_cast<className*>(object)) - template<class WrapperClass, class DOMClass> inline DOMObject* createDOMObjectWrapper(JSC::ExecState* exec, DOMClass* object) + #define CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, className, object) createDOMObjectWrapper<JS##className>(exec, globalObject, static_cast<className*>(object)) + template<class WrapperClass, class DOMClass> inline DOMObject* createDOMObjectWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* object) { ASSERT(object); ASSERT(!getCachedDOMObjectWrapper(exec->globalData(), object)); // FIXME: new (exec) could use a different globalData than the globalData this wrapper is cached on. - WrapperClass* wrapper = new (exec) WrapperClass(deprecatedGetDOMStructure<WrapperClass>(exec), object); + WrapperClass* wrapper = new (exec) WrapperClass(getDOMStructure<WrapperClass>(exec, globalObject), globalObject, object); cacheDOMObjectWrapper(exec->globalData(), object, wrapper); return wrapper; } - template<class WrapperClass, class DOMClass> inline JSC::JSValue getDOMObjectWrapper(JSC::ExecState* exec, DOMClass* object) + template<class WrapperClass, class DOMClass> inline JSC::JSValue getDOMObjectWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* object) { if (!object) return JSC::jsNull(); if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), object)) return wrapper; - return createDOMObjectWrapper<WrapperClass>(exec, object); + return createDOMObjectWrapper<WrapperClass>(exec, globalObject, object); } #if ENABLE(SVG) - #define CREATE_SVG_OBJECT_WRAPPER(exec, className, object, context) createDOMObjectWrapper<JS##className>(exec, static_cast<className*>(object), context) - template<class WrapperClass, class DOMClass> inline DOMObject* createDOMObjectWrapper(JSC::ExecState* exec, DOMClass* object, SVGElement* context) + #define CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, className, object, context) createDOMObjectWrapper<JS##className>(exec, globalObject, static_cast<className*>(object), context) + template<class WrapperClass, class DOMClass> inline DOMObject* createDOMObjectWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* object, SVGElement* context) { ASSERT(object); ASSERT(!getCachedDOMObjectWrapper(exec->globalData(), object)); - WrapperClass* wrapper = new (exec) WrapperClass(deprecatedGetDOMStructure<WrapperClass>(exec), object, context); + WrapperClass* wrapper = new (exec) WrapperClass(getDOMStructure<WrapperClass>(exec, globalObject), globalObject, object, context); cacheDOMObjectWrapper(exec->globalData(), object, wrapper); return wrapper; } - template<class WrapperClass, class DOMClass> inline JSC::JSValue getDOMObjectWrapper(JSC::ExecState* exec, DOMClass* object, SVGElement* context) + template<class WrapperClass, class DOMClass> inline JSC::JSValue getDOMObjectWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* object, SVGElement* context) { if (!object) return JSC::jsNull(); if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), object)) return wrapper; - return createDOMObjectWrapper<WrapperClass>(exec, object, context); + return createDOMObjectWrapper<WrapperClass>(exec, globalObject, object, context); } #endif - #define CREATE_DOM_NODE_WRAPPER(exec, className, object) createDOMNodeWrapper<JS##className>(exec, static_cast<className*>(object)) - template<class WrapperClass, class DOMClass> inline JSNode* createDOMNodeWrapper(JSC::ExecState* exec, DOMClass* node) + #define CREATE_DOM_NODE_WRAPPER(exec, globalObject, className, object) createDOMNodeWrapper<JS##className>(exec, globalObject, static_cast<className*>(object)) + template<class WrapperClass, class DOMClass> inline JSNode* createDOMNodeWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* node) { ASSERT(node); ASSERT(!getCachedDOMNodeWrapper(node->document(), node)); - WrapperClass* wrapper = new (exec) WrapperClass(deprecatedGetDOMStructure<WrapperClass>(exec), node); + WrapperClass* wrapper = new (exec) WrapperClass(getDOMStructure<WrapperClass>(exec, globalObject), globalObject, node); // FIXME: The entire function can be removed, once we fix caching. // This function is a one-off hack to make Nodes cache in the right global object. cacheDOMNodeWrapper(node->document(), node, wrapper); return wrapper; } - template<class WrapperClass, class DOMClass> inline JSC::JSValue getDOMNodeWrapper(JSC::ExecState* exec, DOMClass* node) + template<class WrapperClass, class DOMClass> inline JSC::JSValue getDOMNodeWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* node) { if (!node) return JSC::jsNull(); if (JSNode* wrapper = getCachedDOMNodeWrapper(node->document(), node)) return wrapper; - return createDOMNodeWrapper<WrapperClass>(exec, node); + return createDOMNodeWrapper<WrapperClass>(exec, globalObject, node); } const JSC::HashTable* getHashTableForGlobalData(JSC::JSGlobalData&, const JSC::HashTable* staticTable); @@ -178,7 +255,28 @@ namespace WebCore { JSC::UString valueToStringWithNullCheck(JSC::ExecState*, JSC::JSValue); // null if the value is null JSC::UString valueToStringWithUndefinedOrNullCheck(JSC::ExecState*, JSC::JSValue); // null if the value is null or undefined - template <typename T> inline JSC::JSValue toJS(JSC::ExecState* exec, PassRefPtr<T> ptr) { return toJS(exec, ptr.get()); } + // FIXME: These are a stop-gap until all toJS calls can be converted to pass a globalObject + template <typename T> + inline JSC::JSValue toJS(JSC::ExecState* exec, T* ptr) + { + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), ptr); + } + template <typename T> + inline JSC::JSValue toJS(JSC::ExecState* exec, PassRefPtr<T> ptr) + { + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), ptr.get()); + } + template <typename T> + inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* exec, T* ptr) + { + return toJSNewlyCreated(exec, deprecatedGlobalObjectForPrototype(exec), ptr); + } + + template <typename T> + inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<T> ptr) + { + return toJS(exec, globalObject, ptr.get()); + } bool checkNodeSecurity(JSC::ExecState*, Node*); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h index 8e4e8203bd..bc6c1f2d2d 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h @@ -67,6 +67,9 @@ namespace WebCore { JSListenersMap& jsEventListeners(); + // Make binding code generation easier. + JSDOMGlobalObject* globalObject() { return this; } + void setCurrentEvent(Event*); Event* currentEvent() const; @@ -89,16 +92,6 @@ namespace WebCore { }; template<class ConstructorClass> - inline JSC::JSObject* getDOMConstructor(JSC::ExecState* exec) - { - if (JSC::JSObject* constructor = getCachedDOMConstructor(exec, &ConstructorClass::s_info)) - return constructor; - JSC::JSObject* constructor = new (exec) ConstructorClass(exec); - cacheDOMConstructor(exec, &ConstructorClass::s_info, constructor); - return constructor; - } - - template<class ConstructorClass> inline JSC::JSObject* getDOMConstructor(JSC::ExecState* exec, const JSDOMGlobalObject* globalObject) { if (JSC::JSObject* constructor = globalObject->constructors().get(&ConstructorClass::s_info)) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp index 0f419ba2e3..df6068a521 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp @@ -63,7 +63,7 @@ void JSDOMWindowBase::updateDocument() { ASSERT(d()->impl->document()); ExecState* exec = globalExec(); - symbolTablePutWithAttributes(Identifier(exec, "document"), toJS(exec, d()->impl->document()), DontDelete | ReadOnly); + symbolTablePutWithAttributes(Identifier(exec, "document"), toJS(exec, this, d()->impl->document()), DontDelete | ReadOnly); } ScriptExecutionContext* JSDOMWindowBase::scriptExecutionContext() const @@ -172,6 +172,13 @@ JSGlobalData* JSDOMWindowBase::commonJSGlobalData() return globalData; } +// JSDOMGlobalObject* is ignored, accesing a window in any context will +// use that DOMWindow's prototype chain. +JSValue toJS(ExecState* exec, JSDOMGlobalObject*, DOMWindow* domWindow) +{ + return toJS(exec, domWindow); +} + JSValue toJS(ExecState*, DOMWindow* domWindow) { if (!domWindow) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.h b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.h index 113344f464..84cc81f46f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.h @@ -89,6 +89,9 @@ namespace WebCore { }; // Returns a JSDOMWindow or jsNull() + // JSDOMGlobalObject* is ignored, accesing a window in any context will + // use that DOMWindow's prototype chain. + JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow*); JSC::JSValue toJS(JSC::ExecState*, DOMWindow*); // Returns JSDOMWindow or 0 diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp index c095bf2f1d..33ac7bbfda 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp @@ -359,7 +359,8 @@ JSValue JSDOMWindow::history(ExecState* exec) const if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), history)) return wrapper; - JSHistory* jsHistory = new (exec) JSHistory(getDOMStructure<JSHistory>(exec, const_cast<JSDOMWindow*>(this)), history); + JSDOMWindow* window = const_cast<JSDOMWindow*>(this); + JSHistory* jsHistory = new (exec) JSHistory(getDOMStructure<JSHistory>(exec, window), window, history); cacheDOMObjectWrapper(exec->globalData(), history, jsHistory); return jsHistory; } @@ -370,7 +371,8 @@ JSValue JSDOMWindow::location(ExecState* exec) const if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), location)) return wrapper; - JSLocation* jsLocation = new (exec) JSLocation(getDOMStructure<JSLocation>(exec, const_cast<JSDOMWindow*>(this)), location); + JSDOMWindow* window = const_cast<JSDOMWindow*>(this); + JSLocation* jsLocation = new (exec) JSLocation(getDOMStructure<JSLocation>(exec, window), window, location); cacheDOMObjectWrapper(exec->globalData(), location, jsLocation); return jsLocation; } @@ -443,12 +445,12 @@ JSValue JSDOMWindow::audio(ExecState* exec) const JSValue JSDOMWindow::webKitPoint(ExecState* exec) const { - return getDOMConstructor<JSWebKitPointConstructor>(exec); + return getDOMConstructor<JSWebKitPointConstructor>(exec, this); } JSValue JSDOMWindow::webKitCSSMatrix(ExecState* exec) const { - return getDOMConstructor<JSWebKitCSSMatrixConstructor>(exec); + return getDOMConstructor<JSWebKitCSSMatrixConstructor>(exec, this); } JSValue JSDOMWindow::xmlHttpRequest(ExecState* exec) const @@ -459,7 +461,7 @@ JSValue JSDOMWindow::xmlHttpRequest(ExecState* exec) const #if ENABLE(XSLT) JSValue JSDOMWindow::xsltProcessor(ExecState* exec) const { - return getDOMConstructor<JSXSLTProcessorConstructor>(exec); + return getDOMConstructor<JSXSLTProcessorConstructor>(exec, this); } #endif @@ -473,7 +475,7 @@ JSValue JSDOMWindow::messageChannel(ExecState* exec) const #if ENABLE(WORKERS) JSValue JSDOMWindow::worker(ExecState* exec) const { - return getDOMConstructor<JSWorkerConstructor>(exec); + return getDOMConstructor<JSWorkerConstructor>(exec, this); } #endif diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp index c7ffcde235..91b3d1546c 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDataGridColumnListCustom.cpp @@ -46,7 +46,7 @@ bool JSDataGridColumnList::canGetItemsForName(ExecState*, DataGridColumnList* im JSValue JSDataGridColumnList::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot) { JSDataGridColumnList* thisObj = static_cast<JSDataGridColumnList*>(asObject(slot.slotBase())); - return toJS(exec, thisObj->impl()->itemWithName(propertyName)); + return toJS(exec, thisObj->globalObject(), thisObj->impl()->itemWithName(propertyName)); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp new file mode 100644 index 0000000000..c45a6a34a6 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if ENABLE(WORKERS) + +#include "JSDedicatedWorkerContext.h" + +using namespace JSC; + +namespace WebCore { + +void JSDedicatedWorkerContext::mark() +{ + Base::mark(); + + markIfNotNull(impl()->onmessage()); +} + +} // namespace WebCore + +#endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp index 956327a3ed..493aaeaa8c 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp @@ -56,8 +56,7 @@ JSValue JSDocument::location(ExecState* exec) const if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), location)) return wrapper; - JSDOMWindow* window = static_cast<JSDOMWindow*>(exec->lexicalGlobalObject()); - JSLocation* jsLocation = new (exec) JSLocation(getDOMStructure<JSLocation>(exec, window), location); + JSLocation* jsLocation = new (exec) JSLocation(getDOMStructure<JSLocation>(exec, globalObject()), globalObject(), location); cacheDOMObjectWrapper(exec->globalData(), location, jsLocation); return jsLocation; } @@ -80,7 +79,7 @@ void JSDocument::setLocation(ExecState* exec, JSValue value) frame->loader()->scheduleLocationChange(str, activeFrame->loader()->outgoingReferrer(), !activeFrame->script()->anyPageIsProcessingUserGesture(), false, userGesture); } -JSValue toJS(ExecState* exec, Document* document) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Document* document) { if (!document) return jsNull(); @@ -90,13 +89,13 @@ JSValue toJS(ExecState* exec, Document* document) return wrapper; if (document->isHTMLDocument()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, HTMLDocument, document); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLDocument, document); #if ENABLE(SVG) else if (document->isSVGDocument()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, SVGDocument, document); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, SVGDocument, document); #endif else - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, Document, document); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, Document, document); // Make sure the document is kept around by the window object, and works right with the // back/forward cache. diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSElementCustom.cpp index b12c185cc2..47793d0a8c 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSElementCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSElementCustom.cpp @@ -53,7 +53,7 @@ using namespace HTMLNames; static inline bool allowSettingSrcToJavascriptURL(ExecState* exec, Element* element, const String& name, const String& value) { - if ((element->hasTagName(iframeTag) || element->hasTagName(frameTag)) && equalIgnoringCase(name, "src") && protocolIsJavaScript(parseURL(value))) { + if ((element->hasTagName(iframeTag) || element->hasTagName(frameTag)) && equalIgnoringCase(name, "src") && protocolIsJavaScript(deprecatedParseURL(value))) { HTMLFrameElementBase* frame = static_cast<HTMLFrameElementBase*>(element); if (!checkNodeSecurity(exec, frame->contentDocument())) return false; @@ -89,7 +89,7 @@ JSValue JSElement::setAttributeNode(ExecState* exec, const ArgList& args) if (!allowSettingSrcToJavascriptURL(exec, imp, newAttr->name(), newAttr->value())) return jsUndefined(); - JSValue result = toJS(exec, WTF::getPtr(imp->setAttributeNode(newAttr, ec))); + JSValue result = toJS(exec, globalObject(), WTF::getPtr(imp->setAttributeNode(newAttr, ec))); setDOMException(exec, ec); return result; } @@ -123,12 +123,12 @@ JSValue JSElement::setAttributeNodeNS(ExecState* exec, const ArgList& args) if (!allowSettingSrcToJavascriptURL(exec, imp, newAttr->name(), newAttr->value())) return jsUndefined(); - JSValue result = toJS(exec, WTF::getPtr(imp->setAttributeNodeNS(newAttr, ec))); + JSValue result = toJS(exec, globalObject(), WTF::getPtr(imp->setAttributeNodeNS(newAttr, ec))); setDOMException(exec, ec); return result; } -JSValue toJSNewlyCreated(ExecState* exec, Element* element) +JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, Element* element) { if (!element) return jsNull(); @@ -137,15 +137,15 @@ JSValue toJSNewlyCreated(ExecState* exec, Element* element) JSNode* wrapper; if (element->isHTMLElement()) - wrapper = createJSHTMLWrapper(exec, static_cast<HTMLElement*>(element)); + wrapper = createJSHTMLWrapper(exec, globalObject, static_cast<HTMLElement*>(element)); #if ENABLE(SVG) else if (element->isSVGElement()) - wrapper = createJSSVGWrapper(exec, static_cast<SVGElement*>(element)); + wrapper = createJSSVGWrapper(exec, globalObject, static_cast<SVGElement*>(element)); #endif else - wrapper = CREATE_DOM_NODE_WRAPPER(exec, Element, element); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Element, element); return wrapper; } - + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSEventCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSEventCustom.cpp index 03b97d8c86..257c259286 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSEventCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSEventCustom.cpp @@ -32,6 +32,7 @@ #include "Clipboard.h" #include "Event.h" #include "JSClipboard.h" +#include "JSErrorEvent.h" #include "JSKeyboardEvent.h" #include "JSMessageEvent.h" #include "JSMouseEvent.h" @@ -44,6 +45,7 @@ #include "JSWebKitTransitionEvent.h" #include "JSWheelEvent.h" #include "JSXMLHttpRequestProgressEvent.h" +#include "ErrorEvent.h" #include "KeyboardEvent.h" #include "MessageEvent.h" #include "MouseEvent.h" @@ -74,12 +76,12 @@ namespace WebCore { JSValue JSEvent::clipboardData(ExecState* exec) const { - return impl()->isClipboardEvent() ? toJS(exec, impl()->clipboardData()) : jsUndefined(); + return impl()->isClipboardEvent() ? toJS(exec, globalObject(), impl()->clipboardData()) : jsUndefined(); } -JSValue toJS(ExecState* exec, Event* event) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Event* event) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); if (!event) return jsNull(); @@ -90,41 +92,45 @@ JSValue toJS(ExecState* exec, Event* event) if (event->isUIEvent()) { if (event->isKeyboardEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, KeyboardEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, KeyboardEvent, event); else if (event->isTextEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, TextEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, TextEvent, event); else if (event->isMouseEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, MouseEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, MouseEvent, event); else if (event->isWheelEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, WheelEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, WheelEvent, event); #if ENABLE(SVG) else if (event->isSVGZoomEvent()) - wrapper = CREATE_SVG_OBJECT_WRAPPER(exec, SVGZoomEvent, event, 0); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, SVGZoomEvent, event); #endif else - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, UIEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, UIEvent, event); } else if (event->isMutationEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, MutationEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, MutationEvent, event); else if (event->isOverflowEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, OverflowEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, OverflowEvent, event); else if (event->isMessageEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, MessageEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, MessageEvent, event); else if (event->isProgressEvent()) { if (event->isXMLHttpRequestProgressEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, XMLHttpRequestProgressEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, XMLHttpRequestProgressEvent, event); else - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, ProgressEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, ProgressEvent, event); } #if ENABLE(DOM_STORAGE) else if (event->isStorageEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, StorageEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, StorageEvent, event); #endif else if (event->isWebKitAnimationEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, WebKitAnimationEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, WebKitAnimationEvent, event); else if (event->isWebKitTransitionEvent()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, WebKitTransitionEvent, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, WebKitTransitionEvent, event); +#if ENABLE(WORKERS) + else if (event->isErrorEvent()) + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, ErrorEvent, event); +#endif else - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, Event, event); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, Event, event); return wrapper; } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.cpp index b9ed685a69..a659d3e365 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.cpp @@ -61,7 +61,7 @@ void JSEventListener::markJSFunction() void JSEventListener::handleEvent(Event* event, bool isWindowEvent) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSObject* jsFunction = this->jsFunction(); if (!jsFunction) @@ -71,6 +71,7 @@ void JSEventListener::handleEvent(Event* event, bool isWindowEvent) // Null check as clearGlobalObject() can clear this and we still get called back by // xmlhttprequest objects. See http://bugs.webkit.org/show_bug.cgi?id=13275 // FIXME: Is this check still necessary? Requests are supposed to be stopped before clearGlobalObject() is called. + ASSERT(globalObject); if (!globalObject) return; @@ -107,7 +108,7 @@ void JSEventListener::handleEvent(Event* event, bool isWindowEvent) ref(); MarkedArgumentBuffer args; - args.append(toJS(exec, event)); + args.append(toJS(exec, globalObject, event)); Event* savedEvent = globalObject->currentEvent(); globalObject->setCurrentEvent(event); @@ -127,7 +128,7 @@ void JSEventListener::handleEvent(Event* event, bool isWindowEvent) if (isWindowEvent) thisValue = globalObject->toThisObject(exec); else - thisValue = toJS(exec, event->currentTarget()); + thisValue = toJS(exec, globalObject, event->currentTarget()); globalObject->globalData()->timeoutChecker.start(); retval = call(exec, jsFunction, callType, callData, thisValue, args); } @@ -153,6 +154,53 @@ void JSEventListener::handleEvent(Event* event, bool isWindowEvent) } } +bool JSEventListener::reportError(const String& message, const String& url, int lineNumber) +{ + JSLock lock(SilenceAssertionsOnly); + + JSObject* jsFunction = this->jsFunction(); + if (!jsFunction) + return false; + + JSDOMGlobalObject* globalObject = m_globalObject; + if (!globalObject) + return false; + + ExecState* exec = globalObject->globalExec(); + + CallData callData; + CallType callType = jsFunction->getCallData(callData); + + if (callType == CallTypeNone) + return false; + + MarkedArgumentBuffer args; + args.append(jsString(exec, message)); + args.append(jsString(exec, url)); + args.append(jsNumber(exec, lineNumber)); + + // If this event handler is the first JavaScript to execute, then the + // dynamic global object should be set to the global object of the + // window in which the event occurred. + JSGlobalData* globalData = globalObject->globalData(); + DynamicGlobalObjectScope globalObjectScope(exec, globalData->dynamicGlobalObject ? globalData->dynamicGlobalObject : globalObject); + + JSValue thisValue = globalObject->toThisObject(exec); + + globalObject->globalData()->timeoutChecker.start(); + JSValue returnValue = call(exec, jsFunction, callType, callData, thisValue, args); + globalObject->globalData()->timeoutChecker.stop(); + + // If an error occurs while handling the script error, it should be bubbled up. + if (exec->hadException()) { + exec->clearException(); + return false; + } + + bool bubbleEvent; + return returnValue.getBoolean(bubbleEvent) && !bubbleEvent; +} + bool JSEventListener::virtualisAttribute() const { return m_isAttribute; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.h b/src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.h index ce34832ead..24977502e2 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.h @@ -45,6 +45,7 @@ namespace WebCore { private: virtual void markJSFunction(); virtual void handleEvent(Event*, bool isWindowEvent); + virtual bool reportError(const String& message, const String& url, int lineNumber); virtual bool virtualisAttribute() const; void clearJSFunctionInline(); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp index 875e904ad6..b75cccf6a8 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp @@ -50,10 +50,10 @@ #endif #if ENABLE(WORKERS) +#include "DedicatedWorkerContext.h" +#include "JSDedicatedWorkerContext.h" #include "JSWorker.h" -#include "JSWorkerContext.h" #include "Worker.h" -#include "WorkerContext.h" #endif #if ENABLE(SHARED_WORKERS) @@ -65,7 +65,7 @@ using namespace JSC; namespace WebCore { -JSValue toJS(ExecState* exec, EventTarget* target) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* target) { if (!target) return jsNull(); @@ -73,42 +73,40 @@ JSValue toJS(ExecState* exec, EventTarget* target) #if ENABLE(SVG) // SVGElementInstance supports both toSVGElementInstance and toNode since so much mouse handling code depends on toNode returning a valid node. if (SVGElementInstance* instance = target->toSVGElementInstance()) - return toJS(exec, instance); + return toJS(exec, globalObject, instance); #endif if (Node* node = target->toNode()) - return toJS(exec, node); + return toJS(exec, globalObject, node); if (DOMWindow* domWindow = target->toDOMWindow()) - return toJS(exec, domWindow); + return toJS(exec, globalObject, domWindow); if (XMLHttpRequest* xhr = target->toXMLHttpRequest()) - // XMLHttpRequest is always created via JS, so we don't need to use cacheDOMObject() here. - return getCachedDOMObjectWrapper(exec->globalData(), xhr); + return toJS(exec, globalObject, xhr); if (XMLHttpRequestUpload* upload = target->toXMLHttpRequestUpload()) - return toJS(exec, upload); + return toJS(exec, globalObject, upload); #if ENABLE(OFFLINE_WEB_APPLICATIONS) if (DOMApplicationCache* cache = target->toDOMApplicationCache()) - // DOMApplicationCache is always created via JS, so we don't need to use cacheDOMObject() here. - return getCachedDOMObjectWrapper(exec->globalData(), cache); + return toJS(exec, globalObject, cache); #endif if (MessagePort* messagePort = target->toMessagePort()) - return toJS(exec, messagePort); + return toJS(exec, globalObject, messagePort); #if ENABLE(WORKERS) if (Worker* worker = target->toWorker()) - return toJS(exec, worker); + return toJS(exec, globalObject, worker); - if (WorkerContext* workerContext = target->toWorkerContext()) + if (DedicatedWorkerContext* workerContext = target->toDedicatedWorkerContext()) return toJSDOMGlobalObject(workerContext); #endif #if ENABLE(SHARED_WORKERS) if (SharedWorker* sharedWorker = target->toSharedWorker()) - return toJS(exec, sharedWorker); + return toJS(exec, globalObject, sharedWorker); #endif ASSERT_NOT_REACHED(); @@ -139,7 +137,7 @@ EventTarget* toEventTarget(JSC::JSValue value) #if ENABLE(WORKERS) CONVERT_TO_EVENT_TARGET(Worker) - CONVERT_TO_EVENT_TARGET(WorkerContext) + CONVERT_TO_EVENT_TARGET(DedicatedWorkerContext) #endif #if ENABLE(SHARED_WORKERS) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.h b/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.h index 05df0568db..ddd8232418 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.h @@ -35,8 +35,9 @@ namespace JSC { namespace WebCore { class EventTarget; + class JSDOMGlobalObject; - JSC::JSValue toJS(JSC::ExecState*, EventTarget*); + JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, EventTarget*); EventTarget* toEventTarget(JSC::JSValue); } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollection.h b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollection.h index d559d3b767..7363e5ce2f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollection.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollection.h @@ -35,8 +35,8 @@ namespace WebCore { class JSHTMLAllCollection : public JSHTMLCollection { public: - JSHTMLAllCollection(PassRefPtr<JSC::Structure> structure, PassRefPtr<HTMLCollection> collection) - : JSHTMLCollection(structure, collection) + JSHTMLAllCollection(PassRefPtr<JSC::Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLCollection> collection) + : JSHTMLCollection(structure, globalObject, collection) { } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCollectionCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCollectionCustom.cpp index 4100468999..dd9af749bd 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCollectionCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCollectionCustom.cpp @@ -35,18 +35,18 @@ using namespace JSC; namespace WebCore { -static JSValue getNamedItems(ExecState* exec, HTMLCollection* impl, const Identifier& propertyName) +static JSValue getNamedItems(ExecState* exec, JSHTMLCollection* collection, const Identifier& propertyName) { Vector<RefPtr<Node> > namedItems; - impl->namedItems(propertyName, namedItems); + collection->impl()->namedItems(propertyName, namedItems); if (namedItems.isEmpty()) return jsUndefined(); if (namedItems.size() == 1) - return toJS(exec, namedItems[0].get()); + return toJS(exec, collection->globalObject(), namedItems[0].get()); - return new (exec) JSNamedNodesCollection(exec, namedItems); + return new (exec) JSNamedNodesCollection(exec, collection->globalObject(), namedItems); } // HTMLCollections are strange objects, they support both get and call, @@ -57,7 +57,8 @@ static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec, JSObject* funct return jsUndefined(); // Do not use thisObj here. It can be the JSHTMLDocument, in the document.forms(i) case. - HTMLCollection* collection = static_cast<JSHTMLCollection*>(function)->impl(); + JSHTMLCollection* jsCollection = static_cast<JSHTMLCollection*>(function); + HTMLCollection* collection = jsCollection->impl(); // Also, do we need the TypeError test here ? @@ -67,10 +68,10 @@ static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec, JSObject* funct UString string = args.at(0).toString(exec); unsigned index = string.toUInt32(&ok, false); if (ok) - return toJS(exec, collection->item(index)); + return toJS(exec, jsCollection->globalObject(), collection->item(index)); // Support for document.images('<name>') etc. - return getNamedItems(exec, collection, Identifier(exec, string)); + return getNamedItems(exec, jsCollection, Identifier(exec, string)); } // The second arg, if set, is the index of the item we want @@ -82,7 +83,7 @@ static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec, JSObject* funct Node* node = collection->namedItem(pstr); while (node) { if (!index) - return toJS(exec, node); + return toJS(exec, jsCollection->globalObject(), node); node = collection->nextNamedItem(pstr); --index; } @@ -97,15 +98,17 @@ CallType JSHTMLCollection::getCallData(CallData& callData) return CallTypeHost; } -bool JSHTMLCollection::canGetItemsForName(ExecState* exec, HTMLCollection* thisObj, const Identifier& propertyName) +bool JSHTMLCollection::canGetItemsForName(ExecState*, HTMLCollection* collection, const Identifier& propertyName) { - return !getNamedItems(exec, thisObj, propertyName).isUndefined(); + Vector<RefPtr<Node> > namedItems; + collection->namedItems(propertyName, namedItems); + return !namedItems.isEmpty(); } JSValue JSHTMLCollection::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot) { JSHTMLCollection* thisObj = static_cast<JSHTMLCollection*>(asObject(slot.slotBase())); - return getNamedItems(exec, thisObj->impl(), propertyName); + return getNamedItems(exec, thisObj, propertyName); } JSValue JSHTMLCollection::item(ExecState* exec, const ArgList& args) @@ -113,16 +116,16 @@ JSValue JSHTMLCollection::item(ExecState* exec, const ArgList& args) bool ok; uint32_t index = args.at(0).toString(exec).toUInt32(&ok, false); if (ok) - return toJS(exec, impl()->item(index)); - return getNamedItems(exec, impl(), Identifier(exec, args.at(0).toString(exec))); + return toJS(exec, globalObject(), impl()->item(index)); + return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec))); } JSValue JSHTMLCollection::namedItem(ExecState* exec, const ArgList& args) { - return getNamedItems(exec, impl(), Identifier(exec, args.at(0).toString(exec))); + return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec))); } -JSValue toJS(ExecState* exec, HTMLCollection* collection) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, HTMLCollection* collection) { if (!collection) return jsNull(); @@ -134,14 +137,14 @@ JSValue toJS(ExecState* exec, HTMLCollection* collection) switch (collection->type()) { case SelectOptions: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, HTMLOptionsCollection, collection); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLOptionsCollection, collection); break; case DocAll: typedef HTMLCollection HTMLAllCollection; - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, HTMLAllCollection, collection); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLAllCollection, collection); break; default: - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, HTMLCollection, collection); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLCollection, collection); break; } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLElementCustom.cpp index 3345764f3e..419465721f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLElementCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLElementCustom.cpp @@ -38,14 +38,14 @@ void JSHTMLElement::pushEventHandlerScope(ExecState* exec, ScopeChain& scope) co HTMLElement* element = impl(); // The document is put on first, fall back to searching it only after the element and form. - scope.push(asObject(toJS(exec, element->ownerDocument()))); + scope.push(asObject(toJS(exec, globalObject(), element->ownerDocument()))); // The form is next, searched before the document, but after the element itself. if (HTMLFormElement* form = element->form()) - scope.push(asObject(toJS(exec, form))); + scope.push(asObject(toJS(exec, globalObject(), form))); // The element is on top, searched first. - scope.push(asObject(toJS(exec, element))); + scope.push(asObject(toJS(exec, globalObject(), element))); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp index e5b428a535..ffa2d5779c 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp @@ -45,7 +45,8 @@ bool JSHTMLFormElement::canGetItemsForName(ExecState*, HTMLFormElement* form, co JSValue JSHTMLFormElement::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot) { - HTMLFormElement* form = static_cast<HTMLFormElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + JSHTMLElement* jsForm = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); + HTMLFormElement* form = static_cast<HTMLFormElement*>(jsForm->impl()); Vector<RefPtr<Node> > namedItems; form->getNamedElements(propertyName, namedItems); @@ -53,7 +54,7 @@ JSValue JSHTMLFormElement::nameGetter(ExecState* exec, const Identifier& propert if (namedItems.size() == 1) return toJS(exec, namedItems[0].get()); if (namedItems.size() > 1) - return new (exec) JSNamedNodesCollection(exec, namedItems); + return new (exec) JSNamedNodesCollection(exec, jsForm->globalObject(), namedItems); return jsUndefined(); } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp index 0a5d1f14b5..c8aea9fea2 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp @@ -40,7 +40,7 @@ namespace WebCore { static inline bool allowSettingJavascriptURL(ExecState* exec, HTMLFrameElement* imp, const String& value) { - if (protocolIsJavaScript(parseURL(value))) { + if (protocolIsJavaScript(deprecatedParseURL(value))) { if (!checkNodeSecurity(exec, imp->contentDocument())) return false; } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp index afff977dee..8e32381bcd 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp @@ -44,7 +44,7 @@ void JSHTMLIFrameElement::setSrc(ExecState* exec, JSValue value) String srcValue = valueToStringWithNullCheck(exec, value); - if (protocolIsJavaScript(parseURL(srcValue))) { + if (protocolIsJavaScript(deprecatedParseURL(srcValue))) { if (!checkNodeSecurity(exec, imp->contentDocument())) return; } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp index 460ba084ac..7bca2db6b9 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp @@ -91,7 +91,7 @@ JSValue JSHTMLOptionsCollection::add(ExecState* exec, const ArgList& args) JSValue JSHTMLOptionsCollection::remove(ExecState* exec, const ArgList& args) { HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl()); - JSHTMLSelectElement* base = static_cast<JSHTMLSelectElement*>(asObject(toJS(exec, imp->base()))); + JSHTMLSelectElement* base = static_cast<JSHTMLSelectElement*>(asObject(toJS(exec, globalObject(), imp->base()))); return base->remove(exec, args); } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.cpp index 4a27bb4a22..faaaf41ed6 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.cpp @@ -35,18 +35,9 @@ ASSERT_CLASS_FITS_IN_CELL(JSImageConstructor); const ClassInfo JSImageConstructor::s_info = { "ImageConstructor", 0, 0, 0 }; JSImageConstructor::JSImageConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) - : DOMObject(JSImageConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) - , m_globalObject(globalObject) + : DOMConstructorWithDocument(JSImageConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - ASSERT(globalObject->scriptExecutionContext()); - ASSERT(globalObject->scriptExecutionContext()->isDocument()); - - putDirect(exec->propertyNames().prototype, JSHTMLImageElementPrototype::self(exec, exec->lexicalGlobalObject()), None); -} - -Document* JSImageConstructor::document() const -{ - return static_cast<Document*>(m_globalObject->scriptExecutionContext()); + putDirect(exec->propertyNames().prototype, JSHTMLImageElementPrototype::self(exec, globalObject), None); } static JSObject* constructImage(ExecState* exec, JSObject* constructor, const ArgList& args) @@ -64,21 +55,22 @@ static JSObject* constructImage(ExecState* exec, JSObject* constructor, const Ar height = args.at(1).toInt32(exec); } - Document* document = static_cast<JSImageConstructor*>(constructor)->document(); + JSImageConstructor* jsConstructor = static_cast<JSImageConstructor*>(constructor); + Document* document = jsConstructor->document(); if (!document) return throwError(exec, ReferenceError, "Image constructor associated document is unavailable"); // Calling toJS on the document causes the JS document wrapper to be // added to the window object. This is done to ensure that JSDocument::mark // will be called (which will cause the image element to be marked if necessary). - toJS(exec, document); + toJS(exec, jsConstructor->globalObject(), document); RefPtr<HTMLImageElement> image = new HTMLImageElement(HTMLNames::imgTag, document); if (widthSet) image->setWidth(width); if (heightSet) image->setHeight(height); - return asObject(toJS(exec, image.release())); + return asObject(toJS(exec, jsConstructor->globalObject(), image.release())); } ConstructType JSImageConstructor::getConstructData(ConstructData& constructData) @@ -87,11 +79,4 @@ ConstructType JSImageConstructor::getConstructData(ConstructData& constructData) return ConstructTypeHost; } -void JSImageConstructor::mark() -{ - DOMObject::mark(); - if (!m_globalObject->marked()) - m_globalObject->mark(); -} - } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.h index 8dc7add2ac..0525f5eac1 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.h @@ -25,19 +25,14 @@ namespace WebCore { - class JSImageConstructor : public DOMObject { + class JSImageConstructor : public DOMConstructorWithDocument { public: JSImageConstructor(JSC::ExecState*, JSDOMGlobalObject*); - Document* document() const; static const JSC::ClassInfo s_info; - - virtual void mark(); private: virtual JSC::ConstructType getConstructData(JSC::ConstructData&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } - - JSDOMGlobalObject* m_globalObject; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSImageDataCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSImageDataCustom.cpp index 32fe58bcf5..fa3b1d5c03 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSImageDataCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSImageDataCustom.cpp @@ -36,7 +36,7 @@ using namespace JSC; namespace WebCore { -JSValue toJS(ExecState* exec, ImageData* imageData) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, ImageData* imageData) { if (!imageData) return jsNull(); @@ -45,7 +45,7 @@ JSValue toJS(ExecState* exec, ImageData* imageData) if (wrapper) return wrapper; - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, ImageData, imageData); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, ImageData, imageData); Identifier dataName(exec, "data"); DEFINE_STATIC_LOCAL(RefPtr<Structure>, cpaStructure, (JSByteArray::createStructure(jsNull()))); static const ClassInfo cpaClassInfo = { "CanvasPixelArray", 0, 0, 0 }; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSInspectorControllerCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSInspectorBackendCustom.cpp index b06c9e9802..b2eb2d17ce 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSInspectorControllerCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSInspectorBackendCustom.cpp @@ -31,7 +31,7 @@ */ #include "config.h" -#include "JSInspectorController.h" +#include "JSInspectorBackend.h" #include "Console.h" #if ENABLE(DATABASE) @@ -41,6 +41,7 @@ #include "ExceptionCode.h" #include "Frame.h" #include "FrameLoader.h" +#include "InspectorBackend.h" #include "InspectorController.h" #include "InspectorResource.h" #include "JSDOMWindow.h" @@ -69,7 +70,7 @@ using namespace JSC; namespace WebCore { -JSValue JSInspectorController::highlightDOMNode(JSC::ExecState*, const JSC::ArgList& args) +JSValue JSInspectorBackend::highlightDOMNode(JSC::ExecState*, const JSC::ArgList& args) { if (args.size() < 1) return jsUndefined(); @@ -87,34 +88,7 @@ JSValue JSInspectorController::highlightDOMNode(JSC::ExecState*, const JSC::ArgL return jsUndefined(); } -JSValue JSInspectorController::getResourceDocumentNode(ExecState* exec, const ArgList& args) -{ - if (args.size() < 1) - return jsUndefined(); - - bool ok = false; - unsigned identifier = args.at(0).toUInt32(exec, ok); - if (!ok) - return jsUndefined(); - - RefPtr<InspectorResource> resource = impl()->resources().get(identifier); - ASSERT(resource); - if (!resource) - return jsUndefined(); - - Frame* frame = resource->frame(); - Document* document = frame->document(); - - if (document->isPluginDocument() || document->isImageDocument() || document->isMediaDocument()) - return jsUndefined(); - - ExecState* resourceExec = toJSDOMWindowShell(frame)->window()->globalExec(); - - JSLock lock(false); - return JSInspectedObjectWrapper::wrap(resourceExec, toJS(resourceExec, document)); -} - -JSValue JSInspectorController::search(ExecState* exec, const ArgList& args) +JSValue JSInspectorBackend::search(ExecState* exec, const ArgList& args) { if (args.size() < 2) return jsUndefined(); @@ -151,7 +125,7 @@ JSValue JSInspectorController::search(ExecState* exec, const ArgList& args) } #if ENABLE(DATABASE) -JSValue JSInspectorController::databaseTableNames(ExecState* exec, const ArgList& args) +JSValue JSInspectorBackend::databaseTableNames(ExecState* exec, const ArgList& args) { if (args.size() < 1) return jsUndefined(); @@ -175,13 +149,16 @@ JSValue JSInspectorController::databaseTableNames(ExecState* exec, const ArgList } #endif -JSValue JSInspectorController::inspectedWindow(ExecState*, const ArgList&) +JSValue JSInspectorBackend::inspectedWindow(ExecState*, const ArgList&) { - JSDOMWindow* inspectedWindow = toJSDOMWindow(impl()->inspectedPage()->mainFrame()); + InspectorController* ic = impl()->inspectorController(); + if (!ic) + return jsUndefined(); + JSDOMWindow* inspectedWindow = toJSDOMWindow(ic->inspectedPage()->mainFrame()); return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), inspectedWindow); } -JSValue JSInspectorController::setting(ExecState* exec, const ArgList& args) +JSValue JSInspectorBackend::setting(ExecState* exec, const ArgList& args) { if (args.size() < 1) return jsUndefined(); @@ -190,7 +167,10 @@ JSValue JSInspectorController::setting(ExecState* exec, const ArgList& args) if (exec->hadException()) return jsUndefined(); - const InspectorController::Setting& setting = impl()->setting(key); + InspectorController* ic = impl()->inspectorController(); + if (!ic) + return jsUndefined(); + const InspectorController::Setting& setting = ic->setting(key); switch (setting.type()) { default: @@ -215,7 +195,7 @@ JSValue JSInspectorController::setting(ExecState* exec, const ArgList& args) } } -JSValue JSInspectorController::setSetting(ExecState* exec, const ArgList& args) +JSValue JSInspectorBackend::setSetting(ExecState* exec, const ArgList& args) { if (args.size() < 2) return jsUndefined(); @@ -253,12 +233,14 @@ JSValue JSInspectorController::setSetting(ExecState* exec, const ArgList& args) if (exec->hadException()) return jsUndefined(); - impl()->setSetting(key, setting); + InspectorController* ic = impl()->inspectorController(); + if (ic) + ic->setSetting(key, setting); return jsUndefined(); } -JSValue JSInspectorController::wrapCallback(ExecState* exec, const ArgList& args) +JSValue JSInspectorBackend::wrapCallback(ExecState* exec, const ArgList& args) { if (args.size() < 1) return jsUndefined(); @@ -268,7 +250,7 @@ JSValue JSInspectorController::wrapCallback(ExecState* exec, const ArgList& args #if ENABLE(JAVASCRIPT_DEBUGGER) -JSValue JSInspectorController::currentCallFrame(ExecState* exec, const ArgList&) +JSValue JSInspectorBackend::currentCallFrame(ExecState* exec, const ArgList&) { JavaScriptCallFrame* callFrame = impl()->currentCallFrame(); if (!callFrame || !callFrame->isValid()) @@ -277,15 +259,18 @@ JSValue JSInspectorController::currentCallFrame(ExecState* exec, const ArgList&) // FIXME: I am not sure if this is actually needed. Can we just use exec? ExecState* globalExec = callFrame->scopeChain()->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return JSInspectedObjectWrapper::wrap(globalExec, toJS(exec, callFrame)); } -JSValue JSInspectorController::profiles(JSC::ExecState* exec, const JSC::ArgList&) +JSValue JSInspectorBackend::profiles(JSC::ExecState* exec, const JSC::ArgList&) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); MarkedArgumentBuffer result; - const Vector<RefPtr<Profile> >& profiles = impl()->profiles(); + InspectorController* ic = impl()->inspectorController(); + if (!ic) + return jsUndefined(); + const Vector<RefPtr<Profile> >& profiles = ic->profiles(); for (size_t i = 0; i < profiles.size(); ++i) result.append(toJS(exec, profiles[i].get())); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp index 8913243959..7caff2b238 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp @@ -117,7 +117,7 @@ void JSLazyEventListener::parseCode() const // (and the document, and the form - see JSHTMLElement::eventHandlerScope) ScopeChain scope = listenerAsFunction->scope(); - JSValue thisObj = toJS(exec, m_originalNode); + JSValue thisObj = toJS(exec, m_globalObject, m_originalNode); if (thisObj.isObject()) { static_cast<JSNode*>(asObject(thisObj))->pushEventHandlerScope(exec, scope); listenerAsFunction->setScope(scope); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp index 495bd53a1c..25a5cb2e8e 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp @@ -38,21 +38,15 @@ namespace WebCore { const ClassInfo JSMessageChannelConstructor::s_info = { "MessageChannelConstructor", 0, 0, 0 }; JSMessageChannelConstructor::JSMessageChannelConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) - : DOMObject(JSMessageChannelConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) - , m_globalObject(globalObject) + : DOMConstructorObject(JSMessageChannelConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMessageChannelPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMessageChannelPrototype::self(exec, globalObject), None); } JSMessageChannelConstructor::~JSMessageChannelConstructor() { } -ScriptExecutionContext* JSMessageChannelConstructor::scriptExecutionContext() const -{ - return m_globalObject->scriptExecutionContext(); -} - ConstructType JSMessageChannelConstructor::getConstructData(ConstructData& constructData) { constructData.native.function = construct; @@ -61,18 +55,12 @@ ConstructType JSMessageChannelConstructor::getConstructData(ConstructData& const JSObject* JSMessageChannelConstructor::construct(ExecState* exec, JSObject* constructor, const ArgList&) { - ScriptExecutionContext* context = static_cast<JSMessageChannelConstructor*>(constructor)->scriptExecutionContext(); + JSMessageChannelConstructor* jsConstructor = static_cast<JSMessageChannelConstructor*>(constructor); + ScriptExecutionContext* context = jsConstructor->scriptExecutionContext(); if (!context) return throwError(exec, ReferenceError, "MessageChannel constructor associated document is unavailable"); - return asObject(toJS(exec, MessageChannel::create(context))); -} - -void JSMessageChannelConstructor::mark() -{ - DOMObject::mark(); - if (!m_globalObject->marked()) - m_globalObject->mark(); + return asObject(toJS(exec, jsConstructor->globalObject(), MessageChannel::create(context))); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.h index 90c29a3c11..d958760470 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.h @@ -30,23 +30,16 @@ namespace WebCore { - class JSMessageChannelConstructor : public DOMObject { + class JSMessageChannelConstructor : public DOMConstructorObject { public: JSMessageChannelConstructor(JSC::ExecState*, JSDOMGlobalObject*); virtual ~JSMessageChannelConstructor(); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; - ScriptExecutionContext* scriptExecutionContext() const; - virtual bool implementsHasInstance() const { return true; } static JSC::JSObject* construct(JSC::ExecState*, JSC::JSObject*, const JSC::ArgList&); virtual JSC::ConstructType getConstructData(JSC::ConstructData&); - - virtual void mark(); - - private: - JSDOMGlobalObject* m_globalObject; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelCustom.cpp index 70329e2c8c..d3b58789ab 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelCustom.cpp @@ -34,7 +34,7 @@ namespace WebCore { void JSMessageChannel::mark() { - DOMObject::mark(); + Base::mark(); if (MessagePort* port = m_impl->port1()) { DOMObject* wrapper = getCachedDOMObjectWrapper(*Heap::heap(this)->globalData(), port); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSMessagePortCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSMessagePortCustom.cpp index bfac37536f..71472d5b7f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSMessagePortCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSMessagePortCustom.cpp @@ -40,7 +40,7 @@ namespace WebCore { void JSMessagePort::mark() { - DOMObject::mark(); + Base::mark(); markIfNotNull(m_impl->onmessage()); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp index af1995bb34..f36a7d6a1e 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp @@ -42,10 +42,8 @@ const ClassInfo JSNamedNodesCollection::s_info = { "Collection", 0, 0, 0 }; // Such a collection is usually very short-lived, it only exists // for constructs like document.forms.<name>[1], // so it shouldn't be a problem that it's storing all the nodes (with the same name). (David) -JSNamedNodesCollection::JSNamedNodesCollection(ExecState* exec, const Vector<RefPtr<Node> >& nodes) - // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object - // we should use the global object from the nodes. - : DOMObject(deprecatedGetDOMStructure<JSNamedNodesCollection>(exec)) +JSNamedNodesCollection::JSNamedNodesCollection(ExecState* exec, JSDOMGlobalObject* globalObject, const Vector<RefPtr<Node> >& nodes) + : DOMObjectWithGlobalPointer(getDOMStructure<JSNamedNodesCollection>(exec, globalObject), globalObject) , m_nodes(new Vector<RefPtr<Node> >(nodes)) { } @@ -88,7 +86,7 @@ bool JSNamedNodesCollection::getOwnPropertySlot(ExecState* exec, const Identifie } } - return DOMObject::getOwnPropertySlot(exec, propertyName, slot); + return DOMObjectWithGlobalPointer::getOwnPropertySlot(exec, propertyName, slot); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.h b/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.h index 3bbc102b9c..cd6c2cb9fe 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.h @@ -35,9 +35,9 @@ namespace WebCore { // Internal class, used for the collection return by e.g. document.forms.myinput // when multiple nodes have the same name. - class JSNamedNodesCollection : public DOMObject { + class JSNamedNodesCollection : public DOMObjectWithGlobalPointer { public: - JSNamedNodesCollection(JSC::ExecState*, const Vector<RefPtr<Node> >&); + JSNamedNodesCollection(JSC::ExecState*, JSDOMGlobalObject*, const Vector<RefPtr<Node> >&); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSNodeCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSNodeCustom.cpp index 79ac6b78cb..2f080b8f9a 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSNodeCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSNodeCustom.cpp @@ -146,7 +146,7 @@ void JSNode::mark() // the document, we need to mark the document, but we don't need to explicitly // mark any other nodes. if (node->inDocument()) { - DOMObject::mark(); + Base::mark(); markEventListeners(node->eventListeners()); if (Document* doc = node->ownerDocument()) if (DOMObject* docWrapper = getCachedDOMObjectWrapper(*Heap::heap(this)->globalData(), doc)) @@ -164,7 +164,7 @@ void JSNode::mark() // Nodes in a subtree are marked by the tree's root, so, if the root is already // marking the tree, we don't need to explicitly mark any other nodes. if (root->inSubtreeMark()) { - DOMObject::mark(); + Base::mark(); markEventListeners(node->eventListeners()); return; } @@ -192,7 +192,7 @@ void JSNode::mark() ASSERT(marked()); } -static ALWAYS_INLINE JSValue createWrapper(ExecState* exec, Node* node) +static ALWAYS_INLINE JSValue createWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node) { ASSERT(node); ASSERT(!getCachedDOMNodeWrapper(node->document(), node)); @@ -201,63 +201,63 @@ static ALWAYS_INLINE JSValue createWrapper(ExecState* exec, Node* node) switch (node->nodeType()) { case Node::ELEMENT_NODE: if (node->isHTMLElement()) - wrapper = createJSHTMLWrapper(exec, static_cast<HTMLElement*>(node)); + wrapper = createJSHTMLWrapper(exec, globalObject, static_cast<HTMLElement*>(node)); #if ENABLE(SVG) else if (node->isSVGElement()) - wrapper = createJSSVGWrapper(exec, static_cast<SVGElement*>(node)); + wrapper = createJSSVGWrapper(exec, globalObject, static_cast<SVGElement*>(node)); #endif else - wrapper = CREATE_DOM_NODE_WRAPPER(exec, Element, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Element, node); break; case Node::ATTRIBUTE_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, Attr, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Attr, node); break; case Node::TEXT_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, Text, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Text, node); break; case Node::CDATA_SECTION_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, CDATASection, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, CDATASection, node); break; case Node::ENTITY_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, Entity, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Entity, node); break; case Node::PROCESSING_INSTRUCTION_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, ProcessingInstruction, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, ProcessingInstruction, node); break; case Node::COMMENT_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, Comment, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Comment, node); break; case Node::DOCUMENT_NODE: // we don't want to cache the document itself in the per-document dictionary - return toJS(exec, static_cast<Document*>(node)); + return toJS(exec, globalObject, static_cast<Document*>(node)); case Node::DOCUMENT_TYPE_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, DocumentType, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, DocumentType, node); break; case Node::NOTATION_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, Notation, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Notation, node); break; case Node::DOCUMENT_FRAGMENT_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, DocumentFragment, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, DocumentFragment, node); break; case Node::ENTITY_REFERENCE_NODE: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, EntityReference, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, EntityReference, node); break; default: - wrapper = CREATE_DOM_NODE_WRAPPER(exec, Node, node); + wrapper = CREATE_DOM_NODE_WRAPPER(exec, globalObject, Node, node); } return wrapper; } -JSValue toJSNewlyCreated(ExecState* exec, Node* node) +JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node) { if (!node) return jsNull(); - return createWrapper(exec, node); + return createWrapper(exec, globalObject, node); } -JSValue toJS(ExecState* exec, Node* node) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node) { if (!node) return jsNull(); @@ -266,7 +266,7 @@ JSValue toJS(ExecState* exec, Node* node) if (wrapper) return wrapper; - return createWrapper(exec, node); + return createWrapper(exec, globalObject, node); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCondition.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCondition.cpp index f5d4d5c363..2595af587f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCondition.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCondition.cpp @@ -44,7 +44,7 @@ void JSNodeFilterCondition::mark() short JSNodeFilterCondition::acceptNode(JSC::ExecState* exec, Node* filterNode) const { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); CallData callData; CallType callType = m_filter.getCallData(callData); @@ -61,7 +61,9 @@ short JSNodeFilterCondition::acceptNode(JSC::ExecState* exec, Node* filterNode) return NodeFilter::FILTER_REJECT; MarkedArgumentBuffer args; - args.append(toJS(exec, filterNode)); + // FIXME: The node should have the prototype chain that came from its document, not + // whatever prototype chain might be on the window this filter came from. Bug 27662 + args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), filterNode)); if (exec->hadException()) return NodeFilter::FILTER_REJECT; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCustom.cpp index ecc12d55f1..a48a59d652 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCustom.cpp @@ -38,7 +38,7 @@ namespace WebCore { void JSNodeFilter::mark() { impl()->mark(); - DOMObject::mark(); + Base::mark(); } JSValue JSNodeFilter::acceptNode(ExecState* exec, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSNodeIteratorCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSNodeIteratorCustom.cpp index 8fff82ea78..a2b96586b9 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSNodeIteratorCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSNodeIteratorCustom.cpp @@ -34,7 +34,7 @@ void JSNodeIterator::mark() if (NodeFilter* filter = m_impl->filter()) filter->mark(); - DOMObject::mark(); + Base::mark(); } JSValue JSNodeIterator::nextNode(ExecState* exec, const ArgList&) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.cpp index 9e818ff686..2b8bd5d978 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.cpp @@ -35,24 +35,16 @@ ASSERT_CLASS_FITS_IN_CELL(JSOptionConstructor); const ClassInfo JSOptionConstructor::s_info = { "OptionConstructor", 0, 0, 0 }; JSOptionConstructor::JSOptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) - : DOMObject(JSOptionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) - , m_globalObject(globalObject) + : DOMConstructorWithDocument(JSOptionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - ASSERT(globalObject->scriptExecutionContext()); - ASSERT(globalObject->scriptExecutionContext()->isDocument()); - - putDirect(exec->propertyNames().prototype, JSHTMLOptionElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLOptionElementPrototype::self(exec, globalObject), None); putDirect(exec->propertyNames().length, jsNumber(exec, 4), ReadOnly|DontDelete|DontEnum); } -Document* JSOptionConstructor::document() const -{ - return static_cast<Document*>(m_globalObject->scriptExecutionContext()); -} - static JSObject* constructHTMLOptionElement(ExecState* exec, JSObject* constructor, const ArgList& args) { - Document* document = static_cast<JSOptionConstructor*>(constructor)->document(); + JSOptionConstructor* jsConstructor = static_cast<JSOptionConstructor*>(constructor); + Document* document = jsConstructor->document(); if (!document) return throwError(exec, ReferenceError, "Option constructor associated document is unavailable"); @@ -76,7 +68,7 @@ static JSObject* constructHTMLOptionElement(ExecState* exec, JSObject* construct return 0; } - return asObject(toJS(exec, element.release())); + return asObject(toJS(exec, jsConstructor->globalObject(), element.release())); } ConstructType JSOptionConstructor::getConstructData(ConstructData& constructData) @@ -85,11 +77,5 @@ ConstructType JSOptionConstructor::getConstructData(ConstructData& constructData return ConstructTypeHost; } -void JSOptionConstructor::mark() -{ - DOMObject::mark(); - if (!m_globalObject->marked()) - m_globalObject->mark(); -} } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.h index 3c87c28f10..246e7fa6c6 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.h @@ -26,19 +26,14 @@ namespace WebCore { - class JSOptionConstructor : public DOMObject { + class JSOptionConstructor : public DOMConstructorWithDocument { public: JSOptionConstructor(JSC::ExecState*, JSDOMGlobalObject*); - Document* document() const; static const JSC::ClassInfo s_info; - - virtual void mark(); private: virtual JSC::ConstructType getConstructData(JSC::ConstructData&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } - - JSDOMGlobalObject* m_globalObject; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp deleted file mode 100644 index c430d5fb10..0000000000 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2000 Harri Porten (porten@kde.org) - * Copyright (C) 2001 Peter Kelly (pmk@post.com) - * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. - * Copyright (C) 2006 James G. Speth (speth@end.com) - * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "JSRGBColor.h" - -#include "CSSPrimitiveValue.h" -#include "JSCSSPrimitiveValue.h" - -using namespace JSC; - -static JSValue jsRGBColorRed(ExecState*, const Identifier&, const PropertySlot&); -static JSValue jsRGBColorGreen(ExecState*, const Identifier&, const PropertySlot&); -static JSValue jsRGBColorBlue(ExecState*, const Identifier&, const PropertySlot&); - -/* -@begin JSRGBColorTable - red jsRGBColorRed DontDelete|ReadOnly - green jsRGBColorGreen DontDelete|ReadOnly - blue jsRGBColorBlue DontDelete|ReadOnly -@end -*/ - -#include "JSRGBColor.lut.h" - -namespace WebCore { - -ASSERT_CLASS_FITS_IN_CELL(JSRGBColor); - -const ClassInfo JSRGBColor::s_info = { "RGBColor", 0, &JSRGBColorTable, 0 }; - -JSRGBColor::JSRGBColor(ExecState* exec, unsigned color) - // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object - // This will be fixed when JSRGBColor wraps css/RGBColor instead of being custom. - : DOMObject(deprecatedGetDOMStructure<JSRGBColor>(exec)) - , m_color(color) -{ -} - -bool JSRGBColor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) -{ - return getStaticValueSlot<JSRGBColor, DOMObject>(exec, &JSRGBColorTable, this, propertyName, slot); -} - -JSValue getJSRGBColor(ExecState* exec, unsigned color) -{ - return new (exec) JSRGBColor(exec, color); -} - -} // namespace WebCore - -using namespace WebCore; - -JSValue jsRGBColorRed(ExecState* exec, const Identifier&, const PropertySlot& slot) -{ - return toJS(exec, CSSPrimitiveValue::create((static_cast<JSRGBColor*>(asObject(slot.slotBase()))->impl() >> 16) & 0xFF, CSSPrimitiveValue::CSS_NUMBER)); -} - -JSValue jsRGBColorGreen(ExecState* exec, const Identifier&, const PropertySlot& slot) -{ - return toJS(exec, CSSPrimitiveValue::create((static_cast<JSRGBColor*>(asObject(slot.slotBase()))->impl() >> 8) & 0xFF, CSSPrimitiveValue::CSS_NUMBER)); -} - -JSValue jsRGBColorBlue(ExecState* exec, const Identifier&, const PropertySlot& slot) -{ - return toJS(exec, CSSPrimitiveValue::create(static_cast<JSRGBColor*>(asObject(slot.slotBase()))->impl() & 0xFF, CSSPrimitiveValue::CSS_NUMBER)); -} - diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.h deleted file mode 100644 index cc2870f919..0000000000 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2000 Harri Porten (porten@kde.org) - * Copyright (C) 2001 Peter Kelly (pmk@post.com) - * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef JSRGBColor_h -#define JSRGBColor_h - -#include "Color.h" -#include "JSDOMBinding.h" - -namespace WebCore { - - // FIXME: JSRGBColor should have a proper prototype and a constructor. - class JSRGBColor : public DOMObject { - public: - JSRGBColor(JSC::ExecState*, unsigned color); - - virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); - - virtual const JSC::ClassInfo* classInfo() const { return &s_info; } - static const JSC::ClassInfo s_info; - - unsigned impl() const { return m_color; } - - static JSC::ObjectPrototype* createPrototype(JSC::ExecState*, JSC::JSGlobalObject* globalObject) - { - return globalObject->objectPrototype(); - } - - static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) - { - return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); - } - - private: - unsigned m_color; - }; - - JSC::JSValue getJSRGBColor(JSC::ExecState*, unsigned color); - -} // namespace WebCore - -#endif // JSRGBColor_h diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp index 2922740a51..055368e3ae 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp @@ -39,7 +39,7 @@ namespace WebCore { void JSSVGElementInstance::mark() { - DOMObject::mark(); + Base::mark(); // Mark the wrapper for our corresponding element, so it can mark its event handlers. JSNode* correspondingWrapper = getCachedDOMNodeWrapper(impl()->correspondingElement()->document(), impl()->correspondingElement()); @@ -75,9 +75,9 @@ void JSSVGElementInstance::pushEventHandlerScope(ExecState*, ScopeChain&) const { } -JSC::JSValue toJS(JSC::ExecState* exec, SVGElementInstance* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGElementInstance* object) { - JSValue result = getDOMObjectWrapper<JSSVGElementInstance>(exec, object); + JSValue result = getDOMObjectWrapper<JSSVGElementInstance>(exec, globalObject, object); // Ensure that our corresponding element has a JavaScript wrapper to keep its event handlers alive. if (object) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGMatrixCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGMatrixCustom.cpp index fc1e26612e..35390b229f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGMatrixCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGMatrixCustom.cpp @@ -32,7 +32,7 @@ namespace WebCore { JSValue JSSVGMatrix::inverse(ExecState* exec, const ArgList&) { TransformationMatrix imp(*impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.inverse()).get(), m_context.get()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.inverse()).get(), m_context.get()); if (!imp.isInvertible()) setDOMException(exec, SVGException::SVG_MATRIX_NOT_INVERTABLE); @@ -47,7 +47,7 @@ JSValue JSSVGMatrix::rotateFromVector(ExecState* exec, const ArgList& args) float x = args.at(0).toFloat(exec); float y = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotateFromVector(x, y)).get(), m_context.get()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotateFromVector(x, y)).get(), m_context.get()); if (x == 0.0 || y == 0.0) setDOMException(exec, SVGException::SVG_INVALID_VALUE_ERR); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegCustom.cpp index cb4687c834..42fa878fe2 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegCustom.cpp @@ -59,7 +59,7 @@ using namespace JSC; namespace WebCore { -JSValue toJS(ExecState* exec, SVGPathSeg* object, SVGElement* context) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, SVGPathSeg* object, SVGElement* context) { if (!object) return jsNull(); @@ -69,46 +69,46 @@ JSValue toJS(ExecState* exec, SVGPathSeg* object, SVGElement* context) switch (object->pathSegType()) { case SVGPathSeg::PATHSEG_CLOSEPATH: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegClosePath, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegClosePath, object, context); case SVGPathSeg::PATHSEG_MOVETO_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegMovetoAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegMovetoAbs, object, context); case SVGPathSeg::PATHSEG_MOVETO_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegMovetoRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegMovetoRel, object, context); case SVGPathSeg::PATHSEG_LINETO_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegLinetoAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegLinetoAbs, object, context); case SVGPathSeg::PATHSEG_LINETO_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegLinetoRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegLinetoRel, object, context); case SVGPathSeg::PATHSEG_CURVETO_CUBIC_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegCurvetoCubicAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegCurvetoCubicAbs, object, context); case SVGPathSeg::PATHSEG_CURVETO_CUBIC_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegCurvetoCubicRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegCurvetoCubicRel, object, context); case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegCurvetoQuadraticAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegCurvetoQuadraticAbs, object, context); case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegCurvetoQuadraticRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegCurvetoQuadraticRel, object, context); case SVGPathSeg::PATHSEG_ARC_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegArcAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegArcAbs, object, context); case SVGPathSeg::PATHSEG_ARC_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegArcRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegArcRel, object, context); case SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegLinetoHorizontalAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegLinetoHorizontalAbs, object, context); case SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegLinetoHorizontalRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegLinetoHorizontalRel, object, context); case SVGPathSeg::PATHSEG_LINETO_VERTICAL_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegLinetoVerticalAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegLinetoVerticalAbs, object, context); case SVGPathSeg::PATHSEG_LINETO_VERTICAL_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegLinetoVerticalRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegLinetoVerticalRel, object, context); case SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegCurvetoCubicSmoothAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegCurvetoCubicSmoothAbs, object, context); case SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegCurvetoCubicSmoothRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegCurvetoCubicSmoothRel, object, context); case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegCurvetoQuadraticSmoothAbs, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegCurvetoQuadraticSmoothAbs, object, context); case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSegCurvetoQuadraticSmoothRel, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSegCurvetoQuadraticSmoothRel, object, context); case SVGPathSeg::PATHSEG_UNKNOWN: default: - return CREATE_SVG_OBJECT_WRAPPER(exec, SVGPathSeg, object, context); + return CREATE_SVG_OBJECT_WRAPPER(exec, globalObject, SVGPathSeg, object, context); } } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegListCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegListCustom.cpp index b6fc1166bd..b71f3a6416 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegListCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegListCustom.cpp @@ -57,7 +57,7 @@ JSValue JSSVGPathSegList::initialize(ExecState* exec, const ArgList& args) SVGPathSeg* obj = WTF::getPtr(imp->initialize(newItem, ec)); - JSC::JSValue result = toJS(exec, obj, m_context.get()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), obj, m_context.get()); setDOMException(exec, ec); m_context->svgAttributeChanged(imp->associatedAttributeName()); @@ -78,7 +78,7 @@ JSValue JSSVGPathSegList::getItem(ExecState* exec, const ArgList& args) SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl()); SVGPathSeg* obj = WTF::getPtr(imp->getItem(index, ec)); - JSC::JSValue result = toJS(exec, obj, m_context.get()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), obj, m_context.get()); setDOMException(exec, ec); return result; } @@ -97,7 +97,7 @@ JSValue JSSVGPathSegList::insertItemBefore(ExecState* exec, const ArgList& args) SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->insertItemBefore(newItem, index, ec)), m_context.get()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->insertItemBefore(newItem, index, ec)), m_context.get()); setDOMException(exec, ec); m_context->svgAttributeChanged(imp->associatedAttributeName()); @@ -118,7 +118,7 @@ JSValue JSSVGPathSegList::replaceItem(ExecState* exec, const ArgList& args) SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->replaceItem(newItem, index, ec)), m_context.get()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->replaceItem(newItem, index, ec)), m_context.get()); setDOMException(exec, ec); m_context->svgAttributeChanged(imp->associatedAttributeName()); @@ -140,7 +140,7 @@ JSValue JSSVGPathSegList::removeItem(ExecState* exec, const ArgList& args) RefPtr<SVGPathSeg> obj(imp->removeItem(index, ec)); - JSC::JSValue result = toJS(exec, obj.get(), m_context.get()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), obj.get(), m_context.get()); setDOMException(exec, ec); m_context->svgAttributeChanged(imp->associatedAttributeName()); @@ -154,7 +154,7 @@ JSValue JSSVGPathSegList::appendItem(ExecState* exec, const ArgList& args) SVGPathSegList* imp = static_cast<SVGPathSegList*>(impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->appendItem(newItem, ec)), m_context.get()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->appendItem(newItem, ec)), m_context.get()); setDOMException(exec, ec); m_context->svgAttributeChanged(imp->associatedAttributeName()); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPointListCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPointListCustom.cpp index a18c2a2697..1969fe2849 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPointListCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGPointListCustom.cpp @@ -39,7 +39,7 @@ static JSValue finishGetter(ExecState* exec, ExceptionCode& ec, SVGElement* cont setDOMException(exec, ec); return jsUndefined(); } - return toJS(exec, JSSVGPODTypeWrapperCreatorForList<FloatPoint>::create(item.get(), list->associatedAttributeName()).get(), context); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<FloatPoint>::create(item.get(), list->associatedAttributeName()).get(), context); } static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGPointList* list, PassRefPtr<PODListItem > item) @@ -50,7 +50,7 @@ static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* cont } const QualifiedName& attributeName = list->associatedAttributeName(); context->svgAttributeChanged(attributeName); - return toJS(exec, JSSVGPODTypeWrapperCreatorForList<FloatPoint>::create(item.get(), attributeName).get(), context); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<FloatPoint>::create(item.get(), attributeName).get(), context); } static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGPointList* list, PassRefPtr<PODListItem> item) @@ -60,7 +60,7 @@ static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SV return jsUndefined(); } context->svgAttributeChanged(list->associatedAttributeName()); - return toJS(exec, JSSVGStaticPODTypeWrapper<FloatPoint>::create(*item).get(), context); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<FloatPoint>::create(*item).get(), context); } JSValue JSSVGPointList::clear(ExecState* exec, const ArgList&) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGTransformListCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGTransformListCustom.cpp index 58b25ad0a1..1a9110a9a6 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSSVGTransformListCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSVGTransformListCustom.cpp @@ -39,7 +39,7 @@ static JSValue finishGetter(ExecState* exec, ExceptionCode& ec, SVGElement* cont setDOMException(exec, ec); return jsUndefined(); } - return toJS(exec, JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), list->associatedAttributeName()).get(), context); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), list->associatedAttributeName()).get(), context); } static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item) @@ -50,7 +50,7 @@ static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* cont } const QualifiedName& attributeName = list->associatedAttributeName(); context->svgAttributeChanged(attributeName); - return toJS(exec, JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), attributeName).get(), context); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), attributeName).get(), context); } static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item) @@ -60,7 +60,7 @@ static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SV return jsUndefined(); } context->svgAttributeChanged(list->associatedAttributeName()); - return toJS(exec, JSSVGStaticPODTypeWrapper<SVGTransform>::create(*item).get(), context); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGTransform>::create(*item).get(), context); } JSValue JSSVGTransformList::clear(ExecState* exec, const ArgList&) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.cpp index ead17ddeba..a3122258da 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.cpp @@ -45,7 +45,7 @@ namespace WebCore { const ClassInfo JSSharedWorkerConstructor::s_info = { "SharedWorkerConstructor", 0, 0, 0 }; JSSharedWorkerConstructor::JSSharedWorkerConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) - : DOMObject(JSSharedWorkerConstructor::createStructure(globalObject->objectPrototype())) + : DOMConstructorObject(JSSharedWorkerConstructor::createStructure(globalObject->objectPrototype())) { putDirect(exec->propertyNames().prototype, JSSharedWorkerPrototype::self(exec, globalObject), None); // Host functions have a length property describing the number of expected arguments. diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.h index be8b2b447a..87baa388ce 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerConstructor.h @@ -37,7 +37,7 @@ namespace WebCore { - class JSSharedWorkerConstructor : public DOMObject { + class JSSharedWorkerConstructor : public DOMConstructorObject { public: JSSharedWorkerConstructor(JSC::ExecState*, JSDOMGlobalObject*); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSStyleSheetCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSStyleSheetCustom.cpp index f8146bdd54..00dacee1b5 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSStyleSheetCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSStyleSheetCustom.cpp @@ -35,7 +35,7 @@ using namespace JSC; namespace WebCore { -JSValue toJS(ExecState* exec, StyleSheet* styleSheet) +JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, StyleSheet* styleSheet) { if (!styleSheet) return jsNull(); @@ -45,9 +45,9 @@ JSValue toJS(ExecState* exec, StyleSheet* styleSheet) return wrapper; if (styleSheet->isCSSStyleSheet()) - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, CSSStyleSheet, styleSheet); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, CSSStyleSheet, styleSheet); else - wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, StyleSheet, styleSheet); + wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, StyleSheet, styleSheet); return wrapper; } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSTextCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSTextCustom.cpp index 9e66826cbb..2dc886ded1 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSTextCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSTextCustom.cpp @@ -32,12 +32,12 @@ using namespace JSC; namespace WebCore { -JSValue toJSNewlyCreated(ExecState* exec, Text* text) +JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, Text* text) { if (!text) return jsNull(); - return CREATE_DOM_NODE_WRAPPER(exec, Text, text); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, Text, text); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSTreeWalkerCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSTreeWalkerCustom.cpp index 636901769c..58eea72524 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSTreeWalkerCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSTreeWalkerCustom.cpp @@ -34,7 +34,7 @@ void JSTreeWalker::mark() if (NodeFilter* filter = m_impl->filter()) filter->mark(); - DOMObject::mark(); + Base::mark(); } JSValue JSTreeWalker::parentNode(ExecState* exec, const ArgList&) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitCSSMatrixConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitCSSMatrixConstructor.cpp index c7fe4a5c07..bc05250dfc 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitCSSMatrixConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitCSSMatrixConstructor.cpp @@ -35,15 +35,16 @@ namespace WebCore { const ClassInfo JSWebKitCSSMatrixConstructor::s_info = { "WebKitCSSMatrixConstructor", 0, 0, 0 }; -JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor(ExecState* exec) - : DOMObject(JSWebKitCSSMatrixConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) +JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitCSSMatrixConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWebKitCSSMatrixPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWebKitCSSMatrixPrototype::self(exec, globalObject), None); putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly|DontDelete|DontEnum); } -static JSObject* constructWebKitCSSMatrix(ExecState* exec, JSObject*, const ArgList& args) +static JSObject* constructWebKitCSSMatrix(ExecState* exec, JSObject* constructor, const ArgList& args) { + JSWebKitCSSMatrixConstructor* jsConstructor = static_cast<JSWebKitCSSMatrixConstructor*>(constructor); String s; if (args.size() >= 1) s = args.at(0).toString(exec); @@ -51,7 +52,7 @@ static JSObject* constructWebKitCSSMatrix(ExecState* exec, JSObject*, const ArgL ExceptionCode ec = 0; RefPtr<WebKitCSSMatrix> matrix = WebKitCSSMatrix::create(s, ec); setDOMException(exec, ec); - return CREATE_DOM_OBJECT_WRAPPER(exec, WebKitCSSMatrix, matrix.get()); + return CREATE_DOM_OBJECT_WRAPPER(exec, jsConstructor->globalObject(), WebKitCSSMatrix, matrix.get()); } ConstructType JSWebKitCSSMatrixConstructor::getConstructData(ConstructData& constructData) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitCSSMatrixConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitCSSMatrixConstructor.h index d0e0bd1bee..65b9050c39 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitCSSMatrixConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitCSSMatrixConstructor.h @@ -31,9 +31,9 @@ namespace WebCore { -class JSWebKitCSSMatrixConstructor : public DOMObject { +class JSWebKitCSSMatrixConstructor : public DOMConstructorObject { public: - JSWebKitCSSMatrixConstructor(JSC::ExecState*); + JSWebKitCSSMatrixConstructor(JSC::ExecState*, JSDOMGlobalObject*); static const JSC::ClassInfo s_info; private: diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp index c7d4e360c5..27cc1db83e 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.cpp @@ -36,15 +36,17 @@ using namespace JSC; const ClassInfo JSWebKitPointConstructor::s_info = { "WebKitPointConstructor", 0, 0, 0 }; -JSWebKitPointConstructor::JSWebKitPointConstructor(ExecState* exec) - : DOMObject(JSWebKitPointConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) +JSWebKitPointConstructor::JSWebKitPointConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitPointConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWebKitPointPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWebKitPointPrototype::self(exec, globalObject), None); putDirect(exec->propertyNames().length, jsNumber(exec, 2), ReadOnly|DontDelete|DontEnum); } -static JSObject* constructWebKitPoint(ExecState* exec, JSObject*, const ArgList& args) +static JSObject* constructWebKitPoint(ExecState* exec, JSObject* constructor, const ArgList& args) { + JSWebKitPointConstructor* jsConstructor = static_cast<JSWebKitPointConstructor*>(constructor); + float x = 0; float y = 0; if (args.size() >= 2) { @@ -55,7 +57,7 @@ static JSObject* constructWebKitPoint(ExecState* exec, JSObject*, const ArgList& if (isnan(y)) y = 0; } - return asObject(toJS(exec, WebKitPoint::create(x, y))); + return asObject(toJS(exec, jsConstructor->globalObject(), WebKitPoint::create(x, y))); } JSC::ConstructType JSWebKitPointConstructor::getConstructData(JSC::ConstructData& constructData) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.h index a5bb5c1b4b..44c253d034 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWebKitPointConstructor.h @@ -31,9 +31,9 @@ namespace WebCore { -class JSWebKitPointConstructor : public DOMObject { +class JSWebKitPointConstructor : public DOMConstructorObject { public: - JSWebKitPointConstructor(JSC::ExecState*); + JSWebKitPointConstructor(JSC::ExecState*, JSDOMGlobalObject*); static const JSC::ClassInfo s_info; private: diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.cpp index 8ea6718301..e1686f7875 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.cpp @@ -41,15 +41,17 @@ namespace WebCore { const ClassInfo JSWorkerConstructor::s_info = { "WorkerConstructor", 0, 0, 0 }; -JSWorkerConstructor::JSWorkerConstructor(ExecState* exec) - : DOMObject(JSWorkerConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) +JSWorkerConstructor::JSWorkerConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWorkerConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWorkerPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWorkerPrototype::self(exec, globalObject), None); putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly|DontDelete|DontEnum); } -static JSObject* constructWorker(ExecState* exec, JSObject*, const ArgList& args) +static JSObject* constructWorker(ExecState* exec, JSObject* constructor, const ArgList& args) { + JSWorkerConstructor* jsConstructor = static_cast<JSWorkerConstructor*>(constructor); + if (args.size() == 0) return throwError(exec, SyntaxError, "Not enough arguments"); @@ -57,13 +59,12 @@ static JSObject* constructWorker(ExecState* exec, JSObject*, const ArgList& args if (exec->hadException()) return 0; + // See section 4.8.2 step 14 of WebWorkers for why this is the lexicalGlobalObject. DOMWindow* window = asJSDOMWindow(exec->lexicalGlobalObject())->impl(); - - ExceptionCode ec = 0; - RefPtr<Worker> worker = Worker::create(scriptURL, window->document(), ec); - setDOMException(exec, ec); - return asObject(toJS(exec, worker.release())); + RefPtr<Worker> worker = Worker::create(scriptURL, window->document()); + + return asObject(toJS(exec, jsConstructor->globalObject(), worker.release())); } ConstructType JSWorkerConstructor::getConstructData(ConstructData& constructData) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.h index d1df7eb948..c845fa6285 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.h @@ -32,9 +32,9 @@ namespace WebCore { - class JSWorkerConstructor : public DOMObject { + class JSWorkerConstructor : public DOMConstructorObject { public: - JSWorkerConstructor(JSC::ExecState*); + JSWorkerConstructor(JSC::ExecState*, JSDOMGlobalObject*); static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.cpp index c71f45bd4e..622da70562 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.cpp @@ -31,6 +31,7 @@ #include "JSWorkerContextBase.h" +#include "JSDedicatedWorkerContext.h" #include "JSWorkerContext.h" #include "WorkerContext.h" @@ -57,6 +58,11 @@ ScriptExecutionContext* JSWorkerContextBase::scriptExecutionContext() const return m_impl.get(); } +JSValue toJS(ExecState* exec, JSDOMGlobalObject*, WorkerContext* workerContext) +{ + return toJS(exec, workerContext); +} + JSValue toJS(ExecState*, WorkerContext* workerContext) { if (!workerContext) @@ -67,6 +73,22 @@ JSValue toJS(ExecState*, WorkerContext* workerContext) return script->workerContextWrapper(); } +JSDedicatedWorkerContext* toJSDedicatedWorkerContext(JSValue value) +{ + if (!value.isObject()) + return 0; + const ClassInfo* classInfo = asObject(value)->classInfo(); + if (classInfo == &JSDedicatedWorkerContext::s_info) + return static_cast<JSDedicatedWorkerContext*>(asObject(value)); + return 0; +} + +JSWorkerContext* toJSWorkerContext(JSValue value) +{ + // When we support shared workers, we'll add code to test for SharedWorkerContext too. + return toJSDedicatedWorkerContext(value); +} + } // namespace WebCore #endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.h b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.h index dcbc5c3ba8..f7ad17f77b 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.h @@ -33,6 +33,8 @@ namespace WebCore { + class JSDedicatedWorkerContext; + class JSWorkerContext; class WorkerContext; class JSWorkerContextBase : public JSDOMGlobalObject { @@ -52,8 +54,13 @@ namespace WebCore { }; // Returns a JSWorkerContext or jsNull() + // Always ignores the execState and passed globalObject, WorkerContext is itself a globalObject and will always use its own prototype chain. + JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WorkerContext*); JSC::JSValue toJS(JSC::ExecState*, WorkerContext*); + JSDedicatedWorkerContext* toJSDedicatedWorkerContext(JSC::JSValue); + JSWorkerContext* toJSWorkerContext(JSC::JSValue); + } // namespace WebCore #endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp index 06475f91d7..6a7602d3dd 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp @@ -58,7 +58,7 @@ void JSWorkerContext::mark() markDOMObjectWrapper(globalData, impl()->optionalLocation()); markDOMObjectWrapper(globalData, impl()->optionalNavigator()); - markIfNotNull(impl()->onmessage()); + markIfNotNull(impl()->onerror()); typedef WorkerContext::EventListenersMap EventListenersMap; typedef WorkerContext::ListenerVector ListenerVector; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp index 9707519900..6010f83982 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp @@ -30,8 +30,6 @@ #include "JSWorker.h" #include "JSDOMGlobalObject.h" -#include "JSEventListener.h" -#include "JSMessagePort.h" #include "Worker.h" using namespace JSC; @@ -40,42 +38,9 @@ namespace WebCore { void JSWorker::mark() { - DOMObject::mark(); + Base::mark(); - markIfNotNull(m_impl->onmessage()); - markIfNotNull(m_impl->onerror()); - - typedef Worker::EventListenersMap EventListenersMap; - typedef Worker::ListenerVector ListenerVector; - EventListenersMap& eventListeners = m_impl->eventListeners(); - for (EventListenersMap::iterator mapIter = eventListeners.begin(); mapIter != eventListeners.end(); ++mapIter) { - for (ListenerVector::iterator vecIter = mapIter->second.begin(); vecIter != mapIter->second.end(); ++vecIter) - (*vecIter)->markJSFunction(); - } -} - -JSValue JSWorker::addEventListener(ExecState* exec, const ArgList& args) -{ - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(impl()->scriptExecutionContext()); - if (!globalObject) - return jsUndefined(); - RefPtr<JSEventListener> listener = globalObject->findOrCreateJSEventListener(args.at(1)); - if (!listener) - return jsUndefined(); - impl()->addEventListener(args.at(0).toString(exec), listener.release(), args.at(2).toBoolean(exec)); - return jsUndefined(); -} - -JSValue JSWorker::removeEventListener(ExecState* exec, const ArgList& args) -{ - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(impl()->scriptExecutionContext()); - if (!globalObject) - return jsUndefined(); - JSEventListener* listener = globalObject->findJSEventListener(args.at(1)); - if (!listener) - return jsUndefined(); - impl()->removeEventListener(args.at(0).toString(exec), listener, args.at(2).toBoolean(exec)); - return jsUndefined(); + markIfNotNull(static_cast<Worker*>(impl())->onmessage()); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.cpp index 65cdfc2261..a644c9e8ec 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.cpp @@ -33,25 +33,20 @@ ASSERT_CLASS_FITS_IN_CELL(JSXMLHttpRequestConstructor); const ClassInfo JSXMLHttpRequestConstructor::s_info = { "XMLHttpRequestConstructor", 0, 0, 0 }; JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) - : DOMObject(JSXMLHttpRequestConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) - , m_globalObject(globalObject) + : DOMConstructorObject(JSXMLHttpRequestConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXMLHttpRequestPrototype::self(exec, exec->lexicalGlobalObject()), None); -} - -ScriptExecutionContext* JSXMLHttpRequestConstructor::scriptExecutionContext() const -{ - return m_globalObject->scriptExecutionContext(); + putDirect(exec->propertyNames().prototype, JSXMLHttpRequestPrototype::self(exec, globalObject), None); } static JSObject* constructXMLHttpRequest(ExecState* exec, JSObject* constructor, const ArgList&) { - ScriptExecutionContext* context = static_cast<JSXMLHttpRequestConstructor*>(constructor)->scriptExecutionContext(); + JSXMLHttpRequestConstructor* jsConstructor = static_cast<JSXMLHttpRequestConstructor*>(constructor); + ScriptExecutionContext* context = jsConstructor->scriptExecutionContext(); if (!context) return throwError(exec, ReferenceError, "XMLHttpRequest constructor associated document is unavailable"); RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context); - return CREATE_DOM_OBJECT_WRAPPER(exec, XMLHttpRequest, xmlHttpRequest.get()); + return CREATE_DOM_OBJECT_WRAPPER(exec, jsConstructor->globalObject(), XMLHttpRequest, xmlHttpRequest.get()); } ConstructType JSXMLHttpRequestConstructor::getConstructData(ConstructData& constructData) @@ -60,11 +55,4 @@ ConstructType JSXMLHttpRequestConstructor::getConstructData(ConstructData& const return ConstructTypeHost; } -void JSXMLHttpRequestConstructor::mark() -{ - DOMObject::mark(); - if (!m_globalObject->marked()) - m_globalObject->mark(); -} - } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.h index 978a9f056a..2cc4fcf8e6 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.h @@ -24,18 +24,13 @@ namespace WebCore { -class JSXMLHttpRequestConstructor : public DOMObject { +class JSXMLHttpRequestConstructor : public DOMConstructorObject { public: JSXMLHttpRequestConstructor(JSC::ExecState*, JSDOMGlobalObject*); - ScriptExecutionContext* scriptExecutionContext() const; static const JSC::ClassInfo s_info; - - virtual void mark(); private: virtual JSC::ConstructType getConstructData(JSC::ConstructData&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } - - JSDOMGlobalObject* m_globalObject; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.cpp index 807b017b3e..07fec7226c 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.cpp @@ -41,15 +41,16 @@ ASSERT_CLASS_FITS_IN_CELL(JSXSLTProcessorConstructor); const ClassInfo JSXSLTProcessorConstructor::s_info = { "XSLTProcessorConsructor", 0, 0, 0 }; -JSXSLTProcessorConstructor::JSXSLTProcessorConstructor(ExecState* exec) - : DOMObject(JSXSLTProcessorConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) +JSXSLTProcessorConstructor::JSXSLTProcessorConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXSLTProcessorConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXSLTProcessorPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXSLTProcessorPrototype::self(exec, globalObject), None); } -static JSObject* constructXSLTProcessor(ExecState* exec, JSObject*, const ArgList&) +static JSObject* constructXSLTProcessor(ExecState* exec, JSObject* constructor, const ArgList&) { - return CREATE_DOM_OBJECT_WRAPPER(exec, XSLTProcessor, XSLTProcessor::create().get()); + JSXSLTProcessorConstructor* jsConstructor = static_cast<JSXSLTProcessorConstructor*>(constructor); + return CREATE_DOM_OBJECT_WRAPPER(exec, jsConstructor->globalObject(), XSLTProcessor, XSLTProcessor::create().get()); } ConstructType JSXSLTProcessorConstructor::getConstructData(ConstructData& constructData) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.h b/src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.h index 64ef9442b5..96fa607228 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.h @@ -32,9 +32,9 @@ namespace WebCore { - class JSXSLTProcessorConstructor : public DOMObject { + class JSXSLTProcessorConstructor : public DOMConstructorObject { public: - JSXSLTProcessorConstructor(JSC::ExecState*); + JSXSLTProcessorConstructor(JSC::ExecState*, JSDOMGlobalObject*); static const JSC::ClassInfo s_info; private: diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScheduledAction.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScheduledAction.cpp index 91bece71bb..9e64bceb9a 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScheduledAction.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScheduledAction.cpp @@ -87,7 +87,7 @@ void ScheduledAction::execute(ScriptExecutionContext* context) void ScheduledAction::executeFunctionInContext(JSGlobalObject* globalObject, JSValue thisValue) { ASSERT(m_function); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); CallData callData; CallType callType = m_function.get().getCallData(callData); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptArray.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptArray.cpp new file mode 100644 index 0000000000..016c7a7020 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptArray.cpp @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "ScriptArray.h" + +#include <runtime/JSLock.h> + +using namespace JSC; + +namespace WebCore { + +ScriptArray::ScriptArray(JSArray* object) + : ScriptObject(object) +{ +} + +static bool handleException(ScriptState* scriptState) +{ + if (!scriptState->hadException()) + return true; + + reportException(scriptState, scriptState->exception()); + return false; +} + +bool ScriptArray::set(ScriptState* scriptState, unsigned index, const ScriptObject& value) +{ + JSLock lock(SilenceAssertionsOnly); + jsArray()->put(scriptState, index, value.jsObject()); + return handleException(scriptState); +} + +bool ScriptArray::set(ScriptState* scriptState, unsigned index, const String& value) +{ + JSLock lock(SilenceAssertionsOnly); + jsArray()->put(scriptState, index, jsString(scriptState, value)); + return handleException(scriptState); +} + +bool ScriptArray::set(ScriptState* scriptState, unsigned index, double value) +{ + JSLock lock(SilenceAssertionsOnly); + jsArray()->put(scriptState, index, jsNumber(scriptState, value)); + return handleException(scriptState); +} + +bool ScriptArray::set(ScriptState* scriptState, unsigned index, long long value) +{ + JSLock lock(SilenceAssertionsOnly); + jsArray()->put(scriptState, index, jsNumber(scriptState, value)); + return handleException(scriptState); +} + +bool ScriptArray::set(ScriptState* scriptState, unsigned index, int value) +{ + JSLock lock(SilenceAssertionsOnly); + jsArray()->put(scriptState, index, jsNumber(scriptState, value)); + return handleException(scriptState); +} + +bool ScriptArray::set(ScriptState* scriptState, unsigned index, bool value) +{ + JSLock lock(SilenceAssertionsOnly); + jsArray()->put(scriptState, index, jsBoolean(value)); + return handleException(scriptState); +} + +unsigned ScriptArray::length(ScriptState*) +{ + return jsArray()->length(); +} + +ScriptArray ScriptArray::createNew(ScriptState* scriptState) +{ + JSLock lock(SilenceAssertionsOnly); + return ScriptArray(constructEmptyArray(scriptState)); +} + +} // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptArray.h b/src/3rdparty/webkit/WebCore/bindings/js/ScriptArray.h new file mode 100644 index 0000000000..2ba307f2e4 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptArray.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ScriptArray_h +#define ScriptArray_h + +#include "ScriptObject.h" +#include "ScriptState.h" + +#include <runtime/JSArray.h> + +namespace WebCore { + + class ScriptArray : public ScriptObject { + public: + ScriptArray(JSC::JSArray*); + ScriptArray() {} + JSC::JSArray* jsArray() const { return asArray(jsValue()); } + + bool set(ScriptState*, unsigned index, const ScriptObject&); + bool set(ScriptState*, unsigned index, const String&); + bool set(ScriptState*, unsigned index, double); + bool set(ScriptState*, unsigned index, long long); + bool set(ScriptState*, unsigned index, int); + bool set(ScriptState*, unsigned index, bool); + unsigned length(ScriptState*); + + static ScriptArray createNew(ScriptState*); + }; +} + +#endif // ScriptArray_h diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptCachedFrameData.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptCachedFrameData.cpp index 213c70893c..8852611247 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptCachedFrameData.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptCachedFrameData.cpp @@ -45,7 +45,7 @@ namespace WebCore { ScriptCachedFrameData::ScriptCachedFrameData(Frame* frame) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); ScriptController* scriptController = frame->script(); if (scriptController->haveWindowShell()) { @@ -67,7 +67,7 @@ void ScriptCachedFrameData::restore(Frame* frame) { Page* page = frame->page(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); ScriptController* scriptController = frame->script(); if (scriptController->haveWindowShell()) { @@ -84,7 +84,7 @@ void ScriptCachedFrameData::restore(Frame* frame) void ScriptCachedFrameData::clear() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); if (!m_window) { m_window = 0; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp index 442205e2f3..a1c43764d4 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp @@ -106,7 +106,7 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode) const String* savedSourceURL = m_sourceURL; m_sourceURL = &sourceURL; - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); RefPtr<Frame> protect = m_frame; @@ -135,7 +135,7 @@ void ScriptController::clearWindowShell() if (!m_windowShell) return; - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); // Clear the debugger from the current window before setting the new window. attachDebugger(0); @@ -157,7 +157,7 @@ void ScriptController::initScript() if (m_windowShell) return; - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); m_windowShell = new JSDOMWindowShell(m_frame->domWindow()); m_windowShell->window()->updateDocument(); @@ -249,7 +249,7 @@ void ScriptController::updateDocument() if (!m_frame->document()) return; - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); if (m_windowShell) m_windowShell->window()->updateDocument(); } @@ -265,7 +265,7 @@ Bindings::RootObject* ScriptController::bindingRootObject() return 0; if (!m_bindingRootObject) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); m_bindingRootObject = Bindings::RootObject::create(0, globalObject()); } return m_bindingRootObject.get(); @@ -291,7 +291,7 @@ NPObject* ScriptController::windowScriptNPObject() if (isEnabled()) { // JavaScript is enabled, so there is a JavaScript window object. // Return an NPObject bound to the window object. - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); JSObject* win = windowShell()->window(); ASSERT(win); Bindings::RootObject* root = bindingRootObject(); @@ -325,9 +325,9 @@ JSObject* ScriptController::jsObjectForPluginElement(HTMLPlugInElement* plugin) return 0; // Create a JSObject bound to this element - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); ExecState* exec = globalObject()->globalExec(); - JSValue jsElementValue = toJS(exec, plugin); + JSValue jsElementValue = toJS(exec, globalObject(), plugin); if (!jsElementValue || !jsElementValue.isObject()) return 0; @@ -359,7 +359,7 @@ void ScriptController::cleanupScriptObjectsForPlugin(void* nativeHandle) void ScriptController::clearScriptObjects() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); RootObjectMap::const_iterator end = m_rootObjects.end(); for (RootObjectMap::const_iterator it = m_rootObjects.begin(); it != end; ++it) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerHaiku.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerHaiku.cpp new file mode 100644 index 0000000000..b573b97e60 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerHaiku.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2008 Apple Computer, Inc. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "ScriptController.h" + +#include "PluginView.h" +#include "runtime_root.h" +#include "runtime.h" + + +namespace WebCore { + +PassRefPtr<JSC::Bindings::Instance> ScriptController::createScriptInstanceForWidget(Widget* widget) +{ + if (!widget->isPluginView()) + return 0; + + return static_cast<PluginView*>(widget)->bindingInstance(); +} + +} // namespace WebCore + diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm b/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm index 502a504b92..e6a654f06e 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm @@ -112,7 +112,7 @@ WebScriptObject* ScriptController::windowScriptObject() return 0; if (!m_windowScriptObject) { - JSC::JSLock lock(false); + JSC::JSLock lock(JSC::SilenceAssertionsOnly); JSC::Bindings::RootObject* root = bindingRootObject(); m_windowScriptObject = [WebScriptObject scriptObjectForJSObject:toRef(windowShell()) originRootObject:root rootObject:root]; } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptEventListener.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptEventListener.cpp index e5be1d6f65..878c5353f3 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptEventListener.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptEventListener.cpp @@ -71,8 +71,9 @@ PassRefPtr<JSLazyEventListener> createAttributeEventListener(Node* node, Attribu // Ensure that 'node' has a JavaScript wrapper to mark the event listener we're creating. { - JSLock lock(false); - toJS(globalObject->globalExec(), node); + JSLock lock(SilenceAssertionsOnly); + // FIXME: Should pass the global object associated with the node + toJS(globalObject->globalExec(), globalObject, node); } return JSLazyEventListener::create(attr->localName().string(), eventParameterName(node->isSVGElement()), attr->value(), globalObject, node, scriptController->eventHandlerLineNumber()); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptFunctionCall.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptFunctionCall.cpp index 1122931adc..ca6b03a9d8 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptFunctionCall.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptFunctionCall.cpp @@ -66,7 +66,7 @@ void ScriptFunctionCall::appendArgument(const ScriptValue& argument) void ScriptFunctionCall::appendArgument(const String& argument) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); m_arguments.append(jsString(m_exec, argument)); } @@ -82,19 +82,19 @@ void ScriptFunctionCall::appendArgument(JSC::JSValue argument) void ScriptFunctionCall::appendArgument(long long argument) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); m_arguments.append(jsNumber(m_exec, argument)); } void ScriptFunctionCall::appendArgument(unsigned int argument) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); m_arguments.append(jsNumber(m_exec, argument)); } void ScriptFunctionCall::appendArgument(int argument) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); m_arguments.append(jsNumber(m_exec, argument)); } @@ -107,7 +107,7 @@ ScriptValue ScriptFunctionCall::call(bool& hadException, bool reportExceptions) { JSObject* thisObject = m_thisObject.jsObject(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSValue function = thisObject->get(m_exec, Identifier(m_exec, m_name)); if (m_exec->hadException()) { @@ -145,7 +145,7 @@ ScriptObject ScriptFunctionCall::construct(bool& hadException, bool reportExcept { JSObject* thisObject = m_thisObject.jsObject(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSObject* constructor = asObject(thisObject->get(m_exec, Identifier(m_exec, m_name))); if (m_exec->hadException()) { diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObject.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObject.cpp index 7f6391daef..e66464532a 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObject.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObject.cpp @@ -32,7 +32,7 @@ #include "ScriptObject.h" #include "JSDOMBinding.h" -#include "JSInspectorController.h" +#include "JSInspectorBackend.h" #include <runtime/JSLock.h> @@ -56,7 +56,7 @@ static bool handleException(ScriptState* scriptState) bool ScriptObject::set(ScriptState* scriptState, const String& name, const String& value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PutPropertySlot slot; jsObject()->put(scriptState, Identifier(scriptState, name), jsString(scriptState, value), slot); return handleException(scriptState); @@ -64,7 +64,7 @@ bool ScriptObject::set(ScriptState* scriptState, const String& name, const Strin bool ScriptObject::set(ScriptState* scriptState, const char* name, const ScriptObject& value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PutPropertySlot slot; jsObject()->put(scriptState, Identifier(scriptState, name), value.jsObject(), slot); return handleException(scriptState); @@ -72,7 +72,7 @@ bool ScriptObject::set(ScriptState* scriptState, const char* name, const ScriptO bool ScriptObject::set(ScriptState* scriptState, const char* name, const String& value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PutPropertySlot slot; jsObject()->put(scriptState, Identifier(scriptState, name), jsString(scriptState, value), slot); return handleException(scriptState); @@ -80,7 +80,7 @@ bool ScriptObject::set(ScriptState* scriptState, const char* name, const String& bool ScriptObject::set(ScriptState* scriptState, const char* name, double value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PutPropertySlot slot; jsObject()->put(scriptState, Identifier(scriptState, name), jsNumber(scriptState, value), slot); return handleException(scriptState); @@ -88,7 +88,7 @@ bool ScriptObject::set(ScriptState* scriptState, const char* name, double value) bool ScriptObject::set(ScriptState* scriptState, const char* name, long long value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PutPropertySlot slot; jsObject()->put(scriptState, Identifier(scriptState, name), jsNumber(scriptState, value), slot); return handleException(scriptState); @@ -96,7 +96,7 @@ bool ScriptObject::set(ScriptState* scriptState, const char* name, long long val bool ScriptObject::set(ScriptState* scriptState, const char* name, int value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PutPropertySlot slot; jsObject()->put(scriptState, Identifier(scriptState, name), jsNumber(scriptState, value), slot); return handleException(scriptState); @@ -104,7 +104,7 @@ bool ScriptObject::set(ScriptState* scriptState, const char* name, int value) bool ScriptObject::set(ScriptState* scriptState, const char* name, bool value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PutPropertySlot slot; jsObject()->put(scriptState, Identifier(scriptState, name), jsBoolean(value), slot); return handleException(scriptState); @@ -112,27 +112,28 @@ bool ScriptObject::set(ScriptState* scriptState, const char* name, bool value) ScriptObject ScriptObject::createNew(ScriptState* scriptState) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return ScriptObject(constructEmptyObject(scriptState)); } bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const ScriptObject& value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); scriptState->lexicalGlobalObject()->putDirect(Identifier(scriptState, name), value.jsObject()); return handleException(scriptState); } -bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorController* value) +bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorBackend* value) { - JSLock lock(false); - scriptState->lexicalGlobalObject()->putDirect(Identifier(scriptState, name), toJS(scriptState, value)); + JSLock lock(SilenceAssertionsOnly); + JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject()); + globalObject->putDirect(Identifier(scriptState, name), toJS(scriptState, globalObject, value)); return handleException(scriptState); } bool ScriptGlobalObject::get(ScriptState* scriptState, const char* name, ScriptObject& value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSValue jsValue = scriptState->lexicalGlobalObject()->get(scriptState, Identifier(scriptState, name)); if (!jsValue) return false; @@ -146,7 +147,7 @@ bool ScriptGlobalObject::get(ScriptState* scriptState, const char* name, ScriptO bool ScriptGlobalObject::remove(ScriptState* scriptState, const char* name) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); scriptState->lexicalGlobalObject()->deleteProperty(scriptState, Identifier(scriptState, name)); return handleException(scriptState); } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObject.h b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObject.h index ed86659573..97022da09a 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObject.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObject.h @@ -38,7 +38,7 @@ #include <runtime/Protect.h> namespace WebCore { - class InspectorController; + class InspectorBackend; class ScriptObject : public ScriptValue { public: @@ -60,7 +60,7 @@ namespace WebCore { class ScriptGlobalObject { public: static bool set(ScriptState*, const char* name, const ScriptObject&); - static bool set(ScriptState*, const char* name, InspectorController*); + static bool set(ScriptState*, const char* name, InspectorBackend*); static bool get(ScriptState*, const char* name, ScriptObject&); static bool remove(ScriptState*, const char* name); private: diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp index ab392bcc42..171883aa70 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp @@ -56,7 +56,7 @@ namespace WebCore { ScriptValue quarantineValue(ScriptState* scriptState, const ScriptValue& value) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return ScriptValue(JSInspectedObjectWrapper::wrap(scriptState, value.jsValue())); } @@ -69,10 +69,11 @@ bool getQuarantinedScriptObject(Database* database, ScriptObject& quarantinedObj if (!frame) return false; - ExecState* exec = toJSDOMWindow(frame)->globalExec(); + JSDOMGlobalObject* globalObject = toJSDOMWindow(frame); + ExecState* exec = globalObject->globalExec(); - JSLock lock(false); - quarantinedObject = ScriptObject(asObject(JSInspectedObjectWrapper::wrap(exec, toJS(exec, database)))); + JSLock lock(SilenceAssertionsOnly); + quarantinedObject = ScriptObject(asObject(JSInspectedObjectWrapper::wrap(exec, toJS(exec, globalObject, database)))); return true; } @@ -84,10 +85,11 @@ bool getQuarantinedScriptObject(Frame* frame, Storage* storage, ScriptObject& qu ASSERT(frame); ASSERT(storage); - ExecState* exec = toJSDOMWindow(frame)->globalExec(); + JSDOMGlobalObject* globalObject = toJSDOMWindow(frame); + ExecState* exec = globalObject->globalExec(); - JSLock lock(false); - quarantinedObject = ScriptObject(asObject(JSInspectedObjectWrapper::wrap(exec, toJS(exec, storage)))); + JSLock lock(SilenceAssertionsOnly); + quarantinedObject = ScriptObject(asObject(JSInspectedObjectWrapper::wrap(exec, toJS(exec, globalObject, storage)))); return true; } @@ -99,8 +101,9 @@ bool getQuarantinedScriptObject(Node* node, ScriptObject& quarantinedObject) if (!exec) return false; - JSLock lock(false); - quarantinedObject = ScriptObject(asObject(JSInspectedObjectWrapper::wrap(exec, toJS(exec, node)))); + JSLock lock(SilenceAssertionsOnly); + // FIXME: Should use some sort of globalObjectFromNode() + quarantinedObject = ScriptObject(asObject(JSInspectedObjectWrapper::wrap(exec, toJS(exec, deprecatedGlobalObjectForPrototype(exec), node)))); return true; } @@ -112,7 +115,7 @@ bool getQuarantinedScriptObject(DOMWindow* domWindow, ScriptObject& quarantinedO JSDOMWindow* window = toJSDOMWindow(domWindow->frame()); ExecState* exec = window->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); quarantinedObject = ScriptObject(asObject(JSInspectedObjectWrapper::wrap(exec, window))); return true; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h b/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h index 0a16265ffa..1b05dedb6d 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h @@ -32,20 +32,24 @@ #define ScriptSourceCode_h #include "CachedScriptSourceProvider.h" +#include "ScriptSourceProvider.h" #include "StringSourceProvider.h" #include "KURL.h" +#include <wtf/RefPtr.h> namespace WebCore { class ScriptSourceCode { public: ScriptSourceCode(const String& source, const KURL& url = KURL(), int startLine = 1) - : m_code(makeSource(source, url.isNull() ? String() : url.string(), startLine)) + : m_provider(StringSourceProvider::create(source, url.isNull() ? String() : url.string())) + , m_code(m_provider, startLine) { } ScriptSourceCode(CachedScript* cs) - : m_code(makeSource(cs)) + : m_provider(CachedScriptSourceProvider::create(cs)) + , m_code(m_provider) { } @@ -53,9 +57,11 @@ public: const JSC::SourceCode& jsSourceCode() const { return m_code; } - const String& source() const { return static_cast<StringSourceProvider*>(m_code.provider())->source(); } + const String& source() const { return m_provider->source(); } private: + RefPtr<ScriptSourceProvider> m_provider; + JSC::SourceCode m_code; }; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceProvider.h b/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceProvider.h new file mode 100644 index 0000000000..3fe3584e26 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceProvider.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2009 Daniel Bates (dbates@intudata.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ScriptSourceProvider_h +#define ScriptSourceProvider_h + +#include <parser/SourceProvider.h> + +namespace WebCore { + + class String; + + class ScriptSourceProvider : public JSC::SourceProvider { + public: + ScriptSourceProvider(const JSC::UString& url, JSC::SourceBOMPresence hasBOMs = JSC::SourceCouldHaveBOMs) + : SourceProvider(url, hasBOMs) + { + } + + virtual const String& source() const = 0; + }; + +} // namespace WebCore + +#endif // ScriptSourceProvider_h diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.cpp index dfb46dabbc..d427ceee23 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.cpp @@ -44,7 +44,7 @@ bool ScriptValue::getString(String& result) const { if (!m_value) return false; - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); UString ustring; if (!m_value.get().getString(ustring)) return false; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/StringSourceProvider.h b/src/3rdparty/webkit/WebCore/bindings/js/StringSourceProvider.h index 89dfa67853..770c4fc748 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/StringSourceProvider.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/StringSourceProvider.h @@ -29,11 +29,12 @@ #ifndef StringSourceProvider_h #define StringSourceProvider_h +#include "ScriptSourceProvider.h" #include <parser/SourceCode.h> namespace WebCore { - class StringSourceProvider : public JSC::SourceProvider { + class StringSourceProvider : public ScriptSourceProvider { public: static PassRefPtr<StringSourceProvider> create(const String& source, const String& url) { return adoptRef(new StringSourceProvider(source, url)); } @@ -44,7 +45,7 @@ namespace WebCore { private: StringSourceProvider(const String& source, const String& url) - : SourceProvider(url) + : ScriptSourceProvider(url) , m_source(source) { } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp b/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp index bcf107ba2a..fc3de3c969 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp @@ -31,10 +31,9 @@ #include "WorkerScriptController.h" #include "JSDOMBinding.h" -#include "JSWorkerContext.h" +#include "JSDedicatedWorkerContext.h" #include "ScriptSourceCode.h" #include "ScriptValue.h" -#include "WorkerContext.h" #include "WorkerObjectProxy.h" #include "WorkerThread.h" #include <interpreter/Interpreter.h> @@ -66,16 +65,20 @@ void WorkerScriptController::initScript() { ASSERT(!m_workerContextWrapper); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); // Explicitly protect the global object's prototype so it isn't collected // when we allocate the global object. (Once the global object is fully // constructed, it can mark its own prototype.) - RefPtr<Structure> prototypeStructure = JSWorkerContextPrototype::createStructure(jsNull()); - ProtectedPtr<JSWorkerContextPrototype> prototype = new (m_globalData.get()) JSWorkerContextPrototype(prototypeStructure.release()); + RefPtr<Structure> workerContextPrototypeStructure = JSWorkerContextPrototype::createStructure(jsNull()); + ProtectedPtr<JSWorkerContextPrototype> workerContextPrototype = new (m_globalData.get()) JSWorkerContextPrototype(workerContextPrototypeStructure.release()); - RefPtr<Structure> structure = JSWorkerContext::createStructure(prototype); - m_workerContextWrapper = new (m_globalData.get()) JSWorkerContext(structure.release(), m_workerContext); + // FIXME: When we add SharedWorkerContext, generate the correct wrapper here. + RefPtr<Structure> dedicatedContextPrototypeStructure = JSDedicatedWorkerContextPrototype::createStructure(workerContextPrototype); + ProtectedPtr<JSDedicatedWorkerContextPrototype> dedicatedContextPrototype = new (m_globalData.get()) JSDedicatedWorkerContextPrototype(dedicatedContextPrototypeStructure.release()); + RefPtr<Structure> structure = JSDedicatedWorkerContext::createStructure(dedicatedContextPrototype); + + m_workerContextWrapper = new (m_globalData.get()) JSDedicatedWorkerContext(structure.release(), static_cast<DedicatedWorkerContext*>(m_workerContext)); } ScriptValue WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode) @@ -88,7 +91,7 @@ ScriptValue WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode) ScriptValue exception; ScriptValue result = evaluate(sourceCode, &exception); if (exception.jsValue()) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); reportException(m_workerContextWrapper->globalExec(), exception.jsValue()); } return result; @@ -103,7 +106,7 @@ ScriptValue WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode, } initScriptIfNeeded(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); ExecState* exec = m_workerContextWrapper->globalExec(); m_workerContextWrapper->globalData()->timeoutChecker.start(); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h b/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h index 0454721566..bb33f6082c 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h @@ -45,7 +45,7 @@ namespace WebCore { class String; class WorkerContext; - class WorkerScriptController : Noncopyable { + class WorkerScriptController : public Noncopyable { public: WorkerScriptController(WorkerContext*); ~WorkerScriptController(); diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGenerator.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGenerator.pm index fe145f4ec2..341c607982 100644 --- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGenerator.pm +++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGenerator.pm @@ -40,7 +40,7 @@ my %primitiveTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1 "float" => 1, "double" => 1, "boolean" => 1, "void" => 1); -my %podTypeHash = ("RGBColor" => 1, "SVGNumber" => 1, "SVGTransform" => 1); +my %podTypeHash = ("SVGNumber" => 1, "SVGTransform" => 1); my %podTypesWithWritablePropertiesHash = ("SVGLength" => 1, "SVGMatrix" => 1, "SVGPoint" => 1, "SVGRect" => 1); my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1); diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorCOM.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorCOM.pm index 7e80a17a61..6641305a3f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorCOM.pm +++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorCOM.pm @@ -596,9 +596,15 @@ sub GenerateCPPAttribute # FIXME: CHECK EXCEPTION AND DO SOMETHING WITH IT - my $setterCall = " impl${implementationClassWithoutNamespace}()->${setterName}(" . join(", ", @setterParams) . ");\n"; - - push(@setterImplementation, $setterCall); + my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; + my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; + if ($reflect || $reflectURL) { + $CPPImplementationWebCoreIncludes{"HTMLNames.h"} = 1; + my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $attributeName : ($reflect || $reflectURL); + push(@setterImplementation, " impl${implementationClassWithoutNamespace}()->setAttribute(WebCore::HTMLNames::${contentAttributeName}Attr, " . join(", ", @setterParams) . ");\n"); + } else { + push(@setterImplementation, " impl${implementationClassWithoutNamespace}()->${setterName}(" . join(", ", @setterParams) . ");\n"); + } push(@setterImplementation, " return S_OK;\n"); push(@setterImplementation, "}\n\n"); @@ -611,7 +617,17 @@ sub GenerateCPPAttribute push(@getterImplementation, " if (!result)\n"); push(@getterImplementation, " return E_POINTER;\n\n"); - my $implementationGetter = "impl${implementationClassWithoutNamespace}()->" . $codeGenerator->WK_lcfirst($attributeName) . "(" . ($hasGetterException ? "ec" : ""). ")"; + my $implementationGetter; + my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; + my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; + if ($reflect || $reflectURL) { + $implIncludes{"HTMLNames.h"} = 1; + my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $attributeName : ($reflect || $reflectURL); + my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute"; + $implementationGetter = "impl${implementationClassWithoutNamespace}()->${getAttributeFunctionName}(WebCore::HTMLNames::${contentAttributeName}Attr)"; + } else { + $implementationGetter = "impl${implementationClassWithoutNamespace}()->" . $codeGenerator->WK_lcfirst($attributeName) . "(" . ($hasGetterException ? "ec" : ""). ")"; + } push(@getterImplementation, " WebCore::ExceptionCode ec = 0;\n") if $hasGetterException; diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm index dbcfffffe1..26cf3f5969 100644 --- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm +++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm @@ -119,7 +119,15 @@ sub GetParentClassName my $dataNode = shift; return $dataNode->extendedAttributes->{"LegacyParent"} if $dataNode->extendedAttributes->{"LegacyParent"}; - return "DOMObject" if @{$dataNode->parents} eq 0; + if (@{$dataNode->parents} eq 0) { + # FIXME: SVG types requiring a context() pointer do not have enough + # space to hold a globalObject pointer as well w/o hitting the CELL_SIZE limit. + # This could be fixed by moving context() into the various impl() classes. + # Until then, we special case these SVG bindings and allow them to return + # the wrong prototypes and constructors during x-frame access. See bug 27088. + return "DOMObjectWithSVGContext" if IsSVGTypeNeedingContextParameter($dataNode->name); + return "DOMObjectWithGlobalPointer"; + } return "JS" . $codeGenerator->StripModule($dataNode->parents(0)); } @@ -165,7 +173,7 @@ sub AddIncludesForType # When we're finished with the one-file-per-class # reorganization, we won't need these special cases. if ($codeGenerator->IsPrimitiveType($type) or AvoidInclusionOfType($type) - or $type eq "DOMString" or $type eq "DOMObject" or $type eq "RGBColor" or $type eq "Array") { + or $type eq "DOMString" or $type eq "DOMObject" or $type eq "Array") { } elsif ($type =~ /SVGPathSeg/) { $joinedName = $type; $joinedName =~ s/Abs|Rel//; @@ -219,11 +227,13 @@ sub IsSVGTypeNeedingContextParameter { my $implClassName = shift; - if ($implClassName =~ /SVG/ and not $implClassName =~ /Element/) { - return 1 unless $implClassName =~ /SVGPaint/ or $implClassName =~ /SVGColor/ or $implClassName =~ /SVGDocument/; + return 0 unless $implClassName =~ /SVG/; + return 0 if $implClassName =~ /Element/; + my @noContextNeeded = ("SVGPaint", "SVGColor", "SVGDocument", "SVGZoomEvent"); + foreach (@noContextNeeded) { + return 0 if $implClassName eq $_; } - - return 0; + return 1; } sub HashValueForClassAndName @@ -358,6 +368,7 @@ sub GenerateHeader my $hasParent = $hasLegacyParent || $hasRealParent; my $parentClassName = GetParentClassName($dataNode); my $conditional = $dataNode->extendedAttributes->{"Conditional"}; + my $needsSVGContext = IsSVGTypeNeedingContextParameter($interfaceName); # - Add default header template @headerContentHeader = split("\r", $headerTemplate); @@ -375,7 +386,8 @@ sub GenerateHeader if ($hasParent) { $headerIncludes{"$parentClassName.h"} = 1; } else { - $headerIncludes{"JSDOMBinding.h"} = 1; + $headerIncludes{"DOMObjectWithSVGContext.h"} = $needsSVGContext; + $headerIncludes{"JSDOMBinding.h"} = !$needsSVGContext; $headerIncludes{"<runtime/JSGlobalObject.h>"} = 1; $headerIncludes{"<runtime/ObjectPrototype.h>"} = 1; } @@ -420,10 +432,12 @@ sub GenerateHeader # Constructor if ($interfaceName eq "DOMWindow") { push(@headerContent, " $className(PassRefPtr<JSC::Structure>, PassRefPtr<$implType>, JSDOMWindowShell*);\n"); + } elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) { + push(@headerContent, " $className(PassRefPtr<JSC::Structure>, PassRefPtr<$implType>);\n"); } elsif (IsSVGTypeNeedingContextParameter($implClassName)) { - push(@headerContent, " $className(PassRefPtr<JSC::Structure>, PassRefPtr<$implType>, SVGElement* context);\n"); + push(@headerContent, " $className(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<$implType>, SVGElement* context);\n"); } else { - push(@headerContent, " $className(PassRefPtr<JSC::Structure>, PassRefPtr<$implType>);\n"); + push(@headerContent, " $className(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<$implType>);\n"); } # Destructor @@ -520,7 +534,7 @@ sub GenerateHeader push(@headerContent, " virtual JSC::JSValue lookupSetter(JSC::ExecState*, const JSC::Identifier& propertyName);\n") if $dataNode->extendedAttributes->{"CustomLookupSetter"}; # Constructor object getter - push(@headerContent, " static JSC::JSValue getConstructor(JSC::ExecState*);\n") if $dataNode->extendedAttributes->{"GenerateConstructor"}; + push(@headerContent, " static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);\n") if $dataNode->extendedAttributes->{"GenerateConstructor"}; my $numCustomFunctions = 0; my $numCustomAttributes = 0; @@ -569,23 +583,11 @@ sub GenerateHeader } if (!$hasParent) { - if ($podType) { - push(@headerContent, " JSSVGPODTypeWrapper<$podType>* impl() const { return m_impl.get(); }\n"); - push(@headerContent, " SVGElement* context() const { return m_context.get(); }\n\n"); - push(@headerContent, "private:\n"); - push(@headerContent, " RefPtr<SVGElement> m_context;\n"); - push(@headerContent, " RefPtr<JSSVGPODTypeWrapper<$podType> > m_impl;\n"); - } elsif (IsSVGTypeNeedingContextParameter($implClassName)) { - push(@headerContent, " $implClassName* impl() const { return m_impl.get(); }\n"); - push(@headerContent, " SVGElement* context() const { return m_context.get(); }\n\n"); - push(@headerContent, "private:\n"); - push(@headerContent, " RefPtr<SVGElement> m_context;\n"); - push(@headerContent, " RefPtr<$implClassName > m_impl;\n"); - } else { - push(@headerContent, " $implClassName* impl() const { return m_impl.get(); }\n\n"); - push(@headerContent, "private:\n"); - push(@headerContent, " RefPtr<$implClassName> m_impl;\n"); - } + # Extra space after JSSVGPODTypeWrapper<> to make RefPtr<Wrapper<> > compile. + my $implType = $podType ? "JSSVGPODTypeWrapper<$podType> " : $implClassName; + push(@headerContent, " $implType* impl() const { return m_impl.get(); }\n\n"); + push(@headerContent, "private:\n"); + push(@headerContent, " RefPtr<$implType> m_impl;\n"); } elsif ($dataNode->extendedAttributes->{"GenerateNativeConverter"}) { push(@headerContent, " $implClassName* impl() const\n"); push(@headerContent, " {\n"); @@ -623,11 +625,11 @@ sub GenerateHeader if (!$hasParent || $dataNode->extendedAttributes->{"GenerateToJS"} || $dataNode->extendedAttributes->{"CustomToJS"}) { if ($podType) { - push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSSVGPODTypeWrapper<$podType>*, SVGElement* context);\n"); + push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<$podType>*, SVGElement* context);\n"); } elsif (IsSVGTypeNeedingContextParameter($implClassName)) { - push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, $implType*, SVGElement* context);\n"); + push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*, SVGElement* context);\n"); } else { - push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, $implType*);\n"); + push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n"); } } if (!$hasParent || $dataNode->extendedAttributes->{"GenerateNativeConverter"}) { @@ -640,7 +642,7 @@ sub GenerateHeader } } if ($interfaceName eq "Node" or $interfaceName eq "Element" or $interfaceName eq "Text" or $interfaceName eq "CDATASection") { - push(@headerContent, "JSC::JSValue toJSNewlyCreated(JSC::ExecState*, $interfaceName*);\n"); + push(@headerContent, "JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName*);\n"); } push(@headerContent, "\n"); @@ -651,7 +653,7 @@ sub GenerateHeader push(@headerContent, "public:\n"); if ($interfaceName eq "DOMWindow") { push(@headerContent, " void* operator new(size_t);\n"); - } elsif ($interfaceName eq "WorkerContext") { + } elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) { push(@headerContent, " void* operator new(size_t, JSC::JSGlobalData*);\n"); } else { push(@headerContent, " static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);\n"); @@ -901,7 +903,7 @@ sub GenerateImplementation push(@implContent, "{\n"); push(@implContent, " return JSDOMWindow::commonJSGlobalData()->heap.allocate(size);\n"); push(@implContent, "}\n\n"); - } elsif ($interfaceName eq "WorkerContext") { + } elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) { push(@implContent, "void* ${className}Prototype::operator new(size_t size, JSGlobalData* globalData)\n"); push(@implContent, "{\n"); push(@implContent, " return globalData->heap.allocate(size);\n"); @@ -980,22 +982,18 @@ sub GenerateImplementation AddIncludesForType("JSDOMWindowShell"); push(@implContent, "${className}::$className(PassRefPtr<Structure> structure, PassRefPtr<$implType> impl, JSDOMWindowShell* shell)\n"); push(@implContent, " : $parentClassName(structure, impl, shell)\n"); + } elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) { + AddIncludesForType($interfaceName); + push(@implContent, "${className}::$className(PassRefPtr<Structure> structure, PassRefPtr<$implType> impl)\n"); + push(@implContent, " : $parentClassName(structure, impl)\n"); } else { - my $contextArg = ""; - if ($needsSVGContext) { - if ($hasParent && !$parentNeedsSVGContext) { - $contextArg = ", SVGElement*"; - } else { - $contextArg = ", SVGElement* context"; - } - } - push(@implContent, "${className}::$className(PassRefPtr<Structure> structure, PassRefPtr<$implType> impl$contextArg)\n"); + my $contextArg = $needsSVGContext ? ", SVGElement* context" : ""; + push(@implContent, "${className}::$className(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<$implType> impl$contextArg)\n"); if ($hasParent) { - push(@implContent, " : $parentClassName(structure, impl" . ($parentNeedsSVGContext ? ", context" : "") . ")\n"); + push(@implContent, " : $parentClassName(structure, globalObject, impl" . ($parentNeedsSVGContext ? ", context" : "") . ")\n"); } else { - push(@implContent, " : $parentClassName(structure)\n"); - push(@implContent, " , m_context(context)\n") if $needsSVGContext; - push(@implContent, " , m_impl(impl)\n"); + push(@implContent, " : $parentClassName(structure, globalObject" . ($needsSVGContext ? ", context" : "") . ")\n"); + push(@implContent, " , m_impl(impl)\n"); } } push(@implContent, "{\n"); @@ -1096,6 +1094,7 @@ sub GenerateImplementation push(@implContent, "JSValue ${getFunctionName}(ExecState* exec, const Identifier&, const PropertySlot& slot)\n"); push(@implContent, "{\n"); + push(@implContent, " ${className}* castedThis = static_cast<$className*>(asObject(slot.slotBase()));\n"); my $implClassNameForValueConversion = ""; if (!$podType and ($codeGenerator->IsSVGAnimatedType($implClassName) or $attribute->type !~ /^readonly/)) { @@ -1105,25 +1104,25 @@ sub GenerateImplementation if ($dataNode->extendedAttributes->{"CheckDomainSecurity"} && !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurity"} && !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurityOnGet"}) { - push(@implContent, " if (!static_cast<$className*>(asObject(slot.slotBase()))->allowsAccessFrom(exec))\n"); + push(@implContent, " if (!castedThis->allowsAccessFrom(exec))\n"); push(@implContent, " return jsUndefined();\n"); } if ($attribute->signature->extendedAttributes->{"Custom"} || $attribute->signature->extendedAttributes->{"JSCCustom"} || $attribute->signature->extendedAttributes->{"CustomGetter"} || $attribute->signature->extendedAttributes->{"JSCCustomGetter"}) { - push(@implContent, " return static_cast<$className*>(asObject(slot.slotBase()))->$implGetterFunctionName(exec);\n"); + push(@implContent, " return castedThis->$implGetterFunctionName(exec);\n"); } elsif ($attribute->signature->extendedAttributes->{"CheckNodeSecurity"}) { $implIncludes{"JSDOMBinding.h"} = 1; - push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(static_cast<$className*>(asObject(slot.slotBase()))->impl());\n"); - push(@implContent, " return checkNodeSecurity(exec, imp->$implGetterFunctionName()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName()", "static_cast<$className*>(asObject(slot.slotBase()))") . " : jsUndefined();\n"); + push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n"); + push(@implContent, " return checkNodeSecurity(exec, imp->$implGetterFunctionName()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n"); } elsif ($attribute->signature->extendedAttributes->{"CheckFrameSecurity"}) { $implIncludes{"Document.h"} = 1; $implIncludes{"JSDOMBinding.h"} = 1; - push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(static_cast<$className*>(asObject(slot.slotBase()))->impl());\n"); - push(@implContent, " return checkNodeSecurity(exec, imp->contentDocument()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName()", "static_cast<$className*>(asObject(slot.slotBase()))") . " : jsUndefined();\n"); + push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n"); + push(@implContent, " return checkNodeSecurity(exec, imp->contentDocument()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n"); } elsif ($type eq "EventListener") { $implIncludes{"EventListener.h"} = 1; push(@implContent, " UNUSED_PARAM(exec);\n"); - push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(static_cast<$className*>(asObject(slot.slotBase()))->impl());\n"); + push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n"); push(@implContent, " if (EventListener* listener = imp->$implGetterFunctionName()) {\n"); push(@implContent, " if (JSObject* jsFunction = listener->jsFunction())\n"); push(@implContent, " return jsFunction;\n"); @@ -1132,19 +1131,20 @@ sub GenerateImplementation } elsif ($attribute->signature->type =~ /Constructor$/) { my $constructorType = $codeGenerator->StripModule($attribute->signature->type); $constructorType =~ s/Constructor$//; - push(@implContent, " UNUSED_PARAM(slot);\n"); - push(@implContent, " return JS" . $constructorType . "::getConstructor(exec);\n"); + # Constructor attribute is only used by DOMWindow.idl, so it's correct to pass castedThis as the global object + # Once DOMObjects have a back-pointer to the globalObject we can pass castedThis->globalObject() + push(@implContent, " return JS" . $constructorType . "::getConstructor(exec, castedThis);\n"); } elsif (!@{$attribute->getterExceptions}) { push(@implContent, " UNUSED_PARAM(exec);\n"); if ($podType) { - push(@implContent, " $podType imp(*static_cast<$className*>(asObject(slot.slotBase()))->impl());\n"); + push(@implContent, " $podType imp(*castedThis->impl());\n"); if ($podType eq "float") { # Special case for JSSVGNumber - push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp", "static_cast<$className*>(asObject(slot.slotBase()))") . ";\n"); + push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp", "castedThis") . ";\n"); } else { - push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName()", "static_cast<$className*>(asObject(slot.slotBase()))") . ";\n"); + push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName()", "castedThis") . ";\n"); } } else { - push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(static_cast<$className*>(asObject(slot.slotBase()))->impl());\n"); + push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n"); my $value; my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; @@ -1156,23 +1156,22 @@ sub GenerateImplementation } else { $value = "imp->$implGetterFunctionName()"; } - my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, $value, "static_cast<$className*>(asObject(slot.slotBase()))"); + my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, $value, "castedThis"); if ($codeGenerator->IsSVGAnimatedType($type)) { push(@implContent, " RefPtr<$type> obj = $jsType;\n"); - push(@implContent, " return toJS(exec, obj.get(), imp);\n"); + push(@implContent, " return toJS(exec, castedThis->globalObject(), obj.get(), imp);\n"); } else { push(@implContent, " return $jsType;\n"); } } } else { - push(@implContent, " ExceptionCode ec = 0;\n"); - + push(@implContent, " ExceptionCode ec = 0;\n"); if ($podType) { - push(@implContent, " $podType imp(*static_cast<$className*>(asObject(slot.slotBase()))->impl());\n"); - push(@implContent, " JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName(ec)", "static_cast<$className*>(asObject(slot.slotBase()))") . ";\n"); + push(@implContent, " $podType imp(*castedThis->impl());\n"); + push(@implContent, " JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName(ec)", "castedThis") . ";\n"); } else { - push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(static_cast<$className*>(asObject(slot.slotBase()))->impl());\n"); - push(@implContent, " JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName(ec)", "static_cast<$className*>(asObject(slot.slotBase()))") . ";\n"); + push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n"); + push(@implContent, " JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName(ec)", "castedThis") . ";\n"); } push(@implContent, " setDOMException(exec, ec);\n"); @@ -1193,7 +1192,15 @@ sub GenerateImplementation push(@implContent, "JSValue ${constructorFunctionName}(ExecState* exec, const Identifier&, const PropertySlot& slot)\n"); push(@implContent, "{\n"); - push(@implContent, " return static_cast<$className*>(asObject(slot.slotBase()))->getConstructor(exec);\n"); + if (IsSVGTypeNeedingContextParameter($interfaceName)) { + # FIXME: SVG bindings with a context pointer have no space to store a globalObject + # so we use deprecatedGlobalObjectForPrototype instead. + push(@implContent, " UNUSED_PARAM(slot);\n"); + push(@implContent, " return ${className}::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec));\n"); + } else { + push(@implContent, " ${className}* domObject = static_cast<$className*>(asObject(slot.slotBase()));\n"); + push(@implContent, " return ${className}::getConstructor(exec, domObject->globalObject());\n"); + } push(@implContent, "}\n"); } } @@ -1338,8 +1345,8 @@ sub GenerateImplementation } if ($dataNode->extendedAttributes->{"GenerateConstructor"}) { - push(@implContent, "JSValue ${className}::getConstructor(ExecState* exec)\n{\n"); - push(@implContent, " return getDOMConstructor<${className}Constructor>(exec);\n"); + push(@implContent, "JSValue ${className}::getConstructor(ExecState* exec, JSGlobalObject* globalObject)\n{\n"); + push(@implContent, " return getDOMConstructor<${className}Constructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));\n"); push(@implContent, "}\n\n"); } @@ -1361,6 +1368,10 @@ sub GenerateImplementation push(@implContent, " $className* castedThisObj = toJSDOMWindow(thisValue.toThisObject(exec));\n"); push(@implContent, " if (!castedThisObj)\n"); push(@implContent, " return throwError(exec, TypeError);\n"); + } elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) { + push(@implContent, " $className* castedThisObj = to${className}(thisValue.toThisObject(exec));\n"); + push(@implContent, " if (!castedThisObj)\n"); + push(@implContent, " return throwError(exec, TypeError);\n"); } else { push(@implContent, " if (!thisValue.isObject(&${className}::s_info))\n"); push(@implContent, " return throwError(exec, TypeError);\n"); @@ -1488,7 +1499,7 @@ sub GenerateImplementation $implIncludes{"KURL.h"} = 1; push(@implContent, " return jsStringOrNull(exec, thisObj->impl()->item(slot.index()));\n"); } else { - push(@implContent, " return toJS(exec, static_cast<$implClassName*>(thisObj->impl())->item(slot.index()));\n"); + push(@implContent, " return toJS(exec, thisObj->globalObject(), static_cast<$implClassName*>(thisObj->impl())->item(slot.index()));\n"); } push(@implContent, "}\n"); if ($interfaceName eq "HTMLCollection") { @@ -1499,20 +1510,20 @@ sub GenerateImplementation if ((!$hasParent or $dataNode->extendedAttributes->{"GenerateToJS"}) and !$dataNode->extendedAttributes->{"CustomToJS"}) { if ($podType) { - push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<$podType>* object, SVGElement* context)\n"); + push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<$podType>* object, SVGElement* context)\n"); } elsif (IsSVGTypeNeedingContextParameter($implClassName)) { - push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, $implType* object, SVGElement* context)\n"); + push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType* object, SVGElement* context)\n"); } else { - push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, $implType* object)\n"); + push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType* object)\n"); } push(@implContent, "{\n"); if ($podType) { - push(@implContent, " return getDOMObjectWrapper<$className, JSSVGPODTypeWrapper<$podType> >(exec, object, context);\n"); + push(@implContent, " return getDOMObjectWrapper<$className, JSSVGPODTypeWrapper<$podType> >(exec, globalObject, object, context);\n"); } elsif (IsSVGTypeNeedingContextParameter($implClassName)) { - push(@implContent, " return getDOMObjectWrapper<$className>(exec, object, context);\n"); + push(@implContent, " return getDOMObjectWrapper<$className>(exec, globalObject, object, context);\n"); } else { - push(@implContent, " return getDOMObjectWrapper<$className>(exec, object);\n"); + push(@implContent, " return getDOMObjectWrapper<$className>(exec, globalObject, object);\n"); } push(@implContent, "}\n"); } @@ -1688,11 +1699,9 @@ sub NativeToJSValue $implIncludes{"<runtime/JSString.h>"} = 1; return "jsString(exec, $value)"; } - - if ($type eq "RGBColor") { - $implIncludes{"JS$type.h"} = 1; - return "getJSRGBColor(exec, $value)"; - } + + # Some SVG bindings don't have space to store a globalObject pointer, for those, we use the deprecatedGlobalObjectForPrototype hack for now. + my $globalObject = IsSVGTypeNeedingContextParameter($implClassName) ? "deprecatedGlobalObjectForPrototype(exec)" : "$thisValue->globalObject()"; if ($codeGenerator->IsPodType($type)) { $implIncludes{"JS$type.h"} = 1; @@ -1711,24 +1720,25 @@ sub NativeToJSValue and $codeGenerator->IsPodTypeWithWriteableProperties($type) and not defined $signature->extendedAttributes->{"Immutable"}) { if ($codeGenerator->IsPodType($implClassName)) { - return "toJS(exec, JSSVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($value, $thisValue->impl()).get(), $thisValue->context())"; + return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($value, $thisValue->impl()).get(), $thisValue->context())"; } else { - return "toJS(exec, JSSVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>::create(imp, &${implClassName}::$getter, &${implClassName}::$setter).get(), imp)"; + return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>::create(imp, &${implClassName}::$getter, &${implClassName}::$setter).get(), imp)"; } } if ($implClassNameForValueConversion eq "") { - if (IsSVGTypeNeedingContextParameter($implClassName)) { - return "toJS(exec, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), castedThisObj->context())" if $inFunctionCall eq 1; + # SVGZoomEvent has no context() pointer, and is also not an SVGElement. + # This is not a problem, because SVGZoomEvent has no read/write properties. + return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), 0)" if $implClassName eq "SVGZoomEvent"; - # Special case: SVGZoomEvent - it doesn't have a context, but it's no problem, as there are no readwrite props - return "toJS(exec, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), 0)" if $implClassName eq "SVGZoomEvent"; - return "toJS(exec, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), $thisValue->context())"; + if (IsSVGTypeNeedingContextParameter($implClassName)) { + return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), castedThisObj->context())" if $inFunctionCall; + return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), $thisValue->context())"; } else { - return "toJS(exec, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), imp)"; + return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), imp)"; } } else { # These classes, always have a m_context pointer! - return "toJS(exec, JSSVGDynamicPODTypeWrapperCache<$nativeType, $implClassNameForValueConversion>::lookupOrCreateWrapper(imp, &${implClassNameForValueConversion}::$getter, &${implClassNameForValueConversion}::$setter).get(), $thisValue->context())"; + return "toJS(exec, $globalObject, JSSVGDynamicPODTypeWrapperCache<$nativeType, $implClassNameForValueConversion>::lookupOrCreateWrapper(imp, &${implClassNameForValueConversion}::$getter, &${implClassNameForValueConversion}::$setter).get(), $thisValue->context())"; } } @@ -1761,18 +1771,15 @@ sub NativeToJSValue return $value if $codeGenerator->IsSVGAnimatedType($type); if (IsSVGTypeNeedingContextParameter($type)) { - if (IsSVGTypeNeedingContextParameter($implClassName)) { - return "toJS(exec, WTF::getPtr($value), $thisValue->context())"; - } else { - return "toJS(exec, WTF::getPtr($value), imp)"; - } + my $contextPtr = IsSVGTypeNeedingContextParameter($implClassName) ? "$thisValue->context()" : "imp"; + return "toJS(exec, $globalObject, WTF::getPtr($value), $contextPtr)"; } if ($signature->extendedAttributes->{"ReturnsNew"}) { - return "toJSNewlyCreated(exec, WTF::getPtr($value))"; + return "toJSNewlyCreated(exec, $globalObject, WTF::getPtr($value))"; } - return "toJS(exec, WTF::getPtr($value))"; + return "toJS(exec, $globalObject, WTF::getPtr($value))"; } sub ceilingToPowerOf2 @@ -2023,14 +2030,15 @@ sub constructorFor my $interfaceName = shift; my $visibleClassName = shift; my $canConstruct = shift; + my $constructorClassName = "${className}Constructor"; my $implContent = << "EOF"; -class ${className}Constructor : public DOMObject { +class ${constructorClassName} : public DOMConstructorObject { public: - ${className}Constructor(ExecState* exec) - : DOMObject(${className}Constructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + ${constructorClassName}(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(${constructorClassName}::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, ${protoClassName}::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, ${protoClassName}::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -2044,13 +2052,13 @@ EOF if ($canConstruct) { $implContent .= << "EOF"; - static JSObject* construct(ExecState* exec, JSObject*, const ArgList&) + static JSObject* construct${interfaceName}(ExecState* exec, JSObject* constructor, const ArgList&) { - return asObject(toJS(exec, ${interfaceName}::create())); + return asObject(toJS(exec, static_cast<${constructorClassName}*>(constructor)->globalObject(), ${interfaceName}::create())); } virtual ConstructType getConstructData(ConstructData& constructData) { - constructData.native.function = construct; + constructData.native.function = construct${interfaceName}; return ConstructTypeHost; } EOF @@ -2059,16 +2067,16 @@ EOF $implContent .= << "EOF"; }; -const ClassInfo ${className}Constructor::s_info = { "${visibleClassName}Constructor", 0, &${className}ConstructorTable, 0 }; +const ClassInfo ${constructorClassName}::s_info = { "${visibleClassName}Constructor", 0, &${constructorClassName}Table, 0 }; -bool ${className}Constructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +bool ${constructorClassName}::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { - return getStaticValueSlot<${className}Constructor, DOMObject>(exec, &${className}ConstructorTable, this, propertyName, slot); + return getStaticValueSlot<${constructorClassName}, DOMObject>(exec, &${constructorClassName}Table, this, propertyName, slot); } EOF - $implJSCInclude{"JSNumberCell.h"} = 1; + $implJSCInclude{"JSNumberCell.h"} = 1; # FIXME: What is this for? return $implContent; } diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorObjC.pm index 10628b4641..d46d88a727 100644 --- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorObjC.pm +++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorObjC.pm @@ -515,15 +515,17 @@ sub AddIncludesForType { my $type = $codeGenerator->StripModule(shift); - return if $codeGenerator->IsNonPointerType($type) or IsNativeObjCType($type); + return if $codeGenerator->IsNonPointerType($type); - if ($codeGenerator->IsStringType($type)) { - $implIncludes{"KURL.h"} = 1; + if (IsNativeObjCType($type)) { + if ($type eq "Color") { + $implIncludes{"ColorMac.h"} = 1; + } return; } - if ($type eq "RGBColor") { - $implIncludes{"DOMRGBColorInternal.h"} = 1; + if ($codeGenerator->IsStringType($type)) { + $implIncludes{"KURL.h"} = 1; return; } @@ -924,8 +926,6 @@ sub GenerateHeader if ($codeGenerator->IsSVGAnimatedType($interfaceName)) { push(@internalHeaderContent, "#import <WebCore/SVGAnimatedTemplate.h>\n\n"); - } elsif ($interfaceName eq "RGBColor") { - push(@internalHeaderContent, "#import <WebCore/Color.h>\n\n"); } else { push(@internalHeaderContent, "namespace WebCore {\n"); $startedNamespace = 1; @@ -1198,6 +1198,9 @@ sub GenerateImplementation } elsif (IsProtocolType($idlType) and $idlType ne "EventTarget") { $getterContentHead = "kit($getterContentHead"; $getterContentTail .= ")"; + } elsif ($idlType eq "Color") { + $getterContentHead = "WebCore::nsColor($getterContentHead"; + $getterContentTail .= ")"; } elsif (ConversionNeeded($attribute->signature->type)) { $getterContentHead = "kit(WTF::getPtr($getterContentHead"; $getterContentTail .= "))"; diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm index cdadf8178d..862649fb12 100644 --- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm +++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm @@ -113,7 +113,6 @@ sub WK_lcfirst sub IsPodType { my $type = shift; - return 0 if $type eq "RGBColor"; return $codeGenerator->IsPodType($type); } @@ -243,6 +242,18 @@ sub GetImplementationFileName return "${iface}.h"; } +# If the node has a [Conditional=XXX] attribute, returns an "ENABLE(XXX)" string for use in an #if. +sub GenerateConditionalString +{ + my $node = shift; + my $conditional = $node->extendedAttributes->{"Conditional"}; + if ($conditional) { + return "ENABLE(" . join(") && ENABLE(", split(/&/, $conditional)) . ")"; + } else { + return ""; + } +} + sub GenerateHeader { my $object = shift; @@ -257,17 +268,12 @@ sub GenerateHeader $codeGenerator->AddMethodsConstantsAndAttributesFromParentClasses($dataNode); my $hasLegacyParent = $dataNode->extendedAttributes->{"LegacyParent"}; - my $conditional = $dataNode->extendedAttributes->{"Conditional"}; + my $conditionalString = GenerateConditionalString($dataNode); # - Add default header template @headerContent = split("\r", $headerTemplate); - my $conditionalString; - if ($conditional) { - $conditionalString = "ENABLE(" . join(") && ENABLE(", split(/&/, $conditional)) . ")"; - push(@headerContent, "\n#if ${conditionalString}\n\n"); - } - + push(@headerContent, "\n#if ${conditionalString}\n\n") if $conditionalString; push(@headerContent, "\n#ifndef $className" . "_H"); push(@headerContent, "\n#define $className" . "_H\n\n"); @@ -310,7 +316,7 @@ END push(@headerContent, "}\n\n"); push(@headerContent, "#endif // $className" . "_H\n"); - push(@headerContent, "#endif // ${conditionalString}\n\n") if $conditional; + push(@headerContent, "#endif // ${conditionalString}\n\n") if $conditionalString; } @@ -422,17 +428,12 @@ END if ($classIndex eq "DOMWINDOW") { push(@implContentDecls, <<END); DOMWindow* window = V8DOMWrapper::convertToNativeObject<DOMWindow>(V8ClassIndex::DOMWINDOW, info.Holder()); - Frame* frame = window->frame(); - if (frame) { - // Get the proxy corresponding to the DOMWindow if possible to - // make sure that the constructor function is constructed in the - // context of the DOMWindow and not in the context of the caller. - return V8Proxy::retrieve(frame)->getConstructor(type); - } + // Get the proxy corresponding to the DOMWindow if possible to + // make sure that the constructor function is constructed in the + // context of the DOMWindow and not in the context of the caller. + return V8DOMWrapper::getConstructor(type, window); END - } - - if ($classIndex eq "WORKERCONTEXT") { + } elsif ($classIndex eq "DEDICATEDWORKERCONTEXT" or $classIndex eq "WORKERCONTEXT") { $implIncludes{"WorkerContextExecutionProxy.h"} = 1; push(@implContentDecls, <<END); return WorkerContextExecutionProxy::retrieve()->GetConstructor(type); @@ -547,54 +548,60 @@ END my $getterString; if ($getterStringUsesImp) { - $getterString = "imp->$getterFunc("; - $getterString .= "ec" if $useExceptions; - $getterString .= ")"; - if (IsRefPtrType($returnType)) { - $implIncludes{"wtf/GetPtr.h"} = 1; - $getterString = "WTF::getPtr(" . $getterString . ")"; - } - if ($nativeType eq "int" and - $attribute->signature->extendedAttributes->{"ConvertFromString"}) { - $getterString .= ".toInt()"; - } + my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; + my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; + if ($reflect || $reflectURL) { + $implIncludes{"HTMLNames.h"} = 1; + my $contentAttributeName = ($reflect || $reflectURL) eq "1" ? $attrName : ($reflect || $reflectURL); + my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute"; + $getterString = "imp->$getAttributeFunctionName(HTMLNames::${contentAttributeName}Attr"; } else { - $getterString = "imp_instance"; + $getterString = "imp->$getterFunc("; } - if ($nativeType eq "String") { - $getterString = "toString($getterString)"; + $getterString .= "ec" if $useExceptions; + $getterString .= ")"; + if ($nativeType eq "int" and $attribute->signature->extendedAttributes->{"ConvertFromString"}) { + $getterString .= ".toInt()"; } + } else { + $getterString = "imp_instance"; + } - my $result; - my $wrapper; + if ($nativeType eq "String") { + $getterString = "toString($getterString)"; + } - if ($attrIsPodType) { - $implIncludes{"V8SVGPODTypeWrapper.h"} = 1; + my $result; + my $wrapper; + + if ($attrIsPodType) { + $implIncludes{"V8SVGPODTypeWrapper.h"} = 1; - my $getter = $getterString; - $getter =~ s/imp->//; - $getter =~ s/\(\)//; - my $setter = "set" . WK_ucfirst($getter); + my $getter = $getterString; + $getter =~ s/imp->//; + $getter =~ s/\(\)//; + my $setter = "set" . WK_ucfirst($getter); - my $implClassIsAnimatedType = $codeGenerator->IsSVGAnimatedType($implClassName); - if (not $implClassIsAnimatedType - and $codeGenerator->IsPodTypeWithWriteableProperties($attrType) - and not defined $attribute->signature->extendedAttributes->{"Immutable"}) { + my $implClassIsAnimatedType = $codeGenerator->IsSVGAnimatedType($implClassName); + if (not $implClassIsAnimatedType and $codeGenerator->IsPodTypeWithWriteableProperties($attrType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) { if (IsPodType($implClassName)) { - $wrapper = "new V8SVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>($getterString, imp_wrapper)"; + my $wrapper = "V8SVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($getterString, imp_wrapper)"; + push(@implContentDecls, " RefPtr<V8SVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName> > wrapper = $wrapper;\n"); } else { - $wrapper = "new V8SVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>(imp, &${implClassName}::$getter, &${implClassName}::$setter)"; + my $wrapper = "V8SVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>::create(imp, &${implClassName}::$getter, &${implClassName}::$setter)"; + push(@implContentDecls, " RefPtr<V8SVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName> > wrapper = $wrapper;\n"); } } else { if ($implClassIsAnimatedType) { - $wrapper = "V8SVGDynamicPODTypeWrapperCache<$nativeType, $implClassName>::lookupOrCreateWrapper(imp, &${implClassName}::$getter, &${implClassName}::$setter)"; + my $wrapper = "V8SVGDynamicPODTypeWrapperCache<$nativeType, $implClassName>::lookupOrCreateWrapper(imp, &${implClassName}::$getter, &${implClassName}::$setter)"; + push(@implContentDecls, " RefPtr<V8SVGPODTypeWrapper<" . $nativeType . "> > wrapper = $wrapper;\n"); } else { - $wrapper = GenerateSVGStaticPodTypeWrapper($returnType, $getterString); + my $wrapper = GenerateSVGStaticPodTypeWrapper($returnType, $getterString); + push(@implContentDecls, " RefPtr<V8SVGStaticPODTypeWrapper<" . $nativeType . "> > wrapper = $wrapper;\n"); } } - push(@implContentDecls, " void* wrapper = $wrapper;\n"); - } elsif ($nativeType ne "RGBColor") { + } else { push(@implContentDecls, " $nativeType v = "); push(@implContentDecls, "$getterString;\n"); @@ -604,28 +611,22 @@ END } $result = "v"; - if (IsRefPtrType($returnType)) { - $result = "WTF::getPtr(" . $result . ")"; - } - } else { - # Special case: RGBColor is noncopyable - $result = $getterString; } - if (IsSVGTypeNeedingContextParameter($attrType) && !$skipContext) { my $resultObject = $result; if ($attrIsPodType) { $resultObject = "wrapper"; } - + $resultObject = "WTF::getPtr(" . $resultObject . ")"; push(@implContentDecls, GenerateSVGContextAssignment($implClassName, $resultObject, " ")); } if ($attrIsPodType) { my $classIndex = uc($attrType); - push(@implContentDecls, " return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, wrapper);\n"); + push(@implContentDecls, " return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, wrapper.release());\n"); } else { + $result .= ".release()" if (IsRefPtrType($attrType)); push(@implContentDecls, " " . ReturnNativeToJSValue($attribute->signature, $result, " ").";\n"); } @@ -718,7 +719,16 @@ END if ($implClassName eq "double") { push(@implContentDecls, " *imp = $result;\n"); } else { - push(@implContentDecls, " imp->set" . WK_ucfirst($attrName) . "(" . $result); + my $implSetterFunctionName = WK_ucfirst($attrName); + my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; + my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; + if ($reflect || $reflectURL) { + $implIncludes{"HTMLNames.h"} = 1; + my $contentAttributeName = ($reflect || $reflectURL) eq "1" ? $attrName : ($reflect || $reflectURL); + push(@implContentDecls, " imp->setAttribute(HTMLNames::${contentAttributeName}Attr, $result"); + } else { + push(@implContentDecls, " imp->set$implSetterFunctionName(" . $result); + } push(@implContentDecls, ", ec") if $useExceptions; push(@implContentDecls, ");\n"); } @@ -800,7 +810,7 @@ sub GenerateFunctionCallback push(@implContentDecls, " $nativeClassName* imp = &imp_instance;\n"); } else { push(@implContentDecls, <<END); - v8::Handle<v8::Value> holder = args.Holder(); + v8::Handle<v8::Object> holder = args.Holder(); END HolderToNative($dataNode, $implClassName, $classIndex); } @@ -892,134 +902,138 @@ sub GenerateBatchedAttributeData $accessControl = "v8::ALL_CAN_WRITE"; } elsif ($attrExt->{"DoNotCheckDomainSecurity"}) { $accessControl = "v8::ALL_CAN_READ"; - if (!($attribute->type =~ /^readonly/) && !($attrExt->{"V8ReadOnly"})) { - $accessControl .= "|v8::ALL_CAN_WRITE"; + if (!($attribute->type =~ /^readonly/) && !($attrExt->{"V8ReadOnly"})) { + $accessControl .= "|v8::ALL_CAN_WRITE"; + } } - } - if ($attrExt->{"V8DisallowShadowing"}) { - $accessControl .= "|v8::PROHIBITS_OVERWRITING"; - } - $accessControl = "static_cast<v8::AccessControl>(" . $accessControl . ")"; - - my $customAccessor = - $attrExt->{"Custom"} || - $attrExt->{"CustomSetter"} || - $attrExt->{"CustomGetter"} || - $attrExt->{"V8Custom"} || - $attrExt->{"V8CustomSetter"} || - $attrExt->{"V8CustomGetter"} || - ""; - if ($customAccessor eq 1) { - # use the naming convension, interface + (capitalize) attr name - $customAccessor = $interfaceName . WK_ucfirst($attrName); - } - - my $getter; - my $setter; - my $propAttr = "v8::None"; - my $hasCustomSetter = 0; - - # Check attributes. - if ($attrExt->{"DontEnum"}) { - $propAttr .= "|v8::DontEnum"; - } - if ($attrExt->{"V8DisallowShadowing"}) { - $propAttr .= "|v8::DontDelete"; - } - - my $on_proto = "0 /* on instance */"; - my $data = "V8ClassIndex::INVALID_CLASS_INDEX /* no data */"; - - # Constructor - if ($attribute->signature->type =~ /Constructor$/) { - my $constructorType = $codeGenerator->StripModule($attribute->signature->type); - $constructorType =~ s/Constructor$//; - my $constructorIndex = uc($constructorType); - $data = "V8ClassIndex::${constructorIndex}"; - $getter = "${interfaceName}Internal::${interfaceName}ConstructorGetter"; - $setter = "0"; - $propAttr = "v8::ReadOnly"; - - # EventListeners - } elsif ($attribute->signature->type eq "EventListener") { - if ($interfaceName eq "DOMWindow") { - $getter = "V8Custom::v8DOMWindowEventHandlerAccessorGetter"; - $setter = "V8Custom::v8DOMWindowEventHandlerAccessorSetter"; - } elsif ($interfaceName eq "Element" || $interfaceName eq "Document" || $interfaceName eq "HTMLBodyElement" || $interfaceName eq "SVGElementInstance" || $interfaceName eq "HTMLFrameSetElement") { - $getter = "V8Custom::v8ElementEventHandlerAccessorGetter"; - $setter = "V8Custom::v8ElementEventHandlerAccessorSetter"; - } else { + if ($attrExt->{"V8DisallowShadowing"}) { + $accessControl .= "|v8::PROHIBITS_OVERWRITING"; + } + $accessControl = "static_cast<v8::AccessControl>(" . $accessControl . ")"; + + my $customAccessor = + $attrExt->{"Custom"} || + $attrExt->{"CustomSetter"} || + $attrExt->{"CustomGetter"} || + $attrExt->{"V8Custom"} || + $attrExt->{"V8CustomSetter"} || + $attrExt->{"V8CustomGetter"} || + ""; + if ($customAccessor eq 1) { + # use the naming convension, interface + (capitalize) attr name + $customAccessor = $interfaceName . WK_ucfirst($attrName); + } + + my $getter; + my $setter; + my $propAttr = "v8::None"; + my $hasCustomSetter = 0; + + # Check attributes. + if ($attrExt->{"DontEnum"}) { + $propAttr .= "|v8::DontEnum"; + } + if ($attrExt->{"V8DisallowShadowing"}) { + $propAttr .= "|v8::DontDelete"; + } + + my $on_proto = "0 /* on instance */"; + my $data = "V8ClassIndex::INVALID_CLASS_INDEX /* no data */"; + + # Constructor + if ($attribute->signature->type =~ /Constructor$/) { + my $constructorType = $codeGenerator->StripModule($attribute->signature->type); + $constructorType =~ s/Constructor$//; + my $constructorIndex = uc($constructorType); + $data = "V8ClassIndex::${constructorIndex}"; + $getter = "${interfaceName}Internal::${interfaceName}ConstructorGetter"; + $setter = "0"; + $propAttr = "v8::ReadOnly"; + + # EventListeners + } elsif ($attribute->signature->type eq "EventListener") { + if ($interfaceName eq "DOMWindow") { + $getter = "V8Custom::v8DOMWindowEventHandlerAccessorGetter"; + $setter = "V8Custom::v8DOMWindowEventHandlerAccessorSetter"; + } elsif ($interfaceName eq "Element" || $interfaceName eq "Document" || $interfaceName eq "HTMLBodyElement" || $interfaceName eq "SVGElementInstance" || $interfaceName eq "HTMLFrameSetElement") { + $getter = "V8Custom::v8ElementEventHandlerAccessorGetter"; + $setter = "V8Custom::v8ElementEventHandlerAccessorSetter"; + } else { + $getter = "V8Custom::v8${customAccessor}AccessorGetter"; + if ($interfaceName eq "WorkerContext" and $attrName eq "self") { + $setter = "0"; + $propAttr = "v8::ReadOnly"; + } else { + $setter = "V8Custom::v8${customAccessor}AccessorSetter"; + } + } + + # Custom Getter and Setter + } elsif ($attrExt->{"Custom"} || $attrExt->{"V8Custom"}) { $getter = "V8Custom::v8${customAccessor}AccessorGetter"; if ($interfaceName eq "WorkerContext" and $attrName eq "self") { $setter = "0"; $propAttr = "v8::ReadOnly"; } else { + $hasCustomSetter = 1; $setter = "V8Custom::v8${customAccessor}AccessorSetter"; } - } - # Custom Getter and Setter - } elsif ($attrExt->{"Custom"} || $attrExt->{"V8Custom"}) { - $getter = "V8Custom::v8${customAccessor}AccessorGetter"; - if ($interfaceName eq "WorkerContext" and $attrName eq "self") { - $setter = "0"; - $propAttr = "v8::ReadOnly"; - } else { + # Custom Setter + } elsif ($attrExt->{"CustomSetter"} || $attrExt->{"V8CustomSetter"}) { $hasCustomSetter = 1; + $getter = "${interfaceName}Internal::${attrName}AttrGetter"; $setter = "V8Custom::v8${customAccessor}AccessorSetter"; + + # Custom Getter + } elsif ($attrExt->{"CustomGetter"}) { + $getter = "V8Custom::v8${customAccessor}AccessorGetter"; + $setter = "${interfaceName}Internal::${attrName}AttrSetter"; + + # Replaceable + } elsif ($attrExt->{"Replaceable"}) { + # Replaceable accessor is put on instance template with ReadOnly attribute. + $getter = "${interfaceName}Internal::${attrName}AttrGetter"; + $setter = "0"; + + # Mark to avoid duplicate v8::ReadOnly flags in output. + $hasCustomSetter = 1; + + # Handle the special case of window.top being marked upstream as Replaceable. + # FIXME: Investigate why [Replaceable] is not marked as ReadOnly + # upstream and reach parity. + if (!($interfaceName eq "DOMWindow" and $attrName eq "top")) { + $propAttr .= "|v8::ReadOnly"; + } + + # Normal + } else { + $getter = "${interfaceName}Internal::${attrName}AttrGetter"; + $setter = "${interfaceName}Internal::${attrName}AttrSetter"; } - # Custom Setter - } elsif ($attrExt->{"CustomSetter"} || $attrExt->{"V8CustomSetter"}) { - $hasCustomSetter = 1; - $getter = "${interfaceName}Internal::${attrName}AttrGetter"; - $setter = "V8Custom::v8${customAccessor}AccessorSetter"; - - # Custom Getter - } elsif ($attrExt->{"CustomGetter"}) { - $getter = "V8Custom::v8${customAccessor}AccessorGetter"; - $setter = "${interfaceName}Internal::${attrName}AttrSetter"; - - # Replaceable - } elsif ($attrExt->{"Replaceable"}) { - # Replaceable accessor is put on instance template with ReadOnly attribute. - $getter = "${interfaceName}Internal::${attrName}AttrGetter"; - $setter = "0"; - - # Mark to avoid duplicate v8::ReadOnly flags in output. - $hasCustomSetter = 1; - - # Handle the special case of window.top being marked upstream as Replaceable. - # FIXME: Investigate why [Replaceable] is not marked as ReadOnly - # upstream and reach parity. - if (!($interfaceName eq "DOMWindow" and $attrName eq "top")) { + if ($attrExt->{"Replaceable"} && !$hasCustomSetter) { + $setter = "0"; $propAttr .= "|v8::ReadOnly"; } - # Normal - } else { - $getter = "${interfaceName}Internal::${attrName}AttrGetter"; - $setter = "${interfaceName}Internal::${attrName}AttrSetter"; - } - - if ($attrExt->{"Replaceable"} && !$hasCustomSetter) { - $setter = "0"; - $propAttr .= "|v8::ReadOnly"; - } + # Read only attributes + if ($attribute->type =~ /^readonly/ || $attrExt->{"V8ReadOnly"}) { + $setter = "0"; + } - # Read only attributes - if ($attribute->type =~ /^readonly/ || $attrExt->{"V8ReadOnly"}) { - $setter = "0"; - } + # An accessor can be installed on the proto + if ($attrExt->{"v8OnProto"}) { + $on_proto = "1 /* on proto */"; + } - # An accessor can be installed on the proto - if ($attrExt->{"v8OnProto"}) { - $on_proto = "1 /* on proto */"; - } + my $commentInfo = "Attribute '$attrName' (Type: '" . $attribute->type . + "' ExtAttr: '" . join(' ', keys(%{$attrExt})) . "')"; + + my $conditionalString = GenerateConditionalString($attribute->signature); + push(@implContent, "\n#if ${conditionalString}\n") if $conditionalString; - my $commentInfo = "Attribute '$attrName' (Type: '" . $attribute->type . - "' ExtAttr: '" . join(' ', keys(%{$attrExt})) . "')"; - push(@implContent, <<END); + push(@implContent, <<END); // $commentInfo { "$attrName", $getter, @@ -1029,6 +1043,7 @@ sub GenerateBatchedAttributeData static_cast<v8::PropertyAttribute>($propAttr), $on_proto }, END + push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString; } } @@ -1043,7 +1058,7 @@ sub GenerateImplementation my $classIndex = uc($codeGenerator->StripModule($interfaceName)); my $hasLegacyParent = $dataNode->extendedAttributes->{"LegacyParent"}; - my $conditional = $dataNode->extendedAttributes->{"Conditional"}; + my $conditionalString = GenerateConditionalString($dataNode); @allParents = $codeGenerator->FindParentsRecursively($dataNode); @@ -1056,11 +1071,7 @@ sub GenerateImplementation "#include \"V8Binding.h\"\n\n" . "#undef LOG\n\n"); - my $conditionalString; - if ($conditional) { - $conditionalString = "ENABLE(" . join(") && ENABLE(", split(/&/, $conditional)) . ")"; - push(@implFixedHeader, "\n#if ${conditionalString}\n\n"); - } + push(@implFixedHeader, "\n#if ${conditionalString}\n\n") if $conditionalString; if ($className =~ /^V8SVGAnimated/) { AddIncludesForSVGAnimatedType($interfaceName); @@ -1376,7 +1387,7 @@ END } // namespace WebCore END - push(@implContent, "\n#endif // ${conditionalString}\n") if $conditional; + push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString; } @@ -1466,13 +1477,6 @@ sub GenerateFunctionCallString() } $functionString .= ")"; - if ((IsRefPtrType($returnType) || $returnsListItemPodType) && !$nodeToReturn) { - # We don't use getPtr when $nodeToReturn because that situation is - # special-cased below to return a bool. - $implIncludes{"wtf/GetPtr.h"} = 1; - $functionString = "WTF::getPtr(" . $functionString . ")"; - } - if ($nodeToReturn) { # Special case for insertBefore, replaceChild, removeChild and # appendChild functions from Node. @@ -1502,18 +1506,14 @@ sub GenerateFunctionCallString() } my $return = "result"; - if (IsRefPtrType($returnType) || $returnsListItemPodType) { - $implIncludes{"wtf/GetPtr.h"} = 1; - $return = "WTF::getPtr(" . $return . ")"; - } # If the return type is a POD type, separate out the wrapper generation if ($returnsListItemPodType) { - $result .= $indent . "V8SVGPODTypeWrapper<" . $nativeReturnType . ">* wrapper = new "; - $result .= "V8SVGPODTypeWrapperCreatorForList<" . $nativeReturnType . ">($return, imp->associatedAttributeName());\n"; + $result .= $indent . "RefPtr<V8SVGPODTypeWrapper<" . $nativeReturnType . "> > wrapper = "; + $result .= "V8SVGPODTypeWrapperCreatorForList<" . $nativeReturnType . ">::create($return, imp->associatedAttributeName());\n"; $return = "wrapper"; } elsif ($returnsPodType) { - $result .= $indent . "V8SVGPODTypeWrapper<" . $nativeReturnType . ">* wrapper = "; + $result .= $indent . "RefPtr<V8SVGPODTypeWrapper<" . $nativeReturnType . "> > wrapper = "; $result .= GenerateSVGStaticPodTypeWrapper($returnType, $return) . ";\n"; $return = "wrapper"; } @@ -1521,7 +1521,7 @@ sub GenerateFunctionCallString() my $generatedSVGContextRetrieval = 0; # If the return type needs an SVG context, output it if (IsSVGTypeNeedingContextParameter($returnType)) { - $result .= GenerateSVGContextAssignment($implClassName, $return, $indent); + $result .= GenerateSVGContextAssignment($implClassName, $return . ".get()", $indent); $generatedSVGContextRetrieval = 1; } @@ -1547,8 +1547,9 @@ sub GenerateFunctionCallString() if ($returnsPodType) { my $classIndex = uc($returnType); - $result .= $indent . "return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, wrapper);\n"; + $result .= $indent . "return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, wrapper.release());\n"; } else { + $return .= ".release()" if (IsRefPtrType($returnType)); $result .= $indent . ReturnNativeToJSValue($function->signature, $return, $indent) . ";\n"; } @@ -1688,7 +1689,6 @@ sub GetNativeType return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType"; return "DOMTimeStamp" if $type eq "DOMTimeStamp"; return "unsigned" if $type eq "unsigned int"; - return "unsigned" if $type eq "RGBColor"; return "Node*" if $type eq "EventTarget" and $isParameter; return "String" if $type eq "DOMUserData"; # FIXME: Temporary hack? @@ -1828,7 +1828,7 @@ sub JSValueToNative $implIncludes{"V8Node.h"} = 1; # EventTarget is not in DOM hierarchy, but all Nodes are EventTarget. - return "V8Node::HasInstance($value) ? V8DOMWrapper::convertDOMWrapperToNode<Node>($value) : 0"; + return "V8Node::HasInstance($value) ? V8DOMWrapper::convertDOMWrapperToNode<Node>(v8::Handle<v8::Object>::Cast($value)) : 0"; } AddIncludesForType($type); @@ -1839,7 +1839,7 @@ sub JSValueToNative # Perform type checks on the parameter, if it is expected Node type, # return NULL. - return "V8${type}::HasInstance($value) ? V8DOMWrapper::convertDOMWrapperToNode<${type}>($value) : 0"; + return "V8${type}::HasInstance($value) ? V8DOMWrapper::convertDOMWrapperToNode<${type}>(v8::Handle<v8::Object>::Cast($value)) : 0"; } else { # TODO: Temporary to avoid Window name conflict. my $classIndex = uc($type); @@ -1858,7 +1858,7 @@ sub JSValueToNative # Perform type checks on the parameter, if it is expected Node type, # return NULL. - return "V8${type}::HasInstance($value) ? V8DOMWrapper::convertToNativeObject<${implClassName}>(V8ClassIndex::${classIndex}, $value) : 0"; + return "V8${type}::HasInstance($value) ? V8DOMWrapper::convertToNativeObject<${implClassName}>(V8ClassIndex::${classIndex}, v8::Handle<v8::Object>::Cast($value)) : 0"; } } @@ -2028,13 +2028,12 @@ sub ReturnNativeToJSValue return "return V8DOMWrapper::convertEventListenerToV8Object($value)"; } - if ($type eq "RGBColor") { - my $construct = "RefPtr<RGBColor> rgbcolor = RGBColor::create($value);\n"; - my $convert = "V8DOMWrapper::convertToV8Object(V8ClassIndex::RGBCOLOR, WTF::getPtr(rgbcolor))"; - return $construct . $indent . "return " . $convert; + if ($type eq "DedicatedWorkerContext" or $type eq "WorkerContext") { + $implIncludes{"WorkerContextExecutionProxy.h"} = 1; + return "return WorkerContextExecutionProxy::WorkerContextToV8Object($value)"; } - if ($type eq "WorkerContext" or $type eq "WorkerLocation" or $type eq "WorkerNavigator") { + if ($type eq "WorkerLocation" or $type eq "WorkerNavigator") { $implIncludes{"WorkerContextExecutionProxy.h"} = 1; my $classIndex = uc($type); @@ -2044,6 +2043,7 @@ sub ReturnNativeToJSValue else { $implIncludes{"wtf/RefCounted.h"} = 1; $implIncludes{"wtf/RefPtr.h"} = 1; + $implIncludes{"wtf/GetPtr.h"} = 1; my $classIndex = uc($type); if (IsPodType($type)) { @@ -2062,7 +2062,7 @@ sub GenerateSVGStaticPodTypeWrapper { $implIncludes{"V8SVGPODTypeWrapper.h"} = 1; my $nativeType = GetNativeType($type); - return "new V8SVGStaticPODTypeWrapper<$nativeType>($value)"; + return "V8SVGStaticPODTypeWrapper<$nativeType>::create($value)"; } # Internal helper @@ -2122,7 +2122,7 @@ sub GenerateSVGContextAssignment my $indent = shift; $result = GenerateSVGContextRetrieval($srcType, $indent); - $result .= $indent . "V8Proxy::setSVGContext($value, context);\n"; + $result .= $indent . "V8Proxy::setSVGContext($value, context);\n"; return $result; } diff --git a/src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp b/src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp index 3258c54d60..006f17f3a3 100644 --- a/src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp @@ -110,7 +110,7 @@ bool _NPN_InvokeDefault(NPP, NPObject* o, const NPVariant* args, uint32_t argCou return false; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); // Call the function object. JSValue function = obj->imp; @@ -161,7 +161,7 @@ bool _NPN_Invoke(NPP npp, NPObject* o, NPIdentifier methodName, const NPVariant* if (!rootObject || !rootObject->isValid()) return false; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSValue function = obj->imp->get(exec, identifierFromNPIdentifier(i->string())); CallData callData; CallType callType = function.getCallData(callData); @@ -199,7 +199,7 @@ bool _NPN_Evaluate(NPP, NPObject* o, NPString* s, NPVariant* variant) return false; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); String scriptString = convertNPStringToUTF16(s); ProtectedPtr<JSGlobalObject> globalObject = rootObject->globalObject(); globalObject->globalData()->timeoutChecker.start(); @@ -236,7 +236,7 @@ bool _NPN_GetProperty(NPP, NPObject* o, NPIdentifier propertyName, NPVariant* va ExecState* exec = rootObject->globalObject()->globalExec(); IdentifierRep* i = static_cast<IdentifierRep*>(propertyName); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSValue result; if (i->isString()) result = obj->imp->get(exec, identifierFromNPIdentifier(i->string())); @@ -268,7 +268,7 @@ bool _NPN_SetProperty(NPP, NPObject* o, NPIdentifier propertyName, const NPVaria return false; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); IdentifierRep* i = static_cast<IdentifierRep*>(propertyName); if (i->isString()) { @@ -309,7 +309,7 @@ bool _NPN_RemoveProperty(NPP, NPObject* o, NPIdentifier propertyName) } } - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); if (i->isString()) obj->imp->deleteProperty(exec, identifierFromNPIdentifier(i->string())); else @@ -332,7 +332,7 @@ bool _NPN_HasProperty(NPP, NPObject* o, NPIdentifier propertyName) ExecState* exec = rootObject->globalObject()->globalExec(); IdentifierRep* i = static_cast<IdentifierRep*>(propertyName); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); if (i->isString()) { bool result = obj->imp->hasProperty(exec, identifierFromNPIdentifier(i->string())); exec->clearException(); @@ -364,7 +364,7 @@ bool _NPN_HasMethod(NPP, NPObject* o, NPIdentifier methodName) return false; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSValue func = obj->imp->get(exec, identifierFromNPIdentifier(i->string())); exec->clearException(); return !func.isUndefined(); @@ -393,7 +393,7 @@ bool _NPN_Enumerate(NPP, NPObject* o, NPIdentifier** identifier, uint32_t* count return false; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PropertyNameArray propertyNames(exec); obj->imp->getPropertyNames(exec, propertyNames); @@ -430,7 +430,7 @@ bool _NPN_Construct(NPP, NPObject* o, const NPVariant* args, uint32_t argCount, return false; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); // Call the constructor object. JSValue constructor = obj->imp; diff --git a/src/3rdparty/webkit/WebCore/bridge/c/c_class.cpp b/src/3rdparty/webkit/WebCore/bridge/c/c_class.cpp index 7ce9927fbc..e8499cbb60 100644 --- a/src/3rdparty/webkit/WebCore/bridge/c/c_class.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/c/c_class.cpp @@ -44,7 +44,7 @@ CClass::CClass(NPClass* aClass) CClass::~CClass() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); deleteAllValues(_methods); _methods.clear(); @@ -86,7 +86,7 @@ MethodList CClass::methodsNamed(const Identifier& identifier, Instance* instance if (_isa->hasMethod && _isa->hasMethod(obj, ident)){ Method* aMethod = new CMethod(ident); // deleted in the CClass destructor { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _methods.set(identifier.ustring().rep(), aMethod); } methodList.append(aMethod); @@ -107,7 +107,7 @@ Field* CClass::fieldNamed(const Identifier& identifier, Instance* instance) cons if (_isa->hasProperty && _isa->hasProperty(obj, ident)){ aField = new CField(ident); // deleted in the CClass destructor { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _fields.set(identifier.ustring().rep(), aField); } } diff --git a/src/3rdparty/webkit/WebCore/bridge/c/c_instance.cpp b/src/3rdparty/webkit/WebCore/bridge/c/c_instance.cpp index 71f6c2ff8c..fcdd166231 100644 --- a/src/3rdparty/webkit/WebCore/bridge/c/c_instance.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/c/c_instance.cpp @@ -70,7 +70,7 @@ void CInstance::moveGlobalExceptionToExecState(ExecState* exec) return; { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); throwError(exec, GeneralError, globalExceptionString()); } @@ -125,7 +125,7 @@ JSValue CInstance::invokeMethod(ExecState* exec, const MethodList& methodList, c VOID_TO_NPVARIANT(resultVariant); { - JSLock::DropAllLocks dropAllLocks(false); + JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); ASSERT(globalExceptionString().isNull()); _object->_class->invoke(_object, ident, cArgs.data(), count, &resultVariant); moveGlobalExceptionToExecState(exec); @@ -156,7 +156,7 @@ JSValue CInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args) NPVariant resultVariant; VOID_TO_NPVARIANT(resultVariant); { - JSLock::DropAllLocks dropAllLocks(false); + JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); ASSERT(globalExceptionString().isNull()); _object->_class->invokeDefault(_object, cArgs.data(), count, &resultVariant); moveGlobalExceptionToExecState(exec); @@ -191,7 +191,7 @@ JSValue CInstance::invokeConstruct(ExecState* exec, const ArgList& args) NPVariant resultVariant; VOID_TO_NPVARIANT(resultVariant); { - JSLock::DropAllLocks dropAllLocks(false); + JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); ASSERT(globalExceptionString().isNull()); _object->_class->construct(_object, cArgs.data(), count, &resultVariant); moveGlobalExceptionToExecState(exec); @@ -247,7 +247,7 @@ void CInstance::getPropertyNames(ExecState* exec, PropertyNameArray& nameArray) NPIdentifier* identifiers; { - JSLock::DropAllLocks dropAllLocks(false); + JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); ASSERT(globalExceptionString().isNull()); bool ok = _object->_class->enumerate(_object, &identifiers, &count); moveGlobalExceptionToExecState(exec); diff --git a/src/3rdparty/webkit/WebCore/bridge/c/c_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/c/c_runtime.cpp index 6beb86c6b8..e9a7bb644f 100644 --- a/src/3rdparty/webkit/WebCore/bridge/c/c_runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/c/c_runtime.cpp @@ -47,7 +47,7 @@ JSValue CField::valueFromInstance(ExecState* exec, const Instance* inst) const bool result; { - JSLock::DropAllLocks dropAllLocks(false); + JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); result = obj->_class->getProperty(obj, _fieldIdentifier, &property); } if (result) { @@ -68,7 +68,7 @@ void CField::setValueToInstance(ExecState *exec, const Instance *inst, JSValue a convertValueToNPVariant(exec, aValue, &variant); { - JSLock::DropAllLocks dropAllLocks(false); + JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); obj->_class->setProperty(obj, _fieldIdentifier, &variant); } diff --git a/src/3rdparty/webkit/WebCore/bridge/c/c_utility.cpp b/src/3rdparty/webkit/WebCore/bridge/c/c_utility.cpp index 77b5de20b0..7ff77e73de 100644 --- a/src/3rdparty/webkit/WebCore/bridge/c/c_utility.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/c/c_utility.cpp @@ -68,7 +68,7 @@ static String convertUTF8ToUTF16WithLatin1Fallback(const NPUTF8* UTF8Chars, int // Variant value must be released with NPReleaseVariantValue() void convertValueToNPVariant(ExecState* exec, JSValue value, NPVariant* result) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); VOID_TO_NPVARIANT(*result); @@ -107,7 +107,7 @@ void convertValueToNPVariant(ExecState* exec, JSValue value, NPVariant* result) JSValue convertNPVariantToValue(ExecState* exec, const NPVariant* variant, RootObject* rootObject) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); NPVariantType type = variant->type; diff --git a/src/3rdparty/webkit/WebCore/bridge/jni/jni_class.cpp b/src/3rdparty/webkit/WebCore/bridge/jni/jni_class.cpp index 87750aa2af..012b0476dc 100644 --- a/src/3rdparty/webkit/WebCore/bridge/jni/jni_class.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/jni/jni_class.cpp @@ -60,7 +60,7 @@ JavaClass::JavaClass(jobject anInstance) jobject aJField = env->GetObjectArrayElement((jobjectArray)fields, i); JavaField *aField = new JavaField(env, aJField); // deleted in the JavaClass destructor { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _fields.set(aField->name(), aField); } env->DeleteLocalRef(aJField); @@ -74,7 +74,7 @@ JavaClass::JavaClass(jobject anInstance) JavaMethod *aMethod = new JavaMethod(env, aJMethod); // deleted in the JavaClass destructor MethodList* methodList; { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); methodList = _methods.get(aMethod->name()); if (!methodList) { @@ -90,7 +90,7 @@ JavaClass::JavaClass(jobject anInstance) JavaClass::~JavaClass() { free((void *)_name); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); deleteAllValues(_fields); _fields.clear(); diff --git a/src/3rdparty/webkit/WebCore/bridge/jni/jni_instance.cpp b/src/3rdparty/webkit/WebCore/bridge/jni/jni_instance.cpp index 88d79efcb6..2ef0c1da9e 100644 --- a/src/3rdparty/webkit/WebCore/bridge/jni/jni_instance.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/jni/jni_instance.cpp @@ -82,7 +82,7 @@ Class *JavaInstance::getClass() const JSValue JavaInstance::stringValue(ExecState* exec) const { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); jstring stringValue = (jstring)callJNIMethod<jobject>(_instance->_instance, "toString", "()Ljava/lang/String;"); JNIEnv *env = getJNIEnv(); diff --git a/src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm b/src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm index 32d7b0d253..c9af8b0cd9 100644 --- a/src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm +++ b/src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm @@ -290,7 +290,7 @@ jobject JavaJSObject::call(jstring methodName, jobjectArray args) const // Lookup the function object. ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); Identifier identifier(exec, JavaString(methodName)); JSValue function = _imp->get(exec, identifier); @@ -315,7 +315,7 @@ jobject JavaJSObject::eval(jstring script) const JSValue result; - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); RootObject* rootObject = this->rootObject(); if (!rootObject) @@ -346,7 +346,7 @@ jobject JavaJSObject::getMember(jstring memberName) const ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSValue result = _imp->get(exec, Identifier(exec, JavaString(memberName))); return convertValueToJObject(result); @@ -362,7 +362,7 @@ void JavaJSObject::setMember(jstring memberName, jobject value) const ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); PutPropertySlot slot; _imp->put(exec, Identifier(exec, JavaString(memberName)), convertJObjectToValue(exec, value), slot); } @@ -377,7 +377,7 @@ void JavaJSObject::removeMember(jstring memberName) const return; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _imp->deleteProperty(exec, Identifier(exec, JavaString(memberName))); } @@ -396,7 +396,7 @@ jobject JavaJSObject::getSlot(jint index) const ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSValue result = _imp->get(exec, index); return convertValueToJObject(result); @@ -416,7 +416,7 @@ void JavaJSObject::setSlot(jint index, jobject value) const return; ExecState* exec = rootObject->globalObject()->globalExec(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _imp->put(exec, (unsigned)index, convertJObjectToValue(exec, value)); } @@ -429,7 +429,7 @@ jstring JavaJSObject::toString() const if (!rootObject) return 0; - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSObject *thisObj = const_cast<JSObject*>(_imp); ExecState* exec = rootObject->globalObject()->globalExec(); @@ -487,7 +487,7 @@ jlong JavaJSObject::createNative(jlong nativeHandle) jobject JavaJSObject::convertValueToJObject(JSValue value) const { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); RootObject* rootObject = this->rootObject(); if (!rootObject) @@ -600,7 +600,7 @@ JSValue JavaJSObject::convertJObjectToValue(ExecState* exec, jobject theObject) return imp; } - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return JavaInstance::create(theObject, _rootObject)->createRuntimeObject(exec); } diff --git a/src/3rdparty/webkit/WebCore/bridge/jni/jni_objc.mm b/src/3rdparty/webkit/WebCore/bridge/jni/jni_objc.mm index 7c194423d5..0306bfd117 100644 --- a/src/3rdparty/webkit/WebCore/bridge/jni/jni_objc.mm +++ b/src/3rdparty/webkit/WebCore/bridge/jni/jni_objc.mm @@ -61,7 +61,7 @@ bool JSC::Bindings::dispatchJNICall(ExecState* exec, const void* targetAppletVie // implemented in WebCore will guarantee that only appropriate JavaScript // can reference the applet. { - JSLock::DropAllLocks dropAllLocks(false); + JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); result = [view webPlugInCallJava:obj isStatic:isStatic returnType:returnType method:methodID arguments:args callingURL:nil exceptionDescription:&_exceptionDescription]; } @@ -71,7 +71,7 @@ bool JSC::Bindings::dispatchJNICall(ExecState* exec, const void* targetAppletVie return true; } else if ([view respondsToSelector:@selector(webPlugInCallJava:method:returnType:arguments:)]) { - JSLock::DropAllLocks dropAllLocks(false); + JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); result = [view webPlugInCallJava:obj method:methodID returnType:returnType arguments:args]; return true; } diff --git a/src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.cpp index 3cbe8cfdb1..cc48037419 100644 --- a/src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.cpp @@ -316,7 +316,7 @@ static void appendClassName(UString& aString, const char* className) const char *JavaMethod::signature() const { if (!_signature) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); UString signatureBuilder("("); for (int i = 0; i < _numParameters; i++) { diff --git a/src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.h b/src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.h index f3cbf2bce4..81484ff372 100644 --- a/src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.h +++ b/src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.h @@ -46,7 +46,7 @@ class JavaString public: JavaString() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _rep = UString().rep(); } @@ -55,7 +55,7 @@ public: int _size = e->GetStringLength (s); const jchar *uc = getUCharactersFromJStringInEnv (e, s); { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _rep = UString(reinterpret_cast<const UChar*>(uc), _size).rep(); } releaseUCharactersForJStringInEnv (e, s, uc); @@ -71,13 +71,13 @@ public: ~JavaString() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _rep = 0; } const char *UTF8String() const { if (_utf8String.c_str() == 0) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); _utf8String = UString(_rep).UTF8String(); } return _utf8String.c_str(); diff --git a/src/3rdparty/webkit/WebCore/bridge/jni/jni_utility.cpp b/src/3rdparty/webkit/WebCore/bridge/jni/jni_utility.cpp index f8a27893a3..86075c933b 100644 --- a/src/3rdparty/webkit/WebCore/bridge/jni/jni_utility.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/jni/jni_utility.cpp @@ -470,7 +470,7 @@ static jobject convertArrayInstanceToJavaArray(ExecState* exec, JSArray* jsArray jvalue convertValueToJValue(ExecState* exec, JSValue value, JNIType _JNIType, const char* javaClassName) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); jvalue result; diff --git a/src/3rdparty/webkit/WebCore/bridge/npapi.h b/src/3rdparty/webkit/WebCore/bridge/npapi.h index 1904a87094..07fed86b50 100644 --- a/src/3rdparty/webkit/WebCore/bridge/npapi.h +++ b/src/3rdparty/webkit/WebCore/bridge/npapi.h @@ -114,6 +114,14 @@ /* Definition of Basic Types */ /*----------------------------------------------------------------------*/ +/* QNX sets the _INT16 and friends defines, but does not typedef the types */ +#ifdef __QNXNTO__ +#undef _UINT16 +#undef _INT16 +#undef _UINT32 +#undef _INT32 +#endif + #ifndef _UINT16 #define _UINT16 typedef unsigned short uint16; @@ -341,8 +349,6 @@ typedef enum { */ NPPVpluginWantsAllNetworkStreams = 18, - NPPVpluginPrivateModeBool = 19, - /* Checks to see if the plug-in would like the browser to load the "src" attribute. */ NPPVpluginCancelSrcStream = 20, diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp index 3ea8bcfda7..506697a5a2 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp @@ -91,7 +91,7 @@ void QtRuntimeObjectImp::invalidate() void QtRuntimeObjectImp::removeFromCache() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); QtInstance* key = cachedObjects.key(this); if (key) cachedObjects.remove(key); @@ -110,7 +110,7 @@ QtInstance::QtInstance(QObject* o, PassRefPtr<RootObject> rootObject, QScriptEng QtInstance::~QtInstance() { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); cachedObjects.remove(this); cachedInstances.remove(m_hashkey); @@ -118,9 +118,7 @@ QtInstance::~QtInstance() // clean up (unprotect from gc) the JSValues we've created m_methods.clear(); - foreach(QtField* f, m_fields.values()) { - delete f; - } + qDeleteAll(m_fields); m_fields.clear(); if (m_object) { @@ -140,7 +138,7 @@ QtInstance::~QtInstance() PassRefPtr<QtInstance> QtInstance::getQtInstance(QObject* o, PassRefPtr<RootObject> rootObject, QScriptEngine::ValueOwnership ownership) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); foreach(QtInstance* instance, cachedInstances.values(o)) { if (instance->rootObject() == rootObject) @@ -163,6 +161,19 @@ void QtInstance::put(JSObject* object, ExecState* exec, const Identifier& proper object->JSObject::put(exec, propertyName, value, slot); } +void QtInstance::removeCachedMethod(JSObject* method) +{ + if (m_defaultMethod == method) + m_defaultMethod = 0; + + for(QHash<QByteArray, JSObject*>::Iterator it = m_methods.begin(), + end = m_methods.end(); it != end; ++it) + if (it.value() == method) { + m_methods.erase(it); + return; + } +} + QtInstance* QtInstance::getInstance(JSObject* object) { if (!object) @@ -181,7 +192,7 @@ Class* QtInstance::getClass() const RuntimeObjectImp* QtInstance::createRuntimeObject(ExecState* exec) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); RuntimeObjectImp* ret = static_cast<RuntimeObjectImp*>(cachedObjects.value(this)); if (!ret) { ret = new (exec) QtRuntimeObjectImp(exec, this); @@ -193,16 +204,12 @@ RuntimeObjectImp* QtInstance::createRuntimeObject(ExecState* exec) void QtInstance::mark() { - if (m_defaultMethod) + if (m_defaultMethod && !m_defaultMethod->marked()) m_defaultMethod->mark(); foreach(JSObject* val, m_methods.values()) { if (val && !val->marked()) val->mark(); } - foreach(JSValue val, m_children.values()) { - if (val && !val.marked()) - val.mark(); - } } void QtInstance::begin() @@ -355,13 +362,7 @@ JSValue QtField::valueFromInstance(ExecState* exec, const Instance* inst) const else if (m_type == DynamicProperty) val = obj->property(m_dynamicProperty); - JSValue ret = convertQVariantToValue(exec, inst->rootObject(), val); - - // Need to save children so we can mark them - if (m_type == ChildObject) - instance->m_children.insert(ret); - - return ret; + return convertQVariantToValue(exec, inst->rootObject(), val); } else { QString msg = QString(QLatin1String("cannot access member `%1' of deleted QObject")).arg(QLatin1String(name())); return throwError(exec, GeneralError, msg.toLatin1().constData()); diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.h b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.h index 590fadfd33..23766b138c 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.h +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.h @@ -65,6 +65,8 @@ public: virtual bool getOwnPropertySlot(JSObject*, ExecState*, const Identifier&, PropertySlot&); virtual void put(JSObject*, ExecState*, const Identifier&, JSValue, PutPropertySlot&); + void removeCachedMethod(JSObject*); + static QtInstance* getInstance(JSObject*); private: @@ -81,7 +83,6 @@ private: QObject* m_hashkey; mutable QHash<QByteArray, JSObject*> m_methods; mutable QHash<QString, QtField*> m_fields; - mutable QSet<JSValue> m_children; mutable QtRuntimeMetaMethod* m_defaultMethod; QScriptEngine::ValueOwnership m_ownership; }; diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp index aabd677042..6be119ced1 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp @@ -167,7 +167,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type return QVariant(); } - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSRealType type = valueRealType(exec, value); if (hint == QMetaType::Void) { switch(type) { @@ -770,7 +770,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con return jsNull(); } - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); if (type == QMetaType::Bool) return jsBoolean(variant.toBool()); @@ -916,6 +916,8 @@ QtRuntimeMethod::QtRuntimeMethod(QtRuntimeMethodData* dd, ExecState* exec, const QtRuntimeMethod::~QtRuntimeMethod() { + QW_D(QtRuntimeMethod); + d->m_instance->removeCachedMethod(this); delete d_ptr; } @@ -1345,7 +1347,7 @@ JSValue QtRuntimeMetaMethod::call(ExecState* exec, JSObject* functionObject, JSV return jsUndefined(); // We have to pick a method that matches.. - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); QObject *obj = d->m_instance->getObject(); if (obj) { @@ -1438,7 +1440,7 @@ JSValue QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionObjec { QtRuntimeConnectionMethodData* d = static_cast<QtRuntimeConnectionMethod *>(functionObject)->d_func(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); QObject* sender = d->m_instance->getObject(); @@ -1668,7 +1670,7 @@ void QtConnectionObject::execute(void **argv) int argc = parameterTypes.count(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); // ### Should the Interpreter/ExecState come from somewhere else? RefPtr<RootObject> ro = m_instance->rootObject(); diff --git a/src/3rdparty/webkit/WebCore/bridge/runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/runtime.cpp index d6b69621a9..6934406642 100644 --- a/src/3rdparty/webkit/WebCore/bridge/runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/runtime.cpp @@ -80,7 +80,7 @@ void Instance::end() RuntimeObjectImp* Instance::createRuntimeObject(ExecState* exec) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return new (exec) RuntimeObjectImp(exec, this); } diff --git a/src/3rdparty/webkit/WebCore/bridge/runtime.h b/src/3rdparty/webkit/WebCore/bridge/runtime.h index 72736d4f32..2f74a4e031 100644 --- a/src/3rdparty/webkit/WebCore/bridge/runtime.h +++ b/src/3rdparty/webkit/WebCore/bridge/runtime.h @@ -55,14 +55,14 @@ public: virtual ~Field() { } }; -class Method : Noncopyable { +class Method : public Noncopyable { public: virtual int numParameters() const = 0; virtual ~Method() { } }; -class Class : Noncopyable { +class Class : public Noncopyable { public: virtual MethodList methodsNamed(const Identifier&, Instance*) const = 0; virtual Field* fieldNamed(const Identifier&, Instance*) const = 0; @@ -120,7 +120,7 @@ protected: RefPtr<RootObject> _rootObject; }; -class Array : Noncopyable { +class Array : public Noncopyable { public: Array(PassRefPtr<RootObject>); virtual ~Array(); diff --git a/src/3rdparty/webkit/WebCore/config.h b/src/3rdparty/webkit/WebCore/config.h index 0700adfa6b..411ddb10d7 100644 --- a/src/3rdparty/webkit/WebCore/config.h +++ b/src/3rdparty/webkit/WebCore/config.h @@ -107,9 +107,20 @@ #endif #if PLATFORM(WIN) +#if defined(WIN_CAIRO) +#undef WTF_PLATFORM_CG +#define WTF_PLATFORM_CAIRO 1 +#undef WTF_USE_CFNETWORK +#define WTF_USE_CURL 1 +#ifndef _WINSOCKAPI_ +#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h +#endif +#else #define WTF_PLATFORM_CG 1 #undef WTF_PLATFORM_CAIRO #define WTF_USE_CFNETWORK 1 +#undef WTF_USE_CURL +#endif #undef WTF_USE_WININET #define WTF_PLATFORM_CF 1 #define WTF_USE_PTHREADS 0 diff --git a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp index b721f70154..476ed1e508 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp @@ -52,8 +52,10 @@ namespace WebCore { // List of all properties we know how to compute, omitting shorthands. static const int computedProperties[] = { CSSPropertyBackgroundAttachment, + CSSPropertyBackgroundClip, CSSPropertyBackgroundColor, CSSPropertyBackgroundImage, + CSSPropertyBackgroundOrigin, CSSPropertyBackgroundPosition, // more-specific background-position-x/y are non-standard CSSPropertyBackgroundRepeat, CSSPropertyBorderBottomColor, @@ -70,6 +72,7 @@ static const int computedProperties[] = { CSSPropertyBorderTopStyle, CSSPropertyBorderTopWidth, CSSPropertyBottom, + CSSPropertyBoxShadow, CSSPropertyCaptionSide, CSSPropertyClear, CSSPropertyClip, @@ -122,6 +125,7 @@ static const int computedProperties[] = { CSSPropertyTextDecoration, CSSPropertyTextIndent, CSSPropertyTextShadow, + CSSPropertyTextOverflow, CSSPropertyTextTransform, CSSPropertyTop, CSSPropertyUnicodeBidi, @@ -165,7 +169,6 @@ static const int computedProperties[] = { CSSPropertyWebkitBoxOrient, CSSPropertyWebkitBoxPack, CSSPropertyWebkitBoxReflect, - CSSPropertyWebkitBoxShadow, CSSPropertyWebkitBoxSizing, CSSPropertyWebkitColumnBreakAfter, CSSPropertyWebkitColumnBreakBefore, @@ -261,7 +264,7 @@ static const int computedProperties[] = { const unsigned numComputedProperties = sizeof(computedProperties) / sizeof(computedProperties[0]); -static PassRefPtr<CSSValue> valueForShadow(const ShadowData* shadow) +static PassRefPtr<CSSValue> valueForShadow(const ShadowData* shadow, CSSPropertyID propertyID) { if (!shadow) return CSSPrimitiveValue::createIdentifier(CSSValueNone); @@ -271,8 +274,10 @@ static PassRefPtr<CSSValue> valueForShadow(const ShadowData* shadow) RefPtr<CSSPrimitiveValue> x = CSSPrimitiveValue::create(s->x, CSSPrimitiveValue::CSS_PX); RefPtr<CSSPrimitiveValue> y = CSSPrimitiveValue::create(s->y, CSSPrimitiveValue::CSS_PX); RefPtr<CSSPrimitiveValue> blur = CSSPrimitiveValue::create(s->blur, CSSPrimitiveValue::CSS_PX); + RefPtr<CSSPrimitiveValue> spread = propertyID == CSSPropertyTextShadow ? 0 : CSSPrimitiveValue::create(s->spread, CSSPrimitiveValue::CSS_PX); + RefPtr<CSSPrimitiveValue> style = propertyID == CSSPropertyTextShadow || s->style == Normal ? 0 : CSSPrimitiveValue::createIdentifier(CSSValueInset); RefPtr<CSSPrimitiveValue> color = CSSPrimitiveValue::createColor(s->color.rgb()); - list->prepend(ShadowValue::create(x.release(), y.release(), blur.release(), color.release())); + list->prepend(ShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release())); } return list.release(); } @@ -596,6 +601,23 @@ static PassRefPtr<CSSPrimitiveValue> valueForFamily(const AtomicString& family) return CSSPrimitiveValue::create(family.string(), CSSPrimitiveValue::CSS_STRING); } +static PassRefPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int textDecoration) +{ + RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); + if (textDecoration & UNDERLINE) + list->append(CSSPrimitiveValue::createIdentifier(CSSValueUnderline)); + if (textDecoration & OVERLINE) + list->append(CSSPrimitiveValue::createIdentifier(CSSValueOverline)); + if (textDecoration & LINE_THROUGH) + list->append(CSSPrimitiveValue::createIdentifier(CSSValueLineThrough)); + if (textDecoration & BLINK) + list->append(CSSPrimitiveValue::createIdentifier(CSSValueBlink)); + + if (!list->length()) + return CSSPrimitiveValue::createIdentifier(CSSValueNone); + return list; +} + PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int propertyID, EUpdateLayout updateLayout) const { Node* node = m_node.get(); @@ -637,12 +659,12 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case CSSPropertyWebkitBackgroundComposite: return CSSPrimitiveValue::create(style->backgroundComposite()); case CSSPropertyBackgroundAttachment: - if (style->backgroundAttachment()) - return CSSPrimitiveValue::createIdentifier(CSSValueScroll); - return CSSPrimitiveValue::createIdentifier(CSSValueFixed); + return CSSPrimitiveValue::create(style->backgroundAttachment()); + case CSSPropertyBackgroundClip: + case CSSPropertyBackgroundOrigin: case CSSPropertyWebkitBackgroundClip: case CSSPropertyWebkitBackgroundOrigin: { - EFillBox box = (propertyID == CSSPropertyWebkitBackgroundClip ? style->backgroundClip() : style->backgroundOrigin()); + EFillBox box = (propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyBackgroundClip) ? style->backgroundClip() : style->backgroundOrigin(); return CSSPrimitiveValue::create(box); } case CSSPropertyBackgroundPosition: { @@ -721,8 +743,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper } case CSSPropertyWebkitBoxReflect: return valueForReflection(style->boxReflect()); - case CSSPropertyWebkitBoxShadow: - return valueForShadow(style->boxShadow()); + case CSSPropertyBoxShadow: + return valueForShadow(style->boxShadow(), static_cast<CSSPropertyID>(propertyID)); case CSSPropertyCaptionSide: return CSSPrimitiveValue::create(style->captionSide()); case CSSPropertyClear: @@ -905,9 +927,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case CSSPropertyWebkitMaskRepeat: return CSSPrimitiveValue::create(style->maskRepeat()); case CSSPropertyWebkitMaskAttachment: - if (style->maskAttachment()) - return CSSPrimitiveValue::createIdentifier(CSSValueScroll); - return CSSPrimitiveValue::createIdentifier(CSSValueFixed); + return CSSPrimitiveValue::create(style->maskAttachment()); case CSSPropertyWebkitMaskComposite: return CSSPrimitiveValue::create(style->maskComposite()); case CSSPropertyWebkitMaskClip: @@ -998,58 +1018,20 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper return CSSPrimitiveValue::create(style->tableLayout()); case CSSPropertyTextAlign: return CSSPrimitiveValue::create(style->textAlign()); - case CSSPropertyTextDecoration: { - String string; - if (style->textDecoration() & UNDERLINE) - string += "underline"; - if (style->textDecoration() & OVERLINE) { - if (string.length()) - string += " "; - string += "overline"; - } - if (style->textDecoration() & LINE_THROUGH) { - if (string.length()) - string += " "; - string += "line-through"; - } - if (style->textDecoration() & BLINK) { - if (string.length()) - string += " "; - string += "blink"; - } - if (!string.length()) - return CSSPrimitiveValue::createIdentifier(CSSValueNone); - return CSSPrimitiveValue::create(string, CSSPrimitiveValue::CSS_STRING); - } - case CSSPropertyWebkitTextDecorationsInEffect: { - String string; - if (style->textDecorationsInEffect() & UNDERLINE) - string += "underline"; - if (style->textDecorationsInEffect() & OVERLINE) { - if (string.length()) - string += " "; - string += "overline"; - } - if (style->textDecorationsInEffect() & LINE_THROUGH) { - if (string.length()) - string += " "; - string += "line-through"; - } - if (style->textDecorationsInEffect() & BLINK) { - if (string.length()) - string += " "; - string += "blink"; - } - if (!string.length()) - return CSSPrimitiveValue::createIdentifier(CSSValueNone); - return CSSPrimitiveValue::create(string, CSSPrimitiveValue::CSS_STRING); - } + case CSSPropertyTextDecoration: + return renderTextDecorationFlagsToCSSValue(style->textDecoration()); + case CSSPropertyWebkitTextDecorationsInEffect: + return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect()); case CSSPropertyWebkitTextFillColor: return currentColorOrValidColor(style.get(), style->textFillColor()); case CSSPropertyTextIndent: return CSSPrimitiveValue::create(style->textIndent()); case CSSPropertyTextShadow: - return valueForShadow(style->textShadow()); + return valueForShadow(style->textShadow(), static_cast<CSSPropertyID>(propertyID)); + case CSSPropertyTextOverflow: + if (style->textOverflow()) + return CSSPrimitiveValue::createIdentifier(CSSValueEllipsis); + return CSSPrimitiveValue::createIdentifier(CSSValueClip); case CSSPropertyWebkitTextSecurity: return CSSPrimitiveValue::create(style->textSecurity()); case CSSPropertyWebkitTextSizeAdjust: @@ -1331,7 +1313,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case CSSPropertyTextLineThroughMode: case CSSPropertyTextLineThroughStyle: case CSSPropertyTextLineThroughWidth: - case CSSPropertyTextOverflow: case CSSPropertyTextOverline: case CSSPropertyTextOverlineColor: case CSSPropertyTextOverlineMode: @@ -1471,11 +1452,6 @@ static const int inheritableProperties[] = { static const unsigned numInheritableProperties = sizeof(inheritableProperties) / sizeof(inheritableProperties[0]); -void CSSComputedStyleDeclaration::removeComputedInheritablePropertiesFrom(CSSMutableStyleDeclaration* declaration) -{ - declaration->removePropertiesInSet(inheritableProperties, numInheritableProperties); -} - bool CSSComputedStyleDeclaration::cssPropertyMatches(const CSSProperty* property) const { if (property->id() == CSSPropertyFontSize && property->value()->isPrimitiveValue() && m_node) { @@ -1492,7 +1468,11 @@ bool CSSComputedStyleDeclaration::cssPropertyMatches(const CSSProperty* property return CSSStyleDeclaration::cssPropertyMatches(property); } -PassRefPtr<CSSMutableStyleDeclaration> CSSComputedStyleDeclaration::copyInheritableProperties() const +// FIXME: deprecatedCopyInheritableProperties is used for two purposes: +// 1. Calculating the typing style. +// 2. Moving HTML subtrees and seeking to remove redundant styles. +// These tasks should be broken out into two separate functions. New code should not use this function. +PassRefPtr<CSSMutableStyleDeclaration> CSSComputedStyleDeclaration::deprecatedCopyInheritableProperties() const { RefPtr<CSSMutableStyleDeclaration> style = copyPropertiesInSet(inheritableProperties, numInheritableProperties); if (style && m_node && m_node->computedStyle()) { diff --git a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h index 6f81b0ebd3..5d3ccc198c 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h +++ b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h @@ -55,10 +55,7 @@ public: PassRefPtr<CSSValue> getSVGPropertyCSSValue(int propertyID, EUpdateLayout) const; #endif - PassRefPtr<CSSMutableStyleDeclaration> copyInheritableProperties() const; - - static void removeComputedInheritablePropertiesFrom(CSSMutableStyleDeclaration*); - + PassRefPtr<CSSMutableStyleDeclaration> deprecatedCopyInheritableProperties() const; protected: virtual bool cssPropertyMatches(const CSSProperty*) const; diff --git a/src/3rdparty/webkit/WebCore/css/CSSFunctionValue.cpp b/src/3rdparty/webkit/WebCore/css/CSSFunctionValue.cpp index cb938ed250..0fc260dbbc 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSFunctionValue.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSFunctionValue.cpp @@ -53,6 +53,7 @@ CSSParserValue CSSFunctionValue::parserValue() const { CSSParserValue val; val.id = 0; + val.isInt = false; val.unit = CSSParserValue::Function; val.function = new CSSParserFunction; val.function->name.characters = const_cast<UChar*>(m_name.characters()); diff --git a/src/3rdparty/webkit/WebCore/css/CSSGrammar.y b/src/3rdparty/webkit/WebCore/css/CSSGrammar.y index 4706521aa4..22c7014c41 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSGrammar.y +++ b/src/3rdparty/webkit/WebCore/css/CSSGrammar.y @@ -36,12 +36,16 @@ #include "MediaList.h" #include "WebKitCSSKeyframeRule.h" #include "WebKitCSSKeyframesRule.h" +#include <wtf/FastMalloc.h> #include <stdlib.h> #include <string.h> using namespace WebCore; using namespace HTMLNames; +#define YYMALLOC fastMalloc +#define YYFREE fastFree + #define YYENABLE_NLS 0 #define YYLTYPE_IS_TRIVIAL 1 #define YYMAXDEPTH 10000 @@ -93,7 +97,7 @@ static int cssyylex(YYSTYPE* yylval, void* parser) %} -%expect 49 +%expect 50 %nonassoc LOWEST_PREC @@ -145,6 +149,7 @@ static int cssyylex(YYSTYPE* yylval, void* parser) %token MEDIA_NOT %token MEDIA_AND +%token <number> REMS %token <number> QEMS %token <number> EMS %token <number> EXS @@ -1407,7 +1412,15 @@ unary_term: | EMS maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_EMS; } | QEMS maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSParserValue::Q_EMS; } | EXS maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_EXS; } - ; + | REMS maybe_space { + $$.id = 0; + $$.fValue = $1; + $$.unit = CSSPrimitiveValue::CSS_REMS; + CSSParser* p = static_cast<CSSParser*>(parser); + if (Document* doc = p->document()) + doc->setUsesRemUnits(true); + } + ; variable_reference: VARCALL { diff --git a/src/3rdparty/webkit/WebCore/css/CSSHelper.cpp b/src/3rdparty/webkit/WebCore/css/CSSHelper.cpp index aa1186ccaa..8e6f3a0df1 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSHelper.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSHelper.cpp @@ -27,7 +27,7 @@ namespace WebCore { -String parseURL(const String& url) +String deprecatedParseURL(const String& url) { StringImpl* i = url.impl(); if (!i) diff --git a/src/3rdparty/webkit/WebCore/css/CSSHelper.h b/src/3rdparty/webkit/WebCore/css/CSSHelper.h index 7f32d88f37..2e3337720c 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSHelper.h +++ b/src/3rdparty/webkit/WebCore/css/CSSHelper.h @@ -1,7 +1,6 @@ /* - * This file is part of the CSS implementation for KDE. - * * Copyright (C) 1999 Lars Knoll (knoll@kde.org) + * Copyright (C) 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,15 +26,17 @@ namespace WebCore { class String; - /* - * mostly just removes the url("...") brace - */ - String parseURL(const String& url); + // Used in many inappropriate contexts throughout WebCore. We'll have to examine and test + // each call site to find out whether it needs the various things this function does. That + // includes trimming leading and trailing control characters (including whitespace), removing + // url() or URL() if it surrounds the entire string, removing matching quote marks if present, + // and stripping all characters in the range U+0000-U+000C. Probably no caller needs this. + String deprecatedParseURL(const String&); // We always assume 96 CSS pixels in a CSS inch. This is the cold hard truth of the Web. // At high DPI, we may scale a CSS pixel, but the ratio of the CSS pixel to the so-called // "absolute" CSS length units like inch and pt is always fixed and never changes. - const float cssPixelsPerInch = 96.0f; + const float cssPixelsPerInch = 96; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/css/CSSMutableStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/css/CSSMutableStyleDeclaration.cpp index 67b7da177d..8ff5300d46 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSMutableStyleDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSMutableStyleDeclaration.cpp @@ -116,8 +116,8 @@ String CSSMutableStyleDeclaration::getPropertyValue(int propertyID) const } case CSSPropertyBackground: { const int properties[7] = { CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeat, - CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition, CSSPropertyWebkitBackgroundClip, - CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundColor }; + CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition, CSSPropertyBackgroundClip, + CSSPropertyBackgroundOrigin, CSSPropertyBackgroundColor }; return getLayeredShorthandValue(properties, 7); } case CSSPropertyBorder: { diff --git a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp index b49b64641a..411379e1c2 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp @@ -1,7 +1,7 @@ /* * Copyright (C) 2003 Lars Knoll (knoll@kde.org) * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) - * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> * Copyright (C) 2008 Eric Seidel <eric@webkit.org> * @@ -283,7 +283,7 @@ bool CSSParser::parseColor(RGBA32& color, const String& string, bool strict) CSSValue* value = parser.m_parsedProperties[0]->value(); if (value->cssValueType() == CSSValue::CSS_PRIMITIVE_VALUE) { CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value); - color = primitiveValue->getRGBColorValue(); + color = primitiveValue->getRGBA32Value(); } } else return false; @@ -424,6 +424,7 @@ bool CSSParser::validUnit(CSSParserValue* value, Units unitflags, bool strict) break; case CSSParserValue::Q_EMS: case CSSPrimitiveValue::CSS_EMS: + case CSSPrimitiveValue::CSS_REMS: case CSSPrimitiveValue::CSS_EXS: case CSSPrimitiveValue::CSS_PX: case CSSPrimitiveValue::CSS_CM: @@ -459,6 +460,8 @@ static int unitFromString(CSSParserValue* value) if (equal(value->string, "em")) return CSSPrimitiveValue::CSS_EMS; + if (equal(value->string, "rem")) + return CSSPrimitiveValue::CSS_REMS; if (equal(value->string, "ex")) return CSSPrimitiveValue::CSS_EXS; if (equal(value->string, "px")) @@ -810,7 +813,7 @@ bool CSSParser::parseValue(int propId, bool important) while (value && value->unit == CSSPrimitiveValue::CSS_URI) { if (!list) list = CSSValueList::createCommaSeparated(); - String uri = parseURL(value->string); + String uri = value->string; Vector<int> coords; value = m_valueList->next(); while (value && value->unit == CSSPrimitiveValue::CSS_NUMBER) { @@ -819,15 +822,17 @@ bool CSSParser::parseValue(int propId, bool important) } IntPoint hotspot; int nrcoords = coords.size(); - if (nrcoords > 0 && nrcoords != 2) { - if (m_strict) // only support hotspot pairs in strict mode - return false; - } else if (m_strict && nrcoords == 2) + if (nrcoords > 0 && nrcoords != 2) + return false; + if (nrcoords == 2) hotspot = IntPoint(coords[0], coords[1]); - if (m_strict || coords.size() == 0) { - if (!uri.isNull() && m_styleSheet) - list->append(CSSCursorImageValue::create(m_styleSheet->completeURL(uri), hotspot)); + + if (!uri.isNull() && m_styleSheet) { + // FIXME: The completeURL call should be done when using the CSSCursorImageValue, + // not when creating it. + list->append(CSSCursorImageValue::create(m_styleSheet->completeURL(uri), hotspot)); } + if ((m_strict && !value) || (value && !(value->unit == CSSParserValue::Operator && value->iValue == ','))) return false; value = m_valueList->next(); // comma @@ -854,9 +859,11 @@ bool CSSParser::parseValue(int propId, bool important) } case CSSPropertyBackgroundAttachment: + case CSSPropertyBackgroundClip: case CSSPropertyWebkitBackgroundClip: case CSSPropertyWebkitBackgroundComposite: case CSSPropertyBackgroundImage: + case CSSPropertyBackgroundOrigin: case CSSPropertyWebkitBackgroundOrigin: case CSSPropertyBackgroundPosition: case CSSPropertyBackgroundPositionX: @@ -889,10 +896,10 @@ bool CSSParser::parseValue(int propId, bool important) parsedValue = CSSImageValue::create(); m_valueList->next(); } else if (value->unit == CSSPrimitiveValue::CSS_URI) { - // ### allow string in non strict mode? - String uri = parseURL(value->string); - if (!uri.isNull() && m_styleSheet) { - parsedValue = CSSImageValue::create(m_styleSheet->completeURL(uri)); + if (m_styleSheet) { + // FIXME: The completeURL call should be done when using the CSSImageValue, + // not when creating it. + parsedValue = CSSImageValue::create(m_styleSheet->completeURL(value->string)); m_valueList->next(); } } else if (value->unit == CSSParserValue::Function && equalIgnoringCase(value->function->name, "-webkit-gradient(")) { @@ -1047,7 +1054,7 @@ bool CSSParser::parseValue(int propId, bool important) if (id == CSSValueNone) { valid_primitive = true; } else { - RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); + RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); bool is_valid = true; while (is_valid && value) { switch (value->id) { @@ -1104,8 +1111,9 @@ bool CSSParser::parseValue(int propId, bool important) RefPtr<CSSValue> parsedValue; while ((val = m_valueList->current())) { if (val->unit == CSSPrimitiveValue::CSS_URI && m_styleSheet) { - String value = parseURL(val->string); - parsedValue = CSSPrimitiveValue::create(m_styleSheet->completeURL(value), CSSPrimitiveValue::CSS_URI); + // FIXME: The completeURL call should be done when using the CSSPrimitiveValue, + // not when creating it. + parsedValue = CSSPrimitiveValue::create(m_styleSheet->completeURL(val->string), CSSPrimitiveValue::CSS_URI); } if (!parsedValue) break; @@ -1177,7 +1185,7 @@ bool CSSParser::parseValue(int propId, bool important) valid_primitive = validUnit(value, FLength, m_strict); break; case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3 - case CSSPropertyWebkitBoxShadow: + case CSSPropertyBoxShadow: if (id == CSSValueNone) valid_primitive = true; else @@ -1501,15 +1509,15 @@ bool CSSParser::parseValue(int propId, bool important) // in quirks mode but it's usually the X coordinate of a position. // FIXME: Add CSSPropertyWebkitBackgroundSize to the shorthand. const int properties[] = { CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeat, - CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition, CSSPropertyWebkitBackgroundClip, - CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundColor }; - return parseFillShorthand(propId, properties, 7, important); + CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition, CSSPropertyBackgroundOrigin, + CSSPropertyBackgroundColor }; + return parseFillShorthand(propId, properties, 6, important); } case CSSPropertyWebkitMask: { const int properties[] = { CSSPropertyWebkitMaskImage, CSSPropertyWebkitMaskRepeat, - CSSPropertyWebkitMaskAttachment, CSSPropertyWebkitMaskPosition, CSSPropertyWebkitMaskClip, + CSSPropertyWebkitMaskAttachment, CSSPropertyWebkitMaskPosition, CSSPropertyWebkitMaskOrigin }; - return parseFillShorthand(propId, properties, 6, important); + return parseFillShorthand(propId, properties, 5, important); } case CSSPropertyBorder: // [ 'border-width' || 'border-style' || <color> ] | inherit @@ -1641,6 +1649,8 @@ bool CSSParser::parseValue(int propId, bool important) parsedValue = CSSPrimitiveValue::create(value->string, (CSSPrimitiveValue::UnitTypes) value->unit); else if (value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ) parsedValue = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes) value->unit); + else if (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS) + parsedValue = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes) value->unit); else if (value->unit >= CSSParserValue::Q_EMS) parsedValue = CSSQuirkPrimitiveValue::create(value->fValue, CSSPrimitiveValue::CSS_EMS); m_valueList->next(); @@ -1683,6 +1693,7 @@ bool CSSParser::parseFillShorthand(int propId, const int* properties, int numPro bool parsedProperty[cMaxFillProperties] = { false }; RefPtr<CSSValue> values[cMaxFillProperties]; + RefPtr<CSSValue> clipValue; RefPtr<CSSValue> positionYValue; int i; @@ -1701,6 +1712,10 @@ bool CSSParser::parseFillShorthand(int propId, const int* properties, int numPro addFillValue(values[i], CSSInitialValue::createImplicit()); if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition) addFillValue(positionYValue, CSSInitialValue::createImplicit()); + if ((properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) && !parsedProperty[i]) { + // If background-origin wasn't present, then reset background-clip also. + addFillValue(clipValue, CSSInitialValue::createImplicit()); + } } parsedProperty[i] = false; } @@ -1719,6 +1734,13 @@ bool CSSParser::parseFillShorthand(int propId, const int* properties, int numPro addFillValue(values[i], val1.release()); if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition) addFillValue(positionYValue, val2.release()); + if (properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) { + // Reparse the value as a clip, and see if we succeed. + if (parseFillProperty(CSSPropertyBackgroundClip, propId1, propId2, val1, val2)) + addFillValue(clipValue, val1.release()); // The property parsed successfully. + else + addFillValue(clipValue, CSSInitialValue::createImplicit()); // Some value was used for origin that is not supported by clip. Just reset clip instead. + } } } } @@ -1735,6 +1757,10 @@ bool CSSParser::parseFillShorthand(int propId, const int* properties, int numPro addFillValue(values[i], CSSInitialValue::createImplicit()); if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition) addFillValue(positionYValue, CSSInitialValue::createImplicit()); + if ((properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) && !parsedProperty[i]) { + // If background-origin wasn't present, then reset background-clip also. + addFillValue(clipValue, CSSInitialValue::createImplicit()); + } } } @@ -1750,8 +1776,14 @@ bool CSSParser::parseFillShorthand(int propId, const int* properties, int numPro addProperty(CSSPropertyWebkitMaskPositionY, positionYValue.release(), important); } else addProperty(properties[i], values[i].release(), important); + + // Add in clip values when we hit the corresponding origin property. + if (properties[i] == CSSPropertyBackgroundOrigin) + addProperty(CSSPropertyBackgroundClip, clipValue.release(), important); + else if (properties[i] == CSSPropertyWebkitMaskOrigin) + addProperty(CSSPropertyWebkitMaskClip, clipValue.release(), important); } - + return true; } @@ -2000,8 +2032,9 @@ bool CSSParser::parseContent(int propId, bool important) RefPtr<CSSValue> parsedValue; if (val->unit == CSSPrimitiveValue::CSS_URI && m_styleSheet) { // url - String value = parseURL(val->string); - parsedValue = CSSImageValue::create(m_styleSheet->completeURL(value)); + // FIXME: The completeURL call should be done when using the CSSImageValue, + // not when creating it. + parsedValue = CSSImageValue::create(m_styleSheet->completeURL(val->string)); } else if (val->unit == CSSParserValue::Function) { // attr(X) | counter(X [,Y]) | counters(X, Y, [,Z]) | -webkit-gradient(...) CSSParserValueList* args = val->function->args; @@ -2090,9 +2123,10 @@ bool CSSParser::parseFillImage(RefPtr<CSSValue>& value) return true; } if (m_valueList->current()->unit == CSSPrimitiveValue::CSS_URI) { - String uri = parseURL(m_valueList->current()->string); - if (!uri.isNull() && m_styleSheet) - value = CSSImageValue::create(m_styleSheet->completeURL(uri)); + // FIXME: The completeURL call should be done when using the CSSImageValue, + // not when creating it. + if (m_styleSheet) + value = CSSImageValue::create(m_styleSheet->completeURL(m_valueList->current()->string)); return true; } @@ -2102,6 +2136,7 @@ bool CSSParser::parseFillImage(RefPtr<CSSValue>& value) if (equalIgnoringCase(m_valueList->current()->function->name, "-webkit-canvas(")) return parseCanvas(value); } + return false; } @@ -2246,7 +2281,7 @@ bool CSSParser::parseFillProperty(int propId, int& propId1, int& propId2, break; case CSSPropertyBackgroundAttachment: case CSSPropertyWebkitMaskAttachment: - if (val->id == CSSValueScroll || val->id == CSSValueFixed) { + if (val->id == CSSValueScroll || val->id == CSSValueFixed || val->id == CSSValueLocal) { currValue = CSSPrimitiveValue::createIdentifier(val->id); m_valueList->next(); } @@ -2260,10 +2295,24 @@ bool CSSParser::parseFillProperty(int propId, int& propId1, int& propId2, case CSSPropertyWebkitBackgroundOrigin: case CSSPropertyWebkitMaskClip: case CSSPropertyWebkitMaskOrigin: - // The first three values here are deprecated and should not be allowed to apply when we drop the -webkit- - // from the property names. + // The first three values here are deprecated and do not apply to the version of the property that has + // the -webkit- prefix removed. if (val->id == CSSValueBorder || val->id == CSSValuePadding || val->id == CSSValueContent || - val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox || val->id == CSSValueText) { + val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox || + ((propId == CSSPropertyWebkitBackgroundClip || propId == CSSPropertyWebkitMaskClip) && + (val->id == CSSValueText || val->id == CSSValueWebkitText))) { + currValue = CSSPrimitiveValue::createIdentifier(val->id); + m_valueList->next(); + } + break; + case CSSPropertyBackgroundClip: + if (val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueWebkitText) { + currValue = CSSPrimitiveValue::createIdentifier(val->id); + m_valueList->next(); + } + break; + case CSSPropertyBackgroundOrigin: + if (val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox) { currValue = CSSPrimitiveValue::createIdentifier(val->id); m_valueList->next(); } @@ -3143,8 +3192,9 @@ bool CSSParser::parseFontFaceSrc() while ((val = m_valueList->current())) { RefPtr<CSSFontFaceSrcValue> parsedValue; if (val->unit == CSSPrimitiveValue::CSS_URI && !expectComma && m_styleSheet) { - String value = parseURL(val->string); - parsedValue = CSSFontFaceSrcValue::create(m_styleSheet->completeURL(value)); + // FIXME: The completeURL call should be done when using the CSSFontFaceSrcValue, + // not when creating it. + parsedValue = CSSFontFaceSrcValue::create(m_styleSheet->completeURL(val->string)); uriValue = parsedValue; allowFormat = true; expectComma = true; @@ -3429,31 +3479,46 @@ bool CSSParser::parseColorFromValue(CSSParserValue* value, RGBA32& c, bool svg) // This class tracks parsing state for shadow values. If it goes out of scope (e.g., due to an early return) // without the allowBreak bit being set, then it will clean up all of the objects and destroy them. struct ShadowParseContext { - ShadowParseContext() - : allowX(true) - , allowY(false) - , allowBlur(false) - , allowColor(true) - , allowBreak(true) - {} + ShadowParseContext(CSSPropertyID prop) + : property(prop) + , allowX(true) + , allowY(false) + , allowBlur(false) + , allowSpread(false) + , allowColor(true) + , allowStyle(prop == CSSPropertyBoxShadow) + , allowBreak(true) + { + } - bool allowLength() { return allowX || allowY || allowBlur; } + bool allowLength() { return allowX || allowY || allowBlur || allowSpread; } void commitValue() { // Handle the ,, case gracefully by doing nothing. - if (x || y || blur || color) { + if (x || y || blur || spread || color || style) { if (!values) values = CSSValueList::createCommaSeparated(); - + // Construct the current shadow value and add it to the list. - values->append(ShadowValue::create(x.release(), y.release(), blur.release(), color.release())); + values->append(ShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release())); } - + // Now reset for the next shadow value. - x = y = blur = color = 0; - allowX = allowColor = allowBreak = true; - allowY = allowBlur = false; + x = 0; + y = 0; + blur = 0; + spread = 0; + style = 0; + color = 0; + + allowX = true; + allowColor = true; + allowBreak = true; + allowY = false; + allowBlur = false; + allowSpread = false; + allowStyle = property == CSSPropertyBoxShadow; } void commitLength(CSSParserValue* v) @@ -3462,15 +3527,25 @@ struct ShadowParseContext { if (allowX) { x = val.release(); - allowX = false; allowY = true; allowColor = false; allowBreak = false; - } - else if (allowY) { + allowX = false; + allowY = true; + allowColor = false; + allowStyle = false; + allowBreak = false; + } else if (allowY) { y = val.release(); - allowY = false; allowBlur = true; allowColor = true; allowBreak = true; - } - else if (allowBlur) { + allowY = false; + allowBlur = true; + allowColor = true; + allowStyle = property == CSSPropertyBoxShadow; + allowBreak = true; + } else if (allowBlur) { blur = val.release(); allowBlur = false; + allowSpread = property == CSSPropertyBoxShadow; + } else if (allowSpread) { + spread = val.release(); + allowSpread = false; } } @@ -3478,28 +3553,51 @@ struct ShadowParseContext { { color = val; allowColor = false; + if (allowX) { + allowStyle = false; + allowBreak = false; + } else { + allowBlur = false; + allowSpread = false; + allowStyle = property == CSSPropertyBoxShadow; + } + } + + void commitStyle(CSSParserValue* v) + { + style = CSSPrimitiveValue::createIdentifier(v->id); + allowStyle = false; if (allowX) allowBreak = false; - else + else { allowBlur = false; + allowSpread = false; + allowColor = false; + } } - + + CSSPropertyID property; + RefPtr<CSSValueList> values; RefPtr<CSSPrimitiveValue> x; RefPtr<CSSPrimitiveValue> y; RefPtr<CSSPrimitiveValue> blur; + RefPtr<CSSPrimitiveValue> spread; + RefPtr<CSSPrimitiveValue> style; RefPtr<CSSPrimitiveValue> color; bool allowX; bool allowY; bool allowBlur; + bool allowSpread; bool allowColor; + bool allowStyle; bool allowBreak; }; bool CSSParser::parseShadow(int propId, bool important) { - ShadowParseContext context; + ShadowParseContext context(static_cast<CSSPropertyID>(propId)); CSSParserValue* val; while ((val = m_valueList->current())) { // Check for a comma break first. @@ -3511,17 +3609,19 @@ bool CSSParser::parseShadow(int propId, bool important) // The value is good. Commit it. context.commitValue(); - } - // Check to see if we're a length. - else if (validUnit(val, FLength, true)) { + } else if (validUnit(val, FLength, true)) { // We required a length and didn't get one. Invalid. if (!context.allowLength()) return false; // A length is allowed here. Construct the value and add it. context.commitLength(val); - } - else { + } else if (val->id == CSSValueInset) { + if (!context.allowStyle) + return false; + + context.commitStyle(val); + } else { // The only other type of value that's ok is a color value. RefPtr<CSSPrimitiveValue> parsedColor; bool isColor = ((val->id >= CSSValueAqua && val->id <= CSSValueWindowtext) || val->id == CSSValueMenu || @@ -3542,7 +3642,7 @@ bool CSSParser::parseShadow(int propId, bool important) context.commitColor(parsedColor.release()); } - + m_valueList->next(); } @@ -3554,7 +3654,7 @@ bool CSSParser::parseShadow(int propId, bool important) return true; } } - + return false; } @@ -3749,11 +3849,10 @@ bool CSSParser::parseBorderImage(int propId, bool important, RefPtr<CSSValue>& r // Look for an image initially. If the first value is not a URI, then we're done. BorderImageParseContext context; CSSParserValue* val = m_valueList->current(); - if (val->unit == CSSPrimitiveValue::CSS_URI && m_styleSheet) { - String uri = parseURL(val->string); - if (uri.isNull()) - return false; - context.commitImage(CSSImageValue::create(m_styleSheet->completeURL(uri))); + if (val->unit == CSSPrimitiveValue::CSS_URI && m_styleSheet) { + // FIXME: The completeURL call should be done when using the CSSImageValue, + // not when creating it. + context.commitImage(CSSImageValue::create(m_styleSheet->completeURL(val->string))); } else if (val->unit == CSSParserValue::Function) { RefPtr<CSSValue> value; if ((equalIgnoringCase(val->function->name, "-webkit-gradient(") && parseGradient(value)) || @@ -4339,6 +4438,7 @@ int CSSParser::lex(void* yylvalWithoutType) case DEGS: case RADS: case KHERZ: + case REMS: length--; case MSECS: case HERZ: @@ -4366,15 +4466,9 @@ int CSSParser::lex(void* yylvalWithoutType) return token; } -static inline int toHex(char c) +static inline bool isCSSWhitespace(UChar c) { - if ('0' <= c && c <= '9') - return c - '0'; - if ('a' <= c && c <= 'f') - return c - 'a' + 10; - if ('A' <= c && c<= 'F') - return c - 'A' + 10; - return 0; + return c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\f'; } UChar* CSSParser::text(int *length) @@ -4393,27 +4487,21 @@ UChar* CSSParser::text(int *length) case URI: // "url("{w}{string}{w}")" // "url("{w}{url}{w}")" - // strip "url(" and ")" start += 4; l -= 5; // strip {w} - while (l && - (*start == ' ' || *start == '\t' || *start == '\r' || - *start == '\n' || *start == '\f')) { - start++; l--; - } - if (*start == '"' || *start == '\'') { - start++; l--; + while (l && isCSSWhitespace(*start)) { + ++start; + --l; } - while (l && - (start[l-1] == ' ' || start[l-1] == '\t' || start[l-1] == '\r' || - start[l-1] == '\n' || start[l-1] == '\f')) { - l--; + while (l && isCSSWhitespace(start[l - 1])) + --l; + if (l && (*start == '"' || *start == '\'')) { + ASSERT(l >= 2 && start[l - 1] == *start); + ++start; + l -= 2; } - if (l && (start[l-1] == '\"' || start[l-1] == '\'')) - l--; - break; case VARCALL: // "-webkit-var("{w}{ident}{w}")" @@ -4421,16 +4509,13 @@ UChar* CSSParser::text(int *length) start += 12; l -= 13; // strip {w} - while (l && - (*start == ' ' || *start == '\t' || *start == '\r' || - *start == '\n' || *start == '\f')) { - start++; l--; - } - while (l && - (start[l-1] == ' ' || start[l-1] == '\t' || start[l-1] == '\r' || - start[l-1] == '\n' || start[l-1] == '\f')) { - l--; + while (l && isCSSWhitespace(*start)) { + ++start; + --l; } + while (l && isCSSWhitespace(start[l - 1])) + --l; + break; default: break; } @@ -4442,9 +4527,7 @@ UChar* CSSParser::text(int *length) for (int i = 0; i < l; i++) { UChar* current = start + i; if (escape == current - 1) { - if ((*current >= '0' && *current <= '9') || - (*current >= 'a' && *current <= 'f') || - (*current >= 'A' && *current <= 'F')) + if (isASCIIHexDigit(*current)) continue; if (yyTok == STRING && (*current == '\n' || *current == '\r' || *current == '\f')) { @@ -4464,10 +4547,7 @@ UChar* CSSParser::text(int *length) escape = 0; continue; } - if (escape > current - 7 && - ((*current >= '0' && *current <= '9') || - (*current >= 'a' && *current <= 'f') || - (*current >= 'A' && *current <= 'F'))) + if (escape > current - 7 && isASCIIHexDigit(*current)) continue; if (escape) { // add escaped char @@ -4475,7 +4555,7 @@ UChar* CSSParser::text(int *length) escape++; while (escape < current) { uc *= 16; - uc += toHex(*escape); + uc += toASCIIHexValue(*escape); escape++; } // can't handle chars outside ucs2 @@ -4483,11 +4563,7 @@ UChar* CSSParser::text(int *length) uc = 0xfffd; *out++ = uc; escape = 0; - if (*current == ' ' || - *current == '\t' || - *current == '\r' || - *current == '\n' || - *current == '\f') + if (isCSSWhitespace(*current)) continue; } if (!escape && *current == '\\') { @@ -4502,7 +4578,7 @@ UChar* CSSParser::text(int *length) escape++; while (escape < start+l) { uc *= 16; - uc += toHex(*escape); + uc += toASCIIHexValue(*escape); escape++; } // can't handle chars outside ucs2 @@ -4900,12 +4976,19 @@ static int cssPropertyID(const UChar* propertyName, unsigned length) ++length; } - // Honor -webkit-opacity as a synonym for opacity. - // This was the only syntax that worked in Safari 1.1, and may be in use on some websites and widgets. - if (strcmp(buffer, "-webkit-opacity") == 0) { - const char * const opacity = "opacity"; - name = opacity; - length = strlen(opacity); + if (hasPrefix(buffer, length, "-webkit")) { + if (strcmp(buffer, "-webkit-opacity") == 0) { + // Honor -webkit-opacity as a synonym for opacity. + // This was the only syntax that worked in Safari 1.1, and may be in use on some websites and widgets. + const char* const opacity = "opacity"; + name = opacity; + length = strlen(opacity); + } else if (strcmp(buffer, "-webkit-box-shadow") == 0) { + // CSS Backgrounds/Borders. -webkit-box-shadow worked in Safari 4 and earlier. + const char* const boxShadow = "box-shadow"; + name = boxShadow; + length = strlen(boxShadow); + } } } diff --git a/src/3rdparty/webkit/WebCore/css/CSSParser.h b/src/3rdparty/webkit/WebCore/css/CSSParser.h index d47720fa3d..d4b92f52c9 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSParser.h +++ b/src/3rdparty/webkit/WebCore/css/CSSParser.h @@ -191,7 +191,6 @@ namespace WebCore { Vector<CSSSelector*>* reusableSelectorVector() { return &m_reusableSelectorVector; } - public: bool m_strict; bool m_important; int m_id; @@ -217,7 +216,6 @@ namespace WebCore { AtomicString m_defaultNamespace; // tokenizer methods and data - public: int lex(void* yylval); int token() { return yyTok; } UChar* text(int* length); diff --git a/src/3rdparty/webkit/WebCore/css/CSSParserValues.cpp b/src/3rdparty/webkit/WebCore/css/CSSParserValues.cpp index dbfae78396..55ecb7fdfe 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSParserValues.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSParserValues.cpp @@ -73,6 +73,8 @@ PassRefPtr<CSSValue> CSSParserValue::createCSSValue() parsedValue = CSSPrimitiveValue::create(string, (CSSPrimitiveValue::UnitTypes)unit); else if (unit >= CSSPrimitiveValue::CSS_NUMBER && unit <= CSSPrimitiveValue::CSS_KHZ) parsedValue = CSSPrimitiveValue::create(fValue, (CSSPrimitiveValue::UnitTypes)unit); + else if (unit >= CSSPrimitiveValue::CSS_TURN && unit <= CSSPrimitiveValue::CSS_REMS) // CSS3 Values and Units + parsedValue = CSSPrimitiveValue::create(fValue, (CSSPrimitiveValue::UnitTypes)unit); else if (unit >= CSSParserValue::Q_EMS) parsedValue = CSSQuirkPrimitiveValue::create(fValue, CSSPrimitiveValue::CSS_EMS); return parsedValue; diff --git a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.cpp b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.cpp index 15c5a014d6..6343dac758 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.cpp @@ -30,6 +30,7 @@ #include "ExceptionCode.h" #include "Node.h" #include "Pair.h" +#include "RGBColor.h" #include "Rect.h" #include "RenderStyle.h" #include <wtf/ASCIICType.h> @@ -318,9 +319,9 @@ void CSSPrimitiveValue::cleanup() m_type = 0; } -int CSSPrimitiveValue::computeLengthInt(RenderStyle* style) +int CSSPrimitiveValue::computeLengthInt(RenderStyle* style, RenderStyle* rootStyle) { - double result = computeLengthDouble(style); + double result = computeLengthDouble(style, rootStyle); // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We // need to go ahead and round if we're really close to the next integer value. @@ -331,9 +332,9 @@ int CSSPrimitiveValue::computeLengthInt(RenderStyle* style) return static_cast<int>(result); } -int CSSPrimitiveValue::computeLengthInt(RenderStyle* style, double multiplier) +int CSSPrimitiveValue::computeLengthInt(RenderStyle* style, RenderStyle* rootStyle, double multiplier) { - double result = computeLengthDouble(style, multiplier); + double result = computeLengthDouble(style, rootStyle, multiplier); // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We // need to go ahead and round if we're really close to the next integer value. @@ -348,9 +349,9 @@ const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int // Lengths expect an int that is only 28-bits, so we have to check for a different overflow. -int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle* style) +int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle* style, RenderStyle* rootStyle) { - double result = computeLengthDouble(style); + double result = computeLengthDouble(style, rootStyle); // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We // need to go ahead and round if we're really close to the next integer value. @@ -362,9 +363,9 @@ int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle* style) } // Lengths expect an int that is only 28-bits, so we have to check for a different overflow. -int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle* style, double multiplier) +int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier) { - double result = computeLengthDouble(style, multiplier); + double result = computeLengthDouble(style, rootStyle, multiplier); // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We // need to go ahead and round if we're really close to the next integer value. @@ -375,9 +376,9 @@ int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle* style, double mult return static_cast<int>(result); } -short CSSPrimitiveValue::computeLengthShort(RenderStyle* style) +short CSSPrimitiveValue::computeLengthShort(RenderStyle* style, RenderStyle* rootStyle) { - double result = computeLengthDouble(style); + double result = computeLengthDouble(style, rootStyle); // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We // need to go ahead and round if we're really close to the next integer value. @@ -388,9 +389,9 @@ short CSSPrimitiveValue::computeLengthShort(RenderStyle* style) return static_cast<short>(result); } -short CSSPrimitiveValue::computeLengthShort(RenderStyle* style, double multiplier) +short CSSPrimitiveValue::computeLengthShort(RenderStyle* style, RenderStyle* rootStyle, double multiplier) { - double result = computeLengthDouble(style, multiplier); + double result = computeLengthDouble(style, rootStyle, multiplier); // This conversion is imprecise, often resulting in values of, e.g., 44.99998. We // need to go ahead and round if we're really close to the next integer value. @@ -401,17 +402,17 @@ short CSSPrimitiveValue::computeLengthShort(RenderStyle* style, double multiplie return static_cast<short>(result); } -float CSSPrimitiveValue::computeLengthFloat(RenderStyle* style, bool computingFontSize) +float CSSPrimitiveValue::computeLengthFloat(RenderStyle* style, RenderStyle* rootStyle, bool computingFontSize) { - return static_cast<float>(computeLengthDouble(style, 1.0, computingFontSize)); + return static_cast<float>(computeLengthDouble(style, rootStyle, 1.0, computingFontSize)); } -float CSSPrimitiveValue::computeLengthFloat(RenderStyle* style, double multiplier, bool computingFontSize) +float CSSPrimitiveValue::computeLengthFloat(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) { - return static_cast<float>(computeLengthDouble(style, multiplier, computingFontSize)); + return static_cast<float>(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } -double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, double multiplier, bool computingFontSize) +double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) { unsigned short type = primitiveType(); @@ -434,6 +435,10 @@ double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, double multipl applyZoomMultiplier = false; factor = style->font().xHeight(); break; + case CSS_REMS: + applyZoomMultiplier = false; + factor = computingFontSize ? rootStyle->fontDescription().specifiedSize() : rootStyle->fontDescription().computedSize(); + break; case CSS_PX: break; case CSS_CM: @@ -638,7 +643,7 @@ Rect* CSSPrimitiveValue::getRectValue(ExceptionCode& ec) const return m_value.rect; } -unsigned CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const +RGBColor* CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const { ec = 0; if (m_type != CSS_RGBCOLOR) { @@ -646,7 +651,8 @@ unsigned CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const return 0; } - return m_value.rgbcolor; + // FIMXE: This should not return a new object for each invocation. + return RGBColor::create(m_value.rgbcolor).releaseRef(); } Pair* CSSPrimitiveValue::getPairValue(ExceptionCode& ec) const @@ -700,6 +706,9 @@ String CSSPrimitiveValue::cssText() const case CSS_EXS: text = String::format("%.6lgex", m_value.num); break; + case CSS_REMS: + text = String::format("%.6lgrem", m_value.num); + break; case CSS_PX: text = String::format("%.6lgpx", m_value.num); break; @@ -892,6 +901,7 @@ CSSParserValue CSSPrimitiveValue::parserValue() const case CSS_PERCENTAGE: case CSS_EMS: case CSS_EXS: + case CSS_REMS: case CSS_PX: case CSS_CM: case CSS_MM: diff --git a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h index 8abeb4d370..85a0ba339c 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h +++ b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h @@ -23,6 +23,7 @@ #define CSSPrimitiveValue_h #include "CSSValue.h" +#include "Color.h" #include <wtf/PassRefPtr.h> namespace WebCore { @@ -30,6 +31,7 @@ namespace WebCore { class Counter; class DashboardRegion; class Pair; +class RGBColor; class Rect; class RenderStyle; class StringImpl; @@ -78,11 +80,13 @@ public: // This is used internally for unknown identifiers CSS_PARSER_IDENTIFIER = 107, - // This unit is in CSS 3, but that isn't a finished standard yet - CSS_TURN = 108 + // These are from CSS3 Values and Units, but that isn't a finished standard yet + CSS_TURN = 108, + CSS_REMS = 109 }; - static bool isUnitTypeLength(int type) { return type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG; } + static bool isUnitTypeLength(int type) { return (type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG) || + type == CSSPrimitiveValue::CSS_REMS; } static PassRefPtr<CSSPrimitiveValue> createIdentifier(int ident); static PassRefPtr<CSSPrimitiveValue> createColor(unsigned rgbValue); @@ -112,15 +116,15 @@ public: * this is screen/printer dependent, so we probably need a config option for this, * and some tool to calibrate. */ - int computeLengthInt(RenderStyle*); - int computeLengthInt(RenderStyle*, double multiplier); - int computeLengthIntForLength(RenderStyle*); - int computeLengthIntForLength(RenderStyle*, double multiplier); - short computeLengthShort(RenderStyle*); - short computeLengthShort(RenderStyle*, double multiplier); - float computeLengthFloat(RenderStyle*, bool computingFontSize = false); - float computeLengthFloat(RenderStyle*, double multiplier, bool computingFontSize = false); - double computeLengthDouble(RenderStyle*, double multiplier = 1.0, bool computingFontSize = false); + int computeLengthInt(RenderStyle* currStyle, RenderStyle* rootStyle); + int computeLengthInt(RenderStyle* currStyle, RenderStyle* rootStyle, double multiplier); + int computeLengthIntForLength(RenderStyle* currStyle, RenderStyle* rootStyle); + int computeLengthIntForLength(RenderStyle* currStyle, RenderStyle* rootStyle, double multiplier); + short computeLengthShort(RenderStyle* currStyle, RenderStyle* rootStyle); + short computeLengthShort(RenderStyle* currStyle, RenderStyle* rootStyle, double multiplier); + float computeLengthFloat(RenderStyle* currStyle, RenderStyle* rootStyle, bool computingFontSize = false); + float computeLengthFloat(RenderStyle* currStyle, RenderStyle* rootStyle, double multiplier, bool computingFontSize = false); + double computeLengthDouble(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false); // use with care!!! void setPrimitiveType(unsigned short type) { m_type = type; } @@ -148,8 +152,8 @@ public: Rect* getRectValue(ExceptionCode&) const; Rect* getRectValue() const { return m_type != CSS_RECT ? 0 : m_value.rect; } - unsigned getRGBColorValue(ExceptionCode&) const; - unsigned getRGBColorValue() const { return m_type != CSS_RGBCOLOR ? 0 : m_value.rgbcolor; } + RGBColor* getRGBColorValue(ExceptionCode&) const; + RGBA32 getRGBA32Value() const { return m_type != CSS_RGBCOLOR ? 0 : m_value.rgbcolor; } Pair* getPairValue(ExceptionCode&) const; Pair* getPairValue() const { return m_type != CSS_PAIR ? 0 : m_value.pair; } diff --git a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h index 1dd2a2d789..69cfbb1cef 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h +++ b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h @@ -298,6 +298,37 @@ template<> inline CSSPrimitiveValue::operator ControlPart() const return ControlPart(m_value.ident - CSSValueCheckbox + 1); } +template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillAttachment e) + : m_type(CSS_IDENT) +{ + switch (e) { + case ScrollBackgroundAttachment: + m_value.ident = CSSValueScroll; + break; + case LocalBackgroundAttachment: + m_value.ident = CSSValueLocal; + break; + case FixedBackgroundAttachment: + m_value.ident = CSSValueFixed; + break; + } +} + +template<> inline CSSPrimitiveValue::operator EFillAttachment() const +{ + switch (m_value.ident) { + case CSSValueScroll: + return ScrollBackgroundAttachment; + case CSSValueLocal: + return LocalBackgroundAttachment; + case CSSValueFixed: + return FixedBackgroundAttachment; + default: + ASSERT_NOT_REACHED(); + return ScrollBackgroundAttachment; + } +} + template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillBox e) : m_type(CSS_IDENT) { diff --git a/src/3rdparty/webkit/WebCore/css/CSSPropertyLonghand.cpp b/src/3rdparty/webkit/WebCore/css/CSSPropertyLonghand.cpp index 310f90e6fc..a907235823 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSPropertyLonghand.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSPropertyLonghand.cpp @@ -128,10 +128,10 @@ static void initShorthandMap(ShorthandMap& shorthandMap) static const int backgroundProperties[] = { CSSPropertyBackgroundAttachment, - CSSPropertyWebkitBackgroundClip, + CSSPropertyBackgroundClip, CSSPropertyBackgroundColor, CSSPropertyBackgroundImage, - CSSPropertyWebkitBackgroundOrigin, + CSSPropertyBackgroundOrigin, CSSPropertyBackgroundPositionX, CSSPropertyBackgroundPositionY, CSSPropertyBackgroundRepeat, diff --git a/src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in b/src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in index df17d975a0..49b2c3c71f 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in +++ b/src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in @@ -10,8 +10,10 @@ background background-attachment +background-clip background-color background-image +background-origin background-position background-position-x background-position-y @@ -39,6 +41,7 @@ border-top-style border-top-width border-width bottom +box-shadow caption-side clear clip @@ -168,7 +171,6 @@ zoom -webkit-box-orient -webkit-box-pack -webkit-box-reflect --webkit-box-shadow -webkit-box-sizing -webkit-column-break-after -webkit-column-break-before diff --git a/src/3rdparty/webkit/WebCore/css/CSSSelector.cpp b/src/3rdparty/webkit/WebCore/css/CSSSelector.cpp index 5429c16f40..80910a773a 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSSelector.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSSelector.cpp @@ -117,6 +117,8 @@ void CSSSelector::extractPseudoType() const DEFINE_STATIC_LOCAL(AtomicString, notStr, ("not(")); DEFINE_STATIC_LOCAL(AtomicString, onlyChild, ("only-child")); DEFINE_STATIC_LOCAL(AtomicString, onlyOfType, ("only-of-type")); + DEFINE_STATIC_LOCAL(AtomicString, optional, ("optional")); + DEFINE_STATIC_LOCAL(AtomicString, required, ("required")); DEFINE_STATIC_LOCAL(AtomicString, resizer, ("-webkit-resizer")); DEFINE_STATIC_LOCAL(AtomicString, root, ("root")); DEFINE_STATIC_LOCAL(AtomicString, scrollbar, ("-webkit-scrollbar")); @@ -286,6 +288,10 @@ void CSSSelector::extractPseudoType() const m_pseudoType = PseudoSingleButton; else if (m_value == noButton) m_pseudoType = PseudoNoButton; + else if (m_value == optional) + m_pseudoType = PseudoOptional; + else if (m_value == required) + m_pseudoType = PseudoRequired; else if (m_value == scrollbarCorner) { element = true; m_pseudoType = PseudoScrollbarCorner; diff --git a/src/3rdparty/webkit/WebCore/css/CSSSelector.h b/src/3rdparty/webkit/WebCore/css/CSSSelector.h index b24f057e8c..18251fd4b1 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSSelector.h +++ b/src/3rdparty/webkit/WebCore/css/CSSSelector.h @@ -31,7 +31,7 @@ namespace WebCore { // this class represents a selector for a StyleRule - class CSSSelector : Noncopyable { + class CSSSelector : public Noncopyable { public: CSSSelector() : m_tag(anyQName()) @@ -128,6 +128,8 @@ namespace WebCore { PseudoFullPageMedia, PseudoDisabled, PseudoInputPlaceholder, + PseudoOptional, + PseudoRequired, PseudoReadOnly, PseudoReadWrite, PseudoIndeterminate, diff --git a/src/3rdparty/webkit/WebCore/css/CSSSelectorList.h b/src/3rdparty/webkit/WebCore/css/CSSSelectorList.h index 7a41fcf097..351813979d 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSSelectorList.h +++ b/src/3rdparty/webkit/WebCore/css/CSSSelectorList.h @@ -31,7 +31,7 @@ namespace WebCore { - class CSSSelectorList : Noncopyable { + class CSSSelectorList : public Noncopyable { public: CSSSelectorList() : m_selectorArray(0) { } ~CSSSelectorList(); diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp index d782d389f0..49e2c36141 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp @@ -2,7 +2,7 @@ * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) - * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) @@ -822,6 +822,10 @@ void CSSStyleSelector::initForStyleResolve(Element* e, RenderStyle* parentStyle, else m_parentStyle = m_parentNode ? m_parentNode->renderStyle() : 0; + Node* docElement = e ? e->document()->documentElement() : 0; + RenderStyle* docStyle = m_checker.m_document->renderStyle(); + m_rootElementStyle = docElement && e != docElement ? docElement->renderStyle() : docStyle; + m_style = 0; m_matchedDecls.clear(); @@ -2371,6 +2375,10 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme return false; return e->isTextFormControl() && !e->isReadOnlyFormControl(); } + case CSSSelector::PseudoOptional: + return e && e->isOptionalFormControl(); + case CSSSelector::PseudoRequired: + return e && e->isRequiredFormControl(); case CSSSelector::PseudoChecked: { if (!e || !e->isFormControlElement()) break; @@ -2753,7 +2761,7 @@ void CSSRuleSet::addRulesFromSheet(CSSStyleSheet* sheet, const MediaQueryEvaluat // ------------------------------------------------------------------------------------- // this is mostly boring stuff on how to apply a certain rule to the renderstyle... -static Length convertToLength(CSSPrimitiveValue *primitiveValue, RenderStyle *style, double multiplier = 1, bool *ok = 0) +static Length convertToLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1, bool *ok = 0) { // This function is tolerant of a null style value. The only place style is used is in // length measurements, like 'ems' and 'px'. And in those cases style is only used @@ -2765,11 +2773,11 @@ static Length convertToLength(CSSPrimitiveValue *primitiveValue, RenderStyle *st } else { int type = primitiveValue->primitiveType(); - if (!style && (type == CSSPrimitiveValue::CSS_EMS || type == CSSPrimitiveValue::CSS_EXS)) { + if (!style && (type == CSSPrimitiveValue::CSS_EMS || type == CSSPrimitiveValue::CSS_EXS || type == CSSPrimitiveValue::CSS_REMS)) { if (ok) *ok = false; } else if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style, multiplier), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style, rootStyle, multiplier), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); else if (type == CSSPrimitiveValue::CSS_NUMBER) @@ -2896,12 +2904,14 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) case CSSPropertyBackgroundAttachment: HANDLE_BACKGROUND_VALUE(attachment, Attachment, value) return; + case CSSPropertyBackgroundClip: case CSSPropertyWebkitBackgroundClip: HANDLE_BACKGROUND_VALUE(clip, Clip, value) return; case CSSPropertyWebkitBackgroundComposite: HANDLE_BACKGROUND_VALUE(composite, Composite, value) return; + case CSSPropertyBackgroundOrigin: case CSSPropertyWebkitBackgroundOrigin: HANDLE_BACKGROUND_VALUE(origin, Origin, value) return; @@ -3207,7 +3217,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) HANDLE_INHERIT_AND_INITIAL(horizontalBorderSpacing, HorizontalBorderSpacing) if (!primitiveValue) return; - short spacing = primitiveValue->computeLengthShort(style(), zoomFactor); + short spacing = primitiveValue->computeLengthShort(style(), m_rootElementStyle, zoomFactor); m_style->setHorizontalBorderSpacing(spacing); return; } @@ -3215,7 +3225,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) HANDLE_INHERIT_AND_INITIAL(verticalBorderSpacing, VerticalBorderSpacing) if (!primitiveValue) return; - short spacing = primitiveValue->computeLengthShort(style(), zoomFactor); + short spacing = primitiveValue->computeLengthShort(style(), m_rootElementStyle, zoomFactor); m_style->setVerticalBorderSpacing(spacing); return; } @@ -3390,7 +3400,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) width = 5; break; case CSSValueInvalid: - width = primitiveValue->computeLengthShort(style(), zoomFactor); + width = primitiveValue->computeLengthShort(style(), m_rootElementStyle, zoomFactor); break; default: return; @@ -3443,7 +3453,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) } else { if (!primitiveValue) return; - width = primitiveValue->computeLengthInt(style(), zoomFactor); + width = primitiveValue->computeLengthInt(style(), m_rootElementStyle, zoomFactor); } switch (id) { case CSSPropertyLetterSpacing: @@ -3570,7 +3580,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) // Handle our quirky margin units if we have them. - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed, + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed, primitiveValue->isQuirkValue()); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); @@ -3670,7 +3680,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) if (primitiveValue && !apply) { unsigned short type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); else @@ -3726,7 +3736,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) int type = primitiveValue->primitiveType(); Length l; if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); @@ -3788,9 +3798,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize || (type != CSSPrimitiveValue::CSS_PERCENTAGE && type != CSSPrimitiveValue::CSS_EMS && - type != CSSPrimitiveValue::CSS_EXS)); + type != CSSPrimitiveValue::CSS_EXS && + type != CSSPrimitiveValue::CSS_REMS)); if (CSSPrimitiveValue::isUnitTypeLength(type)) - size = primitiveValue->computeLengthFloat(m_parentStyle, true); + size = primitiveValue->computeLengthFloat(m_parentStyle, m_rootElementStyle, true); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) size = (primitiveValue->getFloatValue() * oldSize) / 100.0f; else @@ -3856,7 +3867,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) double multiplier = m_style->effectiveZoom(); if (m_style->textSizeAdjust() && m_checker.m_document->frame() && m_checker.m_document->frame()->shouldApplyTextZoom()) multiplier *= m_checker.m_document->frame()->textZoomFactor(); - lineHeight = Length(primitiveValue->computeLengthIntForLength(style(), multiplier), Fixed); + lineHeight = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, multiplier), Fixed); } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) lineHeight = Length((m_style->fontSize() * primitiveValue->getIntValue()) / 100, Fixed); else if (type == CSSPrimitiveValue::CSS_NUMBER) @@ -3910,10 +3921,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) Rect* rect = primitiveValue->getRectValue(); if (!rect) return; - top = convertToLength(rect->top(), style(), zoomFactor); - right = convertToLength(rect->right(), style(), zoomFactor); - bottom = convertToLength(rect->bottom(), style(), zoomFactor); - left = convertToLength(rect->left(), style(), zoomFactor); + top = convertToLength(rect->top(), style(), m_rootElementStyle, zoomFactor); + right = convertToLength(rect->right(), style(), m_rootElementStyle, zoomFactor); + bottom = convertToLength(rect->bottom(), style(), m_rootElementStyle, zoomFactor); + left = convertToLength(rect->left(), style(), m_rootElementStyle, zoomFactor); } else if (primitiveValue->getIdent() != CSSValueAuto) { return; } @@ -4474,8 +4485,8 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) if (!pair) return; - int width = pair->first()->computeLengthInt(style(), zoomFactor); - int height = pair->second()->computeLengthInt(style(), zoomFactor); + int width = pair->first()->computeLengthInt(style(), m_rootElementStyle, zoomFactor); + int height = pair->second()->computeLengthInt(style(), m_rootElementStyle, zoomFactor); if (width < 0 || height < 0) return; @@ -4507,11 +4518,11 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) case CSSPropertyOutlineOffset: HANDLE_INHERIT_AND_INITIAL(outlineOffset, OutlineOffset) - m_style->setOutlineOffset(primitiveValue->computeLengthInt(style(), zoomFactor)); + m_style->setOutlineOffset(primitiveValue->computeLengthInt(style(), m_rootElementStyle, zoomFactor)); return; case CSSPropertyTextShadow: - case CSSPropertyWebkitBoxShadow: { + case CSSPropertyBoxShadow: { if (isInherit) { if (id == CSSPropertyTextShadow) return m_style->setTextShadow(m_parentStyle->textShadow() ? new ShadowData(*m_parentStyle->textShadow()) : 0); @@ -4527,13 +4538,15 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) int len = list->length(); for (int i = 0; i < len; i++) { ShadowValue* item = static_cast<ShadowValue*>(list->itemWithoutBoundsCheck(i)); - int x = item->x->computeLengthInt(style(), zoomFactor); - int y = item->y->computeLengthInt(style(), zoomFactor); - int blur = item->blur ? item->blur->computeLengthInt(style(), zoomFactor) : 0; + int x = item->x->computeLengthInt(style(), m_rootElementStyle, zoomFactor); + int y = item->y->computeLengthInt(style(), m_rootElementStyle, zoomFactor); + int blur = item->blur ? item->blur->computeLengthInt(style(), m_rootElementStyle, zoomFactor) : 0; + int spread = item->spread ? item->spread->computeLengthInt(style(), m_rootElementStyle, zoomFactor) : 0; + ShadowStyle shadowStyle = item->style && item->style->getIdent() == CSSValueInset ? Inset : Normal; Color color; if (item->color) color = getColorFromPrimitiveValue(item->color.get()); - ShadowData* shadowData = new ShadowData(x, y, blur, color.isValid() ? color : Color::transparent); + ShadowData* shadowData = new ShadowData(x, y, blur, spread, shadowStyle, color.isValid() ? color : Color::transparent); if (id == CSSPropertyTextShadow) m_style->setTextShadow(shadowData, i != 0); else @@ -4555,7 +4568,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) if (type == CSSPrimitiveValue::CSS_PERCENTAGE) reflection->setOffset(Length(reflectValue->offset()->getDoubleValue(), Percent)); else - reflection->setOffset(Length(reflectValue->offset()->computeLengthIntForLength(style(), zoomFactor), Fixed)); + reflection->setOffset(Length(reflectValue->offset()->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed)); } NinePieceImage mask; mapNinePieceImage(reflectValue->mask(), mask); @@ -4661,7 +4674,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) m_style->setHasNormalColumnGap(); return; } - m_style->setColumnGap(primitiveValue->computeLengthFloat(style(), zoomFactor)); + m_style->setColumnGap(primitiveValue->computeLengthFloat(style(), m_rootElementStyle, zoomFactor)); return; } case CSSPropertyWebkitColumnWidth: { @@ -4675,7 +4688,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) m_style->setHasAutoColumnWidth(); return; } - m_style->setColumnWidth(primitiveValue->computeLengthFloat(style(), zoomFactor)); + m_style->setColumnWidth(primitiveValue->computeLengthFloat(style(), m_rootElementStyle, zoomFactor)); return; } case CSSPropertyWebkitColumnRuleStyle: @@ -4777,7 +4790,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) } else { bool ok = true; - Length l = convertToLength(primitiveValue, style(), 1, &ok); + Length l = convertToLength(primitiveValue, style(), m_rootElementStyle, 1, &ok); if (ok) m_style->setMarqueeIncrement(l); } @@ -4879,10 +4892,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) DashboardRegion *first = region; while (region) { - Length top = convertToLength(region->top(), style()); - Length right = convertToLength(region->right(), style()); - Length bottom = convertToLength(region->bottom(), style()); - Length left = convertToLength(region->left(), style()); + Length top = convertToLength(region->top(), style(), m_rootElementStyle); + Length right = convertToLength(region->right(), style(), m_rootElementStyle); + Length bottom = convertToLength(region->bottom(), style(), m_rootElementStyle); + Length left = convertToLength(region->left(), style(), m_rootElementStyle); if (region->m_isCircle) m_style->setDashboardRegion(StyleDashboardRegion::Circle, region->m_label, top, right, bottom, left, region == first ? false : true); else if (region->m_isRectangle) @@ -4913,11 +4926,11 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) result *= 3; else if (primitiveValue->getIdent() == CSSValueThick) result *= 5; - width = CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS)->computeLengthFloat(style(), zoomFactor); + width = CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS)->computeLengthFloat(style(), m_rootElementStyle, zoomFactor); break; } default: - width = primitiveValue->computeLengthFloat(style(), zoomFactor); + width = primitiveValue->computeLengthFloat(style(), m_rootElementStyle, zoomFactor); break; } m_style->setTextStrokeWidth(width); @@ -4926,7 +4939,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) case CSSPropertyWebkitTransform: { HANDLE_INHERIT_AND_INITIAL(transform, Transform); TransformOperations operations; - createTransformOperations(value, style(), operations); + createTransformOperations(value, style(), m_rootElementStyle, operations); m_style->setTransform(operations); return; } @@ -4941,7 +4954,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) Length l; int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); else @@ -4955,7 +4968,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) Length l; int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); else @@ -4969,7 +4982,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) float f; int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - f = static_cast<float>(primitiveValue->computeLengthIntForLength(style())); + f = static_cast<float>(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle)); else return; m_style->setTransformOriginZ(f); @@ -4990,10 +5003,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) float perspectiveValue; int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - perspectiveValue = static_cast<float>(primitiveValue->computeLengthIntForLength(style(), zoomFactor)); + perspectiveValue = static_cast<float>(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor)); else if (type == CSSPrimitiveValue::CSS_NUMBER) { // For backward compatibility, treat valueless numbers as px. - perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLengthFloat(style(), zoomFactor); + perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLengthFloat(style(), m_rootElementStyle, zoomFactor); } else return; @@ -5011,7 +5024,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) Length l; int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); else @@ -5025,7 +5038,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) Length l; int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); else @@ -5139,10 +5152,13 @@ void CSSStyleSelector::mapFillAttachment(FillLayer* layer, CSSValue* value) CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value); switch (primitiveValue->getIdent()) { case CSSValueFixed: - layer->setAttachment(false); + layer->setAttachment(FixedBackgroundAttachment); break; case CSSValueScroll: - layer->setAttachment(true); + layer->setAttachment(ScrollBackgroundAttachment); + break; + case CSSValueLocal: + layer->setAttachment(LocalBackgroundAttachment); break; default: return; @@ -5256,7 +5272,7 @@ void CSSStyleSelector::mapFillSize(FillLayer* layer, CSSValue* value) if (firstType == CSSPrimitiveValue::CSS_UNKNOWN) firstLength = Length(Auto); else if (CSSPrimitiveValue::isUnitTypeLength(firstType)) - firstLength = Length(first->computeLengthIntForLength(style(), zoomFactor), Fixed); + firstLength = Length(first->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (firstType == CSSPrimitiveValue::CSS_PERCENTAGE) firstLength = Length(first->getDoubleValue(), Percent); else @@ -5265,7 +5281,7 @@ void CSSStyleSelector::mapFillSize(FillLayer* layer, CSSValue* value) if (secondType == CSSPrimitiveValue::CSS_UNKNOWN) secondLength = Length(Auto); else if (CSSPrimitiveValue::isUnitTypeLength(secondType)) - secondLength = Length(second->computeLengthIntForLength(style(), zoomFactor), Fixed); + secondLength = Length(second->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (secondType == CSSPrimitiveValue::CSS_PERCENTAGE) secondLength = Length(second->getDoubleValue(), Percent); else @@ -5292,7 +5308,7 @@ void CSSStyleSelector::mapFillXPosition(FillLayer* layer, CSSValue* value) Length l; int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); else @@ -5316,7 +5332,7 @@ void CSSStyleSelector::mapFillYPosition(FillLayer* layer, CSSValue* value) Length l; int type = primitiveValue->primitiveType(); if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed); + l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed); else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) l = Length(primitiveValue->getDoubleValue(), Percent); else @@ -5756,7 +5772,7 @@ Color CSSStyleSelector::getColorFromPrimitiveValue(CSSPrimitiveValue* primitiveV else col = colorForCSSValue(ident); } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR) - col.setRGB(primitiveValue->getRGBColorValue()); + col.setRGB(primitiveValue->getRGBA32Value()); return col; } @@ -5830,7 +5846,7 @@ static TransformOperation::OperationType getTransformOperationType(WebKitCSSTran return TransformOperation::NONE; } -bool CSSStyleSelector::createTransformOperations(CSSValue* inValue, RenderStyle* style, TransformOperations& outOperations) +bool CSSStyleSelector::createTransformOperations(CSSValue* inValue, RenderStyle* style, RenderStyle* rootStyle, TransformOperations& outOperations) { float zoomFactor = style ? style->effectiveZoom() : 1; @@ -5897,13 +5913,13 @@ bool CSSStyleSelector::createTransformOperations(CSSValue* inValue, RenderStyle* Length tx = Length(0, Fixed); Length ty = Length(0, Fixed); if (val->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation) - ty = convertToLength(firstValue, style, zoomFactor, &ok); + ty = convertToLength(firstValue, style, rootStyle, zoomFactor, &ok); else { - tx = convertToLength(firstValue, style, zoomFactor, &ok); + tx = convertToLength(firstValue, style, rootStyle, zoomFactor, &ok); if (val->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) { if (val->length() > 1) { CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(val->itemWithoutBoundsCheck(1)); - ty = convertToLength(secondValue, style, zoomFactor, &ok); + ty = convertToLength(secondValue, style, rootStyle, zoomFactor, &ok); } } } @@ -5921,19 +5937,19 @@ bool CSSStyleSelector::createTransformOperations(CSSValue* inValue, RenderStyle* Length ty = Length(0, Fixed); Length tz = Length(0, Fixed); if (val->operationType() == WebKitCSSTransformValue::TranslateZTransformOperation) - tz = convertToLength(firstValue, style, zoomFactor, &ok); + tz = convertToLength(firstValue, style, rootStyle, zoomFactor, &ok); else if (val->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation) - ty = convertToLength(firstValue, style, zoomFactor, &ok); + ty = convertToLength(firstValue, style, rootStyle, zoomFactor, &ok); else { - tx = convertToLength(firstValue, style, zoomFactor, &ok); + tx = convertToLength(firstValue, style, rootStyle, zoomFactor, &ok); if (val->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) { if (val->length() > 2) { CSSPrimitiveValue* thirdValue = static_cast<CSSPrimitiveValue*>(val->itemWithoutBoundsCheck(2)); - tz = convertToLength(thirdValue, style, zoomFactor, &ok); + tz = convertToLength(thirdValue, style, rootStyle, zoomFactor, &ok); } if (val->length() > 1) { CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(val->itemWithoutBoundsCheck(1)); - ty = convertToLength(secondValue, style, zoomFactor, &ok); + ty = convertToLength(secondValue, style, rootStyle, zoomFactor, &ok); } } } diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h index c9df8765df..d86dd8c8cd 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h +++ b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h @@ -78,7 +78,7 @@ public: }; // This class selects a RenderStyle for a given element based on a collection of stylesheets. - class CSSStyleSelector : Noncopyable { + class CSSStyleSelector : public Noncopyable { public: CSSStyleSelector(Document*, const String& userStyleSheet, StyleSheetList*, CSSStyleSheet*, bool strictParsing, bool matchAuthorAndUserStyles); ~CSSStyleSelector(); @@ -152,7 +152,7 @@ public: void addKeyframeStyle(PassRefPtr<WebKitCSSKeyframesRule> rule); - static bool createTransformOperations(CSSValue* inValue, RenderStyle* inStyle, TransformOperations& outOperations); + static bool createTransformOperations(CSSValue* inValue, RenderStyle* inStyle, RenderStyle* rootStyle, TransformOperations& outOperations); private: enum SelectorMatch { SelectorMatches, SelectorFailsLocally, SelectorFailsCompletely }; @@ -266,6 +266,7 @@ public: RefPtr<RenderStyle> m_style; RenderStyle* m_parentStyle; + RenderStyle* m_rootElementStyle; Element* m_element; StyledElement* m_styledElement; Node* m_parentNode; diff --git a/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in b/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in index dac7567fa5..c0b52f21d2 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in +++ b/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in @@ -341,6 +341,7 @@ invert landscape level line-through +local loud lower -webkit-marquee @@ -543,17 +544,13 @@ round # border-box/content-box/padding-box should be used instead. # border +border-box content +content-box padding padding-box # -# CSS_PROP_BOX_SIZING -# -border-box -content-box - -# # CSS_PROP__KHTML_RTL_ORDERING # logical diff --git a/src/3rdparty/webkit/WebCore/css/CSSValueList.cpp b/src/3rdparty/webkit/WebCore/css/CSSValueList.cpp index b547768ce1..4928026d8d 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSValueList.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSValueList.cpp @@ -70,6 +70,32 @@ void CSSValueList::prepend(PassRefPtr<CSSValue> val) m_values.prepend(val); } +bool CSSValueList::removeAll(CSSValue* val) +{ + bool found = false; + // FIXME: we should be implementing operator== to CSSValue and its derived classes + // to make comparison more flexible and fast. + for (size_t index = 0; index < m_values.size(); index++) { + if (m_values.at(index)->cssText() == val->cssText()) { + m_values.remove(index); + found = true; + } + } + + return found; +} + +bool CSSValueList::hasValue(CSSValue* val) +{ + // FIXME: we should be implementing operator== to CSSValue and its derived classes + // to make comparison more flexible and fast. + for (size_t index = 0; index < m_values.size(); index++) { + if (m_values.at(index)->cssText() == val->cssText()) + return true; + } + return false; +} + String CSSValueList::cssText() const { String result = ""; diff --git a/src/3rdparty/webkit/WebCore/css/CSSValueList.h b/src/3rdparty/webkit/WebCore/css/CSSValueList.h index d34f4451f3..0d531de741 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSValueList.h +++ b/src/3rdparty/webkit/WebCore/css/CSSValueList.h @@ -52,6 +52,8 @@ public: void append(PassRefPtr<CSSValue>); void prepend(PassRefPtr<CSSValue>); + bool removeAll(CSSValue*); + bool hasValue(CSSValue*); virtual String cssText() const; diff --git a/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp b/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp index 16af9812ec..4963ed4ede 100644 --- a/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp +++ b/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp @@ -40,11 +40,17 @@ #include "MediaList.h" #include "MediaQuery.h" #include "MediaQueryExp.h" +#include "NodeRenderStyle.h" #include "Page.h" +#include "RenderView.h" #include "RenderStyle.h" #include "PlatformScreen.h" #include <wtf/HashMap.h> +#if ENABLE(3D_RENDERING) +#include "RenderLayerCompositor.h" +#endif + namespace WebCore { using namespace MediaFeatureNames; @@ -300,7 +306,8 @@ static bool device_heightMediaFeatureEval(CSSValue* value, RenderStyle* style, F { if (value) { FloatRect sg = screenRect(frame->page()->mainFrame()->view()); - return value->isPrimitiveValue() && compareValue(static_cast<int>(sg.height()), static_cast<CSSPrimitiveValue*>(value)->computeLengthInt(style), op); + RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle(); + return value->isPrimitiveValue() && compareValue(static_cast<int>(sg.height()), static_cast<CSSPrimitiveValue*>(value)->computeLengthInt(style, rootStyle), op); } // ({,min-,max-}device-height) // assume if we have a device, assume non-zero @@ -311,7 +318,8 @@ static bool device_widthMediaFeatureEval(CSSValue* value, RenderStyle* style, Fr { if (value) { FloatRect sg = screenRect(frame->page()->mainFrame()->view()); - return value->isPrimitiveValue() && compareValue(static_cast<int>(sg.width()), static_cast<CSSPrimitiveValue*>(value)->computeLengthInt(style), op); + RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle(); + return value->isPrimitiveValue() && compareValue(static_cast<int>(sg.width()), static_cast<CSSPrimitiveValue*>(value)->computeLengthInt(style, rootStyle), op); } // ({,min-,max-}device-width) // assume if we have a device, assume non-zero @@ -321,9 +329,10 @@ static bool device_widthMediaFeatureEval(CSSValue* value, RenderStyle* style, Fr static bool heightMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix op) { FrameView* view = frame->view(); - + RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle(); + if (value) - return value->isPrimitiveValue() && compareValue(view->layoutHeight(), static_cast<CSSPrimitiveValue*>(value)->computeLengthInt(style), op); + return value->isPrimitiveValue() && compareValue(view->layoutHeight(), static_cast<CSSPrimitiveValue*>(value)->computeLengthInt(style, rootStyle), op); return view->layoutHeight() != 0; } @@ -331,9 +340,10 @@ static bool heightMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* f static bool widthMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix op) { FrameView* view = frame->view(); - + RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle(); + if (value) - return value->isPrimitiveValue() && compareValue(view->layoutWidth(), static_cast<CSSPrimitiveValue*>(value)->computeLengthInt(style), op); + return value->isPrimitiveValue() && compareValue(view->layoutWidth(), static_cast<CSSPrimitiveValue*>(value)->computeLengthInt(style, rootStyle), op); return view->layoutWidth() != 0; } @@ -457,15 +467,20 @@ static bool transform_2dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, return true; } -static bool transform_3dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, MediaFeaturePrefix op) +static bool transform_3dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame, MediaFeaturePrefix op) { bool returnValueIfNoParameter; int have3dRendering; #if ENABLE(3D_RENDERING) - returnValueIfNoParameter = true; - have3dRendering = 1; + bool threeDEnabled = false; + if (RenderView* view = frame->contentRenderer()) + threeDEnabled = view->compositor()->hasAcceleratedCompositing(); + + returnValueIfNoParameter = threeDEnabled; + have3dRendering = threeDEnabled ? 1 : 0; #else + UNUSED_PARAM(frame); returnValueIfNoParameter = false; have3dRendering = 0; #endif diff --git a/src/3rdparty/webkit/WebCore/css/RGBColor.cpp b/src/3rdparty/webkit/WebCore/css/RGBColor.cpp new file mode 100644 index 0000000000..5c8c104e70 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/css/RGBColor.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2008, 2009 Google, Inc. All rights reserved. + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "RGBColor.h" + +namespace WebCore { + +PassRefPtr<RGBColor> RGBColor::create(unsigned rgbColor) +{ + return adoptRef(new RGBColor(rgbColor)); +} + +PassRefPtr<CSSPrimitiveValue> RGBColor::red() +{ + unsigned value = (m_rgbColor >> 16) & 0xFF; + return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); +} + +PassRefPtr<CSSPrimitiveValue> RGBColor::green() +{ + unsigned value = (m_rgbColor >> 8) & 0xFF; + return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); +} + +PassRefPtr<CSSPrimitiveValue> RGBColor::blue() +{ + unsigned value = m_rgbColor & 0xFF; + return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); +} + +PassRefPtr<CSSPrimitiveValue> RGBColor::alpha() +{ + float value = static_cast<float>((m_rgbColor >> 24) & 0xFF) / 0xFF; + return WebCore::CSSPrimitiveValue::create(value, WebCore::CSSPrimitiveValue::CSS_NUMBER); +} + +} // namespace WebCore + diff --git a/src/3rdparty/webkit/WebCore/css/RGBColor.h b/src/3rdparty/webkit/WebCore/css/RGBColor.h new file mode 100644 index 0000000000..7937a08c86 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/css/RGBColor.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2006, 2007, 2008, 2009 Google, Inc. All rights reserved. + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef RGBColor_h +#define RGBColor_h + +#include "CSSPrimitiveValue.h" +#include "Color.h" +#include <wtf/RefCounted.h> + +namespace WebCore { + + class RGBColor : public RefCounted<RGBColor> { + public: + static PassRefPtr<RGBColor> create(unsigned rgbColor); + + PassRefPtr<CSSPrimitiveValue> red(); + PassRefPtr<CSSPrimitiveValue> green(); + PassRefPtr<CSSPrimitiveValue> blue(); + PassRefPtr<CSSPrimitiveValue> alpha(); + + Color color() const { return Color(m_rgbColor); } + + private: + RGBColor(unsigned rgbColor) + : m_rgbColor(rgbColor) + { + } + + RGBA32 m_rgbColor; + }; + +} // namespace WebCore + +#endif // RGBColor_h diff --git a/src/3rdparty/webkit/WebCore/css/RGBColor.idl b/src/3rdparty/webkit/WebCore/css/RGBColor.idl index f76b6a253b..d29f8114b0 100644 --- a/src/3rdparty/webkit/WebCore/css/RGBColor.idl +++ b/src/3rdparty/webkit/WebCore/css/RGBColor.idl @@ -22,9 +22,7 @@ module css { // Introduced in DOM Level 2: interface [ - ObjCCustomImplementation, GenerateConstructor, - PODType=RGBA32, InterfaceUUID=2e3b1501-2cf7-4a4a-bbf7-d8843d1c3be7, ImplementationUUID=cf779953-4898-4800-aa31-6c9e3f4711be ] RGBColor { diff --git a/src/3rdparty/webkit/WebCore/css/ShadowValue.cpp b/src/3rdparty/webkit/WebCore/css/ShadowValue.cpp index 5794405284..27be86c117 100644 --- a/src/3rdparty/webkit/WebCore/css/ShadowValue.cpp +++ b/src/3rdparty/webkit/WebCore/css/ShadowValue.cpp @@ -2,7 +2,7 @@ * This file is part of the DOM implementation for KDE. * * (C) 1999-2003 Lars Knoll (knoll@kde.org) - * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. + * Copyright (C) 2004, 2005, 2006, 2009 Apple Computer, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -31,10 +31,14 @@ namespace WebCore { ShadowValue::ShadowValue(PassRefPtr<CSSPrimitiveValue> _x, PassRefPtr<CSSPrimitiveValue> _y, PassRefPtr<CSSPrimitiveValue> _blur, + PassRefPtr<CSSPrimitiveValue> _spread, + PassRefPtr<CSSPrimitiveValue> _style, PassRefPtr<CSSPrimitiveValue> _color) : x(_x) , y(_y) , blur(_blur) + , spread(_spread) + , style(_style) , color(_color) { } @@ -60,6 +64,16 @@ String ShadowValue::cssText() const text += " "; text += blur->cssText(); } + if (spread) { + if (!text.isEmpty()) + text += " "; + text += spread->cssText(); + } + if (style) { + if (!text.isEmpty()) + text += " "; + text += style->cssText(); + } return text; } diff --git a/src/3rdparty/webkit/WebCore/css/ShadowValue.h b/src/3rdparty/webkit/WebCore/css/ShadowValue.h index 179531eccf..a88a0e784f 100644 --- a/src/3rdparty/webkit/WebCore/css/ShadowValue.h +++ b/src/3rdparty/webkit/WebCore/css/ShadowValue.h @@ -1,6 +1,6 @@ /* * (C) 1999-2003 Lars Knoll (knoll@kde.org) - * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2008, 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 @@ -35,9 +35,11 @@ public: static PassRefPtr<ShadowValue> create(PassRefPtr<CSSPrimitiveValue> x, PassRefPtr<CSSPrimitiveValue> y, PassRefPtr<CSSPrimitiveValue> blur, + PassRefPtr<CSSPrimitiveValue> spread, + PassRefPtr<CSSPrimitiveValue> style, PassRefPtr<CSSPrimitiveValue> color) { - return adoptRef(new ShadowValue(x, y, blur, color)); + return adoptRef(new ShadowValue(x, y, blur, spread, style, color)); } virtual String cssText() const; @@ -45,12 +47,16 @@ public: RefPtr<CSSPrimitiveValue> x; RefPtr<CSSPrimitiveValue> y; RefPtr<CSSPrimitiveValue> blur; + RefPtr<CSSPrimitiveValue> spread; + RefPtr<CSSPrimitiveValue> style; RefPtr<CSSPrimitiveValue> color; private: ShadowValue(PassRefPtr<CSSPrimitiveValue> x, PassRefPtr<CSSPrimitiveValue> y, PassRefPtr<CSSPrimitiveValue> blur, + PassRefPtr<CSSPrimitiveValue> spread, + PassRefPtr<CSSPrimitiveValue> style, PassRefPtr<CSSPrimitiveValue> color); }; diff --git a/src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.cpp b/src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.cpp index 574a01a890..aaf5c3d6a3 100644 --- a/src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.cpp +++ b/src/3rdparty/webkit/WebCore/css/WebKitCSSMatrix.cpp @@ -72,7 +72,7 @@ void WebKitCSSMatrix::setMatrixValue(const String& string, ExceptionCode& ec) // requires style (i.e., param uses 'ems' or 'exs') PassRefPtr<CSSValue> val = styleDeclaration->getPropertyCSSValue(CSSPropertyWebkitTransform); TransformOperations operations; - if (!CSSStyleSelector::createTransformOperations(val.get(), 0, operations)) { + if (!CSSStyleSelector::createTransformOperations(val.get(), 0, 0, operations)) { ec = SYNTAX_ERR; return; } diff --git a/src/3rdparty/webkit/WebCore/css/html.css b/src/3rdparty/webkit/WebCore/css/html.css index 8dad349b27..6b03390edb 100644 --- a/src/3rdparty/webkit/WebCore/css/html.css +++ b/src/3rdparty/webkit/WebCore/css/html.css @@ -360,6 +360,8 @@ textarea { resize: auto; cursor: auto; padding: 2px; + white-space: pre-wrap; + word-wrap: break-word; } input::-webkit-input-placeholder, isindex::-webkit-input-placeholder { diff --git a/src/3rdparty/webkit/WebCore/css/makeprop.pl b/src/3rdparty/webkit/WebCore/css/makeprop.pl index bc979f9b6e..115969f627 100644 --- a/src/3rdparty/webkit/WebCore/css/makeprop.pl +++ b/src/3rdparty/webkit/WebCore/css/makeprop.pl @@ -26,9 +26,9 @@ use warnings; open NAMES, "<CSSPropertyNames.in" || die "Could not find CSSPropertyNames.in"; my @names = (); while (<NAMES>) { - next if (m/#/); - chomp $_; - next if ($_ eq ""); + next if (m/(^#)|(^\s*$)/); + # Input may use a different EOL sequence than $/, so avoid chomp. + $_ =~ s/[\r\n]+$//g; push @names, $_; } close(NAMES); diff --git a/src/3rdparty/webkit/WebCore/css/makevalues.pl b/src/3rdparty/webkit/WebCore/css/makevalues.pl index 5d4e8ac29b..3f52e64043 100644 --- a/src/3rdparty/webkit/WebCore/css/makevalues.pl +++ b/src/3rdparty/webkit/WebCore/css/makevalues.pl @@ -26,9 +26,9 @@ use warnings; open NAMES, "<CSSValueKeywords.in" || die "Could not open CSSValueKeywords.in"; my @names = (); while (<NAMES>) { - next if (m/#/); - chomp $_; - next if ($_ eq ""); + next if (m/(^#)|(^\s*$)/); + # Input may use a different EOL sequence than $/, so avoid chomp. + $_ =~ s/[\r\n]+$//g; push @names, $_; } close(NAMES); diff --git a/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css b/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css index a9b7a5f3b0..5cf48ae636 100644 --- a/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css +++ b/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css @@ -74,7 +74,6 @@ audio::-webkit-media-controls-current-time-display, video::-webkit-media-control font: -webkit-small-control; font-size: 9px; overflow: hidden; - height: 13px; width: 45px; color: white; text-shadow: black 0px 1px 1px; @@ -97,7 +96,6 @@ audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-contr font: -webkit-small-control; font-size: 9px; overflow: hidden; - height: 13px; width: 45px; color: white; text-shadow: black 0px 1px 1px; @@ -116,7 +114,7 @@ audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline { height: 13px; padding: 0px; margin: 0px; - margin-top: 4px; + margin-top: 2px; } audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button { diff --git a/src/3rdparty/webkit/WebCore/css/tokenizer.flex b/src/3rdparty/webkit/WebCore/css/tokenizer.flex index e800bae034..1569ee205e 100644 --- a/src/3rdparty/webkit/WebCore/css/tokenizer.flex +++ b/src/3rdparty/webkit/WebCore/css/tokenizer.flex @@ -73,6 +73,7 @@ nth (-?[0-9]*n[\+-][0-9]+)|(-?[0-9]*n) "!"{w}"important" {yyTok = IMPORTANT_SYM; return yyTok;} {num}em {yyTok = EMS; return yyTok;} +{num}rem {yyTok = REMS; return yyTok;} {num}__qem {yyTok = QEMS; return yyTok;} /* quirky ems */ {num}ex {yyTok = EXS; return yyTok;} {num}px {yyTok = PXS; return yyTok;} diff --git a/src/3rdparty/webkit/WebCore/dom/ClassNames.h b/src/3rdparty/webkit/WebCore/dom/ClassNames.h index 8f4852f0b2..a836606b6b 100644 --- a/src/3rdparty/webkit/WebCore/dom/ClassNames.h +++ b/src/3rdparty/webkit/WebCore/dom/ClassNames.h @@ -27,7 +27,7 @@ namespace WebCore { - class ClassNamesData : Noncopyable { + class ClassNamesData : public Noncopyable { public: ClassNamesData(const String& string, bool shouldFoldCase) : m_string(string), m_shouldFoldCase(shouldFoldCase), m_createdVector(false) diff --git a/src/3rdparty/webkit/WebCore/dom/Document.cpp b/src/3rdparty/webkit/WebCore/dom/Document.cpp index 3ee00adb5e..228cfded2a 100644 --- a/src/3rdparty/webkit/WebCore/dom/Document.cpp +++ b/src/3rdparty/webkit/WebCore/dom/Document.cpp @@ -335,6 +335,9 @@ Document::Document(Frame* frame, bool isXHTML) , m_hasOpenDatabases(false) #endif , m_usingGeolocation(false) +#if ENABLE(WML) + , m_containsWMLContent(false) +#endif { m_document.resetSkippingRef(this); @@ -361,11 +364,14 @@ Document::Document(Frame* frame, bool isXHTML) m_inDocument = true; m_inStyleRecalc = false; m_closeAfterStyleRecalc = false; + m_usesDescendantRules = false; m_usesSiblingRules = false; m_usesFirstLineRules = false; m_usesFirstLetterRules = false; m_usesBeforeAfterRules = false; + m_usesRemUnits = false; + m_gotoAnchorNeededAfterStylesheetsLoad = false; m_styleSelector = 0; @@ -1132,6 +1138,11 @@ void Document::styleRecalcTimerFired(Timer<Document>*) updateStyleIfNeeded(); } +bool Document::childNeedsAndNotInStyleRecalc() +{ + return childNeedsStyleRecalc() && !m_inStyleRecalc; +} + void Document::recalcStyle(StyleChange change) { // we should not enter style recalc while painting @@ -1678,13 +1689,14 @@ void Document::implicitClose() } #if PLATFORM(MAC) - if (f && renderObject && this == topDocument() && AXObjectCache::accessibilityEnabled()) + if (f && renderObject && this == topDocument() && AXObjectCache::accessibilityEnabled()) { // The AX cache may have been cleared at this point, but we need to make sure it contains an // AX object to send the notification to. getOrCreate will make sure that an valid AX object // exists in the cache (we ignore the return value because we don't need it here). This is // only safe to call when a layout is not in progress, so it can not be used in postNotification. axObjectCache()->getOrCreate(renderObject); axObjectCache()->postNotification(renderObject, "AXLoadComplete", true); + } #endif #if ENABLE(SVG) diff --git a/src/3rdparty/webkit/WebCore/dom/Document.h b/src/3rdparty/webkit/WebCore/dom/Document.h index 82f0455e4a..6655d9b7ef 100644 --- a/src/3rdparty/webkit/WebCore/dom/Document.h +++ b/src/3rdparty/webkit/WebCore/dom/Document.h @@ -377,6 +377,8 @@ public: void setUsesFirstLetterRules(bool b) { m_usesFirstLetterRules = b; } bool usesBeforeAfterRules() const { return m_usesBeforeAfterRules; } void setUsesBeforeAfterRules(bool b) { m_usesBeforeAfterRules = b; } + bool usesRemUnits() const { return m_usesRemUnits; } + void setUsesRemUnits(bool b) { m_usesRemUnits = b; } // Machinery for saving and restoring state when you leave and then go back to a page. void registerFormElementWithState(Element* e) { m_formElementsWithState.add(e); } @@ -404,6 +406,7 @@ public: PassRefPtr<EditingText> createEditingTextNode(const String&); virtual void recalcStyle(StyleChange = NoChange); + bool childNeedsAndNotInStyleRecalc(); virtual void updateStyleIfNeeded(); void updateLayout(); void updateLayoutIgnorePendingStylesheets(); @@ -795,6 +798,8 @@ public: protected: Document(Frame*, bool isXHTML); + void setStyleSelector(CSSStyleSelector* styleSelector) { m_styleSelector = styleSelector; } + private: virtual void refScriptExecutionContext() { ref(); } virtual void derefScriptExecutionContext() { deref(); } @@ -903,6 +908,7 @@ private: bool m_usesFirstLineRules; bool m_usesFirstLetterRules; bool m_usesBeforeAfterRules; + bool m_usesRemUnits; bool m_gotoAnchorNeededAfterStylesheetsLoad; bool m_isDNSPrefetchEnabled; bool m_haveExplicitlyDisabledDNSPrefetch; @@ -1029,6 +1035,9 @@ public: bool usingGeolocation() const { return m_usingGeolocation; }; #if ENABLE(WML) + void setContainsWMLContent(bool value) { m_containsWMLContent = value; } + bool containsWMLContent() const { return m_containsWMLContent; } + void resetWMLPageState(); void initializeWMLPageState(); #endif @@ -1111,6 +1120,10 @@ private: #endif bool m_usingGeolocation; + +#if ENABLE(WML) + bool m_containsWMLContent; +#endif }; inline bool Document::hasElementWithId(AtomicStringImpl* id) const diff --git a/src/3rdparty/webkit/WebCore/dom/Element.cpp b/src/3rdparty/webkit/WebCore/dom/Element.cpp index 0e6c2450c5..1956be4461 100644 --- a/src/3rdparty/webkit/WebCore/dom/Element.cpp +++ b/src/3rdparty/webkit/WebCore/dom/Element.cpp @@ -33,7 +33,6 @@ #include "ClientRect.h" #include "ClientRectList.h" #include "Document.h" -#include "Editor.h" #include "ElementRareData.h" #include "ExceptionCode.h" #include "FocusController.h" @@ -45,9 +44,7 @@ #include "NodeList.h" #include "NodeRenderStyle.h" #include "Page.h" -#include "PlatformString.h" -#include "RenderBlock.h" -#include "SelectionController.h" +#include "RenderView.h" #include "TextIterator.h" #include "XMLNames.h" @@ -382,8 +379,10 @@ int Element::clientWidth() bool inCompatMode = document()->inCompatMode(); if ((!inCompatMode && document()->documentElement() == this) || (inCompatMode && isHTMLElement() && document()->body() == this)) { - if (FrameView* view = document()->view()) - return adjustForAbsoluteZoom(view->layoutWidth(), document()->renderer()); + if (FrameView* view = document()->view()) { + if (RenderView* renderView = document()->renderView()) + return adjustForAbsoluteZoom(view->layoutWidth(), renderView); + } } if (RenderBox* rend = renderBox()) @@ -401,8 +400,10 @@ int Element::clientHeight() if ((!inCompatMode && document()->documentElement() == this) || (inCompatMode && isHTMLElement() && document()->body() == this)) { - if (FrameView* view = document()->view()) - return adjustForAbsoluteZoom(view->layoutHeight(), document()->renderer()); + if (FrameView* view = document()->view()) { + if (RenderView* renderView = document()->renderView()) + return adjustForAbsoluteZoom(view->layoutHeight(), renderView); + } } if (RenderBox* rend = renderBox()) @@ -590,6 +591,12 @@ PassRefPtr<Attribute> Element::createAttribute(const QualifiedName& name, const void Element::attributeChanged(Attribute* attr, bool) { + recalcStyleIfNeededAfterAttributeChanged(attr); + updateAfterAttributeChanged(attr); +} + +void Element::updateAfterAttributeChanged(Attribute* attr) +{ if (!document()->axObjectCache()->accessibilityEnabled()) return; @@ -602,7 +609,13 @@ void Element::attributeChanged(Attribute* attr, bool) document()->axObjectCache()->handleAriaRoleChanged(renderer()); } } - + +void Element::recalcStyleIfNeededAfterAttributeChanged(Attribute* attr) +{ + if (document()->attached() && document()->styleSelector()->hasSelectorForAttribute(attr->name().localName())) + setNeedsStyleRecalc(); +} + void Element::setAttributeMap(PassRefPtr<NamedNodeMap> list) { document()->incDOMTreeVersion(); @@ -854,7 +867,11 @@ void Element::recalcStyle(StyleChange change) setRenderStyle(newStyle); if (change != Force) { - if ((document()->usesDescendantRules() || hasPositionalRules) && styleChangeType() >= FullStyleChange) + // If "rem" units are used anywhere in the document, and if the document element's font size changes, then go ahead and force font updating + // all the way down the tree. This is simpler than having to maintain a cache of objects (and such font size changes should be rare anyway). + if (document()->usesRemUnits() && ch != NoChange && currentStyle && newStyle && currentStyle->fontSize() != newStyle->fontSize() && document()->documentElement() == this) + change = Force; + else if ((document()->usesDescendantRules() || hasPositionalRules) && styleChangeType() >= FullStyleChange) change = Force; else change = ch; diff --git a/src/3rdparty/webkit/WebCore/dom/Element.h b/src/3rdparty/webkit/WebCore/dom/Element.h index b0bbeb352f..0ff2ed1484 100644 --- a/src/3rdparty/webkit/WebCore/dom/Element.h +++ b/src/3rdparty/webkit/WebCore/dom/Element.h @@ -136,6 +136,11 @@ public: // This method is called whenever an attribute is added, changed or removed. virtual void attributeChanged(Attribute*, bool preserveDecls = false); + // The implementation of Element::attributeChanged() calls the following two functions. + // They are separated to allow a different flow of control in StyledElement::attributeChanged(). + void recalcStyleIfNeededAfterAttributeChanged(Attribute*); + void updateAfterAttributeChanged(Attribute*); + // not part of the DOM void setAttributeMap(PassRefPtr<NamedNodeMap>); @@ -207,6 +212,8 @@ public: virtual bool isEnabledFormControl() const { return true; } virtual bool isReadOnlyFormControl() const { return false; } virtual bool isTextFormControl() const { return false; } + virtual bool isOptionalFormControl() const { return false; } + virtual bool isRequiredFormControl() const { return false; } virtual bool formControlValueMatchesRenderer() const { return false; } virtual void setFormControlValueMatchesRenderer(bool) { } diff --git a/src/3rdparty/webkit/WebCore/dom/ErrorEvent.cpp b/src/3rdparty/webkit/WebCore/dom/ErrorEvent.cpp new file mode 100644 index 0000000000..2627d0154e --- /dev/null +++ b/src/3rdparty/webkit/WebCore/dom/ErrorEvent.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if ENABLE(WORKERS) + +#include "ErrorEvent.h" + +#include "EventNames.h" + +namespace WebCore { + +ErrorEvent::ErrorEvent() +{ +} + +ErrorEvent::ErrorEvent(const String& message, const String& fileName, unsigned lineNumber) + : Event(eventNames().errorEvent, false, true) + , m_message(message) + , m_fileName(fileName) + , m_lineNumber(lineNumber) +{ +} + +ErrorEvent::~ErrorEvent() +{ +} + +void ErrorEvent::initErrorEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& message, const String& fileName, unsigned lineNumber) +{ + if (dispatched()) + return; + + initEvent(type, canBubble, cancelable); + + m_message = message; + m_fileName = fileName; + m_lineNumber = lineNumber; +} + +bool ErrorEvent::isErrorEvent() const +{ + return true; +} + +} // namespace WebCore + +#endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/dom/ErrorEvent.h b/src/3rdparty/webkit/WebCore/dom/ErrorEvent.h new file mode 100644 index 0000000000..f81530aee6 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/dom/ErrorEvent.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ErrorEvent_h +#define ErrorEvent_h + +#if ENABLE(WORKERS) + +#include "Event.h" +#include "PlatformString.h" + +namespace WebCore { + + class ErrorEvent : public Event { + public: + static PassRefPtr<ErrorEvent> create() + { + return adoptRef(new ErrorEvent); + } + static PassRefPtr<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber) + { + return adoptRef(new ErrorEvent(message, fileName, lineNumber)); + } + virtual ~ErrorEvent(); + + void initErrorEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& message, const String& fileName, unsigned lineNumber); + + const String& message() const { return m_message; } + const String& filename() const { return m_fileName; } + unsigned lineno() const { return m_lineNumber; } + + virtual bool isErrorEvent() const; + + private: + ErrorEvent(); + ErrorEvent(const String& message, const String& fileName, unsigned lineNumber); + + String m_message; + String m_fileName; + unsigned m_lineNumber; + }; + +} // namespace WebCore + +#endif // ENABLE(WORKERS) + +#endif // ErrorEvent_h diff --git a/src/3rdparty/webkit/WebCore/dom/ErrorEvent.idl b/src/3rdparty/webkit/WebCore/dom/ErrorEvent.idl new file mode 100644 index 0000000000..6125e1ed02 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/dom/ErrorEvent.idl @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +module events { + + interface [ + Conditional=WORKERS, + GenerateConstructor, + NoStaticTables + ] ErrorEvent : Event { + + readonly attribute DOMString message; + readonly attribute DOMString filename; + readonly attribute unsigned long lineno; + + void initErrorEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString messageArg, in DOMString filenameArg, in unsigned long linenoArg); + }; + +} diff --git a/src/3rdparty/webkit/WebCore/dom/Event.cpp b/src/3rdparty/webkit/WebCore/dom/Event.cpp index b4b87edbcc..9d1d079959 100644 --- a/src/3rdparty/webkit/WebCore/dom/Event.cpp +++ b/src/3rdparty/webkit/WebCore/dom/Event.cpp @@ -158,6 +158,13 @@ bool Event::isStorageEvent() const } #endif +#if ENABLE(WORKERS) +bool Event::isErrorEvent() const +{ + return false; +} +#endif + bool Event::storesResultAsString() const { return false; diff --git a/src/3rdparty/webkit/WebCore/dom/Event.h b/src/3rdparty/webkit/WebCore/dom/Event.h index 69842153c8..823ff20157 100644 --- a/src/3rdparty/webkit/WebCore/dom/Event.h +++ b/src/3rdparty/webkit/WebCore/dom/Event.h @@ -119,7 +119,10 @@ namespace WebCore { #if ENABLE(DOM_STORAGE) virtual bool isStorageEvent() const; #endif - +#if ENABLE(WORKERS) + virtual bool isErrorEvent() const; +#endif + bool propagationStopped() const { return m_propagationStopped; } bool defaultPrevented() const { return m_defaultPrevented; } diff --git a/src/3rdparty/webkit/WebCore/dom/EventListener.h b/src/3rdparty/webkit/WebCore/dom/EventListener.h index dbc41b2252..d288c8d65a 100644 --- a/src/3rdparty/webkit/WebCore/dom/EventListener.h +++ b/src/3rdparty/webkit/WebCore/dom/EventListener.h @@ -21,6 +21,7 @@ #ifndef EventListener_h #define EventListener_h +#include "PlatformString.h" #include <wtf/RefCounted.h> namespace JSC { @@ -35,6 +36,8 @@ namespace WebCore { public: virtual ~EventListener() { } virtual void handleEvent(Event*, bool isWindowEvent = false) = 0; + // Return true to indicate that the error is handled. + virtual bool reportError(const String& /*message*/, const String& /*url*/, int /*lineNumber*/) { return false; } virtual bool wasCreatedFromMarkup() const { return false; } #if USE(JSC) diff --git a/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp b/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp index 437f5ba2fd..42668e3e2b 100644 --- a/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp +++ b/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp @@ -89,7 +89,7 @@ Worker* EventTarget::toWorker() return 0; } -WorkerContext* EventTarget::toWorkerContext() +DedicatedWorkerContext* EventTarget::toDedicatedWorkerContext() { return 0; } diff --git a/src/3rdparty/webkit/WebCore/dom/EventTarget.h b/src/3rdparty/webkit/WebCore/dom/EventTarget.h index 73a32e3f9f..f0c794fb34 100644 --- a/src/3rdparty/webkit/WebCore/dom/EventTarget.h +++ b/src/3rdparty/webkit/WebCore/dom/EventTarget.h @@ -38,6 +38,7 @@ namespace WebCore { class AbstractWorker; class AtomicString; + class DedicatedWorkerContext; class DOMApplicationCache; class DOMWindow; class Event; @@ -48,7 +49,6 @@ namespace WebCore { class ScriptExecutionContext; class SharedWorker; class Worker; - class WorkerContext; class XMLHttpRequest; class XMLHttpRequestUpload; @@ -69,7 +69,7 @@ namespace WebCore { #endif #if ENABLE(WORKERS) virtual Worker* toWorker(); - virtual WorkerContext* toWorkerContext(); + virtual DedicatedWorkerContext* toDedicatedWorkerContext(); #endif #if ENABLE(SHARED_WORKERS) diff --git a/src/3rdparty/webkit/WebCore/dom/InputElement.cpp b/src/3rdparty/webkit/WebCore/dom/InputElement.cpp index 108d17e838..b25cd5ca24 100644 --- a/src/3rdparty/webkit/WebCore/dom/InputElement.cpp +++ b/src/3rdparty/webkit/WebCore/dom/InputElement.cpp @@ -116,6 +116,8 @@ void InputElement::updateSelectionRange(InputElement* inputElement, Element* ele if (!inputElement->isTextField()) return; + element->document()->updateLayoutIgnorePendingStylesheets(); + if (RenderTextControl* renderer = toRenderTextControl(element->renderer())) renderer->setSelectionRange(start, end); } diff --git a/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h b/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h index 3841020301..93b224b563 100644 --- a/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h +++ b/src/3rdparty/webkit/WebCore/dom/MessagePortChannel.h @@ -48,7 +48,7 @@ namespace WebCore { // MessagePortChannel is a platform-independent interface to the remote side of a message channel. // It acts as a wrapper around the platform-dependent PlatformMessagePortChannel implementation which ensures that the platform-dependent close() method is invoked before destruction. - class MessagePortChannel : Noncopyable { + class MessagePortChannel : public Noncopyable { public: static void createChannel(PassRefPtr<MessagePort>, PassRefPtr<MessagePort>); @@ -95,6 +95,8 @@ namespace WebCore { ~MessagePortChannel(); + PlatformMessagePortChannel* channel() const { return m_channel.get(); } + private: MessagePortChannel(PassRefPtr<PlatformMessagePortChannel>); RefPtr<PlatformMessagePortChannel> m_channel; diff --git a/src/3rdparty/webkit/WebCore/dom/Position.h b/src/3rdparty/webkit/WebCore/dom/Position.h index 57f73ec8a5..b434ec9900 100644 --- a/src/3rdparty/webkit/WebCore/dom/Position.h +++ b/src/3rdparty/webkit/WebCore/dom/Position.h @@ -70,7 +70,7 @@ public: // For creating offset positions: Position(PassRefPtr<Node> anchorNode, int offset, AnchorType); - AnchorType anchorType() const { return m_anchorType; } + AnchorType anchorType() const { return static_cast<AnchorType>(m_anchorType); } void clear() { m_anchorNode.clear(); m_offset = 0; m_anchorType = PositionIsOffsetInAnchor; m_isLegacyEditingPosition = false; } @@ -172,7 +172,7 @@ private: // returns true, then other places in editing will treat m_offset == 0 as "before the anchor" // and m_offset > 0 as "after the anchor node". See rangeCompliantEquivalent for more info. int m_offset; - AnchorType m_anchorType : 2; + unsigned m_anchorType : 2; bool m_isLegacyEditingPosition : 1; }; diff --git a/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp b/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp index 879bf625b7..806bf92112 100644 --- a/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp +++ b/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp @@ -123,7 +123,7 @@ void ProcessingInstruction::checkStyleSheet() bool isCSS = type.isEmpty() || type == "text/css"; #if ENABLE(XSLT) m_isXSL = (type == "text/xml" || type == "text/xsl" || type == "application/xml" || - type == "application/xhtml+xml" || type == "application/rss+xml" || type == "application/atom=xml"); + type == "application/xhtml+xml" || type == "application/rss+xml" || type == "application/atom+xml"); if (!isCSS && !m_isXSL) #else if (!isCSS) diff --git a/src/3rdparty/webkit/WebCore/dom/Range.cpp b/src/3rdparty/webkit/WebCore/dom/Range.cpp index e7fd8a2303..edee305079 100644 --- a/src/3rdparty/webkit/WebCore/dom/Range.cpp +++ b/src/3rdparty/webkit/WebCore/dom/Range.cpp @@ -90,6 +90,7 @@ PassRefPtr<Range> Range::create(PassRefPtr<Document> ownerDocument, PassRefPtr<N PassRefPtr<Range> Range::create(PassRefPtr<Document> ownerDocument, const Position& start, const Position& end) { + // FIXME: we shouldn't be using deprecatedEditingOffset here return adoptRef(new Range(ownerDocument, start.node(), start.deprecatedEditingOffset(), end.node(), end.deprecatedEditingOffset())); } @@ -294,7 +295,7 @@ bool Range::isPointInRange(Node* refNode, int offset, ExceptionCode& ec) && compareBoundaryPoints(refNode, offset, m_end.container(), m_end.offset()) <= 0; } -short Range::comparePoint(Node* refNode, int offset, ExceptionCode& ec) +short Range::comparePoint(Node* refNode, int offset, ExceptionCode& ec) const { // http://developer.mozilla.org/en/docs/DOM:range.comparePoint // This method returns -1, 0 or 1 depending on if the point described by the @@ -332,7 +333,7 @@ short Range::comparePoint(Node* refNode, int offset, ExceptionCode& ec) return 0; } -Range::CompareResults Range::compareNode(Node* refNode, ExceptionCode& ec) +Range::CompareResults Range::compareNode(Node* refNode, ExceptionCode& ec) const { // http://developer.mozilla.org/en/docs/DOM:range.compareNode // This method returns 0, 1, 2, or 3 based on if the node is before, after, diff --git a/src/3rdparty/webkit/WebCore/dom/Range.h b/src/3rdparty/webkit/WebCore/dom/Range.h index 115f44258c..1487a7cc7a 100644 --- a/src/3rdparty/webkit/WebCore/dom/Range.h +++ b/src/3rdparty/webkit/WebCore/dom/Range.h @@ -59,10 +59,10 @@ public: void setStart(PassRefPtr<Node> container, int offset, ExceptionCode&); void setEnd(PassRefPtr<Node> container, int offset, ExceptionCode&); void collapse(bool toStart, ExceptionCode&); - bool isPointInRange(Node* refNode, int offset, ExceptionCode& ec); - short comparePoint(Node* refNode, int offset, ExceptionCode& ec); + bool isPointInRange(Node* refNode, int offset, ExceptionCode&); + short comparePoint(Node* refNode, int offset, ExceptionCode&) const; enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_INSIDE }; - CompareResults compareNode(Node* refNode, ExceptionCode&); + CompareResults compareNode(Node* refNode, ExceptionCode&) const; enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START }; short compareBoundaryPoints(CompareHow, const Range* sourceRange, ExceptionCode&) const; static short compareBoundaryPoints(Node* containerA, int offsetA, Node* containerB, int offsetB); diff --git a/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp b/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp index 7552c5638b..45f3bd8795 100644 --- a/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp +++ b/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp @@ -47,10 +47,17 @@ #include "WMLSelectElement.h" #endif -#if PLATFORM(MAC) +// Configure platform-specific behavior when focused pop-up receives arrow/space/return keystroke. +// (PLATFORM(MAC) is always false in Chromium, hence the extra test.) +#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN)) #define ARROW_KEYS_POP_MENU 1 +#define SPACE_OR_RETURN_POP_MENU 0 +#elif PLATFORM(GTK) +#define ARROW_KEYS_POP_MENU 0 +#define SPACE_OR_RETURN_POP_MENU 1 #else #define ARROW_KEYS_POP_MENU 0 +#define SPACE_OR_RETURN_POP_MENU 0 #endif using std::min; @@ -509,6 +516,29 @@ void SelectElement::reset(SelectElementData& data, Element* element) element->setNeedsStyleRecalc(); } + +#if !ARROW_KEYS_POP_MENU +enum SkipDirection { + SkipBackwards = -1, + SkipForwards = 1 +}; + +// Returns the index of the next valid list item |skip| items past |listIndex| in direction |direction|. +static int nextValidIndex(const Vector<Element*>& listItems, int listIndex, SkipDirection direction, int skip) +{ + int lastGoodIndex = listIndex; + int size = listItems.size(); + for (listIndex += direction; listIndex >= 0 && listIndex < size; listIndex += direction) { + --skip; + if (!listItems[listIndex]->disabled() && isOptionElement(listItems[listIndex])) { + lastGoodIndex = listIndex; + if (skip <= 0) + break; + } + } + return lastGoodIndex; +} +#endif void SelectElement::menuListDefaultEventHandler(SelectElementData& data, Element* element, Event* event, HTMLFormElement* htmlForm) { @@ -535,24 +565,30 @@ void SelectElement::menuListDefaultEventHandler(SelectElementData& data, Element } #else const Vector<Element*>& listItems = data.listItems(element); - int size = listItems.size(); int listIndex = optionToListIndex(data, element, selectedIndex(data, element)); if (keyIdentifier == "Down" || keyIdentifier == "Right") { - for (listIndex += 1; - listIndex >= 0 && listIndex < size && (listItems[listIndex]->disabled() || !isOptionElement(listItems[listIndex])); - ++listIndex) { } - if (listIndex >= 0 && listIndex < size) - setSelectedIndex(data, element, listToOptionIndex(data, element, listIndex)); + listIndex = nextValidIndex(listItems, listIndex, SkipForwards, 1); handled = true; } else if (keyIdentifier == "Up" || keyIdentifier == "Left") { - for (listIndex -= 1; - listIndex >= 0 && listIndex < size && (listItems[listIndex]->disabled() || !isOptionElement(listItems[listIndex])); - --listIndex) { } - if (listIndex >= 0 && listIndex < size) - setSelectedIndex(data, element, listToOptionIndex(data, element, listIndex)); + listIndex = nextValidIndex(listItems, listIndex, SkipBackwards, 1); + handled = true; + } else if (keyIdentifier == "PageDown") { + listIndex = nextValidIndex(listItems, listIndex, SkipForwards, 3); + handled = true; + } else if (keyIdentifier == "PageUp") { + listIndex = nextValidIndex(listItems, listIndex, SkipBackwards, 3); + handled = true; + } else if (keyIdentifier == "Home") { + listIndex = nextValidIndex(listItems, -1, SkipForwards, 1); + handled = true; + } else if (keyIdentifier == "End") { + listIndex = nextValidIndex(listItems, listItems.size(), SkipBackwards, 1); handled = true; } + + if (handled && listIndex >= 0 && listIndex < listItems.size()) + setSelectedIndex(data, element, listToOptionIndex(data, element, listIndex)); #endif if (handled) event->setDefaultHandled(); @@ -567,7 +603,17 @@ void SelectElement::menuListDefaultEventHandler(SelectElementData& data, Element int keyCode = static_cast<KeyboardEvent*>(event)->keyCode(); bool handled = false; -#if ARROW_KEYS_POP_MENU +#if SPACE_OR_RETURN_POP_MENU + if (keyCode == ' ' || keyCode == '\r') { + element->focus(); + // Save the selection so it can be compared to the new selection when dispatching change events during setSelectedIndex, + // which gets called from RenderMenuList::valueChanged, which gets called after the user makes a selection from the menu. + saveLastSelection(data, element); + if (RenderMenuList* menuList = static_cast<RenderMenuList*>(element->renderer())) + menuList->showPopup(); + handled = true; + } +#elif ARROW_KEYS_POP_MENU if (keyCode == ' ') { element->focus(); // Save the selection so it can be compared to the new selection when dispatching change events during setSelectedIndex, diff --git a/src/3rdparty/webkit/WebCore/dom/StyledElement.cpp b/src/3rdparty/webkit/WebCore/dom/StyledElement.cpp index c22ecf9331..456cc520b3 100644 --- a/src/3rdparty/webkit/WebCore/dom/StyledElement.cpp +++ b/src/3rdparty/webkit/WebCore/dom/StyledElement.cpp @@ -194,8 +194,8 @@ void StyledElement::attributeChanged(Attribute* attr, bool preserveDecls) if (needToParse) parseMappedAttribute(mappedAttr); - if (entry == eNone && ownerDocument()->attached() && ownerDocument()->styleSelector()->hasSelectorForAttribute(attr->name().localName())) - setNeedsStyleRecalc(); + if (entry == eNone) + recalcStyleIfNeededAfterAttributeChanged(attr); if (checkDecl && mappedAttr->decl()) { // Add the decl to the table in the appropriate spot. @@ -206,7 +206,7 @@ void StyledElement::attributeChanged(Attribute* attr, bool preserveDecls) if (namedAttrMap) mappedAttributes()->declAdded(); } - Element::attributeChanged(attr, preserveDecls); + updateAfterAttributeChanged(attr); } bool StyledElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const diff --git a/src/3rdparty/webkit/WebCore/dom/Text.cpp b/src/3rdparty/webkit/WebCore/dom/Text.cpp index 04e499afbe..bbd926bed7 100644 --- a/src/3rdparty/webkit/WebCore/dom/Text.cpp +++ b/src/3rdparty/webkit/WebCore/dom/Text.cpp @@ -260,6 +260,19 @@ RenderObject *Text::createRenderer(RenderArena* arena, RenderStyle*) void Text::attach() { +#if ENABLE(WML) + if (document()->isWMLDocument() && !containsOnlyWhitespace()) { + String text = m_data; + ASSERT(!text.isEmpty()); + + text = substituteVariableReferences(text, document()); + + ExceptionCode code = 0; + setData(text, code); + ASSERT(!code); + } +#endif + createRendererIfNeeded(); CharacterData::attach(); } @@ -319,29 +332,6 @@ PassRefPtr<Text> Text::createWithLengthLimit(Document* doc, const String& text, return new Text(doc, nodeText); } -#if ENABLE(WML) -void Text::insertedIntoDocument() -{ - CharacterData::insertedIntoDocument(); - - if (!parentNode()->isWMLElement() || !length()) - return; - - WMLPageState* pageState = wmlPageStateForDocument(document()); - if (!pageState->hasVariables()) - return; - - String text = data(); - if (!text.impl() || text.impl()->containsOnlyWhitespace()) - return; - - text = substituteVariableReferences(text, document()); - - ExceptionCode ec; - setData(text, ec); -} -#endif - #ifndef NDEBUG void Text::formatForDebugger(char *buffer, unsigned length) const { diff --git a/src/3rdparty/webkit/WebCore/dom/Text.h b/src/3rdparty/webkit/WebCore/dom/Text.h index 5e711d02c1..e5a6e69e3e 100644 --- a/src/3rdparty/webkit/WebCore/dom/Text.h +++ b/src/3rdparty/webkit/WebCore/dom/Text.h @@ -59,10 +59,6 @@ public: static PassRefPtr<Text> createWithLengthLimit(Document*, const String&, unsigned& charsLeft, unsigned maxChars = cTextNodeLengthLimit); -#if ENABLE(WML) - virtual void insertedIntoDocument(); -#endif - #ifndef NDEBUG virtual void formatForDebugger(char* buffer, unsigned length) const; #endif diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp index 95f63e9091..4387a66a78 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp @@ -72,7 +72,7 @@ using namespace std; namespace WebCore { -class PendingCallbacks : Noncopyable { +class PendingCallbacks : public Noncopyable { public: ~PendingCallbacks() { diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerScope.h b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerScope.h index a3c1188b48..c29b796043 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerScope.h +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerScope.h @@ -36,7 +36,7 @@ namespace WebCore { class DocLoader; - class XMLTokenizerScope : Noncopyable { + class XMLTokenizerScope : public Noncopyable { public: XMLTokenizerScope(DocLoader* docLoader); ~XMLTokenizerScope(); diff --git a/src/3rdparty/webkit/WebCore/dom/make_names.pl b/src/3rdparty/webkit/WebCore/dom/make_names.pl index 12f0ec7f61..e6d59a01e5 100755 --- a/src/3rdparty/webkit/WebCore/dom/make_names.pl +++ b/src/3rdparty/webkit/WebCore/dom/make_names.pl @@ -875,22 +875,23 @@ sub printWrapperFunctions } # Hack for the media tags + # FIXME: This should have been done via a CustomWrapper attribute and a separate *Custom file. if ($tags{$tagName}{"wrapperOnlyIfMediaIsAvailable"}) { print F <<END -static JSNode* create${JSInterfaceName}Wrapper(ExecState* exec, PassRefPtr<$parameters{'namespace'}Element> element) +static JSNode* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{'namespace'}Element> element) { if (!MediaPlayer::isAvailable()) - return CREATE_DOM_NODE_WRAPPER(exec, $parameters{'namespace'}Element, element.get()); - return CREATE_DOM_NODE_WRAPPER(exec, ${JSInterfaceName}, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, $parameters{'namespace'}Element, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, ${JSInterfaceName}, element.get()); } END ; } else { print F <<END -static JSNode* create${JSInterfaceName}Wrapper(ExecState* exec, PassRefPtr<$parameters{'namespace'}Element> element) +static JSNode* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{'namespace'}Element> element) { - return CREATE_DOM_NODE_WRAPPER(exec, ${JSInterfaceName}, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, ${JSInterfaceName}, element.get()); } END @@ -931,7 +932,7 @@ namespace WebCore { using namespace $parameters{'namespace'}Names; -typedef JSNode* (*Create$parameters{'namespace'}ElementWrapperFunction)(ExecState*, PassRefPtr<$parameters{'namespace'}Element>); +typedef JSNode* (*Create$parameters{'namespace'}ElementWrapperFunction)(ExecState*, JSDOMGlobalObject*, PassRefPtr<$parameters{'namespace'}Element>); END ; @@ -939,7 +940,7 @@ END printWrapperFunctions($F); print F <<END -JSNode* createJS$parameters{'namespace'}Wrapper(ExecState* exec, PassRefPtr<$parameters{'namespace'}Element> element) +JSNode* createJS$parameters{'namespace'}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{'namespace'}Element> element) { typedef HashMap<WebCore::AtomicStringImpl*, Create$parameters{'namespace'}ElementWrapperFunction> FunctionMap; DEFINE_STATIC_LOCAL(FunctionMap, map, ()); @@ -969,8 +970,8 @@ END } Create$parameters{'namespace'}ElementWrapperFunction createWrapperFunction = map.get(element->localName().impl()); if (createWrapperFunction) - return createWrapperFunction(exec, element); - return CREATE_DOM_NODE_WRAPPER(exec, $parameters{'namespace'}Element, element.get()); + return createWrapperFunction(exec, globalObject, element); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, $parameters{'namespace'}Element, element.get()); } } @@ -1006,9 +1007,10 @@ namespace JSC { namespace WebCore { class JSNode; + class JSDOMGlobalObject; class $parameters{'namespace'}Element; - JSNode* createJS$parameters{'namespace'}Wrapper(JSC::ExecState*, PassRefPtr<$parameters{'namespace'}Element>); + JSNode* createJS$parameters{'namespace'}Wrapper(JSC::ExecState*, JSDOMGlobalObject*, PassRefPtr<$parameters{'namespace'}Element>); } diff --git a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp index 998a1e2df0..36cd823158 100644 --- a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp @@ -98,13 +98,12 @@ void StyleChange::init(PassRefPtr<CSSStyleDeclaration> style, const Position& po Document* document = position.node() ? position.node()->document() : 0; if (!document || !document->frame()) return; - + bool useHTMLFormattingTags = !document->frame()->editor()->shouldStyleWithCSS(); - RefPtr<CSSMutableStyleDeclaration> mutableStyle = style->makeMutable(); - + // We shouldn't have both text-decoration and -webkit-text-decorations-in-effect because that wouldn't make sense. + ASSERT(!mutableStyle->getPropertyCSSValue(CSSPropertyTextDecoration) || !mutableStyle->getPropertyCSSValue(CSSPropertyWebkitTextDecorationsInEffect)); String styleText(""); - bool addedDirection = false; CSSMutableStyleDeclaration::const_iterator end = mutableStyle->end(); for (CSSMutableStyleDeclaration::const_iterator it = mutableStyle->begin(); it != end; ++it) { @@ -130,12 +129,12 @@ void StyleChange::init(PassRefPtr<CSSStyleDeclaration> style, const Position& po } // Add this property - - if (property->id() == CSSPropertyWebkitTextDecorationsInEffect) { - // we have to special-case text decorations - // FIXME: Why? + if (property->id() == CSSPropertyTextDecoration || property->id() == CSSPropertyWebkitTextDecorationsInEffect) { + // Always use text-decoration because -webkit-text-decoration-in-effect is internal. CSSProperty alteredProperty(CSSPropertyTextDecoration, property->value(), property->isImportant()); - styleText += alteredProperty.cssText(); + // We don't add "text-decoration: none" because it doesn't override the existing text decorations; i.e. redundant + if (!equalIgnoringCase(alteredProperty.value()->cssText(), "none")) + styleText += alteredProperty.cssText(); } else styleText += property->cssText(); @@ -962,6 +961,25 @@ bool ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle( if (elem->hasLocalName(iTag) || elem->hasLocalName(emTag)) return true; break; + case CSSPropertyTextDecoration: + case CSSPropertyWebkitTextDecorationsInEffect: + ASSERT(property.value()); + if (property.value()->isValueList()) { + CSSValueList* valueList = static_cast<CSSValueList*>(property.value()); + DEFINE_STATIC_LOCAL(RefPtr<CSSPrimitiveValue>, underline, (CSSPrimitiveValue::createIdentifier(CSSValueUnderline))); + DEFINE_STATIC_LOCAL(RefPtr<CSSPrimitiveValue>, lineThrough, (CSSPrimitiveValue::createIdentifier(CSSValueLineThrough))); + // Because style is new style to be applied, we delete element only if the element is not used in style. + if (!valueList->hasValue(underline.get()) && elem->hasLocalName(uTag)) + return true; + if (!valueList->hasValue(lineThrough.get()) && (elem->hasLocalName(strikeTag) || elem->hasLocalName(sTag))) + return true; + } else { + // If the value is NOT a list, then it must be "none", in which case we should remove all text decorations. + ASSERT(property.value()->cssText() == "none"); + if (elem->hasLocalName(uTag) || elem->hasLocalName(strikeTag) || elem->hasLocalName(sTag)) + return true; + } + break; } } return false; @@ -1075,11 +1093,17 @@ static bool hasTextDecorationProperty(Node *node) static Node* highestAncestorWithTextDecoration(Node *node) { - Node *result = NULL; + ASSERT(node); + Node* result = 0; + Node* unsplittableElement = unsplittableElementForPosition(Position(node, 0)); for (Node *n = node; n; n = n->parentNode()) { if (hasTextDecorationProperty(n)) result = n; + // Should stop at the editable root (cannot cross editing boundary) and + // also stop at the unsplittable element to be consistent with other UAs + if (n == unsplittableElement) + break; } return result; @@ -1162,32 +1186,35 @@ void ApplyStyleCommand::applyTextDecorationStyle(Node *node, CSSMutableStyleDecl } } -void ApplyStyleCommand::pushDownTextDecorationStyleAroundNode(Node* node, bool force) +void ApplyStyleCommand::pushDownTextDecorationStyleAroundNode(Node* targetNode, bool forceNegate) { - Node *highestAncestor = highestAncestorWithTextDecoration(node); - - if (highestAncestor) { - Node *nextCurrent; - Node *nextChild; - for (Node *current = highestAncestor; current != node; current = nextCurrent) { - ASSERT(current); - - nextCurrent = NULL; - - RefPtr<CSSMutableStyleDeclaration> decoration = force ? extractAndNegateTextDecorationStyle(current) : extractTextDecorationStyle(current); + ASSERT(targetNode); + Node* highestAncestor = highestAncestorWithTextDecoration(targetNode); + if (!highestAncestor) + return; - for (Node *child = current->firstChild(); child; child = nextChild) { - nextChild = child->nextSibling(); + // The outer loop is traversing the tree vertically from highestAncestor to targetNode + Node* current = highestAncestor; + while (current != targetNode) { + ASSERT(current); + ASSERT(current->contains(targetNode)); + RefPtr<CSSMutableStyleDeclaration> decoration = forceNegate ? extractAndNegateTextDecorationStyle(current) : extractTextDecorationStyle(current); + + // The inner loop will go through children on each level + Node* child = current->firstChild(); + while (child) { + Node* nextChild = child->nextSibling(); + + // Apply text decoration to all nodes containing targetNode and their siblings but NOT to targetNode + if (child != targetNode) + applyTextDecorationStyle(child, decoration.get()); + + // We found the next node for the outer loop (contains targetNode) + // When reached targetNode, stop the outer loop upon the completion of the current inner loop + if (child == targetNode || child->contains(targetNode)) + current = child; - if (node == child) { - nextCurrent = child; - } else if (node->isDescendantOf(child)) { - applyTextDecorationStyle(child, decoration.get()); - nextCurrent = child; - } else { - applyTextDecorationStyle(child, decoration.get()); - } - } + child = nextChild; } } } diff --git a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.h b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.h index 74fe605ef9..61213d86ba 100644 --- a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.h +++ b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.h @@ -73,7 +73,7 @@ private: PassRefPtr<CSSMutableStyleDeclaration> extractTextDecorationStyle(Node*); PassRefPtr<CSSMutableStyleDeclaration> extractAndNegateTextDecorationStyle(Node*); void applyTextDecorationStyle(Node*, CSSMutableStyleDeclaration *style); - void pushDownTextDecorationStyleAroundNode(Node*, bool force); + void pushDownTextDecorationStyleAroundNode(Node*, bool forceNegate); void pushDownTextDecorationStyleAtBoundaries(const Position& start, const Position& end); // style-application helpers diff --git a/src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp b/src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp index 284f073ed8..d3ac34147c 100644 --- a/src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp @@ -260,8 +260,8 @@ static void removeEnclosingAnchorStyle(CSSMutableStyleDeclaration* style, const if (!enclosingAnchor || !enclosingAnchor->parentNode()) return; - RefPtr<CSSMutableStyleDeclaration> parentStyle = Position(enclosingAnchor->parentNode(), 0).computedStyle()->copyInheritableProperties(); - RefPtr<CSSMutableStyleDeclaration> anchorStyle = Position(enclosingAnchor, 0).computedStyle()->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> parentStyle = Position(enclosingAnchor->parentNode(), 0).computedStyle()->deprecatedCopyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> anchorStyle = Position(enclosingAnchor, 0).computedStyle()->deprecatedCopyInheritableProperties(); parentStyle->diff(anchorStyle.get()); anchorStyle->diff(style); } @@ -280,7 +280,7 @@ void DeleteSelectionCommand::saveTypingStyleState() // Figure out the typing style in effect before the delete is done. RefPtr<CSSComputedStyleDeclaration> computedStyle = positionBeforeTabSpan(m_selectionToDelete.start()).computedStyle(); - m_typingStyle = computedStyle->copyInheritableProperties(); + m_typingStyle = computedStyle->deprecatedCopyInheritableProperties(); removeEnclosingAnchorStyle(m_typingStyle.get(), m_selectionToDelete.start()); @@ -288,7 +288,7 @@ void DeleteSelectionCommand::saveTypingStyleState() // We'll use this later in computeTypingStyleAfterDelete if we end up outside of a Mail blockquote if (nearestMailBlockquote(m_selectionToDelete.start().node())) { computedStyle = m_selectionToDelete.end().computedStyle(); - m_deleteIntoBlockquoteStyle = computedStyle->copyInheritableProperties(); + m_deleteIntoBlockquoteStyle = computedStyle->deprecatedCopyInheritableProperties(); } else m_deleteIntoBlockquoteStyle = 0; } diff --git a/src/3rdparty/webkit/WebCore/editing/EditCommand.cpp b/src/3rdparty/webkit/WebCore/editing/EditCommand.cpp index fefe658da4..d82623155b 100644 --- a/src/3rdparty/webkit/WebCore/editing/EditCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/EditCommand.cpp @@ -197,7 +197,7 @@ bool EditCommand::isTypingCommand() const PassRefPtr<CSSMutableStyleDeclaration> EditCommand::styleAtPosition(const Position &pos) { - RefPtr<CSSMutableStyleDeclaration> style = positionBeforeTabSpan(pos).computedStyle()->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> style = positionBeforeTabSpan(pos).computedStyle()->deprecatedCopyInheritableProperties(); // FIXME: It seems misleading to also include the typing style when returning the style at some arbitrary // position in the document. diff --git a/src/3rdparty/webkit/WebCore/editing/Editor.cpp b/src/3rdparty/webkit/WebCore/editing/Editor.cpp index b62ded7496..0b150d3b17 100644 --- a/src/3rdparty/webkit/WebCore/editing/Editor.cpp +++ b/src/3rdparty/webkit/WebCore/editing/Editor.cpp @@ -2258,20 +2258,9 @@ static void markMisspellingsOrBadGrammar(Editor* editor, const VisibleSelection& Node* editableNode = searchRange->startContainer(); if (!editableNode || !editableNode->isContentEditable()) return; - - // Ascend the DOM tree to find a "spellcheck" attribute. - // When we find a "spellcheck" attribute, retrieve its value and exit if its value is "false". - const Node* node = editor->frame()->document()->focusedNode(); - while (node) { - if (node->isElementNode()) { - const WebCore::AtomicString& value = static_cast<const Element*>(node)->getAttribute(spellcheckAttr); - if (equalIgnoringCase(value, "true")) - break; - if (equalIgnoringCase(value, "false")) - return; - } - node = node->parent(); - } + + if (!editor->spellCheckingEnabledInFocusedNode()) + return; // Get the spell checker if it is available if (!editor->client()) @@ -2289,6 +2278,24 @@ static void markMisspellingsOrBadGrammar(Editor* editor, const VisibleSelection& } } +bool Editor::spellCheckingEnabledInFocusedNode() const +{ + // Ascend the DOM tree to find a "spellcheck" attribute. + // When we find a "spellcheck" attribute, retrieve its value and return false if its value is "false". + const Node* node = frame()->document()->focusedNode(); + while (node) { + if (node->isElementNode()) { + const WebCore::AtomicString& value = static_cast<const Element*>(node)->getAttribute(spellcheckAttr); + if (equalIgnoringCase(value, "true")) + return true; + if (equalIgnoringCase(value, "false")) + return false; + } + node = node->parent(); + } + return true; +} + void Editor::markMisspellings(const VisibleSelection& selection, RefPtr<Range>& firstMisspellingRange) { markMisspellingsOrBadGrammar(this, selection, true, firstMisspellingRange); @@ -2325,7 +2332,10 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range* Node* editableNode = spellingRange->startContainer(); if (!editableNode || !editableNode->isContentEditable()) return; - + + if (!spellCheckingEnabledInFocusedNode()) + return; + // Expand the range to encompass entire paragraphs, since text checking needs that much context. int spellingRangeStartOffset = 0; int spellingRangeEndOffset = 0; diff --git a/src/3rdparty/webkit/WebCore/editing/Editor.h b/src/3rdparty/webkit/WebCore/editing/Editor.h index 67a4b5973c..5b0cc9c9d5 100644 --- a/src/3rdparty/webkit/WebCore/editing/Editor.h +++ b/src/3rdparty/webkit/WebCore/editing/Editor.h @@ -196,6 +196,7 @@ public: Vector<String> guessesForMisspelledSelection(); Vector<String> guessesForUngrammaticalSelection(); Vector<String> guessesForMisspelledOrUngrammaticalSelection(bool& misspelled, bool& ungrammatical); + bool spellCheckingEnabledInFocusedNode() const; void markMisspellingsAfterTypingToPosition(const VisiblePosition&); void markMisspellings(const VisibleSelection&, RefPtr<Range>& firstMisspellingRange); void markBadGrammar(const VisibleSelection&); diff --git a/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp b/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp index 5a189d4d88..e4d94c2e68 100644 --- a/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp @@ -27,6 +27,7 @@ #include "config.h" #include "AtomicString.h" +#include "CSSComputedStyleDeclaration.h" #include "CSSMutableStyleDeclaration.h" #include "CSSPropertyNames.h" #include "CSSValueKeywords.h" @@ -89,64 +90,71 @@ static Frame* targetFrame(Frame* frame, Event* event) return node->document()->frame(); } -static bool executeApplyStyle(Frame* frame, EditorCommandSource source, EditAction action, int propertyID, const String& propertyValue) +static bool applyCommandToFrame(Frame* frame, EditorCommandSource source, EditAction action, CSSMutableStyleDeclaration* style) { - RefPtr<CSSMutableStyleDeclaration> style = CSSMutableStyleDeclaration::create(); - style->setProperty(propertyID, propertyValue); // FIXME: We don't call shouldApplyStyle when the source is DOM; is there a good reason for that? switch (source) { case CommandFromMenuOrKeyBinding: - frame->editor()->applyStyleToSelection(style.get(), action); + frame->editor()->applyStyleToSelection(style, action); return true; case CommandFromDOM: case CommandFromDOMWithUserInterface: - frame->editor()->applyStyle(style.get()); + frame->editor()->applyStyle(style); return true; } ASSERT_NOT_REACHED(); return false; } -static bool executeApplyStyle(Frame* frame, EditorCommandSource source, EditAction action, int propertyID, const char* propertyValue) +static bool executeApplyStyle(Frame* frame, EditorCommandSource source, EditAction action, int propertyID, const String& propertyValue) { - return executeApplyStyle(frame, source, action, propertyID, String(propertyValue)); + RefPtr<CSSMutableStyleDeclaration> style = CSSMutableStyleDeclaration::create(); + style->setProperty(propertyID, propertyValue); + return applyCommandToFrame(frame, source, action, style.get()); } static bool executeApplyStyle(Frame* frame, EditorCommandSource source, EditAction action, int propertyID, int propertyValue) { RefPtr<CSSMutableStyleDeclaration> style = CSSMutableStyleDeclaration::create(); style->setProperty(propertyID, propertyValue); - // FIXME: We don't call shouldApplyStyle when the source is DOM; is there a good reason for that? - switch (source) { - case CommandFromMenuOrKeyBinding: - frame->editor()->applyStyleToSelection(style.get(), action); - return true; - case CommandFromDOM: - case CommandFromDOMWithUserInterface: - frame->editor()->applyStyle(style.get()); - return true; - } - ASSERT_NOT_REACHED(); - return false; + return applyCommandToFrame(frame, source, action, style.get()); } +static bool executeToggleStyleInList(Frame* frame, EditorCommandSource source, EditAction action, int propertyID, CSSValue* value) +{ + ExceptionCode ec = 0; + Node* nodeToRemove = 0; + RefPtr<CSSComputedStyleDeclaration> selectionStyle = frame->selectionComputedStyle(nodeToRemove); + RefPtr<CSSValue> selectedCSSValue = selectionStyle->getPropertyCSSValue(propertyID); + String newStyle = "none"; + if (selectedCSSValue->isValueList()) { + RefPtr<CSSValueList> selectedCSSValueList = static_cast<CSSValueList*>(selectedCSSValue.get()); + if (!selectedCSSValueList->removeAll(value)) + selectedCSSValueList->append(value); + if (selectedCSSValueList->length()) + newStyle = selectedCSSValueList->cssText(); + + } else if (selectedCSSValue->cssText() == "none") + newStyle = value->cssText(); + + ASSERT(ec == 0); + if (nodeToRemove) { + nodeToRemove->remove(ec); + ASSERT(ec == 0); + } + + // FIXME: We shouldn't be having to convert new style into text. We should have setPropertyCSSValue. + RefPtr<CSSMutableStyleDeclaration> newMutableStyle = CSSMutableStyleDeclaration::create(); + newMutableStyle->setProperty(propertyID, newStyle,ec); + return applyCommandToFrame(frame, source, action, newMutableStyle.get()); +} + static bool executeToggleStyle(Frame* frame, EditorCommandSource source, EditAction action, int propertyID, const char* offValue, const char* onValue) { RefPtr<CSSMutableStyleDeclaration> style = CSSMutableStyleDeclaration::create(); style->setProperty(propertyID, onValue); style->setProperty(propertyID, frame->editor()->selectionStartHasStyle(style.get()) ? offValue : onValue); - // FIXME: We don't call shouldApplyStyle when the source is DOM; is there a good reason for that? - switch (source) { - case CommandFromMenuOrKeyBinding: - frame->editor()->applyStyleToSelection(style.get(), action); - return true; - case CommandFromDOM: - case CommandFromDOMWithUserInterface: - frame->editor()->applyStyle(style.get()); - return true; - } - ASSERT_NOT_REACHED(); - return false; + return applyCommandToFrame(frame, source, action, style.get()); } static bool executeApplyParagraphStyle(Frame* frame, EditorCommandSource source, EditAction action, int propertyID, const String& propertyValue) @@ -937,7 +945,8 @@ static bool executeSetMark(Frame* frame, Event*, EditorCommandSource, const Stri static bool executeStrikethrough(Frame* frame, Event*, EditorCommandSource source, const String&) { - return executeToggleStyle(frame, source, EditActionChangeAttributes, CSSPropertyWebkitTextDecorationsInEffect, "none", "line-through"); + RefPtr<CSSPrimitiveValue> lineThrough = CSSPrimitiveValue::createIdentifier(CSSValueLineThrough); + return executeToggleStyleInList(frame, source, EditActionUnderline, CSSPropertyWebkitTextDecorationsInEffect, lineThrough.get()); } static bool executeStyleWithCSS(Frame* frame, Event*, EditorCommandSource, const String& value) @@ -990,8 +999,8 @@ static bool executeTranspose(Frame* frame, Event*, EditorCommandSource, const St static bool executeUnderline(Frame* frame, Event*, EditorCommandSource source, const String&) { - // FIXME: This currently clears overline, line-through, and blink as an unwanted side effect. - return executeToggleStyle(frame, source, EditActionUnderline, CSSPropertyWebkitTextDecorationsInEffect, "none", "underline"); + RefPtr<CSSPrimitiveValue> underline = CSSPrimitiveValue::createIdentifier(CSSValueUnderline); + return executeToggleStyleInList(frame, source, EditActionUnderline, CSSPropertyWebkitTextDecorationsInEffect, underline.get()); } static bool executeUndo(Frame* frame, Event*, EditorCommandSource, const String&) diff --git a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp index 890cff233a..42dd515fb6 100644 --- a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp @@ -33,6 +33,7 @@ #include "InsertLineBreakCommand.h" #include "InsertListCommand.h" #include "Range.h" +#include "DocumentFragment.h" #include "SplitElementCommand.h" #include "TextIterator.h" #include "htmlediting.h" @@ -57,18 +58,9 @@ static PassRefPtr<HTMLBlockquoteElement> createIndentBlockquoteElement(Document* return element.release(); } -static bool isIndentBlockquote(const Node* node) -{ - if (!node || !node->hasTagName(blockquoteTag) || !node->isElementNode()) - return false; - - const Element* elem = static_cast<const Element*>(node); - return elem->getAttribute(classAttr) == indentBlockquoteString(); -} - static bool isListOrIndentBlockquote(const Node* node) { - return node && (node->hasTagName(ulTag) || node->hasTagName(olTag) || isIndentBlockquote(node)); + return node && (node->hasTagName(ulTag) || node->hasTagName(olTag) || node->hasTagName(blockquoteTag)); } IndentOutdentCommand::IndentOutdentCommand(Document* document, EIndentType typeOfAction, int marginInPixels) @@ -76,37 +68,6 @@ IndentOutdentCommand::IndentOutdentCommand(Document* document, EIndentType typeO { } -// This function is a workaround for moveParagraph's tendency to strip blockquotes. It updates lastBlockquote to point to the -// correct level for the current paragraph, and returns a pointer to a placeholder br where the insertion should be performed. -PassRefPtr<Element> IndentOutdentCommand::prepareBlockquoteLevelForInsertion(const VisiblePosition& currentParagraph, RefPtr<Element>& lastBlockquote) -{ - int currentBlockquoteLevel = 0; - int lastBlockquoteLevel = 0; - Node* node = currentParagraph.deepEquivalent().node(); - while ((node = enclosingNodeOfType(Position(node->parentNode(), 0), &isIndentBlockquote))) - currentBlockquoteLevel++; - node = lastBlockquote.get(); - while ((node = enclosingNodeOfType(Position(node->parentNode(), 0), &isIndentBlockquote))) - lastBlockquoteLevel++; - while (currentBlockquoteLevel > lastBlockquoteLevel) { - RefPtr<Element> newBlockquote = createIndentBlockquoteElement(document()); - appendNode(newBlockquote, lastBlockquote); - lastBlockquote = newBlockquote; - lastBlockquoteLevel++; - } - while (currentBlockquoteLevel < lastBlockquoteLevel) { - lastBlockquote = static_cast<Element*>(enclosingNodeOfType(Position(lastBlockquote->parentNode(), 0), isIndentBlockquote)); - lastBlockquoteLevel--; - } - RefPtr<Element> placeholder = createBreakElement(document()); - appendNode(placeholder, lastBlockquote); - // Add another br before the placeholder if it collapsed. - VisiblePosition visiblePos(Position(placeholder.get(), 0)); - if (!isStartOfParagraph(visiblePos)) - insertNodeBefore(createBreakElement(document()), placeholder); - return placeholder.release(); -} - bool IndentOutdentCommand::tryIndentingAsListItem(const VisiblePosition& endOfCurrentParagraph) { // If our selection is not inside a list, bail out. @@ -115,20 +76,19 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const VisiblePosition& endOfCu if (!listNode) return false; - HTMLElement* selectedListItem = enclosingListChild(lastNodeInSelectedParagraph); + // Find the list item enclosing the current paragraph + Element* selectedListItem = static_cast<Element*>(enclosingBlock(endOfCurrentParagraph.deepEquivalent().node())); + // FIXME: we need to deal with the case where there is no li (malformed HTML) + if (!selectedListItem->hasTagName(liTag)) + return false; // FIXME: previousElementSibling does not ignore non-rendered content like <span></span>. Should we? Element* previousList = selectedListItem->previousElementSibling(); Element* nextList = selectedListItem->nextElementSibling(); RefPtr<Element> newList = document()->createElement(listNode->tagQName(), false); - RefPtr<Element> newListItem = selectedListItem->cloneElementWithoutChildren(); - RefPtr<Element> placeholder = createBreakElement(document()); insertNodeBefore(newList, selectedListItem); - appendNode(newListItem, newList); - appendNode(placeholder, newListItem); - - moveParagraph(startOfParagraph(endOfCurrentParagraph), endOfCurrentParagraph, VisiblePosition(Position(placeholder, 0)), true); + appendParagraphIntoNode(visiblePositionBeforeNode(selectedListItem), visiblePositionAfterNode(selectedListItem), newList.get()); if (canMergeLists(previousList, newList.get())) mergeIdenticalElements(previousList, newList); @@ -138,29 +98,27 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const VisiblePosition& endOfCu return true; } -void IndentOutdentCommand::indentIntoBlockquote(const VisiblePosition& endOfCurrentParagraph, const VisiblePosition& endOfNextParagraph, RefPtr<Element>& targetBlockquote) +void IndentOutdentCommand::indentIntoBlockquote(const VisiblePosition& startOfCurrentParagraph, const VisiblePosition& endOfCurrentParagraph, RefPtr<Element>& targetBlockquote, Node* nodeToSplitTo) { Node* enclosingCell = 0; if (!targetBlockquote) { - // Create a new blockquote and insert it as a child of the root editable element. We accomplish + // Create a new blockquote and insert it as a child of the enclosing block element. We accomplish // this by splitting all parents of the current paragraph up to that point. targetBlockquote = createIndentBlockquoteElement(document()); - Position start = startOfParagraph(endOfCurrentParagraph).deepEquivalent(); - enclosingCell = enclosingNodeOfType(start, &isTableCell); - Node* nodeToSplitTo = enclosingCell ? enclosingCell : editableRootForPosition(start); - RefPtr<Node> startOfNewBlock = splitTreeToNode(start.node(), nodeToSplitTo); + if (isTableCell(nodeToSplitTo)) + enclosingCell = nodeToSplitTo; + RefPtr<Node> startOfNewBlock = splitTreeToNode(startOfCurrentParagraph.deepEquivalent().node(), nodeToSplitTo); insertNodeBefore(targetBlockquote, startOfNewBlock); } - RefPtr<Element> insertionPoint = prepareBlockquoteLevelForInsertion(endOfCurrentParagraph, targetBlockquote); + VisiblePosition endOfNextParagraph = endOfParagraph(endOfCurrentParagraph.next()); + appendParagraphIntoNode(startOfCurrentParagraph, endOfCurrentParagraph, targetBlockquote.get()); // Don't put the next paragraph in the blockquote we just created for this paragraph unless // the next paragraph is in the same cell. if (enclosingCell && enclosingCell != enclosingNodeOfType(endOfNextParagraph.deepEquivalent(), &isTableCell)) targetBlockquote = 0; - - moveParagraph(startOfParagraph(endOfCurrentParagraph), endOfCurrentParagraph, VisiblePosition(Position(insertionPoint, 0)), true); } bool IndentOutdentCommand::isAtUnsplittableElement(const Position& pos) const @@ -169,13 +127,64 @@ bool IndentOutdentCommand::isAtUnsplittableElement(const Position& pos) const return node == editableRootForPosition(pos) || node == enclosingNodeOfType(pos, &isTableCell); } +// Enclose all nodes between start and end by newParent, which is a sibling node of nodes between start and end +// FIXME: moveParagraph is overly complicated. We need to clean up moveParagraph so that it uses appendParagraphIntoNode +// or prepare more specialized functions and delete moveParagraph +void IndentOutdentCommand::appendParagraphIntoNode(const VisiblePosition& start, const VisiblePosition& end, Node* newParent) +{ + ASSERT(newParent); + ASSERT(newParent->isContentEditable()); + ASSERT(isStartOfParagraph(start) && isEndOfParagraph(end)); + + Position endOfParagraph = end.deepEquivalent().downstream(); + Node* insertionPoint = newParent->lastChild();// Remember the place to put br later + // Look for the beginning of the last paragraph in newParent + Node* startOfLastParagraph = startOfParagraph(Position(newParent, newParent->childNodeCount())).deepEquivalent().node(); + if (startOfLastParagraph && !startOfLastParagraph->isDescendantOf(newParent)) + startOfLastParagraph = 0; + + // Extend the range so that we can append wrapping nodes as well if they're containd within the paragraph + ExceptionCode ec = 0; + RefPtr<Range> selectedRange = createRange(document(), start, end, ec); + RefPtr<Range> extendedRange = extendRangeToWrappingNodes(selectedRange, selectedRange.get(), newParent->parentNode()); + newParent->appendChild(extendedRange->extractContents(ec), ec); + + // If the start of paragraph didn't change by appending nodes, we should insert br to seperate the paragraphs. + Node* startOfNewParagraph = startOfParagraph(Position(newParent, newParent->childNodeCount())).deepEquivalent().node(); + if (startOfNewParagraph == startOfLastParagraph) { + if (insertionPoint) + newParent->insertBefore(createBreakElement(document()), insertionPoint->nextSibling(), ec); + else + newParent->appendChild(createBreakElement(document()), ec); + } + + // Remove unnecessary br from the place where we moved the paragraph from + removeUnnecessaryLineBreakAt(endOfParagraph); +} + +void IndentOutdentCommand::removeUnnecessaryLineBreakAt(const Position& endOfParagraph) +{ + // If there is something in this paragraph, then don't remove br. + if (!isStartOfParagraph(endOfParagraph) || !isEndOfParagraph(endOfParagraph)) + return; + + // We only care about br at the end of paragraph + Node* br = endOfParagraph.node(); + Node* parentNode = br->parentNode(); + + // If the node isn't br or the parent node is empty, then don't remove. + if (!br->hasTagName(brTag) || isVisiblyAdjacent(positionBeforeNode(parentNode), positionAfterNode(parentNode))) + return; + + removeNodeAndPruneAncestors(br); +} + void IndentOutdentCommand::indentRegion() { VisibleSelection selection = selectionForParagraphIteration(endingSelection()); VisiblePosition startOfSelection = selection.visibleStart(); VisiblePosition endOfSelection = selection.visibleEnd(); - int startIndex = indexForVisiblePosition(startOfSelection); - int endIndex = indexForVisiblePosition(endOfSelection); + RefPtr<Range> selectedRange = selection.firstRange(); ASSERT(!startOfSelection.isNull()); ASSERT(!endOfSelection.isNull()); @@ -200,10 +209,24 @@ void IndentOutdentCommand::indentRegion() VisiblePosition endOfNextParagraph = endOfParagraph(endOfCurrentParagraph.next()); if (tryIndentingAsListItem(endOfCurrentParagraph)) blockquoteForNextIndent = 0; - else - indentIntoBlockquote(endOfCurrentParagraph, endOfNextParagraph, blockquoteForNextIndent); - // blockquoteForNextIndent maybe updated - // this is due to the way prepareBlockquoteLevelForInsertion was designed. + else { + VisiblePosition startOfCurrentParagraph = startOfParagraph(endOfCurrentParagraph); + Node* blockNode = enclosingBlock(endOfCurrentParagraph.deepEquivalent().node()); + // extend the region so that it contains all the ancestor blocks within the selection + ExceptionCode ec; + Element* unsplittableNode = unsplittableElementForPosition(endOfCurrentParagraph.deepEquivalent()); + RefPtr<Range> originalRange = createRange(document(), endOfCurrentParagraph, endOfCurrentParagraph, ec); + RefPtr<Range> extendedRange = extendRangeToWrappingNodes(originalRange, selectedRange.get(), unsplittableNode); + if (originalRange != extendedRange) { + ExceptionCode ec = 0; + endOfCurrentParagraph = endOfParagraph(extendedRange->endPosition().previous()); + blockNode = enclosingBlock(extendedRange->commonAncestorContainer(ec)); + } + + endOfNextParagraph = endOfParagraph(endOfCurrentParagraph.next()); + indentIntoBlockquote(startOfCurrentParagraph, endOfCurrentParagraph, blockquoteForNextIndent, blockNode); + // blockquoteForNextIndent will be updated in the function + } // Sanity check: Make sure our moveParagraph calls didn't remove endOfNextParagraph.deepEquivalent().node() // If somehow we did, return to prevent crashes. if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().node()->inDocument()) { @@ -212,11 +235,7 @@ void IndentOutdentCommand::indentRegion() } endOfCurrentParagraph = endOfNextParagraph; } - - RefPtr<Range> startRange = TextIterator::rangeFromLocationAndLength(document()->documentElement(), startIndex, 0, true); - RefPtr<Range> endRange = TextIterator::rangeFromLocationAndLength(document()->documentElement(), endIndex, 0, true); - if (startRange && endRange) - setEndingSelection(VisibleSelection(startRange->startPosition(), endRange->startPosition(), DOWNSTREAM)); + } void IndentOutdentCommand::outdentParagraph() @@ -238,7 +257,7 @@ void IndentOutdentCommand::outdentParagraph() return; } - // The selection is inside a blockquote + // The selection is inside a blockquote i.e. enclosingNode is a blockquote VisiblePosition positionInEnclosingBlock = VisiblePosition(Position(enclosingNode, 0)); VisiblePosition startOfEnclosingBlock = startOfBlock(positionInEnclosingBlock); VisiblePosition lastPositionInEnclosingBlock = VisiblePosition(Position(enclosingNode, enclosingNode->childNodeCount())); @@ -252,8 +271,8 @@ void IndentOutdentCommand::outdentParagraph() // just removed one, then this assumption isn't true. By splitting the next containing blockquote after this node, we keep this assumption true if (splitPoint) { if (Node* splitPointParent = splitPoint->parentNode()) { - if (isIndentBlockquote(splitPointParent) - && !isIndentBlockquote(splitPoint) + if (splitPointParent->hasTagName(blockquoteTag) + && !splitPoint->hasTagName(blockquoteTag) && isContentEditable(splitPointParent->parentNode())) // We can't outdent if there is no place to go! splitElement(static_cast<Element*>(splitPointParent), splitPoint); } @@ -269,10 +288,14 @@ void IndentOutdentCommand::outdentParagraph() return; } - Node* enclosingBlockFlow = enclosingBlockFlowElement(visibleStartOfParagraph); + Node* enclosingBlockFlow = enclosingBlock(visibleStartOfParagraph.deepEquivalent().node()); RefPtr<Node> splitBlockquoteNode = enclosingNode; if (enclosingBlockFlow != enclosingNode) - splitBlockquoteNode = splitTreeToNode(enclosingBlockFlowElement(visibleStartOfParagraph), enclosingNode, true); + splitBlockquoteNode = splitTreeToNode(enclosingBlockFlow, enclosingNode, true); + else { + // We split the blockquote at where we start outdenting. + splitElement(static_cast<Element*>(enclosingNode), visibleStartOfParagraph.deepEquivalent().node()); + } RefPtr<Node> placeholder = createBreakElement(document()); insertNodeBefore(placeholder, splitBlockquoteNode); moveParagraph(startOfParagraph(visibleStartOfParagraph), endOfParagraph(visibleEndOfParagraph), VisiblePosition(Position(placeholder.get(), 0)), true); diff --git a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h index a10b89d96d..104a0e7c78 100644 --- a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h +++ b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h @@ -48,13 +48,14 @@ private: // FIXME: Does this belong in htmlediting.cpp? bool isAtUnsplittableElement(const Position&) const; + void appendParagraphIntoNode(const VisiblePosition& start, const VisiblePosition& end, Node* newParent); + void removeUnnecessaryLineBreakAt(const Position& endOfParagraph); void indentRegion(); void outdentRegion(); void outdentParagraph(); - PassRefPtr<Element> prepareBlockquoteLevelForInsertion(const VisiblePosition&, RefPtr<Element>&); bool tryIndentingAsListItem(const VisiblePosition&); - void indentIntoBlockquote(const VisiblePosition&, const VisiblePosition&, RefPtr<Element>&); + void indentIntoBlockquote(const VisiblePosition&, const VisiblePosition&, RefPtr<Element>& targetBlockquote, Node* nodeToSplitTo); EIndentType m_typeOfAction; int m_marginInPixels; diff --git a/src/3rdparty/webkit/WebCore/editing/RemoveFormatCommand.cpp b/src/3rdparty/webkit/WebCore/editing/RemoveFormatCommand.cpp index 6d681ee4ee..1cf9aa2286 100644 --- a/src/3rdparty/webkit/WebCore/editing/RemoveFormatCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/RemoveFormatCommand.cpp @@ -55,7 +55,7 @@ void RemoveFormatCommand::doApply() // Get the default style for this editable root, it's the style that we'll give the // content that we're operating on. Node* root = frame->selection()->rootEditableElement(); - RefPtr<CSSMutableStyleDeclaration> defaultStyle = computedStyle(root)->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> defaultStyle = computedStyle(root)->deprecatedCopyInheritableProperties(); // Delete the selected content. // FIXME: We should be able to leave this to insertText, but its delete operation diff --git a/src/3rdparty/webkit/WebCore/editing/ReplaceSelectionCommand.cpp b/src/3rdparty/webkit/WebCore/editing/ReplaceSelectionCommand.cpp index c6da8642af..e0f62cffd2 100644 --- a/src/3rdparty/webkit/WebCore/editing/ReplaceSelectionCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/ReplaceSelectionCommand.cpp @@ -60,7 +60,7 @@ enum EFragmentType { EmptyFragment, SingleTextNodeFragment, TreeFragment }; // --- ReplacementFragment helper class -class ReplacementFragment : Noncopyable { +class ReplacementFragment : public Noncopyable { public: ReplacementFragment(Document*, DocumentFragment*, bool matchStyle, const VisibleSelection&); @@ -550,7 +550,7 @@ static bool handleStyleSpansBeforeInsertion(ReplacementFragment& fragment, const Node* sourceDocumentStyleSpan = topNode; RefPtr<Node> copiedRangeStyleSpan = sourceDocumentStyleSpan->firstChild(); - RefPtr<CSSMutableStyleDeclaration> styleAtInsertionPos = rangeCompliantEquivalent(insertionPos).computedStyle()->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> styleAtInsertionPos = rangeCompliantEquivalent(insertionPos).computedStyle()->deprecatedCopyInheritableProperties(); String styleText = styleAtInsertionPos->cssText(); if (styleText == static_cast<Element*>(sourceDocumentStyleSpan)->getAttribute(styleAttr)) { @@ -606,8 +606,8 @@ void ReplaceSelectionCommand::handleStyleSpans() // styles from blockquoteNode are allowed to override those from the source document, see <rdar://problem/4930986> and <rdar://problem/5089327>. Node* blockquoteNode = isMailPasteAsQuotationNode(context) ? context : nearestMailBlockquote(context); if (blockquoteNode) { - RefPtr<CSSMutableStyleDeclaration> blockquoteStyle = computedStyle(blockquoteNode)->copyInheritableProperties(); - RefPtr<CSSMutableStyleDeclaration> parentStyle = computedStyle(blockquoteNode->parentNode())->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> blockquoteStyle = computedStyle(blockquoteNode)->deprecatedCopyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> parentStyle = computedStyle(blockquoteNode->parentNode())->deprecatedCopyInheritableProperties(); parentStyle->diff(blockquoteStyle.get()); CSSMutableStyleDeclaration::const_iterator end = blockquoteStyle->end(); @@ -619,7 +619,7 @@ void ReplaceSelectionCommand::handleStyleSpans() context = blockquoteNode->parentNode(); } - RefPtr<CSSMutableStyleDeclaration> contextStyle = computedStyle(context)->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> contextStyle = computedStyle(context)->deprecatedCopyInheritableProperties(); contextStyle->diff(sourceDocumentStyle.get()); // Remove block properties in the span's style. This prevents properties that probably have no effect @@ -655,7 +655,7 @@ void ReplaceSelectionCommand::handleStyleSpans() // Remove redundant styles. context = copiedRangeStyleSpan->parentNode(); - contextStyle = computedStyle(context)->copyInheritableProperties(); + contextStyle = computedStyle(context)->deprecatedCopyInheritableProperties(); contextStyle->diff(copiedRangeStyle.get()); // See the comments above about removing block properties. diff --git a/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp b/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp index 54f09cd952..b6874d6f14 100644 --- a/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp +++ b/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp @@ -100,6 +100,8 @@ void SelectionController::moveTo(const Position &base, const Position &extent, E void SelectionController::setSelection(const VisibleSelection& s, bool closeTyping, bool clearTypingStyle, bool userTriggered) { + m_lastChangeWasHorizontalExtension = false; + if (m_isDragCaretController) { invalidateCaretRect(); m_sel = s; @@ -223,29 +225,24 @@ void SelectionController::nodeWillBeRemoved(Node *node) void SelectionController::willBeModified(EAlteration alter, EDirection direction) { - switch (alter) { - case MOVE: - m_lastChangeWasHorizontalExtension = false; + if (alter != EXTEND) + return; + if (m_lastChangeWasHorizontalExtension) + return; + + Position start = m_sel.start(); + Position end = m_sel.end(); + // FIXME: This is probably not correct for right and left when the direction is RTL. + switch (direction) { + case RIGHT: + case FORWARD: + m_sel.setBase(start); + m_sel.setExtent(end); break; - case EXTEND: - if (!m_lastChangeWasHorizontalExtension) { - m_lastChangeWasHorizontalExtension = true; - Position start = m_sel.start(); - Position end = m_sel.end(); - switch (direction) { - // FIXME: right for bidi? - case RIGHT: - case FORWARD: - m_sel.setBase(start); - m_sel.setExtent(end); - break; - case LEFT: - case BACKWARD: - m_sel.setBase(end); - m_sel.setExtent(start); - break; - } - } + case LEFT: + case BACKWARD: + m_sel.setBase(end); + m_sel.setExtent(start); break; } } @@ -560,8 +557,8 @@ bool SelectionController::modify(EAlteration alter, EDirection dir, TextGranular { if (userTriggered) { SelectionController trialSelectionController; - trialSelectionController.setLastChangeWasHorizontalExtension(m_lastChangeWasHorizontalExtension); trialSelectionController.setSelection(m_sel); + trialSelectionController.setLastChangeWasHorizontalExtension(m_lastChangeWasHorizontalExtension); trialSelectionController.modify(alter, dir, granularity, false); bool change = m_frame->shouldChangeSelection(trialSelectionController.selection()); @@ -634,6 +631,8 @@ bool SelectionController::modify(EAlteration alter, EDirection dir, TextGranular setNeedsLayout(); + m_lastChangeWasHorizontalExtension = alter == EXTEND; + return true; } @@ -655,6 +654,7 @@ bool SelectionController::modify(EAlteration alter, int verticalDistance, bool u if (userTriggered) { SelectionController trialSelectionController; trialSelectionController.setSelection(m_sel); + trialSelectionController.setLastChangeWasHorizontalExtension(m_lastChangeWasHorizontalExtension); trialSelectionController.modify(alter, verticalDistance, false); bool change = m_frame->shouldChangeSelection(trialSelectionController.selection()); diff --git a/src/3rdparty/webkit/WebCore/editing/SelectionController.h b/src/3rdparty/webkit/WebCore/editing/SelectionController.h index bbd343cd10..4a13a3094a 100644 --- a/src/3rdparty/webkit/WebCore/editing/SelectionController.h +++ b/src/3rdparty/webkit/WebCore/editing/SelectionController.h @@ -38,7 +38,7 @@ class GraphicsContext; class RenderObject; class VisiblePosition; -class SelectionController : Noncopyable { +class SelectionController : public Noncopyable { public: enum EAlteration { MOVE, EXTEND }; enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT }; diff --git a/src/3rdparty/webkit/WebCore/editing/TextIterator.cpp b/src/3rdparty/webkit/WebCore/editing/TextIterator.cpp index a1b3bc578b..f82a9726c0 100644 --- a/src/3rdparty/webkit/WebCore/editing/TextIterator.cpp +++ b/src/3rdparty/webkit/WebCore/editing/TextIterator.cpp @@ -57,7 +57,7 @@ using namespace HTMLNames; // Keeps enough of the previous text to be able to search in the future, but no more. // Non-breaking spaces are always equal to normal spaces. // Case folding is also done if <isCaseSensitive> is false. -class SearchBuffer : Noncopyable { +class SearchBuffer : public Noncopyable { public: SearchBuffer(const String& target, bool isCaseSensitive); ~SearchBuffer(); @@ -1393,8 +1393,40 @@ const UChar* WordAwareIterator::characters() const // -------- +static inline UChar foldQuoteMark(UChar c) +{ + switch (c) { + case hebrewPunctuationGershayim: + case leftDoubleQuotationMark: + case rightDoubleQuotationMark: + return '"'; + case hebrewPunctuationGeresh: + case leftSingleQuotationMark: + case rightSingleQuotationMark: + return '\''; + default: + return c; + } +} + +static inline void foldQuoteMarks(String& s) +{ + s.replace(hebrewPunctuationGeresh, '\''); + s.replace(hebrewPunctuationGershayim, '"'); + s.replace(leftDoubleQuotationMark, '"'); + s.replace(leftSingleQuotationMark, '\''); + s.replace(rightDoubleQuotationMark, '"'); + s.replace(rightSingleQuotationMark, '\''); +} + #if USE(ICU_UNICODE) && !UCONFIG_NO_COLLATION +static inline void foldQuoteMarks(UChar* data, size_t length) +{ + for (size_t i = 0; i < length; ++i) + data[i] = foldQuoteMark(data[i]); +} + static const size_t minimumSearchBufferSize = 8192; #ifndef NDEBUG @@ -1408,7 +1440,7 @@ static UStringSearch* createSearcher() // without setting both the pattern and the text. UErrorCode status = U_ZERO_ERROR; UStringSearch* searcher = usearch_open(&newlineCharacter, 1, &newlineCharacter, 1, currentSearchLocaleID(), 0, &status); - ASSERT(status == U_ZERO_ERROR || status == U_USING_FALLBACK_WARNING); + ASSERT(status == U_ZERO_ERROR || status == U_USING_FALLBACK_WARNING || status == U_USING_DEFAULT_WARNING); return searcher; } @@ -1440,7 +1472,12 @@ inline SearchBuffer::SearchBuffer(const String& target, bool isCaseSensitive) { ASSERT(!m_target.isEmpty()); - size_t targetLength = target.length(); + // FIXME: We'd like to tailor the searcher to fold quote marks for us instead + // of doing it in a separate replacement pass here, but ICU doesn't offer a way + // to add tailoring on top of the locale-specific tailoring as of this writing. + foldQuoteMarks(m_target); + + size_t targetLength = m_target.length(); m_buffer.reserveInitialCapacity(max(targetLength * 8, minimumSearchBufferSize)); m_overlap = m_buffer.capacity() / 4; @@ -1480,9 +1517,11 @@ inline size_t SearchBuffer::append(const UChar* characters, size_t length) m_buffer.shrink(m_overlap); } - size_t usableLength = min(m_buffer.capacity() - m_buffer.size(), length); + size_t oldLength = m_buffer.size(); + size_t usableLength = min(m_buffer.capacity() - oldLength, length); ASSERT(usableLength); m_buffer.append(characters, usableLength); + foldQuoteMarks(m_buffer.data() + oldLength, usableLength); return usableLength; } @@ -1549,6 +1588,7 @@ inline SearchBuffer::SearchBuffer(const String& target, bool isCaseSensitive) { ASSERT(!m_target.isEmpty()); m_target.replace(noBreakSpace, ' '); + foldQuoteMarks(m_target); } inline SearchBuffer::~SearchBuffer() @@ -1568,7 +1608,7 @@ inline bool SearchBuffer::atBreak() const inline void SearchBuffer::append(UChar c, bool isStart) { - m_buffer[m_cursor] = c == noBreakSpace ? ' ' : c; + m_buffer[m_cursor] = c == noBreakSpace ? ' ' : foldQuoteMark(c); m_isCharacterStartBuffer[m_cursor] = isStart; if (++m_cursor == m_target.length()) { m_cursor = 0; @@ -1875,11 +1915,6 @@ tryAgain: PassRefPtr<Range> findPlainText(const Range* range, const String& target, bool forward, bool caseSensitive) { - // We can't search effectively for a string that's entirely made of collapsible - // whitespace, so we won't even try. This also takes care of the empty string case. - if (isAllCollapsibleWhitespace(target)) - return collapsedToBoundary(range, forward); - // First, find the text. size_t matchStart; size_t matchLength; diff --git a/src/3rdparty/webkit/WebCore/editing/htmlediting.cpp b/src/3rdparty/webkit/WebCore/editing/htmlediting.cpp index c0bf0095fb..a04d2b70f3 100644 --- a/src/3rdparty/webkit/WebCore/editing/htmlediting.cpp +++ b/src/3rdparty/webkit/WebCore/editing/htmlediting.cpp @@ -207,6 +207,20 @@ Element* editableRootForPosition(const Position& p) return node->rootEditableElement(); } +// Finds the enclosing element until which the tree can be split. +// When a user hits ENTER, he/she won't expect this element to be split into two. +// You may pass it as the second argument of splitTreeToNode. +Element* unsplittableElementForPosition(const Position& p) +{ + // Since enclosingNodeOfType won't search beyond the highest root editable node, + // this code works even if the closest table cell was outside of the root editable node. + Element* enclosingCell = static_cast<Element*>(enclosingNodeOfType(p, &isTableCell, true)); + if (enclosingCell) + return enclosingCell; + + return editableRootForPosition(p); +} + bool isContentEditable(const Node* node) { return node->isContentEditable(); @@ -565,16 +579,79 @@ Node* isLastPositionBeforeTable(const VisiblePosition& visiblePosition) Position positionBeforeNode(const Node* node) { - // FIXME: This should ASSERT(node->parentNode()) + ASSERT(node); + // FIXME: Should ASSERT(node->parentNode()) but doing so results in editing/deleting/delete-ligature-001.html crashing return Position(node->parentNode(), node->nodeIndex()); } Position positionAfterNode(const Node* node) { - // FIXME: This should ASSERT(node->parentNode()) + ASSERT(node); + // FIXME: Should ASSERT(node->parentNode()) but doing so results in editing/deleting/delete-ligature-001.html crashing return Position(node->parentNode(), node->nodeIndex() + 1); } +// Returns the visible position at the beginning of a node +VisiblePosition visiblePositionBeforeNode(Node* node) +{ + ASSERT(node); + if (node->childNodeCount()) + return VisiblePosition(node, 0, DOWNSTREAM); + ASSERT(node->parentNode()); + return positionBeforeNode(node); +} + +// Returns the visible position at the ending of a node +VisiblePosition visiblePositionAfterNode(Node* node) +{ + ASSERT(node); + if (node->childNodeCount()) + return VisiblePosition(node, node->childNodeCount(), DOWNSTREAM); + ASSERT(node->parentNode()); + return positionAfterNode(node); +} + +// Create a range object with two visible positions, start and end. +// create(PassRefPtr<Document>, const Position&, const Position&); will use deprecatedEditingOffset +// Use this function instead of create a regular range object (avoiding editing offset). +PassRefPtr<Range> createRange(PassRefPtr<Document> document, const VisiblePosition& start, const VisiblePosition& end, ExceptionCode& ec) +{ + ec = 0; + RefPtr<Range> selectedRange = Range::create(document); + selectedRange->setStart(start.deepEquivalent().containerNode(), start.deepEquivalent().computeOffsetInContainerNode(), ec); + if (!ec) + selectedRange->setEnd(end.deepEquivalent().containerNode(), end.deepEquivalent().computeOffsetInContainerNode(), ec); + return selectedRange.release(); +} + +// Extend rangeToExtend to include nodes that wraps range and visibly starts and ends inside or at the boudnaries of maximumRange +// e.g. if the original range spaned "hello" in <div>hello</div>, then this function extends the range to contain div's around it. +// Call this function before copying / moving paragraphs to contain all wrapping nodes. +// This function stops extending the range immediately below rootNode; i.e. the extended range can contain a child node of rootNode +// but it can never contain rootNode itself. +PassRefPtr<Range> extendRangeToWrappingNodes(PassRefPtr<Range> range, const Range* maximumRange, const Node* rootNode) +{ + ASSERT(range); + ASSERT(maximumRange); + + ExceptionCode ec = 0; + Node* ancestor = range->commonAncestorContainer(ec);// find the cloeset common ancestor + Node* highestNode = 0; + // traverse through ancestors as long as they are contained within the range, content-editable, and below rootNode (could be =0). + while (ancestor && ancestor->isContentEditable() && isNodeVisiblyContainedWithin(ancestor, maximumRange) && ancestor != rootNode) { + highestNode = ancestor; + ancestor = ancestor->parentNode(); + } + + if (!highestNode) + return range; + + // Create new range with the highest editable node contained within the range + RefPtr<Range> extendedRange = Range::create(range->ownerDocument()); + extendedRange->selectNode(highestNode, ec); + return extendedRange.release(); +} + bool isListElement(Node *n) { return (n && (n->hasTagName(ulTag) || n->hasTagName(olTag) || n->hasTagName(dlTag))); @@ -746,7 +823,7 @@ bool canMergeLists(Element* firstList, Element* secondList) return firstList->hasTagName(secondList->tagQName())// make sure the list types match (ol vs. ul) && isContentEditable(firstList) && isContentEditable(secondList)// both lists are editable && firstList->rootEditableElement() == secondList->rootEditableElement()// don't cross editing boundaries - && isVisibilyAdjacent(positionAfterNode(firstList), positionBeforeNode(secondList)); + && isVisiblyAdjacent(positionAfterNode(firstList), positionBeforeNode(secondList)); // Make sure there is no visible content between this li and the previous list } @@ -974,7 +1051,7 @@ VisibleSelection selectionForParagraphIteration(const VisibleSelection& original } -int indexForVisiblePosition(VisiblePosition& visiblePosition) +int indexForVisiblePosition(const VisiblePosition& visiblePosition) { if (visiblePosition.isNull()) return 0; @@ -983,11 +1060,29 @@ int indexForVisiblePosition(VisiblePosition& visiblePosition) return TextIterator::rangeLength(range.get(), true); } -bool isVisibilyAdjacent(const Position& first, const Position& second) +// Determines whether two positions are visibly next to each other (first then second) +// while ignoring whitespaces and unrendered nodes +bool isVisiblyAdjacent(const Position& first, const Position& second) { return VisiblePosition(first) == VisiblePosition(second.upstream()); } +// Determines whether a node is inside a range or visibly starts and ends at the boundaries of the range. +// Call this function to determine whether a node is visibly fit inside selectedRange +bool isNodeVisiblyContainedWithin(Node* node, const Range* selectedRange) +{ + ASSERT(node); + ASSERT(selectedRange); + // If the node is inside the range, then it surely is contained within + ExceptionCode ec = 0; + if (selectedRange->compareNode(node, ec) == Range::NODE_INSIDE) + return true; + + // If the node starts and ends at where selectedRange starts and ends, the node is contained within + return visiblePositionBeforeNode(node) == selectedRange->startPosition() + && visiblePositionAfterNode(node) == selectedRange->endPosition(); +} + PassRefPtr<Range> avoidIntersectionWithNode(const Range* range, Node* node) { if (!range) diff --git a/src/3rdparty/webkit/WebCore/editing/htmlediting.h b/src/3rdparty/webkit/WebCore/editing/htmlediting.h index 25ff8472db..8f5d5ff95b 100644 --- a/src/3rdparty/webkit/WebCore/editing/htmlediting.h +++ b/src/3rdparty/webkit/WebCore/editing/htmlediting.h @@ -28,6 +28,7 @@ #include <wtf/Forward.h> #include "HTMLNames.h" +#include "ExceptionCode.h" namespace WebCore { @@ -61,6 +62,7 @@ Position previousVisuallyDistinctCandidate(const Position&); bool isEditablePosition(const Position&); bool isRichlyEditablePosition(const Position&); Element* editableRootForPosition(const Position&); +Element* unsplittableElementForPosition(const Position&); bool isBlock(const Node*); Node* enclosingBlock(Node*); @@ -71,6 +73,10 @@ const String& nonBreakingSpaceString(); Position positionBeforeNode(const Node*); Position positionAfterNode(const Node*); +VisiblePosition visiblePositionBeforeNode(Node*); +VisiblePosition visiblePositionAfterNode(Node*); +PassRefPtr<Range> createRange(PassRefPtr<Document>, const VisiblePosition& start, const VisiblePosition& end, ExceptionCode&); +PassRefPtr<Range> extendRangeToWrappingNodes(PassRefPtr<Range> rangeToExtend, const Range* maximumRange, const Node* rootNode); PassRefPtr<Range> avoidIntersectionWithNode(const Range*, Node*); VisibleSelection avoidIntersectionWithNode(const VisibleSelection&, Node*); @@ -134,8 +140,9 @@ bool lineBreakExistsAtVisiblePosition(const VisiblePosition&); VisibleSelection selectionForParagraphIteration(const VisibleSelection&); -int indexForVisiblePosition(VisiblePosition&); -bool isVisibilyAdjacent(const Position& first, const Position& second); +int indexForVisiblePosition(const VisiblePosition&); +bool isVisiblyAdjacent(const Position& first, const Position& second); +bool isNodeVisiblyContainedWithin(Node*, const Range*); } #endif diff --git a/src/3rdparty/webkit/WebCore/editing/markup.cpp b/src/3rdparty/webkit/WebCore/editing/markup.cpp index d6fe1cea10..6b6d32601c 100644 --- a/src/3rdparty/webkit/WebCore/editing/markup.cpp +++ b/src/3rdparty/webkit/WebCore/editing/markup.cpp @@ -292,8 +292,8 @@ static void removeEnclosingMailBlockquoteStyle(CSSMutableStyleDeclaration* style if (!blockquote || !blockquote->parentNode()) return; - RefPtr<CSSMutableStyleDeclaration> parentStyle = Position(blockquote->parentNode(), 0).computedStyle()->copyInheritableProperties(); - RefPtr<CSSMutableStyleDeclaration> blockquoteStyle = Position(blockquote, 0).computedStyle()->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> parentStyle = Position(blockquote->parentNode(), 0).computedStyle()->deprecatedCopyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> blockquoteStyle = Position(blockquote, 0).computedStyle()->deprecatedCopyInheritableProperties(); parentStyle->diff(blockquoteStyle.get()); blockquoteStyle->diff(style); } @@ -303,7 +303,7 @@ static void removeDefaultStyles(CSSMutableStyleDeclaration* style, Document* doc if (!document || !document->documentElement()) return; - RefPtr<CSSMutableStyleDeclaration> documentStyle = computedStyle(document->documentElement())->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> documentStyle = computedStyle(document->documentElement())->deprecatedCopyInheritableProperties(); documentStyle->diff(style); } @@ -692,7 +692,7 @@ static PassRefPtr<CSSMutableStyleDeclaration> styleFromMatchedRulesAndInlineDecl return style.release(); } -static bool propertyMissingOrEqualToNone(CSSMutableStyleDeclaration* style, int propertyID) +static bool propertyMissingOrEqualToNone(CSSStyleDeclaration* style, int propertyID) { if (!style) return false; @@ -704,8 +704,11 @@ static bool propertyMissingOrEqualToNone(CSSMutableStyleDeclaration* style, int return static_cast<CSSPrimitiveValue*>(value.get())->getIdent() == CSSValueNone; } -static bool elementHasTextDecorationProperty(const Node* node) +static bool isElementPresentational(const Node* node) { + if (node->hasTagName(uTag) || node->hasTagName(sTag) || node->hasTagName(strikeTag) || + node->hasTagName(iTag) || node->hasTagName(emTag) || node->hasTagName(bTag) || node->hasTagName(strongTag)) + return true; RefPtr<CSSMutableStyleDeclaration> style = styleFromMatchedRulesAndInlineDecl(node); if (!style) return false; @@ -763,6 +766,25 @@ static bool shouldIncludeWrapperForFullySelectedRoot(Node* fullySelectedRoot, CS style->getPropertyCSSValue(CSSPropertyBackgroundColor); } +static void addStyleMarkup(Vector<String>& preMarkups, Vector<String>& postMarkups, CSSStyleDeclaration* style, Document* document, bool isBlock = false) +{ + // All text-decoration-related elements should have been treated as special ancestors + // If we ever hit this ASSERT, we should export StyleChange in ApplyStyleCommand and use it here + ASSERT(propertyMissingOrEqualToNone(style, CSSPropertyTextDecoration) && propertyMissingOrEqualToNone(style, CSSPropertyWebkitTextDecorationsInEffect)); + DEFINE_STATIC_LOCAL(const String, divStyle, ("<div style=\"")); + DEFINE_STATIC_LOCAL(const String, divClose, ("</div>")); + DEFINE_STATIC_LOCAL(const String, styleSpanOpen, ("<span class=\"" AppleStyleSpanClass "\" style=\"")); + DEFINE_STATIC_LOCAL(const String, styleSpanClose, ("</span>")); + Vector<UChar> openTag; + append(openTag, isBlock ? divStyle : styleSpanOpen); + appendAttributeValue(openTag, style->cssText(), document->isHTMLDocument()); + openTag.append('\"'); + openTag.append('>'); + preMarkups.append(String::adopt(openTag)); + + postMarkups.append(isBlock ? divClose : styleSpanClose); +} + // FIXME: Shouldn't we omit style info when annotate == DoNotAnnotateForInterchange? // FIXME: At least, annotation and style info should probably not be included in range.markupString() String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterchange annotate, bool convertBlocksToInlines) @@ -776,8 +798,6 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc if (!document) return ""; - bool documentIsHTML = document->isHTMLDocument(); - // Disable the delete button so it's elements are not serialized into the markup, // but make sure neither endpoint is inside the delete user interface. Frame* frame = document->frame(); @@ -927,12 +947,12 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc if (isMailBlockquote(ancestor)) specialCommonAncestor = ancestor; } - + Node* checkAncestor = specialCommonAncestor ? specialCommonAncestor : commonAncestor; if (checkAncestor->renderer()) { - RefPtr<CSSMutableStyleDeclaration> checkAncestorStyle = computedStyle(checkAncestor)->copyInheritableProperties(); - if (!propertyMissingOrEqualToNone(checkAncestorStyle.get(), CSSPropertyWebkitTextDecorationsInEffect)) - specialCommonAncestor = enclosingNodeOfType(Position(checkAncestor, 0), &elementHasTextDecorationProperty); + Node* newSpecialCommonAncestor = highestEnclosingNodeOfType(Position(checkAncestor, 0), &isElementPresentational); + if (newSpecialCommonAncestor) + specialCommonAncestor = newSpecialCommonAncestor; } // If a single tab is selected, commonAncestor will be a text node inside a tab span. @@ -966,18 +986,8 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc if (!fullySelectedRootStyle->getPropertyCSSValue(CSSPropertyBackgroundImage) && static_cast<Element*>(fullySelectedRoot)->hasAttribute(backgroundAttr)) fullySelectedRootStyle->setProperty(CSSPropertyBackgroundImage, "url('" + static_cast<Element*>(fullySelectedRoot)->getAttribute(backgroundAttr) + "')"); - if (fullySelectedRootStyle->length()) { - Vector<UChar> openTag; - DEFINE_STATIC_LOCAL(const String, divStyle, ("<div style=\"")); - append(openTag, divStyle); - appendAttributeValue(openTag, fullySelectedRootStyle->cssText(), documentIsHTML); - openTag.append('\"'); - openTag.append('>'); - preMarkups.append(String::adopt(openTag)); - - DEFINE_STATIC_LOCAL(const String, divCloseTag, ("</div>")); - markups.append(divCloseTag); - } + if (fullySelectedRootStyle->length()) + addStyleMarkup(preMarkups, markups, fullySelectedRootStyle.get(), document, true); } else { // Since this node and all the other ancestors are not in the selection we want to set RangeFullySelectsNode to DoesNotFullySelectNode // so that styles that affect the exterior of the node are not included. @@ -993,14 +1003,11 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc break; } } - - DEFINE_STATIC_LOCAL(const String, styleSpanOpen, ("<span class=\"" AppleStyleSpanClass "\" style=\"")); - DEFINE_STATIC_LOCAL(const String, styleSpanClose, ("</span>")); - + // Add a wrapper span with the styles that all of the nodes in the markup inherit. Node* parentOfLastClosed = lastClosed ? lastClosed->parentNode() : 0; if (parentOfLastClosed && parentOfLastClosed->renderer()) { - RefPtr<CSSMutableStyleDeclaration> style = computedStyle(parentOfLastClosed)->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> style = computedStyle(parentOfLastClosed)->deprecatedCopyInheritableProperties(); // Styles that Mail blockquotes contribute should only be placed on the Mail blockquote, to help // us differentiate those styles from ones that the user has applied. This helps us @@ -1016,33 +1023,18 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc if (convertBlocksToInlines) style->removeBlockProperties(); - if (style->length() > 0) { - Vector<UChar> openTag; - append(openTag, styleSpanOpen); - appendAttributeValue(openTag, style->cssText(), documentIsHTML); - openTag.append('\"'); - openTag.append('>'); - preMarkups.append(String::adopt(openTag)); - - markups.append(styleSpanClose); - } + if (style->length() > 0) + addStyleMarkup(preMarkups, markups, style.get(), document); } if (lastClosed && lastClosed != document->documentElement()) { // Add a style span with the document's default styles. We add these in a separate // span so that at paste time we can differentiate between document defaults and user // applied styles. - RefPtr<CSSMutableStyleDeclaration> defaultStyle = computedStyle(document->documentElement())->copyInheritableProperties(); + RefPtr<CSSMutableStyleDeclaration> defaultStyle = computedStyle(document->documentElement())->deprecatedCopyInheritableProperties(); - if (defaultStyle->length() > 0) { - Vector<UChar> openTag; - append(openTag, styleSpanOpen); - appendAttributeValue(openTag, defaultStyle->cssText(), documentIsHTML); - openTag.append('\"'); - openTag.append('>'); - preMarkups.append(String::adopt(openTag)); - markups.append(styleSpanClose); - } + if (defaultStyle->length() > 0) + addStyleMarkup(preMarkups, markups, defaultStyle.get(), document); } // FIXME: The interchange newline should be placed in the block that it's in, not after all of the content, unconditionally. diff --git a/src/3rdparty/webkit/WebCore/editing/visible_units.cpp b/src/3rdparty/webkit/WebCore/editing/visible_units.cpp index 02e9fb859b..869c893312 100644 --- a/src/3rdparty/webkit/WebCore/editing/visible_units.cpp +++ b/src/3rdparty/webkit/WebCore/editing/visible_units.cpp @@ -1178,9 +1178,6 @@ VisiblePosition logicalStartOfLine(const VisiblePosition& c) { VisiblePosition visPos = logicalStartPositionForLine(c); - if (visPos.isNull()) - return c.honorEditableBoundaryAtOrAfter(visPos); - return c.honorEditableBoundaryAtOrAfter(visPos); } diff --git a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp index 1c2da0693e..bdd43466bb 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp +++ b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp @@ -115,12 +115,16 @@ #include "MediaList.h" #include "WebKitCSSKeyframeRule.h" #include "WebKitCSSKeyframesRule.h" +#include <wtf/FastMalloc.h> #include <stdlib.h> #include <string.h> using namespace WebCore; using namespace HTMLNames; +#define YYMALLOC fastMalloc +#define YYFREE fastFree + #define YYENABLE_NLS 0 #define YYLTYPE_IS_TRIVIAL 1 #define YYMAXDEPTH 10000 @@ -133,7 +137,7 @@ using namespace HTMLNames; /* Line 189 of yacc.c */ -#line 137 "WebCore/tmp/../generated/CSSGrammar.tab.c" +#line 141 "WebCore/tmp/../generated/CSSGrammar.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -197,32 +201,33 @@ using namespace HTMLNames; MEDIA_ONLY = 291, MEDIA_NOT = 292, MEDIA_AND = 293, - QEMS = 294, - EMS = 295, - EXS = 296, - PXS = 297, - CMS = 298, - MMS = 299, - INS = 300, - PTS = 301, - PCS = 302, - DEGS = 303, - RADS = 304, - GRADS = 305, - TURNS = 306, - MSECS = 307, - SECS = 308, - HERZ = 309, - KHERZ = 310, - DIMEN = 311, - PERCENTAGE = 312, - FLOATTOKEN = 313, - INTEGER = 314, - URI = 315, - FUNCTION = 316, - NOTFUNCTION = 317, - UNICODERANGE = 318, - VARCALL = 319 + REMS = 294, + QEMS = 295, + EMS = 296, + EXS = 297, + PXS = 298, + CMS = 299, + MMS = 300, + INS = 301, + PTS = 302, + PCS = 303, + DEGS = 304, + RADS = 305, + GRADS = 306, + TURNS = 307, + MSECS = 308, + SECS = 309, + HERZ = 310, + KHERZ = 311, + DIMEN = 312, + PERCENTAGE = 313, + FLOATTOKEN = 314, + INTEGER = 315, + URI = 316, + FUNCTION = 317, + NOTFUNCTION = 318, + UNICODERANGE = 319, + VARCALL = 320 }; #endif @@ -233,7 +238,7 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 58 "../css/CSSGrammar.y" +#line 62 "../css/CSSGrammar.y" bool boolean; char character; @@ -260,7 +265,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 264 "WebCore/tmp/../generated/CSSGrammar.tab.c" +#line 269 "WebCore/tmp/../generated/CSSGrammar.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -271,7 +276,7 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ -#line 82 "../css/CSSGrammar.y" +#line 86 "../css/CSSGrammar.y" static inline int cssyyerror(const char*) @@ -287,7 +292,7 @@ static int cssyylex(YYSTYPE* yylval, void* parser) /* Line 264 of yacc.c */ -#line 291 "WebCore/tmp/../generated/CSSGrammar.tab.c" +#line 296 "WebCore/tmp/../generated/CSSGrammar.tab.c" #ifdef short # undef short @@ -502,20 +507,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 28 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1315 +#define YYLAST 1329 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 85 +#define YYNTOKENS 86 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 90 /* YYNRULES -- Number of rules. */ -#define YYNRULES 267 +#define YYNRULES 268 /* YYNRULES -- Number of states. */ -#define YYNSTATES 513 +#define YYNSTATES 515 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 319 +#define YYMAXUTOK 320 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -526,16 +531,16 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 83, 2, 84, 2, 2, - 73, 74, 20, 76, 75, 79, 18, 82, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 17, 72, - 2, 81, 78, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 84, 2, 85, 2, 2, + 74, 75, 20, 77, 76, 80, 18, 83, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 17, 73, + 2, 82, 79, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 19, 2, 80, 2, 2, 2, 2, 2, 2, + 2, 19, 2, 81, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 70, 21, 71, 77, 2, 2, 2, + 2, 2, 2, 71, 21, 72, 78, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -554,7 +559,8 @@ static const yytype_uint8 yytranslate[] = 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69 + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70 }; #if YYDEBUG @@ -587,137 +593,137 @@ static const yytype_uint16 yyprhs[] = 761, 764, 767, 771, 774, 777, 779, 782, 784, 787, 790, 793, 796, 799, 802, 805, 808, 811, 814, 817, 820, 823, 826, 829, 832, 835, 838, 841, 844, 847, - 850, 852, 858, 862, 865, 868, 870, 873, 877, 881, - 884, 888, 890, 892, 895, 901, 905, 907 + 850, 853, 855, 861, 865, 868, 871, 873, 876, 880, + 884, 887, 891, 893, 895, 898, 904, 908, 910 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 86, 0, -1, 97, 96, 100, 101, 102, 103, -1, - 88, 95, -1, 90, 95, -1, 92, 95, -1, 93, - 95, -1, 94, 95, -1, 91, 95, -1, 89, 95, - -1, 104, -1, 109, -1, 28, 70, 95, 87, 95, - 71, -1, 30, 70, 95, 133, 95, 71, -1, 29, - 70, 95, 155, 71, -1, 38, 70, 95, 112, 71, - -1, 32, 70, 95, 160, 71, -1, 33, 5, 95, - 125, 71, -1, 34, 70, 95, 141, 71, -1, -1, - 95, 5, -1, -1, 96, 6, -1, 96, 5, -1, - -1, 99, -1, 71, -1, 0, -1, 26, 95, 12, - 95, 72, -1, 26, 1, 173, -1, 26, 1, 72, - -1, -1, 100, 109, 96, -1, 169, -1, -1, 101, - 110, 96, -1, -1, 102, 116, 96, -1, -1, 103, - 105, 96, -1, 140, -1, 128, -1, 136, -1, 137, - -1, 130, -1, 104, -1, 172, -1, 168, -1, 170, - -1, -1, 106, 108, 96, -1, 140, -1, 136, -1, - 137, -1, 130, -1, 107, -1, 172, -1, 168, -1, - 170, -1, 171, -1, 22, 95, 118, 95, 126, 72, - -1, 22, 95, 118, 95, 126, 173, -1, 22, 1, - 72, -1, 22, 1, 173, -1, 35, 95, 126, 70, - 95, 112, 71, -1, 36, 95, 111, 70, 95, 112, - 71, -1, -1, 37, 5, 127, -1, 114, -1, 113, - 114, -1, 113, -1, 1, 174, 1, -1, 1, -1, - 113, 1, -1, 114, 72, 95, -1, 114, 174, 72, - 95, -1, 1, 72, 95, -1, 1, 174, 1, 72, - 95, -1, 113, 114, 72, 95, -1, 113, 1, 72, - 95, -1, 113, 1, 174, 1, 72, 95, -1, 115, - 17, 95, 160, -1, 115, 95, 70, 95, 155, 71, - 95, -1, 115, 1, -1, 115, 17, 95, 1, 160, - -1, 115, 17, 95, -1, 115, 17, 95, 1, -1, - 13, 95, -1, 27, 95, 117, 118, 95, 72, -1, - 27, 1, 173, -1, 27, 1, 72, -1, -1, 13, - 5, -1, 12, -1, 65, -1, 13, 95, -1, -1, - 17, 95, 160, 95, -1, 73, 95, 119, 95, 120, - 74, 95, -1, 121, -1, 122, 95, 43, 95, 121, - -1, -1, 43, 95, 122, -1, -1, 41, -1, 42, - -1, 122, -1, 124, 95, 129, 123, -1, -1, 127, - -1, 125, -1, 127, 75, 95, 125, -1, 127, 1, - -1, 24, 95, 127, 70, 95, 106, 167, -1, 24, - 95, 70, 95, 106, 167, -1, 13, 95, -1, 31, - 95, 131, 95, 70, 95, 132, 71, -1, 13, -1, - 12, -1, -1, 132, 133, 95, -1, 134, 95, 70, - 95, 155, 71, -1, 135, -1, 134, 95, 75, 95, - 135, -1, 62, -1, 13, -1, 23, 1, 173, -1, - 23, 1, 72, -1, 25, 95, 70, 95, 155, 71, - 95, -1, 25, 1, 173, -1, 25, 1, 72, -1, - 76, 95, -1, 77, 95, -1, 78, 95, -1, 79, - -1, 76, -1, 141, 70, 95, 155, 98, -1, 143, - -1, 141, 75, 95, 143, -1, 141, 1, -1, 143, - 5, -1, 145, -1, 142, -1, 142, 145, -1, 143, - 138, 145, -1, 143, 1, -1, 21, -1, 20, 21, - -1, 13, 21, -1, 146, -1, 146, 147, -1, 147, - -1, 144, 146, -1, 144, 146, 147, -1, 144, 147, - -1, 13, -1, 20, -1, 148, -1, 147, 148, -1, - 147, 1, -1, 16, -1, 15, -1, 149, -1, 151, - -1, 154, -1, 18, 13, -1, 13, 95, -1, 19, - 95, 150, 80, -1, 19, 95, 150, 152, 95, 153, - 95, 80, -1, 19, 95, 144, 150, 80, -1, 19, - 95, 144, 150, 152, 95, 153, 95, 80, -1, 81, + 87, 0, -1, 98, 97, 101, 102, 103, 104, -1, + 89, 96, -1, 91, 96, -1, 93, 96, -1, 94, + 96, -1, 95, 96, -1, 92, 96, -1, 90, 96, + -1, 105, -1, 110, -1, 28, 71, 96, 88, 96, + 72, -1, 30, 71, 96, 134, 96, 72, -1, 29, + 71, 96, 156, 72, -1, 38, 71, 96, 113, 72, + -1, 32, 71, 96, 161, 72, -1, 33, 5, 96, + 126, 72, -1, 34, 71, 96, 142, 72, -1, -1, + 96, 5, -1, -1, 97, 6, -1, 97, 5, -1, + -1, 100, -1, 72, -1, 0, -1, 26, 96, 12, + 96, 73, -1, 26, 1, 174, -1, 26, 1, 73, + -1, -1, 101, 110, 97, -1, 170, -1, -1, 102, + 111, 97, -1, -1, 103, 117, 97, -1, -1, 104, + 106, 97, -1, 141, -1, 129, -1, 137, -1, 138, + -1, 131, -1, 105, -1, 173, -1, 169, -1, 171, + -1, -1, 107, 109, 97, -1, 141, -1, 137, -1, + 138, -1, 131, -1, 108, -1, 173, -1, 169, -1, + 171, -1, 172, -1, 22, 96, 119, 96, 127, 73, + -1, 22, 96, 119, 96, 127, 174, -1, 22, 1, + 73, -1, 22, 1, 174, -1, 35, 96, 127, 71, + 96, 113, 72, -1, 36, 96, 112, 71, 96, 113, + 72, -1, -1, 37, 5, 128, -1, 115, -1, 114, + 115, -1, 114, -1, 1, 175, 1, -1, 1, -1, + 114, 1, -1, 115, 73, 96, -1, 115, 175, 73, + 96, -1, 1, 73, 96, -1, 1, 175, 1, 73, + 96, -1, 114, 115, 73, 96, -1, 114, 1, 73, + 96, -1, 114, 1, 175, 1, 73, 96, -1, 116, + 17, 96, 161, -1, 116, 96, 71, 96, 156, 72, + 96, -1, 116, 1, -1, 116, 17, 96, 1, 161, + -1, 116, 17, 96, -1, 116, 17, 96, 1, -1, + 13, 96, -1, 27, 96, 118, 119, 96, 73, -1, + 27, 1, 174, -1, 27, 1, 73, -1, -1, 13, + 5, -1, 12, -1, 66, -1, 13, 96, -1, -1, + 17, 96, 161, 96, -1, 74, 96, 120, 96, 121, + 75, 96, -1, 122, -1, 123, 96, 43, 96, 122, + -1, -1, 43, 96, 123, -1, -1, 41, -1, 42, + -1, 123, -1, 125, 96, 130, 124, -1, -1, 128, + -1, 126, -1, 128, 76, 96, 126, -1, 128, 1, + -1, 24, 96, 128, 71, 96, 107, 168, -1, 24, + 96, 71, 96, 107, 168, -1, 13, 96, -1, 31, + 96, 132, 96, 71, 96, 133, 72, -1, 13, -1, + 12, -1, -1, 133, 134, 96, -1, 135, 96, 71, + 96, 156, 72, -1, 136, -1, 135, 96, 76, 96, + 136, -1, 63, -1, 13, -1, 23, 1, 174, -1, + 23, 1, 73, -1, 25, 96, 71, 96, 156, 72, + 96, -1, 25, 1, 174, -1, 25, 1, 73, -1, + 77, 96, -1, 78, 96, -1, 79, 96, -1, 80, + -1, 77, -1, 142, 71, 96, 156, 99, -1, 144, + -1, 142, 76, 96, 144, -1, 142, 1, -1, 144, + 5, -1, 146, -1, 143, -1, 143, 146, -1, 144, + 139, 146, -1, 144, 1, -1, 21, -1, 20, 21, + -1, 13, 21, -1, 147, -1, 147, 148, -1, 148, + -1, 145, 147, -1, 145, 147, 148, -1, 145, 148, + -1, 13, -1, 20, -1, 149, -1, 148, 149, -1, + 148, 1, -1, 16, -1, 15, -1, 150, -1, 152, + -1, 155, -1, 18, 13, -1, 13, 96, -1, 19, + 96, 151, 81, -1, 19, 96, 151, 153, 96, 154, + 96, 81, -1, 19, 96, 145, 151, 81, -1, 19, + 96, 145, 151, 153, 96, 154, 96, 81, -1, 82, -1, 7, -1, 8, -1, 9, -1, 10, -1, 11, -1, 13, -1, 12, -1, 17, 13, -1, 17, 17, - 13, -1, 17, 66, 14, 74, -1, 17, 66, 64, - 74, -1, 17, 66, 13, 74, -1, 17, 67, 95, - 145, 95, 74, -1, 157, -1, 156, 157, -1, 156, - -1, 1, 174, 1, -1, 1, -1, 156, 1, -1, - 156, 174, -1, 157, 72, 95, -1, 157, 174, 72, - 95, -1, 1, 72, 95, -1, 1, 174, 1, 72, - 95, -1, 156, 157, 72, 95, -1, 156, 1, 72, - 95, -1, 156, 1, 174, 1, 72, 95, -1, 158, - 17, 95, 160, 159, -1, 164, 95, -1, 158, 1, - -1, 158, 17, 95, 1, 160, 159, -1, 158, 17, - 95, 160, 159, 1, -1, 40, 95, -1, 158, 17, - 95, -1, 158, 17, 95, 1, -1, 158, 173, -1, - 13, 95, -1, 40, 95, -1, -1, 162, -1, 160, - 161, 162, -1, 160, 1, -1, 82, 95, -1, 75, - 95, -1, -1, 163, -1, 139, 163, -1, 12, 95, - -1, 13, 95, -1, 61, 95, -1, 139, 61, 95, - -1, 65, 95, -1, 68, 95, -1, 166, -1, 83, - 95, -1, 165, -1, 164, 95, -1, 84, 95, -1, - 64, 95, -1, 63, 95, -1, 62, 95, -1, 47, - 95, -1, 48, 95, -1, 49, 95, -1, 50, 95, - -1, 51, 95, -1, 52, 95, -1, 53, 95, -1, - 54, 95, -1, 55, 95, -1, 56, 95, -1, 57, - 95, -1, 58, 95, -1, 59, 95, -1, 60, 95, - -1, 45, 95, -1, 44, 95, -1, 46, 95, -1, - 69, -1, 66, 95, 160, 74, 95, -1, 66, 95, - 1, -1, 15, 95, -1, 16, 95, -1, 98, -1, - 1, 98, -1, 39, 1, 173, -1, 39, 1, 72, - -1, 168, 96, -1, 169, 168, 96, -1, 109, -1, - 128, -1, 1, 173, -1, 70, 1, 174, 1, 98, - -1, 70, 1, 98, -1, 173, -1, 174, 1, 173, - -1 + 13, -1, 17, 67, 14, 75, -1, 17, 67, 65, + 75, -1, 17, 67, 13, 75, -1, 17, 68, 96, + 146, 96, 75, -1, 158, -1, 157, 158, -1, 157, + -1, 1, 175, 1, -1, 1, -1, 157, 1, -1, + 157, 175, -1, 158, 73, 96, -1, 158, 175, 73, + 96, -1, 1, 73, 96, -1, 1, 175, 1, 73, + 96, -1, 157, 158, 73, 96, -1, 157, 1, 73, + 96, -1, 157, 1, 175, 1, 73, 96, -1, 159, + 17, 96, 161, 160, -1, 165, 96, -1, 159, 1, + -1, 159, 17, 96, 1, 161, 160, -1, 159, 17, + 96, 161, 160, 1, -1, 40, 96, -1, 159, 17, + 96, -1, 159, 17, 96, 1, -1, 159, 174, -1, + 13, 96, -1, 40, 96, -1, -1, 163, -1, 161, + 162, 163, -1, 161, 1, -1, 83, 96, -1, 76, + 96, -1, -1, 164, -1, 140, 164, -1, 12, 96, + -1, 13, 96, -1, 62, 96, -1, 140, 62, 96, + -1, 66, 96, -1, 69, 96, -1, 167, -1, 84, + 96, -1, 166, -1, 165, 96, -1, 85, 96, -1, + 65, 96, -1, 64, 96, -1, 63, 96, -1, 48, + 96, -1, 49, 96, -1, 50, 96, -1, 51, 96, + -1, 52, 96, -1, 53, 96, -1, 54, 96, -1, + 55, 96, -1, 56, 96, -1, 57, 96, -1, 58, + 96, -1, 59, 96, -1, 60, 96, -1, 61, 96, + -1, 46, 96, -1, 45, 96, -1, 47, 96, -1, + 44, 96, -1, 70, -1, 67, 96, 161, 75, 96, + -1, 67, 96, 1, -1, 15, 96, -1, 16, 96, + -1, 99, -1, 1, 99, -1, 39, 1, 174, -1, + 39, 1, 73, -1, 169, 97, -1, 170, 169, 97, + -1, 110, -1, 129, -1, 1, 174, -1, 71, 1, + 175, 1, 99, -1, 71, 1, 99, -1, 174, -1, + 175, 1, 174, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 266, 266, 267, 268, 269, 270, 271, 272, 273, - 277, 278, 282, 288, 294, 300, 306, 320, 327, 337, - 338, 341, 343, 344, 347, 349, 354, 355, 359, 365, - 367, 371, 373, 378, 382, 384, 391, 393, 396, 398, - 406, 407, 408, 409, 410, 414, 415, 416, 417, 421, - 422, 433, 434, 435, 436, 440, 441, 442, 443, 444, - 449, 452, 455, 458, 464, 468, 474, 478, 484, 487, - 492, 495, 498, 501, 507, 510, 513, 516, 519, 524, - 527, 533, 537, 541, 545, 549, 554, 561, 567, 572, - 573, 577, 578, 582, 583, 587, 593, 596, 602, 609, - 614, 621, 624, 630, 633, 636, 642, 647, 655, 658, - 662, 667, 672, 678, 681, 687, 693, 700, 701, 705, - 706, 714, 720, 725, 734, 735, 759, 762, 768, 772, - 775, 781, 782, 783, 787, 788, 792, 798, 807, 815, - 821, 827, 830, 834, 850, 870, 876, 877, 878, 882, - 887, 894, 900, 910, 922, 935, 943, 951, 954, 967, - 973, 981, 993, 994, 995, 999, 1010, 1021, 1026, 1032, - 1040, 1052, 1055, 1058, 1061, 1064, 1067, 1073, 1074, 1078, - 1108, 1128, 1146, 1164, 1183, 1198, 1201, 1206, 1209, 1212, - 1215, 1218, 1224, 1227, 1230, 1233, 1236, 1241, 1244, 1250, - 1264, 1276, 1280, 1287, 1292, 1297, 1302, 1307, 1314, 1320, - 1321, 1325, 1330, 1344, 1350, 1353, 1356, 1362, 1363, 1364, - 1365, 1371, 1372, 1373, 1374, 1375, 1376, 1378, 1381, 1384, - 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, - 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, - 1413, 1421, 1430, 1446, 1447, 1454, 1457, 1463, 1466, 1472, - 1473, 1477, 1483, 1489, 1507, 1508, 1512, 1513 + 0, 271, 271, 272, 273, 274, 275, 276, 277, 278, + 282, 283, 287, 293, 299, 305, 311, 325, 332, 342, + 343, 346, 348, 349, 352, 354, 359, 360, 364, 370, + 372, 376, 378, 383, 387, 389, 396, 398, 401, 403, + 411, 412, 413, 414, 415, 419, 420, 421, 422, 426, + 427, 438, 439, 440, 441, 445, 446, 447, 448, 449, + 454, 457, 460, 463, 469, 473, 479, 483, 489, 492, + 497, 500, 503, 506, 512, 515, 518, 521, 524, 529, + 532, 538, 542, 546, 550, 554, 559, 566, 572, 577, + 578, 582, 583, 587, 588, 592, 598, 601, 607, 614, + 619, 626, 629, 635, 638, 641, 647, 652, 660, 663, + 667, 672, 677, 683, 686, 692, 698, 705, 706, 710, + 711, 719, 725, 730, 739, 740, 764, 767, 773, 777, + 780, 786, 787, 788, 792, 793, 797, 803, 812, 820, + 826, 832, 835, 839, 855, 875, 881, 882, 883, 887, + 892, 899, 905, 915, 927, 940, 948, 956, 959, 972, + 978, 986, 998, 999, 1000, 1004, 1015, 1026, 1031, 1037, + 1045, 1057, 1060, 1063, 1066, 1069, 1072, 1078, 1079, 1083, + 1113, 1133, 1151, 1169, 1188, 1203, 1206, 1211, 1214, 1217, + 1220, 1223, 1229, 1232, 1235, 1238, 1241, 1246, 1249, 1255, + 1269, 1281, 1285, 1292, 1297, 1302, 1307, 1312, 1319, 1325, + 1326, 1330, 1335, 1349, 1355, 1358, 1361, 1367, 1368, 1369, + 1370, 1376, 1377, 1378, 1379, 1380, 1381, 1383, 1386, 1389, + 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, + 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, + 1415, 1426, 1434, 1443, 1459, 1460, 1467, 1470, 1476, 1479, + 1485, 1486, 1490, 1496, 1502, 1520, 1521, 1525, 1526 }; #endif @@ -735,19 +741,19 @@ static const char *const yytname[] = "WEBKIT_VALUE_SYM", "WEBKIT_MEDIAQUERY_SYM", "WEBKIT_SELECTOR_SYM", "WEBKIT_VARIABLES_SYM", "WEBKIT_DEFINE_SYM", "VARIABLES_FOR", "WEBKIT_VARIABLES_DECLS_SYM", "ATKEYWORD", "IMPORTANT_SYM", "MEDIA_ONLY", - "MEDIA_NOT", "MEDIA_AND", "QEMS", "EMS", "EXS", "PXS", "CMS", "MMS", - "INS", "PTS", "PCS", "DEGS", "RADS", "GRADS", "TURNS", "MSECS", "SECS", - "HERZ", "KHERZ", "DIMEN", "PERCENTAGE", "FLOATTOKEN", "INTEGER", "URI", - "FUNCTION", "NOTFUNCTION", "UNICODERANGE", "VARCALL", "'{'", "'}'", - "';'", "'('", "')'", "','", "'+'", "'~'", "'>'", "'-'", "']'", "'='", - "'/'", "'#'", "'%'", "$accept", "stylesheet", "valid_rule_or_import", - "webkit_rule", "webkit_keyframe_rule", "webkit_decls", - "webkit_variables_decls", "webkit_value", "webkit_mediaquery", - "webkit_selector", "maybe_space", "maybe_sgml", "maybe_charset", - "closing_brace", "charset", "import_list", "variables_list", - "namespace_list", "rule_list", "valid_rule", "rule", "block_rule_list", - "block_valid_rule", "block_rule", "import", "variables_rule", - "variables_media_list", "variables_declaration_list", + "MEDIA_NOT", "MEDIA_AND", "REMS", "QEMS", "EMS", "EXS", "PXS", "CMS", + "MMS", "INS", "PTS", "PCS", "DEGS", "RADS", "GRADS", "TURNS", "MSECS", + "SECS", "HERZ", "KHERZ", "DIMEN", "PERCENTAGE", "FLOATTOKEN", "INTEGER", + "URI", "FUNCTION", "NOTFUNCTION", "UNICODERANGE", "VARCALL", "'{'", + "'}'", "';'", "'('", "')'", "','", "'+'", "'~'", "'>'", "'-'", "']'", + "'='", "'/'", "'#'", "'%'", "$accept", "stylesheet", + "valid_rule_or_import", "webkit_rule", "webkit_keyframe_rule", + "webkit_decls", "webkit_variables_decls", "webkit_value", + "webkit_mediaquery", "webkit_selector", "maybe_space", "maybe_sgml", + "maybe_charset", "closing_brace", "charset", "import_list", + "variables_list", "namespace_list", "rule_list", "valid_rule", "rule", + "block_rule_list", "block_valid_rule", "block_rule", "import", + "variables_rule", "variables_media_list", "variables_declaration_list", "variables_decl_list", "variables_declaration", "variable_name", "namespace", "maybe_ns_prefix", "string_or_uri", "media_feature", "maybe_media_value", "media_query_exp", "media_query_exp_list", @@ -778,41 +784,41 @@ static const yytype_uint16 yytoknum[] = 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 123, 125, 59, 40, 41, 44, 43, 126, 62, 45, - 93, 61, 47, 35, 37 + 320, 123, 125, 59, 40, 41, 44, 43, 126, 62, + 45, 93, 61, 47, 35, 37 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 85, 86, 86, 86, 86, 86, 86, 86, 86, - 87, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 95, 96, 96, 96, 97, 97, 98, 98, 99, 99, - 99, 100, 100, 100, 101, 101, 102, 102, 103, 103, - 104, 104, 104, 104, 104, 105, 105, 105, 105, 106, - 106, 107, 107, 107, 107, 108, 108, 108, 108, 108, - 109, 109, 109, 109, 110, 110, 111, 111, 112, 112, - 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, - 113, 114, 114, 114, 114, 114, 114, 115, 116, 116, - 116, 117, 117, 118, 118, 119, 120, 120, 121, 122, - 122, 123, 123, 124, 124, 124, 125, 125, 126, 126, - 127, 127, 127, 128, 128, 129, 130, 131, 131, 132, - 132, 133, 134, 134, 135, 135, 136, 136, 137, 137, - 137, 138, 138, 138, 139, 139, 140, 141, 141, 141, - 142, 143, 143, 143, 143, 143, 144, 144, 144, 145, - 145, 145, 145, 145, 145, 146, 146, 147, 147, 147, - 148, 148, 148, 148, 148, 149, 150, 151, 151, 151, - 151, 152, 152, 152, 152, 152, 152, 153, 153, 154, - 154, 154, 154, 154, 154, 155, 155, 155, 155, 155, - 155, 155, 156, 156, 156, 156, 156, 156, 156, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 158, 159, - 159, 160, 160, 160, 161, 161, 161, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 0, 86, 87, 87, 87, 87, 87, 87, 87, 87, + 88, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 96, 97, 97, 97, 98, 98, 99, 99, 100, 100, + 100, 101, 101, 101, 102, 102, 103, 103, 104, 104, + 105, 105, 105, 105, 105, 106, 106, 106, 106, 107, + 107, 108, 108, 108, 108, 109, 109, 109, 109, 109, + 110, 110, 110, 110, 111, 111, 112, 112, 113, 113, + 113, 113, 113, 113, 114, 114, 114, 114, 114, 114, + 114, 115, 115, 115, 115, 115, 115, 116, 117, 117, + 117, 118, 118, 119, 119, 120, 121, 121, 122, 123, + 123, 124, 124, 125, 125, 125, 126, 126, 127, 127, + 128, 128, 128, 129, 129, 130, 131, 132, 132, 133, + 133, 134, 135, 135, 136, 136, 137, 137, 138, 138, + 138, 139, 139, 139, 140, 140, 141, 142, 142, 142, + 143, 144, 144, 144, 144, 144, 145, 145, 145, 146, + 146, 146, 146, 146, 146, 147, 147, 148, 148, 148, + 149, 149, 149, 149, 149, 150, 151, 152, 152, 152, + 152, 153, 153, 153, 153, 153, 153, 154, 154, 155, + 155, 155, 155, 155, 155, 156, 156, 156, 156, 156, + 156, 156, 157, 157, 157, 157, 157, 157, 157, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 159, 160, + 160, 161, 161, 161, 162, 162, 162, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 164, 165, 165, 166, 166, 167, 167, 168, 168, 169, - 169, 170, 171, 172, 173, 173, 174, 174 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 165, 166, 166, 167, 167, 168, 168, 169, 169, + 170, 170, 171, 172, 173, 174, 174, 175, 175 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -843,8 +849,8 @@ static const yytype_uint8 yyr2[] = 2, 2, 3, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 5, 3, 2, 2, 1, 2, 3, 3, 2, - 3, 1, 1, 2, 5, 3, 1, 3 + 2, 1, 5, 3, 2, 2, 1, 2, 3, 3, + 2, 3, 1, 1, 2, 5, 3, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -861,136 +867,136 @@ static const yytype_uint16 yydefact[] = 0, 0, 19, 156, 146, 0, 0, 19, 0, 19, 19, 10, 11, 41, 44, 42, 43, 40, 0, 142, 0, 0, 141, 149, 0, 157, 162, 163, 164, 189, - 19, 19, 250, 0, 0, 185, 0, 19, 125, 124, + 19, 19, 251, 0, 0, 185, 0, 19, 125, 124, 19, 19, 122, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 135, 134, 19, 19, 0, 0, 211, 217, 19, - 227, 225, 104, 105, 19, 99, 106, 19, 0, 0, - 72, 19, 0, 0, 68, 0, 0, 36, 21, 259, - 21, 27, 26, 265, 266, 0, 28, 148, 179, 0, - 0, 19, 165, 0, 147, 0, 0, 0, 103, 0, - 0, 0, 0, 139, 19, 19, 143, 145, 140, 19, - 19, 19, 0, 155, 156, 152, 0, 0, 159, 158, - 19, 0, 208, 204, 14, 190, 186, 0, 19, 0, - 201, 19, 207, 200, 0, 0, 219, 220, 253, 254, - 248, 247, 249, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 221, 232, 231, - 230, 223, 0, 224, 226, 229, 19, 218, 213, 16, - 19, 19, 0, 228, 0, 0, 0, 17, 18, 19, - 0, 87, 15, 73, 69, 19, 0, 83, 19, 0, - 258, 257, 19, 19, 38, 21, 32, 260, 0, 180, - 0, 0, 0, 0, 19, 0, 0, 0, 62, 63, - 93, 94, 19, 127, 126, 19, 110, 0, 130, 129, - 19, 118, 117, 19, 12, 0, 0, 131, 132, 133, - 144, 0, 194, 188, 19, 0, 19, 0, 192, 19, - 0, 13, 19, 19, 252, 0, 222, 215, 214, 212, - 19, 19, 19, 19, 101, 76, 71, 19, 0, 19, - 74, 19, 0, 19, 103, 66, 0, 0, 21, 35, - 264, 267, 183, 181, 182, 19, 166, 19, 0, 172, - 173, 174, 175, 176, 167, 171, 19, 108, 49, 112, - 19, 19, 0, 0, 0, 0, 19, 197, 0, 196, - 193, 206, 0, 0, 0, 19, 95, 96, 0, 115, - 19, 107, 19, 79, 0, 78, 75, 86, 0, 0, - 0, 0, 0, 0, 0, 91, 0, 45, 21, 261, - 47, 48, 46, 37, 0, 169, 19, 0, 0, 0, - 49, 103, 0, 19, 136, 195, 19, 0, 19, 0, - 0, 123, 251, 19, 0, 100, 0, 77, 19, 0, - 0, 19, 103, 19, 90, 89, 0, 0, 263, 39, - 184, 0, 178, 177, 19, 60, 61, 0, 255, 55, - 21, 262, 54, 52, 53, 51, 114, 57, 58, 59, - 56, 0, 111, 19, 119, 198, 202, 209, 203, 121, - 0, 19, 102, 80, 19, 0, 0, 0, 92, 19, - 19, 0, 256, 50, 113, 128, 0, 0, 98, 82, - 0, 0, 0, 0, 168, 116, 19, 97, 64, 65, - 88, 170, 120 + 19, 19, 135, 134, 19, 19, 0, 0, 211, 217, + 19, 227, 225, 104, 105, 19, 99, 106, 19, 0, + 0, 72, 19, 0, 0, 68, 0, 0, 36, 21, + 260, 21, 27, 26, 266, 267, 0, 28, 148, 179, + 0, 0, 19, 165, 0, 147, 0, 0, 0, 103, + 0, 0, 0, 0, 139, 19, 19, 143, 145, 140, + 19, 19, 19, 0, 155, 156, 152, 0, 0, 159, + 158, 19, 0, 208, 204, 14, 190, 186, 0, 19, + 0, 201, 19, 207, 200, 0, 0, 219, 220, 254, + 255, 250, 248, 247, 249, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 221, + 232, 231, 230, 223, 0, 224, 226, 229, 19, 218, + 213, 16, 19, 19, 0, 228, 0, 0, 0, 17, + 18, 19, 0, 87, 15, 73, 69, 19, 0, 83, + 19, 0, 259, 258, 19, 19, 38, 21, 32, 261, + 0, 180, 0, 0, 0, 0, 19, 0, 0, 0, + 62, 63, 93, 94, 19, 127, 126, 19, 110, 0, + 130, 129, 19, 118, 117, 19, 12, 0, 0, 131, + 132, 133, 144, 0, 194, 188, 19, 0, 19, 0, + 192, 19, 0, 13, 19, 19, 253, 0, 222, 215, + 214, 212, 19, 19, 19, 19, 101, 76, 71, 19, + 0, 19, 74, 19, 0, 19, 103, 66, 0, 0, + 21, 35, 265, 268, 183, 181, 182, 19, 166, 19, + 0, 172, 173, 174, 175, 176, 167, 171, 19, 108, + 49, 112, 19, 19, 0, 0, 0, 0, 19, 197, + 0, 196, 193, 206, 0, 0, 0, 19, 95, 96, + 0, 115, 19, 107, 19, 79, 0, 78, 75, 86, + 0, 0, 0, 0, 0, 0, 0, 91, 0, 45, + 21, 262, 47, 48, 46, 37, 0, 169, 19, 0, + 0, 0, 49, 103, 0, 19, 136, 195, 19, 0, + 19, 0, 0, 123, 252, 19, 0, 100, 0, 77, + 19, 0, 0, 19, 103, 19, 90, 89, 0, 0, + 264, 39, 184, 0, 178, 177, 19, 60, 61, 0, + 256, 55, 21, 263, 54, 52, 53, 51, 114, 57, + 58, 59, 56, 0, 111, 19, 119, 198, 202, 209, + 203, 121, 0, 19, 102, 80, 19, 0, 0, 0, + 92, 19, 19, 0, 257, 50, 113, 128, 0, 0, + 98, 82, 0, 0, 0, 0, 168, 116, 19, 97, + 64, 65, 88, 170, 120 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 9, 70, 10, 11, 12, 13, 14, 15, 16, - 255, 36, 17, 458, 18, 52, 157, 274, 347, 71, - 408, 419, 459, 460, 409, 275, 403, 152, 153, 154, - 155, 348, 447, 292, 331, 434, 145, 146, 391, 147, - 296, 400, 401, 73, 334, 74, 303, 496, 100, 101, - 102, 75, 76, 192, 135, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 287, 87, 366, 454, 88, - 93, 94, 95, 96, 429, 136, 252, 137, 138, 139, - 140, 141, 466, 467, 54, 468, 469, 470, 164, 165 + 257, 36, 17, 460, 18, 52, 158, 276, 349, 71, + 410, 421, 461, 462, 411, 277, 405, 153, 154, 155, + 156, 350, 449, 294, 333, 436, 146, 147, 393, 148, + 298, 402, 403, 73, 336, 74, 305, 498, 100, 101, + 102, 75, 76, 193, 136, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 289, 87, 368, 456, 88, + 93, 94, 95, 96, 431, 137, 254, 138, 139, 140, + 141, 142, 468, 469, 54, 470, 471, 472, 165, 166 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -435 +#define YYPACT_NINF -301 static const yytype_int16 yypact[] = { - 818, 44, -36, -18, 112, 127, 66, 141, 162, 243, - -435, -435, -435, -435, -435, -435, -435, -435, -435, 239, - 43, -435, -435, -435, -435, -435, -435, -435, -435, 250, - 250, 250, 250, 250, 250, 250, 37, 304, -435, -435, - -435, -435, 763, 354, 31, 1114, 144, 622, 49, -435, - -435, 346, 344, -435, 332, 27, 23, 358, -435, -435, - 401, 370, -435, 371, -435, 381, 406, -435, 193, -435, - -435, -435, -435, -435, -435, -435, -435, -435, 171, 702, - 143, 631, -435, 756, 159, -435, -435, -435, -435, 240, - -435, -435, -435, 329, 303, 254, 199, -435, -435, -435, - -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, - -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, - -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, - -435, -435, -435, -435, -435, 949, 903, -435, -435, -435, - -435, -435, -435, -435, -435, -435, 34, -435, 342, 4, - 274, -435, 353, 59, 291, 223, 331, 395, -435, 438, - -435, -435, -435, -435, -435, 437, -435, -435, -435, 448, - 24, -435, -435, 415, -435, 349, 295, 377, 375, 399, - 198, 421, 190, -435, -435, -435, -435, -435, -435, -435, - -435, -435, 702, -435, -435, 756, 334, 380, -435, -435, - -435, 463, 250, 250, -435, 409, 398, 180, -435, 15, - -435, -435, -435, 250, 221, 182, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 1052, 250, 250, 250, -435, -435, -435, -435, - -435, -435, 1172, 250, 188, 166, 301, -435, -435, -435, - 472, 250, -435, 412, 404, -435, 62, -435, -435, 220, - -435, -435, -435, -435, 458, -435, 438, 438, 27, -435, - 413, 417, 430, 622, 358, 371, 473, 158, -435, -435, - -435, -435, -435, -435, -435, -435, -435, 172, -435, -435, - -435, -435, -435, -435, -435, 354, 622, 250, 250, 250, - -435, 555, 250, 420, -435, 502, -435, 459, 250, -435, - 535, -435, -435, -435, -435, 976, 250, 250, 250, -435, - -435, -435, -435, -435, 496, 250, 423, -435, 541, -435, - 250, -435, 754, -435, 424, 36, 552, 685, -435, 438, - -435, -435, -435, -435, -435, -435, 250, -435, 277, -435, - -435, -435, -435, -435, -435, -435, -435, 856, 250, -435, - -435, -435, 354, 226, 65, 203, -435, 250, 428, 250, - 250, 1172, 462, 354, 31, -435, 250, 53, 186, 250, - -435, -435, -435, 250, 429, 250, 250, 1172, 608, 354, - 479, 83, 538, 485, 482, 320, 459, -435, -435, -435, - -435, -435, -435, 438, 78, -435, -435, 447, 489, 1244, - 250, 144, 487, -435, -435, 250, -435, 462, -435, 205, - 491, -435, 250, -435, 492, -435, 186, 250, -435, 681, - 497, -435, 5, -435, -435, -435, 558, 150, -435, 438, - -435, 447, -435, -435, -435, -435, -435, 27, -435, -435, - -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, - -435, 1244, -435, -435, 250, 250, -435, 250, -435, -435, - 1114, -435, 34, 250, -435, 49, 178, 49, -435, -435, - -435, 1, -435, 438, -435, 250, 306, 827, 250, 250, - 498, 504, 151, 14, -435, -435, -435, 250, -435, -435, - -435, -435, 250 + 467, 43, -9, 143, 155, 174, 47, 179, 199, 202, + -301, -301, -301, -301, -301, -301, -301, -301, -301, -15, + 220, -301, -301, -301, -301, -301, -301, -301, -301, 233, + 233, 233, 233, 233, 233, 233, 31, 325, -301, -301, + -301, -301, 769, 191, 420, 1125, 407, 556, 38, -301, + -301, 336, 290, -301, 345, 146, 14, 374, -301, -301, + 419, 393, -301, 397, -301, 402, 446, -301, 194, -301, + -301, -301, -301, -301, -301, -301, -301, -301, 82, 616, + 297, 629, -301, 454, 164, -301, -301, -301, -301, 236, + -301, -301, -301, 384, 640, 237, 277, -301, -301, -301, + -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, + -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, + -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, + -301, -301, -301, -301, -301, -301, 807, 911, -301, -301, + -301, -301, -301, -301, -301, -301, -301, 28, -301, 390, + 87, 248, -301, 394, 185, 308, 229, 355, 319, -301, + 405, -301, -301, -301, -301, -301, 450, -301, -301, -301, + 471, 292, -301, -301, 25, -301, 364, 285, 367, 311, + 379, 22, 37, 196, -301, -301, -301, -301, -301, -301, + -301, -301, -301, 616, -301, -301, 454, 205, 344, -301, + -301, -301, 466, 233, 233, -301, 484, 416, 94, -301, + 62, -301, -301, -301, 233, 223, 183, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 1062, 233, 233, 233, -301, -301, + -301, -301, -301, -301, 1184, 233, 60, 29, 383, -301, + -301, -301, 493, 233, -301, 507, 429, -301, 83, -301, + -301, 192, -301, -301, -301, -301, 476, -301, 405, 405, + 146, -301, 431, 457, 470, 556, 374, 397, 529, 68, + -301, -301, -301, -301, -301, -301, -301, -301, -301, 96, + -301, -301, -301, -301, -301, -301, -301, 191, 556, 233, + 233, 233, -301, 382, 233, 508, -301, 545, -301, 481, + 233, -301, 538, -301, -301, -301, -301, 985, 233, 233, + 233, -301, -301, -301, -301, -301, 519, 233, 541, -301, + 569, -301, 233, -301, 760, -301, 404, 23, 555, 915, + -301, 405, -301, -301, -301, -301, -301, -301, 233, -301, + 167, -301, -301, -301, -301, -301, -301, -301, -301, 389, + 233, -301, -301, -301, 191, 208, 161, 487, -301, 233, + 546, 233, 233, 1184, 464, 191, 420, -301, 233, 36, + 131, 233, -301, -301, -301, 233, 579, 233, 233, 1184, + 612, 191, 535, 97, 611, 549, 620, 400, 481, -301, + -301, -301, -301, -301, -301, 405, 152, -301, -301, 323, + 632, 1257, 233, 407, 554, -301, -301, 233, -301, 464, + -301, 215, 558, -301, 233, -301, 563, -301, 131, 233, + -301, 686, 567, -301, 272, -301, -301, -301, 638, 299, + -301, 405, -301, 323, -301, -301, -301, -301, -301, 146, + -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, + -301, -301, -301, 1257, -301, -301, 233, 233, -301, 233, + -301, -301, 1125, -301, 28, 233, -301, 38, 136, 38, + -301, -301, -301, 0, -301, 405, -301, 233, 181, 834, + 233, 233, 582, 583, 182, 1, -301, -301, -301, 233, + -301, -301, -301, -301, 233 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -435, -435, -435, -435, -435, -435, -435, -435, -435, -435, - -1, -21, -435, -51, -435, -435, -435, -435, -435, 229, - -435, 147, -435, -435, 256, -435, -435, -434, -435, 425, - -435, -435, -435, 130, -435, -435, 214, 174, -435, -435, - -45, 241, -176, -389, -435, -227, -435, -435, 116, -435, - 231, -154, -137, -435, -435, -130, 566, -435, 310, 449, - -61, 547, -50, -55, -435, 348, -435, 278, 194, -435, - -298, -435, 581, -435, 261, -185, -435, 443, 546, -35, - -435, -435, 218, -19, -435, 352, -435, 364, -16, -3 + -301, -301, -301, -301, -301, -301, -301, -301, -301, -301, + -1, -21, -301, -51, -301, -301, -301, -301, -301, 302, + -301, 264, -301, -301, 5, -301, -301, 217, -301, 536, + -301, -301, -301, 245, -301, -301, 310, 269, -301, -301, + -45, 339, -177, -202, -301, -146, -301, -301, 211, -301, + 327, -132, -130, -301, -301, -103, 667, -301, 408, 543, + -48, 634, -65, -55, -301, 430, -301, 359, 267, -301, + -300, -301, 627, -301, 293, -190, -301, 469, 588, -35, + -301, -301, 252, -19, -301, 377, -301, 378, -16, -3 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1000,332 +1006,334 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -217 static const yytype_int16 yytable[] = { - 20, 148, 297, 39, 163, 183, 40, 374, 97, 29, - 30, 31, 32, 33, 34, 35, 317, 53, 186, 40, - 42, 43, 44, 45, 46, 47, 48, 161, 40, 199, - 461, 196, 159, 197, 21, 160, 40, 280, 281, -19, - 56, 40, 49, 50, 98, 19, 142, 143, 40, -19, - 150, 500, 22, 501, 40, 41, -19, 325, 40, 97, - 263, 173, 151, 317, 176, 161, 178, 180, 181, 182, - 433, 25, 151, 402, 422, 258, 51, -19, 144, 185, - 212, 504, 461, 40, 369, 430, 201, 319, 282, 202, - 203, 207, 209, 99, 511, 166, 213, 37, 162, 214, - 215, 440, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - -70, 310, 244, 245, 341, 382, 162, 276, 253, 277, - 271, 199, 199, 254, 187, 311, 256, 260, 188, 40, - 261, 266, 450, -109, 269, -109, 40, 398, 371, 289, - 198, 294, 290, 299, -151, 359, 360, 361, 362, 363, - 283, 40, 183, 369, 58, 59, 60, 61, 62, 369, - -191, 317, 23, 305, 306, 142, 143, 40, 307, 308, - 309, 40, 462, 40, 179, 40, 427, 24, -19, 312, - 210, 330, 315, 40, 187, -199, 478, 318, 188, 332, - 320, 26, 439, -137, -137, 291, 211, 144, -137, 189, - 190, 191, 355, 510, 267, 40, 40, 350, -19, -151, - -151, 40, 27, -151, -151, -151, -151, -151, 364, 365, - 268, 184, 370, 28, 462, 326, 185, 371, -67, 327, - 328, -191, 322, 371, 349, 40, 199, 323, 335, 144, - 338, 304, 351, -19, 340, 463, 486, 342, 300, 37, - 97, 344, 345, -138, -138, -199, -199, -199, -138, 189, - 190, 191, 464, 356, 359, 360, 361, 362, 363, 465, - 343, 367, 321, -19, 368, 497, 423, 351, 72, 372, - 40, 351, 373, -187, 205, 55, 40, 290, 158, 37, - 37, 38, 200, 377, 333, 379, 90, 463, 380, 98, - 351, 383, 384, 424, 37, 40, 208, 413, 410, 386, - 387, 388, 389, 446, 464, 198, 393, 97, 395, -154, - 396, 465, 399, 91, 37, 405, 259, 156, 97, 58, - 59, 60, 61, 62, 414, 89, 356, 415, 365, 40, - 291, 37, 351, 265, 97, 417, 65, 90, 99, 420, - 421, 51, 92, 37, -187, 425, 472, 505, 351, 167, - 40, 198, 175, 172, 432, -150, -19, 449, 445, 436, - 448, 437, 174, -19, 91, 58, 59, 60, 61, 62, - 204, 37, 456, 270, -154, -154, 492, 177, -154, -154, - -154, -154, -154, 257, 168, 451, 142, 143, 169, 37, - 40, 288, 474, 92, 262, 475, 40, 477, 284, 40, - 272, 273, 480, 301, 302, 285, 64, 483, 278, 493, - 485, 448, 487, 49, 50, 295, -19, 37, 144, 293, - -150, -150, 40, 491, -150, -150, -150, -150, -150, 452, - 453, 279, -210, 248, 313, 142, 143, 170, 171, 37, - 316, 298, 495, 336, -216, -216, 339, -216, -216, 37, - 498, 314, 37, 499, 337, 346, 357, 352, 502, 503, - 37, 353, 376, 37, -108, 392, 507, 144, 37, 37, - 426, 438, 428, 378, 354, 512, -216, -216, -216, -216, + 20, 149, 299, 39, 164, 40, 40, 376, 97, 29, + 30, 31, 32, 33, 34, 35, 197, 53, 198, 40, + 42, 43, 44, 45, 46, 47, 48, 40, 40, 200, + 40, 187, 160, -19, 40, 161, 49, 50, 286, 151, + 56, 40, 40, 40, 19, 287, 64, 72, -19, 303, + 304, 152, 25, 435, 327, -19, 37, 159, 38, 97, + 404, 174, 21, 319, 177, 40, 179, 181, 182, 183, + 51, -19, 334, 332, 424, 361, 362, 363, 364, 365, + 213, 506, 513, 184, 319, 432, 202, 167, 184, 203, + 204, 208, 210, 302, -191, 319, 214, 371, 371, 215, + 216, 442, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 313, 384, 246, 247, 321, 40, 371, 278, 255, + 279, 273, 200, 200, 256, 312, 162, 258, 262, 366, + 367, 263, 268, 185, 400, 271, 343, 40, 186, 260, + 291, 162, 296, 186, 301, 199, -191, 372, -109, -151, + -109, 285, 373, 373, 361, 362, 363, 364, 365, 58, + 59, 60, 61, 62, 307, 308, 265, 40, 40, 309, + 310, 311, 89, 429, 98, 180, 40, 40, 152, -19, + 314, 40, 28, 317, 90, 145, 199, -67, 320, 441, + -154, 322, 373, 40, 22, -199, 480, 37, 163, 463, + 58, 59, 60, 61, 62, 40, 23, 452, 40, 352, + 269, 91, 41, 163, -19, -151, -151, 357, 40, -151, + -151, -151, -151, -151, 99, 24, 270, 328, 417, 367, + 26, 329, 330, 507, 324, 512, 351, -70, 200, 325, + 337, 92, 340, 345, 353, -19, 342, 488, 306, 344, + 27, 463, 97, 346, 347, 464, -154, -154, 211, 425, + -154, -154, -154, -154, -154, 358, -199, -199, -199, 465, + 40, 466, 499, 369, 212, 323, 370, 292, 188, 353, + -19, 374, 189, 353, 375, 282, 283, 37, 37, 201, + 209, 292, 65, 143, 144, 379, 40, 381, 467, 37, + 382, 261, 353, 385, 386, 426, 55, 464, 40, 415, + 412, 388, 389, 390, 391, 454, 455, 157, 395, 97, + 397, 465, 398, 466, 401, 199, 145, 407, 37, -150, + 97, 293, 143, 144, 274, 275, 416, 284, 358, 58, + 59, 60, 61, 62, 353, 293, 97, 419, -137, -137, + 467, 422, 423, -137, 190, 191, 192, 427, 474, 37, + 353, 267, 297, 199, 51, 145, 434, -153, 40, 451, + 447, 438, 450, 439, 40, 168, 335, 58, 59, 60, + 61, 62, -103, 176, 458, 40, 173, -19, 494, 40, + 49, 50, 40, 448, -19, -150, -150, 453, 175, -150, + -150, -150, -150, -150, 476, 40, 37, 477, 272, 479, + 143, 144, 169, 98, 482, 37, 170, 290, 37, 485, + 295, 495, 487, 450, 489, 143, 144, 178, 143, 144, + 37, 280, 300, -153, -153, 493, 205, -153, -153, -153, + -153, -153, 259, 145, -210, 250, 264, 315, -19, 58, + 59, 60, 61, 62, 497, -108, -216, -216, 145, -216, + -216, 145, 500, 99, 281, 501, 171, 172, 188, 318, + 504, 505, 189, 1, 338, 2, 3, 4, 509, 5, + 6, 7, 341, 348, 430, 8, 354, 514, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, - -216, -216, -216, -216, -216, -216, -216, -216, -216, 37, - -216, -216, -210, -210, -210, -205, 381, 250, -216, 390, - 40, -216, 394, 442, 251, -216, -216, 103, 104, 441, - 105, 106, 37, 404, 444, 443, 198, -19, 473, 37, - -153, 455, 479, 488, -19, -19, 481, 471, 484, 508, - 58, 59, 60, 61, 62, 509, 407, 489, 264, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 435, 130, 92, -205, -205, -205, 418, 248, - 482, 131, 506, 149, 132, 431, 375, -19, 133, 134, - -216, -216, 286, -216, -216, -153, -153, 40, 195, -153, - -153, -153, -153, -153, 358, 57, 416, 58, 59, 60, - 61, 62, 63, 64, 193, 490, 58, 59, 60, 61, - 62, 194, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, - -216, -216, -216, -216, -216, 206, -216, -216, -81, -81, - -81, 247, 248, 250, -216, -2, 406, -216, 476, 494, - 251, -216, -216, -216, -216, 329, -216, -216, 57, 411, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 412, 0, 0, 0, 57, 69, 58, 59, 60, - 61, 62, 63, 64, 51, -216, -216, -216, -216, -216, + -216, -216, 355, -216, -216, -210, -210, -210, -205, 383, + 252, -216, 359, 40, -216, 356, 380, 253, -216, -216, + 103, 104, 37, 105, 106, 37, 406, 316, -138, -138, + -19, 40, 392, -138, 190, 191, 192, -19, -19, 57, + 396, 58, 59, 60, 61, 62, 63, 64, 37, 37, + 339, 378, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 443, 131, 92, -205, + -205, -205, 37, 250, 394, 132, 444, 37, 133, 428, + 445, -19, 134, 135, -216, -216, 475, -216, -216, 57, + 481, 58, 59, 60, 61, 62, 63, 64, 483, 486, + -187, 206, 194, 490, 58, 59, 60, 61, 62, 195, + 37, 409, 440, 90, 510, 511, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, - -216, -216, -216, -216, -216, -216, -216, -216, 0, -216, - -216, -84, -84, -84, 0, 397, 250, -216, 0, 40, - -216, 0, 0, 251, -216, -216, 103, 104, 40, 105, - 106, 58, 59, 60, 61, 62, 57, 0, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 0, - 0, 0, 0, 0, 69, 0, 0, 0, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 0, 130, 92, -85, -85, -85, 0, 248, 0, - 131, 0, -19, 132, 0, 0, 0, 133, 134, -216, - -216, 0, -216, -216, 1, 0, 2, 3, 4, 0, - 5, 6, 7, 0, 0, 0, 8, 0, 0, 0, - 0, 40, 0, 0, 0, 0, 0, 0, 0, -103, - 0, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, - -216, -216, -216, -216, 0, -216, -216, 142, 143, 0, - 0, -19, 250, -216, 248, 0, -216, 0, 0, 251, - -216, -216, 0, 0, 0, -216, -216, 0, -216, -216, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -216, -216, -216, + 91, -216, -216, -81, -81, -81, 473, 250, 252, -216, + 266, 37, -216, 446, 491, 253, -216, -216, -216, -216, + 437, -216, -216, 37, 502, 457, 503, 484, 420, 508, + 92, 37, -187, 433, 150, 196, 377, 288, 360, 418, + 492, 207, 478, 331, 249, 496, 413, 414, 0, 0, + -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, + -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, + -216, -216, -216, -216, 0, -216, -216, -84, -84, -84, + 0, 399, 252, -216, 0, 40, -216, 0, 0, 253, + -216, -216, 103, 104, 40, 105, 106, 0, 0, 0, + 0, 0, 57, 0, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 0, 0, 0, 0, 0, + 69, 0, 0, 0, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 0, 131, + 92, -85, -85, -85, 0, 250, 0, 132, 0, -19, + 133, 0, 0, 0, 134, 135, -216, -216, 0, -216, + -216, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 248, + 126, 127, 128, 0, 0, 0, 0, 0, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, - 0, -216, -216, 0, 249, 0, 0, 248, 250, -216, - 0, 0, -216, 0, 0, 251, -216, -216, -216, -216, - 0, -216, -216, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 246, 125, 126, 127, 0, 0, 0, 0, 0, 0, + -216, -216, 0, -216, -216, 0, 0, 0, 0, -19, + 252, -216, 250, 0, -216, -2, 408, 253, -216, -216, + 0, 0, 0, -216, -216, 0, -216, -216, 57, 0, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 0, 0, 0, 0, 0, 69, 0, 0, 0, + 0, 0, 0, 0, 51, -216, -216, -216, -216, -216, + -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, + -216, -216, -216, -216, -216, -216, -216, -216, -216, 0, + -216, -216, 0, 251, 0, 0, 250, 252, -216, 0, + 0, -216, 0, 0, 253, -216, -216, -216, -216, 0, + -216, -216, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, -216, 0, -216, -216, 0, 0, 0, 0, - 385, 250, -216, 324, 0, -216, 0, 40, 251, -216, + 387, 252, -216, 326, 0, -216, 0, 40, 253, -216, -216, 0, 0, 0, 103, 104, 0, 105, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 40, - 130, 92, 0, 0, 0, 0, 103, 104, 131, 105, - 106, 132, 0, 0, 0, 133, 134, 0, 0, 0, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 40, 131, 92, 0, 0, 0, 0, 103, 104, 132, + 105, 106, 133, 0, 0, 0, 134, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 0, 131, 92, 103, 104, 0, 105, + 106, 0, 132, 0, 0, 133, 0, 0, 0, 134, + 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 0, 130, 92, 103, 104, 0, 105, 106, 0, - 131, 0, 0, 132, 0, 0, 0, 133, 134, 0, + 129, 130, 0, 131, 92, 0, 0, 162, 459, 0, + 0, 132, 0, 0, 133, 0, 0, 0, 134, 135, + 57, 0, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 0, 0, 0, 0, 0, 69, 0, + 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 0, - 130, 92, 0, 0, 161, 457, 0, 0, 131, 0, - 0, 132, 0, 0, 0, 133, 134, 57, 0, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, - 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 162 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 163 }; static const yytype_int16 yycheck[] = { - 1, 46, 178, 19, 55, 1, 5, 305, 43, 10, - 11, 12, 13, 14, 15, 16, 1, 36, 79, 5, - 21, 22, 23, 24, 25, 26, 27, 0, 5, 84, - 419, 81, 53, 83, 70, 54, 5, 13, 14, 5, - 41, 5, 5, 6, 13, 1, 41, 42, 5, 5, - 1, 485, 70, 487, 5, 12, 12, 242, 5, 94, - 1, 62, 13, 1, 65, 0, 67, 68, 69, 70, - 17, 5, 13, 37, 372, 71, 39, 43, 73, 75, - 96, 80, 471, 5, 1, 383, 89, 72, 64, 90, - 91, 94, 95, 62, 80, 72, 97, 70, 71, 100, - 101, 399, 103, 104, 105, 106, 107, 108, 109, 110, + 1, 46, 179, 19, 55, 5, 5, 307, 43, 10, + 11, 12, 13, 14, 15, 16, 81, 36, 83, 5, + 21, 22, 23, 24, 25, 26, 27, 5, 5, 84, + 5, 79, 53, 5, 5, 54, 5, 6, 13, 1, + 41, 5, 5, 5, 1, 20, 21, 42, 5, 12, + 13, 13, 5, 17, 244, 12, 71, 52, 73, 94, + 37, 62, 71, 1, 65, 5, 67, 68, 69, 70, + 39, 43, 43, 13, 374, 7, 8, 9, 10, 11, + 96, 81, 81, 1, 1, 385, 89, 73, 1, 90, + 91, 94, 95, 71, 0, 1, 97, 1, 1, 100, + 101, 401, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 71, 192, 133, 134, 72, 320, 71, 158, 139, 160, - 156, 196, 197, 144, 1, 195, 147, 150, 5, 5, - 151, 154, 74, 70, 155, 72, 5, 342, 75, 175, - 1, 177, 12, 179, 5, 7, 8, 9, 10, 11, - 171, 5, 1, 1, 15, 16, 17, 18, 19, 1, - 0, 1, 70, 184, 185, 41, 42, 5, 189, 190, - 191, 5, 419, 5, 1, 5, 381, 70, 5, 200, - 1, 13, 205, 5, 1, 0, 1, 208, 5, 43, - 211, 70, 397, 70, 71, 65, 17, 73, 75, 76, - 77, 78, 283, 72, 1, 5, 5, 278, 5, 70, - 71, 5, 70, 74, 75, 76, 77, 78, 80, 81, - 17, 70, 70, 0, 471, 246, 75, 75, 70, 250, - 251, 71, 70, 75, 275, 5, 311, 75, 259, 73, - 263, 71, 278, 70, 265, 419, 442, 268, 70, 70, - 305, 272, 273, 70, 71, 70, 71, 72, 75, 76, - 77, 78, 419, 284, 7, 8, 9, 10, 11, 419, - 70, 292, 71, 70, 295, 480, 70, 313, 42, 300, - 5, 317, 303, 0, 1, 1, 5, 12, 52, 70, - 70, 72, 72, 314, 13, 316, 13, 471, 319, 13, - 336, 322, 323, 374, 70, 5, 72, 348, 347, 330, - 331, 332, 333, 13, 471, 1, 337, 372, 339, 5, - 341, 471, 343, 40, 70, 346, 72, 1, 383, 15, - 16, 17, 18, 19, 355, 1, 357, 80, 81, 5, - 65, 70, 378, 72, 399, 366, 22, 13, 62, 370, - 371, 39, 69, 70, 71, 376, 421, 71, 394, 21, - 5, 1, 1, 13, 385, 5, 5, 408, 404, 390, - 406, 392, 21, 12, 40, 15, 16, 17, 18, 19, - 71, 70, 418, 72, 70, 71, 457, 1, 74, 75, - 76, 77, 78, 71, 13, 416, 41, 42, 17, 70, - 5, 72, 423, 69, 71, 426, 5, 428, 13, 5, - 35, 36, 433, 12, 13, 20, 21, 438, 1, 460, - 441, 457, 443, 5, 6, 70, 65, 70, 73, 72, - 70, 71, 5, 454, 74, 75, 76, 77, 78, 12, - 13, 13, 0, 1, 1, 41, 42, 66, 67, 70, - 72, 72, 473, 1, 12, 13, 72, 15, 16, 70, - 481, 72, 70, 484, 72, 27, 13, 74, 489, 490, - 70, 74, 72, 70, 70, 72, 497, 73, 70, 70, - 72, 72, 40, 1, 74, 506, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 70, - 68, 69, 70, 71, 72, 0, 1, 75, 76, 43, - 5, 79, 1, 5, 82, 83, 84, 12, 13, 70, - 15, 16, 70, 1, 72, 70, 1, 5, 71, 70, - 5, 72, 71, 5, 12, 13, 74, 420, 71, 71, - 15, 16, 17, 18, 19, 71, 347, 447, 153, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 388, 68, 69, 70, 71, 72, 367, 1, - 436, 76, 496, 47, 79, 384, 306, 65, 83, 84, - 12, 13, 173, 15, 16, 70, 71, 5, 81, 74, - 75, 76, 77, 78, 286, 13, 358, 15, 16, 17, - 18, 19, 20, 21, 13, 451, 15, 16, 17, 18, - 19, 20, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 94, 68, 69, 70, 71, - 72, 135, 1, 75, 76, 0, 1, 79, 427, 471, - 82, 83, 84, 12, 13, 252, 15, 16, 13, 347, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 347, -1, -1, -1, 13, 31, 15, 16, 17, - 18, 19, 20, 21, 39, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, -1, 68, - 69, 70, 71, 72, -1, 1, 75, 76, -1, 5, - 79, -1, -1, 82, 83, 84, 12, 13, 5, 15, - 16, 15, 16, 17, 18, 19, 13, -1, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, - -1, -1, -1, -1, 31, -1, -1, -1, 44, 45, + 131, 196, 322, 134, 135, 73, 5, 1, 159, 140, + 161, 157, 197, 198, 145, 193, 0, 148, 151, 81, + 82, 152, 155, 71, 344, 156, 73, 5, 76, 72, + 176, 0, 178, 76, 180, 1, 72, 71, 71, 5, + 73, 172, 76, 76, 7, 8, 9, 10, 11, 15, + 16, 17, 18, 19, 185, 186, 1, 5, 5, 190, + 191, 192, 1, 383, 13, 1, 5, 5, 13, 5, + 201, 5, 0, 206, 13, 74, 1, 71, 209, 399, + 5, 212, 76, 5, 71, 0, 1, 71, 72, 421, + 15, 16, 17, 18, 19, 5, 71, 75, 5, 280, + 1, 40, 12, 72, 5, 71, 72, 285, 5, 75, + 76, 77, 78, 79, 63, 71, 17, 248, 81, 82, + 71, 252, 253, 72, 71, 73, 277, 72, 313, 76, + 261, 70, 265, 71, 280, 71, 267, 444, 72, 270, + 71, 473, 307, 274, 275, 421, 71, 72, 1, 71, + 75, 76, 77, 78, 79, 286, 71, 72, 73, 421, + 5, 421, 482, 294, 17, 72, 297, 12, 1, 315, + 71, 302, 5, 319, 305, 13, 14, 71, 71, 73, + 73, 12, 22, 41, 42, 316, 5, 318, 421, 71, + 321, 73, 338, 324, 325, 376, 1, 473, 5, 350, + 349, 332, 333, 334, 335, 12, 13, 1, 339, 374, + 341, 473, 343, 473, 345, 1, 74, 348, 71, 5, + 385, 66, 41, 42, 35, 36, 357, 65, 359, 15, + 16, 17, 18, 19, 380, 66, 401, 368, 71, 72, + 473, 372, 373, 76, 77, 78, 79, 378, 423, 71, + 396, 73, 71, 1, 39, 74, 387, 5, 5, 410, + 406, 392, 408, 394, 5, 21, 13, 15, 16, 17, + 18, 19, 13, 1, 420, 5, 13, 5, 459, 5, + 5, 6, 5, 13, 12, 71, 72, 418, 21, 75, + 76, 77, 78, 79, 425, 5, 71, 428, 73, 430, + 41, 42, 13, 13, 435, 71, 17, 73, 71, 440, + 73, 462, 443, 459, 445, 41, 42, 1, 41, 42, + 71, 1, 73, 71, 72, 456, 72, 75, 76, 77, + 78, 79, 72, 74, 0, 1, 72, 1, 66, 15, + 16, 17, 18, 19, 475, 71, 12, 13, 74, 15, + 16, 74, 483, 63, 13, 486, 67, 68, 1, 73, + 491, 492, 5, 26, 1, 28, 29, 30, 499, 32, + 33, 34, 73, 27, 40, 38, 75, 508, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, 68, 69, 70, 71, 72, -1, 1, -1, - 76, -1, 5, 79, -1, -1, -1, 83, 84, 12, - 13, -1, 15, 16, 26, -1, 28, 29, 30, -1, - 32, 33, 34, -1, -1, -1, 38, -1, -1, -1, - -1, 5, -1, -1, -1, -1, -1, -1, -1, 13, - -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, -1, 68, 69, 41, 42, -1, - -1, 74, 75, 76, 1, -1, 79, -1, -1, 82, - 83, 84, -1, -1, -1, 12, 13, -1, 15, 16, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 73, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - -1, 68, 69, -1, 71, -1, -1, 1, 75, 76, - -1, -1, 79, -1, -1, 82, 83, 84, 12, 13, - -1, 15, 16, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, -1, -1, -1, -1, -1, -1, + 66, 67, 75, 69, 70, 71, 72, 73, 0, 1, + 76, 77, 13, 5, 80, 75, 1, 83, 84, 85, + 12, 13, 71, 15, 16, 71, 1, 73, 71, 72, + 5, 5, 43, 76, 77, 78, 79, 12, 13, 13, + 1, 15, 16, 17, 18, 19, 20, 21, 71, 71, + 73, 73, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 71, 69, 70, 71, + 72, 73, 71, 1, 73, 77, 5, 71, 80, 73, + 71, 66, 84, 85, 12, 13, 72, 15, 16, 13, + 72, 15, 16, 17, 18, 19, 20, 21, 75, 72, + 0, 1, 13, 5, 15, 16, 17, 18, 19, 20, + 71, 349, 73, 13, 72, 72, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 40, 69, 70, 71, 72, 73, 422, 1, 76, 77, + 154, 71, 80, 73, 449, 83, 84, 85, 12, 13, + 390, 15, 16, 71, 487, 73, 489, 438, 369, 498, + 70, 71, 72, 386, 47, 81, 308, 174, 288, 360, + 453, 94, 429, 254, 136, 473, 349, 349, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, 68, 69, -1, -1, -1, -1, - 74, 75, 76, 1, -1, 79, -1, 5, 82, 83, - 84, -1, -1, -1, 12, 13, -1, 15, 16, -1, + 64, 65, 66, 67, -1, 69, 70, 71, 72, 73, + -1, 1, 76, 77, -1, 5, 80, -1, -1, 83, + 84, 85, 12, 13, 5, 15, 16, -1, -1, -1, + -1, -1, 13, -1, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, + 31, -1, -1, -1, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, -1, 69, + 70, 71, 72, 73, -1, 1, -1, 77, -1, 5, + 80, -1, -1, -1, 84, 85, 12, 13, -1, 15, + 16, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, -1, -1, -1, -1, -1, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, -1, 69, 70, -1, -1, -1, -1, 75, + 76, 77, 1, -1, 80, 0, 1, 83, 84, 85, + -1, -1, -1, 12, 13, -1, 15, 16, 13, -1, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, -1, -1, -1, -1, -1, 31, -1, -1, -1, + -1, -1, -1, -1, 39, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 69, 70, -1, 72, -1, -1, 1, 76, 77, -1, + -1, 80, -1, -1, 83, 84, 85, 12, 13, -1, + 15, 16, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, -1, 69, 70, -1, -1, -1, -1, + 75, 76, 77, 1, -1, 80, -1, 5, 83, 84, + 85, -1, -1, -1, 12, 13, -1, 15, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 5, - 68, 69, -1, -1, -1, -1, 12, 13, 76, 15, - 16, 79, -1, -1, -1, 83, 84, -1, -1, -1, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 5, 69, 70, -1, -1, -1, -1, 12, 13, 77, + 15, 16, 80, -1, -1, -1, 84, 85, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, -1, 69, 70, 12, 13, -1, 15, + 16, -1, 77, -1, -1, 80, -1, -1, -1, 84, + 85, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, 68, 69, 12, 13, -1, 15, 16, -1, - 76, -1, -1, 79, -1, -1, -1, 83, 84, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, - 68, 69, -1, -1, 0, 1, -1, -1, 76, -1, - -1, 79, -1, -1, -1, 83, 84, 13, -1, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - -1, -1, -1, -1, -1, 31, -1, -1, -1, -1, - -1, -1, -1, 39, -1, -1, -1, -1, -1, -1, + 66, 67, -1, 69, 70, -1, -1, 0, 1, -1, + -1, 77, -1, -1, 80, -1, -1, -1, 84, 85, + 13, -1, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, -1, -1, -1, -1, -1, 31, -1, + -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 71 + -1, -1, -1, -1, -1, -1, -1, -1, -1, 72 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 26, 28, 29, 30, 32, 33, 34, 38, 86, - 88, 89, 90, 91, 92, 93, 94, 97, 99, 1, - 95, 70, 70, 70, 70, 5, 70, 70, 0, 95, - 95, 95, 95, 95, 95, 95, 96, 70, 72, 173, - 5, 12, 95, 95, 95, 95, 95, 95, 95, 5, - 6, 39, 100, 168, 169, 1, 95, 13, 15, 16, + 0, 26, 28, 29, 30, 32, 33, 34, 38, 87, + 89, 90, 91, 92, 93, 94, 95, 98, 100, 1, + 96, 71, 71, 71, 71, 5, 71, 71, 0, 96, + 96, 96, 96, 96, 96, 96, 97, 71, 73, 174, + 5, 12, 96, 96, 96, 96, 96, 96, 96, 5, + 6, 39, 101, 169, 170, 1, 96, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 31, - 87, 104, 109, 128, 130, 136, 137, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 151, 154, 1, - 13, 40, 69, 155, 156, 157, 158, 164, 13, 62, - 133, 134, 135, 12, 13, 15, 16, 44, 45, 46, + 88, 105, 110, 129, 131, 137, 138, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 152, 155, 1, + 13, 40, 70, 156, 157, 158, 159, 165, 13, 63, + 134, 135, 136, 12, 13, 15, 16, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 68, 76, 79, 83, 84, 139, 160, 162, 163, 164, - 165, 166, 41, 42, 73, 121, 122, 124, 125, 141, - 1, 13, 112, 113, 114, 115, 1, 101, 109, 96, - 168, 0, 71, 98, 173, 174, 72, 21, 13, 17, - 66, 67, 13, 95, 21, 1, 95, 1, 95, 1, - 95, 95, 95, 1, 70, 75, 145, 1, 5, 76, - 77, 78, 138, 13, 20, 146, 147, 147, 1, 148, - 72, 174, 95, 95, 71, 1, 157, 174, 72, 174, - 1, 17, 173, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 61, 163, 1, 71, - 75, 82, 161, 95, 95, 95, 95, 71, 71, 72, - 174, 95, 71, 1, 114, 72, 174, 1, 17, 95, - 72, 173, 35, 36, 102, 110, 96, 96, 1, 13, - 13, 14, 64, 95, 13, 20, 144, 150, 72, 173, - 12, 65, 118, 72, 173, 70, 125, 127, 72, 173, - 70, 12, 13, 131, 71, 95, 95, 95, 95, 95, - 145, 147, 95, 1, 72, 174, 72, 1, 95, 72, - 95, 71, 70, 75, 1, 160, 95, 95, 95, 162, - 13, 119, 43, 13, 129, 95, 1, 72, 174, 72, - 95, 72, 95, 70, 95, 95, 27, 103, 116, 96, - 98, 173, 74, 74, 74, 145, 95, 13, 150, 7, - 8, 9, 10, 11, 80, 81, 152, 95, 95, 1, - 70, 75, 95, 95, 155, 143, 72, 95, 1, 95, - 95, 1, 160, 95, 95, 74, 95, 95, 95, 95, - 43, 123, 72, 95, 1, 95, 95, 1, 160, 95, - 126, 127, 37, 111, 1, 95, 1, 104, 105, 109, - 168, 170, 172, 96, 95, 80, 152, 95, 126, 106, - 95, 95, 155, 70, 98, 95, 72, 160, 40, 159, - 155, 135, 95, 17, 120, 121, 95, 95, 72, 160, - 155, 70, 5, 70, 72, 173, 13, 117, 173, 96, - 74, 95, 12, 13, 153, 72, 173, 1, 98, 107, - 108, 128, 130, 136, 137, 140, 167, 168, 170, 171, - 172, 106, 125, 71, 95, 95, 159, 95, 1, 71, - 95, 74, 122, 95, 71, 95, 127, 95, 5, 118, - 153, 95, 98, 96, 167, 95, 132, 160, 95, 95, - 112, 112, 95, 95, 80, 71, 133, 95, 71, 71, - 72, 80, 95 + 67, 69, 77, 80, 84, 85, 140, 161, 163, 164, + 165, 166, 167, 41, 42, 74, 122, 123, 125, 126, + 142, 1, 13, 113, 114, 115, 116, 1, 102, 110, + 97, 169, 0, 72, 99, 174, 175, 73, 21, 13, + 17, 67, 68, 13, 96, 21, 1, 96, 1, 96, + 1, 96, 96, 96, 1, 71, 76, 146, 1, 5, + 77, 78, 79, 139, 13, 20, 147, 148, 148, 1, + 149, 73, 175, 96, 96, 72, 1, 158, 175, 73, + 175, 1, 17, 174, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, 62, 164, + 1, 72, 76, 83, 162, 96, 96, 96, 96, 72, + 72, 73, 175, 96, 72, 1, 115, 73, 175, 1, + 17, 96, 73, 174, 35, 36, 103, 111, 97, 97, + 1, 13, 13, 14, 65, 96, 13, 20, 145, 151, + 73, 174, 12, 66, 119, 73, 174, 71, 126, 128, + 73, 174, 71, 12, 13, 132, 72, 96, 96, 96, + 96, 96, 146, 148, 96, 1, 73, 175, 73, 1, + 96, 73, 96, 72, 71, 76, 1, 161, 96, 96, + 96, 163, 13, 120, 43, 13, 130, 96, 1, 73, + 175, 73, 96, 73, 96, 71, 96, 96, 27, 104, + 117, 97, 99, 174, 75, 75, 75, 146, 96, 13, + 151, 7, 8, 9, 10, 11, 81, 82, 153, 96, + 96, 1, 71, 76, 96, 96, 156, 144, 73, 96, + 1, 96, 96, 1, 161, 96, 96, 75, 96, 96, + 96, 96, 43, 124, 73, 96, 1, 96, 96, 1, + 161, 96, 127, 128, 37, 112, 1, 96, 1, 105, + 106, 110, 169, 171, 173, 97, 96, 81, 153, 96, + 127, 107, 96, 96, 156, 71, 99, 96, 73, 161, + 40, 160, 156, 136, 96, 17, 121, 122, 96, 96, + 73, 161, 156, 71, 5, 71, 73, 174, 13, 118, + 174, 97, 75, 96, 12, 13, 154, 73, 174, 1, + 99, 108, 109, 129, 131, 137, 138, 141, 168, 169, + 171, 172, 173, 107, 126, 72, 96, 96, 160, 96, + 1, 72, 96, 75, 123, 96, 72, 96, 128, 96, + 5, 119, 154, 96, 99, 97, 168, 96, 133, 161, + 96, 96, 113, 113, 96, 96, 81, 72, 134, 96, + 72, 72, 73, 81, 96 }; #define yyerrok (yyerrstatus = 0) @@ -2138,7 +2146,7 @@ yyreduce: case 12: /* Line 1455 of yacc.c */ -#line 282 "../css/CSSGrammar.y" +#line 287 "../css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_rule = (yyvsp[(4) - (6)].rule); ;} @@ -2147,7 +2155,7 @@ yyreduce: case 13: /* Line 1455 of yacc.c */ -#line 288 "../css/CSSGrammar.y" +#line 293 "../css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_keyframe = (yyvsp[(4) - (6)].keyframeRule); ;} @@ -2156,7 +2164,7 @@ yyreduce: case 14: /* Line 1455 of yacc.c */ -#line 294 "../css/CSSGrammar.y" +#line 299 "../css/CSSGrammar.y" { /* can be empty */ ;} @@ -2165,7 +2173,7 @@ yyreduce: case 15: /* Line 1455 of yacc.c */ -#line 300 "../css/CSSGrammar.y" +#line 305 "../css/CSSGrammar.y" { /* can be empty */ ;} @@ -2174,7 +2182,7 @@ yyreduce: case 16: /* Line 1455 of yacc.c */ -#line 306 "../css/CSSGrammar.y" +#line 311 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); if ((yyvsp[(4) - (5)].valueList)) { @@ -2191,7 +2199,7 @@ yyreduce: case 17: /* Line 1455 of yacc.c */ -#line 320 "../css/CSSGrammar.y" +#line 325 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->m_mediaQuery = p->sinkFloatingMediaQuery((yyvsp[(4) - (5)].mediaQuery)); @@ -2201,7 +2209,7 @@ yyreduce: case 18: /* Line 1455 of yacc.c */ -#line 327 "../css/CSSGrammar.y" +#line 332 "../css/CSSGrammar.y" { if ((yyvsp[(4) - (5)].selectorList)) { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2214,7 +2222,7 @@ yyreduce: case 25: /* Line 1455 of yacc.c */ -#line 349 "../css/CSSGrammar.y" +#line 354 "../css/CSSGrammar.y" { ;} break; @@ -2222,7 +2230,7 @@ yyreduce: case 28: /* Line 1455 of yacc.c */ -#line 359 "../css/CSSGrammar.y" +#line 364 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.rule) = static_cast<CSSParser*>(parser)->createCharsetRule((yyvsp[(3) - (5)].string)); @@ -2234,7 +2242,7 @@ yyreduce: case 29: /* Line 1455 of yacc.c */ -#line 365 "../css/CSSGrammar.y" +#line 370 "../css/CSSGrammar.y" { ;} break; @@ -2242,7 +2250,7 @@ yyreduce: case 30: /* Line 1455 of yacc.c */ -#line 367 "../css/CSSGrammar.y" +#line 372 "../css/CSSGrammar.y" { ;} break; @@ -2250,7 +2258,7 @@ yyreduce: case 32: /* Line 1455 of yacc.c */ -#line 373 "../css/CSSGrammar.y" +#line 378 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); if ((yyvsp[(2) - (3)].rule) && p->m_styleSheet) @@ -2261,7 +2269,7 @@ yyreduce: case 33: /* Line 1455 of yacc.c */ -#line 378 "../css/CSSGrammar.y" +#line 383 "../css/CSSGrammar.y" { ;} break; @@ -2269,7 +2277,7 @@ yyreduce: case 35: /* Line 1455 of yacc.c */ -#line 384 "../css/CSSGrammar.y" +#line 389 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); if ((yyvsp[(2) - (3)].rule) && p->m_styleSheet) @@ -2280,7 +2288,7 @@ yyreduce: case 39: /* Line 1455 of yacc.c */ -#line 398 "../css/CSSGrammar.y" +#line 403 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); if ((yyvsp[(2) - (3)].rule) && p->m_styleSheet) @@ -2291,14 +2299,14 @@ yyreduce: case 49: /* Line 1455 of yacc.c */ -#line 421 "../css/CSSGrammar.y" +#line 426 "../css/CSSGrammar.y" { (yyval.ruleList) = 0; ;} break; case 50: /* Line 1455 of yacc.c */ -#line 422 "../css/CSSGrammar.y" +#line 427 "../css/CSSGrammar.y" { (yyval.ruleList) = (yyvsp[(1) - (3)].ruleList); if ((yyvsp[(2) - (3)].rule)) { @@ -2312,7 +2320,7 @@ yyreduce: case 60: /* Line 1455 of yacc.c */ -#line 449 "../css/CSSGrammar.y" +#line 454 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createImportRule((yyvsp[(3) - (6)].string), (yyvsp[(5) - (6)].mediaList)); ;} @@ -2321,7 +2329,7 @@ yyreduce: case 61: /* Line 1455 of yacc.c */ -#line 452 "../css/CSSGrammar.y" +#line 457 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} @@ -2330,7 +2338,7 @@ yyreduce: case 62: /* Line 1455 of yacc.c */ -#line 455 "../css/CSSGrammar.y" +#line 460 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} @@ -2339,7 +2347,7 @@ yyreduce: case 63: /* Line 1455 of yacc.c */ -#line 458 "../css/CSSGrammar.y" +#line 463 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} @@ -2348,7 +2356,7 @@ yyreduce: case 64: /* Line 1455 of yacc.c */ -#line 464 "../css/CSSGrammar.y" +#line 469 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createVariablesRule((yyvsp[(3) - (7)].mediaList), true); ;} @@ -2357,7 +2365,7 @@ yyreduce: case 65: /* Line 1455 of yacc.c */ -#line 468 "../css/CSSGrammar.y" +#line 473 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createVariablesRule((yyvsp[(3) - (7)].mediaList), false); ;} @@ -2366,7 +2374,7 @@ yyreduce: case 66: /* Line 1455 of yacc.c */ -#line 474 "../css/CSSGrammar.y" +#line 479 "../css/CSSGrammar.y" { (yyval.mediaList) = static_cast<CSSParser*>(parser)->createMediaList(); ;} @@ -2375,7 +2383,7 @@ yyreduce: case 67: /* Line 1455 of yacc.c */ -#line 478 "../css/CSSGrammar.y" +#line 483 "../css/CSSGrammar.y" { (yyval.mediaList) = (yyvsp[(3) - (3)].mediaList); ;} @@ -2384,7 +2392,7 @@ yyreduce: case 68: /* Line 1455 of yacc.c */ -#line 484 "../css/CSSGrammar.y" +#line 489 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); ;} @@ -2393,7 +2401,7 @@ yyreduce: case 69: /* Line 1455 of yacc.c */ -#line 487 "../css/CSSGrammar.y" +#line 492 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); if ((yyvsp[(2) - (2)].boolean)) @@ -2404,7 +2412,7 @@ yyreduce: case 70: /* Line 1455 of yacc.c */ -#line 492 "../css/CSSGrammar.y" +#line 497 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); ;} @@ -2413,7 +2421,7 @@ yyreduce: case 71: /* Line 1455 of yacc.c */ -#line 495 "../css/CSSGrammar.y" +#line 500 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -2422,7 +2430,7 @@ yyreduce: case 72: /* Line 1455 of yacc.c */ -#line 498 "../css/CSSGrammar.y" +#line 503 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -2431,7 +2439,7 @@ yyreduce: case 73: /* Line 1455 of yacc.c */ -#line 501 "../css/CSSGrammar.y" +#line 506 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); ;} @@ -2440,7 +2448,7 @@ yyreduce: case 74: /* Line 1455 of yacc.c */ -#line 507 "../css/CSSGrammar.y" +#line 512 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (3)].boolean); ;} @@ -2449,7 +2457,7 @@ yyreduce: case 75: /* Line 1455 of yacc.c */ -#line 510 "../css/CSSGrammar.y" +#line 515 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -2458,7 +2466,7 @@ yyreduce: case 76: /* Line 1455 of yacc.c */ -#line 513 "../css/CSSGrammar.y" +#line 518 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -2467,7 +2475,7 @@ yyreduce: case 77: /* Line 1455 of yacc.c */ -#line 516 "../css/CSSGrammar.y" +#line 521 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -2476,7 +2484,7 @@ yyreduce: case 78: /* Line 1455 of yacc.c */ -#line 519 "../css/CSSGrammar.y" +#line 524 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (4)].boolean); if ((yyvsp[(2) - (4)].boolean)) @@ -2487,7 +2495,7 @@ yyreduce: case 79: /* Line 1455 of yacc.c */ -#line 524 "../css/CSSGrammar.y" +#line 529 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (4)].boolean); ;} @@ -2496,7 +2504,7 @@ yyreduce: case 80: /* Line 1455 of yacc.c */ -#line 527 "../css/CSSGrammar.y" +#line 532 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (6)].boolean); ;} @@ -2505,7 +2513,7 @@ yyreduce: case 81: /* Line 1455 of yacc.c */ -#line 533 "../css/CSSGrammar.y" +#line 538 "../css/CSSGrammar.y" { (yyval.boolean) = static_cast<CSSParser*>(parser)->addVariable((yyvsp[(1) - (4)].string), (yyvsp[(4) - (4)].valueList)); ;} @@ -2514,7 +2522,7 @@ yyreduce: case 82: /* Line 1455 of yacc.c */ -#line 537 "../css/CSSGrammar.y" +#line 542 "../css/CSSGrammar.y" { (yyval.boolean) = static_cast<CSSParser*>(parser)->addVariableDeclarationBlock((yyvsp[(1) - (7)].string)); ;} @@ -2523,7 +2531,7 @@ yyreduce: case 83: /* Line 1455 of yacc.c */ -#line 541 "../css/CSSGrammar.y" +#line 546 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -2532,7 +2540,7 @@ yyreduce: case 84: /* Line 1455 of yacc.c */ -#line 545 "../css/CSSGrammar.y" +#line 550 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -2541,7 +2549,7 @@ yyreduce: case 85: /* Line 1455 of yacc.c */ -#line 549 "../css/CSSGrammar.y" +#line 554 "../css/CSSGrammar.y" { /* @variables { varname: } Just reduce away this variable with no value. */ (yyval.boolean) = false; @@ -2551,7 +2559,7 @@ yyreduce: case 86: /* Line 1455 of yacc.c */ -#line 554 "../css/CSSGrammar.y" +#line 559 "../css/CSSGrammar.y" { /* if we come across rules with invalid values like this case: @variables { varname: *; }, just discard the property/value pair */ (yyval.boolean) = false; @@ -2561,7 +2569,7 @@ yyreduce: case 87: /* Line 1455 of yacc.c */ -#line 561 "../css/CSSGrammar.y" +#line 566 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} @@ -2570,7 +2578,7 @@ yyreduce: case 88: /* Line 1455 of yacc.c */ -#line 567 "../css/CSSGrammar.y" +#line 572 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); if (p->m_styleSheet) @@ -2581,21 +2589,21 @@ yyreduce: case 91: /* Line 1455 of yacc.c */ -#line 577 "../css/CSSGrammar.y" +#line 582 "../css/CSSGrammar.y" { (yyval.string).characters = 0; ;} break; case 92: /* Line 1455 of yacc.c */ -#line 578 "../css/CSSGrammar.y" +#line 583 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 95: /* Line 1455 of yacc.c */ -#line 587 "../css/CSSGrammar.y" +#line 592 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} @@ -2604,7 +2612,7 @@ yyreduce: case 96: /* Line 1455 of yacc.c */ -#line 593 "../css/CSSGrammar.y" +#line 598 "../css/CSSGrammar.y" { (yyval.valueList) = 0; ;} @@ -2613,7 +2621,7 @@ yyreduce: case 97: /* Line 1455 of yacc.c */ -#line 596 "../css/CSSGrammar.y" +#line 601 "../css/CSSGrammar.y" { (yyval.valueList) = (yyvsp[(3) - (4)].valueList); ;} @@ -2622,7 +2630,7 @@ yyreduce: case 98: /* Line 1455 of yacc.c */ -#line 602 "../css/CSSGrammar.y" +#line 607 "../css/CSSGrammar.y" { (yyvsp[(3) - (7)].string).lower(); (yyval.mediaQueryExp) = static_cast<CSSParser*>(parser)->createFloatingMediaQueryExp((yyvsp[(3) - (7)].string), (yyvsp[(5) - (7)].valueList)); @@ -2632,7 +2640,7 @@ yyreduce: case 99: /* Line 1455 of yacc.c */ -#line 609 "../css/CSSGrammar.y" +#line 614 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.mediaQueryExpList) = p->createFloatingMediaQueryExpList(); @@ -2643,7 +2651,7 @@ yyreduce: case 100: /* Line 1455 of yacc.c */ -#line 614 "../css/CSSGrammar.y" +#line 619 "../css/CSSGrammar.y" { (yyval.mediaQueryExpList) = (yyvsp[(1) - (5)].mediaQueryExpList); (yyval.mediaQueryExpList)->append(static_cast<CSSParser*>(parser)->sinkFloatingMediaQueryExp((yyvsp[(5) - (5)].mediaQueryExp))); @@ -2653,7 +2661,7 @@ yyreduce: case 101: /* Line 1455 of yacc.c */ -#line 621 "../css/CSSGrammar.y" +#line 626 "../css/CSSGrammar.y" { (yyval.mediaQueryExpList) = static_cast<CSSParser*>(parser)->createFloatingMediaQueryExpList(); ;} @@ -2662,7 +2670,7 @@ yyreduce: case 102: /* Line 1455 of yacc.c */ -#line 624 "../css/CSSGrammar.y" +#line 629 "../css/CSSGrammar.y" { (yyval.mediaQueryExpList) = (yyvsp[(3) - (3)].mediaQueryExpList); ;} @@ -2671,7 +2679,7 @@ yyreduce: case 103: /* Line 1455 of yacc.c */ -#line 630 "../css/CSSGrammar.y" +#line 635 "../css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::None; ;} @@ -2680,7 +2688,7 @@ yyreduce: case 104: /* Line 1455 of yacc.c */ -#line 633 "../css/CSSGrammar.y" +#line 638 "../css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::Only; ;} @@ -2689,7 +2697,7 @@ yyreduce: case 105: /* Line 1455 of yacc.c */ -#line 636 "../css/CSSGrammar.y" +#line 641 "../css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::Not; ;} @@ -2698,7 +2706,7 @@ yyreduce: case 106: /* Line 1455 of yacc.c */ -#line 642 "../css/CSSGrammar.y" +#line 647 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.mediaQuery) = p->createFloatingMediaQuery(p->sinkFloatingMediaQueryExpList((yyvsp[(1) - (1)].mediaQueryExpList))); @@ -2708,7 +2716,7 @@ yyreduce: case 107: /* Line 1455 of yacc.c */ -#line 647 "../css/CSSGrammar.y" +#line 652 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyvsp[(3) - (4)].string).lower(); @@ -2719,7 +2727,7 @@ yyreduce: case 108: /* Line 1455 of yacc.c */ -#line 655 "../css/CSSGrammar.y" +#line 660 "../css/CSSGrammar.y" { (yyval.mediaList) = static_cast<CSSParser*>(parser)->createMediaList(); ;} @@ -2728,7 +2736,7 @@ yyreduce: case 110: /* Line 1455 of yacc.c */ -#line 662 "../css/CSSGrammar.y" +#line 667 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.mediaList) = p->createMediaList(); @@ -2739,7 +2747,7 @@ yyreduce: case 111: /* Line 1455 of yacc.c */ -#line 667 "../css/CSSGrammar.y" +#line 672 "../css/CSSGrammar.y" { (yyval.mediaList) = (yyvsp[(1) - (4)].mediaList); if ((yyval.mediaList)) @@ -2750,7 +2758,7 @@ yyreduce: case 112: /* Line 1455 of yacc.c */ -#line 672 "../css/CSSGrammar.y" +#line 677 "../css/CSSGrammar.y" { (yyval.mediaList) = 0; ;} @@ -2759,7 +2767,7 @@ yyreduce: case 113: /* Line 1455 of yacc.c */ -#line 678 "../css/CSSGrammar.y" +#line 683 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule((yyvsp[(3) - (7)].mediaList), (yyvsp[(6) - (7)].ruleList)); ;} @@ -2768,7 +2776,7 @@ yyreduce: case 114: /* Line 1455 of yacc.c */ -#line 681 "../css/CSSGrammar.y" +#line 686 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule(0, (yyvsp[(5) - (6)].ruleList)); ;} @@ -2777,7 +2785,7 @@ yyreduce: case 115: /* Line 1455 of yacc.c */ -#line 687 "../css/CSSGrammar.y" +#line 692 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} @@ -2786,7 +2794,7 @@ yyreduce: case 116: /* Line 1455 of yacc.c */ -#line 693 "../css/CSSGrammar.y" +#line 698 "../css/CSSGrammar.y" { (yyval.rule) = (yyvsp[(7) - (8)].keyframesRule); (yyvsp[(7) - (8)].keyframesRule)->setNameInternal((yyvsp[(3) - (8)].string)); @@ -2796,14 +2804,14 @@ yyreduce: case 119: /* Line 1455 of yacc.c */ -#line 705 "../css/CSSGrammar.y" +#line 710 "../css/CSSGrammar.y" { (yyval.keyframesRule) = static_cast<CSSParser*>(parser)->createKeyframesRule(); ;} break; case 120: /* Line 1455 of yacc.c */ -#line 706 "../css/CSSGrammar.y" +#line 711 "../css/CSSGrammar.y" { (yyval.keyframesRule) = (yyvsp[(1) - (3)].keyframesRule); if ((yyvsp[(2) - (3)].keyframeRule)) @@ -2814,7 +2822,7 @@ yyreduce: case 121: /* Line 1455 of yacc.c */ -#line 714 "../css/CSSGrammar.y" +#line 719 "../css/CSSGrammar.y" { (yyval.keyframeRule) = static_cast<CSSParser*>(parser)->createKeyframeRule((yyvsp[(1) - (6)].valueList)); ;} @@ -2823,7 +2831,7 @@ yyreduce: case 122: /* Line 1455 of yacc.c */ -#line 720 "../css/CSSGrammar.y" +#line 725 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.valueList) = p->createFloatingValueList(); @@ -2834,7 +2842,7 @@ yyreduce: case 123: /* Line 1455 of yacc.c */ -#line 725 "../css/CSSGrammar.y" +#line 730 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.valueList) = (yyvsp[(1) - (5)].valueList); @@ -2846,14 +2854,14 @@ yyreduce: case 124: /* Line 1455 of yacc.c */ -#line 734 "../css/CSSGrammar.y" +#line 739 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (1)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 125: /* Line 1455 of yacc.c */ -#line 735 "../css/CSSGrammar.y" +#line 740 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; CSSParserString& str = (yyvsp[(1) - (1)].string); @@ -2869,7 +2877,7 @@ yyreduce: case 126: /* Line 1455 of yacc.c */ -#line 759 "../css/CSSGrammar.y" +#line 764 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} @@ -2878,7 +2886,7 @@ yyreduce: case 127: /* Line 1455 of yacc.c */ -#line 762 "../css/CSSGrammar.y" +#line 767 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} @@ -2887,7 +2895,7 @@ yyreduce: case 128: /* Line 1455 of yacc.c */ -#line 769 "../css/CSSGrammar.y" +#line 774 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createFontFaceRule(); ;} @@ -2896,7 +2904,7 @@ yyreduce: case 129: /* Line 1455 of yacc.c */ -#line 772 "../css/CSSGrammar.y" +#line 777 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} @@ -2905,7 +2913,7 @@ yyreduce: case 130: /* Line 1455 of yacc.c */ -#line 775 "../css/CSSGrammar.y" +#line 780 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} @@ -2914,42 +2922,42 @@ yyreduce: case 131: /* Line 1455 of yacc.c */ -#line 781 "../css/CSSGrammar.y" +#line 786 "../css/CSSGrammar.y" { (yyval.relation) = CSSSelector::DirectAdjacent; ;} break; case 132: /* Line 1455 of yacc.c */ -#line 782 "../css/CSSGrammar.y" +#line 787 "../css/CSSGrammar.y" { (yyval.relation) = CSSSelector::IndirectAdjacent; ;} break; case 133: /* Line 1455 of yacc.c */ -#line 783 "../css/CSSGrammar.y" +#line 788 "../css/CSSGrammar.y" { (yyval.relation) = CSSSelector::Child; ;} break; case 134: /* Line 1455 of yacc.c */ -#line 787 "../css/CSSGrammar.y" +#line 792 "../css/CSSGrammar.y" { (yyval.integer) = -1; ;} break; case 135: /* Line 1455 of yacc.c */ -#line 788 "../css/CSSGrammar.y" +#line 793 "../css/CSSGrammar.y" { (yyval.integer) = 1; ;} break; case 136: /* Line 1455 of yacc.c */ -#line 792 "../css/CSSGrammar.y" +#line 797 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createStyleRule((yyvsp[(1) - (5)].selectorList)); ;} @@ -2958,7 +2966,7 @@ yyreduce: case 137: /* Line 1455 of yacc.c */ -#line 798 "../css/CSSGrammar.y" +#line 803 "../css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].selector)) { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2973,7 +2981,7 @@ yyreduce: case 138: /* Line 1455 of yacc.c */ -#line 807 "../css/CSSGrammar.y" +#line 812 "../css/CSSGrammar.y" { if ((yyvsp[(1) - (4)].selectorList) && (yyvsp[(4) - (4)].selector)) { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2987,7 +2995,7 @@ yyreduce: case 139: /* Line 1455 of yacc.c */ -#line 815 "../css/CSSGrammar.y" +#line 820 "../css/CSSGrammar.y" { (yyval.selectorList) = 0; ;} @@ -2996,7 +3004,7 @@ yyreduce: case 140: /* Line 1455 of yacc.c */ -#line 821 "../css/CSSGrammar.y" +#line 826 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (2)].selector); ;} @@ -3005,7 +3013,7 @@ yyreduce: case 141: /* Line 1455 of yacc.c */ -#line 827 "../css/CSSGrammar.y" +#line 832 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); ;} @@ -3014,7 +3022,7 @@ yyreduce: case 142: /* Line 1455 of yacc.c */ -#line 831 "../css/CSSGrammar.y" +#line 836 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); ;} @@ -3023,7 +3031,7 @@ yyreduce: case 143: /* Line 1455 of yacc.c */ -#line 835 "../css/CSSGrammar.y" +#line 840 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); if (!(yyvsp[(1) - (2)].selector)) @@ -3044,7 +3052,7 @@ yyreduce: case 144: /* Line 1455 of yacc.c */ -#line 850 "../css/CSSGrammar.y" +#line 855 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(3) - (3)].selector); if (!(yyvsp[(1) - (3)].selector)) @@ -3070,7 +3078,7 @@ yyreduce: case 145: /* Line 1455 of yacc.c */ -#line 870 "../css/CSSGrammar.y" +#line 875 "../css/CSSGrammar.y" { (yyval.selector) = 0; ;} @@ -3079,28 +3087,28 @@ yyreduce: case 146: /* Line 1455 of yacc.c */ -#line 876 "../css/CSSGrammar.y" +#line 881 "../css/CSSGrammar.y" { (yyval.string).characters = 0; (yyval.string).length = 0; ;} break; case 147: /* Line 1455 of yacc.c */ -#line 877 "../css/CSSGrammar.y" +#line 882 "../css/CSSGrammar.y" { static UChar star = '*'; (yyval.string).characters = ☆ (yyval.string).length = 1; ;} break; case 148: /* Line 1455 of yacc.c */ -#line 878 "../css/CSSGrammar.y" +#line 883 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 149: /* Line 1455 of yacc.c */ -#line 882 "../css/CSSGrammar.y" +#line 887 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); @@ -3111,7 +3119,7 @@ yyreduce: case 150: /* Line 1455 of yacc.c */ -#line 887 "../css/CSSGrammar.y" +#line 892 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); if ((yyval.selector)) { @@ -3124,7 +3132,7 @@ yyreduce: case 151: /* Line 1455 of yacc.c */ -#line 894 "../css/CSSGrammar.y" +#line 899 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); CSSParser* p = static_cast<CSSParser*>(parser); @@ -3136,7 +3144,7 @@ yyreduce: case 152: /* Line 1455 of yacc.c */ -#line 900 "../css/CSSGrammar.y" +#line 905 "../css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(1) - (2)].string); CSSParser* p = static_cast<CSSParser*>(parser); @@ -3152,7 +3160,7 @@ yyreduce: case 153: /* Line 1455 of yacc.c */ -#line 910 "../css/CSSGrammar.y" +#line 915 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(3) - (3)].selector); if ((yyval.selector)) { @@ -3170,7 +3178,7 @@ yyreduce: case 154: /* Line 1455 of yacc.c */ -#line 922 "../css/CSSGrammar.y" +#line 927 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); if ((yyval.selector)) { @@ -3186,7 +3194,7 @@ yyreduce: case 155: /* Line 1455 of yacc.c */ -#line 935 "../css/CSSGrammar.y" +#line 940 "../css/CSSGrammar.y" { CSSParserString& str = (yyvsp[(1) - (1)].string); CSSParser* p = static_cast<CSSParser*>(parser); @@ -3200,7 +3208,7 @@ yyreduce: case 156: /* Line 1455 of yacc.c */ -#line 943 "../css/CSSGrammar.y" +#line 948 "../css/CSSGrammar.y" { static UChar star = '*'; (yyval.string).characters = ☆ @@ -3211,7 +3219,7 @@ yyreduce: case 157: /* Line 1455 of yacc.c */ -#line 951 "../css/CSSGrammar.y" +#line 956 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); ;} @@ -3220,7 +3228,7 @@ yyreduce: case 158: /* Line 1455 of yacc.c */ -#line 954 "../css/CSSGrammar.y" +#line 959 "../css/CSSGrammar.y" { if (!(yyvsp[(2) - (2)].selector)) (yyval.selector) = 0; @@ -3239,7 +3247,7 @@ yyreduce: case 159: /* Line 1455 of yacc.c */ -#line 967 "../css/CSSGrammar.y" +#line 972 "../css/CSSGrammar.y" { (yyval.selector) = 0; ;} @@ -3248,7 +3256,7 @@ yyreduce: case 160: /* Line 1455 of yacc.c */ -#line 973 "../css/CSSGrammar.y" +#line 978 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); @@ -3262,7 +3270,7 @@ yyreduce: case 161: /* Line 1455 of yacc.c */ -#line 981 "../css/CSSGrammar.y" +#line 986 "../css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].string).characters[0] >= '0' && (yyvsp[(1) - (1)].string).characters[0] <= '9') { (yyval.selector) = 0; @@ -3280,7 +3288,7 @@ yyreduce: case 165: /* Line 1455 of yacc.c */ -#line 999 "../css/CSSGrammar.y" +#line 1004 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); @@ -3294,7 +3302,7 @@ yyreduce: case 166: /* Line 1455 of yacc.c */ -#line 1010 "../css/CSSGrammar.y" +#line 1015 "../css/CSSGrammar.y" { CSSParserString& str = (yyvsp[(1) - (2)].string); CSSParser* p = static_cast<CSSParser*>(parser); @@ -3308,7 +3316,7 @@ yyreduce: case 167: /* Line 1455 of yacc.c */ -#line 1021 "../css/CSSGrammar.y" +#line 1026 "../css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); (yyval.selector)->setAttribute(QualifiedName(nullAtom, (yyvsp[(3) - (4)].string), nullAtom)); @@ -3319,7 +3327,7 @@ yyreduce: case 168: /* Line 1455 of yacc.c */ -#line 1026 "../css/CSSGrammar.y" +#line 1031 "../css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); (yyval.selector)->setAttribute(QualifiedName(nullAtom, (yyvsp[(3) - (8)].string), nullAtom)); @@ -3331,7 +3339,7 @@ yyreduce: case 169: /* Line 1455 of yacc.c */ -#line 1032 "../css/CSSGrammar.y" +#line 1037 "../css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(3) - (5)].string); CSSParser* p = static_cast<CSSParser*>(parser); @@ -3345,7 +3353,7 @@ yyreduce: case 170: /* Line 1455 of yacc.c */ -#line 1040 "../css/CSSGrammar.y" +#line 1045 "../css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(3) - (9)].string); CSSParser* p = static_cast<CSSParser*>(parser); @@ -3360,7 +3368,7 @@ yyreduce: case 171: /* Line 1455 of yacc.c */ -#line 1052 "../css/CSSGrammar.y" +#line 1057 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Exact; ;} @@ -3369,7 +3377,7 @@ yyreduce: case 172: /* Line 1455 of yacc.c */ -#line 1055 "../css/CSSGrammar.y" +#line 1060 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::List; ;} @@ -3378,7 +3386,7 @@ yyreduce: case 173: /* Line 1455 of yacc.c */ -#line 1058 "../css/CSSGrammar.y" +#line 1063 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Hyphen; ;} @@ -3387,7 +3395,7 @@ yyreduce: case 174: /* Line 1455 of yacc.c */ -#line 1061 "../css/CSSGrammar.y" +#line 1066 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Begin; ;} @@ -3396,7 +3404,7 @@ yyreduce: case 175: /* Line 1455 of yacc.c */ -#line 1064 "../css/CSSGrammar.y" +#line 1069 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::End; ;} @@ -3405,7 +3413,7 @@ yyreduce: case 176: /* Line 1455 of yacc.c */ -#line 1067 "../css/CSSGrammar.y" +#line 1072 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Contain; ;} @@ -3414,7 +3422,7 @@ yyreduce: case 179: /* Line 1455 of yacc.c */ -#line 1078 "../css/CSSGrammar.y" +#line 1083 "../css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); (yyval.selector)->m_match = CSSSelector::PseudoClass; @@ -3450,7 +3458,7 @@ yyreduce: case 180: /* Line 1455 of yacc.c */ -#line 1108 "../css/CSSGrammar.y" +#line 1113 "../css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); (yyval.selector)->m_match = CSSSelector::PseudoElement; @@ -3475,7 +3483,7 @@ yyreduce: case 181: /* Line 1455 of yacc.c */ -#line 1128 "../css/CSSGrammar.y" +#line 1133 "../css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); @@ -3498,7 +3506,7 @@ yyreduce: case 182: /* Line 1455 of yacc.c */ -#line 1146 "../css/CSSGrammar.y" +#line 1151 "../css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); @@ -3521,7 +3529,7 @@ yyreduce: case 183: /* Line 1455 of yacc.c */ -#line 1164 "../css/CSSGrammar.y" +#line 1169 "../css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); @@ -3545,7 +3553,7 @@ yyreduce: case 184: /* Line 1455 of yacc.c */ -#line 1183 "../css/CSSGrammar.y" +#line 1188 "../css/CSSGrammar.y" { if (!(yyvsp[(4) - (6)].selector) || (yyvsp[(4) - (6)].selector)->simpleSelector() || (yyvsp[(4) - (6)].selector)->tagHistory()) (yyval.selector) = 0; @@ -3563,7 +3571,7 @@ yyreduce: case 185: /* Line 1455 of yacc.c */ -#line 1198 "../css/CSSGrammar.y" +#line 1203 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); ;} @@ -3572,7 +3580,7 @@ yyreduce: case 186: /* Line 1455 of yacc.c */ -#line 1201 "../css/CSSGrammar.y" +#line 1206 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); if ( (yyvsp[(2) - (2)].boolean) ) @@ -3583,7 +3591,7 @@ yyreduce: case 187: /* Line 1455 of yacc.c */ -#line 1206 "../css/CSSGrammar.y" +#line 1211 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); ;} @@ -3592,7 +3600,7 @@ yyreduce: case 188: /* Line 1455 of yacc.c */ -#line 1209 "../css/CSSGrammar.y" +#line 1214 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -3601,7 +3609,7 @@ yyreduce: case 189: /* Line 1455 of yacc.c */ -#line 1212 "../css/CSSGrammar.y" +#line 1217 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -3610,7 +3618,7 @@ yyreduce: case 190: /* Line 1455 of yacc.c */ -#line 1215 "../css/CSSGrammar.y" +#line 1220 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); ;} @@ -3619,7 +3627,7 @@ yyreduce: case 191: /* Line 1455 of yacc.c */ -#line 1218 "../css/CSSGrammar.y" +#line 1223 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); ;} @@ -3628,7 +3636,7 @@ yyreduce: case 192: /* Line 1455 of yacc.c */ -#line 1224 "../css/CSSGrammar.y" +#line 1229 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (3)].boolean); ;} @@ -3637,7 +3645,7 @@ yyreduce: case 193: /* Line 1455 of yacc.c */ -#line 1227 "../css/CSSGrammar.y" +#line 1232 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -3646,7 +3654,7 @@ yyreduce: case 194: /* Line 1455 of yacc.c */ -#line 1230 "../css/CSSGrammar.y" +#line 1235 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -3655,7 +3663,7 @@ yyreduce: case 195: /* Line 1455 of yacc.c */ -#line 1233 "../css/CSSGrammar.y" +#line 1238 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -3664,7 +3672,7 @@ yyreduce: case 196: /* Line 1455 of yacc.c */ -#line 1236 "../css/CSSGrammar.y" +#line 1241 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (4)].boolean); if ((yyvsp[(2) - (4)].boolean)) @@ -3675,7 +3683,7 @@ yyreduce: case 197: /* Line 1455 of yacc.c */ -#line 1241 "../css/CSSGrammar.y" +#line 1246 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (4)].boolean); ;} @@ -3684,7 +3692,7 @@ yyreduce: case 198: /* Line 1455 of yacc.c */ -#line 1244 "../css/CSSGrammar.y" +#line 1249 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (6)].boolean); ;} @@ -3693,7 +3701,7 @@ yyreduce: case 199: /* Line 1455 of yacc.c */ -#line 1250 "../css/CSSGrammar.y" +#line 1255 "../css/CSSGrammar.y" { (yyval.boolean) = false; CSSParser* p = static_cast<CSSParser*>(parser); @@ -3712,7 +3720,7 @@ yyreduce: case 200: /* Line 1455 of yacc.c */ -#line 1264 "../css/CSSGrammar.y" +#line 1269 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->m_valueList = new CSSParserValueList; @@ -3729,7 +3737,7 @@ yyreduce: case 201: /* Line 1455 of yacc.c */ -#line 1276 "../css/CSSGrammar.y" +#line 1281 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} @@ -3738,7 +3746,7 @@ yyreduce: case 202: /* Line 1455 of yacc.c */ -#line 1280 "../css/CSSGrammar.y" +#line 1285 "../css/CSSGrammar.y" { /* The default movable type template has letter-spacing: .none; Handle this by looking for error tokens at the start of an expr, recover the expr and then treat as an error, cleaning @@ -3750,7 +3758,7 @@ yyreduce: case 203: /* Line 1455 of yacc.c */ -#line 1287 "../css/CSSGrammar.y" +#line 1292 "../css/CSSGrammar.y" { /* When we encounter something like p {color: red !important fail;} we should drop the declaration */ (yyval.boolean) = false; @@ -3760,7 +3768,7 @@ yyreduce: case 204: /* Line 1455 of yacc.c */ -#line 1292 "../css/CSSGrammar.y" +#line 1297 "../css/CSSGrammar.y" { /* Handle this case: div { text-align: center; !important } Just reduce away the stray !important. */ (yyval.boolean) = false; @@ -3770,7 +3778,7 @@ yyreduce: case 205: /* Line 1455 of yacc.c */ -#line 1297 "../css/CSSGrammar.y" +#line 1302 "../css/CSSGrammar.y" { /* div { font-family: } Just reduce away this property with no value. */ (yyval.boolean) = false; @@ -3780,7 +3788,7 @@ yyreduce: case 206: /* Line 1455 of yacc.c */ -#line 1302 "../css/CSSGrammar.y" +#line 1307 "../css/CSSGrammar.y" { /* if we come across rules with invalid values like this case: p { weight: *; }, just discard the rule */ (yyval.boolean) = false; @@ -3790,7 +3798,7 @@ yyreduce: case 207: /* Line 1455 of yacc.c */ -#line 1307 "../css/CSSGrammar.y" +#line 1312 "../css/CSSGrammar.y" { /* if we come across: div { color{;color:maroon} }, ignore everything within curly brackets */ (yyval.boolean) = false; @@ -3800,7 +3808,7 @@ yyreduce: case 208: /* Line 1455 of yacc.c */ -#line 1314 "../css/CSSGrammar.y" +#line 1319 "../css/CSSGrammar.y" { (yyval.integer) = cssPropertyID((yyvsp[(1) - (2)].string)); ;} @@ -3809,21 +3817,21 @@ yyreduce: case 209: /* Line 1455 of yacc.c */ -#line 1320 "../css/CSSGrammar.y" +#line 1325 "../css/CSSGrammar.y" { (yyval.boolean) = true; ;} break; case 210: /* Line 1455 of yacc.c */ -#line 1321 "../css/CSSGrammar.y" +#line 1326 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} break; case 211: /* Line 1455 of yacc.c */ -#line 1325 "../css/CSSGrammar.y" +#line 1330 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.valueList) = p->createFloatingValueList(); @@ -3834,7 +3842,7 @@ yyreduce: case 212: /* Line 1455 of yacc.c */ -#line 1330 "../css/CSSGrammar.y" +#line 1335 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.valueList) = (yyvsp[(1) - (3)].valueList); @@ -3854,7 +3862,7 @@ yyreduce: case 213: /* Line 1455 of yacc.c */ -#line 1344 "../css/CSSGrammar.y" +#line 1349 "../css/CSSGrammar.y" { (yyval.valueList) = 0; ;} @@ -3863,7 +3871,7 @@ yyreduce: case 214: /* Line 1455 of yacc.c */ -#line 1350 "../css/CSSGrammar.y" +#line 1355 "../css/CSSGrammar.y" { (yyval.character) = '/'; ;} @@ -3872,7 +3880,7 @@ yyreduce: case 215: /* Line 1455 of yacc.c */ -#line 1353 "../css/CSSGrammar.y" +#line 1358 "../css/CSSGrammar.y" { (yyval.character) = ','; ;} @@ -3881,7 +3889,7 @@ yyreduce: case 216: /* Line 1455 of yacc.c */ -#line 1356 "../css/CSSGrammar.y" +#line 1361 "../css/CSSGrammar.y" { (yyval.character) = 0; ;} @@ -3890,28 +3898,28 @@ yyreduce: case 217: /* Line 1455 of yacc.c */ -#line 1362 "../css/CSSGrammar.y" +#line 1367 "../css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); ;} break; case 218: /* Line 1455 of yacc.c */ -#line 1363 "../css/CSSGrammar.y" +#line 1368 "../css/CSSGrammar.y" { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); ;} break; case 219: /* Line 1455 of yacc.c */ -#line 1364 "../css/CSSGrammar.y" +#line 1369 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_STRING; ;} break; case 220: /* Line 1455 of yacc.c */ -#line 1365 "../css/CSSGrammar.y" +#line 1370 "../css/CSSGrammar.y" { (yyval.value).id = cssValueKeywordID((yyvsp[(1) - (2)].string)); (yyval.value).unit = CSSPrimitiveValue::CSS_IDENT; @@ -3922,49 +3930,49 @@ yyreduce: case 221: /* Line 1455 of yacc.c */ -#line 1371 "../css/CSSGrammar.y" +#line 1376 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;} break; case 222: /* Line 1455 of yacc.c */ -#line 1372 "../css/CSSGrammar.y" +#line 1377 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(2) - (3)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;} break; case 223: /* Line 1455 of yacc.c */ -#line 1373 "../css/CSSGrammar.y" +#line 1378 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_URI; ;} break; case 224: /* Line 1455 of yacc.c */ -#line 1374 "../css/CSSGrammar.y" +#line 1379 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; ;} break; case 225: /* Line 1455 of yacc.c */ -#line 1375 "../css/CSSGrammar.y" +#line 1380 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (1)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;} break; case 226: /* Line 1455 of yacc.c */ -#line 1376 "../css/CSSGrammar.y" +#line 1381 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = CSSParserString(); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;} break; case 227: /* Line 1455 of yacc.c */ -#line 1378 "../css/CSSGrammar.y" +#line 1383 "../css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); ;} @@ -3973,7 +3981,7 @@ yyreduce: case 228: /* Line 1455 of yacc.c */ -#line 1381 "../css/CSSGrammar.y" +#line 1386 "../css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (2)].value); ;} @@ -3982,7 +3990,7 @@ yyreduce: case 229: /* Line 1455 of yacc.c */ -#line 1384 "../css/CSSGrammar.y" +#line 1389 "../css/CSSGrammar.y" { /* Handle width: %; */ (yyval.value).id = 0; (yyval.value).unit = 0; ;} @@ -3991,147 +3999,161 @@ yyreduce: case 230: /* Line 1455 of yacc.c */ -#line 1390 "../css/CSSGrammar.y" +#line 1395 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = true; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 231: /* Line 1455 of yacc.c */ -#line 1391 "../css/CSSGrammar.y" +#line 1396 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 232: /* Line 1455 of yacc.c */ -#line 1392 "../css/CSSGrammar.y" +#line 1397 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PERCENTAGE; ;} break; case 233: /* Line 1455 of yacc.c */ -#line 1393 "../css/CSSGrammar.y" +#line 1398 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PX; ;} break; case 234: /* Line 1455 of yacc.c */ -#line 1394 "../css/CSSGrammar.y" +#line 1399 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_CM; ;} break; case 235: /* Line 1455 of yacc.c */ -#line 1395 "../css/CSSGrammar.y" +#line 1400 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MM; ;} break; case 236: /* Line 1455 of yacc.c */ -#line 1396 "../css/CSSGrammar.y" +#line 1401 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_IN; ;} break; case 237: /* Line 1455 of yacc.c */ -#line 1397 "../css/CSSGrammar.y" +#line 1402 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PT; ;} break; case 238: /* Line 1455 of yacc.c */ -#line 1398 "../css/CSSGrammar.y" +#line 1403 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PC; ;} break; case 239: /* Line 1455 of yacc.c */ -#line 1399 "../css/CSSGrammar.y" +#line 1404 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_DEG; ;} break; case 240: /* Line 1455 of yacc.c */ -#line 1400 "../css/CSSGrammar.y" +#line 1405 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_RAD; ;} break; case 241: /* Line 1455 of yacc.c */ -#line 1401 "../css/CSSGrammar.y" +#line 1406 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_GRAD; ;} break; case 242: /* Line 1455 of yacc.c */ -#line 1402 "../css/CSSGrammar.y" +#line 1407 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_TURN; ;} break; case 243: /* Line 1455 of yacc.c */ -#line 1403 "../css/CSSGrammar.y" +#line 1408 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MS; ;} break; case 244: /* Line 1455 of yacc.c */ -#line 1404 "../css/CSSGrammar.y" +#line 1409 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_S; ;} break; case 245: /* Line 1455 of yacc.c */ -#line 1405 "../css/CSSGrammar.y" +#line 1410 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_HZ; ;} break; case 246: /* Line 1455 of yacc.c */ -#line 1406 "../css/CSSGrammar.y" +#line 1411 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_KHZ; ;} break; case 247: /* Line 1455 of yacc.c */ -#line 1407 "../css/CSSGrammar.y" +#line 1412 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EMS; ;} break; case 248: /* Line 1455 of yacc.c */ -#line 1408 "../css/CSSGrammar.y" +#line 1413 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSParserValue::Q_EMS; ;} break; case 249: /* Line 1455 of yacc.c */ -#line 1409 "../css/CSSGrammar.y" +#line 1414 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EXS; ;} break; case 250: /* Line 1455 of yacc.c */ -#line 1413 "../css/CSSGrammar.y" +#line 1415 "../css/CSSGrammar.y" + { + (yyval.value).id = 0; + (yyval.value).fValue = (yyvsp[(1) - (2)].number); + (yyval.value).unit = CSSPrimitiveValue::CSS_REMS; + CSSParser* p = static_cast<CSSParser*>(parser); + if (Document* doc = p->document()) + doc->setUsesRemUnits(true); + ;} + break; + + case 251: + +/* Line 1455 of yacc.c */ +#line 1426 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (1)].string); @@ -4139,10 +4161,10 @@ yyreduce: ;} break; - case 251: + case 252: /* Line 1455 of yacc.c */ -#line 1421 "../css/CSSGrammar.y" +#line 1434 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); CSSParserFunction* f = p->createFloatingFunction(); @@ -4154,10 +4176,10 @@ yyreduce: ;} break; - case 252: + case 253: /* Line 1455 of yacc.c */ -#line 1430 "../css/CSSGrammar.y" +#line 1443 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); CSSParserFunction* f = p->createFloatingFunction(); @@ -4169,78 +4191,78 @@ yyreduce: ;} break; - case 253: + case 254: /* Line 1455 of yacc.c */ -#line 1446 "../css/CSSGrammar.y" +#line 1459 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; - case 254: + case 255: /* Line 1455 of yacc.c */ -#line 1447 "../css/CSSGrammar.y" +#line 1460 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; - case 255: + case 256: /* Line 1455 of yacc.c */ -#line 1454 "../css/CSSGrammar.y" +#line 1467 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} break; - case 256: + case 257: /* Line 1455 of yacc.c */ -#line 1457 "../css/CSSGrammar.y" +#line 1470 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} break; - case 257: + case 258: /* Line 1455 of yacc.c */ -#line 1463 "../css/CSSGrammar.y" +#line 1476 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} break; - case 258: + case 259: /* Line 1455 of yacc.c */ -#line 1466 "../css/CSSGrammar.y" +#line 1479 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} break; - case 261: + case 262: /* Line 1455 of yacc.c */ -#line 1477 "../css/CSSGrammar.y" +#line 1490 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} break; - case 262: + case 263: /* Line 1455 of yacc.c */ -#line 1483 "../css/CSSGrammar.y" +#line 1496 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} break; - case 263: + case 264: /* Line 1455 of yacc.c */ -#line 1489 "../css/CSSGrammar.y" +#line 1502 "../css/CSSGrammar.y" { (yyval.rule) = 0; ;} @@ -4249,7 +4271,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4253 "WebCore/tmp/../generated/CSSGrammar.tab.c" +#line 4275 "WebCore/tmp/../generated/CSSGrammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4461,6 +4483,6 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 1516 "../css/CSSGrammar.y" +#line 1529 "../css/CSSGrammar.y" diff --git a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h index 4223680d50..ad6b20ad8b 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h +++ b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h @@ -78,32 +78,33 @@ MEDIA_ONLY = 291, MEDIA_NOT = 292, MEDIA_AND = 293, - QEMS = 294, - EMS = 295, - EXS = 296, - PXS = 297, - CMS = 298, - MMS = 299, - INS = 300, - PTS = 301, - PCS = 302, - DEGS = 303, - RADS = 304, - GRADS = 305, - TURNS = 306, - MSECS = 307, - SECS = 308, - HERZ = 309, - KHERZ = 310, - DIMEN = 311, - PERCENTAGE = 312, - FLOATTOKEN = 313, - INTEGER = 314, - URI = 315, - FUNCTION = 316, - NOTFUNCTION = 317, - UNICODERANGE = 318, - VARCALL = 319 + REMS = 294, + QEMS = 295, + EMS = 296, + EXS = 297, + PXS = 298, + CMS = 299, + MMS = 300, + INS = 301, + PTS = 302, + PCS = 303, + DEGS = 304, + RADS = 305, + GRADS = 306, + TURNS = 307, + MSECS = 308, + SECS = 309, + HERZ = 310, + KHERZ = 311, + DIMEN = 312, + PERCENTAGE = 313, + FLOATTOKEN = 314, + INTEGER = 315, + URI = 316, + FUNCTION = 317, + NOTFUNCTION = 318, + UNICODERANGE = 319, + VARCALL = 320 }; #endif @@ -114,7 +115,7 @@ typedef union YYSTYPE { /* Line 1676 of yacc.c */ -#line 58 "../css/CSSGrammar.y" +#line 62 "../css/CSSGrammar.y" bool boolean; char character; @@ -141,7 +142,7 @@ typedef union YYSTYPE /* Line 1676 of yacc.c */ -#line 143 "WebCore/tmp/../generated/CSSGrammar.tab.h" +#line 144 "WebCore/tmp/../generated/CSSGrammar.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp index dc000542b4..65b49d658c 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp +++ b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp @@ -37,7 +37,7 @@ struct props { const char* name; int id; }; -/* maximum key range = 1603, duplicates = 0 */ +/* maximum key range = 1853, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -51,32 +51,32 @@ hash_prop (register const char *str, register unsigned int len) { static const unsigned short asso_values[] = { - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 0, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 5, 0, 75, - 0, 0, 325, 5, 295, 0, 0, 0, 105, 0, - 5, 0, 55, 20, 5, 25, 0, 50, 55, 15, - 400, 295, 145, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, 1609, - 1609, 1609, 1609, 1609, 1609, 1609 + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 0, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 5, 0, 75, + 0, 0, 355, 5, 315, 0, 0, 0, 105, 0, + 5, 0, 55, 20, 5, 25, 0, 140, 30, 15, + 420, 395, 10, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, + 1859, 1859, 1859, 1859, 1859, 1859 }; register int hval = len; @@ -226,667 +226,676 @@ findProp (register const char *str, register unsigned int len) { enum { - TOTAL_KEYWORDS = 269, + TOTAL_KEYWORDS = 271, MIN_WORD_LENGTH = 3, MAX_WORD_LENGTH = 43, MIN_HASH_VALUE = 6, - MAX_HASH_VALUE = 1608 + MAX_HASH_VALUE = 1858 }; static const struct props wordlist_prop[] = { -#line 40 "CSSPropertyNames.gperf" +#line 42 "CSSPropertyNames.gperf" {"bottom", CSSPropertyBottom}, -#line 18 "CSSPropertyNames.gperf" +#line 140 "CSSPropertyNames.gperf" + {"zoom", CSSPropertyZoom}, +#line 20 "CSSPropertyNames.gperf" {"border", CSSPropertyBorder}, -#line 257 "CSSPropertyNames.gperf" +#line 259 "CSSPropertyNames.gperf" {"marker", CSSPropertyMarker}, -#line 19 "CSSPropertyNames.gperf" +#line 21 "CSSPropertyNames.gperf" {"border-bottom", CSSPropertyBorderBottom}, -#line 259 "CSSPropertyNames.gperf" +#line 261 "CSSPropertyNames.gperf" {"marker-mid", CSSPropertyMarkerMid}, -#line 68 "CSSPropertyNames.gperf" +#line 71 "CSSPropertyNames.gperf" {"margin", CSSPropertyMargin}, -#line 276 "CSSPropertyNames.gperf" +#line 278 "CSSPropertyNames.gperf" {"kerning", CSSPropertyKerning}, -#line 258 "CSSPropertyNames.gperf" +#line 260 "CSSPropertyNames.gperf" {"marker-end", CSSPropertyMarkerEnd}, -#line 69 "CSSPropertyNames.gperf" +#line 72 "CSSPropertyNames.gperf" {"margin-bottom", CSSPropertyMarginBottom}, -#line 241 "CSSPropertyNames.gperf" +#line 243 "CSSPropertyNames.gperf" {"mask", CSSPropertyMask}, -#line 262 "CSSPropertyNames.gperf" +#line 264 "CSSPropertyNames.gperf" {"stroke", CSSPropertyStroke}, -#line 133 "CSSPropertyNames.gperf" +#line 104 "CSSPropertyNames.gperf" + {"size", CSSPropertySize}, +#line 136 "CSSPropertyNames.gperf" {"word-break", CSSPropertyWordBreak}, -#line 278 "CSSPropertyNames.gperf" +#line 280 "CSSPropertyNames.gperf" {"writing-mode", CSSPropertyWritingMode}, -#line 151 "CSSPropertyNames.gperf" +#line 154 "CSSPropertyNames.gperf" {"-webkit-binding", CSSPropertyWebkitBinding}, -#line 256 "CSSPropertyNames.gperf" +#line 102 "CSSPropertyNames.gperf" + {"resize", CSSPropertyResize}, +#line 258 "CSSPropertyNames.gperf" {"image-rendering", CSSPropertyImageRendering}, -#line 138 "CSSPropertyNames.gperf" +#line 141 "CSSPropertyNames.gperf" {"-webkit-animation", CSSPropertyWebkitAnimation}, -#line 156 "CSSPropertyNames.gperf" +#line 159 "CSSPropertyNames.gperf" {"-webkit-border-image", CSSPropertyWebkitBorderImage}, -#line 197 "CSSPropertyNames.gperf" +#line 199 "CSSPropertyNames.gperf" {"-webkit-mask", CSSPropertyWebkitMask}, -#line 125 "CSSPropertyNames.gperf" +#line 128 "CSSPropertyNames.gperf" {"top", CSSPropertyTop}, -#line 131 "CSSPropertyNames.gperf" +#line 134 "CSSPropertyNames.gperf" {"widows", CSSPropertyWidows}, -#line 260 "CSSPropertyNames.gperf" +#line 262 "CSSPropertyNames.gperf" {"marker-start", CSSPropertyMarkerStart}, -#line 143 "CSSPropertyNames.gperf" +#line 146 "CSSPropertyNames.gperf" {"-webkit-animation-name", CSSPropertyWebkitAnimationName}, -#line 92 "CSSPropertyNames.gperf" +#line 95 "CSSPropertyNames.gperf" {"page", CSSPropertyPage}, -#line 202 "CSSPropertyNames.gperf" +#line 204 "CSSPropertyNames.gperf" {"-webkit-mask-image", CSSPropertyWebkitMaskImage}, -#line 35 "CSSPropertyNames.gperf" +#line 37 "CSSPropertyNames.gperf" {"border-top", CSSPropertyBorderTop}, -#line 87 "CSSPropertyNames.gperf" +#line 90 "CSSPropertyNames.gperf" {"padding", CSSPropertyPadding}, -#line 230 "CSSPropertyNames.gperf" +#line 232 "CSSPropertyNames.gperf" {"-webkit-transition", CSSPropertyWebkitTransition}, -#line 203 "CSSPropertyNames.gperf" +#line 205 "CSSPropertyNames.gperf" {"-webkit-mask-origin", CSSPropertyWebkitMaskOrigin}, -#line 88 "CSSPropertyNames.gperf" +#line 91 "CSSPropertyNames.gperf" {"padding-bottom", CSSPropertyPaddingBottom}, -#line 72 "CSSPropertyNames.gperf" +#line 75 "CSSPropertyNames.gperf" {"margin-top", CSSPropertyMarginTop}, -#line 189 "CSSPropertyNames.gperf" +#line 191 "CSSPropertyNames.gperf" {"-webkit-margin-start", CSSPropertyWebkitMarginStart}, -#line 45 "CSSPropertyNames.gperf" +#line 48 "CSSPropertyNames.gperf" {"content", CSSPropertyContent}, -#line 97 "CSSPropertyNames.gperf" +#line 100 "CSSPropertyNames.gperf" {"position", CSSPropertyPosition}, -#line 49 "CSSPropertyNames.gperf" +#line 52 "CSSPropertyNames.gperf" {"direction", CSSPropertyDirection}, -#line 98 "CSSPropertyNames.gperf" - {"quotes", CSSPropertyQuotes}, -#line 102 "CSSPropertyNames.gperf" +#line 210 "CSSPropertyNames.gperf" + {"-webkit-mask-size", CSSPropertyWebkitMaskSize}, +#line 105 "CSSPropertyNames.gperf" {"src", CSSPropertySrc}, -#line 135 "CSSPropertyNames.gperf" +#line 138 "CSSPropertyNames.gperf" {"word-wrap", CSSPropertyWordWrap}, -#line 191 "CSSPropertyNames.gperf" - {"-webkit-marquee", CSSPropertyWebkitMarquee}, -#line 210 "CSSPropertyNames.gperf" +#line 212 "CSSPropertyNames.gperf" {"-webkit-nbsp-mode", CSSPropertyWebkitNbspMode}, -#line 95 "CSSPropertyNames.gperf" +#line 98 "CSSPropertyNames.gperf" {"page-break-inside", CSSPropertyPageBreakInside}, -#line 141 "CSSPropertyNames.gperf" - {"-webkit-animation-duration", CSSPropertyWebkitAnimationDuration}, -#line 235 "CSSPropertyNames.gperf" - {"-webkit-user-drag", CSSPropertyWebkitUserDrag}, -#line 207 "CSSPropertyNames.gperf" +#line 209 "CSSPropertyNames.gperf" {"-webkit-mask-repeat", CSSPropertyWebkitMaskRepeat}, -#line 157 "CSSPropertyNames.gperf" - {"-webkit-border-radius", CSSPropertyWebkitBorderRadius}, -#line 91 "CSSPropertyNames.gperf" +#line 94 "CSSPropertyNames.gperf" {"padding-top", CSSPropertyPaddingTop}, -#line 211 "CSSPropertyNames.gperf" +#line 99 "CSSPropertyNames.gperf" + {"pointer-events", CSSPropertyPointerEvents}, +#line 213 "CSSPropertyNames.gperf" {"-webkit-padding-start", CSSPropertyWebkitPaddingStart}, -#line 126 "CSSPropertyNames.gperf" - {"unicode-bidi", CSSPropertyUnicodeBidi}, -#line 140 "CSSPropertyNames.gperf" +#line 143 "CSSPropertyNames.gperf" {"-webkit-animation-direction", CSSPropertyWebkitAnimationDirection}, -#line 137 "CSSPropertyNames.gperf" - {"zoom", CSSPropertyZoom}, -#line 204 "CSSPropertyNames.gperf" +#line 206 "CSSPropertyNames.gperf" {"-webkit-mask-position", CSSPropertyWebkitMaskPosition}, -#line 232 "CSSPropertyNames.gperf" - {"-webkit-transition-duration", CSSPropertyWebkitTransitionDuration}, -#line 185 "CSSPropertyNames.gperf" +#line 187 "CSSPropertyNames.gperf" {"-webkit-line-break", CSSPropertyWebkitLineBreak}, -#line 10 "CSSPropertyNames.gperf" - {"background", CSSPropertyBackground}, -#line 267 "CSSPropertyNames.gperf" +#line 269 "CSSPropertyNames.gperf" {"stroke-miterlimit", CSSPropertyStrokeMiterlimit}, -#line 266 "CSSPropertyNames.gperf" +#line 268 "CSSPropertyNames.gperf" {"stroke-linejoin", CSSPropertyStrokeLinejoin}, -#line 127 "CSSPropertyNames.gperf" - {"unicode-range", CSSPropertyUnicodeRange}, -#line 96 "CSSPropertyNames.gperf" - {"pointer-events", CSSPropertyPointerEvents}, -#line 216 "CSSPropertyNames.gperf" +#line 218 "CSSPropertyNames.gperf" {"-webkit-rtl-ordering", CSSPropertyWebkitRtlOrdering}, -#line 48 "CSSPropertyNames.gperf" - {"cursor", CSSPropertyCursor}, -#line 79 "CSSPropertyNames.gperf" - {"outline", CSSPropertyOutline}, -#line 13 "CSSPropertyNames.gperf" - {"background-image", CSSPropertyBackgroundImage}, -#line 273 "CSSPropertyNames.gperf" +#line 275 "CSSPropertyNames.gperf" {"dominant-baseline", CSSPropertyDominantBaseline}, -#line 101 "CSSPropertyNames.gperf" - {"size", CSSPropertySize}, -#line 41 "CSSPropertyNames.gperf" +#line 44 "CSSPropertyNames.gperf" {"caption-side", CSSPropertyCaptionSide}, #line 47 "CSSPropertyNames.gperf" - {"counter-reset", CSSPropertyCounterReset}, -#line 99 "CSSPropertyNames.gperf" - {"resize", CSSPropertyResize}, -#line 194 "CSSPropertyNames.gperf" - {"-webkit-marquee-repetition", CSSPropertyWebkitMarqueeRepetition}, -#line 44 "CSSPropertyNames.gperf" {"color", CSSPropertyColor}, -#line 33 "CSSPropertyNames.gperf" +#line 101 "CSSPropertyNames.gperf" + {"quotes", CSSPropertyQuotes}, +#line 35 "CSSPropertyNames.gperf" {"border-spacing", CSSPropertyBorderSpacing}, -#line 42 "CSSPropertyNames.gperf" +#line 45 "CSSPropertyNames.gperf" {"clear", CSSPropertyClear}, -#line 195 "CSSPropertyNames.gperf" - {"-webkit-marquee-speed", CSSPropertyWebkitMarqueeSpeed}, -#line 149 "CSSPropertyNames.gperf" - {"-webkit-background-origin", CSSPropertyWebkitBackgroundOrigin}, -#line 134 "CSSPropertyNames.gperf" +#line 193 "CSSPropertyNames.gperf" + {"-webkit-marquee", CSSPropertyWebkitMarquee}, +#line 137 "CSSPropertyNames.gperf" {"word-spacing", CSSPropertyWordSpacing}, -#line 192 "CSSPropertyNames.gperf" - {"-webkit-marquee-direction", CSSPropertyWebkitMarqueeDirection}, -#line 24 "CSSPropertyNames.gperf" +#line 26 "CSSPropertyNames.gperf" {"border-color", CSSPropertyBorderColor}, -#line 193 "CSSPropertyNames.gperf" - {"-webkit-marquee-increment", CSSPropertyWebkitMarqueeIncrement}, -#line 142 "CSSPropertyNames.gperf" - {"-webkit-animation-iteration-count", CSSPropertyWebkitAnimationIterationCount}, -#line 20 "CSSPropertyNames.gperf" +#line 22 "CSSPropertyNames.gperf" {"border-bottom-color", CSSPropertyBorderBottomColor}, -#line 201 "CSSPropertyNames.gperf" +#line 144 "CSSPropertyNames.gperf" + {"-webkit-animation-duration", CSSPropertyWebkitAnimationDuration}, +#line 237 "CSSPropertyNames.gperf" + {"-webkit-user-drag", CSSPropertyWebkitUserDrag}, +#line 160 "CSSPropertyNames.gperf" + {"-webkit-border-radius", CSSPropertyWebkitBorderRadius}, +#line 203 "CSSPropertyNames.gperf" {"-webkit-mask-composite", CSSPropertyWebkitMaskComposite}, -#line 252 "CSSPropertyNames.gperf" +#line 254 "CSSPropertyNames.gperf" {"color-rendering", CSSPropertyColorRendering}, -#line 17 "CSSPropertyNames.gperf" - {"background-repeat", CSSPropertyBackgroundRepeat}, -#line 208 "CSSPropertyNames.gperf" - {"-webkit-mask-size", CSSPropertyWebkitMaskSize}, -#line 43 "CSSPropertyNames.gperf" - {"clip", CSSPropertyClip}, +#line 129 "CSSPropertyNames.gperf" + {"unicode-bidi", CSSPropertyUnicodeBidi}, #line 46 "CSSPropertyNames.gperf" - {"counter-increment", CSSPropertyCounterIncrement}, -#line 145 "CSSPropertyNames.gperf" + {"clip", CSSPropertyClip}, +#line 234 "CSSPropertyNames.gperf" + {"-webkit-transition-duration", CSSPropertyWebkitTransitionDuration}, +#line 148 "CSSPropertyNames.gperf" {"-webkit-appearance", CSSPropertyWebkitAppearance}, +#line 10 "CSSPropertyNames.gperf" + {"background", CSSPropertyBackground}, +#line 130 "CSSPropertyNames.gperf" + {"unicode-range", CSSPropertyUnicodeRange}, +#line 51 "CSSPropertyNames.gperf" + {"cursor", CSSPropertyCursor}, +#line 82 "CSSPropertyNames.gperf" + {"outline", CSSPropertyOutline}, #line 14 "CSSPropertyNames.gperf" - {"background-position", CSSPropertyBackgroundPosition}, -#line 36 "CSSPropertyNames.gperf" + {"background-image", CSSPropertyBackgroundImage}, +#line 38 "CSSPropertyNames.gperf" {"border-top-color", CSSPropertyBorderTopColor}, -#line 247 "CSSPropertyNames.gperf" +#line 15 "CSSPropertyNames.gperf" + {"background-origin", CSSPropertyBackgroundOrigin}, +#line 50 "CSSPropertyNames.gperf" + {"counter-reset", CSSPropertyCounterReset}, +#line 249 "CSSPropertyNames.gperf" {"stop-color", CSSPropertyStopColor}, -#line 242 "CSSPropertyNames.gperf" - {"enable-background", CSSPropertyEnableBackground}, -#line 271 "CSSPropertyNames.gperf" +#line 196 "CSSPropertyNames.gperf" + {"-webkit-marquee-repetition", CSSPropertyWebkitMarqueeRepetition}, +#line 214 "CSSPropertyNames.gperf" + {"-webkit-perspective", CSSPropertyWebkitPerspective}, +#line 273 "CSSPropertyNames.gperf" {"alignment-baseline", CSSPropertyAlignmentBaseline}, -#line 265 "CSSPropertyNames.gperf" +#line 197 "CSSPropertyNames.gperf" + {"-webkit-marquee-speed", CSSPropertyWebkitMarqueeSpeed}, +#line 267 "CSSPropertyNames.gperf" {"stroke-linecap", CSSPropertyStrokeLinecap}, -#line 182 "CSSPropertyNames.gperf" - {"-webkit-columns", CSSPropertyWebkitColumns}, -#line 62 "CSSPropertyNames.gperf" +#line 152 "CSSPropertyNames.gperf" + {"-webkit-background-origin", CSSPropertyWebkitBackgroundOrigin}, +#line 65 "CSSPropertyNames.gperf" {"letter-spacing", CSSPropertyLetterSpacing}, -#line 200 "CSSPropertyNames.gperf" +#line 194 "CSSPropertyNames.gperf" + {"-webkit-marquee-direction", CSSPropertyWebkitMarqueeDirection}, +#line 202 "CSSPropertyNames.gperf" {"-webkit-mask-clip", CSSPropertyWebkitMaskClip}, -#line 212 "CSSPropertyNames.gperf" - {"-webkit-perspective", CSSPropertyWebkitPerspective}, -#line 100 "CSSPropertyNames.gperf" +#line 195 "CSSPropertyNames.gperf" + {"-webkit-marquee-increment", CSSPropertyWebkitMarqueeIncrement}, +#line 215 "CSSPropertyNames.gperf" + {"-webkit-perspective-origin", CSSPropertyWebkitPerspectiveOrigin}, +#line 145 "CSSPropertyNames.gperf" + {"-webkit-animation-iteration-count", CSSPropertyWebkitAnimationIterationCount}, +#line 153 "CSSPropertyNames.gperf" + {"-webkit-background-size", CSSPropertyWebkitBackgroundSize}, +#line 19 "CSSPropertyNames.gperf" + {"background-repeat", CSSPropertyBackgroundRepeat}, +#line 103 "CSSPropertyNames.gperf" {"right", CSSPropertyRight}, -#line 132 "CSSPropertyNames.gperf" +#line 49 "CSSPropertyNames.gperf" + {"counter-increment", CSSPropertyCounterIncrement}, +#line 135 "CSSPropertyNames.gperf" {"width", CSSPropertyWidth}, -#line 174 "CSSPropertyNames.gperf" - {"-webkit-column-break-inside", CSSPropertyWebkitColumnBreakInside}, -#line 237 "CSSPropertyNames.gperf" - {"-webkit-user-select", CSSPropertyWebkitUserSelect}, -#line 76 "CSSPropertyNames.gperf" +#line 16 "CSSPropertyNames.gperf" + {"background-position", CSSPropertyBackgroundPosition}, +#line 79 "CSSPropertyNames.gperf" {"min-width", CSSPropertyMinWidth}, -#line 213 "CSSPropertyNames.gperf" - {"-webkit-perspective-origin", CSSPropertyWebkitPerspectiveOrigin}, -#line 29 "CSSPropertyNames.gperf" +#line 31 "CSSPropertyNames.gperf" {"border-right", CSSPropertyBorderRight}, -#line 39 "CSSPropertyNames.gperf" +#line 41 "CSSPropertyNames.gperf" {"border-width", CSSPropertyBorderWidth}, -#line 176 "CSSPropertyNames.gperf" - {"-webkit-column-gap", CSSPropertyWebkitColumnGap}, -#line 53 "CSSPropertyNames.gperf" - {"font", CSSPropertyFont}, -#line 71 "CSSPropertyNames.gperf" +#line 131 "CSSPropertyNames.gperf" + {"vertical-align", CSSPropertyVerticalAlign}, +#line 74 "CSSPropertyNames.gperf" {"margin-right", CSSPropertyMarginRight}, -#line 22 "CSSPropertyNames.gperf" +#line 24 "CSSPropertyNames.gperf" {"border-bottom-width", CSSPropertyBorderBottomWidth}, -#line 148 "CSSPropertyNames.gperf" - {"-webkit-background-composite", CSSPropertyWebkitBackgroundComposite}, -#line 12 "CSSPropertyNames.gperf" - {"background-color", CSSPropertyBackgroundColor}, -#line 269 "CSSPropertyNames.gperf" +#line 56 "CSSPropertyNames.gperf" + {"font", CSSPropertyFont}, +#line 244 "CSSPropertyNames.gperf" + {"enable-background", CSSPropertyEnableBackground}, +#line 271 "CSSPropertyNames.gperf" {"stroke-width", CSSPropertyStrokeWidth}, -#line 150 "CSSPropertyNames.gperf" - {"-webkit-background-size", CSSPropertyWebkitBackgroundSize}, -#line 80 "CSSPropertyNames.gperf" - {"outline-color", CSSPropertyOutlineColor}, -#line 154 "CSSPropertyNames.gperf" - {"-webkit-border-fit", CSSPropertyWebkitBorderFit}, -#line 128 "CSSPropertyNames.gperf" - {"vertical-align", CSSPropertyVerticalAlign}, -#line 186 "CSSPropertyNames.gperf" +#line 184 "CSSPropertyNames.gperf" + {"-webkit-columns", CSSPropertyWebkitColumns}, +#line 188 "CSSPropertyNames.gperf" {"-webkit-line-clamp", CSSPropertyWebkitLineClamp}, -#line 249 "CSSPropertyNames.gperf" +#line 251 "CSSPropertyNames.gperf" {"color-interpolation", CSSPropertyColorInterpolation}, -#line 90 "CSSPropertyNames.gperf" +#line 25 "CSSPropertyNames.gperf" + {"border-collapse", CSSPropertyBorderCollapse}, +#line 157 "CSSPropertyNames.gperf" + {"-webkit-border-fit", CSSPropertyWebkitBorderFit}, +#line 58 "CSSPropertyNames.gperf" + {"font-size", CSSPropertyFontSize}, +#line 176 "CSSPropertyNames.gperf" + {"-webkit-column-break-inside", CSSPropertyWebkitColumnBreakInside}, +#line 93 "CSSPropertyNames.gperf" {"padding-right", CSSPropertyPaddingRight}, -#line 38 "CSSPropertyNames.gperf" +#line 239 "CSSPropertyNames.gperf" + {"-webkit-user-select", CSSPropertyWebkitUserSelect}, +#line 40 "CSSPropertyNames.gperf" {"border-top-width", CSSPropertyBorderTopWidth}, -#line 23 "CSSPropertyNames.gperf" - {"border-collapse", CSSPropertyBorderCollapse}, -#line 78 "CSSPropertyNames.gperf" +#line 81 "CSSPropertyNames.gperf" {"orphans", CSSPropertyOrphans}, -#line 175 "CSSPropertyNames.gperf" - {"-webkit-column-count", CSSPropertyWebkitColumnCount}, -#line 224 "CSSPropertyNames.gperf" - {"-webkit-transform", CSSPropertyWebkitTransform}, -#line 240 "CSSPropertyNames.gperf" - {"clip-rule", CSSPropertyClipRule}, -#line 58 "CSSPropertyNames.gperf" +#line 61 "CSSPropertyNames.gperf" {"font-variant", CSSPropertyFontVariant}, -#line 147 "CSSPropertyNames.gperf" - {"-webkit-background-clip", CSSPropertyWebkitBackgroundClip}, -#line 261 "CSSPropertyNames.gperf" +#line 178 "CSSPropertyNames.gperf" + {"-webkit-column-gap", CSSPropertyWebkitColumnGap}, +#line 190 "CSSPropertyNames.gperf" + {"-webkit-margin-collapse", CSSPropertyWebkitMarginCollapse}, +#line 226 "CSSPropertyNames.gperf" + {"-webkit-transform", CSSPropertyWebkitTransform}, +#line 151 "CSSPropertyNames.gperf" + {"-webkit-background-composite", CSSPropertyWebkitBackgroundComposite}, +#line 189 "CSSPropertyNames.gperf" + {"-webkit-margin-bottom-collapse", CSSPropertyWebkitMarginBottomCollapse}, +#line 13 "CSSPropertyNames.gperf" + {"background-color", CSSPropertyBackgroundColor}, +#line 263 "CSSPropertyNames.gperf" {"shape-rendering", CSSPropertyShapeRendering}, -#line 106 "CSSPropertyNames.gperf" +#line 109 "CSSPropertyNames.gperf" {"text-indent", CSSPropertyTextIndent}, -#line 94 "CSSPropertyNames.gperf" +#line 139 "CSSPropertyNames.gperf" + {"z-index", CSSPropertyZIndex}, +#line 163 "CSSPropertyNames.gperf" + {"-webkit-border-vertical-spacing", CSSPropertyWebkitBorderVerticalSpacing}, +#line 83 "CSSPropertyNames.gperf" + {"outline-color", CSSPropertyOutlineColor}, +#line 97 "CSSPropertyNames.gperf" {"page-break-before", CSSPropertyPageBreakBefore}, -#line 225 "CSSPropertyNames.gperf" +#line 227 "CSSPropertyNames.gperf" {"-webkit-transform-origin", CSSPropertyWebkitTransformOrigin}, -#line 93 "CSSPropertyNames.gperf" +#line 96 "CSSPropertyNames.gperf" {"page-break-after", CSSPropertyPageBreakAfter}, -#line 188 "CSSPropertyNames.gperf" - {"-webkit-margin-collapse", CSSPropertyWebkitMarginCollapse}, -#line 177 "CSSPropertyNames.gperf" - {"-webkit-column-rule", CSSPropertyWebkitColumnRule}, -#line 61 "CSSPropertyNames.gperf" - {"left", CSSPropertyLeft}, -#line 187 "CSSPropertyNames.gperf" - {"-webkit-margin-bottom-collapse", CSSPropertyWebkitMarginBottomCollapse}, -#line 77 "CSSPropertyNames.gperf" - {"opacity", CSSPropertyOpacity}, -#line 270 "CSSPropertyNames.gperf" +#line 272 "CSSPropertyNames.gperf" {"text-rendering", CSSPropertyTextRendering}, -#line 52 "CSSPropertyNames.gperf" +#line 170 "CSSPropertyNames.gperf" + {"-webkit-box-orient", CSSPropertyWebkitBoxOrient}, +#line 64 "CSSPropertyNames.gperf" + {"left", CSSPropertyLeft}, +#line 230 "CSSPropertyNames.gperf" + {"-webkit-transform-origin-z", CSSPropertyWebkitTransformOriginZ}, +#line 55 "CSSPropertyNames.gperf" {"float", CSSPropertyFloat}, -#line 243 "CSSPropertyNames.gperf" +#line 245 "CSSPropertyNames.gperf" {"filter", CSSPropertyFilter}, -#line 167 "CSSPropertyNames.gperf" - {"-webkit-box-orient", CSSPropertyWebkitBoxOrient}, -#line 34 "CSSPropertyNames.gperf" - {"border-style", CSSPropertyBorderStyle}, -#line 206 "CSSPropertyNames.gperf" - {"-webkit-mask-position-y", CSSPropertyWebkitMaskPositionY}, -#line 153 "CSSPropertyNames.gperf" - {"-webkit-border-bottom-right-radius", CSSPropertyWebkitBorderBottomRightRadius}, -#line 25 "CSSPropertyNames.gperf" - {"border-left", CSSPropertyBorderLeft}, -#line 198 "CSSPropertyNames.gperf" +#line 200 "CSSPropertyNames.gperf" {"-webkit-mask-attachment", CSSPropertyWebkitMaskAttachment}, -#line 21 "CSSPropertyNames.gperf" - {"border-bottom-style", CSSPropertyBorderBottomStyle}, -#line 70 "CSSPropertyNames.gperf" - {"margin-left", CSSPropertyMarginLeft}, -#line 139 "CSSPropertyNames.gperf" - {"-webkit-animation-delay", CSSPropertyWebkitAnimationDelay}, -#line 221 "CSSPropertyNames.gperf" +#line 27 "CSSPropertyNames.gperf" + {"border-left", CSSPropertyBorderLeft}, +#line 223 "CSSPropertyNames.gperf" {"-webkit-text-stroke", CSSPropertyWebkitTextStroke}, -#line 160 "CSSPropertyNames.gperf" - {"-webkit-border-vertical-spacing", CSSPropertyWebkitBorderVerticalSpacing}, -#line 268 "CSSPropertyNames.gperf" - {"stroke-opacity", CSSPropertyStrokeOpacity}, -#line 199 "CSSPropertyNames.gperf" +#line 12 "CSSPropertyNames.gperf" + {"background-clip", CSSPropertyBackgroundClip}, +#line 192 "CSSPropertyNames.gperf" + {"-webkit-margin-top-collapse", CSSPropertyWebkitMarginTopCollapse}, +#line 73 "CSSPropertyNames.gperf" + {"margin-left", CSSPropertyMarginLeft}, +#line 242 "CSSPropertyNames.gperf" + {"clip-rule", CSSPropertyClipRule}, +#line 201 "CSSPropertyNames.gperf" {"-webkit-mask-box-image", CSSPropertyWebkitMaskBoxImage}, -#line 130 "CSSPropertyNames.gperf" +#line 173 "CSSPropertyNames.gperf" + {"-webkit-box-sizing", CSSPropertyWebkitBoxSizing}, +#line 133 "CSSPropertyNames.gperf" {"white-space", CSSPropertyWhiteSpace}, -#line 83 "CSSPropertyNames.gperf" - {"outline-width", CSSPropertyOutlineWidth}, -#line 190 "CSSPropertyNames.gperf" - {"-webkit-margin-top-collapse", CSSPropertyWebkitMarginTopCollapse}, -#line 231 "CSSPropertyNames.gperf" - {"-webkit-transition-delay", CSSPropertyWebkitTransitionDelay}, -#line 129 "CSSPropertyNames.gperf" - {"visibility", CSSPropertyVisibility}, -#line 50 "CSSPropertyNames.gperf" - {"display", CSSPropertyDisplay}, -#line 159 "CSSPropertyNames.gperf" - {"-webkit-border-top-right-radius", CSSPropertyWebkitBorderTopRightRadius}, -#line 233 "CSSPropertyNames.gperf" - {"-webkit-transition-property", CSSPropertyWebkitTransitionProperty}, -#line 105 "CSSPropertyNames.gperf" - {"text-decoration", CSSPropertyTextDecoration}, -#line 37 "CSSPropertyNames.gperf" - {"border-top-style", CSSPropertyBorderTopStyle}, -#line 55 "CSSPropertyNames.gperf" - {"font-size", CSSPropertyFontSize}, -#line 89 "CSSPropertyNames.gperf" - {"padding-left", CSSPropertyPaddingLeft}, -#line 84 "CSSPropertyNames.gperf" +#line 150 "CSSPropertyNames.gperf" + {"-webkit-background-clip", CSSPropertyWebkitBackgroundClip}, +#line 87 "CSSPropertyNames.gperf" {"overflow", CSSPropertyOverflow}, -#line 30 "CSSPropertyNames.gperf" +#line 108 "CSSPropertyNames.gperf" + {"text-decoration", CSSPropertyTextDecoration}, +#line 80 "CSSPropertyNames.gperf" + {"opacity", CSSPropertyOpacity}, +#line 32 "CSSPropertyNames.gperf" {"border-right-color", CSSPropertyBorderRightColor}, -#line 162 "CSSPropertyNames.gperf" +#line 165 "CSSPropertyNames.gperf" {"-webkit-box-direction", CSSPropertyWebkitBoxDirection}, -#line 248 "CSSPropertyNames.gperf" - {"stop-opacity", CSSPropertyStopOpacity}, -#line 104 "CSSPropertyNames.gperf" +#line 92 "CSSPropertyNames.gperf" + {"padding-left", CSSPropertyPaddingLeft}, +#line 185 "CSSPropertyNames.gperf" + {"-webkit-font-size-delta", CSSPropertyWebkitFontSizeDelta}, +#line 36 "CSSPropertyNames.gperf" + {"border-style", CSSPropertyBorderStyle}, +#line 208 "CSSPropertyNames.gperf" + {"-webkit-mask-position-y", CSSPropertyWebkitMaskPositionY}, +#line 107 "CSSPropertyNames.gperf" {"text-align", CSSPropertyTextAlign}, -#line 144 "CSSPropertyNames.gperf" - {"-webkit-animation-timing-function", CSSPropertyWebkitAnimationTimingFunction}, -#line 253 "CSSPropertyNames.gperf" +#line 23 "CSSPropertyNames.gperf" + {"border-bottom-style", CSSPropertyBorderBottomStyle}, +#line 156 "CSSPropertyNames.gperf" + {"-webkit-border-bottom-right-radius", CSSPropertyWebkitBorderBottomRightRadius}, +#line 142 "CSSPropertyNames.gperf" + {"-webkit-animation-delay", CSSPropertyWebkitAnimationDelay}, +#line 132 "CSSPropertyNames.gperf" + {"visibility", CSSPropertyVisibility}, +#line 255 "CSSPropertyNames.gperf" {"fill", CSSPropertyFill}, -#line 196 "CSSPropertyNames.gperf" - {"-webkit-marquee-style", CSSPropertyWebkitMarqueeStyle}, -#line 16 "CSSPropertyNames.gperf" - {"background-position-y", CSSPropertyBackgroundPositionY}, -#line 11 "CSSPropertyNames.gperf" - {"background-attachment", CSSPropertyBackgroundAttachment}, -#line 161 "CSSPropertyNames.gperf" +#line 164 "CSSPropertyNames.gperf" {"-webkit-box-align", CSSPropertyWebkitBoxAlign}, -#line 205 "CSSPropertyNames.gperf" +#line 207 "CSSPropertyNames.gperf" {"-webkit-mask-position-x", CSSPropertyWebkitMaskPositionX}, -#line 136 "CSSPropertyNames.gperf" - {"z-index", CSSPropertyZIndex}, -#line 234 "CSSPropertyNames.gperf" - {"-webkit-transition-timing-function", CSSPropertyWebkitTransitionTimingFunction}, -#line 64 "CSSPropertyNames.gperf" - {"list-style", CSSPropertyListStyle}, -#line 168 "CSSPropertyNames.gperf" - {"-webkit-box-pack", CSSPropertyWebkitBoxPack}, -#line 165 "CSSPropertyNames.gperf" - {"-webkit-box-lines", CSSPropertyWebkitBoxLines}, -#line 228 "CSSPropertyNames.gperf" - {"-webkit-transform-origin-z", CSSPropertyWebkitTransformOriginZ}, -#line 152 "CSSPropertyNames.gperf" - {"-webkit-border-bottom-left-radius", CSSPropertyWebkitBorderBottomLeftRadius}, -#line 103 "CSSPropertyNames.gperf" - {"table-layout", CSSPropertyTableLayout}, -#line 181 "CSSPropertyNames.gperf" - {"-webkit-column-width", CSSPropertyWebkitColumnWidth}, -#line 65 "CSSPropertyNames.gperf" - {"list-style-image", CSSPropertyListStyleImage}, -#line 113 "CSSPropertyNames.gperf" +#line 270 "CSSPropertyNames.gperf" + {"stroke-opacity", CSSPropertyStrokeOpacity}, +#line 116 "CSSPropertyNames.gperf" {"text-overline", CSSPropertyTextOverline}, -#line 120 "CSSPropertyNames.gperf" - {"text-underline", CSSPropertyTextUnderline}, -#line 115 "CSSPropertyNames.gperf" +#line 240 "CSSPropertyNames.gperf" + {"-webkit-variable-declaration-block", CSSPropertyWebkitVariableDeclarationBlock}, +#line 177 "CSSPropertyNames.gperf" + {"-webkit-column-count", CSSPropertyWebkitColumnCount}, +#line 118 "CSSPropertyNames.gperf" {"text-overline-mode", CSSPropertyTextOverlineMode}, -#line 122 "CSSPropertyNames.gperf" - {"text-underline-mode", CSSPropertyTextUnderlineMode}, -#line 82 "CSSPropertyNames.gperf" - {"outline-style", CSSPropertyOutlineStyle}, -#line 239 "CSSPropertyNames.gperf" +#line 171 "CSSPropertyNames.gperf" + {"-webkit-box-pack", CSSPropertyWebkitBoxPack}, +#line 168 "CSSPropertyNames.gperf" + {"-webkit-box-lines", CSSPropertyWebkitBoxLines}, +#line 233 "CSSPropertyNames.gperf" + {"-webkit-transition-delay", CSSPropertyWebkitTransitionDelay}, +#line 53 "CSSPropertyNames.gperf" + {"display", CSSPropertyDisplay}, +#line 86 "CSSPropertyNames.gperf" + {"outline-width", CSSPropertyOutlineWidth}, +#line 235 "CSSPropertyNames.gperf" + {"-webkit-transition-property", CSSPropertyWebkitTransitionProperty}, +#line 39 "CSSPropertyNames.gperf" + {"border-top-style", CSSPropertyBorderTopStyle}, +#line 179 "CSSPropertyNames.gperf" + {"-webkit-column-rule", CSSPropertyWebkitColumnRule}, +#line 162 "CSSPropertyNames.gperf" + {"-webkit-border-top-right-radius", CSSPropertyWebkitBorderTopRightRadius}, +#line 241 "CSSPropertyNames.gperf" {"clip-path", CSSPropertyClipPath}, -#line 60 "CSSPropertyNames.gperf" +#line 250 "CSSPropertyNames.gperf" + {"stop-opacity", CSSPropertyStopOpacity}, +#line 248 "CSSPropertyNames.gperf" + {"lighting-color", CSSPropertyLightingColor}, +#line 63 "CSSPropertyNames.gperf" {"height", CSSPropertyHeight}, -#line 238 "CSSPropertyNames.gperf" - {"-webkit-variable-declaration-block", CSSPropertyWebkitVariableDeclarationBlock}, -#line 75 "CSSPropertyNames.gperf" +#line 78 "CSSPropertyNames.gperf" {"min-height", CSSPropertyMinHeight}, -#line 171 "CSSPropertyNames.gperf" - {"-webkit-box-sizing", CSSPropertyWebkitBoxSizing}, #line 246 "CSSPropertyNames.gperf" - {"lighting-color", CSSPropertyLightingColor}, -#line 173 "CSSPropertyNames.gperf" - {"-webkit-column-break-before", CSSPropertyWebkitColumnBreakBefore}, -#line 178 "CSSPropertyNames.gperf" - {"-webkit-column-rule-color", CSSPropertyWebkitColumnRuleColor}, -#line 172 "CSSPropertyNames.gperf" - {"-webkit-column-break-after", CSSPropertyWebkitColumnBreakAfter}, -#line 215 "CSSPropertyNames.gperf" - {"-webkit-perspective-origin-y", CSSPropertyWebkitPerspectiveOriginY}, -#line 158 "CSSPropertyNames.gperf" - {"-webkit-border-top-left-radius", CSSPropertyWebkitBorderTopLeftRadius}, -#line 244 "CSSPropertyNames.gperf" {"flood-color", CSSPropertyFloodColor}, -#line 26 "CSSPropertyNames.gperf" +#line 147 "CSSPropertyNames.gperf" + {"-webkit-animation-timing-function", CSSPropertyWebkitAnimationTimingFunction}, +#line 11 "CSSPropertyNames.gperf" + {"background-attachment", CSSPropertyBackgroundAttachment}, +#line 222 "CSSPropertyNames.gperf" + {"-webkit-text-size-adjust", CSSPropertyWebkitTextSizeAdjust}, +#line 67 "CSSPropertyNames.gperf" + {"list-style", CSSPropertyListStyle}, +#line 28 "CSSPropertyNames.gperf" {"border-left-color", CSSPropertyBorderLeftColor}, -#line 32 "CSSPropertyNames.gperf" +#line 158 "CSSPropertyNames.gperf" + {"-webkit-border-horizontal-spacing", CSSPropertyWebkitBorderHorizontalSpacing}, +#line 224 "CSSPropertyNames.gperf" + {"-webkit-text-stroke-color", CSSPropertyWebkitTextStrokeColor}, +#line 68 "CSSPropertyNames.gperf" + {"list-style-image", CSSPropertyListStyleImage}, +#line 34 "CSSPropertyNames.gperf" {"border-right-width", CSSPropertyBorderRightWidth}, +#line 236 "CSSPropertyNames.gperf" + {"-webkit-transition-timing-function", CSSPropertyWebkitTransitionTimingFunction}, #line 183 "CSSPropertyNames.gperf" - {"-webkit-font-size-delta", CSSPropertyWebkitFontSizeDelta}, -#line 15 "CSSPropertyNames.gperf" - {"background-position-x", CSSPropertyBackgroundPositionX}, -#line 222 "CSSPropertyNames.gperf" - {"-webkit-text-stroke-color", CSSPropertyWebkitTextStrokeColor}, -#line 59 "CSSPropertyNames.gperf" + {"-webkit-column-width", CSSPropertyWebkitColumnWidth}, +#line 155 "CSSPropertyNames.gperf" + {"-webkit-border-bottom-left-radius", CSSPropertyWebkitBorderBottomLeftRadius}, +#line 123 "CSSPropertyNames.gperf" + {"text-underline", CSSPropertyTextUnderline}, +#line 217 "CSSPropertyNames.gperf" + {"-webkit-perspective-origin-y", CSSPropertyWebkitPerspectiveOriginY}, +#line 125 "CSSPropertyNames.gperf" + {"text-underline-mode", CSSPropertyTextUnderlineMode}, +#line 62 "CSSPropertyNames.gperf" {"font-weight", CSSPropertyFontWeight}, +#line 253 "CSSPropertyNames.gperf" + {"color-profile", CSSPropertyColorProfile}, +#line 216 "CSSPropertyNames.gperf" + {"-webkit-perspective-origin-x", CSSPropertyWebkitPerspectiveOriginX}, +#line 198 "CSSPropertyNames.gperf" + {"-webkit-marquee-style", CSSPropertyWebkitMarqueeStyle}, +#line 18 "CSSPropertyNames.gperf" + {"background-position-y", CSSPropertyBackgroundPositionY}, +#line 175 "CSSPropertyNames.gperf" + {"-webkit-column-break-before", CSSPropertyWebkitColumnBreakBefore}, +#line 174 "CSSPropertyNames.gperf" + {"-webkit-column-break-after", CSSPropertyWebkitColumnBreakAfter}, +#line 161 "CSSPropertyNames.gperf" + {"-webkit-border-top-left-radius", CSSPropertyWebkitBorderTopLeftRadius}, #line 66 "CSSPropertyNames.gperf" + {"line-height", CSSPropertyLineHeight}, +#line 69 "CSSPropertyNames.gperf" {"list-style-position", CSSPropertyListStylePosition}, -#line 51 "CSSPropertyNames.gperf" +#line 17 "CSSPropertyNames.gperf" + {"background-position-x", CSSPropertyBackgroundPositionX}, +#line 77 "CSSPropertyNames.gperf" + {"max-width", CSSPropertyMaxWidth}, +#line 106 "CSSPropertyNames.gperf" + {"table-layout", CSSPropertyTableLayout}, +#line 117 "CSSPropertyNames.gperf" + {"text-overline-color", CSSPropertyTextOverlineColor}, +#line 54 "CSSPropertyNames.gperf" {"empty-cells", CSSPropertyEmptyCells}, -#line 166 "CSSPropertyNames.gperf" +#line 169 "CSSPropertyNames.gperf" {"-webkit-box-ordinal-group", CSSPropertyWebkitBoxOrdinalGroup}, -#line 263 "CSSPropertyNames.gperf" - {"stroke-dasharray", CSSPropertyStrokeDasharray}, -#line 251 "CSSPropertyNames.gperf" - {"color-profile", CSSPropertyColorProfile}, -#line 220 "CSSPropertyNames.gperf" - {"-webkit-text-size-adjust", CSSPropertyWebkitTextSizeAdjust}, -#line 255 "CSSPropertyNames.gperf" - {"fill-rule", CSSPropertyFillRule}, -#line 63 "CSSPropertyNames.gperf" - {"line-height", CSSPropertyLineHeight}, -#line 227 "CSSPropertyNames.gperf" - {"-webkit-transform-origin-y", CSSPropertyWebkitTransformOriginY}, -#line 74 "CSSPropertyNames.gperf" - {"max-width", CSSPropertyMaxWidth}, -#line 214 "CSSPropertyNames.gperf" - {"-webkit-perspective-origin-x", CSSPropertyWebkitPerspectiveOriginX}, -#line 236 "CSSPropertyNames.gperf" - {"-webkit-user-modify", CSSPropertyWebkitUserModify}, -#line 56 "CSSPropertyNames.gperf" +#line 85 "CSSPropertyNames.gperf" + {"outline-style", CSSPropertyOutlineStyle}, +#line 43 "CSSPropertyNames.gperf" + {"box-shadow", CSSPropertyBoxShadow}, +#line 121 "CSSPropertyNames.gperf" + {"text-shadow", CSSPropertyTextShadow}, +#line 59 "CSSPropertyNames.gperf" {"font-stretch", CSSPropertyFontStretch}, #line 180 "CSSPropertyNames.gperf" - {"-webkit-column-rule-width", CSSPropertyWebkitColumnRuleWidth}, -#line 118 "CSSPropertyNames.gperf" - {"text-shadow", CSSPropertyTextShadow}, -#line 31 "CSSPropertyNames.gperf" - {"border-right-style", CSSPropertyBorderRightStyle}, -#line 57 "CSSPropertyNames.gperf" - {"font-style", CSSPropertyFontStyle}, -#line 28 "CSSPropertyNames.gperf" + {"-webkit-column-rule-color", CSSPropertyWebkitColumnRuleColor}, +#line 265 "CSSPropertyNames.gperf" + {"stroke-dasharray", CSSPropertyStrokeDasharray}, +#line 30 "CSSPropertyNames.gperf" {"border-left-width", CSSPropertyBorderLeftWidth}, -#line 170 "CSSPropertyNames.gperf" - {"-webkit-box-shadow", CSSPropertyWebkitBoxShadow}, -#line 114 "CSSPropertyNames.gperf" - {"text-overline-color", CSSPropertyTextOverlineColor}, -#line 121 "CSSPropertyNames.gperf" - {"text-underline-color", CSSPropertyTextUnderlineColor}, -#line 223 "CSSPropertyNames.gperf" +#line 225 "CSSPropertyNames.gperf" {"-webkit-text-stroke-width", CSSPropertyWebkitTextStrokeWidth}, -#line 119 "CSSPropertyNames.gperf" +#line 257 "CSSPropertyNames.gperf" + {"fill-rule", CSSPropertyFillRule}, +#line 122 "CSSPropertyNames.gperf" {"text-transform", CSSPropertyTextTransform}, -#line 155 "CSSPropertyNames.gperf" - {"-webkit-border-horizontal-spacing", CSSPropertyWebkitBorderHorizontalSpacing}, -#line 277 "CSSPropertyNames.gperf" +#line 279 "CSSPropertyNames.gperf" {"text-anchor", CSSPropertyTextAnchor}, -#line 272 "CSSPropertyNames.gperf" +#line 274 "CSSPropertyNames.gperf" {"baseline-shift", CSSPropertyBaselineShift}, -#line 86 "CSSPropertyNames.gperf" - {"overflow-y", CSSPropertyOverflowY}, -#line 226 "CSSPropertyNames.gperf" - {"-webkit-transform-origin-x", CSSPropertyWebkitTransformOriginX}, #line 229 "CSSPropertyNames.gperf" - {"-webkit-transform-style", CSSPropertyWebkitTransformStyle}, -#line 81 "CSSPropertyNames.gperf" - {"outline-offset", CSSPropertyOutlineOffset}, -#line 250 "CSSPropertyNames.gperf" + {"-webkit-transform-origin-y", CSSPropertyWebkitTransformOriginY}, +#line 228 "CSSPropertyNames.gperf" + {"-webkit-transform-origin-x", CSSPropertyWebkitTransformOriginX}, +#line 33 "CSSPropertyNames.gperf" + {"border-right-style", CSSPropertyBorderRightStyle}, +#line 252 "CSSPropertyNames.gperf" {"color-interpolation-filters", CSSPropertyColorInterpolationFilters}, -#line 179 "CSSPropertyNames.gperf" - {"-webkit-column-rule-style", CSSPropertyWebkitColumnRuleStyle}, -#line 245 "CSSPropertyNames.gperf" - {"flood-opacity", CSSPropertyFloodOpacity}, -#line 27 "CSSPropertyNames.gperf" - {"border-left-style", CSSPropertyBorderLeftStyle}, -#line 219 "CSSPropertyNames.gperf" - {"-webkit-text-security", CSSPropertyWebkitTextSecurity}, -#line 117 "CSSPropertyNames.gperf" - {"text-overline-width", CSSPropertyTextOverlineWidth}, #line 124 "CSSPropertyNames.gperf" - {"text-underline-width", CSSPropertyTextUnderlineWidth}, -#line 85 "CSSPropertyNames.gperf" + {"text-underline-color", CSSPropertyTextUnderlineColor}, +#line 60 "CSSPropertyNames.gperf" + {"font-style", CSSPropertyFontStyle}, +#line 120 "CSSPropertyNames.gperf" + {"text-overline-width", CSSPropertyTextOverlineWidth}, +#line 89 "CSSPropertyNames.gperf" + {"overflow-y", CSSPropertyOverflowY}, +#line 88 "CSSPropertyNames.gperf" {"overflow-x", CSSPropertyOverflowX}, -#line 112 "CSSPropertyNames.gperf" +#line 115 "CSSPropertyNames.gperf" {"text-overflow", CSSPropertyTextOverflow}, -#line 67 "CSSPropertyNames.gperf" - {"list-style-type", CSSPropertyListStyleType}, -#line 169 "CSSPropertyNames.gperf" +#line 182 "CSSPropertyNames.gperf" + {"-webkit-column-rule-width", CSSPropertyWebkitColumnRuleWidth}, +#line 238 "CSSPropertyNames.gperf" + {"-webkit-user-modify", CSSPropertyWebkitUserModify}, +#line 231 "CSSPropertyNames.gperf" + {"-webkit-transform-style", CSSPropertyWebkitTransformStyle}, +#line 172 "CSSPropertyNames.gperf" {"-webkit-box-reflect", CSSPropertyWebkitBoxReflect}, -#line 254 "CSSPropertyNames.gperf" - {"fill-opacity", CSSPropertyFillOpacity}, -#line 146 "CSSPropertyNames.gperf" - {"-webkit-backface-visibility", CSSPropertyWebkitBackfaceVisibility}, -#line 73 "CSSPropertyNames.gperf" +#line 84 "CSSPropertyNames.gperf" + {"outline-offset", CSSPropertyOutlineOffset}, +#line 247 "CSSPropertyNames.gperf" + {"flood-opacity", CSSPropertyFloodOpacity}, +#line 29 "CSSPropertyNames.gperf" + {"border-left-style", CSSPropertyBorderLeftStyle}, +#line 127 "CSSPropertyNames.gperf" + {"text-underline-width", CSSPropertyTextUnderlineWidth}, +#line 76 "CSSPropertyNames.gperf" {"max-height", CSSPropertyMaxHeight}, -#line 116 "CSSPropertyNames.gperf" +#line 186 "CSSPropertyNames.gperf" + {"-webkit-highlight", CSSPropertyWebkitHighlight}, +#line 221 "CSSPropertyNames.gperf" + {"-webkit-text-security", CSSPropertyWebkitTextSecurity}, +#line 256 "CSSPropertyNames.gperf" + {"fill-opacity", CSSPropertyFillOpacity}, +#line 119 "CSSPropertyNames.gperf" {"text-overline-style", CSSPropertyTextOverlineStyle}, -#line 123 "CSSPropertyNames.gperf" - {"text-underline-style", CSSPropertyTextUnderlineStyle}, -#line 209 "CSSPropertyNames.gperf" +#line 149 "CSSPropertyNames.gperf" + {"-webkit-backface-visibility", CSSPropertyWebkitBackfaceVisibility}, +#line 70 "CSSPropertyNames.gperf" + {"list-style-type", CSSPropertyListStyleType}, +#line 266 "CSSPropertyNames.gperf" + {"stroke-dashoffset", CSSPropertyStrokeDashoffset}, +#line 211 "CSSPropertyNames.gperf" {"-webkit-match-nearest-mail-blockquote-color", CSSPropertyWebkitMatchNearestMailBlockquoteColor}, -#line 184 "CSSPropertyNames.gperf" - {"-webkit-highlight", CSSPropertyWebkitHighlight}, -#line 275 "CSSPropertyNames.gperf" +#line 181 "CSSPropertyNames.gperf" + {"-webkit-column-rule-style", CSSPropertyWebkitColumnRuleStyle}, +#line 277 "CSSPropertyNames.gperf" {"glyph-orientation-vertical", CSSPropertyGlyphOrientationVertical}, -#line 264 "CSSPropertyNames.gperf" - {"stroke-dashoffset", CSSPropertyStrokeDashoffset}, -#line 54 "CSSPropertyNames.gperf" - {"font-family", CSSPropertyFontFamily}, -#line 218 "CSSPropertyNames.gperf" +#line 220 "CSSPropertyNames.gperf" {"-webkit-text-fill-color", CSSPropertyWebkitTextFillColor}, -#line 107 "CSSPropertyNames.gperf" +#line 126 "CSSPropertyNames.gperf" + {"text-underline-style", CSSPropertyTextUnderlineStyle}, +#line 57 "CSSPropertyNames.gperf" + {"font-family", CSSPropertyFontFamily}, +#line 110 "CSSPropertyNames.gperf" {"text-line-through", CSSPropertyTextLineThrough}, -#line 109 "CSSPropertyNames.gperf" - {"text-line-through-mode", CSSPropertyTextLineThroughMode}, -#line 163 "CSSPropertyNames.gperf" +#line 166 "CSSPropertyNames.gperf" {"-webkit-box-flex", CSSPropertyWebkitBoxFlex}, -#line 217 "CSSPropertyNames.gperf" - {"-webkit-text-decorations-in-effect", CSSPropertyWebkitTextDecorationsInEffect}, -#line 274 "CSSPropertyNames.gperf" +#line 112 "CSSPropertyNames.gperf" + {"text-line-through-mode", CSSPropertyTextLineThroughMode}, +#line 276 "CSSPropertyNames.gperf" {"glyph-orientation-horizontal", CSSPropertyGlyphOrientationHorizontal}, -#line 108 "CSSPropertyNames.gperf" +#line 219 "CSSPropertyNames.gperf" + {"-webkit-text-decorations-in-effect", CSSPropertyWebkitTextDecorationsInEffect}, +#line 111 "CSSPropertyNames.gperf" {"text-line-through-color", CSSPropertyTextLineThroughColor}, -#line 164 "CSSPropertyNames.gperf" +#line 167 "CSSPropertyNames.gperf" {"-webkit-box-flex-group", CSSPropertyWebkitBoxFlexGroup}, -#line 111 "CSSPropertyNames.gperf" +#line 114 "CSSPropertyNames.gperf" {"text-line-through-width", CSSPropertyTextLineThroughWidth}, -#line 110 "CSSPropertyNames.gperf" +#line 113 "CSSPropertyNames.gperf" {"text-line-through-style", CSSPropertyTextLineThroughStyle} }; static const short lookup[] = { -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, - -1, 2, -1, 3, -1, 4, 5, 6, -1, -1, - 7, -1, -1, 8, 9, -1, 10, -1, -1, -1, - 11, -1, 12, -1, -1, 13, -1, -1, -1, -1, - 14, -1, 15, -1, -1, 16, -1, 17, 18, -1, - -1, 19, 20, -1, -1, -1, -1, 21, -1, 22, - -1, -1, -1, 23, -1, 24, -1, 25, 26, 27, - -1, -1, -1, -1, 28, 29, -1, -1, -1, -1, - 30, -1, 31, 32, 33, -1, -1, -1, -1, -1, - -1, 34, -1, -1, -1, -1, -1, -1, 35, 36, - 37, -1, -1, -1, -1, -1, -1, 38, -1, -1, - -1, -1, 39, -1, -1, -1, 40, 41, -1, 42, - -1, 43, -1, -1, -1, -1, 44, -1, -1, -1, - -1, 45, 46, -1, -1, -1, -1, 47, -1, 48, - -1, 49, 50, 51, -1, 52, -1, 53, -1, -1, - 54, -1, -1, 55, 56, 57, 58, 59, -1, -1, - -1, 60, 61, -1, 62, -1, -1, 63, 64, -1, - -1, 65, -1, -1, -1, -1, 66, -1, -1, -1, - 67, -1, -1, -1, 68, 69, 70, -1, -1, -1, - 71, -1, 72, -1, -1, 73, -1, 74, -1, -1, - 75, -1, -1, 76, 77, -1, -1, -1, -1, -1, - -1, -1, 78, -1, -1, 79, -1, 80, -1, -1, - -1, -1, 81, -1, -1, -1, -1, -1, -1, 82, - -1, -1, 83, 84, -1, -1, -1, -1, -1, 85, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 86, -1, -1, -1, - -1, -1, -1, -1, -1, 87, -1, 88, -1, -1, - -1, -1, -1, 89, -1, -1, -1, -1, -1, 90, - 91, -1, -1, -1, 92, -1, -1, 93, -1, -1, - -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, - 95, -1, -1, -1, -1, 96, -1, 97, -1, 98, - -1, -1, -1, -1, 99, -1, 100, 101, -1, -1, - -1, -1, 102, 103, 104, -1, -1, 105, -1, 106, - -1, -1, -1, 107, -1, -1, 108, -1, -1, -1, - -1, -1, 109, 110, -1, -1, -1, -1, 111, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 112, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 113, - -1, -1, -1, 114, 115, -1, -1, -1, 116, -1, - -1, 117, -1, -1, -1, 118, -1, 119, -1, -1, - 120, -1, 121, -1, 122, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 123, 124, -1, - 125, 126, 127, -1, 128, -1, 129, -1, 130, 131, - -1, -1, -1, -1, 132, 133, -1, 134, -1, 135, - 136, 137, -1, 138, -1, -1, -1, 139, 140, 141, - -1, 142, -1, 143, 144, -1, -1, -1, -1, -1, - -1, 145, -1, 146, 147, -1, -1, -1, -1, -1, - -1, 148, -1, -1, 149, -1, -1, 150, -1, -1, - -1, 151, -1, 152, -1, -1, -1, 153, -1, 154, - 155, -1, 156, -1, -1, -1, -1, -1, -1, -1, - -1, 157, 158, -1, -1, 159, 160, -1, -1, 161, - -1, -1, 162, 163, -1, -1, -1, -1, 164, -1, - -1, 165, 166, -1, -1, -1, -1, -1, -1, -1, - 167, -1, -1, -1, -1, -1, -1, -1, 168, 169, - -1, 170, -1, -1, -1, -1, 171, -1, -1, -1, - -1, 172, 173, 174, -1, -1, -1, 175, -1, -1, - -1, -1, -1, -1, 176, 177, 178, 179, -1, -1, - -1, 180, -1, 181, -1, -1, -1, 182, -1, -1, - 183, 184, -1, 185, 186, -1, -1, -1, 187, 188, - -1, -1, -1, -1, -1, -1, -1, -1, 189, 190, - -1, 191, -1, -1, 192, -1, -1, -1, -1, -1, - 193, -1, -1, 194, 195, -1, -1, 196, -1, -1, - 197, 198, -1, 199, -1, 200, 201, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 202, 203, -1, -1, -1, -1, 204, -1, - -1, 205, -1, -1, -1, 206, 207, -1, -1, 208, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 209, -1, -1, -1, 210, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 211, -1, 212, 213, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 214, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 215, -1, -1, -1, - -1, 216, -1, -1, 217, -1, -1, -1, 218, -1, - -1, -1, -1, -1, 219, -1, -1, -1, -1, -1, - -1, -1, 220, -1, -1, 221, -1, -1, -1, -1, - -1, 222, -1, -1, -1, -1, -1, -1, 223, -1, - -1, -1, -1, -1, -1, 224, -1, 225, -1, -1, - -1, -1, -1, 226, 227, 228, -1, -1, -1, -1, - 229, -1, -1, -1, 230, -1, -1, -1, 231, -1, - -1, -1, -1, -1, -1, -1, 232, -1, -1, 233, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 234, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 235, -1, -1, -1, - -1, -1, -1, 236, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 237, - -1, -1, 238, -1, -1, -1, -1, -1, -1, -1, - 239, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 240, -1, -1, -1, -1, -1, -1, - -1, -1, 241, -1, -1, -1, 242, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 243, - 244, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 245, -1, -1, 246, -1, - 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1, -1, 2, -1, -1, -1, + -1, 3, -1, 4, -1, 5, 6, 7, -1, -1, + 8, -1, -1, 9, 10, -1, 11, -1, -1, 12, + 13, -1, 14, -1, -1, 15, 16, -1, -1, -1, + 17, -1, 18, -1, -1, 19, -1, 20, 21, -1, + -1, 22, 23, -1, -1, -1, -1, 24, -1, 25, + -1, -1, -1, 26, -1, 27, -1, 28, 29, 30, + -1, -1, -1, -1, 31, 32, -1, -1, -1, -1, + 33, -1, 34, 35, 36, -1, -1, 37, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, + -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, + -1, -1, 41, -1, -1, -1, -1, -1, -1, 42, + -1, -1, -1, -1, -1, -1, 43, -1, -1, 44, + -1, 45, -1, -1, -1, -1, -1, 46, -1, -1, + -1, 47, -1, 48, -1, -1, -1, 49, -1, -1, + 50, -1, -1, -1, -1, 51, -1, -1, -1, -1, + -1, -1, 52, -1, -1, -1, -1, 53, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 54, 55, -1, -1, 56, 57, -1, -1, -1, -1, + 58, -1, 59, -1, -1, -1, -1, 60, -1, -1, + -1, -1, -1, -1, 61, -1, 62, 63, -1, -1, + -1, 64, 65, -1, -1, 66, -1, -1, -1, -1, + -1, -1, 67, -1, -1, -1, -1, -1, -1, 68, + -1, -1, 69, 70, -1, 71, -1, -1, -1, -1, + -1, -1, -1, 72, -1, -1, 73, 74, -1, -1, + -1, 75, -1, -1, -1, -1, 76, 77, 78, -1, + -1, -1, -1, -1, -1, 79, 80, -1, -1, 81, + -1, -1, -1, 82, -1, -1, 83, -1, -1, 84, + 85, -1, -1, -1, 86, 87, -1, 88, -1, -1, + 89, 90, -1, 91, -1, -1, -1, -1, 92, -1, + -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 248, -1, -1, -1, -1, -1, + 94, -1, 95, -1, -1, 96, -1, -1, -1, 97, + -1, -1, -1, -1, 98, -1, -1, 99, -1, -1, + -1, -1, 100, -1, 101, -1, -1, 102, -1, 103, + -1, -1, -1, -1, 104, -1, -1, 105, -1, -1, + -1, -1, 106, -1, -1, -1, -1, -1, -1, -1, + 107, -1, -1, 108, 109, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 110, -1, -1, 111, -1, + -1, -1, -1, -1, 112, -1, -1, 113, 114, 115, + -1, 116, -1, -1, -1, -1, -1, 117, -1, -1, + -1, -1, 118, 119, -1, -1, -1, -1, 120, -1, + -1, -1, 121, 122, -1, 123, 124, -1, -1, -1, + 125, 126, 127, -1, -1, -1, 128, -1, 129, -1, + -1, -1, 130, -1, 131, -1, 132, -1, -1, 133, + -1, -1, -1, 134, 135, -1, 136, -1, -1, -1, + 137, 138, -1, 139, -1, -1, -1, -1, -1, -1, + -1, 140, -1, -1, 141, 142, -1, 143, -1, -1, + -1, 144, -1, -1, 145, -1, -1, 146, 147, -1, + -1, 148, -1, -1, -1, -1, -1, -1, 149, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 150, -1, + -1, -1, -1, -1, -1, 151, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 152, 153, -1, + -1, 154, 155, 156, -1, -1, -1, 157, 158, -1, + 159, -1, -1, -1, 160, -1, -1, -1, -1, 161, + -1, -1, -1, 162, -1, 163, -1, -1, -1, 164, + -1, -1, 165, 166, 167, -1, -1, -1, 168, 169, + 170, -1, -1, 171, -1, -1, 172, 173, -1, 174, + -1, -1, 175, 176, -1, -1, -1, -1, -1, -1, + -1, -1, 177, -1, -1, -1, 178, -1, -1, 179, + -1, 180, -1, -1, -1, -1, -1, -1, -1, 181, + -1, -1, 182, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 183, -1, -1, -1, -1, -1, + -1, 184, -1, -1, -1, -1, -1, -1, -1, -1, + 185, -1, -1, -1, -1, -1, 186, -1, 187, -1, + -1, 188, -1, -1, 189, 190, -1, -1, -1, -1, + -1, -1, 191, 192, -1, 193, -1, -1, -1, -1, + -1, 194, -1, 195, 196, -1, -1, -1, -1, -1, + 197, -1, -1, 198, 199, -1, -1, -1, 200, 201, + -1, -1, -1, -1, -1, -1, 202, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 203, -1, + -1, -1, -1, 204, -1, -1, -1, -1, -1, -1, + -1, 205, -1, -1, -1, -1, 206, 207, -1, -1, + -1, 208, -1, -1, -1, 209, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 210, -1, -1, 211, + -1, 212, -1, -1, 213, -1, -1, 214, -1, 215, + -1, 216, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 217, -1, -1, 218, -1, + 219, 220, 221, -1, -1, -1, -1, -1, -1, -1, + 222, -1, -1, -1, -1, -1, 223, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 224, -1, -1, + 225, -1, -1, -1, 226, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 227, -1, 228, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 229, + -1, 230, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 231, -1, 232, -1, + -1, -1, 233, -1, -1, 234, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 235, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 249, -1, -1, + -1, -1, -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 250, -1, -1, - 251, -1, -1, -1, 252, 253, -1, -1, 254, -1, + 238, -1, -1, 239, -1, 240, -1, -1, -1, -1, + -1, -1, -1, -1, 241, -1, -1, -1, -1, -1, + -1, -1, -1, 242, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 255, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 256, 257, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 243, -1, -1, -1, -1, 244, + -1, -1, -1, 245, -1, -1, -1, -1, -1, -1, + -1, -1, 246, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 258, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 248, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 249, -1, -1, -1, 250, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 251, -1, 252, + -1, -1, 253, -1, -1, -1, -1, -1, -1, -1, + 254, -1, -1, -1, -1, -1, -1, 255, 256, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 257, 258, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -894,30 +903,39 @@ findProp (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 259, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 260, -1, -1, - -1, -1, 261, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 260, -1, -1, -1, -1, + -1, 261, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 262, -1, -1, + -1, 263, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 265, -1, + -1, -1, -1, -1, 266, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 262, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 263, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 264, -1, -1, -1, -1, 265, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 266, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 267, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 268, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -926,10 +944,10 @@ findProp (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 267, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 269, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -937,7 +955,18 @@ findProp (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 268 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 270 }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) @@ -959,13 +988,15 @@ findProp (register const char *str, register unsigned int len) } return 0; } -#line 279 "CSSPropertyNames.gperf" +#line 281 "CSSPropertyNames.gperf" -static const char * const propertyNameStrings[269] = { +static const char * const propertyNameStrings[271] = { "background", "background-attachment", +"background-clip", "background-color", "background-image", +"background-origin", "background-position", "background-position-x", "background-position-y", @@ -993,6 +1024,7 @@ static const char * const propertyNameStrings[269] = { "border-top-width", "border-width", "bottom", +"box-shadow", "caption-side", "clear", "clip", @@ -1122,7 +1154,6 @@ static const char * const propertyNameStrings[269] = { "-webkit-box-orient", "-webkit-box-pack", "-webkit-box-reflect", -"-webkit-box-shadow", "-webkit-box-sizing", "-webkit-column-break-after", "-webkit-column-break-before", diff --git a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h index aaddf05631..cc3627d914 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h +++ b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h @@ -7,277 +7,279 @@ enum CSSPropertyID { CSSPropertyInvalid = 0, CSSPropertyBackground = 1001, CSSPropertyBackgroundAttachment = 1002, - CSSPropertyBackgroundColor = 1003, - CSSPropertyBackgroundImage = 1004, - CSSPropertyBackgroundPosition = 1005, - CSSPropertyBackgroundPositionX = 1006, - CSSPropertyBackgroundPositionY = 1007, - CSSPropertyBackgroundRepeat = 1008, - CSSPropertyBorder = 1009, - CSSPropertyBorderBottom = 1010, - CSSPropertyBorderBottomColor = 1011, - CSSPropertyBorderBottomStyle = 1012, - CSSPropertyBorderBottomWidth = 1013, - CSSPropertyBorderCollapse = 1014, - CSSPropertyBorderColor = 1015, - CSSPropertyBorderLeft = 1016, - CSSPropertyBorderLeftColor = 1017, - CSSPropertyBorderLeftStyle = 1018, - CSSPropertyBorderLeftWidth = 1019, - CSSPropertyBorderRight = 1020, - CSSPropertyBorderRightColor = 1021, - CSSPropertyBorderRightStyle = 1022, - CSSPropertyBorderRightWidth = 1023, - CSSPropertyBorderSpacing = 1024, - CSSPropertyBorderStyle = 1025, - CSSPropertyBorderTop = 1026, - CSSPropertyBorderTopColor = 1027, - CSSPropertyBorderTopStyle = 1028, - CSSPropertyBorderTopWidth = 1029, - CSSPropertyBorderWidth = 1030, - CSSPropertyBottom = 1031, - CSSPropertyCaptionSide = 1032, - CSSPropertyClear = 1033, - CSSPropertyClip = 1034, - CSSPropertyColor = 1035, - CSSPropertyContent = 1036, - CSSPropertyCounterIncrement = 1037, - CSSPropertyCounterReset = 1038, - CSSPropertyCursor = 1039, - CSSPropertyDirection = 1040, - CSSPropertyDisplay = 1041, - CSSPropertyEmptyCells = 1042, - CSSPropertyFloat = 1043, - CSSPropertyFont = 1044, - CSSPropertyFontFamily = 1045, - CSSPropertyFontSize = 1046, - CSSPropertyFontStretch = 1047, - CSSPropertyFontStyle = 1048, - CSSPropertyFontVariant = 1049, - CSSPropertyFontWeight = 1050, - CSSPropertyHeight = 1051, - CSSPropertyLeft = 1052, - CSSPropertyLetterSpacing = 1053, - CSSPropertyLineHeight = 1054, - CSSPropertyListStyle = 1055, - CSSPropertyListStyleImage = 1056, - CSSPropertyListStylePosition = 1057, - CSSPropertyListStyleType = 1058, - CSSPropertyMargin = 1059, - CSSPropertyMarginBottom = 1060, - CSSPropertyMarginLeft = 1061, - CSSPropertyMarginRight = 1062, - CSSPropertyMarginTop = 1063, - CSSPropertyMaxHeight = 1064, - CSSPropertyMaxWidth = 1065, - CSSPropertyMinHeight = 1066, - CSSPropertyMinWidth = 1067, - CSSPropertyOpacity = 1068, - CSSPropertyOrphans = 1069, - CSSPropertyOutline = 1070, - CSSPropertyOutlineColor = 1071, - CSSPropertyOutlineOffset = 1072, - CSSPropertyOutlineStyle = 1073, - CSSPropertyOutlineWidth = 1074, - CSSPropertyOverflow = 1075, - CSSPropertyOverflowX = 1076, - CSSPropertyOverflowY = 1077, - CSSPropertyPadding = 1078, - CSSPropertyPaddingBottom = 1079, - CSSPropertyPaddingLeft = 1080, - CSSPropertyPaddingRight = 1081, - CSSPropertyPaddingTop = 1082, - CSSPropertyPage = 1083, - CSSPropertyPageBreakAfter = 1084, - CSSPropertyPageBreakBefore = 1085, - CSSPropertyPageBreakInside = 1086, - CSSPropertyPointerEvents = 1087, - CSSPropertyPosition = 1088, - CSSPropertyQuotes = 1089, - CSSPropertyResize = 1090, - CSSPropertyRight = 1091, - CSSPropertySize = 1092, - CSSPropertySrc = 1093, - CSSPropertyTableLayout = 1094, - CSSPropertyTextAlign = 1095, - CSSPropertyTextDecoration = 1096, - CSSPropertyTextIndent = 1097, - CSSPropertyTextLineThrough = 1098, - CSSPropertyTextLineThroughColor = 1099, - CSSPropertyTextLineThroughMode = 1100, - CSSPropertyTextLineThroughStyle = 1101, - CSSPropertyTextLineThroughWidth = 1102, - CSSPropertyTextOverflow = 1103, - CSSPropertyTextOverline = 1104, - CSSPropertyTextOverlineColor = 1105, - CSSPropertyTextOverlineMode = 1106, - CSSPropertyTextOverlineStyle = 1107, - CSSPropertyTextOverlineWidth = 1108, - CSSPropertyTextShadow = 1109, - CSSPropertyTextTransform = 1110, - CSSPropertyTextUnderline = 1111, - CSSPropertyTextUnderlineColor = 1112, - CSSPropertyTextUnderlineMode = 1113, - CSSPropertyTextUnderlineStyle = 1114, - CSSPropertyTextUnderlineWidth = 1115, - CSSPropertyTop = 1116, - CSSPropertyUnicodeBidi = 1117, - CSSPropertyUnicodeRange = 1118, - CSSPropertyVerticalAlign = 1119, - CSSPropertyVisibility = 1120, - CSSPropertyWhiteSpace = 1121, - CSSPropertyWidows = 1122, - CSSPropertyWidth = 1123, - CSSPropertyWordBreak = 1124, - CSSPropertyWordSpacing = 1125, - CSSPropertyWordWrap = 1126, - CSSPropertyZIndex = 1127, - CSSPropertyZoom = 1128, - CSSPropertyWebkitAnimation = 1129, - CSSPropertyWebkitAnimationDelay = 1130, - CSSPropertyWebkitAnimationDirection = 1131, - CSSPropertyWebkitAnimationDuration = 1132, - CSSPropertyWebkitAnimationIterationCount = 1133, - CSSPropertyWebkitAnimationName = 1134, - CSSPropertyWebkitAnimationTimingFunction = 1135, - CSSPropertyWebkitAppearance = 1136, - CSSPropertyWebkitBackfaceVisibility = 1137, - CSSPropertyWebkitBackgroundClip = 1138, - CSSPropertyWebkitBackgroundComposite = 1139, - CSSPropertyWebkitBackgroundOrigin = 1140, - CSSPropertyWebkitBackgroundSize = 1141, - CSSPropertyWebkitBinding = 1142, - CSSPropertyWebkitBorderBottomLeftRadius = 1143, - CSSPropertyWebkitBorderBottomRightRadius = 1144, - CSSPropertyWebkitBorderFit = 1145, - CSSPropertyWebkitBorderHorizontalSpacing = 1146, - CSSPropertyWebkitBorderImage = 1147, - CSSPropertyWebkitBorderRadius = 1148, - CSSPropertyWebkitBorderTopLeftRadius = 1149, - CSSPropertyWebkitBorderTopRightRadius = 1150, - CSSPropertyWebkitBorderVerticalSpacing = 1151, - CSSPropertyWebkitBoxAlign = 1152, - CSSPropertyWebkitBoxDirection = 1153, - CSSPropertyWebkitBoxFlex = 1154, - CSSPropertyWebkitBoxFlexGroup = 1155, - CSSPropertyWebkitBoxLines = 1156, - CSSPropertyWebkitBoxOrdinalGroup = 1157, - CSSPropertyWebkitBoxOrient = 1158, - CSSPropertyWebkitBoxPack = 1159, - CSSPropertyWebkitBoxReflect = 1160, - CSSPropertyWebkitBoxShadow = 1161, - CSSPropertyWebkitBoxSizing = 1162, - CSSPropertyWebkitColumnBreakAfter = 1163, - CSSPropertyWebkitColumnBreakBefore = 1164, - CSSPropertyWebkitColumnBreakInside = 1165, - CSSPropertyWebkitColumnCount = 1166, - CSSPropertyWebkitColumnGap = 1167, - CSSPropertyWebkitColumnRule = 1168, - CSSPropertyWebkitColumnRuleColor = 1169, - CSSPropertyWebkitColumnRuleStyle = 1170, - CSSPropertyWebkitColumnRuleWidth = 1171, - CSSPropertyWebkitColumnWidth = 1172, - CSSPropertyWebkitColumns = 1173, - CSSPropertyWebkitFontSizeDelta = 1174, - CSSPropertyWebkitHighlight = 1175, - CSSPropertyWebkitLineBreak = 1176, - CSSPropertyWebkitLineClamp = 1177, - CSSPropertyWebkitMarginBottomCollapse = 1178, - CSSPropertyWebkitMarginCollapse = 1179, - CSSPropertyWebkitMarginStart = 1180, - CSSPropertyWebkitMarginTopCollapse = 1181, - CSSPropertyWebkitMarquee = 1182, - CSSPropertyWebkitMarqueeDirection = 1183, - CSSPropertyWebkitMarqueeIncrement = 1184, - CSSPropertyWebkitMarqueeRepetition = 1185, - CSSPropertyWebkitMarqueeSpeed = 1186, - CSSPropertyWebkitMarqueeStyle = 1187, - CSSPropertyWebkitMask = 1188, - CSSPropertyWebkitMaskAttachment = 1189, - CSSPropertyWebkitMaskBoxImage = 1190, - CSSPropertyWebkitMaskClip = 1191, - CSSPropertyWebkitMaskComposite = 1192, - CSSPropertyWebkitMaskImage = 1193, - CSSPropertyWebkitMaskOrigin = 1194, - CSSPropertyWebkitMaskPosition = 1195, - CSSPropertyWebkitMaskPositionX = 1196, - CSSPropertyWebkitMaskPositionY = 1197, - CSSPropertyWebkitMaskRepeat = 1198, - CSSPropertyWebkitMaskSize = 1199, - CSSPropertyWebkitMatchNearestMailBlockquoteColor = 1200, - CSSPropertyWebkitNbspMode = 1201, - CSSPropertyWebkitPaddingStart = 1202, - CSSPropertyWebkitPerspective = 1203, - CSSPropertyWebkitPerspectiveOrigin = 1204, - CSSPropertyWebkitPerspectiveOriginX = 1205, - CSSPropertyWebkitPerspectiveOriginY = 1206, - CSSPropertyWebkitRtlOrdering = 1207, - CSSPropertyWebkitTextDecorationsInEffect = 1208, - CSSPropertyWebkitTextFillColor = 1209, - CSSPropertyWebkitTextSecurity = 1210, - CSSPropertyWebkitTextSizeAdjust = 1211, - CSSPropertyWebkitTextStroke = 1212, - CSSPropertyWebkitTextStrokeColor = 1213, - CSSPropertyWebkitTextStrokeWidth = 1214, - CSSPropertyWebkitTransform = 1215, - CSSPropertyWebkitTransformOrigin = 1216, - CSSPropertyWebkitTransformOriginX = 1217, - CSSPropertyWebkitTransformOriginY = 1218, - CSSPropertyWebkitTransformOriginZ = 1219, - CSSPropertyWebkitTransformStyle = 1220, - CSSPropertyWebkitTransition = 1221, - CSSPropertyWebkitTransitionDelay = 1222, - CSSPropertyWebkitTransitionDuration = 1223, - CSSPropertyWebkitTransitionProperty = 1224, - CSSPropertyWebkitTransitionTimingFunction = 1225, - CSSPropertyWebkitUserDrag = 1226, - CSSPropertyWebkitUserModify = 1227, - CSSPropertyWebkitUserSelect = 1228, - CSSPropertyWebkitVariableDeclarationBlock = 1229, - CSSPropertyClipPath = 1230, - CSSPropertyClipRule = 1231, - CSSPropertyMask = 1232, - CSSPropertyEnableBackground = 1233, - CSSPropertyFilter = 1234, - CSSPropertyFloodColor = 1235, - CSSPropertyFloodOpacity = 1236, - CSSPropertyLightingColor = 1237, - CSSPropertyStopColor = 1238, - CSSPropertyStopOpacity = 1239, - CSSPropertyColorInterpolation = 1240, - CSSPropertyColorInterpolationFilters = 1241, - CSSPropertyColorProfile = 1242, - CSSPropertyColorRendering = 1243, - CSSPropertyFill = 1244, - CSSPropertyFillOpacity = 1245, - CSSPropertyFillRule = 1246, - CSSPropertyImageRendering = 1247, - CSSPropertyMarker = 1248, - CSSPropertyMarkerEnd = 1249, - CSSPropertyMarkerMid = 1250, - CSSPropertyMarkerStart = 1251, - CSSPropertyShapeRendering = 1252, - CSSPropertyStroke = 1253, - CSSPropertyStrokeDasharray = 1254, - CSSPropertyStrokeDashoffset = 1255, - CSSPropertyStrokeLinecap = 1256, - CSSPropertyStrokeLinejoin = 1257, - CSSPropertyStrokeMiterlimit = 1258, - CSSPropertyStrokeOpacity = 1259, - CSSPropertyStrokeWidth = 1260, - CSSPropertyTextRendering = 1261, - CSSPropertyAlignmentBaseline = 1262, - CSSPropertyBaselineShift = 1263, - CSSPropertyDominantBaseline = 1264, - CSSPropertyGlyphOrientationHorizontal = 1265, - CSSPropertyGlyphOrientationVertical = 1266, - CSSPropertyKerning = 1267, - CSSPropertyTextAnchor = 1268, - CSSPropertyWritingMode = 1269, + CSSPropertyBackgroundClip = 1003, + CSSPropertyBackgroundColor = 1004, + CSSPropertyBackgroundImage = 1005, + CSSPropertyBackgroundOrigin = 1006, + CSSPropertyBackgroundPosition = 1007, + CSSPropertyBackgroundPositionX = 1008, + CSSPropertyBackgroundPositionY = 1009, + CSSPropertyBackgroundRepeat = 1010, + CSSPropertyBorder = 1011, + CSSPropertyBorderBottom = 1012, + CSSPropertyBorderBottomColor = 1013, + CSSPropertyBorderBottomStyle = 1014, + CSSPropertyBorderBottomWidth = 1015, + CSSPropertyBorderCollapse = 1016, + CSSPropertyBorderColor = 1017, + CSSPropertyBorderLeft = 1018, + CSSPropertyBorderLeftColor = 1019, + CSSPropertyBorderLeftStyle = 1020, + CSSPropertyBorderLeftWidth = 1021, + CSSPropertyBorderRight = 1022, + CSSPropertyBorderRightColor = 1023, + CSSPropertyBorderRightStyle = 1024, + CSSPropertyBorderRightWidth = 1025, + CSSPropertyBorderSpacing = 1026, + CSSPropertyBorderStyle = 1027, + CSSPropertyBorderTop = 1028, + CSSPropertyBorderTopColor = 1029, + CSSPropertyBorderTopStyle = 1030, + CSSPropertyBorderTopWidth = 1031, + CSSPropertyBorderWidth = 1032, + CSSPropertyBottom = 1033, + CSSPropertyBoxShadow = 1034, + CSSPropertyCaptionSide = 1035, + CSSPropertyClear = 1036, + CSSPropertyClip = 1037, + CSSPropertyColor = 1038, + CSSPropertyContent = 1039, + CSSPropertyCounterIncrement = 1040, + CSSPropertyCounterReset = 1041, + CSSPropertyCursor = 1042, + CSSPropertyDirection = 1043, + CSSPropertyDisplay = 1044, + CSSPropertyEmptyCells = 1045, + CSSPropertyFloat = 1046, + CSSPropertyFont = 1047, + CSSPropertyFontFamily = 1048, + CSSPropertyFontSize = 1049, + CSSPropertyFontStretch = 1050, + CSSPropertyFontStyle = 1051, + CSSPropertyFontVariant = 1052, + CSSPropertyFontWeight = 1053, + CSSPropertyHeight = 1054, + CSSPropertyLeft = 1055, + CSSPropertyLetterSpacing = 1056, + CSSPropertyLineHeight = 1057, + CSSPropertyListStyle = 1058, + CSSPropertyListStyleImage = 1059, + CSSPropertyListStylePosition = 1060, + CSSPropertyListStyleType = 1061, + CSSPropertyMargin = 1062, + CSSPropertyMarginBottom = 1063, + CSSPropertyMarginLeft = 1064, + CSSPropertyMarginRight = 1065, + CSSPropertyMarginTop = 1066, + CSSPropertyMaxHeight = 1067, + CSSPropertyMaxWidth = 1068, + CSSPropertyMinHeight = 1069, + CSSPropertyMinWidth = 1070, + CSSPropertyOpacity = 1071, + CSSPropertyOrphans = 1072, + CSSPropertyOutline = 1073, + CSSPropertyOutlineColor = 1074, + CSSPropertyOutlineOffset = 1075, + CSSPropertyOutlineStyle = 1076, + CSSPropertyOutlineWidth = 1077, + CSSPropertyOverflow = 1078, + CSSPropertyOverflowX = 1079, + CSSPropertyOverflowY = 1080, + CSSPropertyPadding = 1081, + CSSPropertyPaddingBottom = 1082, + CSSPropertyPaddingLeft = 1083, + CSSPropertyPaddingRight = 1084, + CSSPropertyPaddingTop = 1085, + CSSPropertyPage = 1086, + CSSPropertyPageBreakAfter = 1087, + CSSPropertyPageBreakBefore = 1088, + CSSPropertyPageBreakInside = 1089, + CSSPropertyPointerEvents = 1090, + CSSPropertyPosition = 1091, + CSSPropertyQuotes = 1092, + CSSPropertyResize = 1093, + CSSPropertyRight = 1094, + CSSPropertySize = 1095, + CSSPropertySrc = 1096, + CSSPropertyTableLayout = 1097, + CSSPropertyTextAlign = 1098, + CSSPropertyTextDecoration = 1099, + CSSPropertyTextIndent = 1100, + CSSPropertyTextLineThrough = 1101, + CSSPropertyTextLineThroughColor = 1102, + CSSPropertyTextLineThroughMode = 1103, + CSSPropertyTextLineThroughStyle = 1104, + CSSPropertyTextLineThroughWidth = 1105, + CSSPropertyTextOverflow = 1106, + CSSPropertyTextOverline = 1107, + CSSPropertyTextOverlineColor = 1108, + CSSPropertyTextOverlineMode = 1109, + CSSPropertyTextOverlineStyle = 1110, + CSSPropertyTextOverlineWidth = 1111, + CSSPropertyTextShadow = 1112, + CSSPropertyTextTransform = 1113, + CSSPropertyTextUnderline = 1114, + CSSPropertyTextUnderlineColor = 1115, + CSSPropertyTextUnderlineMode = 1116, + CSSPropertyTextUnderlineStyle = 1117, + CSSPropertyTextUnderlineWidth = 1118, + CSSPropertyTop = 1119, + CSSPropertyUnicodeBidi = 1120, + CSSPropertyUnicodeRange = 1121, + CSSPropertyVerticalAlign = 1122, + CSSPropertyVisibility = 1123, + CSSPropertyWhiteSpace = 1124, + CSSPropertyWidows = 1125, + CSSPropertyWidth = 1126, + CSSPropertyWordBreak = 1127, + CSSPropertyWordSpacing = 1128, + CSSPropertyWordWrap = 1129, + CSSPropertyZIndex = 1130, + CSSPropertyZoom = 1131, + CSSPropertyWebkitAnimation = 1132, + CSSPropertyWebkitAnimationDelay = 1133, + CSSPropertyWebkitAnimationDirection = 1134, + CSSPropertyWebkitAnimationDuration = 1135, + CSSPropertyWebkitAnimationIterationCount = 1136, + CSSPropertyWebkitAnimationName = 1137, + CSSPropertyWebkitAnimationTimingFunction = 1138, + CSSPropertyWebkitAppearance = 1139, + CSSPropertyWebkitBackfaceVisibility = 1140, + CSSPropertyWebkitBackgroundClip = 1141, + CSSPropertyWebkitBackgroundComposite = 1142, + CSSPropertyWebkitBackgroundOrigin = 1143, + CSSPropertyWebkitBackgroundSize = 1144, + CSSPropertyWebkitBinding = 1145, + CSSPropertyWebkitBorderBottomLeftRadius = 1146, + CSSPropertyWebkitBorderBottomRightRadius = 1147, + CSSPropertyWebkitBorderFit = 1148, + CSSPropertyWebkitBorderHorizontalSpacing = 1149, + CSSPropertyWebkitBorderImage = 1150, + CSSPropertyWebkitBorderRadius = 1151, + CSSPropertyWebkitBorderTopLeftRadius = 1152, + CSSPropertyWebkitBorderTopRightRadius = 1153, + CSSPropertyWebkitBorderVerticalSpacing = 1154, + CSSPropertyWebkitBoxAlign = 1155, + CSSPropertyWebkitBoxDirection = 1156, + CSSPropertyWebkitBoxFlex = 1157, + CSSPropertyWebkitBoxFlexGroup = 1158, + CSSPropertyWebkitBoxLines = 1159, + CSSPropertyWebkitBoxOrdinalGroup = 1160, + CSSPropertyWebkitBoxOrient = 1161, + CSSPropertyWebkitBoxPack = 1162, + CSSPropertyWebkitBoxReflect = 1163, + CSSPropertyWebkitBoxSizing = 1164, + CSSPropertyWebkitColumnBreakAfter = 1165, + CSSPropertyWebkitColumnBreakBefore = 1166, + CSSPropertyWebkitColumnBreakInside = 1167, + CSSPropertyWebkitColumnCount = 1168, + CSSPropertyWebkitColumnGap = 1169, + CSSPropertyWebkitColumnRule = 1170, + CSSPropertyWebkitColumnRuleColor = 1171, + CSSPropertyWebkitColumnRuleStyle = 1172, + CSSPropertyWebkitColumnRuleWidth = 1173, + CSSPropertyWebkitColumnWidth = 1174, + CSSPropertyWebkitColumns = 1175, + CSSPropertyWebkitFontSizeDelta = 1176, + CSSPropertyWebkitHighlight = 1177, + CSSPropertyWebkitLineBreak = 1178, + CSSPropertyWebkitLineClamp = 1179, + CSSPropertyWebkitMarginBottomCollapse = 1180, + CSSPropertyWebkitMarginCollapse = 1181, + CSSPropertyWebkitMarginStart = 1182, + CSSPropertyWebkitMarginTopCollapse = 1183, + CSSPropertyWebkitMarquee = 1184, + CSSPropertyWebkitMarqueeDirection = 1185, + CSSPropertyWebkitMarqueeIncrement = 1186, + CSSPropertyWebkitMarqueeRepetition = 1187, + CSSPropertyWebkitMarqueeSpeed = 1188, + CSSPropertyWebkitMarqueeStyle = 1189, + CSSPropertyWebkitMask = 1190, + CSSPropertyWebkitMaskAttachment = 1191, + CSSPropertyWebkitMaskBoxImage = 1192, + CSSPropertyWebkitMaskClip = 1193, + CSSPropertyWebkitMaskComposite = 1194, + CSSPropertyWebkitMaskImage = 1195, + CSSPropertyWebkitMaskOrigin = 1196, + CSSPropertyWebkitMaskPosition = 1197, + CSSPropertyWebkitMaskPositionX = 1198, + CSSPropertyWebkitMaskPositionY = 1199, + CSSPropertyWebkitMaskRepeat = 1200, + CSSPropertyWebkitMaskSize = 1201, + CSSPropertyWebkitMatchNearestMailBlockquoteColor = 1202, + CSSPropertyWebkitNbspMode = 1203, + CSSPropertyWebkitPaddingStart = 1204, + CSSPropertyWebkitPerspective = 1205, + CSSPropertyWebkitPerspectiveOrigin = 1206, + CSSPropertyWebkitPerspectiveOriginX = 1207, + CSSPropertyWebkitPerspectiveOriginY = 1208, + CSSPropertyWebkitRtlOrdering = 1209, + CSSPropertyWebkitTextDecorationsInEffect = 1210, + CSSPropertyWebkitTextFillColor = 1211, + CSSPropertyWebkitTextSecurity = 1212, + CSSPropertyWebkitTextSizeAdjust = 1213, + CSSPropertyWebkitTextStroke = 1214, + CSSPropertyWebkitTextStrokeColor = 1215, + CSSPropertyWebkitTextStrokeWidth = 1216, + CSSPropertyWebkitTransform = 1217, + CSSPropertyWebkitTransformOrigin = 1218, + CSSPropertyWebkitTransformOriginX = 1219, + CSSPropertyWebkitTransformOriginY = 1220, + CSSPropertyWebkitTransformOriginZ = 1221, + CSSPropertyWebkitTransformStyle = 1222, + CSSPropertyWebkitTransition = 1223, + CSSPropertyWebkitTransitionDelay = 1224, + CSSPropertyWebkitTransitionDuration = 1225, + CSSPropertyWebkitTransitionProperty = 1226, + CSSPropertyWebkitTransitionTimingFunction = 1227, + CSSPropertyWebkitUserDrag = 1228, + CSSPropertyWebkitUserModify = 1229, + CSSPropertyWebkitUserSelect = 1230, + CSSPropertyWebkitVariableDeclarationBlock = 1231, + CSSPropertyClipPath = 1232, + CSSPropertyClipRule = 1233, + CSSPropertyMask = 1234, + CSSPropertyEnableBackground = 1235, + CSSPropertyFilter = 1236, + CSSPropertyFloodColor = 1237, + CSSPropertyFloodOpacity = 1238, + CSSPropertyLightingColor = 1239, + CSSPropertyStopColor = 1240, + CSSPropertyStopOpacity = 1241, + CSSPropertyColorInterpolation = 1242, + CSSPropertyColorInterpolationFilters = 1243, + CSSPropertyColorProfile = 1244, + CSSPropertyColorRendering = 1245, + CSSPropertyFill = 1246, + CSSPropertyFillOpacity = 1247, + CSSPropertyFillRule = 1248, + CSSPropertyImageRendering = 1249, + CSSPropertyMarker = 1250, + CSSPropertyMarkerEnd = 1251, + CSSPropertyMarkerMid = 1252, + CSSPropertyMarkerStart = 1253, + CSSPropertyShapeRendering = 1254, + CSSPropertyStroke = 1255, + CSSPropertyStrokeDasharray = 1256, + CSSPropertyStrokeDashoffset = 1257, + CSSPropertyStrokeLinecap = 1258, + CSSPropertyStrokeLinejoin = 1259, + CSSPropertyStrokeMiterlimit = 1260, + CSSPropertyStrokeOpacity = 1261, + CSSPropertyStrokeWidth = 1262, + CSSPropertyTextRendering = 1263, + CSSPropertyAlignmentBaseline = 1264, + CSSPropertyBaselineShift = 1265, + CSSPropertyDominantBaseline = 1266, + CSSPropertyGlyphOrientationHorizontal = 1267, + CSSPropertyGlyphOrientationVertical = 1268, + CSSPropertyKerning = 1269, + CSSPropertyTextAnchor = 1270, + CSSPropertyWritingMode = 1271, }; const int firstCSSProperty = 1001; -const int numCSSProperties = 269; +const int numCSSProperties = 271; const size_t maxCSSPropertyNameLength = 43; const char* getPropertyName(CSSPropertyID); diff --git a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c index 6362110c31..44df1ce458 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c +++ b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c @@ -38,7 +38,7 @@ struct css_value { const char* name; int id; }; -/* maximum key range = 8752, duplicates = 0 */ +/* maximum key range = 7172, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -52,32 +52,32 @@ hash_val (register const char *str, register unsigned int len) { static const unsigned short asso_values[] = { - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 970, 27, 8752, 8752, 0, - 55, 5, 50, 40, 35, 30, 25, 20, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 5, 200, 15, - 590, 0, 515, 251, 21, 35, 1, 905, 10, 20, - 30, 10, 45, 651, 160, 5, 80, 145, 960, 136, - 920, 971, 105, 0, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, 8752, - 8752, 8752, 8752, 8752, 8752, 8752, 8752 + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 500, 17, 7172, 7172, 0, + 55, 5, 50, 40, 35, 30, 25, 20, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 5, 245, 15, + 200, 0, 695, 401, 825, 35, 136, 86, 10, 20, + 30, 10, 45, 127, 370, 5, 80, 450, 1, 456, + 936, 1021, 95, 0, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, 7172, + 7172, 7172, 7172, 7172, 7172, 7172, 7172 }; register int hval = 0; @@ -191,11 +191,11 @@ findValue (register const char *str, register unsigned int len) { enum { - TOTAL_KEYWORDS = 539, + TOTAL_KEYWORDS = 540, MIN_WORD_LENGTH = 2, MAX_WORD_LENGTH = 31, MIN_HASH_VALUE = 0, - MAX_HASH_VALUE = 8751 + MAX_HASH_VALUE = 7171 }; static const struct css_value wordlist_value[] = @@ -204,52 +204,46 @@ findValue (register const char *str, register unsigned int len) {"100", CSSValue100}, #line 42 "CSSValueKeywords.gperf" {"300", CSSValue300}, -#line 287 "CSSValueKeywords.gperf" +#line 288 "CSSValueKeywords.gperf" {"end", CSSValueEnd}, -#line 547 "CSSValueKeywords.gperf" +#line 548 "CSSValueKeywords.gperf" {"lr", CSSValueLr}, #line 48 "CSSValueKeywords.gperf" {"900", CSSValue900}, -#line 256 "CSSValueKeywords.gperf" - {"hide", CSSValueHide}, +#line 146 "CSSValueKeywords.gperf" + {"sub", CSSValueSub}, #line 47 "CSSValueKeywords.gperf" {"800", CSSValue800}, -#line 371 "CSSValueKeywords.gperf" - {"lines", CSSValueLines}, #line 46 "CSSValueKeywords.gperf" {"700", CSSValue700}, #line 45 "CSSValueKeywords.gperf" {"600", CSSValue600}, -#line 209 "CSSValueKeywords.gperf" - {"alias", CSSValueAlias}, #line 44 "CSSValueKeywords.gperf" {"500", CSSValue500}, -#line 81 "CSSValueKeywords.gperf" - {"lime", CSSValueLime}, #line 34 "CSSValueKeywords.gperf" {"all", CSSValueAll}, -#line 164 "CSSValueKeywords.gperf" - {"circle", CSSValueCircle}, #line 43 "CSSValueKeywords.gperf" {"400", CSSValue400}, -#line 465 "CSSValueKeywords.gperf" - {"linen", CSSValueLinen}, #line 41 "CSSValueKeywords.gperf" {"200", CSSValue200}, -#line 481 "CSSValueKeywords.gperf" +#line 482 "CSSValueKeywords.gperf" {"oldlace", CSSValueOldlace}, +#line 71 "CSSValueKeywords.gperf" + {"cursive", CSSValueCursive}, +#line 242 "CSSValueKeywords.gperf" + {"above", CSSValueAbove}, #line 252 "CSSValueKeywords.gperf" {"cross", CSSValueCross}, -#line 402 "CSSValueKeywords.gperf" +#line 403 "CSSValueKeywords.gperf" {"coral", CSSValueCoral}, -#line 312 "CSSValueKeywords.gperf" - {"clip", CSSValueClip}, #line 13 "CSSValueKeywords.gperf" {"none", CSSValueNone}, -#line 405 "CSSValueKeywords.gperf" - {"crimson", CSSValueCrimson}, -#line 549 "CSSValueKeywords.gperf" +#line 494 "CSSValueKeywords.gperf" + {"plum", CSSValuePlum}, +#line 550 "CSSValueKeywords.gperf" {"tb", CSSValueTb}, +#line 86 "CSSValueKeywords.gperf" + {"purple", CSSValuePurple}, #line 251 "CSSValueKeywords.gperf" {"crop", CSSValueCrop}, #line 36 "CSSValueKeywords.gperf" @@ -258,1022 +252,1030 @@ findValue (register const char *str, register unsigned int len) {"inline", CSSValueInline}, #line 176 "CSSValueKeywords.gperf" {"armenian", CSSValueArmenian}, -#line 369 "CSSValueKeywords.gperf" - {"logical", CSSValueLogical}, #line 241 "CSSValueKeywords.gperf" {"collapse", CSSValueCollapse}, -#line 282 "CSSValueKeywords.gperf" - {"thin", CSSValueThin}, #line 73 "CSSValueKeywords.gperf" {"monospace", CSSValueMonospace}, -#line 235 "CSSValueKeywords.gperf" - {"ltr", CSSValueLtr}, -#line 313 "CSSValueKeywords.gperf" - {"ellipsis", CSSValueEllipsis}, -#line 12 "CSSValueKeywords.gperf" - {"initial", CSSValueInitial}, #line 215 "CSSValueKeywords.gperf" {"e-resize", CSSValueEResize}, -#line 548 "CSSValueKeywords.gperf" - {"rl", CSSValueRl}, +#line 372 "CSSValueKeywords.gperf" + {"lines", CSSValueLines}, #line 221 "CSSValueKeywords.gperf" {"s-resize", CSSValueSResize}, -#line 377 "CSSValueKeywords.gperf" - {"linear", CSSValueLinear}, -#line 507 "CSSValueKeywords.gperf" - {"snow", CSSValueSnow}, -#line 205 "CSSValueKeywords.gperf" - {"move", CSSValueMove}, -#line 15 "CSSValueKeywords.gperf" - {"inset", CSSValueInset}, -#line 300 "CSSValueKeywords.gperf" - {"slow", CSSValueSlow}, +#line 314 "CSSValueKeywords.gperf" + {"ellipsis", CSSValueEllipsis}, +#line 84 "CSSValueKeywords.gperf" + {"olive", CSSValueOlive}, +#line 209 "CSSValueKeywords.gperf" + {"alias", CSSValueAlias}, +#line 81 "CSSValueKeywords.gperf" + {"lime", CSSValueLime}, +#line 164 "CSSValueKeywords.gperf" + {"circle", CSSValueCircle}, +#line 466 "CSSValueKeywords.gperf" + {"linen", CSSValueLinen}, #line 218 "CSSValueKeywords.gperf" {"n-resize", CSSValueNResize}, -#line 511 "CSSValueKeywords.gperf" - {"thistle", CSSValueThistle}, -#line 457 "CSSValueKeywords.gperf" - {"lightsalmon", CSSValueLightsalmon}, -#line 401 "CSSValueKeywords.gperf" +#line 15 "CSSValueKeywords.gperf" + {"inset", CSSValueInset}, +#line 295 "CSSValueKeywords.gperf" + {"multiple", CSSValueMultiple}, +#line 402 "CSSValueKeywords.gperf" {"chocolate", CSSValueChocolate}, -#line 279 "CSSValueKeywords.gperf" - {"show", CSSValueShow}, -#line 257 "CSSValueKeywords.gperf" - {"higher", CSSValueHigher}, -#line 522 "CSSValueKeywords.gperf" - {"srgb", CSSValueSrgb}, +#line 313 "CSSValueKeywords.gperf" + {"clip", CSSValueClip}, +#line 406 "CSSValueKeywords.gperf" + {"crimson", CSSValueCrimson}, +#line 405 "CSSValueKeywords.gperf" + {"cornsilk", CSSValueCornsilk}, #line 187 "CSSValueKeywords.gperf" {"compact", CSSValueCompact}, -#line 309 "CSSValueKeywords.gperf" - {"ignore", CSSValueIgnore}, -#line 512 "CSSValueKeywords.gperf" +#line 278 "CSSValueKeywords.gperf" + {"scroll", CSSValueScroll}, +#line 253 "CSSValueKeywords.gperf" + {"embed", CSSValueEmbed}, +#line 513 "CSSValueKeywords.gperf" {"tomato", CSSValueTomato}, -#line 90 "CSSValueKeywords.gperf" - {"white", CSSValueWhite}, +#line 150 "CSSValueKeywords.gperf" + {"top", CSSValueTop}, +#line 263 "CSSValueKeywords.gperf" + {"loud", CSSValueLoud}, +#line 366 "CSSValueKeywords.gperf" + {"content", CSSValueContent}, +#line 77 "CSSValueKeywords.gperf" + {"blue", CSSValueBlue}, +#line 262 "CSSValueKeywords.gperf" + {"local", CSSValueLocal}, +#line 515 "CSSValueKeywords.gperf" + {"violet", CSSValueViolet}, +#line 493 "CSSValueKeywords.gperf" + {"pink", CSSValuePink}, +#line 283 "CSSValueKeywords.gperf" + {"thin", CSSValueThin}, #line 51 "CSSValueKeywords.gperf" {"small", CSSValueSmall}, -#line 364 "CSSValueKeywords.gperf" - {"content", CSSValueContent}, -#line 285 "CSSValueKeywords.gperf" - {"stretch", CSSValueStretch}, +#line 21 "CSSValueKeywords.gperf" + {"solid", CSSValueSolid}, +#line 24 "CSSValueKeywords.gperf" + {"icon", CSSValueIcon}, +#line 12 "CSSValueKeywords.gperf" + {"initial", CSSValueInitial}, #line 82 "CSSValueKeywords.gperf" {"maroon", CSSValueMaroon}, -#line 293 "CSSValueKeywords.gperf" - {"single", CSSValueSingle}, -#line 376 "CSSValueKeywords.gperf" +#line 377 "CSSValueKeywords.gperf" {"ease", CSSValueEase}, -#line 155 "CSSValueKeywords.gperf" - {"right", CSSValueRight}, -#line 498 "CSSValueKeywords.gperf" +#line 499 "CSSValueKeywords.gperf" {"salmon", CSSValueSalmon}, -#line 510 "CSSValueKeywords.gperf" +#line 511 "CSSValueKeywords.gperf" {"tan", CSSValueTan}, -#line 546 "CSSValueKeywords.gperf" - {"tb-rl", CSSValueTbRl}, -#line 39 "CSSValueKeywords.gperf" - {"lighter", CSSValueLighter}, -#line 202 "CSSValueKeywords.gperf" - {"crosshair", CSSValueCrosshair}, -#line 59 "CSSValueKeywords.gperf" - {"wider", CSSValueWider}, -#line 353 "CSSValueKeywords.gperf" +#line 354 "CSSValueKeywords.gperf" {"caret", CSSValueCaret}, +#line 512 "CSSValueKeywords.gperf" + {"thistle", CSSValueThistle}, #line 189 "CSSValueKeywords.gperf" {"table", CSSValueTable}, -#line 332 "CSSValueKeywords.gperf" - {"listitem", CSSValueListitem}, -#line 477 "CSSValueKeywords.gperf" - {"mintcream", CSSValueMintcream}, -#line 222 "CSSValueKeywords.gperf" - {"w-resize", CSSValueWResize}, -#line 544 "CSSValueKeywords.gperf" +#line 282 "CSSValueKeywords.gperf" + {"thick", CSSValueThick}, +#line 480 "CSSValueKeywords.gperf" + {"moccasin", CSSValueMoccasin}, +#line 545 "CSSValueKeywords.gperf" {"lr-tb", CSSValueLrTb}, -#line 179 "CSSValueKeywords.gperf" - {"hiragana", CSSValueHiragana}, -#line 236 "CSSValueKeywords.gperf" - {"rtl", CSSValueRtl}, -#line 529 "CSSValueKeywords.gperf" - {"miter", CSSValueMiter}, -#line 450 "CSSValueKeywords.gperf" - {"lightcoral", CSSValueLightcoral}, -#line 442 "CSSValueKeywords.gperf" - {"indigo", CSSValueIndigo}, -#line 243 "CSSValueKeywords.gperf" - {"absolute", CSSValueAbsolute}, -#line 289 "CSSValueKeywords.gperf" - {"horizontal", CSSValueHorizontal}, -#line 406 "CSSValueKeywords.gperf" +#line 162 "CSSValueKeywords.gperf" + {"inside", CSSValueInside}, +#line 304 "CSSValueKeywords.gperf" + {"slide", CSSValueSlide}, +#line 145 "CSSValueKeywords.gperf" + {"middle", CSSValueMiddle}, +#line 393 "CSSValueKeywords.gperf" + {"azure", CSSValueAzure}, +#line 75 "CSSValueKeywords.gperf" + {"aqua", CSSValueAqua}, +#line 407 "CSSValueKeywords.gperf" {"cyan", CSSValueCyan}, +#line 549 "CSSValueKeywords.gperf" + {"rl", CSSValueRl}, +#line 323 "CSSValueKeywords.gperf" + {"space", CSSValueSpace}, +#line 397 "CSSValueKeywords.gperf" + {"blueviolet", CSSValueBlueviolet}, +#line 184 "CSSValueKeywords.gperf" + {"block", CSSValueBlock}, +#line 163 "CSSValueKeywords.gperf" + {"disc", CSSValueDisc}, +#line 333 "CSSValueKeywords.gperf" + {"listitem", CSSValueListitem}, +#line 16 "CSSValueKeywords.gperf" + {"groove", CSSValueGroove}, +#line 235 "CSSValueKeywords.gperf" + {"ltr", CSSValueLtr}, +#line 201 "CSSValueKeywords.gperf" + {"auto", CSSValueAuto}, +#line 445 "CSSValueKeywords.gperf" + {"khaki", CSSValueKhaki}, +#line 443 "CSSValueKeywords.gperf" + {"indigo", CSSValueIndigo}, +#line 547 "CSSValueKeywords.gperf" + {"tb-rl", CSSValueTbRl}, +#line 374 "CSSValueKeywords.gperf" + {"paused", CSSValuePaused}, +#line 22 "CSSValueKeywords.gperf" + {"double", CSSValueDouble}, +#line 147 "CSSValueKeywords.gperf" + {"super", CSSValueSuper}, +#line 63 "CSSValueKeywords.gperf" + {"condensed", CSSValueCondensed}, +#line 240 "CSSValueKeywords.gperf" + {"visible", CSSValueVisible}, +#line 37 "CSSValueKeywords.gperf" + {"bold", CSSValueBold}, +#line 508 "CSSValueKeywords.gperf" + {"snow", CSSValueSnow}, +#line 248 "CSSValueKeywords.gperf" + {"blink", CSSValueBlink}, +#line 205 "CSSValueKeywords.gperf" + {"move", CSSValueMove}, +#line 301 "CSSValueKeywords.gperf" + {"slow", CSSValueSlow}, +#line 378 "CSSValueKeywords.gperf" + {"linear", CSSValueLinear}, +#line 88 "CSSValueKeywords.gperf" + {"silver", CSSValueSilver}, +#line 259 "CSSValueKeywords.gperf" + {"landscape", CSSValueLandscape}, +#line 280 "CSSValueKeywords.gperf" + {"show", CSSValueShow}, +#line 23 "CSSValueKeywords.gperf" + {"caption", CSSValueCaption}, +#line 18 "CSSValueKeywords.gperf" + {"outset", CSSValueOutset}, +#line 389 "CSSValueKeywords.gperf" + {"stroke", CSSValueStroke}, +#line 519 "CSSValueKeywords.gperf" + {"nonzero", CSSValueNonzero}, +#line 294 "CSSValueKeywords.gperf" + {"single", CSSValueSingle}, #line 11 "CSSValueKeywords.gperf" {"inherit", CSSValueInherit}, -#line 466 "CSSValueKeywords.gperf" - {"magenta", CSSValueMagenta}, -#line 518 "CSSValueKeywords.gperf" - {"nonzero", CSSValueNonzero}, -#line 204 "CSSValueKeywords.gperf" - {"pointer", CSSValuePointer}, -#line 283 "CSSValueKeywords.gperf" - {"underline", CSSValueUnderline}, +#line 299 "CSSValueKeywords.gperf" + {"up", CSSValueUp}, #line 130 "CSSValueKeywords.gperf" {"no-repeat", CSSValueNoRepeat}, -#line 389 "CSSValueKeywords.gperf" - {"aliceblue", CSSValueAliceblue}, -#line 112 "CSSValueKeywords.gperf" - {"match", CSSValueMatch}, -#line 325 "CSSValueKeywords.gperf" +#line 76 "CSSValueKeywords.gperf" + {"black", CSSValueBlack}, +#line 222 "CSSValueKeywords.gperf" + {"w-resize", CSSValueWResize}, +#line 420 "CSSValueKeywords.gperf" + {"darksalmon", CSSValueDarksalmon}, +#line 303 "CSSValueKeywords.gperf" + {"infinite", CSSValueInfinite}, +#line 224 "CSSValueKeywords.gperf" + {"ns-resize", CSSValueNsResize}, +#line 108 "CSSValueKeywords.gperf" + {"inactivecaption", CSSValueInactivecaption}, +#line 144 "CSSValueKeywords.gperf" + {"baseline", CSSValueBaseline}, +#line 363 "CSSValueKeywords.gperf" + {"round", CSSValueRound}, +#line 237 "CSSValueKeywords.gperf" + {"capitalize", CSSValueCapitalize}, +#line 243 "CSSValueKeywords.gperf" + {"absolute", CSSValueAbsolute}, +#line 478 "CSSValueKeywords.gperf" + {"mintcream", CSSValueMintcream}, +#line 33 "CSSValueKeywords.gperf" + {"oblique", CSSValueOblique}, +#line 326 "CSSValueKeywords.gperf" {"radio", CSSValueRadio}, -#line 249 "CSSValueKeywords.gperf" - {"both", CSSValueBoth}, -#line 17 "CSSValueKeywords.gperf" - {"ridge", CSSValueRidge}, +#line 53 "CSSValueKeywords.gperf" + {"large", CSSValueLarge}, +#line 273 "CSSValueKeywords.gperf" + {"portrait", CSSValuePortrait}, +#line 437 "CSSValueKeywords.gperf" + {"gold", CSSValueGold}, #line 57 "CSSValueKeywords.gperf" {"smaller", CSSValueSmaller}, -#line 397 "CSSValueKeywords.gperf" +#line 426 "CSSValueKeywords.gperf" + {"darkviolet", CSSValueDarkviolet}, +#line 371 "CSSValueKeywords.gperf" + {"visual", CSSValueVisual}, +#line 442 "CSSValueKeywords.gperf" + {"indianred", CSSValueIndianred}, +#line 85 "CSSValueKeywords.gperf" + {"orange", CSSValueOrange}, +#line 161 "CSSValueKeywords.gperf" + {"outside", CSSValueOutside}, +#line 204 "CSSValueKeywords.gperf" + {"pointer", CSSValuePointer}, +#line 90 "CSSValueKeywords.gperf" + {"white", CSSValueWhite}, +#line 514 "CSSValueKeywords.gperf" + {"turquoise", CSSValueTurquoise}, +#line 211 "CSSValueKeywords.gperf" + {"no-drop", CSSValueNoDrop}, +#line 546 "CSSValueKeywords.gperf" + {"rl-tb", CSSValueRlTb}, +#line 387 "CSSValueKeywords.gperf" + {"painted", CSSValuePainted}, +#line 207 "CSSValueKeywords.gperf" + {"cell", CSSValueCell}, +#line 245 "CSSValueKeywords.gperf" + {"avoid", CSSValueAvoid}, +#line 274 "CSSValueKeywords.gperf" + {"pre", CSSValuePre}, +#line 165 "CSSValueKeywords.gperf" + {"square", CSSValueSquare}, +#line 529 "CSSValueKeywords.gperf" + {"butt", CSSValueButt}, +#line 398 "CSSValueKeywords.gperf" {"brown", CSSValueBrown}, -#line 230 "CSSValueKeywords.gperf" - {"wait", CSSValueWait}, -#line 258 "CSSValueKeywords.gperf" - {"invert", CSSValueInvert}, -#line 542 "CSSValueKeywords.gperf" - {"no-change", CSSValueNoChange}, #line 32 "CSSValueKeywords.gperf" {"italic", CSSValueItalic}, -#line 224 "CSSValueKeywords.gperf" - {"ns-resize", CSSValueNsResize}, -#line 304 "CSSValueKeywords.gperf" - {"alternate", CSSValueAlternate}, -#line 272 "CSSValueKeywords.gperf" - {"portrait", CSSValuePortrait}, -#line 105 "CSSValueKeywords.gperf" - {"highlight", CSSValueHighlight}, -#line 53 "CSSValueKeywords.gperf" - {"large", CSSValueLarge}, -#line 310 "CSSValueKeywords.gperf" - {"intrinsic", CSSValueIntrinsic}, -#line 317 "CSSValueKeywords.gperf" - {"wave", CSSValueWave}, -#line 503 "CSSValueKeywords.gperf" +#line 527 "CSSValueKeywords.gperf" + {"crispedges", CSSValueCrispedges}, +#line 504 "CSSValueKeywords.gperf" {"skyblue", CSSValueSkyblue}, -#line 302 "CSSValueKeywords.gperf" - {"infinite", CSSValueInfinite}, -#line 280 "CSSValueKeywords.gperf" +#line 329 "CSSValueKeywords.gperf" + {"button", CSSValueButton}, +#line 517 "CSSValueKeywords.gperf" + {"whitesmoke", CSSValueWhitesmoke}, +#line 281 "CSSValueKeywords.gperf" {"static", CSSValueStatic}, -#line 464 "CSSValueKeywords.gperf" - {"limegreen", CSSValueLimegreen}, -#line 545 "CSSValueKeywords.gperf" - {"rl-tb", CSSValueRlTb}, -#line 449 "CSSValueKeywords.gperf" - {"lightblue", CSSValueLightblue}, -#line 85 "CSSValueKeywords.gperf" - {"orange", CSSValueOrange}, +#line 236 "CSSValueKeywords.gperf" + {"rtl", CSSValueRtl}, +#line 392 "CSSValueKeywords.gperf" + {"aquamarine", CSSValueAquamarine}, +#line 309 "CSSValueKeywords.gperf" + {"element", CSSValueElement}, +#line 291 "CSSValueKeywords.gperf" + {"vertical", CSSValueVertical}, #line 151 "CSSValueKeywords.gperf" {"bottom", CSSValueBottom}, +#line 114 "CSSValueKeywords.gperf" + {"scrollbar", CSSValueScrollbar}, +#line 388 "CSSValueKeywords.gperf" + {"fill", CSSValueFill}, +#line 364 "CSSValueKeywords.gperf" + {"border", CSSValueBorder}, +#line 35 "CSSValueKeywords.gperf" + {"small-caps", CSSValueSmallCaps}, #line 210 "CSSValueKeywords.gperf" {"progress", CSSValueProgress}, -#line 318 "CSSValueKeywords.gperf" - {"continuous", CSSValueContinuous}, -#line 387 "CSSValueKeywords.gperf" - {"fill", CSSValueFill}, -#line 144 "CSSValueKeywords.gperf" - {"baseline", CSSValueBaseline}, -#line 540 "CSSValueKeywords.gperf" - {"mathematical", CSSValueMathematical}, -#line 207 "CSSValueKeywords.gperf" - {"cell", CSSValueCell}, -#line 273 "CSSValueKeywords.gperf" - {"pre", CSSValuePre}, -#line 454 "CSSValueKeywords.gperf" - {"lightgreen", CSSValueLightgreen}, -#line 462 "CSSValueKeywords.gperf" - {"lightsteelblue", CSSValueLightsteelblue}, -#line 458 "CSSValueKeywords.gperf" - {"lightseagreen", CSSValueLightseagreen}, -#line 502 "CSSValueKeywords.gperf" +#line 373 "CSSValueKeywords.gperf" + {"running", CSSValueRunning}, +#line 38 "CSSValueKeywords.gperf" + {"bolder", CSSValueBolder}, +#line 390 "CSSValueKeywords.gperf" + {"aliceblue", CSSValueAliceblue}, +#line 197 "CSSValueKeywords.gperf" + {"table-cell", CSSValueTableCell}, +#line 379 "CSSValueKeywords.gperf" + {"ease-in", CSSValueEaseIn}, +#line 92 "CSSValueKeywords.gperf" + {"transparent", CSSValueTransparent}, +#line 503 "CSSValueKeywords.gperf" {"sienna", CSSValueSienna}, -#line 286 "CSSValueKeywords.gperf" - {"start", CSSValueStart}, -#line 231 "CSSValueKeywords.gperf" - {"help", CSSValueHelp}, -#line 303 "CSSValueKeywords.gperf" - {"slide", CSSValueSlide}, -#line 145 "CSSValueKeywords.gperf" - {"middle", CSSValueMiddle}, +#line 384 "CSSValueKeywords.gperf" + {"visiblepainted", CSSValueVisiblepainted}, +#line 284 "CSSValueKeywords.gperf" + {"underline", CSSValueUnderline}, +#line 17 "CSSValueKeywords.gperf" + {"ridge", CSSValueRidge}, +#line 96 "CSSValueKeywords.gperf" + {"activecaption", CSSValueActivecaption}, +#line 180 "CSSValueKeywords.gperf" + {"katakana", CSSValueKatakana}, +#line 124 "CSSValueKeywords.gperf" + {"currentcolor", CSSValueCurrentcolor}, +#line 230 "CSSValueKeywords.gperf" + {"wait", CSSValueWait}, +#line 298 "CSSValueKeywords.gperf" + {"ahead", CSSValueAhead}, +#line 185 "CSSValueKeywords.gperf" + {"list-item", CSSValueListItem}, +#line 370 "CSSValueKeywords.gperf" + {"logical", CSSValueLogical}, +#line 186 "CSSValueKeywords.gperf" + {"run-in", CSSValueRunIn}, +#line 258 "CSSValueKeywords.gperf" + {"invert", CSSValueInvert}, +#line 368 "CSSValueKeywords.gperf" + {"padding", CSSValuePadding}, +#line 305 "CSSValueKeywords.gperf" + {"alternate", CSSValueAlternate}, +#line 256 "CSSValueKeywords.gperf" + {"hide", CSSValueHide}, +#line 59 "CSSValueKeywords.gperf" + {"wider", CSSValueWider}, +#line 232 "CSSValueKeywords.gperf" + {"all-scroll", CSSValueAllScroll}, +#line 190 "CSSValueKeywords.gperf" + {"inline-table", CSSValueInlineTable}, +#line 19 "CSSValueKeywords.gperf" + {"dotted", CSSValueDotted}, +#line 530 "CSSValueKeywords.gperf" + {"miter", CSSValueMiter}, +#line 465 "CSSValueKeywords.gperf" + {"limegreen", CSSValueLimegreen}, +#line 311 "CSSValueKeywords.gperf" + {"intrinsic", CSSValueIntrinsic}, +#line 141 "CSSValueKeywords.gperf" + {"xor", CSSValueXor}, +#line 483 "CSSValueKeywords.gperf" + {"olivedrab", CSSValueOlivedrab}, +#line 188 "CSSValueKeywords.gperf" + {"inline-block", CSSValueInlineBlock}, +#line 134 "CSSValueKeywords.gperf" + {"source-in", CSSValueSourceIn}, +#line 315 "CSSValueKeywords.gperf" + {"discard", CSSValueDiscard}, +#line 489 "CSSValueKeywords.gperf" + {"palevioletred", CSSValuePalevioletred}, +#line 27 "CSSValueKeywords.gperf" + {"small-caption", CSSValueSmallCaption}, +#line 525 "CSSValueKeywords.gperf" + {"optimizespeed", CSSValueOptimizespeed}, +#line 382 "CSSValueKeywords.gperf" + {"document", CSSValueDocument}, +#line 89 "CSSValueKeywords.gperf" + {"teal", CSSValueTeal}, #line 58 "CSSValueKeywords.gperf" {"larger", CSSValueLarger}, -#line 277 "CSSValueKeywords.gperf" - {"scroll", CSSValueScroll}, -#line 253 "CSSValueKeywords.gperf" - {"embed", CSSValueEmbed}, -#line 92 "CSSValueKeywords.gperf" - {"transparent", CSSValueTransparent}, -#line 14 "CSSValueKeywords.gperf" - {"hidden", CSSValueHidden}, -#line 399 "CSSValueKeywords.gperf" +#line 116 "CSSValueKeywords.gperf" + {"threedface", CSSValueThreedface}, +#line 395 "CSSValueKeywords.gperf" + {"bisque", CSSValueBisque}, +#line 375 "CSSValueKeywords.gperf" + {"flat", CSSValueFlat}, +#line 400 "CSSValueKeywords.gperf" {"cadetblue", CSSValueCadetblue}, -#line 480 "CSSValueKeywords.gperf" - {"navajowhite", CSSValueNavajowhite}, -#line 504 "CSSValueKeywords.gperf" +#line 505 "CSSValueKeywords.gperf" {"slateblue", CSSValueSlateblue}, -#line 308 "CSSValueKeywords.gperf" - {"element", CSSValueElement}, -#line 260 "CSSValueKeywords.gperf" - {"level", CSSValueLevel}, +#line 386 "CSSValueKeywords.gperf" + {"visiblestroke", CSSValueVisiblestroke}, #line 87 "CSSValueKeywords.gperf" {"red", CSSValueRed}, -#line 496 "CSSValueKeywords.gperf" - {"royalblue", CSSValueRoyalblue}, -#line 163 "CSSValueKeywords.gperf" - {"disc", CSSValueDisc}, -#line 435 "CSSValueKeywords.gperf" - {"ghostwhite", CSSValueGhostwhite}, -#line 25 "CSSValueKeywords.gperf" - {"menu", CSSValueMenu}, -#line 21 "CSSValueKeywords.gperf" - {"solid", CSSValueSolid}, -#line 24 "CSSValueKeywords.gperf" - {"icon", CSSValueIcon}, -#line 60 "CSSValueKeywords.gperf" - {"narrower", CSSValueNarrower}, -#line 486 "CSSValueKeywords.gperf" - {"palegreen", CSSValuePalegreen}, -#line 491 "CSSValueKeywords.gperf" - {"peru", CSSValuePeru}, +#line 198 "CSSValueKeywords.gperf" + {"table-caption", CSSValueTableCaption}, +#line 136 "CSSValueKeywords.gperf" + {"source-atop", CSSValueSourceAtop}, +#line 415 "CSSValueKeywords.gperf" + {"darkmagenta", CSSValueDarkmagenta}, +#line 50 "CSSValueKeywords.gperf" + {"x-small", CSSValueXSmall}, +#line 523 "CSSValueKeywords.gperf" + {"srgb", CSSValueSrgb}, +#line 227 "CSSValueKeywords.gperf" + {"col-resize", CSSValueColResize}, +#line 238 "CSSValueKeywords.gperf" + {"uppercase", CSSValueUppercase}, +#line 302 "CSSValueKeywords.gperf" + {"fast", CSSValueFast}, #line 131 "CSSValueKeywords.gperf" {"clear", CSSValueClear}, -#line 52 "CSSValueKeywords.gperf" - {"medium", CSSValueMedium}, -#line 479 "CSSValueKeywords.gperf" - {"moccasin", CSSValueMoccasin}, -#line 162 "CSSValueKeywords.gperf" - {"inside", CSSValueInside}, -#line 501 "CSSValueKeywords.gperf" - {"seashell", CSSValueSeashell}, -#line 515 "CSSValueKeywords.gperf" - {"wheat", CSSValueWheat}, -#line 150 "CSSValueKeywords.gperf" - {"top", CSSValueTop}, +#line 419 "CSSValueKeywords.gperf" + {"darkred", CSSValueDarkred}, +#line 487 "CSSValueKeywords.gperf" + {"palegreen", CSSValuePalegreen}, +#line 319 "CSSValueKeywords.gperf" + {"continuous", CSSValueContinuous}, +#line 80 "CSSValueKeywords.gperf" + {"green", CSSValueGreen}, +#line 290 "CSSValueKeywords.gperf" + {"horizontal", CSSValueHorizontal}, +#line 287 "CSSValueKeywords.gperf" + {"start", CSSValueStart}, +#line 318 "CSSValueKeywords.gperf" + {"wave", CSSValueWave}, +#line 166 "CSSValueKeywords.gperf" + {"decimal", CSSValueDecimal}, #line 156 "CSSValueKeywords.gperf" {"center", CSSValueCenter}, -#line 476 "CSSValueKeywords.gperf" - {"midnightblue", CSSValueMidnightblue}, -#line 534 "CSSValueKeywords.gperf" +#line 260 "CSSValueKeywords.gperf" + {"level", CSSValueLevel}, +#line 25 "CSSValueKeywords.gperf" + {"menu", CSSValueMenu}, +#line 266 "CSSValueKeywords.gperf" + {"mix", CSSValueMix}, +#line 535 "CSSValueKeywords.gperf" {"central", CSSValueCentral}, -#line 298 "CSSValueKeywords.gperf" - {"up", CSSValueUp}, -#line 523 "CSSValueKeywords.gperf" - {"linearrgb", CSSValueLinearrgb}, -#line 539 "CSSValueKeywords.gperf" - {"hanging", CSSValueHanging}, -#line 400 "CSSValueKeywords.gperf" - {"chartreuse", CSSValueChartreuse}, -#line 80 "CSSValueKeywords.gperf" - {"green", CSSValueGreen}, -#line 89 "CSSValueKeywords.gperf" - {"teal", CSSValueTeal}, -#line 245 "CSSValueKeywords.gperf" - {"avoid", CSSValueAvoid}, -#line 374 "CSSValueKeywords.gperf" - {"flat", CSSValueFlat}, -#line 345 "CSSValueKeywords.gperf" - {"menulist", CSSValueMenulist}, -#line 255 "CSSValueKeywords.gperf" - {"hand", CSSValueHand}, -#line 382 "CSSValueKeywords.gperf" - {"reset", CSSValueReset}, -#line 175 "CSSValueKeywords.gperf" - {"hebrew", CSSValueHebrew}, -#line 219 "CSSValueKeywords.gperf" - {"se-resize", CSSValueSeResize}, -#line 37 "CSSValueKeywords.gperf" - {"bold", CSSValueBold}, #line 154 "CSSValueKeywords.gperf" {"left", CSSValueLeft}, -#line 530 "CSSValueKeywords.gperf" - {"bevel", CSSValueBevel}, -#line 441 "CSSValueKeywords.gperf" - {"indianred", CSSValueIndianred}, -#line 434 "CSSValueKeywords.gperf" - {"gainsboro", CSSValueGainsboro}, -#line 322 "CSSValueKeywords.gperf" - {"space", CSSValueSpace}, -#line 301 "CSSValueKeywords.gperf" - {"fast", CSSValueFast}, -#line 33 "CSSValueKeywords.gperf" - {"oblique", CSSValueOblique}, +#line 14 "CSSValueKeywords.gperf" + {"hidden", CSSValueHidden}, +#line 492 "CSSValueKeywords.gperf" + {"peru", CSSValuePeru}, +#line 467 "CSSValueKeywords.gperf" + {"magenta", CSSValueMagenta}, +#line 277 "CSSValueKeywords.gperf" + {"relative", CSSValueRelative}, +#line 132 "CSSValueKeywords.gperf" + {"copy", CSSValueCopy}, +#line 300 "CSSValueKeywords.gperf" + {"down", CSSValueDown}, +#line 52 "CSSValueKeywords.gperf" + {"medium", CSSValueMedium}, +#line 219 "CSSValueKeywords.gperf" + {"se-resize", CSSValueSeResize}, +#line 383 "CSSValueKeywords.gperf" + {"reset", CSSValueReset}, +#line 497 "CSSValueKeywords.gperf" + {"royalblue", CSSValueRoyalblue}, +#line 408 "CSSValueKeywords.gperf" + {"darkblue", CSSValueDarkblue}, #line 216 "CSSValueKeywords.gperf" {"ne-resize", CSSValueNeResize}, -#line 259 "CSSValueKeywords.gperf" - {"landscape", CSSValueLandscape}, -#line 246 "CSSValueKeywords.gperf" - {"below", CSSValueBelow}, +#line 310 "CSSValueKeywords.gperf" + {"ignore", CSSValueIgnore}, +#line 97 "CSSValueKeywords.gperf" + {"appworkspace", CSSValueAppworkspace}, +#line 250 "CSSValueKeywords.gperf" + {"close-quote", CSSValueCloseQuote}, +#line 385 "CSSValueKeywords.gperf" + {"visiblefill", CSSValueVisiblefill}, +#line 484 "CSSValueKeywords.gperf" + {"orangered", CSSValueOrangered}, #line 120 "CSSValueKeywords.gperf" {"window", CSSValueWindow}, -#line 271 "CSSValueKeywords.gperf" - {"overline", CSSValueOverline}, -#line 436 "CSSValueKeywords.gperf" - {"gold", CSSValueGold}, -#line 211 "CSSValueKeywords.gperf" - {"no-drop", CSSValueNoDrop}, -#line 526 "CSSValueKeywords.gperf" - {"crispedges", CSSValueCrispedges}, -#line 386 "CSSValueKeywords.gperf" - {"painted", CSSValuePainted}, -#line 492 "CSSValueKeywords.gperf" - {"pink", CSSValuePink}, -#line 393 "CSSValueKeywords.gperf" - {"beige", CSSValueBeige}, -#line 141 "CSSValueKeywords.gperf" - {"xor", CSSValueXor}, -#line 288 "CSSValueKeywords.gperf" - {"reverse", CSSValueReverse}, -#line 146 "CSSValueKeywords.gperf" - {"sub", CSSValueSub}, -#line 84 "CSSValueKeywords.gperf" - {"olive", CSSValueOlive}, -#line 265 "CSSValueKeywords.gperf" - {"mix", CSSValueMix}, -#line 114 "CSSValueKeywords.gperf" - {"scrollbar", CSSValueScrollbar}, -#line 363 "CSSValueKeywords.gperf" - {"border", CSSValueBorder}, -#line 38 "CSSValueKeywords.gperf" - {"bolder", CSSValueBolder}, -#line 23 "CSSValueKeywords.gperf" - {"caption", CSSValueCaption}, -#line 242 "CSSValueKeywords.gperf" - {"above", CSSValueAbove}, -#line 432 "CSSValueKeywords.gperf" - {"floralwhite", CSSValueFloralwhite}, -#line 509 "CSSValueKeywords.gperf" - {"steelblue", CSSValueSteelblue}, -#line 538 "CSSValueKeywords.gperf" - {"alphabetic", CSSValueAlphabetic}, -#line 281 "CSSValueKeywords.gperf" - {"thick", CSSValueThick}, -#line 493 "CSSValueKeywords.gperf" - {"plum", CSSValuePlum}, -#line 404 "CSSValueKeywords.gperf" - {"cornsilk", CSSValueCornsilk}, -#line 86 "CSSValueKeywords.gperf" - {"purple", CSSValuePurple}, -#line 388 "CSSValueKeywords.gperf" - {"stroke", CSSValueStroke}, -#line 50 "CSSValueKeywords.gperf" - {"x-small", CSSValueXSmall}, -#line 69 "CSSValueKeywords.gperf" - {"serif", CSSValueSerif}, -#line 394 "CSSValueKeywords.gperf" - {"bisque", CSSValueBisque}, -#line 468 "CSSValueKeywords.gperf" - {"mediumblue", CSSValueMediumblue}, -#line 433 "CSSValueKeywords.gperf" - {"forestgreen", CSSValueForestgreen}, -#line 537 "CSSValueKeywords.gperf" - {"ideographic", CSSValueIdeographic}, -#line 514 "CSSValueKeywords.gperf" - {"violet", CSSValueViolet}, -#line 201 "CSSValueKeywords.gperf" - {"auto", CSSValueAuto}, -#line 392 "CSSValueKeywords.gperf" - {"azure", CSSValueAzure}, -#line 445 "CSSValueKeywords.gperf" +#line 516 "CSSValueKeywords.gperf" + {"wheat", CSSValueWheat}, +#line 485 "CSSValueKeywords.gperf" + {"orchid", CSSValueOrchid}, +#line 438 "CSSValueKeywords.gperf" + {"goldenrod", CSSValueGoldenrod}, +#line 127 "CSSValueKeywords.gperf" + {"repeat", CSSValueRepeat}, +#line 255 "CSSValueKeywords.gperf" + {"hand", CSSValueHand}, +#line 279 "CSSValueKeywords.gperf" + {"separate", CSSValueSeparate}, +#line 267 "CSSValueKeywords.gperf" + {"no-close-quote", CSSValueNoCloseQuote}, +#line 312 "CSSValueKeywords.gperf" + {"min-intrinsic", CSSValueMinIntrinsic}, +#line 346 "CSSValueKeywords.gperf" + {"menulist", CSSValueMenulist}, +#line 202 "CSSValueKeywords.gperf" + {"crosshair", CSSValueCrosshair}, +#line 446 "CSSValueKeywords.gperf" {"lavender", CSSValueLavender}, -#line 75 "CSSValueKeywords.gperf" - {"aqua", CSSValueAqua}, -#line 263 "CSSValueKeywords.gperf" +#line 133 "CSSValueKeywords.gperf" + {"source-over", CSSValueSourceOver}, +#line 275 "CSSValueKeywords.gperf" + {"pre-line", CSSValuePreLine}, +#line 412 "CSSValueKeywords.gperf" + {"darkgreen", CSSValueDarkgreen}, +#line 422 "CSSValueKeywords.gperf" + {"darkslateblue", CSSValueDarkslateblue}, +#line 268 "CSSValueKeywords.gperf" + {"no-open-quote", CSSValueNoOpenQuote}, +#line 421 "CSSValueKeywords.gperf" + {"darkseagreen", CSSValueDarkseagreen}, +#line 417 "CSSValueKeywords.gperf" + {"darkorange", CSSValueDarkorange}, +#line 539 "CSSValueKeywords.gperf" + {"alphabetic", CSSValueAlphabetic}, +#line 264 "CSSValueKeywords.gperf" {"lower", CSSValueLower}, -#line 237 "CSSValueKeywords.gperf" - {"capitalize", CSSValueCapitalize}, -#line 470 "CSSValueKeywords.gperf" - {"mediumpurple", CSSValueMediumpurple}, -#line 88 "CSSValueKeywords.gperf" - {"silver", CSSValueSilver}, -#line 456 "CSSValueKeywords.gperf" - {"lightpink", CSSValueLightpink}, -#line 297 "CSSValueKeywords.gperf" - {"ahead", CSSValueAhead}, -#line 365 "CSSValueKeywords.gperf" - {"padding", CSSValuePadding}, -#line 451 "CSSValueKeywords.gperf" - {"lightcyan", CSSValueLightcyan}, -#line 248 "CSSValueKeywords.gperf" - {"blink", CSSValueBlink}, +#line 380 "CSSValueKeywords.gperf" + {"ease-out", CSSValueEaseOut}, +#line 543 "CSSValueKeywords.gperf" + {"no-change", CSSValueNoChange}, +#line 286 "CSSValueKeywords.gperf" + {"stretch", CSSValueStretch}, +#line 196 "CSSValueKeywords.gperf" + {"table-column", CSSValueTableColumn}, #line 239 "CSSValueKeywords.gperf" {"lowercase", CSSValueLowercase}, -#line 500 "CSSValueKeywords.gperf" - {"seagreen", CSSValueSeagreen}, -#line 294 "CSSValueKeywords.gperf" - {"multiple", CSSValueMultiple}, -#line 77 "CSSValueKeywords.gperf" - {"blue", CSSValueBlue}, -#line 184 "CSSValueKeywords.gperf" - {"block", CSSValueBlock}, -#line 471 "CSSValueKeywords.gperf" - {"mediumseagreen", CSSValueMediumseagreen}, -#line 472 "CSSValueKeywords.gperf" - {"mediumslateblue", CSSValueMediumslateblue}, -#line 516 "CSSValueKeywords.gperf" - {"whitesmoke", CSSValueWhitesmoke}, -#line 18 "CSSValueKeywords.gperf" - {"outset", CSSValueOutset}, -#line 370 "CSSValueKeywords.gperf" - {"visual", CSSValueVisual}, -#line 268 "CSSValueKeywords.gperf" +#line 416 "CSSValueKeywords.gperf" + {"darkolivegreen", CSSValueDarkolivegreen}, +#line 509 "CSSValueKeywords.gperf" + {"springgreen", CSSValueSpringgreen}, +#line 531 "CSSValueKeywords.gperf" + {"bevel", CSSValueBevel}, +#line 179 "CSSValueKeywords.gperf" + {"hiragana", CSSValueHiragana}, +#line 521 "CSSValueKeywords.gperf" + {"accumulate", CSSValueAccumulate}, +#line 246 "CSSValueKeywords.gperf" + {"below", CSSValueBelow}, +#line 269 "CSSValueKeywords.gperf" {"nowrap", CSSValueNowrap}, -#line 232 "CSSValueKeywords.gperf" - {"all-scroll", CSSValueAllScroll}, -#line 440 "CSSValueKeywords.gperf" - {"hotpink", CSSValueHotpink}, -#line 116 "CSSValueKeywords.gperf" - {"threedface", CSSValueThreedface}, -#line 483 "CSSValueKeywords.gperf" - {"orangered", CSSValueOrangered}, -#line 484 "CSSValueKeywords.gperf" - {"orchid", CSSValueOrchid}, +#line 69 "CSSValueKeywords.gperf" + {"serif", CSSValueSerif}, +#line 435 "CSSValueKeywords.gperf" + {"gainsboro", CSSValueGainsboro}, #line 223 "CSSValueKeywords.gperf" {"ew-resize", CSSValueEwResize}, #line 220 "CSSValueKeywords.gperf" {"sw-resize", CSSValueSwResize}, -#line 390 "CSSValueKeywords.gperf" - {"antiquewhite", CSSValueAntiquewhite}, -#line 463 "CSSValueKeywords.gperf" - {"lightyellow", CSSValueLightyellow}, -#line 16 "CSSValueKeywords.gperf" - {"groove", CSSValueGroove}, -#line 185 "CSSValueKeywords.gperf" - {"list-item", CSSValueListItem}, -#line 403 "CSSValueKeywords.gperf" - {"cornflowerblue", CSSValueCornflowerblue}, +#line 135 "CSSValueKeywords.gperf" + {"source-out", CSSValueSourceOut}, +#line 394 "CSSValueKeywords.gperf" + {"beige", CSSValueBeige}, +#line 60 "CSSValueKeywords.gperf" + {"narrower", CSSValueNarrower}, #line 217 "CSSValueKeywords.gperf" {"nw-resize", CSSValueNwResize}, -#line 63 "CSSValueKeywords.gperf" - {"condensed", CSSValueCondensed}, -#line 240 "CSSValueKeywords.gperf" - {"visible", CSSValueVisible}, -#line 165 "CSSValueKeywords.gperf" - {"square", CSSValueSquare}, -#line 177 "CSSValueKeywords.gperf" - {"georgian", CSSValueGeorgian}, -#line 35 "CSSValueKeywords.gperf" - {"small-caps", CSSValueSmallCaps}, -#line 331 "CSSValueKeywords.gperf" +#line 332 "CSSValueKeywords.gperf" {"listbox", CSSValueListbox}, -#line 197 "CSSValueKeywords.gperf" - {"table-cell", CSSValueTableCell}, -#line 378 "CSSValueKeywords.gperf" - {"ease-in", CSSValueEaseIn}, -#line 478 "CSSValueKeywords.gperf" - {"mistyrose", CSSValueMistyrose}, -#line 83 "CSSValueKeywords.gperf" - {"navy", CSSValueNavy}, -#line 76 "CSSValueKeywords.gperf" - {"black", CSSValueBlack}, -#line 497 "CSSValueKeywords.gperf" - {"saddlebrown", CSSValueSaddlebrown}, -#line 443 "CSSValueKeywords.gperf" - {"ivory", CSSValueIvory}, -#line 227 "CSSValueKeywords.gperf" - {"col-resize", CSSValueColResize}, -#line 391 "CSSValueKeywords.gperf" - {"aquamarine", CSSValueAquamarine}, -#line 54 "CSSValueKeywords.gperf" - {"x-large", CSSValueXLarge}, -#line 528 "CSSValueKeywords.gperf" - {"butt", CSSValueButt}, +#line 441 "CSSValueKeywords.gperf" + {"hotpink", CSSValueHotpink}, +#line 99 "CSSValueKeywords.gperf" + {"buttonface", CSSValueButtonface}, +#line 486 "CSSValueKeywords.gperf" + {"palegoldenrod", CSSValuePalegoldenrod}, +#line 524 "CSSValueKeywords.gperf" + {"linearrgb", CSSValueLinearrgb}, +#line 20 "CSSValueKeywords.gperf" + {"dashed", CSSValueDashed}, #line 111 "CSSValueKeywords.gperf" {"infotext", CSSValueInfotext}, -#line 190 "CSSValueKeywords.gperf" - {"inline-table", CSSValueInlineTable}, -#line 430 "CSSValueKeywords.gperf" - {"dodgerblue", CSSValueDodgerblue}, -#line 127 "CSSValueKeywords.gperf" - {"repeat", CSSValueRepeat}, -#line 508 "CSSValueKeywords.gperf" - {"springgreen", CSSValueSpringgreen}, -#line 278 "CSSValueKeywords.gperf" - {"separate", CSSValueSeparate}, -#line 328 "CSSValueKeywords.gperf" - {"button", CSSValueButton}, -#line 311 "CSSValueKeywords.gperf" - {"min-intrinsic", CSSValueMinIntrinsic}, +#line 112 "CSSValueKeywords.gperf" + {"match", CSSValueMatch}, +#line 321 "CSSValueKeywords.gperf" + {"break-all", CSSValueBreakAll}, +#line 249 "CSSValueKeywords.gperf" + {"both", CSSValueBoth}, +#line 401 "CSSValueKeywords.gperf" + {"chartreuse", CSSValueChartreuse}, +#line 498 "CSSValueKeywords.gperf" + {"saddlebrown", CSSValueSaddlebrown}, +#line 330 "CSSValueKeywords.gperf" + {"button-bevel", CSSValueButtonBevel}, +#line 414 "CSSValueKeywords.gperf" + {"darkkhaki", CSSValueDarkkhaki}, +#line 66 "CSSValueKeywords.gperf" + {"expanded", CSSValueExpanded}, +#line 231 "CSSValueKeywords.gperf" + {"help", CSSValueHelp}, +#line 432 "CSSValueKeywords.gperf" + {"firebrick", CSSValueFirebrick}, +#line 520 "CSSValueKeywords.gperf" + {"evenodd", CSSValueEvenodd}, +#line 142 "CSSValueKeywords.gperf" + {"plus-darker", CSSValuePlusDarker}, +#line 272 "CSSValueKeywords.gperf" + {"overline", CSSValueOverline}, +#line 409 "CSSValueKeywords.gperf" + {"darkcyan", CSSValueDarkcyan}, +#line 292 "CSSValueKeywords.gperf" + {"inline-axis", CSSValueInlineAxis}, +#line 107 "CSSValueKeywords.gperf" + {"inactiveborder", CSSValueInactiveborder}, +#line 434 "CSSValueKeywords.gperf" + {"forestgreen", CSSValueForestgreen}, +#line 103 "CSSValueKeywords.gperf" + {"captiontext", CSSValueCaptiontext}, +#line 522 "CSSValueKeywords.gperf" + {"new", CSSValueNew}, #line 79 "CSSValueKeywords.gperf" {"gray", CSSValueGray}, -#line 117 "CSSValueKeywords.gperf" - {"threedhighlight", CSSValueThreedhighlight}, -#line 314 "CSSValueKeywords.gperf" - {"discard", CSSValueDiscard}, -#line 27 "CSSValueKeywords.gperf" - {"small-caption", CSSValueSmallCaption}, -#line 19 "CSSValueKeywords.gperf" - {"dotted", CSSValueDotted}, -#line 124 "CSSValueKeywords.gperf" - {"currentcolor", CSSValueCurrentcolor}, -#line 527 "CSSValueKeywords.gperf" - {"geometricprecision", CSSValueGeometricprecision}, -#line 295 "CSSValueKeywords.gperf" +#line 194 "CSSValueKeywords.gperf" + {"table-row", CSSValueTableRow}, +#line 541 "CSSValueKeywords.gperf" + {"mathematical", CSSValueMathematical}, +#line 212 "CSSValueKeywords.gperf" + {"not-allowed", CSSValueNotAllowed}, +#line 431 "CSSValueKeywords.gperf" + {"dodgerblue", CSSValueDodgerblue}, +#line 479 "CSSValueKeywords.gperf" + {"mistyrose", CSSValueMistyrose}, +#line 174 "CSSValueKeywords.gperf" + {"upper-latin", CSSValueUpperLatin}, +#line 109 "CSSValueKeywords.gperf" + {"inactivecaptiontext", CSSValueInactivecaptiontext}, +#line 501 "CSSValueKeywords.gperf" + {"seagreen", CSSValueSeagreen}, +#line 351 "CSSValueKeywords.gperf" + {"slider-vertical", CSSValueSliderVertical}, +#line 54 "CSSValueKeywords.gperf" + {"x-large", CSSValueXLarge}, +#line 83 "CSSValueKeywords.gperf" + {"navy", CSSValueNavy}, +#line 64 "CSSValueKeywords.gperf" + {"semi-condensed", CSSValueSemiCondensed}, +#line 78 "CSSValueKeywords.gperf" + {"fuchsia", CSSValueFuchsia}, +#line 410 "CSSValueKeywords.gperf" + {"darkgoldenrod", CSSValueDarkgoldenrod}, +#line 296 "CSSValueKeywords.gperf" {"forwards", CSSValueForwards}, -#line 521 "CSSValueKeywords.gperf" - {"new", CSSValueNew}, -#line 372 "CSSValueKeywords.gperf" - {"running", CSSValueRunning}, +#line 502 "CSSValueKeywords.gperf" + {"seashell", CSSValueSeashell}, +#line 297 "CSSValueKeywords.gperf" + {"backwards", CSSValueBackwards}, #line 119 "CSSValueKeywords.gperf" {"threedshadow", CSSValueThreedshadow}, -#line 20 "CSSValueKeywords.gperf" - {"dashed", CSSValueDashed}, -#line 379 "CSSValueKeywords.gperf" - {"ease-out", CSSValueEaseOut}, -#line 198 "CSSValueKeywords.gperf" - {"table-caption", CSSValueTableCaption}, -#line 487 "CSSValueKeywords.gperf" +#line 376 "CSSValueKeywords.gperf" + {"preserve-3d", CSSValuePreserve3d}, +#line 427 "CSSValueKeywords.gperf" + {"deeppink", CSSValueDeeppink}, +#line 488 "CSSValueKeywords.gperf" {"paleturquoise", CSSValuePaleturquoise}, -#line 381 "CSSValueKeywords.gperf" - {"document", CSSValueDocument}, -#line 196 "CSSValueKeywords.gperf" - {"table-column", CSSValueTableColumn}, -#line 446 "CSSValueKeywords.gperf" - {"lavenderblush", CSSValueLavenderblush}, -#line 455 "CSSValueKeywords.gperf" - {"lightgrey", CSSValueLightgrey}, -#line 453 "CSSValueKeywords.gperf" - {"lightgray", CSSValueLightgray}, -#line 181 "CSSValueKeywords.gperf" - {"hiragana-iroha", CSSValueHiraganaIroha}, -#line 106 "CSSValueKeywords.gperf" - {"highlighttext", CSSValueHighlighttext}, -#line 108 "CSSValueKeywords.gperf" - {"inactivecaption", CSSValueInactivecaption}, -#line 469 "CSSValueKeywords.gperf" - {"mediumorchid", CSSValueMediumorchid}, -#line 194 "CSSValueKeywords.gperf" - {"table-row", CSSValueTableRow}, -#line 121 "CSSValueKeywords.gperf" - {"windowframe", CSSValueWindowframe}, -#line 299 "CSSValueKeywords.gperf" - {"down", CSSValueDown}, -#line 520 "CSSValueKeywords.gperf" - {"accumulate", CSSValueAccumulate}, #line 203 "CSSValueKeywords.gperf" {"default", CSSValueDefault}, -#line 447 "CSSValueKeywords.gperf" - {"lawngreen", CSSValueLawngreen}, -#line 262 "CSSValueKeywords.gperf" - {"loud", CSSValueLoud}, -#line 274 "CSSValueKeywords.gperf" - {"pre-line", CSSValuePreLine}, -#line 461 "CSSValueKeywords.gperf" - {"lightslategrey", CSSValueLightslategrey}, -#line 460 "CSSValueKeywords.gperf" - {"lightslategray", CSSValueLightslategray}, -#line 290 "CSSValueKeywords.gperf" - {"vertical", CSSValueVertical}, -#line 238 "CSSValueKeywords.gperf" - {"uppercase", CSSValueUppercase}, -#line 524 "CSSValueKeywords.gperf" - {"optimizespeed", CSSValueOptimizespeed}, -#line 229 "CSSValueKeywords.gperf" - {"text", CSSValueText}, -#line 91 "CSSValueKeywords.gperf" - {"yellow", CSSValueYellow}, -#line 261 "CSSValueKeywords.gperf" - {"line-through", CSSValueLineThrough}, -#line 132 "CSSValueKeywords.gperf" - {"copy", CSSValueCopy}, -#line 506 "CSSValueKeywords.gperf" - {"slategrey", CSSValueSlategrey}, -#line 505 "CSSValueKeywords.gperf" - {"slategray", CSSValueSlategray}, -#line 437 "CSSValueKeywords.gperf" - {"goldenrod", CSSValueGoldenrod}, -#line 473 "CSSValueKeywords.gperf" - {"mediumspringgreen", CSSValueMediumspringgreen}, -#line 448 "CSSValueKeywords.gperf" - {"lemonchiffon", CSSValueLemonchiffon}, -#line 395 "CSSValueKeywords.gperf" +#line 138 "CSSValueKeywords.gperf" + {"destination-in", CSSValueDestinationIn}, +#line 396 "CSSValueKeywords.gperf" {"blanchedalmond", CSSValueBlanchedalmond}, -#line 125 "CSSValueKeywords.gperf" - {"grey", CSSValueGrey}, -#line 161 "CSSValueKeywords.gperf" - {"outside", CSSValueOutside}, -#line 166 "CSSValueKeywords.gperf" - {"decimal", CSSValueDecimal}, -#line 113 "CSSValueKeywords.gperf" - {"menutext", CSSValueMenutext}, -#line 439 "CSSValueKeywords.gperf" - {"honeydew", CSSValueHoneydew}, -#line 276 "CSSValueKeywords.gperf" - {"relative", CSSValueRelative}, -#line 147 "CSSValueKeywords.gperf" - {"super", CSSValueSuper}, -#line 419 "CSSValueKeywords.gperf" - {"darksalmon", CSSValueDarksalmon}, -#line 362 "CSSValueKeywords.gperf" - {"round", CSSValueRound}, -#line 72 "CSSValueKeywords.gperf" - {"fantasy", CSSValueFantasy}, -#line 467 "CSSValueKeywords.gperf" - {"mediumaquamarine", CSSValueMediumaquamarine}, -#line 495 "CSSValueKeywords.gperf" - {"rosybrown", CSSValueRosybrown}, -#line 373 "CSSValueKeywords.gperf" - {"paused", CSSValuePaused}, -#line 22 "CSSValueKeywords.gperf" - {"double", CSSValueDouble}, -#line 270 "CSSValueKeywords.gperf" - {"overlay", CSSValueOverlay}, -#line 360 "CSSValueKeywords.gperf" - {"textarea", CSSValueTextarea}, -#line 431 "CSSValueKeywords.gperf" - {"firebrick", CSSValueFirebrick}, -#line 384 "CSSValueKeywords.gperf" - {"visiblefill", CSSValueVisiblefill}, -#line 519 "CSSValueKeywords.gperf" - {"evenodd", CSSValueEvenodd}, -#line 118 "CSSValueKeywords.gperf" - {"threedlightshadow", CSSValueThreedlightshadow}, -#line 275 "CSSValueKeywords.gperf" - {"pre-wrap", CSSValuePreWrap}, -#line 513 "CSSValueKeywords.gperf" - {"turquoise", CSSValueTurquoise}, +#line 544 "CSSValueKeywords.gperf" + {"reset-size", CSSValueResetSize}, +#line 510 "CSSValueKeywords.gperf" + {"steelblue", CSSValueSteelblue}, #line 70 "CSSValueKeywords.gperf" {"sans-serif", CSSValueSansSerif}, -#line 31 "CSSValueKeywords.gperf" - {"status-bar", CSSValueStatusBar}, -#line 485 "CSSValueKeywords.gperf" - {"palegoldenrod", CSSValuePalegoldenrod}, +#line 341 "CSSValueKeywords.gperf" + {"media-slider", CSSValueMediaSlider}, +#line 229 "CSSValueKeywords.gperf" + {"text", CSSValueText}, +#line 95 "CSSValueKeywords.gperf" + {"activeborder", CSSValueActiveborder}, +#line 293 "CSSValueKeywords.gperf" + {"block-axis", CSSValueBlockAxis}, +#line 289 "CSSValueKeywords.gperf" + {"reverse", CSSValueReverse}, +#line 247 "CSSValueKeywords.gperf" + {"bidi-override", CSSValueBidiOverride}, +#line 102 "CSSValueKeywords.gperf" + {"buttontext", CSSValueButtontext}, +#line 140 "CSSValueKeywords.gperf" + {"destination-atop", CSSValueDestinationAtop}, +#line 469 "CSSValueKeywords.gperf" + {"mediumblue", CSSValueMediumblue}, +#line 476 "CSSValueKeywords.gperf" + {"mediumvioletred", CSSValueMediumvioletred}, +#line 444 "CSSValueKeywords.gperf" + {"ivory", CSSValueIvory}, +#line 381 "CSSValueKeywords.gperf" + {"ease-in-out", CSSValueEaseInOut}, +#line 540 "CSSValueKeywords.gperf" + {"hanging", CSSValueHanging}, +#line 367 "CSSValueKeywords.gperf" + {"content-box", CSSValueContentBox}, +#line 458 "CSSValueKeywords.gperf" + {"lightsalmon", CSSValueLightsalmon}, +#line 399 "CSSValueKeywords.gperf" + {"burlywood", CSSValueBurlywood}, +#line 436 "CSSValueKeywords.gperf" + {"ghostwhite", CSSValueGhostwhite}, +#line 177 "CSSValueKeywords.gperf" + {"georgian", CSSValueGeorgian}, +#line 418 "CSSValueKeywords.gperf" + {"darkorchid", CSSValueDarkorchid}, #line 244 "CSSValueKeywords.gperf" {"always", CSSValueAlways}, -#line 438 "CSSValueKeywords.gperf" - {"greenyellow", CSSValueGreenyellow}, -#line 250 "CSSValueKeywords.gperf" - {"close-quote", CSSValueCloseQuote}, -#line 482 "CSSValueKeywords.gperf" - {"olivedrab", CSSValueOlivedrab}, -#line 543 "CSSValueKeywords.gperf" - {"reset-size", CSSValueResetSize}, -#line 212 "CSSValueKeywords.gperf" - {"not-allowed", CSSValueNotAllowed}, -#line 96 "CSSValueKeywords.gperf" - {"activecaption", CSSValueActivecaption}, -#line 99 "CSSValueKeywords.gperf" - {"buttonface", CSSValueButtonface}, -#line 122 "CSSValueKeywords.gperf" - {"windowtext", CSSValueWindowtext}, -#line 474 "CSSValueKeywords.gperf" - {"mediumturquoise", CSSValueMediumturquoise}, +#line 169 "CSSValueKeywords.gperf" + {"upper-roman", CSSValueUpperRoman}, +#line 172 "CSSValueKeywords.gperf" + {"lower-latin", CSSValueLowerLatin}, +#line 448 "CSSValueKeywords.gperf" + {"lawngreen", CSSValueLawngreen}, #line 49 "CSSValueKeywords.gperf" {"xx-small", CSSValueXxSmall}, -#line 71 "CSSValueKeywords.gperf" - {"cursive", CSSValueCursive}, -#line 266 "CSSValueKeywords.gperf" - {"no-close-quote", CSSValueNoCloseQuote}, -#line 429 "CSSValueKeywords.gperf" +#line 473 "CSSValueKeywords.gperf" + {"mediumslateblue", CSSValueMediumslateblue}, +#line 270 "CSSValueKeywords.gperf" + {"open-quote", CSSValueOpenQuote}, +#line 472 "CSSValueKeywords.gperf" + {"mediumseagreen", CSSValueMediumseagreen}, +#line 325 "CSSValueKeywords.gperf" + {"checkbox", CSSValueCheckbox}, +#line 157 "CSSValueKeywords.gperf" + {"justify", CSSValueJustify}, +#line 226 "CSSValueKeywords.gperf" + {"nwse-resize", CSSValueNwseResize}, +#line 254 "CSSValueKeywords.gperf" + {"fixed", CSSValueFixed}, +#line 72 "CSSValueKeywords.gperf" + {"fantasy", CSSValueFantasy}, +#line 425 "CSSValueKeywords.gperf" + {"darkturquoise", CSSValueDarkturquoise}, +#line 457 "CSSValueKeywords.gperf" + {"lightpink", CSSValueLightpink}, +#line 276 "CSSValueKeywords.gperf" + {"pre-wrap", CSSValuePreWrap}, +#line 125 "CSSValueKeywords.gperf" + {"grey", CSSValueGrey}, +#line 471 "CSSValueKeywords.gperf" + {"mediumpurple", CSSValueMediumpurple}, +#line 507 "CSSValueKeywords.gperf" + {"slategrey", CSSValueSlategrey}, +#line 328 "CSSValueKeywords.gperf" + {"square-button", CSSValueSquareButton}, +#line 506 "CSSValueKeywords.gperf" + {"slategray", CSSValueSlategray}, +#line 430 "CSSValueKeywords.gperf" {"dimgrey", CSSValueDimgrey}, -#line 428 "CSSValueKeywords.gperf" +#line 137 "CSSValueKeywords.gperf" + {"destination-over", CSSValueDestinationOver}, +#line 429 "CSSValueKeywords.gperf" {"dimgray", CSSValueDimgray}, -#line 490 "CSSValueKeywords.gperf" - {"peachpuff", CSSValuePeachpuff}, +#line 208 "CSSValueKeywords.gperf" + {"context-menu", CSSValueContextMenu}, +#line 528 "CSSValueKeywords.gperf" + {"geometricprecision", CSSValueGeometricprecision}, +#line 91 "CSSValueKeywords.gperf" + {"yellow", CSSValueYellow}, +#line 316 "CSSValueKeywords.gperf" + {"dot-dash", CSSValueDotDash}, +#line 477 "CSSValueKeywords.gperf" + {"midnightblue", CSSValueMidnightblue}, +#line 155 "CSSValueKeywords.gperf" + {"right", CSSValueRight}, +#line 98 "CSSValueKeywords.gperf" + {"background", CSSValueBackground}, +#line 39 "CSSValueKeywords.gperf" + {"lighter", CSSValueLighter}, +#line 361 "CSSValueKeywords.gperf" + {"textarea", CSSValueTextarea}, #line 225 "CSSValueKeywords.gperf" {"nesw-resize", CSSValueNeswResize}, -#line 267 "CSSValueKeywords.gperf" - {"no-open-quote", CSSValueNoOpenQuote}, -#line 541 "CSSValueKeywords.gperf" +#line 468 "CSSValueKeywords.gperf" + {"mediumaquamarine", CSSValueMediumaquamarine}, +#line 110 "CSSValueKeywords.gperf" + {"infobackground", CSSValueInfobackground}, +#line 113 "CSSValueKeywords.gperf" + {"menutext", CSSValueMenutext}, +#line 542 "CSSValueKeywords.gperf" {"use-script", CSSValueUseScript}, -#line 407 "CSSValueKeywords.gperf" - {"darkblue", CSSValueDarkblue}, -#line 291 "CSSValueKeywords.gperf" - {"inline-axis", CSSValueInlineAxis}, -#line 354 "CSSValueKeywords.gperf" - {"searchfield", CSSValueSearchfield}, -#line 383 "CSSValueKeywords.gperf" - {"visiblepainted", CSSValueVisiblepainted}, -#line 254 "CSSValueKeywords.gperf" - {"fixed", CSSValueFixed}, -#line 444 "CSSValueKeywords.gperf" - {"khaki", CSSValueKhaki}, -#line 414 "CSSValueKeywords.gperf" - {"darkmagenta", CSSValueDarkmagenta}, -#line 103 "CSSValueKeywords.gperf" - {"captiontext", CSSValueCaptiontext}, -#line 517 "CSSValueKeywords.gperf" - {"yellowgreen", CSSValueYellowgreen}, -#line 488 "CSSValueKeywords.gperf" - {"palevioletred", CSSValuePalevioletred}, -#line 489 "CSSValueKeywords.gperf" - {"papayawhip", CSSValuePapayawhip}, -#line 494 "CSSValueKeywords.gperf" +#line 481 "CSSValueKeywords.gperf" + {"navajowhite", CSSValueNavajowhite}, +#line 61 "CSSValueKeywords.gperf" + {"ultra-condensed", CSSValueUltraCondensed}, +#line 451 "CSSValueKeywords.gperf" + {"lightcoral", CSSValueLightcoral}, +#line 143 "CSSValueKeywords.gperf" + {"plus-lighter", CSSValuePlusLighter}, +#line 362 "CSSValueKeywords.gperf" + {"caps-lock-indicator", CSSValueCapsLockIndicator}, +#line 168 "CSSValueKeywords.gperf" + {"lower-roman", CSSValueLowerRoman}, +#line 495 "CSSValueKeywords.gperf" {"powderblue", CSSValuePowderblue}, -#line 78 "CSSValueKeywords.gperf" - {"fuchsia", CSSValueFuchsia}, -#line 411 "CSSValueKeywords.gperf" - {"darkgreen", CSSValueDarkgreen}, -#line 100 "CSSValueKeywords.gperf" - {"buttonhighlight", CSSValueButtonhighlight}, -#line 420 "CSSValueKeywords.gperf" - {"darkseagreen", CSSValueDarkseagreen}, -#line 421 "CSSValueKeywords.gperf" - {"darkslateblue", CSSValueDarkslateblue}, -#line 416 "CSSValueKeywords.gperf" - {"darkorange", CSSValueDarkorange}, -#line 186 "CSSValueKeywords.gperf" - {"run-in", CSSValueRunIn}, -#line 171 "CSSValueKeywords.gperf" - {"lower-alpha", CSSValueLowerAlpha}, #line 101 "CSSValueKeywords.gperf" {"buttonshadow", CSSValueButtonshadow}, -#line 180 "CSSValueKeywords.gperf" - {"katakana", CSSValueKatakana}, -#line 349 "CSSValueKeywords.gperf" - {"slider-horizontal", CSSValueSliderHorizontal}, -#line 134 "CSSValueKeywords.gperf" - {"source-in", CSSValueSourceIn}, -#line 188 "CSSValueKeywords.gperf" - {"inline-block", CSSValueInlineBlock}, -#line 172 "CSSValueKeywords.gperf" - {"lower-latin", CSSValueLowerLatin}, -#line 396 "CSSValueKeywords.gperf" - {"blueviolet", CSSValueBlueviolet}, -#line 136 "CSSValueKeywords.gperf" - {"source-atop", CSSValueSourceAtop}, -#line 226 "CSSValueKeywords.gperf" - {"nwse-resize", CSSValueNwseResize}, -#line 499 "CSSValueKeywords.gperf" - {"sandybrown", CSSValueSandybrown}, -#line 208 "CSSValueKeywords.gperf" - {"context-menu", CSSValueContextMenu}, -#line 168 "CSSValueKeywords.gperf" - {"lower-roman", CSSValueLowerRoman}, -#line 346 "CSSValueKeywords.gperf" - {"menulist-button", CSSValueMenulistButton}, -#line 319 "CSSValueKeywords.gperf" - {"skip-white-space", CSSValueSkipWhiteSpace}, -#line 55 "CSSValueKeywords.gperf" - {"xx-large", CSSValueXxLarge}, -#line 340 "CSSValueKeywords.gperf" - {"media-slider", CSSValueMediaSlider}, -#line 368 "CSSValueKeywords.gperf" - {"content-box", CSSValueContentBox}, -#line 459 "CSSValueKeywords.gperf" - {"lightskyblue", CSSValueLightskyblue}, -#line 315 "CSSValueKeywords.gperf" - {"dot-dash", CSSValueDotDash}, -#line 533 "CSSValueKeywords.gperf" +#line 139 "CSSValueKeywords.gperf" + {"destination-out", CSSValueDestinationOut}, +#line 534 "CSSValueKeywords.gperf" {"after-edge", CSSValueAfterEdge}, -#line 135 "CSSValueKeywords.gperf" - {"source-out", CSSValueSourceOut}, +#line 413 "CSSValueKeywords.gperf" + {"darkgrey", CSSValueDarkgrey}, +#line 411 "CSSValueKeywords.gperf" + {"darkgray", CSSValueDarkgray}, +#line 404 "CSSValueKeywords.gperf" + {"cornflowerblue", CSSValueCornflowerblue}, +#line 327 "CSSValueKeywords.gperf" + {"push-button", CSSValuePushButton}, +#line 31 "CSSValueKeywords.gperf" + {"status-bar", CSSValueStatusBar}, #line 228 "CSSValueKeywords.gperf" {"row-resize", CSSValueRowResize}, -#line 385 "CSSValueKeywords.gperf" - {"visiblestroke", CSSValueVisiblestroke}, -#line 418 "CSSValueKeywords.gperf" - {"darkred", CSSValueDarkred}, -#line 107 "CSSValueKeywords.gperf" - {"inactiveborder", CSSValueInactiveborder}, -#line 102 "CSSValueKeywords.gperf" - {"buttontext", CSSValueButtontext}, -#line 104 "CSSValueKeywords.gperf" - {"graytext", CSSValueGraytext}, -#line 380 "CSSValueKeywords.gperf" - {"ease-in-out", CSSValueEaseInOut}, -#line 138 "CSSValueKeywords.gperf" - {"destination-in", CSSValueDestinationIn}, -#line 417 "CSSValueKeywords.gperf" - {"darkorchid", CSSValueDarkorchid}, -#line 143 "CSSValueKeywords.gperf" - {"plus-lighter", CSSValuePlusLighter}, -#line 475 "CSSValueKeywords.gperf" - {"mediumvioletred", CSSValueMediumvioletred}, -#line 97 "CSSValueKeywords.gperf" - {"appworkspace", CSSValueAppworkspace}, -#line 140 "CSSValueKeywords.gperf" - {"destination-atop", CSSValueDestinationAtop}, -#line 324 "CSSValueKeywords.gperf" - {"checkbox", CSSValueCheckbox}, -#line 110 "CSSValueKeywords.gperf" - {"infobackground", CSSValueInfobackground}, -#line 326 "CSSValueKeywords.gperf" - {"push-button", CSSValuePushButton}, -#line 320 "CSSValueKeywords.gperf" - {"break-all", CSSValueBreakAll}, -#line 531 "CSSValueKeywords.gperf" - {"optimizelegibility", CSSValueOptimizelegibility}, -#line 109 "CSSValueKeywords.gperf" - {"inactivecaptiontext", CSSValueInactivecaptiontext}, -#line 157 "CSSValueKeywords.gperf" - {"justify", CSSValueJustify}, +#line 121 "CSSValueKeywords.gperf" + {"windowframe", CSSValueWindowframe}, +#line 175 "CSSValueKeywords.gperf" + {"hebrew", CSSValueHebrew}, +#line 122 "CSSValueKeywords.gperf" + {"windowtext", CSSValueWindowtext}, +#line 424 "CSSValueKeywords.gperf" + {"darkslategrey", CSSValueDarkslategrey}, +#line 423 "CSSValueKeywords.gperf" + {"darkslategray", CSSValueDarkslategray}, +#line 538 "CSSValueKeywords.gperf" + {"ideographic", CSSValueIdeographic}, +#line 206 "CSSValueKeywords.gperf" + {"vertical-text", CSSValueVerticalText}, #line 173 "CSSValueKeywords.gperf" {"upper-alpha", CSSValueUpperAlpha}, -#line 351 "CSSValueKeywords.gperf" - {"sliderthumb-horizontal", CSSValueSliderthumbHorizontal}, -#line 426 "CSSValueKeywords.gperf" - {"deeppink", CSSValueDeeppink}, -#line 139 "CSSValueKeywords.gperf" - {"destination-out", CSSValueDestinationOut}, -#line 61 "CSSValueKeywords.gperf" - {"ultra-condensed", CSSValueUltraCondensed}, -#line 408 "CSSValueKeywords.gperf" - {"darkcyan", CSSValueDarkcyan}, -#line 174 "CSSValueKeywords.gperf" - {"upper-latin", CSSValueUpperLatin}, +#line 391 "CSSValueKeywords.gperf" + {"antiquewhite", CSSValueAntiquewhite}, +#line 115 "CSSValueKeywords.gperf" + {"threeddarkshadow", CSSValueThreeddarkshadow}, +#line 526 "CSSValueKeywords.gperf" + {"optimizequality", CSSValueOptimizequality}, #line 148 "CSSValueKeywords.gperf" {"text-top", CSSValueTextTop}, -#line 296 "CSSValueKeywords.gperf" - {"backwards", CSSValueBackwards}, -#line 425 "CSSValueKeywords.gperf" - {"darkviolet", CSSValueDarkviolet}, -#line 359 "CSSValueKeywords.gperf" - {"textfield", CSSValueTextfield}, -#line 169 "CSSValueKeywords.gperf" - {"upper-roman", CSSValueUpperRoman}, -#line 327 "CSSValueKeywords.gperf" - {"square-button", CSSValueSquareButton}, -#line 341 "CSSValueKeywords.gperf" - {"media-sliderthumb", CSSValueMediaSliderthumb}, -#line 64 "CSSValueKeywords.gperf" - {"semi-condensed", CSSValueSemiCondensed}, -#line 66 "CSSValueKeywords.gperf" - {"expanded", CSSValueExpanded}, -#line 323 "CSSValueKeywords.gperf" - {"after-white-space", CSSValueAfterWhiteSpace}, -#line 306 "CSSValueKeywords.gperf" - {"read-write", CSSValueReadWrite}, -#line 95 "CSSValueKeywords.gperf" - {"activeborder", CSSValueActiveborder}, -#line 347 "CSSValueKeywords.gperf" - {"menulist-text", CSSValueMenulistText}, -#line 398 "CSSValueKeywords.gperf" - {"burlywood", CSSValueBurlywood}, -#line 525 "CSSValueKeywords.gperf" - {"optimizequality", CSSValueOptimizequality}, -#line 452 "CSSValueKeywords.gperf" - {"lightgoldenrodyellow", CSSValueLightgoldenrodyellow}, -#line 424 "CSSValueKeywords.gperf" - {"darkturquoise", CSSValueDarkturquoise}, -#line 532 "CSSValueKeywords.gperf" - {"before-edge", CSSValueBeforeEdge}, -#line 26 "CSSValueKeywords.gperf" - {"message-box", CSSValueMessageBox}, -#line 350 "CSSValueKeywords.gperf" - {"slider-vertical", CSSValueSliderVertical}, -#line 149 "CSSValueKeywords.gperf" - {"text-bottom", CSSValueTextBottom}, -#line 269 "CSSValueKeywords.gperf" - {"open-quote", CSSValueOpenQuote}, +#line 433 "CSSValueKeywords.gperf" + {"floralwhite", CSSValueFloralwhite}, #line 178 "CSSValueKeywords.gperf" {"cjk-ideographic", CSSValueCjkIdeographic}, -#line 98 "CSSValueKeywords.gperf" - {"background", CSSValueBackground}, -#line 412 "CSSValueKeywords.gperf" - {"darkgrey", CSSValueDarkgrey}, -#line 195 "CSSValueKeywords.gperf" - {"table-column-group", CSSValueTableColumnGroup}, -#line 410 "CSSValueKeywords.gperf" - {"darkgray", CSSValueDarkgray}, -#line 367 "CSSValueKeywords.gperf" +#line 365 "CSSValueKeywords.gperf" {"border-box", CSSValueBorderBox}, -#line 330 "CSSValueKeywords.gperf" - {"default-button", CSSValueDefaultButton}, -#line 292 "CSSValueKeywords.gperf" - {"block-axis", CSSValueBlockAxis}, -#line 247 "CSSValueKeywords.gperf" - {"bidi-override", CSSValueBidiOverride}, -#line 115 "CSSValueKeywords.gperf" - {"threeddarkshadow", CSSValueThreeddarkshadow}, -#line 415 "CSSValueKeywords.gperf" - {"darkolivegreen", CSSValueDarkolivegreen}, -#line 191 "CSSValueKeywords.gperf" - {"table-row-group", CSSValueTableRowGroup}, -#line 423 "CSSValueKeywords.gperf" - {"darkslategrey", CSSValueDarkslategrey}, -#line 422 "CSSValueKeywords.gperf" - {"darkslategray", CSSValueDarkslategray}, -#line 366 "CSSValueKeywords.gperf" +#line 440 "CSSValueKeywords.gperf" + {"honeydew", CSSValueHoneydew}, +#line 271 "CSSValueKeywords.gperf" + {"overlay", CSSValueOverlay}, +#line 322 "CSSValueKeywords.gperf" + {"break-word", CSSValueBreakWord}, +#line 450 "CSSValueKeywords.gperf" + {"lightblue", CSSValueLightblue}, +#line 500 "CSSValueKeywords.gperf" + {"sandybrown", CSSValueSandybrown}, +#line 496 "CSSValueKeywords.gperf" + {"rosybrown", CSSValueRosybrown}, +#line 439 "CSSValueKeywords.gperf" + {"greenyellow", CSSValueGreenyellow}, +#line 532 "CSSValueKeywords.gperf" + {"optimizelegibility", CSSValueOptimizelegibility}, +#line 369 "CSSValueKeywords.gperf" {"padding-box", CSSValuePaddingBox}, -#line 375 "CSSValueKeywords.gperf" - {"preserve-3d", CSSValuePreserve3d}, -#line 133 "CSSValueKeywords.gperf" - {"source-over", CSSValueSourceOver}, -#line 128 "CSSValueKeywords.gperf" - {"repeat-x", CSSValueRepeatX}, -#line 334 "CSSValueKeywords.gperf" - {"media-mute-button", CSSValueMediaMuteButton}, -#line 409 "CSSValueKeywords.gperf" - {"darkgoldenrod", CSSValueDarkgoldenrod}, -#line 129 "CSSValueKeywords.gperf" - {"repeat-y", CSSValueRepeatY}, #line 182 "CSSValueKeywords.gperf" {"katakana-iroha", CSSValueKatakanaIroha}, +#line 320 "CSSValueKeywords.gperf" + {"skip-white-space", CSSValueSkipWhiteSpace}, +#line 470 "CSSValueKeywords.gperf" + {"mediumorchid", CSSValueMediumorchid}, +#line 463 "CSSValueKeywords.gperf" + {"lightsteelblue", CSSValueLightsteelblue}, +#line 455 "CSSValueKeywords.gperf" + {"lightgreen", CSSValueLightgreen}, +#line 65 "CSSValueKeywords.gperf" + {"semi-expanded", CSSValueSemiExpanded}, +#line 459 "CSSValueKeywords.gperf" + {"lightseagreen", CSSValueLightseagreen}, +#line 347 "CSSValueKeywords.gperf" + {"menulist-button", CSSValueMenulistButton}, +#line 350 "CSSValueKeywords.gperf" + {"slider-horizontal", CSSValueSliderHorizontal}, +#line 128 "CSSValueKeywords.gperf" + {"repeat-x", CSSValueRepeatX}, #line 170 "CSSValueKeywords.gperf" {"lower-greek", CSSValueLowerGreek}, -#line 305 "CSSValueKeywords.gperf" - {"read-only", CSSValueReadOnly}, -#line 352 "CSSValueKeywords.gperf" - {"sliderthumb-vertical", CSSValueSliderthumbVertical}, -#line 321 "CSSValueKeywords.gperf" - {"break-word", CSSValueBreakWord}, +#line 475 "CSSValueKeywords.gperf" + {"mediumturquoise", CSSValueMediumturquoise}, +#line 171 "CSSValueKeywords.gperf" + {"lower-alpha", CSSValueLowerAlpha}, +#line 55 "CSSValueKeywords.gperf" + {"xx-large", CSSValueXxLarge}, +#line 104 "CSSValueKeywords.gperf" + {"graytext", CSSValueGraytext}, +#line 129 "CSSValueKeywords.gperf" + {"repeat-y", CSSValueRepeatY}, +#line 490 "CSSValueKeywords.gperf" + {"papayawhip", CSSValuePapayawhip}, +#line 360 "CSSValueKeywords.gperf" + {"textfield", CSSValueTextfield}, +#line 149 "CSSValueKeywords.gperf" + {"text-bottom", CSSValueTextBottom}, +#line 533 "CSSValueKeywords.gperf" + {"before-edge", CSSValueBeforeEdge}, #line 62 "CSSValueKeywords.gperf" {"extra-condensed", CSSValueExtraCondensed}, -#line 329 "CSSValueKeywords.gperf" - {"button-bevel", CSSValueButtonBevel}, -#line 413 "CSSValueKeywords.gperf" - {"darkkhaki", CSSValueDarkkhaki}, -#line 137 "CSSValueKeywords.gperf" - {"destination-over", CSSValueDestinationOver}, -#line 68 "CSSValueKeywords.gperf" - {"ultra-expanded", CSSValueUltraExpanded}, -#line 193 "CSSValueKeywords.gperf" - {"table-footer-group", CSSValueTableFooterGroup}, -#line 192 "CSSValueKeywords.gperf" - {"table-header-group", CSSValueTableHeaderGroup}, -#line 206 "CSSValueKeywords.gperf" - {"vertical-text", CSSValueVerticalText}, -#line 65 "CSSValueKeywords.gperf" - {"semi-expanded", CSSValueSemiExpanded}, -#line 142 "CSSValueKeywords.gperf" - {"plus-darker", CSSValuePlusDarker}, -#line 427 "CSSValueKeywords.gperf" - {"deepskyblue", CSSValueDeepskyblue}, -#line 333 "CSSValueKeywords.gperf" - {"media-fullscreen-button", CSSValueMediaFullscreenButton}, -#line 355 "CSSValueKeywords.gperf" - {"searchfield-decoration", CSSValueSearchfieldDecoration}, -#line 338 "CSSValueKeywords.gperf" - {"media-rewind-button", CSSValueMediaRewindButton}, +#line 447 "CSSValueKeywords.gperf" + {"lavenderblush", CSSValueLavenderblush}, +#line 26 "CSSValueKeywords.gperf" + {"message-box", CSSValueMessageBox}, #line 348 "CSSValueKeywords.gperf" - {"menulist-textfield", CSSValueMenulistTextfield}, -#line 316 "CSSValueKeywords.gperf" + {"menulist-text", CSSValueMenulistText}, +#line 474 "CSSValueKeywords.gperf" + {"mediumspringgreen", CSSValueMediumspringgreen}, +#line 452 "CSSValueKeywords.gperf" + {"lightcyan", CSSValueLightcyan}, +#line 307 "CSSValueKeywords.gperf" + {"read-write", CSSValueReadWrite}, +#line 257 "CSSValueKeywords.gperf" + {"higher", CSSValueHigher}, +#line 518 "CSSValueKeywords.gperf" + {"yellowgreen", CSSValueYellowgreen}, +#line 317 "CSSValueKeywords.gperf" {"dot-dot-dash", CSSValueDotDotDash}, +#line 449 "CSSValueKeywords.gperf" + {"lemonchiffon", CSSValueLemonchiffon}, +#line 306 "CSSValueKeywords.gperf" + {"read-only", CSSValueReadOnly}, +#line 355 "CSSValueKeywords.gperf" + {"searchfield", CSSValueSearchfield}, +#line 181 "CSSValueKeywords.gperf" + {"hiragana-iroha", CSSValueHiraganaIroha}, +#line 195 "CSSValueKeywords.gperf" + {"table-column-group", CSSValueTableColumnGroup}, +#line 118 "CSSValueKeywords.gperf" + {"threedlightshadow", CSSValueThreedlightshadow}, #line 335 "CSSValueKeywords.gperf" - {"media-play-button", CSSValueMediaPlayButton}, -#line 67 "CSSValueKeywords.gperf" - {"extra-expanded", CSSValueExtraExpanded}, -#line 358 "CSSValueKeywords.gperf" - {"searchfield-cancel-button", CSSValueSearchfieldCancelButton}, -#line 361 "CSSValueKeywords.gperf" - {"caps-lock-indicator", CSSValueCapsLockIndicator}, -#line 153 "CSSValueKeywords.gperf" - {"-webkit-auto", CSSValueWebkitAuto}, -#line 160 "CSSValueKeywords.gperf" - {"-webkit-center", CSSValueWebkitCenter}, + {"media-mute-button", CSSValueMediaMuteButton}, +#line 68 "CSSValueKeywords.gperf" + {"ultra-expanded", CSSValueUltraExpanded}, +#line 331 "CSSValueKeywords.gperf" + {"default-button", CSSValueDefaultButton}, +#line 93 "CSSValueKeywords.gperf" + {"-webkit-link", CSSValueWebkitLink}, #line 167 "CSSValueKeywords.gperf" {"decimal-leading-zero", CSSValueDecimalLeadingZero}, +#line 353 "CSSValueKeywords.gperf" + {"sliderthumb-vertical", CSSValueSliderthumbVertical}, +#line 94 "CSSValueKeywords.gperf" + {"-webkit-activelink", CSSValueWebkitActivelink}, +#line 464 "CSSValueKeywords.gperf" + {"lightyellow", CSSValueLightyellow}, +#line 428 "CSSValueKeywords.gperf" + {"deepskyblue", CSSValueDeepskyblue}, +#line 191 "CSSValueKeywords.gperf" + {"table-row-group", CSSValueTableRowGroup}, +#line 342 "CSSValueKeywords.gperf" + {"media-sliderthumb", CSSValueMediaSliderthumb}, +#line 160 "CSSValueKeywords.gperf" + {"-webkit-center", CSSValueWebkitCenter}, +#line 337 "CSSValueKeywords.gperf" + {"media-seek-back-button", CSSValueMediaSeekBackButton}, #line 30 "CSSValueKeywords.gperf" {"-webkit-control", CSSValueWebkitControl}, -#line 357 "CSSValueKeywords.gperf" - {"searchfield-results-button", CSSValueSearchfieldResultsButton}, -#line 284 "CSSValueKeywords.gperf" - {"-webkit-nowrap", CSSValueWebkitNowrap}, -#line 159 "CSSValueKeywords.gperf" - {"-webkit-right", CSSValueWebkitRight}, -#line 342 "CSSValueKeywords.gperf" - {"media-controls-background", CSSValueMediaControlsBackground}, -#line 536 "CSSValueKeywords.gperf" - {"text-after-edge", CSSValueTextAfterEdge}, +#line 261 "CSSValueKeywords.gperf" + {"line-through", CSSValueLineThrough}, +#line 153 "CSSValueKeywords.gperf" + {"-webkit-auto", CSSValueWebkitAuto}, +#line 456 "CSSValueKeywords.gperf" + {"lightgrey", CSSValueLightgrey}, +#line 454 "CSSValueKeywords.gperf" + {"lightgray", CSSValueLightgray}, +#line 324 "CSSValueKeywords.gperf" + {"after-white-space", CSSValueAfterWhiteSpace}, +#line 460 "CSSValueKeywords.gperf" + {"lightskyblue", CSSValueLightskyblue}, +#line 491 "CSSValueKeywords.gperf" + {"peachpuff", CSSValuePeachpuff}, +#line 336 "CSSValueKeywords.gperf" + {"media-play-button", CSSValueMediaPlayButton}, +#line 339 "CSSValueKeywords.gperf" + {"media-rewind-button", CSSValueMediaRewindButton}, +#line 117 "CSSValueKeywords.gperf" + {"threedhighlight", CSSValueThreedhighlight}, +#line 67 "CSSValueKeywords.gperf" + {"extra-expanded", CSSValueExtraExpanded}, +#line 462 "CSSValueKeywords.gperf" + {"lightslategrey", CSSValueLightslategrey}, +#line 461 "CSSValueKeywords.gperf" + {"lightslategray", CSSValueLightslategray}, +#line 213 "CSSValueKeywords.gperf" + {"-webkit-zoom-in", CSSValueWebkitZoomIn}, +#line 193 "CSSValueKeywords.gperf" + {"table-footer-group", CSSValueTableFooterGroup}, +#line 349 "CSSValueKeywords.gperf" + {"menulist-textfield", CSSValueMenulistTextfield}, #line 158 "CSSValueKeywords.gperf" {"-webkit-left", CSSValueWebkitLeft}, +#line 105 "CSSValueKeywords.gperf" + {"highlight", CSSValueHighlight}, +#line 285 "CSSValueKeywords.gperf" + {"-webkit-nowrap", CSSValueWebkitNowrap}, +#line 192 "CSSValueKeywords.gperf" + {"table-header-group", CSSValueTableHeaderGroup}, +#line 265 "CSSValueKeywords.gperf" + {"-webkit-marquee", CSSValueWebkitMarquee}, +#line 343 "CSSValueKeywords.gperf" + {"media-controls-background", CSSValueMediaControlsBackground}, #line 233 "CSSValueKeywords.gperf" {"-webkit-grab", CSSValueWebkitGrab}, -#line 535 "CSSValueKeywords.gperf" - {"text-before-edge", CSSValueTextBeforeEdge}, -#line 356 "CSSValueKeywords.gperf" - {"searchfield-results-decoration", CSSValueSearchfieldResultsDecoration}, -#line 93 "CSSValueKeywords.gperf" - {"-webkit-link", CSSValueWebkitLink}, -#line 264 "CSSValueKeywords.gperf" - {"-webkit-marquee", CSSValueWebkitMarquee}, +#line 29 "CSSValueKeywords.gperf" + {"-webkit-small-control", CSSValueWebkitSmallControl}, #line 126 "CSSValueKeywords.gperf" {"-webkit-text", CSSValueWebkitText}, +#line 28 "CSSValueKeywords.gperf" + {"-webkit-mini-control", CSSValueWebkitMiniControl}, +#line 334 "CSSValueKeywords.gperf" + {"media-fullscreen-button", CSSValueMediaFullscreenButton}, +#line 214 "CSSValueKeywords.gperf" + {"-webkit-zoom-out", CSSValueWebkitZoomOut}, +#line 100 "CSSValueKeywords.gperf" + {"buttonhighlight", CSSValueButtonhighlight}, #line 199 "CSSValueKeywords.gperf" {"-webkit-box", CSSValueWebkitBox}, +#line 352 "CSSValueKeywords.gperf" + {"sliderthumb-horizontal", CSSValueSliderthumbHorizontal}, +#line 356 "CSSValueKeywords.gperf" + {"searchfield-decoration", CSSValueSearchfieldDecoration}, +#line 152 "CSSValueKeywords.gperf" + {"-webkit-baseline-middle", CSSValueWebkitBaselineMiddle}, +#line 74 "CSSValueKeywords.gperf" + {"-webkit-body", CSSValueWebkitBody}, +#line 453 "CSSValueKeywords.gperf" + {"lightgoldenrodyellow", CSSValueLightgoldenrodyellow}, +#line 537 "CSSValueKeywords.gperf" + {"text-after-edge", CSSValueTextAfterEdge}, +#line 345 "CSSValueKeywords.gperf" + {"media-time-remaining-display", CSSValueMediaTimeRemainingDisplay}, +#line 159 "CSSValueKeywords.gperf" + {"-webkit-right", CSSValueWebkitRight}, +#line 536 "CSSValueKeywords.gperf" + {"text-before-edge", CSSValueTextBeforeEdge}, #line 234 "CSSValueKeywords.gperf" {"-webkit-grabbing", CSSValueWebkitGrabbing}, -#line 213 "CSSValueKeywords.gperf" - {"-webkit-zoom-in", CSSValueWebkitZoomIn}, +#line 200 "CSSValueKeywords.gperf" + {"-webkit-inline-box", CSSValueWebkitInlineBox}, #line 344 "CSSValueKeywords.gperf" - {"media-time-remaining-display", CSSValueMediaTimeRemainingDisplay}, -#line 343 "CSSValueKeywords.gperf" {"media-current-time-display", CSSValueMediaCurrentTimeDisplay}, -#line 29 "CSSValueKeywords.gperf" - {"-webkit-small-control", CSSValueWebkitSmallControl}, -#line 214 "CSSValueKeywords.gperf" - {"-webkit-zoom-out", CSSValueWebkitZoomOut}, -#line 339 "CSSValueKeywords.gperf" - {"media-return-to-realtime-button", CSSValueMediaReturnToRealtimeButton}, -#line 28 "CSSValueKeywords.gperf" - {"-webkit-mini-control", CSSValueWebkitMiniControl}, -#line 336 "CSSValueKeywords.gperf" - {"media-seek-back-button", CSSValueMediaSeekBackButton}, -#line 74 "CSSValueKeywords.gperf" - {"-webkit-body", CSSValueWebkitBody}, -#line 337 "CSSValueKeywords.gperf" +#line 106 "CSSValueKeywords.gperf" + {"highlighttext", CSSValueHighlighttext}, +#line 359 "CSSValueKeywords.gperf" + {"searchfield-cancel-button", CSSValueSearchfieldCancelButton}, +#line 338 "CSSValueKeywords.gperf" {"media-seek-forward-button", CSSValueMediaSeekForwardButton}, -#line 94 "CSSValueKeywords.gperf" - {"-webkit-activelink", CSSValueWebkitActivelink}, -#line 200 "CSSValueKeywords.gperf" - {"-webkit-inline-box", CSSValueWebkitInlineBox}, -#line 307 "CSSValueKeywords.gperf" +#line 340 "CSSValueKeywords.gperf" + {"media-return-to-realtime-button", CSSValueMediaReturnToRealtimeButton}, +#line 357 "CSSValueKeywords.gperf" + {"searchfield-results-decoration", CSSValueSearchfieldResultsDecoration}, +#line 358 "CSSValueKeywords.gperf" + {"searchfield-results-button", CSSValueSearchfieldResultsButton}, +#line 308 "CSSValueKeywords.gperf" {"read-write-plaintext-only", CSSValueReadWritePlaintextOnly}, -#line 152 "CSSValueKeywords.gperf" - {"-webkit-baseline-middle", CSSValueWebkitBaselineMiddle}, #line 123 "CSSValueKeywords.gperf" {"-webkit-focus-ring-color", CSSValueWebkitFocusRingColor}, #line 56 "CSSValueKeywords.gperf" @@ -1284,477 +1286,391 @@ findValue (register const char *str, register unsigned int len) { 0, -1, -1, -1, -1, 1, -1, -1, -1, -1, 2, -1, -1, -1, -1, 3, -1, -1, -1, -1, - 4, -1, 5, -1, -1, 6, 7, -1, -1, -1, - 8, -1, -1, -1, -1, 9, 10, -1, -1, -1, - 11, 12, -1, -1, -1, 13, 14, -1, -1, -1, - 15, 16, -1, -1, -1, 17, -1, -1, -1, -1, - 18, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, - 20, 21, -1, -1, -1, 22, 23, -1, -1, -1, - -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 4, 5, -1, -1, -1, 6, -1, -1, -1, -1, + 7, -1, -1, -1, -1, 8, -1, -1, -1, -1, + 9, -1, -1, -1, -1, 10, -1, -1, -1, -1, + 11, -1, -1, -1, -1, 12, -1, -1, -1, -1, + 13, -1, 14, -1, -1, -1, 15, -1, -1, -1, + -1, -1, -1, -1, -1, 16, -1, -1, -1, -1, + 17, -1, -1, -1, -1, 18, 19, -1, -1, -1, + -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, + 22, -1, -1, -1, -1, 23, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, -1, -1, -1, -1, 26, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 28, 29, -1, -1, -1, 30, 31, -1, -1, -1, - -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, - 33, -1, -1, -1, -1, 34, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 35, 36, -1, -1, - 37, -1, 38, -1, -1, -1, 39, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, - -1, 41, -1, -1, -1, 42, 43, 44, -1, -1, - -1, 45, -1, 46, -1, 47, -1, -1, -1, -1, - -1, 48, -1, -1, 49, -1, -1, -1, -1, -1, - -1, 50, -1, -1, -1, 51, 52, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 53, -1, 54, -1, -1, 55, -1, -1, -1, -1, - 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 57, -1, -1, -1, 58, -1, 59, -1, -1, - 60, -1, -1, 61, -1, 62, -1, -1, -1, -1, - 63, -1, 64, 65, -1, -1, 66, 67, -1, -1, - 68, -1, -1, -1, -1, 69, 70, -1, -1, -1, - -1, 71, -1, 72, -1, -1, -1, -1, -1, -1, - -1, -1, 73, 74, -1, 75, 76, -1, -1, -1, - -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, - -1, 78, -1, -1, -1, 79, 80, -1, -1, -1, - 81, -1, -1, -1, -1, 82, 83, -1, -1, -1, - 84, 85, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 86, -1, 87, -1, -1, -1, 88, -1, -1, -1, - -1, 89, -1, -1, -1, 90, -1, -1, -1, -1, - -1, 91, 92, -1, -1, 93, 94, 95, -1, -1, - -1, 96, -1, -1, 97, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 98, -1, 99, -1, -1, 100, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 101, -1, -1, -1, -1, - -1, 102, -1, -1, -1, -1, 103, -1, -1, -1, - 104, -1, 105, -1, -1, 106, 107, -1, -1, -1, - 108, -1, 109, -1, -1, -1, -1, 110, 111, -1, - -1, -1, -1, -1, -1, -1, 112, -1, -1, -1, - 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 114, -1, -1, -1, - 115, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 116, -1, -1, -1, - -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, - 119, -1, -1, -1, -1, 120, -1, -1, -1, -1, - -1, -1, -1, -1, 121, -1, -1, -1, -1, -1, - -1, -1, -1, 122, 123, -1, 124, -1, -1, -1, - 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 127, -1, -1, -1, - -1, 128, -1, -1, -1, -1, 129, -1, -1, -1, - 130, -1, -1, -1, -1, 131, -1, -1, -1, -1, - 132, -1, 133, -1, -1, -1, -1, -1, -1, -1, - 134, -1, -1, -1, 135, -1, -1, -1, -1, -1, - 136, -1, -1, -1, -1, 137, -1, -1, -1, -1, - -1, 138, -1, -1, -1, 139, -1, -1, -1, -1, - 140, -1, -1, -1, -1, -1, 141, -1, 142, -1, - 143, -1, -1, -1, -1, 144, -1, -1, -1, -1, - 145, 146, -1, -1, -1, -1, 147, -1, -1, -1, - 148, -1, -1, -1, -1, 149, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 150, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 151, -1, -1, -1, -1, - 152, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 153, -1, -1, -1, - -1, 154, -1, -1, -1, -1, 155, -1, -1, -1, - 156, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 157, -1, 158, 159, 160, 161, -1, - 162, 163, -1, -1, -1, 164, -1, -1, -1, -1, - -1, 165, -1, -1, -1, 166, -1, -1, -1, -1, - 167, 168, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 169, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 170, -1, -1, - -1, -1, 171, -1, -1, 172, 173, -1, -1, -1, - -1, 174, -1, -1, -1, 175, -1, 176, -1, -1, - -1, 177, -1, -1, -1, 178, 179, 180, -1, -1, - 181, 182, -1, 183, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 184, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 185, 186, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 188, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 189, -1, -1, -1, -1, -1, 190, -1, -1, - 191, -1, -1, -1, -1, -1, 192, -1, -1, -1, - 193, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 194, 195, -1, -1, 196, -1, -1, -1, -1, - 197, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 198, -1, -1, -1, -1, - -1, 199, -1, -1, -1, 200, -1, 201, -1, -1, - 202, -1, 203, -1, -1, -1, 204, -1, -1, -1, - -1, -1, -1, -1, -1, 205, -1, -1, -1, -1, - 206, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 207, -1, -1, -1, -1, - 208, -1, 209, -1, -1, 210, -1, 211, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 212, 213, 214, -1, -1, -1, 215, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 216, -1, -1, -1, -1, 217, 218, -1, -1, -1, - 219, -1, -1, -1, -1, 220, 221, -1, -1, -1, - 222, -1, -1, -1, -1, -1, 223, -1, 224, -1, - 225, 226, -1, -1, 227, -1, 228, -1, -1, -1, - 229, 230, -1, -1, -1, -1, -1, -1, -1, -1, - 231, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 232, -1, -1, -1, -1, 233, 234, -1, -1, -1, - 235, -1, 236, -1, -1, -1, -1, -1, -1, -1, - 237, 238, -1, -1, -1, 239, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 240, 241, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 242, 243, -1, -1, -1, - -1, 244, 245, -1, -1, -1, -1, 246, -1, -1, - -1, -1, -1, 247, -1, -1, -1, -1, -1, -1, - 248, 249, -1, -1, -1, -1, 250, -1, -1, -1, - -1, 251, 252, -1, -1, 253, 254, -1, -1, -1, - 255, -1, 256, -1, -1, 257, -1, -1, -1, -1, - -1, 258, -1, -1, -1, -1, -1, -1, -1, -1, - 259, -1, -1, -1, -1, 260, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 27, -1, 28, -1, -1, + -1, 29, 30, -1, -1, 31, -1, 32, -1, -1, + -1, 33, -1, -1, -1, -1, 34, -1, -1, -1, + -1, 35, -1, -1, -1, -1, 36, 37, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, + -1, 39, -1, -1, -1, 40, 41, -1, -1, -1, + -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 43, -1, -1, -1, 44, -1, -1, -1, -1, + 45, -1, -1, -1, -1, 46, -1, -1, -1, -1, + 47, -1, 48, -1, -1, -1, 49, -1, -1, -1, + 50, -1, -1, -1, -1, -1, 51, -1, -1, -1, + 52, -1, 53, -1, -1, -1, -1, 54, -1, -1, + -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 56, -1, -1, -1, -1, 57, -1, -1, -1, -1, + 58, 59, -1, -1, -1, -1, -1, -1, -1, -1, + 60, -1, -1, -1, -1, 61, -1, -1, -1, -1, + 62, -1, -1, -1, -1, 63, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 64, 65, -1, -1, -1, + 66, -1, 67, -1, -1, 68, -1, 69, -1, -1, + 70, 71, -1, -1, -1, -1, 72, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, + -1, 74, -1, -1, -1, 75, -1, -1, -1, -1, + 76, -1, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, + -1, 79, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 80, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 81, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 82, -1, -1, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 85, -1, -1, + -1, 86, 87, -1, -1, -1, 88, -1, -1, -1, + -1, 89, -1, 90, -1, 91, -1, 92, -1, -1, + 93, -1, -1, -1, -1, -1, 94, 95, -1, -1, + -1, 96, -1, -1, -1, -1, 97, -1, -1, -1, + -1, 98, 99, -1, -1, 100, -1, -1, -1, -1, + -1, 101, 102, -1, -1, -1, 103, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 104, -1, -1, -1, + 105, -1, 106, -1, -1, 107, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 108, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 109, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 110, -1, 111, -1, -1, 112, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 113, -1, -1, -1, + -1, -1, 114, -1, -1, -1, -1, -1, -1, -1, + -1, 115, -1, -1, -1, 116, 117, 118, -1, -1, + 119, -1, -1, -1, -1, -1, 120, 121, -1, -1, + 122, 123, -1, -1, -1, 124, 125, -1, -1, -1, + 126, -1, 127, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 128, -1, -1, 129, -1, -1, -1, -1, + -1, 130, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 131, -1, -1, -1, -1, 132, 133, -1, -1, + -1, -1, -1, 134, -1, -1, -1, 135, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 136, -1, -1, -1, 137, -1, -1, -1, + 138, 139, -1, -1, -1, 140, -1, -1, -1, -1, + -1, 141, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, + -1, 143, -1, -1, -1, -1, -1, -1, -1, -1, + 144, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 145, -1, -1, 146, 147, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 148, -1, + 149, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 150, 151, -1, -1, -1, 152, 153, -1, -1, -1, + 154, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 155, 156, -1, -1, -1, 157, -1, -1, -1, -1, + 158, -1, -1, -1, -1, -1, 159, 160, -1, -1, + 161, 162, -1, -1, -1, 163, -1, -1, -1, -1, + 164, -1, -1, -1, -1, 165, -1, -1, -1, -1, + -1, 166, 167, -1, -1, 168, -1, 169, -1, -1, + -1, 170, 171, -1, -1, -1, 172, 173, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 174, 175, -1, -1, -1, 176, 177, -1, -1, -1, + -1, 178, -1, -1, -1, -1, 179, -1, -1, -1, + 180, 181, 182, -1, -1, 183, -1, -1, -1, -1, + 184, -1, -1, -1, -1, 185, 186, 187, -1, -1, + -1, -1, -1, -1, -1, 188, 189, 190, -1, -1, + -1, -1, -1, -1, -1, -1, 191, -1, -1, -1, + -1, 192, -1, -1, -1, -1, 193, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 194, -1, -1, -1, + 195, -1, 196, -1, -1, 197, -1, -1, -1, -1, + 198, 199, -1, -1, -1, 200, -1, -1, 201, -1, + 202, -1, -1, -1, -1, 203, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 204, -1, -1, 205, -1, + -1, -1, -1, -1, -1, 206, -1, -1, -1, -1, + 207, -1, -1, -1, -1, -1, 208, 209, 210, -1, + 211, -1, -1, -1, -1, 212, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 213, + 214, -1, -1, -1, -1, 215, 216, -1, -1, -1, + -1, 217, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 218, 219, -1, -1, -1, -1, -1, -1, -1, -1, + 220, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 221, -1, -1, -1, -1, -1, -1, 222, -1, -1, + -1, -1, -1, -1, -1, 223, -1, -1, -1, -1, + 224, 225, -1, -1, -1, 226, -1, 227, -1, -1, + -1, -1, -1, -1, -1, 228, 229, -1, -1, -1, + -1, 230, -1, -1, -1, 231, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 232, 233, -1, 234, -1, + -1, 235, -1, -1, -1, -1, -1, -1, -1, -1, + 236, -1, 237, -1, -1, 238, -1, -1, -1, -1, + 239, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 240, -1, -1, -1, -1, -1, 241, -1, -1, + 242, 243, 244, -1, -1, -1, -1, 245, -1, -1, + -1, 246, -1, -1, -1, -1, -1, -1, 247, -1, + -1, 248, -1, -1, -1, 249, 250, 251, -1, -1, + 252, -1, -1, -1, -1, -1, -1, 253, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 254, + -1, 255, -1, -1, -1, 256, -1, -1, -1, -1, + 257, 258, -1, -1, -1, -1, -1, 259, -1, -1, + 260, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 262, -1, -1, - 263, 264, -1, -1, -1, -1, -1, 265, -1, -1, - -1, -1, -1, -1, -1, 266, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 267, -1, -1, 268, -1, 269, 270, -1, -1, -1, - -1, -1, -1, -1, -1, 271, -1, -1, -1, -1, - -1, 272, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 273, -1, -1, -1, -1, -1, -1, 274, -1, - -1, 275, -1, -1, -1, 276, 277, 278, -1, -1, - -1, -1, -1, -1, -1, 279, -1, -1, -1, -1, - -1, 280, -1, -1, -1, 281, -1, -1, -1, -1, - 282, -1, -1, -1, -1, 283, 284, -1, -1, -1, - -1, 285, -1, -1, -1, 286, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 287, 288, -1, -1, - -1, 289, -1, -1, -1, 290, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 291, 292, -1, -1, -1, - 293, -1, -1, -1, -1, 294, -1, 295, -1, -1, - -1, -1, -1, -1, -1, 296, -1, -1, -1, -1, - 297, -1, -1, -1, 298, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 299, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 300, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 301, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 302, -1, 303, -1, 304, -1, -1, -1, -1, - 305, -1, -1, -1, -1, -1, 306, -1, -1, -1, - -1, 307, -1, -1, -1, 308, -1, -1, -1, -1, - 309, -1, -1, -1, -1, 310, -1, -1, -1, -1, - 311, -1, -1, -1, -1, 312, -1, -1, -1, -1, - -1, -1, 313, -1, -1, -1, -1, -1, -1, -1, - -1, 314, -1, -1, -1, -1, 315, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 316, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 317, - -1, -1, 318, -1, -1, -1, -1, 319, -1, -1, - -1, -1, 320, -1, -1, -1, 321, -1, -1, -1, - -1, -1, 322, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 323, -1, -1, -1, - -1, 324, 325, -1, -1, 326, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 327, -1, -1, -1, -1, - 328, -1, -1, 329, -1, 330, 331, -1, -1, -1, - 332, -1, -1, -1, -1, 333, 334, -1, -1, -1, - -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, - 337, -1, -1, -1, -1, 338, -1, 339, -1, -1, - -1, -1, -1, -1, -1, -1, 340, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 342, -1, -1, -1, + -1, 262, -1, -1, 263, -1, -1, 264, -1, -1, + -1, -1, 265, -1, -1, -1, -1, 266, -1, -1, + -1, 267, -1, -1, -1, 268, -1, -1, 269, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 270, -1, -1, -1, -1, 271, 272, -1, -1, -1, + -1, -1, -1, 273, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 274, -1, 275, -1, -1, -1, + -1, -1, 276, -1, -1, -1, -1, -1, -1, -1, + 277, -1, -1, -1, -1, -1, 278, -1, -1, -1, + -1, 279, -1, -1, -1, 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 343, -1, -1, 344, -1, -1, -1, -1, -1, - -1, 345, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 346, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 347, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 348, 349, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 350, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 351, -1, - -1, 352, -1, -1, -1, -1, 353, -1, -1, -1, - 354, 355, -1, -1, -1, 356, -1, -1, -1, -1, - 357, -1, -1, 358, -1, -1, 359, -1, 360, -1, + -1, -1, 281, -1, -1, -1, -1, -1, 282, -1, + -1, -1, -1, 283, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 284, 285, -1, -1, + -1, -1, -1, -1, -1, -1, 286, -1, 287, -1, + -1, -1, -1, -1, -1, -1, -1, 288, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 361, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 362, -1, - -1, -1, -1, 363, -1, -1, -1, -1, 364, -1, - -1, -1, -1, -1, -1, -1, 365, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 289, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 366, -1, -1, -1, - -1, -1, -1, 367, -1, -1, -1, -1, -1, -1, - 368, -1, -1, -1, -1, 369, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 370, 371, -1, -1, -1, - -1, 372, -1, -1, -1, -1, -1, 373, -1, -1, - 374, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 375, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 376, -1, 377, -1, -1, -1, -1, -1, -1, - 378, -1, -1, -1, 379, 380, -1, -1, -1, -1, + -1, 290, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 291, -1, -1, -1, -1, -1, 292, -1, -1, + 293, -1, 294, -1, -1, 295, -1, -1, -1, -1, + -1, 296, -1, -1, -1, 297, -1, -1, -1, -1, + 298, 299, 300, 301, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 302, -1, 303, -1, 304, -1, -1, + -1, 305, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 306, -1, -1, -1, 307, 308, -1, -1, + -1, 309, -1, -1, -1, -1, 310, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 381, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 382, -1, -1, -1, -1, -1, -1, -1, -1, - 383, 384, -1, -1, -1, 385, 386, -1, -1, -1, - -1, -1, -1, -1, -1, 387, -1, -1, -1, -1, + -1, 311, -1, -1, -1, -1, -1, -1, 312, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 388, 389, -1, -1, -1, -1, -1, -1, -1, - 390, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 391, -1, -1, -1, -1, -1, -1, -1, - 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 313, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 314, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 394, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 395, -1, -1, -1, -1, + 316, -1, -1, -1, -1, -1, 317, -1, -1, -1, + -1, 318, 319, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 320, -1, -1, 321, -1, -1, + -1, -1, -1, -1, -1, -1, 322, 323, -1, 324, + -1, -1, 325, -1, -1, 326, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 327, 328, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 396, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 397, -1, -1, -1, -1, - -1, -1, 398, -1, -1, 399, -1, -1, -1, -1, + -1, 329, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 400, -1, -1, -1, -1, 401, -1, -1, -1, -1, - -1, -1, -1, 402, 403, 404, -1, -1, -1, -1, + -1, -1, 331, -1, -1, -1, -1, -1, -1, -1, + -1, 332, -1, -1, -1, -1, 333, -1, -1, -1, + -1, 334, -1, -1, -1, -1, -1, 335, -1, -1, + -1, 336, -1, -1, -1, 337, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 338, -1, -1, -1, -1, + 339, -1, -1, -1, -1, 340, -1, -1, -1, -1, + 341, -1, -1, -1, -1, 342, 343, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 344, -1, -1, -1, + -1, -1, 345, -1, -1, -1, 346, -1, -1, -1, + -1, -1, 347, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 348, -1, -1, -1, -1, -1, -1, -1, + 349, -1, -1, -1, -1, 350, 351, 352, -1, -1, + 353, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, -1, -1, + -1, 355, -1, -1, -1, -1, 356, -1, 357, -1, + -1, -1, 358, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 405, -1, -1, -1, -1, -1, -1, -1, -1, 406, - -1, 407, 408, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 359, -1, -1, -1, -1, -1, -1, -1, + -1, 360, 361, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 409, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 410, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 363, 364, -1, 365, 366, -1, -1, -1, 367, + -1, 368, -1, -1, -1, -1, -1, 369, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 370, -1, + -1, 371, 372, -1, -1, -1, -1, -1, -1, -1, + -1, 373, -1, 374, -1, -1, -1, -1, -1, -1, + -1, -1, 375, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 411, -1, -1, -1, - 412, -1, -1, -1, -1, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 376, 377, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 378, -1, 379, -1, -1, -1, 380, 381, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 382, -1, + -1, 383, -1, 384, -1, -1, 385, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 414, -1, 415, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 416, -1, -1, -1, -1, 417, -1, -1, -1, -1, - -1, 418, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 386, -1, -1, -1, + -1, -1, 387, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 419, -1, -1, + 388, -1, 389, -1, -1, -1, 390, 391, -1, -1, + -1, -1, -1, -1, -1, -1, 392, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 393, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 394, 395, 396, -1, + -1, 397, -1, -1, -1, 398, -1, -1, 399, -1, + -1, -1, -1, -1, -1, 400, 401, -1, -1, -1, + -1, -1, 402, 403, -1, -1, 404, -1, -1, -1, + -1, 405, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 406, -1, -1, + 407, -1, -1, -1, -1, -1, -1, 408, 409, -1, + -1, -1, -1, 410, -1, -1, -1, -1, -1, -1, + -1, 411, -1, -1, -1, -1, 412, -1, -1, -1, + -1, -1, -1, -1, -1, 413, 414, -1, 415, -1, + -1, 416, -1, -1, 417, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 420, -1, -1, -1, -1, -1, -1, -1, 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 422, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 423, -1, 424, -1, -1, - -1, 425, -1, -1, -1, 426, -1, -1, 427, -1, - -1, -1, -1, -1, -1, 428, -1, -1, -1, -1, - -1, -1, 429, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 430, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 431, -1, - 432, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 433, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 434, -1, -1, -1, -1, - -1, 435, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 436, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 418, -1, + -1, -1, -1, 419, -1, -1, 420, -1, -1, -1, + -1, -1, 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 437, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 422, -1, -1, -1, -1, -1, + -1, -1, -1, 423, -1, -1, -1, -1, -1, -1, + -1, -1, 424, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 425, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 426, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 438, -1, -1, -1, 439, 440, -1, -1, -1, - -1, -1, 441, -1, -1, 442, -1, -1, -1, -1, - -1, 443, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 444, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 445, -1, -1, - -1, -1, -1, 446, -1, -1, 447, -1, -1, -1, - -1, -1, -1, -1, -1, 448, -1, -1, -1, -1, + -1, 427, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 428, -1, -1, -1, 429, 430, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 431, -1, -1, + -1, -1, 432, -1, -1, -1, -1, -1, -1, -1, + -1, 433, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 434, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 449, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 450, -1, -1, -1, -1, -1, 451, -1, + -1, -1, -1, -1, -1, -1, -1, 435, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 436, -1, + -1, -1, -1, -1, 437, -1, -1, 438, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 439, -1, -1, + -1, -1, 440, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 441, 442, 443, -1, -1, + -1, 444, -1, -1, -1, -1, -1, 445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 446, 447, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 448, -1, -1, -1, -1, 449, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 452, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 453, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 454, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 450, -1, -1, + -1, 451, -1, -1, -1, -1, -1, -1, -1, -1, + 452, -1, -1, -1, -1, -1, -1, -1, 453, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 455, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 454, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 455, + -1, -1, -1, -1, -1, -1, 456, -1, -1, -1, + -1, 457, 458, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 459, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 460, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 456, -1, -1, -1, -1, 457, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 461, -1, -1, + -1, 462, -1, -1, -1, -1, -1, 463, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 458, -1, -1, -1, -1, 459, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 460, 461, -1, -1, -1, 462, 463, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 464, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 464, -1, -1, -1, 465, -1, -1, -1, -1, -1, -1, -1, -1, - 466, 467, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 468, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 469, -1, -1, -1, - -1, -1, 470, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 471, -1, -1, -1, -1, 472, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 473, -1, -1, -1, 474, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 466, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 475, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 476, -1, -1, -1, 477, -1, -1, -1, -1, + -1, -1, -1, 467, -1, -1, -1, -1, -1, -1, + 468, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 478, 479, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 469, 470, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 471, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 480, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 481, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 472, -1, -1, + -1, 473, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 474, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 482, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 483, -1, -1, + 475, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 476, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 484, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 477, -1, 478, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 485, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 486, -1, -1, -1, -1, - -1, 487, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 488, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 489, -1, -1, -1, -1, - -1, 490, 491, -1, -1, -1, -1, -1, -1, -1, + -1, 479, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 492, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 480, -1, -1, + -1, -1, -1, -1, 481, -1, -1, -1, -1, -1, + -1, -1, -1, 482, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 493, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 483, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 484, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 485, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 494, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 486, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 487, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 488, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 489, -1, -1, + -1, -1, 490, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 491, -1, + -1, -1, -1, 492, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 495, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 493, 494, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 495, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 496, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 496, -1, -1, -1, -1, -1, -1, -1, -1, -1, 497, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 498, -1, -1, + -1, -1, 499, -1, -1, -1, -1, -1, 500, -1, + -1, -1, -1, 501, -1, -1, -1, 502, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 498, -1, -1, -1, -1, -1, -1, -1, -1, - 499, 500, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 501, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 502, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 503, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 503, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 504, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 505, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1764,63 +1680,48 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 505, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 506, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 507, -1, -1, -1, -1, -1, -1, -1, -1, - 508, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 509, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 510, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 506, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 507, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 508, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 509, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 511, -1, -1, -1, 512, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 510, 511, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 513, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 514, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 515, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 512, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 513, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 514, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 515, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 516, 517, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 518, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 516, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 517, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 519, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 520, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 521, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1838,57 +1739,19 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 518, 519, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 520, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 521, -1, 522, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 523, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 522, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 523, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 524, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 525, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 526, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 527, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 528, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 529, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 525, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 530, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1899,6 +1762,9 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 526, -1, + -1, -1, -1, -1, -1, -1, -1, 527, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 528, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1908,6 +1774,7 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 529, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1918,10 +1785,12 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 531, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 530, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 531, -1, + -1, -1, -1, -1, -1, 532, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1933,7 +1802,6 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 532, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1949,8 +1817,8 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 533, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 533, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1965,7 +1833,6 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 534, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1973,6 +1840,7 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 534, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1983,7 +1851,6 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 535, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -1991,10 +1858,10 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 536, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 535, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -2008,6 +1875,7 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 536, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -2040,6 +1908,7 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 537, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -2065,6 +1934,7 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 538, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -2072,7 +1942,6 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 537, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -2132,32 +2001,7 @@ findValue (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 538 + -1, 539 }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) @@ -2179,7 +2023,7 @@ findValue (register const char *str, register unsigned int len) } return 0; } -#line 550 "CSSValueKeywords.gperf" +#line 551 "CSSValueKeywords.gperf" static const char * const valueList[] = { "", @@ -2434,6 +2278,7 @@ static const char * const valueList[] = { "landscape", "level", "line-through", +"local", "loud", "lower", "-webkit-marquee", @@ -2536,11 +2381,11 @@ static const char * const valueList[] = { "caps-lock-indicator", "round", "border", +"border-box", "content", +"content-box", "padding", "padding-box", -"border-box", -"content-box", "logical", "visual", "lines", diff --git a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h index b8f83c43ca..6d2667d864 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h +++ b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h @@ -255,295 +255,296 @@ const int CSSValueInvert = 248; const int CSSValueLandscape = 249; const int CSSValueLevel = 250; const int CSSValueLineThrough = 251; -const int CSSValueLoud = 252; -const int CSSValueLower = 253; -const int CSSValueWebkitMarquee = 254; -const int CSSValueMix = 255; -const int CSSValueNoCloseQuote = 256; -const int CSSValueNoOpenQuote = 257; -const int CSSValueNowrap = 258; -const int CSSValueOpenQuote = 259; -const int CSSValueOverlay = 260; -const int CSSValueOverline = 261; -const int CSSValuePortrait = 262; -const int CSSValuePre = 263; -const int CSSValuePreLine = 264; -const int CSSValuePreWrap = 265; -const int CSSValueRelative = 266; -const int CSSValueScroll = 267; -const int CSSValueSeparate = 268; -const int CSSValueShow = 269; -const int CSSValueStatic = 270; -const int CSSValueThick = 271; -const int CSSValueThin = 272; -const int CSSValueUnderline = 273; -const int CSSValueWebkitNowrap = 274; -const int CSSValueStretch = 275; -const int CSSValueStart = 276; -const int CSSValueEnd = 277; -const int CSSValueReverse = 278; -const int CSSValueHorizontal = 279; -const int CSSValueVertical = 280; -const int CSSValueInlineAxis = 281; -const int CSSValueBlockAxis = 282; -const int CSSValueSingle = 283; -const int CSSValueMultiple = 284; -const int CSSValueForwards = 285; -const int CSSValueBackwards = 286; -const int CSSValueAhead = 287; -const int CSSValueUp = 288; -const int CSSValueDown = 289; -const int CSSValueSlow = 290; -const int CSSValueFast = 291; -const int CSSValueInfinite = 292; -const int CSSValueSlide = 293; -const int CSSValueAlternate = 294; -const int CSSValueReadOnly = 295; -const int CSSValueReadWrite = 296; -const int CSSValueReadWritePlaintextOnly = 297; -const int CSSValueElement = 298; -const int CSSValueIgnore = 299; -const int CSSValueIntrinsic = 300; -const int CSSValueMinIntrinsic = 301; -const int CSSValueClip = 302; -const int CSSValueEllipsis = 303; -const int CSSValueDiscard = 304; -const int CSSValueDotDash = 305; -const int CSSValueDotDotDash = 306; -const int CSSValueWave = 307; -const int CSSValueContinuous = 308; -const int CSSValueSkipWhiteSpace = 309; -const int CSSValueBreakAll = 310; -const int CSSValueBreakWord = 311; -const int CSSValueSpace = 312; -const int CSSValueAfterWhiteSpace = 313; -const int CSSValueCheckbox = 314; -const int CSSValueRadio = 315; -const int CSSValuePushButton = 316; -const int CSSValueSquareButton = 317; -const int CSSValueButton = 318; -const int CSSValueButtonBevel = 319; -const int CSSValueDefaultButton = 320; -const int CSSValueListbox = 321; -const int CSSValueListitem = 322; -const int CSSValueMediaFullscreenButton = 323; -const int CSSValueMediaMuteButton = 324; -const int CSSValueMediaPlayButton = 325; -const int CSSValueMediaSeekBackButton = 326; -const int CSSValueMediaSeekForwardButton = 327; -const int CSSValueMediaRewindButton = 328; -const int CSSValueMediaReturnToRealtimeButton = 329; -const int CSSValueMediaSlider = 330; -const int CSSValueMediaSliderthumb = 331; -const int CSSValueMediaControlsBackground = 332; -const int CSSValueMediaCurrentTimeDisplay = 333; -const int CSSValueMediaTimeRemainingDisplay = 334; -const int CSSValueMenulist = 335; -const int CSSValueMenulistButton = 336; -const int CSSValueMenulistText = 337; -const int CSSValueMenulistTextfield = 338; -const int CSSValueSliderHorizontal = 339; -const int CSSValueSliderVertical = 340; -const int CSSValueSliderthumbHorizontal = 341; -const int CSSValueSliderthumbVertical = 342; -const int CSSValueCaret = 343; -const int CSSValueSearchfield = 344; -const int CSSValueSearchfieldDecoration = 345; -const int CSSValueSearchfieldResultsDecoration = 346; -const int CSSValueSearchfieldResultsButton = 347; -const int CSSValueSearchfieldCancelButton = 348; -const int CSSValueTextfield = 349; -const int CSSValueTextarea = 350; -const int CSSValueCapsLockIndicator = 351; -const int CSSValueRound = 352; -const int CSSValueBorder = 353; -const int CSSValueContent = 354; -const int CSSValuePadding = 355; -const int CSSValuePaddingBox = 356; -const int CSSValueBorderBox = 357; -const int CSSValueContentBox = 358; -const int CSSValueLogical = 359; -const int CSSValueVisual = 360; -const int CSSValueLines = 361; -const int CSSValueRunning = 362; -const int CSSValuePaused = 363; -const int CSSValueFlat = 364; -const int CSSValuePreserve3d = 365; -const int CSSValueEase = 366; -const int CSSValueLinear = 367; -const int CSSValueEaseIn = 368; -const int CSSValueEaseOut = 369; -const int CSSValueEaseInOut = 370; -const int CSSValueDocument = 371; -const int CSSValueReset = 372; -const int CSSValueVisiblepainted = 373; -const int CSSValueVisiblefill = 374; -const int CSSValueVisiblestroke = 375; -const int CSSValuePainted = 376; -const int CSSValueFill = 377; -const int CSSValueStroke = 378; -const int CSSValueAliceblue = 379; -const int CSSValueAntiquewhite = 380; -const int CSSValueAquamarine = 381; -const int CSSValueAzure = 382; -const int CSSValueBeige = 383; -const int CSSValueBisque = 384; -const int CSSValueBlanchedalmond = 385; -const int CSSValueBlueviolet = 386; -const int CSSValueBrown = 387; -const int CSSValueBurlywood = 388; -const int CSSValueCadetblue = 389; -const int CSSValueChartreuse = 390; -const int CSSValueChocolate = 391; -const int CSSValueCoral = 392; -const int CSSValueCornflowerblue = 393; -const int CSSValueCornsilk = 394; -const int CSSValueCrimson = 395; -const int CSSValueCyan = 396; -const int CSSValueDarkblue = 397; -const int CSSValueDarkcyan = 398; -const int CSSValueDarkgoldenrod = 399; -const int CSSValueDarkgray = 400; -const int CSSValueDarkgreen = 401; -const int CSSValueDarkgrey = 402; -const int CSSValueDarkkhaki = 403; -const int CSSValueDarkmagenta = 404; -const int CSSValueDarkolivegreen = 405; -const int CSSValueDarkorange = 406; -const int CSSValueDarkorchid = 407; -const int CSSValueDarkred = 408; -const int CSSValueDarksalmon = 409; -const int CSSValueDarkseagreen = 410; -const int CSSValueDarkslateblue = 411; -const int CSSValueDarkslategray = 412; -const int CSSValueDarkslategrey = 413; -const int CSSValueDarkturquoise = 414; -const int CSSValueDarkviolet = 415; -const int CSSValueDeeppink = 416; -const int CSSValueDeepskyblue = 417; -const int CSSValueDimgray = 418; -const int CSSValueDimgrey = 419; -const int CSSValueDodgerblue = 420; -const int CSSValueFirebrick = 421; -const int CSSValueFloralwhite = 422; -const int CSSValueForestgreen = 423; -const int CSSValueGainsboro = 424; -const int CSSValueGhostwhite = 425; -const int CSSValueGold = 426; -const int CSSValueGoldenrod = 427; -const int CSSValueGreenyellow = 428; -const int CSSValueHoneydew = 429; -const int CSSValueHotpink = 430; -const int CSSValueIndianred = 431; -const int CSSValueIndigo = 432; -const int CSSValueIvory = 433; -const int CSSValueKhaki = 434; -const int CSSValueLavender = 435; -const int CSSValueLavenderblush = 436; -const int CSSValueLawngreen = 437; -const int CSSValueLemonchiffon = 438; -const int CSSValueLightblue = 439; -const int CSSValueLightcoral = 440; -const int CSSValueLightcyan = 441; -const int CSSValueLightgoldenrodyellow = 442; -const int CSSValueLightgray = 443; -const int CSSValueLightgreen = 444; -const int CSSValueLightgrey = 445; -const int CSSValueLightpink = 446; -const int CSSValueLightsalmon = 447; -const int CSSValueLightseagreen = 448; -const int CSSValueLightskyblue = 449; -const int CSSValueLightslategray = 450; -const int CSSValueLightslategrey = 451; -const int CSSValueLightsteelblue = 452; -const int CSSValueLightyellow = 453; -const int CSSValueLimegreen = 454; -const int CSSValueLinen = 455; -const int CSSValueMagenta = 456; -const int CSSValueMediumaquamarine = 457; -const int CSSValueMediumblue = 458; -const int CSSValueMediumorchid = 459; -const int CSSValueMediumpurple = 460; -const int CSSValueMediumseagreen = 461; -const int CSSValueMediumslateblue = 462; -const int CSSValueMediumspringgreen = 463; -const int CSSValueMediumturquoise = 464; -const int CSSValueMediumvioletred = 465; -const int CSSValueMidnightblue = 466; -const int CSSValueMintcream = 467; -const int CSSValueMistyrose = 468; -const int CSSValueMoccasin = 469; -const int CSSValueNavajowhite = 470; -const int CSSValueOldlace = 471; -const int CSSValueOlivedrab = 472; -const int CSSValueOrangered = 473; -const int CSSValueOrchid = 474; -const int CSSValuePalegoldenrod = 475; -const int CSSValuePalegreen = 476; -const int CSSValuePaleturquoise = 477; -const int CSSValuePalevioletred = 478; -const int CSSValuePapayawhip = 479; -const int CSSValuePeachpuff = 480; -const int CSSValuePeru = 481; -const int CSSValuePink = 482; -const int CSSValuePlum = 483; -const int CSSValuePowderblue = 484; -const int CSSValueRosybrown = 485; -const int CSSValueRoyalblue = 486; -const int CSSValueSaddlebrown = 487; -const int CSSValueSalmon = 488; -const int CSSValueSandybrown = 489; -const int CSSValueSeagreen = 490; -const int CSSValueSeashell = 491; -const int CSSValueSienna = 492; -const int CSSValueSkyblue = 493; -const int CSSValueSlateblue = 494; -const int CSSValueSlategray = 495; -const int CSSValueSlategrey = 496; -const int CSSValueSnow = 497; -const int CSSValueSpringgreen = 498; -const int CSSValueSteelblue = 499; -const int CSSValueTan = 500; -const int CSSValueThistle = 501; -const int CSSValueTomato = 502; -const int CSSValueTurquoise = 503; -const int CSSValueViolet = 504; -const int CSSValueWheat = 505; -const int CSSValueWhitesmoke = 506; -const int CSSValueYellowgreen = 507; -const int CSSValueNonzero = 508; -const int CSSValueEvenodd = 509; -const int CSSValueAccumulate = 510; -const int CSSValueNew = 511; -const int CSSValueSrgb = 512; -const int CSSValueLinearrgb = 513; -const int CSSValueOptimizespeed = 514; -const int CSSValueOptimizequality = 515; -const int CSSValueCrispedges = 516; -const int CSSValueGeometricprecision = 517; -const int CSSValueButt = 518; -const int CSSValueMiter = 519; -const int CSSValueBevel = 520; -const int CSSValueOptimizelegibility = 521; -const int CSSValueBeforeEdge = 522; -const int CSSValueAfterEdge = 523; -const int CSSValueCentral = 524; -const int CSSValueTextBeforeEdge = 525; -const int CSSValueTextAfterEdge = 526; -const int CSSValueIdeographic = 527; -const int CSSValueAlphabetic = 528; -const int CSSValueHanging = 529; -const int CSSValueMathematical = 530; -const int CSSValueUseScript = 531; -const int CSSValueNoChange = 532; -const int CSSValueResetSize = 533; -const int CSSValueLrTb = 534; -const int CSSValueRlTb = 535; -const int CSSValueTbRl = 536; -const int CSSValueLr = 537; -const int CSSValueRl = 538; -const int CSSValueTb = 539; -const int numCSSValueKeywords = 540; +const int CSSValueLocal = 252; +const int CSSValueLoud = 253; +const int CSSValueLower = 254; +const int CSSValueWebkitMarquee = 255; +const int CSSValueMix = 256; +const int CSSValueNoCloseQuote = 257; +const int CSSValueNoOpenQuote = 258; +const int CSSValueNowrap = 259; +const int CSSValueOpenQuote = 260; +const int CSSValueOverlay = 261; +const int CSSValueOverline = 262; +const int CSSValuePortrait = 263; +const int CSSValuePre = 264; +const int CSSValuePreLine = 265; +const int CSSValuePreWrap = 266; +const int CSSValueRelative = 267; +const int CSSValueScroll = 268; +const int CSSValueSeparate = 269; +const int CSSValueShow = 270; +const int CSSValueStatic = 271; +const int CSSValueThick = 272; +const int CSSValueThin = 273; +const int CSSValueUnderline = 274; +const int CSSValueWebkitNowrap = 275; +const int CSSValueStretch = 276; +const int CSSValueStart = 277; +const int CSSValueEnd = 278; +const int CSSValueReverse = 279; +const int CSSValueHorizontal = 280; +const int CSSValueVertical = 281; +const int CSSValueInlineAxis = 282; +const int CSSValueBlockAxis = 283; +const int CSSValueSingle = 284; +const int CSSValueMultiple = 285; +const int CSSValueForwards = 286; +const int CSSValueBackwards = 287; +const int CSSValueAhead = 288; +const int CSSValueUp = 289; +const int CSSValueDown = 290; +const int CSSValueSlow = 291; +const int CSSValueFast = 292; +const int CSSValueInfinite = 293; +const int CSSValueSlide = 294; +const int CSSValueAlternate = 295; +const int CSSValueReadOnly = 296; +const int CSSValueReadWrite = 297; +const int CSSValueReadWritePlaintextOnly = 298; +const int CSSValueElement = 299; +const int CSSValueIgnore = 300; +const int CSSValueIntrinsic = 301; +const int CSSValueMinIntrinsic = 302; +const int CSSValueClip = 303; +const int CSSValueEllipsis = 304; +const int CSSValueDiscard = 305; +const int CSSValueDotDash = 306; +const int CSSValueDotDotDash = 307; +const int CSSValueWave = 308; +const int CSSValueContinuous = 309; +const int CSSValueSkipWhiteSpace = 310; +const int CSSValueBreakAll = 311; +const int CSSValueBreakWord = 312; +const int CSSValueSpace = 313; +const int CSSValueAfterWhiteSpace = 314; +const int CSSValueCheckbox = 315; +const int CSSValueRadio = 316; +const int CSSValuePushButton = 317; +const int CSSValueSquareButton = 318; +const int CSSValueButton = 319; +const int CSSValueButtonBevel = 320; +const int CSSValueDefaultButton = 321; +const int CSSValueListbox = 322; +const int CSSValueListitem = 323; +const int CSSValueMediaFullscreenButton = 324; +const int CSSValueMediaMuteButton = 325; +const int CSSValueMediaPlayButton = 326; +const int CSSValueMediaSeekBackButton = 327; +const int CSSValueMediaSeekForwardButton = 328; +const int CSSValueMediaRewindButton = 329; +const int CSSValueMediaReturnToRealtimeButton = 330; +const int CSSValueMediaSlider = 331; +const int CSSValueMediaSliderthumb = 332; +const int CSSValueMediaControlsBackground = 333; +const int CSSValueMediaCurrentTimeDisplay = 334; +const int CSSValueMediaTimeRemainingDisplay = 335; +const int CSSValueMenulist = 336; +const int CSSValueMenulistButton = 337; +const int CSSValueMenulistText = 338; +const int CSSValueMenulistTextfield = 339; +const int CSSValueSliderHorizontal = 340; +const int CSSValueSliderVertical = 341; +const int CSSValueSliderthumbHorizontal = 342; +const int CSSValueSliderthumbVertical = 343; +const int CSSValueCaret = 344; +const int CSSValueSearchfield = 345; +const int CSSValueSearchfieldDecoration = 346; +const int CSSValueSearchfieldResultsDecoration = 347; +const int CSSValueSearchfieldResultsButton = 348; +const int CSSValueSearchfieldCancelButton = 349; +const int CSSValueTextfield = 350; +const int CSSValueTextarea = 351; +const int CSSValueCapsLockIndicator = 352; +const int CSSValueRound = 353; +const int CSSValueBorder = 354; +const int CSSValueBorderBox = 355; +const int CSSValueContent = 356; +const int CSSValueContentBox = 357; +const int CSSValuePadding = 358; +const int CSSValuePaddingBox = 359; +const int CSSValueLogical = 360; +const int CSSValueVisual = 361; +const int CSSValueLines = 362; +const int CSSValueRunning = 363; +const int CSSValuePaused = 364; +const int CSSValueFlat = 365; +const int CSSValuePreserve3d = 366; +const int CSSValueEase = 367; +const int CSSValueLinear = 368; +const int CSSValueEaseIn = 369; +const int CSSValueEaseOut = 370; +const int CSSValueEaseInOut = 371; +const int CSSValueDocument = 372; +const int CSSValueReset = 373; +const int CSSValueVisiblepainted = 374; +const int CSSValueVisiblefill = 375; +const int CSSValueVisiblestroke = 376; +const int CSSValuePainted = 377; +const int CSSValueFill = 378; +const int CSSValueStroke = 379; +const int CSSValueAliceblue = 380; +const int CSSValueAntiquewhite = 381; +const int CSSValueAquamarine = 382; +const int CSSValueAzure = 383; +const int CSSValueBeige = 384; +const int CSSValueBisque = 385; +const int CSSValueBlanchedalmond = 386; +const int CSSValueBlueviolet = 387; +const int CSSValueBrown = 388; +const int CSSValueBurlywood = 389; +const int CSSValueCadetblue = 390; +const int CSSValueChartreuse = 391; +const int CSSValueChocolate = 392; +const int CSSValueCoral = 393; +const int CSSValueCornflowerblue = 394; +const int CSSValueCornsilk = 395; +const int CSSValueCrimson = 396; +const int CSSValueCyan = 397; +const int CSSValueDarkblue = 398; +const int CSSValueDarkcyan = 399; +const int CSSValueDarkgoldenrod = 400; +const int CSSValueDarkgray = 401; +const int CSSValueDarkgreen = 402; +const int CSSValueDarkgrey = 403; +const int CSSValueDarkkhaki = 404; +const int CSSValueDarkmagenta = 405; +const int CSSValueDarkolivegreen = 406; +const int CSSValueDarkorange = 407; +const int CSSValueDarkorchid = 408; +const int CSSValueDarkred = 409; +const int CSSValueDarksalmon = 410; +const int CSSValueDarkseagreen = 411; +const int CSSValueDarkslateblue = 412; +const int CSSValueDarkslategray = 413; +const int CSSValueDarkslategrey = 414; +const int CSSValueDarkturquoise = 415; +const int CSSValueDarkviolet = 416; +const int CSSValueDeeppink = 417; +const int CSSValueDeepskyblue = 418; +const int CSSValueDimgray = 419; +const int CSSValueDimgrey = 420; +const int CSSValueDodgerblue = 421; +const int CSSValueFirebrick = 422; +const int CSSValueFloralwhite = 423; +const int CSSValueForestgreen = 424; +const int CSSValueGainsboro = 425; +const int CSSValueGhostwhite = 426; +const int CSSValueGold = 427; +const int CSSValueGoldenrod = 428; +const int CSSValueGreenyellow = 429; +const int CSSValueHoneydew = 430; +const int CSSValueHotpink = 431; +const int CSSValueIndianred = 432; +const int CSSValueIndigo = 433; +const int CSSValueIvory = 434; +const int CSSValueKhaki = 435; +const int CSSValueLavender = 436; +const int CSSValueLavenderblush = 437; +const int CSSValueLawngreen = 438; +const int CSSValueLemonchiffon = 439; +const int CSSValueLightblue = 440; +const int CSSValueLightcoral = 441; +const int CSSValueLightcyan = 442; +const int CSSValueLightgoldenrodyellow = 443; +const int CSSValueLightgray = 444; +const int CSSValueLightgreen = 445; +const int CSSValueLightgrey = 446; +const int CSSValueLightpink = 447; +const int CSSValueLightsalmon = 448; +const int CSSValueLightseagreen = 449; +const int CSSValueLightskyblue = 450; +const int CSSValueLightslategray = 451; +const int CSSValueLightslategrey = 452; +const int CSSValueLightsteelblue = 453; +const int CSSValueLightyellow = 454; +const int CSSValueLimegreen = 455; +const int CSSValueLinen = 456; +const int CSSValueMagenta = 457; +const int CSSValueMediumaquamarine = 458; +const int CSSValueMediumblue = 459; +const int CSSValueMediumorchid = 460; +const int CSSValueMediumpurple = 461; +const int CSSValueMediumseagreen = 462; +const int CSSValueMediumslateblue = 463; +const int CSSValueMediumspringgreen = 464; +const int CSSValueMediumturquoise = 465; +const int CSSValueMediumvioletred = 466; +const int CSSValueMidnightblue = 467; +const int CSSValueMintcream = 468; +const int CSSValueMistyrose = 469; +const int CSSValueMoccasin = 470; +const int CSSValueNavajowhite = 471; +const int CSSValueOldlace = 472; +const int CSSValueOlivedrab = 473; +const int CSSValueOrangered = 474; +const int CSSValueOrchid = 475; +const int CSSValuePalegoldenrod = 476; +const int CSSValuePalegreen = 477; +const int CSSValuePaleturquoise = 478; +const int CSSValuePalevioletred = 479; +const int CSSValuePapayawhip = 480; +const int CSSValuePeachpuff = 481; +const int CSSValuePeru = 482; +const int CSSValuePink = 483; +const int CSSValuePlum = 484; +const int CSSValuePowderblue = 485; +const int CSSValueRosybrown = 486; +const int CSSValueRoyalblue = 487; +const int CSSValueSaddlebrown = 488; +const int CSSValueSalmon = 489; +const int CSSValueSandybrown = 490; +const int CSSValueSeagreen = 491; +const int CSSValueSeashell = 492; +const int CSSValueSienna = 493; +const int CSSValueSkyblue = 494; +const int CSSValueSlateblue = 495; +const int CSSValueSlategray = 496; +const int CSSValueSlategrey = 497; +const int CSSValueSnow = 498; +const int CSSValueSpringgreen = 499; +const int CSSValueSteelblue = 500; +const int CSSValueTan = 501; +const int CSSValueThistle = 502; +const int CSSValueTomato = 503; +const int CSSValueTurquoise = 504; +const int CSSValueViolet = 505; +const int CSSValueWheat = 506; +const int CSSValueWhitesmoke = 507; +const int CSSValueYellowgreen = 508; +const int CSSValueNonzero = 509; +const int CSSValueEvenodd = 510; +const int CSSValueAccumulate = 511; +const int CSSValueNew = 512; +const int CSSValueSrgb = 513; +const int CSSValueLinearrgb = 514; +const int CSSValueOptimizespeed = 515; +const int CSSValueOptimizequality = 516; +const int CSSValueCrispedges = 517; +const int CSSValueGeometricprecision = 518; +const int CSSValueButt = 519; +const int CSSValueMiter = 520; +const int CSSValueBevel = 521; +const int CSSValueOptimizelegibility = 522; +const int CSSValueBeforeEdge = 523; +const int CSSValueAfterEdge = 524; +const int CSSValueCentral = 525; +const int CSSValueTextBeforeEdge = 526; +const int CSSValueTextAfterEdge = 527; +const int CSSValueIdeographic = 528; +const int CSSValueAlphabetic = 529; +const int CSSValueHanging = 530; +const int CSSValueMathematical = 531; +const int CSSValueUseScript = 532; +const int CSSValueNoChange = 533; +const int CSSValueResetSize = 534; +const int CSSValueLrTb = 535; +const int CSSValueRlTb = 536; +const int CSSValueTbRl = 537; +const int CSSValueLr = 538; +const int CSSValueRl = 539; +const int CSSValueTb = 540; +const int numCSSValueKeywords = 541; const size_t maxCSSValueKeywordLength = 31; const char* getValueName(unsigned short id); diff --git a/src/3rdparty/webkit/WebCore/generated/Grammar.cpp b/src/3rdparty/webkit/WebCore/generated/Grammar.cpp index d1a7a8010e..6e976b96a6 100644 --- a/src/3rdparty/webkit/WebCore/generated/Grammar.cpp +++ b/src/3rdparty/webkit/WebCore/generated/Grammar.cpp @@ -113,8 +113,12 @@ #include "CommonIdentifiers.h" #include "NodeInfo.h" #include "Parser.h" +#include <wtf/FastMalloc.h> #include <wtf/MathExtras.h> +#define YYMALLOC fastMalloc +#define YYFREE fastFree + #define YYMAXDEPTH 10000 #define YYENABLE_NLS 0 @@ -165,12 +169,6 @@ static ExpressionNode* combineCommaNodes(void*, ExpressionNode* list, Expression #pragma warning(disable: 4244) #pragma warning(disable: 4702) -// At least some of the time, the declarations of malloc and free that bison -// generates are causing warnings. A way to avoid this is to explicitly define -// the macros so that bison doesn't try to declare malloc and free. -#define YYMALLOC malloc -#define YYFREE free - #endif #define YYPARSE_PARAM globalPtr @@ -232,7 +230,7 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D /* Line 189 of yacc.c */ -#line 236 "WebCore/tmp/../generated/Grammar.tab.c" +#line 234 "WebCore/tmp/../generated/Grammar.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -332,7 +330,7 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 157 "../../JavaScriptCore/parser/Grammar.y" +#line 155 "../../JavaScriptCore/parser/Grammar.y" int intValue; double doubleValue; @@ -367,7 +365,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 371 "WebCore/tmp/../generated/Grammar.tab.c" +#line 369 "WebCore/tmp/../generated/Grammar.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -392,7 +390,7 @@ typedef struct YYLTYPE /* Line 264 of yacc.c */ -#line 396 "WebCore/tmp/../generated/Grammar.tab.c" +#line 394 "WebCore/tmp/../generated/Grammar.tab.c" #ifdef short # undef short @@ -946,66 +944,66 @@ static const yytype_int16 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 290, 290, 291, 292, 293, 294, 295, 304, 316, - 317, 318, 319, 320, 332, 336, 343, 344, 345, 347, - 351, 352, 353, 354, 355, 359, 360, 361, 365, 369, - 377, 378, 382, 383, 387, 388, 389, 393, 397, 404, - 405, 409, 413, 420, 421, 428, 429, 436, 437, 438, - 442, 448, 449, 450, 454, 461, 462, 466, 470, 477, - 478, 482, 483, 487, 488, 489, 493, 494, 495, 499, - 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, - 512, 513, 517, 518, 522, 523, 524, 525, 529, 530, - 532, 534, 539, 540, 541, 545, 546, 548, 553, 554, - 555, 556, 560, 561, 562, 563, 567, 568, 569, 570, - 571, 572, 575, 581, 582, 583, 584, 585, 586, 593, - 594, 595, 596, 597, 598, 602, 609, 610, 611, 612, - 613, 617, 618, 620, 622, 624, 629, 630, 632, 633, - 635, 640, 641, 645, 646, 651, 652, 656, 657, 661, - 662, 667, 668, 673, 674, 678, 679, 684, 685, 690, - 691, 695, 696, 701, 702, 707, 708, 712, 713, 718, - 719, 723, 724, 729, 730, 735, 736, 741, 742, 749, - 750, 757, 758, 765, 766, 767, 768, 769, 770, 771, - 772, 773, 774, 775, 776, 780, 781, 785, 786, 790, - 791, 795, 796, 797, 798, 799, 800, 801, 802, 803, - 804, 805, 806, 807, 808, 809, 810, 811, 815, 817, - 822, 824, 830, 837, 846, 854, 867, 874, 883, 891, - 904, 906, 912, 920, 932, 933, 937, 941, 945, 949, - 951, 956, 959, 969, 971, 973, 975, 981, 988, 997, - 1003, 1014, 1015, 1019, 1020, 1024, 1028, 1032, 1036, 1043, - 1046, 1049, 1052, 1058, 1061, 1064, 1067, 1073, 1079, 1085, - 1086, 1095, 1096, 1100, 1106, 1116, 1117, 1121, 1122, 1126, - 1132, 1136, 1143, 1149, 1155, 1165, 1167, 1172, 1173, 1184, - 1185, 1192, 1193, 1203, 1206, 1212, 1213, 1217, 1218, 1223, - 1230, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1251, 1252, - 1253, 1254, 1255, 1259, 1260, 1264, 1265, 1266, 1268, 1272, - 1273, 1274, 1275, 1276, 1280, 1281, 1282, 1286, 1287, 1290, - 1292, 1296, 1297, 1301, 1302, 1303, 1304, 1305, 1309, 1310, - 1311, 1312, 1316, 1317, 1321, 1322, 1326, 1327, 1328, 1329, - 1333, 1334, 1335, 1336, 1340, 1341, 1345, 1346, 1350, 1351, - 1355, 1356, 1360, 1361, 1362, 1366, 1367, 1368, 1372, 1373, - 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1385, - 1386, 1390, 1391, 1395, 1396, 1397, 1398, 1402, 1403, 1404, - 1405, 1409, 1410, 1411, 1415, 1416, 1417, 1421, 1422, 1423, - 1424, 1428, 1429, 1430, 1431, 1435, 1436, 1437, 1438, 1439, - 1440, 1441, 1445, 1446, 1447, 1448, 1449, 1450, 1454, 1455, - 1456, 1457, 1458, 1459, 1460, 1464, 1465, 1466, 1467, 1468, - 1472, 1473, 1474, 1475, 1476, 1480, 1481, 1482, 1483, 1484, - 1488, 1489, 1493, 1494, 1498, 1499, 1503, 1504, 1508, 1509, - 1513, 1514, 1518, 1519, 1523, 1524, 1528, 1529, 1533, 1534, - 1538, 1539, 1543, 1544, 1548, 1549, 1553, 1554, 1558, 1559, - 1563, 1564, 1568, 1569, 1573, 1574, 1578, 1579, 1583, 1584, - 1588, 1589, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, - 1601, 1602, 1603, 1604, 1608, 1609, 1613, 1614, 1618, 1619, - 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, - 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1643, 1644, 1648, - 1649, 1653, 1654, 1655, 1656, 1660, 1661, 1662, 1663, 1667, - 1668, 1672, 1673, 1677, 1678, 1682, 1686, 1690, 1694, 1695, - 1699, 1700, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, - 1714, 1716, 1719, 1721, 1725, 1726, 1727, 1728, 1732, 1733, - 1734, 1735, 1739, 1740, 1741, 1742, 1746, 1750, 1754, 1755, - 1758, 1760, 1764, 1765, 1769, 1770, 1774, 1775, 1779, 1783, - 1784, 1788, 1789, 1790, 1794, 1795, 1799, 1800, 1804, 1805, - 1806, 1807, 1811, 1812, 1815, 1817, 1821, 1822 + 0, 288, 288, 289, 290, 291, 292, 293, 302, 314, + 315, 316, 317, 318, 330, 334, 341, 342, 343, 345, + 349, 350, 351, 352, 353, 357, 358, 359, 363, 367, + 375, 376, 380, 381, 385, 386, 387, 391, 395, 402, + 403, 407, 411, 418, 419, 426, 427, 434, 435, 436, + 440, 446, 447, 448, 452, 459, 460, 464, 468, 475, + 476, 480, 481, 485, 486, 487, 491, 492, 493, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, + 510, 511, 515, 516, 520, 521, 522, 523, 527, 528, + 530, 532, 537, 538, 539, 543, 544, 546, 551, 552, + 553, 554, 558, 559, 560, 561, 565, 566, 567, 568, + 569, 570, 573, 579, 580, 581, 582, 583, 584, 591, + 592, 593, 594, 595, 596, 600, 607, 608, 609, 610, + 611, 615, 616, 618, 620, 622, 627, 628, 630, 631, + 633, 638, 639, 643, 644, 649, 650, 654, 655, 659, + 660, 665, 666, 671, 672, 676, 677, 682, 683, 688, + 689, 693, 694, 699, 700, 705, 706, 710, 711, 716, + 717, 721, 722, 727, 728, 733, 734, 739, 740, 747, + 748, 755, 756, 763, 764, 765, 766, 767, 768, 769, + 770, 771, 772, 773, 774, 778, 779, 783, 784, 788, + 789, 793, 794, 795, 796, 797, 798, 799, 800, 801, + 802, 803, 804, 805, 806, 807, 808, 809, 813, 815, + 820, 822, 828, 835, 844, 852, 865, 872, 881, 889, + 902, 904, 910, 918, 930, 931, 935, 939, 943, 947, + 949, 954, 957, 967, 969, 971, 973, 979, 986, 995, + 1001, 1012, 1013, 1017, 1018, 1022, 1026, 1030, 1034, 1041, + 1044, 1047, 1050, 1056, 1059, 1062, 1065, 1071, 1077, 1083, + 1084, 1093, 1094, 1098, 1104, 1114, 1115, 1119, 1120, 1124, + 1130, 1134, 1141, 1147, 1153, 1163, 1165, 1170, 1171, 1182, + 1183, 1190, 1191, 1201, 1204, 1210, 1211, 1215, 1216, 1221, + 1228, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1249, 1250, + 1251, 1252, 1253, 1257, 1258, 1262, 1263, 1264, 1266, 1270, + 1271, 1272, 1273, 1274, 1278, 1279, 1280, 1284, 1285, 1288, + 1290, 1294, 1295, 1299, 1300, 1301, 1302, 1303, 1307, 1308, + 1309, 1310, 1314, 1315, 1319, 1320, 1324, 1325, 1326, 1327, + 1331, 1332, 1333, 1334, 1338, 1339, 1343, 1344, 1348, 1349, + 1353, 1354, 1358, 1359, 1360, 1364, 1365, 1366, 1370, 1371, + 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1383, + 1384, 1388, 1389, 1393, 1394, 1395, 1396, 1400, 1401, 1402, + 1403, 1407, 1408, 1409, 1413, 1414, 1415, 1419, 1420, 1421, + 1422, 1426, 1427, 1428, 1429, 1433, 1434, 1435, 1436, 1437, + 1438, 1439, 1443, 1444, 1445, 1446, 1447, 1448, 1452, 1453, + 1454, 1455, 1456, 1457, 1458, 1462, 1463, 1464, 1465, 1466, + 1470, 1471, 1472, 1473, 1474, 1478, 1479, 1480, 1481, 1482, + 1486, 1487, 1491, 1492, 1496, 1497, 1501, 1502, 1506, 1507, + 1511, 1512, 1516, 1517, 1521, 1522, 1526, 1527, 1531, 1532, + 1536, 1537, 1541, 1542, 1546, 1547, 1551, 1552, 1556, 1557, + 1561, 1562, 1566, 1567, 1571, 1572, 1576, 1577, 1581, 1582, + 1586, 1587, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, + 1599, 1600, 1601, 1602, 1606, 1607, 1611, 1612, 1616, 1617, + 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, + 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1641, 1642, 1646, + 1647, 1651, 1652, 1653, 1654, 1658, 1659, 1660, 1661, 1665, + 1666, 1670, 1671, 1675, 1676, 1680, 1684, 1688, 1692, 1693, + 1697, 1698, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, + 1712, 1714, 1717, 1719, 1723, 1724, 1725, 1726, 1730, 1731, + 1732, 1733, 1737, 1738, 1739, 1740, 1744, 1748, 1752, 1753, + 1756, 1758, 1762, 1763, 1767, 1768, 1772, 1773, 1777, 1781, + 1782, 1786, 1787, 1788, 1792, 1793, 1797, 1798, 1802, 1803, + 1804, 1805, 1809, 1810, 1813, 1815, 1819, 1820 }; #endif @@ -2970,42 +2968,42 @@ yyreduce: case 2: /* Line 1455 of yacc.c */ -#line 290 "../../JavaScriptCore/parser/Grammar.y" +#line 288 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NullNode(GLOBAL_DATA), 0, 1); ;} break; case 3: /* Line 1455 of yacc.c */ -#line 291 "../../JavaScriptCore/parser/Grammar.y" +#line 289 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, true), 0, 1); ;} break; case 4: /* Line 1455 of yacc.c */ -#line 292 "../../JavaScriptCore/parser/Grammar.y" +#line 290 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, false), 0, 1); ;} break; case 5: /* Line 1455 of yacc.c */ -#line 293 "../../JavaScriptCore/parser/Grammar.y" +#line 291 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNumberNode(GLOBAL_DATA, (yyvsp[(1) - (1)].doubleValue)), 0, 1); ;} break; case 6: /* Line 1455 of yacc.c */ -#line 294 "../../JavaScriptCore/parser/Grammar.y" +#line 292 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StringNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)), 0, 1); ;} break; case 7: /* Line 1455 of yacc.c */ -#line 295 "../../JavaScriptCore/parser/Grammar.y" +#line 293 "../../JavaScriptCore/parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) @@ -3020,7 +3018,7 @@ yyreduce: case 8: /* Line 1455 of yacc.c */ -#line 304 "../../JavaScriptCore/parser/Grammar.y" +#line 302 "../../JavaScriptCore/parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) @@ -3035,35 +3033,35 @@ yyreduce: case 9: /* Line 1455 of yacc.c */ -#line 316 "../../JavaScriptCore/parser/Grammar.y" +#line 314 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 10: /* Line 1455 of yacc.c */ -#line 317 "../../JavaScriptCore/parser/Grammar.y" +#line 315 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 11: /* Line 1455 of yacc.c */ -#line 318 "../../JavaScriptCore/parser/Grammar.y" +#line 316 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, Identifier(GLOBAL_DATA, UString::from((yyvsp[(1) - (3)].doubleValue))), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 12: /* Line 1455 of yacc.c */ -#line 319 "../../JavaScriptCore/parser/Grammar.y" +#line 317 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (7)].ident), *(yyvsp[(2) - (7)].ident), 0, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); if (!(yyval.propertyNode).m_node) YYABORT; ;} break; case 13: /* Line 1455 of yacc.c */ -#line 321 "../../JavaScriptCore/parser/Grammar.y" +#line 319 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (8)].ident), *(yyvsp[(2) - (8)].ident), (yyvsp[(4) - (8)].parameterList).m_node.head, (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line)), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature) @@ -3077,7 +3075,7 @@ yyreduce: case 14: /* Line 1455 of yacc.c */ -#line 332 "../../JavaScriptCore/parser/Grammar.y" +#line 330 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyList).m_node.head = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].propertyNode).m_node); (yyval.propertyList).m_node.tail = (yyval.propertyList).m_node.head; (yyval.propertyList).m_features = (yyvsp[(1) - (1)].propertyNode).m_features; @@ -3087,7 +3085,7 @@ yyreduce: case 15: /* Line 1455 of yacc.c */ -#line 336 "../../JavaScriptCore/parser/Grammar.y" +#line 334 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyList).m_node.head = (yyvsp[(1) - (3)].propertyList).m_node.head; (yyval.propertyList).m_node.tail = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(3) - (3)].propertyNode).m_node, (yyvsp[(1) - (3)].propertyList).m_node.tail); (yyval.propertyList).m_features = (yyvsp[(1) - (3)].propertyList).m_features | (yyvsp[(3) - (3)].propertyNode).m_features; @@ -3097,70 +3095,70 @@ yyreduce: case 17: /* Line 1455 of yacc.c */ -#line 344 "../../JavaScriptCore/parser/Grammar.y" +#line 342 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA), 0, 0); ;} break; case 18: /* Line 1455 of yacc.c */ -#line 345 "../../JavaScriptCore/parser/Grammar.y" +#line 343 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (3)].propertyList).m_node.head), (yyvsp[(2) - (3)].propertyList).m_features, (yyvsp[(2) - (3)].propertyList).m_numConstants); ;} break; case 19: /* Line 1455 of yacc.c */ -#line 347 "../../JavaScriptCore/parser/Grammar.y" +#line 345 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (4)].propertyList).m_node.head), (yyvsp[(2) - (4)].propertyList).m_features, (yyvsp[(2) - (4)].propertyList).m_numConstants); ;} break; case 20: /* Line 1455 of yacc.c */ -#line 351 "../../JavaScriptCore/parser/Grammar.y" +#line 349 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ThisNode(GLOBAL_DATA), ThisFeature, 0); ;} break; case 23: /* Line 1455 of yacc.c */ -#line 354 "../../JavaScriptCore/parser/Grammar.y" +#line 352 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), (yylsp[(1) - (1)]).first_column), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 24: /* Line 1455 of yacc.c */ -#line 355 "../../JavaScriptCore/parser/Grammar.y" +#line 353 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (3)].expressionNode); ;} break; case 25: /* Line 1455 of yacc.c */ -#line 359 "../../JavaScriptCore/parser/Grammar.y" +#line 357 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].intValue)), 0, (yyvsp[(2) - (3)].intValue) ? 1 : 0); ;} break; case 26: /* Line 1455 of yacc.c */ -#line 360 "../../JavaScriptCore/parser/Grammar.y" +#line 358 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].elementList).m_node.head), (yyvsp[(2) - (3)].elementList).m_features, (yyvsp[(2) - (3)].elementList).m_numConstants); ;} break; case 27: /* Line 1455 of yacc.c */ -#line 361 "../../JavaScriptCore/parser/Grammar.y" +#line 359 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(4) - (5)].intValue), (yyvsp[(2) - (5)].elementList).m_node.head), (yyvsp[(2) - (5)].elementList).m_features, (yyvsp[(4) - (5)].intValue) ? (yyvsp[(2) - (5)].elementList).m_numConstants + 1 : (yyvsp[(2) - (5)].elementList).m_numConstants); ;} break; case 28: /* Line 1455 of yacc.c */ -#line 365 "../../JavaScriptCore/parser/Grammar.y" +#line 363 "../../JavaScriptCore/parser/Grammar.y" { (yyval.elementList).m_node.head = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].intValue), (yyvsp[(2) - (2)].expressionNode).m_node); (yyval.elementList).m_node.tail = (yyval.elementList).m_node.head; (yyval.elementList).m_features = (yyvsp[(2) - (2)].expressionNode).m_features; @@ -3170,7 +3168,7 @@ yyreduce: case 29: /* Line 1455 of yacc.c */ -#line 370 "../../JavaScriptCore/parser/Grammar.y" +#line 368 "../../JavaScriptCore/parser/Grammar.y" { (yyval.elementList).m_node.head = (yyvsp[(1) - (4)].elementList).m_node.head; (yyval.elementList).m_node.tail = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (4)].elementList).m_node.tail, (yyvsp[(3) - (4)].intValue), (yyvsp[(4) - (4)].expressionNode).m_node); (yyval.elementList).m_features = (yyvsp[(1) - (4)].elementList).m_features | (yyvsp[(4) - (4)].expressionNode).m_features; @@ -3180,35 +3178,35 @@ yyreduce: case 30: /* Line 1455 of yacc.c */ -#line 377 "../../JavaScriptCore/parser/Grammar.y" +#line 375 "../../JavaScriptCore/parser/Grammar.y" { (yyval.intValue) = 0; ;} break; case 32: /* Line 1455 of yacc.c */ -#line 382 "../../JavaScriptCore/parser/Grammar.y" +#line 380 "../../JavaScriptCore/parser/Grammar.y" { (yyval.intValue) = 1; ;} break; case 33: /* Line 1455 of yacc.c */ -#line 383 "../../JavaScriptCore/parser/Grammar.y" +#line 381 "../../JavaScriptCore/parser/Grammar.y" { (yyval.intValue) = (yyvsp[(1) - (2)].intValue) + 1; ;} break; case 35: /* Line 1455 of yacc.c */ -#line 388 "../../JavaScriptCore/parser/Grammar.y" +#line 386 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>((yyvsp[(1) - (1)].funcExprNode).m_node, (yyvsp[(1) - (1)].funcExprNode).m_features, (yyvsp[(1) - (1)].funcExprNode).m_numConstants); ;} break; case 36: /* Line 1455 of yacc.c */ -#line 389 "../../JavaScriptCore/parser/Grammar.y" +#line 387 "../../JavaScriptCore/parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants); @@ -3218,7 +3216,7 @@ yyreduce: case 37: /* Line 1455 of yacc.c */ -#line 393 "../../JavaScriptCore/parser/Grammar.y" +#line 391 "../../JavaScriptCore/parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); @@ -3228,7 +3226,7 @@ yyreduce: case 38: /* Line 1455 of yacc.c */ -#line 397 "../../JavaScriptCore/parser/Grammar.y" +#line 395 "../../JavaScriptCore/parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].argumentsNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].argumentsNode).m_numConstants); @@ -3238,7 +3236,7 @@ yyreduce: case 40: /* Line 1455 of yacc.c */ -#line 405 "../../JavaScriptCore/parser/Grammar.y" +#line 403 "../../JavaScriptCore/parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants); @@ -3248,7 +3246,7 @@ yyreduce: case 41: /* Line 1455 of yacc.c */ -#line 409 "../../JavaScriptCore/parser/Grammar.y" +#line 407 "../../JavaScriptCore/parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); @@ -3258,7 +3256,7 @@ yyreduce: case 42: /* Line 1455 of yacc.c */ -#line 413 "../../JavaScriptCore/parser/Grammar.y" +#line 411 "../../JavaScriptCore/parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].argumentsNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].argumentsNode).m_numConstants); @@ -3268,7 +3266,7 @@ yyreduce: case 44: /* Line 1455 of yacc.c */ -#line 421 "../../JavaScriptCore/parser/Grammar.y" +#line 419 "../../JavaScriptCore/parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); @@ -3278,7 +3276,7 @@ yyreduce: case 46: /* Line 1455 of yacc.c */ -#line 429 "../../JavaScriptCore/parser/Grammar.y" +#line 427 "../../JavaScriptCore/parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); @@ -3288,21 +3286,21 @@ yyreduce: case 47: /* Line 1455 of yacc.c */ -#line 436 "../../JavaScriptCore/parser/Grammar.y" +#line 434 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 48: /* Line 1455 of yacc.c */ -#line 437 "../../JavaScriptCore/parser/Grammar.y" +#line 435 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 49: /* Line 1455 of yacc.c */ -#line 438 "../../JavaScriptCore/parser/Grammar.y" +#line 436 "../../JavaScriptCore/parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants); @@ -3312,7 +3310,7 @@ yyreduce: case 50: /* Line 1455 of yacc.c */ -#line 442 "../../JavaScriptCore/parser/Grammar.y" +#line 440 "../../JavaScriptCore/parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); ;} @@ -3321,21 +3319,21 @@ yyreduce: case 51: /* Line 1455 of yacc.c */ -#line 448 "../../JavaScriptCore/parser/Grammar.y" +#line 446 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 52: /* Line 1455 of yacc.c */ -#line 449 "../../JavaScriptCore/parser/Grammar.y" +#line 447 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 53: /* Line 1455 of yacc.c */ -#line 450 "../../JavaScriptCore/parser/Grammar.y" +#line 448 "../../JavaScriptCore/parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants); @@ -3345,7 +3343,7 @@ yyreduce: case 54: /* Line 1455 of yacc.c */ -#line 454 "../../JavaScriptCore/parser/Grammar.y" +#line 452 "../../JavaScriptCore/parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); @@ -3355,21 +3353,21 @@ yyreduce: case 55: /* Line 1455 of yacc.c */ -#line 461 "../../JavaScriptCore/parser/Grammar.y" +#line 459 "../../JavaScriptCore/parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA), 0, 0); ;} break; case 56: /* Line 1455 of yacc.c */ -#line 462 "../../JavaScriptCore/parser/Grammar.y" +#line 460 "../../JavaScriptCore/parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA, (yyvsp[(2) - (3)].argumentList).m_node.head), (yyvsp[(2) - (3)].argumentList).m_features, (yyvsp[(2) - (3)].argumentList).m_numConstants); ;} break; case 57: /* Line 1455 of yacc.c */ -#line 466 "../../JavaScriptCore/parser/Grammar.y" +#line 464 "../../JavaScriptCore/parser/Grammar.y" { (yyval.argumentList).m_node.head = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].expressionNode).m_node); (yyval.argumentList).m_node.tail = (yyval.argumentList).m_node.head; (yyval.argumentList).m_features = (yyvsp[(1) - (1)].expressionNode).m_features; @@ -3379,7 +3377,7 @@ yyreduce: case 58: /* Line 1455 of yacc.c */ -#line 470 "../../JavaScriptCore/parser/Grammar.y" +#line 468 "../../JavaScriptCore/parser/Grammar.y" { (yyval.argumentList).m_node.head = (yyvsp[(1) - (3)].argumentList).m_node.head; (yyval.argumentList).m_node.tail = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (3)].argumentList).m_node.tail, (yyvsp[(3) - (3)].expressionNode).m_node); (yyval.argumentList).m_features = (yyvsp[(1) - (3)].argumentList).m_features | (yyvsp[(3) - (3)].expressionNode).m_features; @@ -3389,252 +3387,252 @@ yyreduce: case 64: /* Line 1455 of yacc.c */ -#line 488 "../../JavaScriptCore/parser/Grammar.y" +#line 486 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 65: /* Line 1455 of yacc.c */ -#line 489 "../../JavaScriptCore/parser/Grammar.y" +#line 487 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 67: /* Line 1455 of yacc.c */ -#line 494 "../../JavaScriptCore/parser/Grammar.y" +#line 492 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 68: /* Line 1455 of yacc.c */ -#line 495 "../../JavaScriptCore/parser/Grammar.y" +#line 493 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 69: /* Line 1455 of yacc.c */ -#line 499 "../../JavaScriptCore/parser/Grammar.y" +#line 497 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDeleteNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 70: /* Line 1455 of yacc.c */ -#line 500 "../../JavaScriptCore/parser/Grammar.y" +#line 498 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) VoidNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants + 1); ;} break; case 71: /* Line 1455 of yacc.c */ -#line 501 "../../JavaScriptCore/parser/Grammar.y" +#line 499 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeTypeOfNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 72: /* Line 1455 of yacc.c */ -#line 502 "../../JavaScriptCore/parser/Grammar.y" +#line 500 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 73: /* Line 1455 of yacc.c */ -#line 503 "../../JavaScriptCore/parser/Grammar.y" +#line 501 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 74: /* Line 1455 of yacc.c */ -#line 504 "../../JavaScriptCore/parser/Grammar.y" +#line 502 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 75: /* Line 1455 of yacc.c */ -#line 505 "../../JavaScriptCore/parser/Grammar.y" +#line 503 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 76: /* Line 1455 of yacc.c */ -#line 506 "../../JavaScriptCore/parser/Grammar.y" +#line 504 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnaryPlusNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 77: /* Line 1455 of yacc.c */ -#line 507 "../../JavaScriptCore/parser/Grammar.y" +#line 505 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNegateNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 78: /* Line 1455 of yacc.c */ -#line 508 "../../JavaScriptCore/parser/Grammar.y" +#line 506 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeBitwiseNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 79: /* Line 1455 of yacc.c */ -#line 509 "../../JavaScriptCore/parser/Grammar.y" +#line 507 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 85: /* Line 1455 of yacc.c */ -#line 523 "../../JavaScriptCore/parser/Grammar.y" +#line 521 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 86: /* Line 1455 of yacc.c */ -#line 524 "../../JavaScriptCore/parser/Grammar.y" +#line 522 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 87: /* Line 1455 of yacc.c */ -#line 525 "../../JavaScriptCore/parser/Grammar.y" +#line 523 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 89: /* Line 1455 of yacc.c */ -#line 531 "../../JavaScriptCore/parser/Grammar.y" +#line 529 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 90: /* Line 1455 of yacc.c */ -#line 533 "../../JavaScriptCore/parser/Grammar.y" +#line 531 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 91: /* Line 1455 of yacc.c */ -#line 535 "../../JavaScriptCore/parser/Grammar.y" +#line 533 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 93: /* Line 1455 of yacc.c */ -#line 540 "../../JavaScriptCore/parser/Grammar.y" +#line 538 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 94: /* Line 1455 of yacc.c */ -#line 541 "../../JavaScriptCore/parser/Grammar.y" +#line 539 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 96: /* Line 1455 of yacc.c */ -#line 547 "../../JavaScriptCore/parser/Grammar.y" +#line 545 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 97: /* Line 1455 of yacc.c */ -#line 549 "../../JavaScriptCore/parser/Grammar.y" +#line 547 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 99: /* Line 1455 of yacc.c */ -#line 554 "../../JavaScriptCore/parser/Grammar.y" +#line 552 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 100: /* Line 1455 of yacc.c */ -#line 555 "../../JavaScriptCore/parser/Grammar.y" +#line 553 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 101: /* Line 1455 of yacc.c */ -#line 556 "../../JavaScriptCore/parser/Grammar.y" +#line 554 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 103: /* Line 1455 of yacc.c */ -#line 561 "../../JavaScriptCore/parser/Grammar.y" +#line 559 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 104: /* Line 1455 of yacc.c */ -#line 562 "../../JavaScriptCore/parser/Grammar.y" +#line 560 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 105: /* Line 1455 of yacc.c */ -#line 563 "../../JavaScriptCore/parser/Grammar.y" +#line 561 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 107: /* Line 1455 of yacc.c */ -#line 568 "../../JavaScriptCore/parser/Grammar.y" +#line 566 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 108: /* Line 1455 of yacc.c */ -#line 569 "../../JavaScriptCore/parser/Grammar.y" +#line 567 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 109: /* Line 1455 of yacc.c */ -#line 570 "../../JavaScriptCore/parser/Grammar.y" +#line 568 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 110: /* Line 1455 of yacc.c */ -#line 571 "../../JavaScriptCore/parser/Grammar.y" +#line 569 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 111: /* Line 1455 of yacc.c */ -#line 572 "../../JavaScriptCore/parser/Grammar.y" +#line 570 "../../JavaScriptCore/parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3643,7 +3641,7 @@ yyreduce: case 112: /* Line 1455 of yacc.c */ -#line 575 "../../JavaScriptCore/parser/Grammar.y" +#line 573 "../../JavaScriptCore/parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3652,35 +3650,35 @@ yyreduce: case 114: /* Line 1455 of yacc.c */ -#line 582 "../../JavaScriptCore/parser/Grammar.y" +#line 580 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 115: /* Line 1455 of yacc.c */ -#line 583 "../../JavaScriptCore/parser/Grammar.y" +#line 581 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 116: /* Line 1455 of yacc.c */ -#line 584 "../../JavaScriptCore/parser/Grammar.y" +#line 582 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 117: /* Line 1455 of yacc.c */ -#line 585 "../../JavaScriptCore/parser/Grammar.y" +#line 583 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 118: /* Line 1455 of yacc.c */ -#line 587 "../../JavaScriptCore/parser/Grammar.y" +#line 585 "../../JavaScriptCore/parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3689,35 +3687,35 @@ yyreduce: case 120: /* Line 1455 of yacc.c */ -#line 594 "../../JavaScriptCore/parser/Grammar.y" +#line 592 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 121: /* Line 1455 of yacc.c */ -#line 595 "../../JavaScriptCore/parser/Grammar.y" +#line 593 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 122: /* Line 1455 of yacc.c */ -#line 596 "../../JavaScriptCore/parser/Grammar.y" +#line 594 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 123: /* Line 1455 of yacc.c */ -#line 597 "../../JavaScriptCore/parser/Grammar.y" +#line 595 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 124: /* Line 1455 of yacc.c */ -#line 599 "../../JavaScriptCore/parser/Grammar.y" +#line 597 "../../JavaScriptCore/parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3726,7 +3724,7 @@ yyreduce: case 125: /* Line 1455 of yacc.c */ -#line 603 "../../JavaScriptCore/parser/Grammar.y" +#line 601 "../../JavaScriptCore/parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3735,217 +3733,217 @@ yyreduce: case 127: /* Line 1455 of yacc.c */ -#line 610 "../../JavaScriptCore/parser/Grammar.y" +#line 608 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 128: /* Line 1455 of yacc.c */ -#line 611 "../../JavaScriptCore/parser/Grammar.y" +#line 609 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 129: /* Line 1455 of yacc.c */ -#line 612 "../../JavaScriptCore/parser/Grammar.y" +#line 610 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 130: /* Line 1455 of yacc.c */ -#line 613 "../../JavaScriptCore/parser/Grammar.y" +#line 611 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 132: /* Line 1455 of yacc.c */ -#line 619 "../../JavaScriptCore/parser/Grammar.y" +#line 617 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 133: /* Line 1455 of yacc.c */ -#line 621 "../../JavaScriptCore/parser/Grammar.y" +#line 619 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 134: /* Line 1455 of yacc.c */ -#line 623 "../../JavaScriptCore/parser/Grammar.y" +#line 621 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 135: /* Line 1455 of yacc.c */ -#line 625 "../../JavaScriptCore/parser/Grammar.y" +#line 623 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 137: /* Line 1455 of yacc.c */ -#line 631 "../../JavaScriptCore/parser/Grammar.y" +#line 629 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 138: /* Line 1455 of yacc.c */ -#line 632 "../../JavaScriptCore/parser/Grammar.y" +#line 630 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 139: /* Line 1455 of yacc.c */ -#line 634 "../../JavaScriptCore/parser/Grammar.y" +#line 632 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 140: /* Line 1455 of yacc.c */ -#line 636 "../../JavaScriptCore/parser/Grammar.y" +#line 634 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 142: /* Line 1455 of yacc.c */ -#line 641 "../../JavaScriptCore/parser/Grammar.y" +#line 639 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 144: /* Line 1455 of yacc.c */ -#line 647 "../../JavaScriptCore/parser/Grammar.y" +#line 645 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 146: /* Line 1455 of yacc.c */ -#line 652 "../../JavaScriptCore/parser/Grammar.y" +#line 650 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 148: /* Line 1455 of yacc.c */ -#line 657 "../../JavaScriptCore/parser/Grammar.y" +#line 655 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 150: /* Line 1455 of yacc.c */ -#line 663 "../../JavaScriptCore/parser/Grammar.y" +#line 661 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 152: /* Line 1455 of yacc.c */ -#line 669 "../../JavaScriptCore/parser/Grammar.y" +#line 667 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 154: /* Line 1455 of yacc.c */ -#line 674 "../../JavaScriptCore/parser/Grammar.y" +#line 672 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 156: /* Line 1455 of yacc.c */ -#line 680 "../../JavaScriptCore/parser/Grammar.y" +#line 678 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 158: /* Line 1455 of yacc.c */ -#line 686 "../../JavaScriptCore/parser/Grammar.y" +#line 684 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 160: /* Line 1455 of yacc.c */ -#line 691 "../../JavaScriptCore/parser/Grammar.y" +#line 689 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 162: /* Line 1455 of yacc.c */ -#line 697 "../../JavaScriptCore/parser/Grammar.y" +#line 695 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 164: /* Line 1455 of yacc.c */ -#line 703 "../../JavaScriptCore/parser/Grammar.y" +#line 701 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 166: /* Line 1455 of yacc.c */ -#line 708 "../../JavaScriptCore/parser/Grammar.y" +#line 706 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 168: /* Line 1455 of yacc.c */ -#line 714 "../../JavaScriptCore/parser/Grammar.y" +#line 712 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 170: /* Line 1455 of yacc.c */ -#line 719 "../../JavaScriptCore/parser/Grammar.y" +#line 717 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 172: /* Line 1455 of yacc.c */ -#line 725 "../../JavaScriptCore/parser/Grammar.y" +#line 723 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 174: /* Line 1455 of yacc.c */ -#line 731 "../../JavaScriptCore/parser/Grammar.y" +#line 729 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 176: /* Line 1455 of yacc.c */ -#line 737 "../../JavaScriptCore/parser/Grammar.y" +#line 735 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 178: /* Line 1455 of yacc.c */ -#line 743 "../../JavaScriptCore/parser/Grammar.y" +#line 741 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3954,7 +3952,7 @@ yyreduce: case 180: /* Line 1455 of yacc.c */ -#line 751 "../../JavaScriptCore/parser/Grammar.y" +#line 749 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3963,7 +3961,7 @@ yyreduce: case 182: /* Line 1455 of yacc.c */ -#line 759 "../../JavaScriptCore/parser/Grammar.y" +#line 757 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} @@ -3972,112 +3970,112 @@ yyreduce: case 183: /* Line 1455 of yacc.c */ -#line 765 "../../JavaScriptCore/parser/Grammar.y" +#line 763 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpEqual; ;} break; case 184: /* Line 1455 of yacc.c */ -#line 766 "../../JavaScriptCore/parser/Grammar.y" +#line 764 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpPlusEq; ;} break; case 185: /* Line 1455 of yacc.c */ -#line 767 "../../JavaScriptCore/parser/Grammar.y" +#line 765 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpMinusEq; ;} break; case 186: /* Line 1455 of yacc.c */ -#line 768 "../../JavaScriptCore/parser/Grammar.y" +#line 766 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpMultEq; ;} break; case 187: /* Line 1455 of yacc.c */ -#line 769 "../../JavaScriptCore/parser/Grammar.y" +#line 767 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpDivEq; ;} break; case 188: /* Line 1455 of yacc.c */ -#line 770 "../../JavaScriptCore/parser/Grammar.y" +#line 768 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpLShift; ;} break; case 189: /* Line 1455 of yacc.c */ -#line 771 "../../JavaScriptCore/parser/Grammar.y" +#line 769 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpRShift; ;} break; case 190: /* Line 1455 of yacc.c */ -#line 772 "../../JavaScriptCore/parser/Grammar.y" +#line 770 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpURShift; ;} break; case 191: /* Line 1455 of yacc.c */ -#line 773 "../../JavaScriptCore/parser/Grammar.y" +#line 771 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpAndEq; ;} break; case 192: /* Line 1455 of yacc.c */ -#line 774 "../../JavaScriptCore/parser/Grammar.y" +#line 772 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpXOrEq; ;} break; case 193: /* Line 1455 of yacc.c */ -#line 775 "../../JavaScriptCore/parser/Grammar.y" +#line 773 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpOrEq; ;} break; case 194: /* Line 1455 of yacc.c */ -#line 776 "../../JavaScriptCore/parser/Grammar.y" +#line 774 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpModEq; ;} break; case 196: /* Line 1455 of yacc.c */ -#line 781 "../../JavaScriptCore/parser/Grammar.y" +#line 779 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 198: /* Line 1455 of yacc.c */ -#line 786 "../../JavaScriptCore/parser/Grammar.y" +#line 784 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 200: /* Line 1455 of yacc.c */ -#line 791 "../../JavaScriptCore/parser/Grammar.y" +#line 789 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 218: /* Line 1455 of yacc.c */ -#line 815 "../../JavaScriptCore/parser/Grammar.y" +#line 813 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, 0), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; @@ -4085,7 +4083,7 @@ yyreduce: case 219: /* Line 1455 of yacc.c */ -#line 817 "../../JavaScriptCore/parser/Grammar.y" +#line 815 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].sourceElements).m_node), (yyvsp[(2) - (3)].sourceElements).m_varDeclarations, (yyvsp[(2) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (3)].sourceElements).m_features, (yyvsp[(2) - (3)].sourceElements).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; @@ -4093,7 +4091,7 @@ yyreduce: case 220: /* Line 1455 of yacc.c */ -#line 822 "../../JavaScriptCore/parser/Grammar.y" +#line 820 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; @@ -4101,7 +4099,7 @@ yyreduce: case 221: /* Line 1455 of yacc.c */ -#line 824 "../../JavaScriptCore/parser/Grammar.y" +#line 822 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} @@ -4110,7 +4108,7 @@ yyreduce: case 222: /* Line 1455 of yacc.c */ -#line 830 "../../JavaScriptCore/parser/Grammar.y" +#line 828 "../../JavaScriptCore/parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(1) - (1)].ident), 0); @@ -4123,7 +4121,7 @@ yyreduce: case 223: /* Line 1455 of yacc.c */ -#line 837 "../../JavaScriptCore/parser/Grammar.y" +#line 835 "../../JavaScriptCore/parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); (yyval.varDeclList).m_node = node; @@ -4138,7 +4136,7 @@ yyreduce: case 224: /* Line 1455 of yacc.c */ -#line 847 "../../JavaScriptCore/parser/Grammar.y" +#line 845 "../../JavaScriptCore/parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(3) - (3)].ident), 0); @@ -4151,7 +4149,7 @@ yyreduce: case 225: /* Line 1455 of yacc.c */ -#line 855 "../../JavaScriptCore/parser/Grammar.y" +#line 853 "../../JavaScriptCore/parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); (yyval.varDeclList).m_node = combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (4)].varDeclList).m_node, node); @@ -4166,7 +4164,7 @@ yyreduce: case 226: /* Line 1455 of yacc.c */ -#line 867 "../../JavaScriptCore/parser/Grammar.y" +#line 865 "../../JavaScriptCore/parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(1) - (1)].ident), 0); @@ -4179,7 +4177,7 @@ yyreduce: case 227: /* Line 1455 of yacc.c */ -#line 874 "../../JavaScriptCore/parser/Grammar.y" +#line 872 "../../JavaScriptCore/parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); (yyval.varDeclList).m_node = node; @@ -4194,7 +4192,7 @@ yyreduce: case 228: /* Line 1455 of yacc.c */ -#line 884 "../../JavaScriptCore/parser/Grammar.y" +#line 882 "../../JavaScriptCore/parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(3) - (3)].ident), 0); @@ -4207,7 +4205,7 @@ yyreduce: case 229: /* Line 1455 of yacc.c */ -#line 892 "../../JavaScriptCore/parser/Grammar.y" +#line 890 "../../JavaScriptCore/parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); (yyval.varDeclList).m_node = combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (4)].varDeclList).m_node, node); @@ -4222,7 +4220,7 @@ yyreduce: case 230: /* Line 1455 of yacc.c */ -#line 904 "../../JavaScriptCore/parser/Grammar.y" +#line 902 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; @@ -4230,7 +4228,7 @@ yyreduce: case 231: /* Line 1455 of yacc.c */ -#line 907 "../../JavaScriptCore/parser/Grammar.y" +#line 905 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} break; @@ -4238,7 +4236,7 @@ yyreduce: case 232: /* Line 1455 of yacc.c */ -#line 912 "../../JavaScriptCore/parser/Grammar.y" +#line 910 "../../JavaScriptCore/parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (1)].constDeclNode).m_node; (yyval.constDeclList).m_node.tail = (yyval.constDeclList).m_node.head; (yyval.constDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; @@ -4252,7 +4250,7 @@ yyreduce: case 233: /* Line 1455 of yacc.c */ -#line 921 "../../JavaScriptCore/parser/Grammar.y" +#line 919 "../../JavaScriptCore/parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (3)].constDeclList).m_node.head; (yyvsp[(1) - (3)].constDeclList).m_node.tail->m_next = (yyvsp[(3) - (3)].constDeclNode).m_node; (yyval.constDeclList).m_node.tail = (yyvsp[(3) - (3)].constDeclNode).m_node; @@ -4266,42 +4264,42 @@ yyreduce: case 234: /* Line 1455 of yacc.c */ -#line 932 "../../JavaScriptCore/parser/Grammar.y" +#line 930 "../../JavaScriptCore/parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), 0), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 235: /* Line 1455 of yacc.c */ -#line 933 "../../JavaScriptCore/parser/Grammar.y" +#line 931 "../../JavaScriptCore/parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node), ((*(yyvsp[(1) - (2)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 236: /* Line 1455 of yacc.c */ -#line 937 "../../JavaScriptCore/parser/Grammar.y" +#line 935 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 237: /* Line 1455 of yacc.c */ -#line 941 "../../JavaScriptCore/parser/Grammar.y" +#line 939 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 238: /* Line 1455 of yacc.c */ -#line 945 "../../JavaScriptCore/parser/Grammar.y" +#line 943 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) EmptyStatementNode(GLOBAL_DATA), 0, 0, 0, 0); ;} break; case 239: /* Line 1455 of yacc.c */ -#line 949 "../../JavaScriptCore/parser/Grammar.y" +#line 947 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; @@ -4309,7 +4307,7 @@ yyreduce: case 240: /* Line 1455 of yacc.c */ -#line 951 "../../JavaScriptCore/parser/Grammar.y" +#line 949 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; @@ -4317,7 +4315,7 @@ yyreduce: case 241: /* Line 1455 of yacc.c */ -#line 957 "../../JavaScriptCore/parser/Grammar.y" +#line 955 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; @@ -4325,7 +4323,7 @@ yyreduce: case 242: /* Line 1455 of yacc.c */ -#line 960 "../../JavaScriptCore/parser/Grammar.y" +#line 958 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfElseNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].statementNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node), mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_funcDeclarations, (yyvsp[(7) - (7)].statementNode).m_funcDeclarations), @@ -4337,7 +4335,7 @@ yyreduce: case 243: /* Line 1455 of yacc.c */ -#line 969 "../../JavaScriptCore/parser/Grammar.y" +#line 967 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; @@ -4345,7 +4343,7 @@ yyreduce: case 244: /* Line 1455 of yacc.c */ -#line 971 "../../JavaScriptCore/parser/Grammar.y" +#line 969 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; @@ -4353,7 +4351,7 @@ yyreduce: case 245: /* Line 1455 of yacc.c */ -#line 973 "../../JavaScriptCore/parser/Grammar.y" +#line 971 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WhileNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; @@ -4361,7 +4359,7 @@ yyreduce: case 246: /* Line 1455 of yacc.c */ -#line 976 "../../JavaScriptCore/parser/Grammar.y" +#line 974 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(3) - (9)].expressionNode).m_node, (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, false), (yyvsp[(9) - (9)].statementNode).m_varDeclarations, (yyvsp[(9) - (9)].statementNode).m_funcDeclarations, (yyvsp[(3) - (9)].expressionNode).m_features | (yyvsp[(5) - (9)].expressionNode).m_features | (yyvsp[(7) - (9)].expressionNode).m_features | (yyvsp[(9) - (9)].statementNode).m_features, (yyvsp[(3) - (9)].expressionNode).m_numConstants + (yyvsp[(5) - (9)].expressionNode).m_numConstants + (yyvsp[(7) - (9)].expressionNode).m_numConstants + (yyvsp[(9) - (9)].statementNode).m_numConstants); @@ -4372,7 +4370,7 @@ yyreduce: case 247: /* Line 1455 of yacc.c */ -#line 982 "../../JavaScriptCore/parser/Grammar.y" +#line 980 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(4) - (10)].varDeclList).m_node, (yyvsp[(6) - (10)].expressionNode).m_node, (yyvsp[(8) - (10)].expressionNode).m_node, (yyvsp[(10) - (10)].statementNode).m_node, true), mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_varDeclarations, (yyvsp[(10) - (10)].statementNode).m_varDeclarations), mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_funcDeclarations, (yyvsp[(10) - (10)].statementNode).m_funcDeclarations), @@ -4384,7 +4382,7 @@ yyreduce: case 248: /* Line 1455 of yacc.c */ -#line 989 "../../JavaScriptCore/parser/Grammar.y" +#line 987 "../../JavaScriptCore/parser/Grammar.y" { ForInNode* node = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (7)]).first_column, (yylsp[(3) - (7)]).last_column, (yylsp[(5) - (7)]).last_column); @@ -4398,7 +4396,7 @@ yyreduce: case 249: /* Line 1455 of yacc.c */ -#line 998 "../../JavaScriptCore/parser/Grammar.y" +#line 996 "../../JavaScriptCore/parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (8)].ident), 0, (yyvsp[(6) - (8)].expressionNode).m_node, (yyvsp[(8) - (8)].statementNode).m_node, (yylsp[(5) - (8)]).first_column, (yylsp[(5) - (8)]).first_column - (yylsp[(4) - (8)]).first_column, (yylsp[(6) - (8)]).last_column - (yylsp[(5) - (8)]).first_column); SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (8)]).first_column, (yylsp[(5) - (8)]).first_column + 1, (yylsp[(6) - (8)]).last_column); appendToVarDeclarationList(GLOBAL_DATA, (yyvsp[(8) - (8)].statementNode).m_varDeclarations, *(yyvsp[(4) - (8)].ident), DeclarationStacks::HasInitializer); @@ -4409,7 +4407,7 @@ yyreduce: case 250: /* Line 1455 of yacc.c */ -#line 1004 "../../JavaScriptCore/parser/Grammar.y" +#line 1002 "../../JavaScriptCore/parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (9)].ident), (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, (yylsp[(5) - (9)]).first_column, (yylsp[(5) - (9)]).first_column - (yylsp[(4) - (9)]).first_column, (yylsp[(5) - (9)]).last_column - (yylsp[(5) - (9)]).first_column); SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (9)]).first_column, (yylsp[(6) - (9)]).first_column + 1, (yylsp[(7) - (9)]).last_column); appendToVarDeclarationList(GLOBAL_DATA, (yyvsp[(9) - (9)].statementNode).m_varDeclarations, *(yyvsp[(4) - (9)].ident), DeclarationStacks::HasInitializer); @@ -4422,21 +4420,21 @@ yyreduce: case 251: /* Line 1455 of yacc.c */ -#line 1014 "../../JavaScriptCore/parser/Grammar.y" +#line 1012 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 253: /* Line 1455 of yacc.c */ -#line 1019 "../../JavaScriptCore/parser/Grammar.y" +#line 1017 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 255: /* Line 1455 of yacc.c */ -#line 1024 "../../JavaScriptCore/parser/Grammar.y" +#line 1022 "../../JavaScriptCore/parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); @@ -4446,7 +4444,7 @@ yyreduce: case 256: /* Line 1455 of yacc.c */ -#line 1028 "../../JavaScriptCore/parser/Grammar.y" +#line 1026 "../../JavaScriptCore/parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); @@ -4456,7 +4454,7 @@ yyreduce: case 257: /* Line 1455 of yacc.c */ -#line 1032 "../../JavaScriptCore/parser/Grammar.y" +#line 1030 "../../JavaScriptCore/parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); @@ -4466,7 +4464,7 @@ yyreduce: case 258: /* Line 1455 of yacc.c */ -#line 1036 "../../JavaScriptCore/parser/Grammar.y" +#line 1034 "../../JavaScriptCore/parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); @@ -4476,7 +4474,7 @@ yyreduce: case 259: /* Line 1455 of yacc.c */ -#line 1043 "../../JavaScriptCore/parser/Grammar.y" +#line 1041 "../../JavaScriptCore/parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} @@ -4485,7 +4483,7 @@ yyreduce: case 260: /* Line 1455 of yacc.c */ -#line 1046 "../../JavaScriptCore/parser/Grammar.y" +#line 1044 "../../JavaScriptCore/parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BreakNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} @@ -4494,7 +4492,7 @@ yyreduce: case 261: /* Line 1455 of yacc.c */ -#line 1049 "../../JavaScriptCore/parser/Grammar.y" +#line 1047 "../../JavaScriptCore/parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} @@ -4503,7 +4501,7 @@ yyreduce: case 262: /* Line 1455 of yacc.c */ -#line 1052 "../../JavaScriptCore/parser/Grammar.y" +#line 1050 "../../JavaScriptCore/parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} @@ -4512,7 +4510,7 @@ yyreduce: case 263: /* Line 1455 of yacc.c */ -#line 1058 "../../JavaScriptCore/parser/Grammar.y" +#line 1056 "../../JavaScriptCore/parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} @@ -4521,7 +4519,7 @@ yyreduce: case 264: /* Line 1455 of yacc.c */ -#line 1061 "../../JavaScriptCore/parser/Grammar.y" +#line 1059 "../../JavaScriptCore/parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} @@ -4530,7 +4528,7 @@ yyreduce: case 265: /* Line 1455 of yacc.c */ -#line 1064 "../../JavaScriptCore/parser/Grammar.y" +#line 1062 "../../JavaScriptCore/parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} @@ -4539,7 +4537,7 @@ yyreduce: case 266: /* Line 1455 of yacc.c */ -#line 1067 "../../JavaScriptCore/parser/Grammar.y" +#line 1065 "../../JavaScriptCore/parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} @@ -4548,7 +4546,7 @@ yyreduce: case 267: /* Line 1455 of yacc.c */ -#line 1073 "../../JavaScriptCore/parser/Grammar.y" +#line 1071 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WithNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node, (yylsp[(3) - (5)]).last_column, (yylsp[(3) - (5)]).last_column - (yylsp[(3) - (5)]).first_column), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features | WithFeature, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} @@ -4557,7 +4555,7 @@ yyreduce: case 268: /* Line 1455 of yacc.c */ -#line 1079 "../../JavaScriptCore/parser/Grammar.y" +#line 1077 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) SwitchNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].caseBlockNode).m_node), (yyvsp[(5) - (5)].caseBlockNode).m_varDeclarations, (yyvsp[(5) - (5)].caseBlockNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].caseBlockNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].caseBlockNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} @@ -4566,14 +4564,14 @@ yyreduce: case 269: /* Line 1455 of yacc.c */ -#line 1085 "../../JavaScriptCore/parser/Grammar.y" +#line 1083 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].clauseList).m_node.head, 0, 0), (yyvsp[(2) - (3)].clauseList).m_varDeclarations, (yyvsp[(2) - (3)].clauseList).m_funcDeclarations, (yyvsp[(2) - (3)].clauseList).m_features, (yyvsp[(2) - (3)].clauseList).m_numConstants); ;} break; case 270: /* Line 1455 of yacc.c */ -#line 1087 "../../JavaScriptCore/parser/Grammar.y" +#line 1085 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (5)].clauseList).m_node.head, (yyvsp[(3) - (5)].caseClauseNode).m_node, (yyvsp[(4) - (5)].clauseList).m_node.head), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_varDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_varDeclarations), (yyvsp[(4) - (5)].clauseList).m_varDeclarations), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_funcDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_funcDeclarations), (yyvsp[(4) - (5)].clauseList).m_funcDeclarations), @@ -4584,14 +4582,14 @@ yyreduce: case 271: /* Line 1455 of yacc.c */ -#line 1095 "../../JavaScriptCore/parser/Grammar.y" +#line 1093 "../../JavaScriptCore/parser/Grammar.y" { (yyval.clauseList).m_node.head = 0; (yyval.clauseList).m_node.tail = 0; (yyval.clauseList).m_varDeclarations = 0; (yyval.clauseList).m_funcDeclarations = 0; (yyval.clauseList).m_features = 0; (yyval.clauseList).m_numConstants = 0; ;} break; case 273: /* Line 1455 of yacc.c */ -#line 1100 "../../JavaScriptCore/parser/Grammar.y" +#line 1098 "../../JavaScriptCore/parser/Grammar.y" { (yyval.clauseList).m_node.head = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].caseClauseNode).m_node); (yyval.clauseList).m_node.tail = (yyval.clauseList).m_node.head; (yyval.clauseList).m_varDeclarations = (yyvsp[(1) - (1)].caseClauseNode).m_varDeclarations; @@ -4603,7 +4601,7 @@ yyreduce: case 274: /* Line 1455 of yacc.c */ -#line 1106 "../../JavaScriptCore/parser/Grammar.y" +#line 1104 "../../JavaScriptCore/parser/Grammar.y" { (yyval.clauseList).m_node.head = (yyvsp[(1) - (2)].clauseList).m_node.head; (yyval.clauseList).m_node.tail = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (2)].clauseList).m_node.tail, (yyvsp[(2) - (2)].caseClauseNode).m_node); (yyval.clauseList).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].clauseList).m_varDeclarations, (yyvsp[(2) - (2)].caseClauseNode).m_varDeclarations); @@ -4616,35 +4614,35 @@ yyreduce: case 275: /* Line 1455 of yacc.c */ -#line 1116 "../../JavaScriptCore/parser/Grammar.y" +#line 1114 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node), 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); ;} break; case 276: /* Line 1455 of yacc.c */ -#line 1117 "../../JavaScriptCore/parser/Grammar.y" +#line 1115 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].sourceElements).m_node), (yyvsp[(4) - (4)].sourceElements).m_varDeclarations, (yyvsp[(4) - (4)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (4)].expressionNode).m_features | (yyvsp[(4) - (4)].sourceElements).m_features, (yyvsp[(2) - (4)].expressionNode).m_numConstants + (yyvsp[(4) - (4)].sourceElements).m_numConstants); ;} break; case 277: /* Line 1455 of yacc.c */ -#line 1121 "../../JavaScriptCore/parser/Grammar.y" +#line 1119 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0), 0, 0, 0, 0); ;} break; case 278: /* Line 1455 of yacc.c */ -#line 1122 "../../JavaScriptCore/parser/Grammar.y" +#line 1120 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0, (yyvsp[(3) - (3)].sourceElements).m_node), (yyvsp[(3) - (3)].sourceElements).m_varDeclarations, (yyvsp[(3) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(3) - (3)].sourceElements).m_features, (yyvsp[(3) - (3)].sourceElements).m_numConstants); ;} break; case 279: /* Line 1455 of yacc.c */ -#line 1126 "../../JavaScriptCore/parser/Grammar.y" +#line 1124 "../../JavaScriptCore/parser/Grammar.y" { LabelNode* node = new (GLOBAL_DATA) LabelNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].statementNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, (yyvsp[(3) - (3)].statementNode).m_varDeclarations, (yyvsp[(3) - (3)].statementNode).m_funcDeclarations, (yyvsp[(3) - (3)].statementNode).m_features, (yyvsp[(3) - (3)].statementNode).m_numConstants); ;} @@ -4653,7 +4651,7 @@ yyreduce: case 280: /* Line 1455 of yacc.c */ -#line 1132 "../../JavaScriptCore/parser/Grammar.y" +#line 1130 "../../JavaScriptCore/parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); @@ -4663,7 +4661,7 @@ yyreduce: case 281: /* Line 1455 of yacc.c */ -#line 1136 "../../JavaScriptCore/parser/Grammar.y" +#line 1134 "../../JavaScriptCore/parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; @@ -4673,7 +4671,7 @@ yyreduce: case 282: /* Line 1455 of yacc.c */ -#line 1143 "../../JavaScriptCore/parser/Grammar.y" +#line 1141 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (4)].statementNode).m_node, GLOBAL_DATA->propertyNames->nullIdentifier, false, 0, (yyvsp[(4) - (4)].statementNode).m_node), mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_varDeclarations, (yyvsp[(4) - (4)].statementNode).m_varDeclarations), mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_funcDeclarations, (yyvsp[(4) - (4)].statementNode).m_funcDeclarations), @@ -4685,7 +4683,7 @@ yyreduce: case 283: /* Line 1455 of yacc.c */ -#line 1149 "../../JavaScriptCore/parser/Grammar.y" +#line 1147 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, *(yyvsp[(5) - (7)].ident), ((yyvsp[(7) - (7)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (7)].statementNode).m_node, 0), mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(7) - (7)].statementNode).m_funcDeclarations), @@ -4697,7 +4695,7 @@ yyreduce: case 284: /* Line 1455 of yacc.c */ -#line 1156 "../../JavaScriptCore/parser/Grammar.y" +#line 1154 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (9)].statementNode).m_node, *(yyvsp[(5) - (9)].ident), ((yyvsp[(7) - (9)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (9)].statementNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_varDeclarations, (yyvsp[(7) - (9)].statementNode).m_varDeclarations), (yyvsp[(9) - (9)].statementNode).m_varDeclarations), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_funcDeclarations, (yyvsp[(7) - (9)].statementNode).m_funcDeclarations), (yyvsp[(9) - (9)].statementNode).m_funcDeclarations), @@ -4709,7 +4707,7 @@ yyreduce: case 285: /* Line 1455 of yacc.c */ -#line 1165 "../../JavaScriptCore/parser/Grammar.y" +#line 1163 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; @@ -4717,7 +4715,7 @@ yyreduce: case 286: /* Line 1455 of yacc.c */ -#line 1167 "../../JavaScriptCore/parser/Grammar.y" +#line 1165 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; @@ -4725,14 +4723,14 @@ yyreduce: case 287: /* Line 1455 of yacc.c */ -#line 1172 "../../JavaScriptCore/parser/Grammar.y" +#line 1170 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (7)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); (yyval.statementNode).m_funcDeclarations->data.append(static_cast<FuncDeclNode*>((yyval.statementNode).m_node)); ;} break; case 288: /* Line 1455 of yacc.c */ -#line 1174 "../../JavaScriptCore/parser/Grammar.y" +#line 1172 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (8)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature) @@ -4745,14 +4743,14 @@ yyreduce: case 289: /* Line 1455 of yacc.c */ -#line 1184 "../../JavaScriptCore/parser/Grammar.y" +#line 1182 "../../JavaScriptCore/parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(5) - (6)].functionBodyNode), LEXER->sourceCode((yyvsp[(4) - (6)].intValue), (yyvsp[(6) - (6)].intValue), (yylsp[(4) - (6)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(5) - (6)].functionBodyNode), (yylsp[(4) - (6)]), (yylsp[(6) - (6)])); ;} break; case 290: /* Line 1455 of yacc.c */ -#line 1186 "../../JavaScriptCore/parser/Grammar.y" +#line 1184 "../../JavaScriptCore/parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line), (yyvsp[(3) - (7)].parameterList).m_node.head), (yyvsp[(3) - (7)].parameterList).m_features | ClosureFeature, 0); if ((yyvsp[(3) - (7)].parameterList).m_features & ArgumentsFeature) @@ -4764,14 +4762,14 @@ yyreduce: case 291: /* Line 1455 of yacc.c */ -#line 1192 "../../JavaScriptCore/parser/Grammar.y" +#line 1190 "../../JavaScriptCore/parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); ;} break; case 292: /* Line 1455 of yacc.c */ -#line 1194 "../../JavaScriptCore/parser/Grammar.y" +#line 1192 "../../JavaScriptCore/parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature) @@ -4783,7 +4781,7 @@ yyreduce: case 293: /* Line 1455 of yacc.c */ -#line 1203 "../../JavaScriptCore/parser/Grammar.y" +#line 1201 "../../JavaScriptCore/parser/Grammar.y" { (yyval.parameterList).m_node.head = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)); (yyval.parameterList).m_features = (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0; (yyval.parameterList).m_node.tail = (yyval.parameterList).m_node.head; ;} @@ -4792,7 +4790,7 @@ yyreduce: case 294: /* Line 1455 of yacc.c */ -#line 1206 "../../JavaScriptCore/parser/Grammar.y" +#line 1204 "../../JavaScriptCore/parser/Grammar.y" { (yyval.parameterList).m_node.head = (yyvsp[(1) - (3)].parameterList).m_node.head; (yyval.parameterList).m_features = (yyvsp[(1) - (3)].parameterList).m_features | ((*(yyvsp[(3) - (3)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0); (yyval.parameterList).m_node.tail = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].parameterList).m_node.tail, *(yyvsp[(3) - (3)].ident)); ;} @@ -4801,28 +4799,28 @@ yyreduce: case 295: /* Line 1455 of yacc.c */ -#line 1212 "../../JavaScriptCore/parser/Grammar.y" +#line 1210 "../../JavaScriptCore/parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 296: /* Line 1455 of yacc.c */ -#line 1213 "../../JavaScriptCore/parser/Grammar.y" +#line 1211 "../../JavaScriptCore/parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 297: /* Line 1455 of yacc.c */ -#line 1217 "../../JavaScriptCore/parser/Grammar.y" +#line 1215 "../../JavaScriptCore/parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing(new (GLOBAL_DATA) SourceElements(GLOBAL_DATA), 0, 0, NoFeatures, (yylsp[(0) - (0)]).last_line, 0); ;} break; case 298: /* Line 1455 of yacc.c */ -#line 1218 "../../JavaScriptCore/parser/Grammar.y" +#line 1216 "../../JavaScriptCore/parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing((yyvsp[(1) - (1)].sourceElements).m_node, (yyvsp[(1) - (1)].sourceElements).m_varDeclarations, (yyvsp[(1) - (1)].sourceElements).m_funcDeclarations, (yyvsp[(1) - (1)].sourceElements).m_features, (yylsp[(1) - (1)]).last_line, (yyvsp[(1) - (1)].sourceElements).m_numConstants); ;} break; @@ -4830,7 +4828,7 @@ yyreduce: case 299: /* Line 1455 of yacc.c */ -#line 1223 "../../JavaScriptCore/parser/Grammar.y" +#line 1221 "../../JavaScriptCore/parser/Grammar.y" { (yyval.sourceElements).m_node = new (GLOBAL_DATA) SourceElements(GLOBAL_DATA); (yyval.sourceElements).m_node->append((yyvsp[(1) - (1)].statementNode).m_node); (yyval.sourceElements).m_varDeclarations = (yyvsp[(1) - (1)].statementNode).m_varDeclarations; @@ -4843,7 +4841,7 @@ yyreduce: case 300: /* Line 1455 of yacc.c */ -#line 1230 "../../JavaScriptCore/parser/Grammar.y" +#line 1228 "../../JavaScriptCore/parser/Grammar.y" { (yyval.sourceElements).m_node->append((yyvsp[(2) - (2)].statementNode).m_node); (yyval.sourceElements).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_varDeclarations, (yyvsp[(2) - (2)].statementNode).m_varDeclarations); (yyval.sourceElements).m_funcDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (2)].statementNode).m_funcDeclarations); @@ -4855,259 +4853,259 @@ yyreduce: case 304: /* Line 1455 of yacc.c */ -#line 1244 "../../JavaScriptCore/parser/Grammar.y" +#line 1242 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 305: /* Line 1455 of yacc.c */ -#line 1245 "../../JavaScriptCore/parser/Grammar.y" +#line 1243 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 306: /* Line 1455 of yacc.c */ -#line 1246 "../../JavaScriptCore/parser/Grammar.y" +#line 1244 "../../JavaScriptCore/parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;} break; case 307: /* Line 1455 of yacc.c */ -#line 1247 "../../JavaScriptCore/parser/Grammar.y" +#line 1245 "../../JavaScriptCore/parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;} break; case 308: /* Line 1455 of yacc.c */ -#line 1251 "../../JavaScriptCore/parser/Grammar.y" +#line 1249 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 309: /* Line 1455 of yacc.c */ -#line 1252 "../../JavaScriptCore/parser/Grammar.y" +#line 1250 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 310: /* Line 1455 of yacc.c */ -#line 1253 "../../JavaScriptCore/parser/Grammar.y" +#line 1251 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 311: /* Line 1455 of yacc.c */ -#line 1254 "../../JavaScriptCore/parser/Grammar.y" +#line 1252 "../../JavaScriptCore/parser/Grammar.y" { if (*(yyvsp[(1) - (7)].ident) != "get" && *(yyvsp[(1) - (7)].ident) != "set") YYABORT; ;} break; case 312: /* Line 1455 of yacc.c */ -#line 1255 "../../JavaScriptCore/parser/Grammar.y" +#line 1253 "../../JavaScriptCore/parser/Grammar.y" { if (*(yyvsp[(1) - (8)].ident) != "get" && *(yyvsp[(1) - (8)].ident) != "set") YYABORT; ;} break; case 316: /* Line 1455 of yacc.c */ -#line 1265 "../../JavaScriptCore/parser/Grammar.y" +#line 1263 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 317: /* Line 1455 of yacc.c */ -#line 1266 "../../JavaScriptCore/parser/Grammar.y" +#line 1264 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 318: /* Line 1455 of yacc.c */ -#line 1268 "../../JavaScriptCore/parser/Grammar.y" +#line 1266 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 322: /* Line 1455 of yacc.c */ -#line 1275 "../../JavaScriptCore/parser/Grammar.y" +#line 1273 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 517: /* Line 1455 of yacc.c */ -#line 1643 "../../JavaScriptCore/parser/Grammar.y" +#line 1641 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 518: /* Line 1455 of yacc.c */ -#line 1644 "../../JavaScriptCore/parser/Grammar.y" +#line 1642 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 520: /* Line 1455 of yacc.c */ -#line 1649 "../../JavaScriptCore/parser/Grammar.y" +#line 1647 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 521: /* Line 1455 of yacc.c */ -#line 1653 "../../JavaScriptCore/parser/Grammar.y" +#line 1651 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 522: /* Line 1455 of yacc.c */ -#line 1654 "../../JavaScriptCore/parser/Grammar.y" +#line 1652 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 525: /* Line 1455 of yacc.c */ -#line 1660 "../../JavaScriptCore/parser/Grammar.y" +#line 1658 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 526: /* Line 1455 of yacc.c */ -#line 1661 "../../JavaScriptCore/parser/Grammar.y" +#line 1659 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 530: /* Line 1455 of yacc.c */ -#line 1668 "../../JavaScriptCore/parser/Grammar.y" +#line 1666 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 533: /* Line 1455 of yacc.c */ -#line 1677 "../../JavaScriptCore/parser/Grammar.y" +#line 1675 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 534: /* Line 1455 of yacc.c */ -#line 1678 "../../JavaScriptCore/parser/Grammar.y" +#line 1676 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 539: /* Line 1455 of yacc.c */ -#line 1695 "../../JavaScriptCore/parser/Grammar.y" +#line 1693 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 555: /* Line 1455 of yacc.c */ -#line 1726 "../../JavaScriptCore/parser/Grammar.y" +#line 1724 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 557: /* Line 1455 of yacc.c */ -#line 1728 "../../JavaScriptCore/parser/Grammar.y" +#line 1726 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 559: /* Line 1455 of yacc.c */ -#line 1733 "../../JavaScriptCore/parser/Grammar.y" +#line 1731 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 561: /* Line 1455 of yacc.c */ -#line 1735 "../../JavaScriptCore/parser/Grammar.y" +#line 1733 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 563: /* Line 1455 of yacc.c */ -#line 1740 "../../JavaScriptCore/parser/Grammar.y" +#line 1738 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 565: /* Line 1455 of yacc.c */ -#line 1742 "../../JavaScriptCore/parser/Grammar.y" +#line 1740 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 568: /* Line 1455 of yacc.c */ -#line 1754 "../../JavaScriptCore/parser/Grammar.y" +#line 1752 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 569: /* Line 1455 of yacc.c */ -#line 1755 "../../JavaScriptCore/parser/Grammar.y" +#line 1753 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 578: /* Line 1455 of yacc.c */ -#line 1779 "../../JavaScriptCore/parser/Grammar.y" +#line 1777 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 580: /* Line 1455 of yacc.c */ -#line 1784 "../../JavaScriptCore/parser/Grammar.y" +#line 1782 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 585: /* Line 1455 of yacc.c */ -#line 1795 "../../JavaScriptCore/parser/Grammar.y" +#line 1793 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 592: /* Line 1455 of yacc.c */ -#line 1811 "../../JavaScriptCore/parser/Grammar.y" +#line 1809 "../../JavaScriptCore/parser/Grammar.y" { ;} break; /* Line 1455 of yacc.c */ -#line 5111 "WebCore/tmp/../generated/Grammar.tab.c" +#line 5109 "WebCore/tmp/../generated/Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -5326,7 +5324,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 1827 "../../JavaScriptCore/parser/Grammar.y" +#line 1825 "../../JavaScriptCore/parser/Grammar.y" static ExpressionNode* makeAssignNode(void* globalPtr, ExpressionNode* loc, Operator op, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments, int start, int divot, int end) diff --git a/src/3rdparty/webkit/WebCore/generated/Grammar.h b/src/3rdparty/webkit/WebCore/generated/Grammar.h index 34b0b37d59..2f9d6f0a65 100644 --- a/src/3rdparty/webkit/WebCore/generated/Grammar.h +++ b/src/3rdparty/webkit/WebCore/generated/Grammar.h @@ -112,7 +112,7 @@ typedef union YYSTYPE { /* Line 1676 of yacc.c */ -#line 157 "../../JavaScriptCore/parser/Grammar.y" +#line 155 "../../JavaScriptCore/parser/Grammar.y" int intValue; double doubleValue; diff --git a/src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp b/src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp index f40ae0553d..44458f7de5 100644 --- a/src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp +++ b/src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp @@ -350,6 +350,7 @@ DEFINE_GLOBAL(QualifiedName, deferAttr, nullAtom, "defer", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, dirAttr, nullAtom, "dir", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, directionAttr, nullAtom, "direction", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, disabledAttr, nullAtom, "disabled", xhtmlNamespaceURI); +DEFINE_GLOBAL(QualifiedName, draggableAttr, nullAtom, "draggable", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, enctypeAttr, nullAtom, "enctype", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, endAttr, nullAtom, "end", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, expandedAttr, nullAtom, "expanded", xhtmlNamespaceURI); @@ -464,6 +465,7 @@ DEFINE_GLOBAL(QualifiedName, onwebkitanimationendAttr, nullAtom, "onwebkitanimat DEFINE_GLOBAL(QualifiedName, onwebkitanimationiterationAttr, nullAtom, "onwebkitanimationiteration", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, onwebkitanimationstartAttr, nullAtom, "onwebkitanimationstart", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, onwebkittransitionendAttr, nullAtom, "onwebkittransitionend", xhtmlNamespaceURI); +DEFINE_GLOBAL(QualifiedName, patternAttr, nullAtom, "pattern", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, placeholderAttr, nullAtom, "placeholder", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, playcountAttr, nullAtom, "playcount", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, pluginurlAttr, nullAtom, "pluginurl", xhtmlNamespaceURI); @@ -475,6 +477,7 @@ DEFINE_GLOBAL(QualifiedName, progressAttr, nullAtom, "progress", xhtmlNamespaceU DEFINE_GLOBAL(QualifiedName, promptAttr, nullAtom, "prompt", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, readonlyAttr, nullAtom, "readonly", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, relAttr, nullAtom, "rel", xhtmlNamespaceURI); +DEFINE_GLOBAL(QualifiedName, requiredAttr, nullAtom, "required", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, resultsAttr, nullAtom, "results", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, revAttr, nullAtom, "rev", xhtmlNamespaceURI); DEFINE_GLOBAL(QualifiedName, roleAttr, nullAtom, "role", xhtmlNamespaceURI); @@ -588,6 +591,7 @@ WebCore::QualifiedName** getHTMLAttrs(size_t* size) (WebCore::QualifiedName*)&dirAttr, (WebCore::QualifiedName*)&directionAttr, (WebCore::QualifiedName*)&disabledAttr, + (WebCore::QualifiedName*)&draggableAttr, (WebCore::QualifiedName*)&enctypeAttr, (WebCore::QualifiedName*)&endAttr, (WebCore::QualifiedName*)&expandedAttr, @@ -702,6 +706,7 @@ WebCore::QualifiedName** getHTMLAttrs(size_t* size) (WebCore::QualifiedName*)&onwebkitanimationiterationAttr, (WebCore::QualifiedName*)&onwebkitanimationstartAttr, (WebCore::QualifiedName*)&onwebkittransitionendAttr, + (WebCore::QualifiedName*)&patternAttr, (WebCore::QualifiedName*)&placeholderAttr, (WebCore::QualifiedName*)&playcountAttr, (WebCore::QualifiedName*)&pluginurlAttr, @@ -713,6 +718,7 @@ WebCore::QualifiedName** getHTMLAttrs(size_t* size) (WebCore::QualifiedName*)&promptAttr, (WebCore::QualifiedName*)&readonlyAttr, (WebCore::QualifiedName*)&relAttr, + (WebCore::QualifiedName*)&requiredAttr, (WebCore::QualifiedName*)&resultsAttr, (WebCore::QualifiedName*)&revAttr, (WebCore::QualifiedName*)&roleAttr, @@ -756,7 +762,7 @@ WebCore::QualifiedName** getHTMLAttrs(size_t* size) (WebCore::QualifiedName*)&widthAttr, (WebCore::QualifiedName*)&wrapAttr, }; - *size = 233; + *size = 236; return HTMLAttr; } @@ -1075,6 +1081,7 @@ void init() const char *dirAttrString = "dir"; const char *directionAttrString = "direction"; const char *disabledAttrString = "disabled"; + const char *draggableAttrString = "draggable"; const char *enctypeAttrString = "enctype"; const char *endAttrString = "end"; const char *expandedAttrString = "expanded"; @@ -1189,6 +1196,7 @@ void init() const char *onwebkitanimationiterationAttrString = "onwebkitanimationiteration"; const char *onwebkitanimationstartAttrString = "onwebkitanimationstart"; const char *onwebkittransitionendAttrString = "onwebkittransitionend"; + const char *patternAttrString = "pattern"; const char *placeholderAttrString = "placeholder"; const char *playcountAttrString = "playcount"; const char *pluginurlAttrString = "pluginurl"; @@ -1200,6 +1208,7 @@ void init() const char *promptAttrString = "prompt"; const char *readonlyAttrString = "readonly"; const char *relAttrString = "rel"; + const char *requiredAttrString = "required"; const char *resultsAttrString = "results"; const char *revAttrString = "rev"; const char *roleAttrString = "role"; @@ -1308,6 +1317,7 @@ void init() new ((void*)&dirAttr) QualifiedName(nullAtom, dirAttrString, nullAtom); new ((void*)&directionAttr) QualifiedName(nullAtom, directionAttrString, nullAtom); new ((void*)&disabledAttr) QualifiedName(nullAtom, disabledAttrString, nullAtom); + new ((void*)&draggableAttr) QualifiedName(nullAtom, draggableAttrString, nullAtom); new ((void*)&enctypeAttr) QualifiedName(nullAtom, enctypeAttrString, nullAtom); new ((void*)&endAttr) QualifiedName(nullAtom, endAttrString, nullAtom); new ((void*)&expandedAttr) QualifiedName(nullAtom, expandedAttrString, nullAtom); @@ -1422,6 +1432,7 @@ void init() new ((void*)&onwebkitanimationiterationAttr) QualifiedName(nullAtom, onwebkitanimationiterationAttrString, nullAtom); new ((void*)&onwebkitanimationstartAttr) QualifiedName(nullAtom, onwebkitanimationstartAttrString, nullAtom); new ((void*)&onwebkittransitionendAttr) QualifiedName(nullAtom, onwebkittransitionendAttrString, nullAtom); + new ((void*)&patternAttr) QualifiedName(nullAtom, patternAttrString, nullAtom); new ((void*)&placeholderAttr) QualifiedName(nullAtom, placeholderAttrString, nullAtom); new ((void*)&playcountAttr) QualifiedName(nullAtom, playcountAttrString, nullAtom); new ((void*)&pluginurlAttr) QualifiedName(nullAtom, pluginurlAttrString, nullAtom); @@ -1433,6 +1444,7 @@ void init() new ((void*)&promptAttr) QualifiedName(nullAtom, promptAttrString, nullAtom); new ((void*)&readonlyAttr) QualifiedName(nullAtom, readonlyAttrString, nullAtom); new ((void*)&relAttr) QualifiedName(nullAtom, relAttrString, nullAtom); + new ((void*)&requiredAttr) QualifiedName(nullAtom, requiredAttrString, nullAtom); new ((void*)&resultsAttr) QualifiedName(nullAtom, resultsAttrString, nullAtom); new ((void*)&revAttr) QualifiedName(nullAtom, revAttrString, nullAtom); new ((void*)&roleAttr) QualifiedName(nullAtom, roleAttrString, nullAtom); diff --git a/src/3rdparty/webkit/WebCore/generated/HTMLNames.h b/src/3rdparty/webkit/WebCore/generated/HTMLNames.h index 3de4fc586c..a2544e6791 100644 --- a/src/3rdparty/webkit/WebCore/generated/HTMLNames.h +++ b/src/3rdparty/webkit/WebCore/generated/HTMLNames.h @@ -223,6 +223,7 @@ extern const WebCore::QualifiedName deferAttr; extern const WebCore::QualifiedName dirAttr; extern const WebCore::QualifiedName directionAttr; extern const WebCore::QualifiedName disabledAttr; +extern const WebCore::QualifiedName draggableAttr; extern const WebCore::QualifiedName enctypeAttr; extern const WebCore::QualifiedName endAttr; extern const WebCore::QualifiedName expandedAttr; @@ -337,6 +338,7 @@ extern const WebCore::QualifiedName onwebkitanimationendAttr; extern const WebCore::QualifiedName onwebkitanimationiterationAttr; extern const WebCore::QualifiedName onwebkitanimationstartAttr; extern const WebCore::QualifiedName onwebkittransitionendAttr; +extern const WebCore::QualifiedName patternAttr; extern const WebCore::QualifiedName placeholderAttr; extern const WebCore::QualifiedName playcountAttr; extern const WebCore::QualifiedName pluginurlAttr; @@ -348,6 +350,7 @@ extern const WebCore::QualifiedName progressAttr; extern const WebCore::QualifiedName promptAttr; extern const WebCore::QualifiedName readonlyAttr; extern const WebCore::QualifiedName relAttr; +extern const WebCore::QualifiedName requiredAttr; extern const WebCore::QualifiedName resultsAttr; extern const WebCore::QualifiedName revAttr; extern const WebCore::QualifiedName roleAttr; diff --git a/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.cpp b/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.cpp new file mode 100644 index 0000000000..d591cad53d --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.cpp @@ -0,0 +1,227 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" + +#if ENABLE(WORKERS) + +#include "JSAbstractWorker.h" + +#include "AbstractWorker.h" +#include "Event.h" +#include "EventListener.h" +#include "Frame.h" +#include "JSDOMGlobalObject.h" +#include "JSEvent.h" +#include "JSEventListener.h" +#include <runtime/Error.h> +#include <wtf/GetPtr.h> + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSAbstractWorker); + +/* Hash table */ + +static const HashTableValue JSAbstractWorkerTableValues[3] = +{ + { "onerror", DontDelete, (intptr_t)jsAbstractWorkerOnerror, (intptr_t)setJSAbstractWorkerOnerror }, + { "constructor", DontEnum|ReadOnly, (intptr_t)jsAbstractWorkerConstructor, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSAbstractWorkerTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 1, JSAbstractWorkerTableValues, 0 }; +#else + { 4, 3, JSAbstractWorkerTableValues, 0 }; +#endif + +/* Hash table for constructor */ + +static const HashTableValue JSAbstractWorkerConstructorTableValues[1] = +{ + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSAbstractWorkerConstructorTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSAbstractWorkerConstructorTableValues, 0 }; +#else + { 1, 0, JSAbstractWorkerConstructorTableValues, 0 }; +#endif + +class JSAbstractWorkerConstructor : public DOMConstructorObject { +public: + JSAbstractWorkerConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSAbstractWorkerConstructor::createStructure(globalObject->objectPrototype()), globalObject) + { + putDirect(exec->propertyNames().prototype, JSAbstractWorkerPrototype::self(exec, globalObject), None); + } + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual const ClassInfo* classInfo() const { return &s_info; } + static const ClassInfo s_info; + + static PassRefPtr<Structure> createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); + } +}; + +const ClassInfo JSAbstractWorkerConstructor::s_info = { "AbstractWorkerConstructor", 0, &JSAbstractWorkerConstructorTable, 0 }; + +bool JSAbstractWorkerConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSAbstractWorkerConstructor, DOMObject>(exec, &JSAbstractWorkerConstructorTable, this, propertyName, slot); +} + +/* Hash table for prototype */ + +static const HashTableValue JSAbstractWorkerPrototypeTableValues[4] = +{ + { "addEventListener", DontDelete|Function, (intptr_t)jsAbstractWorkerPrototypeFunctionAddEventListener, (intptr_t)3 }, + { "removeEventListener", DontDelete|Function, (intptr_t)jsAbstractWorkerPrototypeFunctionRemoveEventListener, (intptr_t)3 }, + { "dispatchEvent", DontDelete|Function, (intptr_t)jsAbstractWorkerPrototypeFunctionDispatchEvent, (intptr_t)1 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSAbstractWorkerPrototypeTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 3, JSAbstractWorkerPrototypeTableValues, 0 }; +#else + { 8, 7, JSAbstractWorkerPrototypeTableValues, 0 }; +#endif + +const ClassInfo JSAbstractWorkerPrototype::s_info = { "AbstractWorkerPrototype", 0, &JSAbstractWorkerPrototypeTable, 0 }; + +JSObject* JSAbstractWorkerPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype<JSAbstractWorker>(exec, globalObject); +} + +bool JSAbstractWorkerPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot<JSObject>(exec, &JSAbstractWorkerPrototypeTable, this, propertyName, slot); +} + +const ClassInfo JSAbstractWorker::s_info = { "AbstractWorker", 0, &JSAbstractWorkerTable, 0 }; + +JSAbstractWorker::JSAbstractWorker(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<AbstractWorker> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) + , m_impl(impl) +{ +} + +JSAbstractWorker::~JSAbstractWorker() +{ + forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get()); +} + +JSObject* JSAbstractWorker::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSAbstractWorkerPrototype(JSAbstractWorkerPrototype::createStructure(globalObject->objectPrototype())); +} + +bool JSAbstractWorker::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSAbstractWorker, Base>(exec, &JSAbstractWorkerTable, this, propertyName, slot); +} + +JSValue jsAbstractWorkerOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSAbstractWorker* castedThis = static_cast<JSAbstractWorker*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + AbstractWorker* imp = static_cast<AbstractWorker*>(castedThis->impl()); + if (EventListener* listener = imp->onerror()) { + if (JSObject* jsFunction = listener->jsFunction()) + return jsFunction; + } + return jsNull(); +} + +JSValue jsAbstractWorkerConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSAbstractWorker* domObject = static_cast<JSAbstractWorker*>(asObject(slot.slotBase())); + return JSAbstractWorker::getConstructor(exec, domObject->globalObject()); +} +void JSAbstractWorker::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) +{ + lookupPut<JSAbstractWorker, Base>(exec, propertyName, value, &JSAbstractWorkerTable, this, slot); +} + +void setJSAbstractWorkerOnerror(ExecState* exec, JSObject* thisObject, JSValue value) +{ + UNUSED_PARAM(exec); + AbstractWorker* imp = static_cast<AbstractWorker*>(static_cast<JSAbstractWorker*>(thisObject)->impl()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + if (!globalObject) + return; + imp->setOnerror(globalObject->createJSAttributeEventListener(value)); +} + +JSValue JSAbstractWorker::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor<JSAbstractWorkerConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); +} + +JSValue JSC_HOST_CALL jsAbstractWorkerPrototypeFunctionAddEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSAbstractWorker::s_info)) + return throwError(exec, TypeError); + JSAbstractWorker* castedThisObj = static_cast<JSAbstractWorker*>(asObject(thisValue)); + return castedThisObj->addEventListener(exec, args); +} + +JSValue JSC_HOST_CALL jsAbstractWorkerPrototypeFunctionRemoveEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSAbstractWorker::s_info)) + return throwError(exec, TypeError); + JSAbstractWorker* castedThisObj = static_cast<JSAbstractWorker*>(asObject(thisValue)); + return castedThisObj->removeEventListener(exec, args); +} + +JSValue JSC_HOST_CALL jsAbstractWorkerPrototypeFunctionDispatchEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSAbstractWorker::s_info)) + return throwError(exec, TypeError); + JSAbstractWorker* castedThisObj = static_cast<JSAbstractWorker*>(asObject(thisValue)); + AbstractWorker* imp = static_cast<AbstractWorker*>(castedThisObj->impl()); + ExceptionCode ec = 0; + Event* evt = toEvent(args.at(0)); + + + JSC::JSValue result = jsBoolean(imp->dispatchEvent(evt, ec)); + setDOMException(exec, ec); + return result; +} + +AbstractWorker* toAbstractWorker(JSC::JSValue value) +{ + return value.isObject(&JSAbstractWorker::s_info) ? static_cast<JSAbstractWorker*>(asObject(value))->impl() : 0; +} + +} + +#endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.h b/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.h new file mode 100644 index 0000000000..a2c92a563a --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.h @@ -0,0 +1,96 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef JSAbstractWorker_h +#define JSAbstractWorker_h + +#if ENABLE(WORKERS) + +#include "DOMObjectWithSVGContext.h" +#include "JSDOMBinding.h" +#include <runtime/JSGlobalObject.h> +#include <runtime/ObjectPrototype.h> + +namespace WebCore { + +class AbstractWorker; + +class JSAbstractWorker : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; +public: + JSAbstractWorker(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<AbstractWorker>); + virtual ~JSAbstractWorker(); + static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); + virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + + virtual void mark(); + + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); + + // Custom functions + JSC::JSValue addEventListener(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue removeEventListener(JSC::ExecState*, const JSC::ArgList&); + AbstractWorker* impl() const { return m_impl.get(); } + +private: + RefPtr<AbstractWorker> m_impl; +}; + +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, AbstractWorker*); +AbstractWorker* toAbstractWorker(JSC::JSValue); + +class JSAbstractWorkerPrototype : public JSC::JSObject { + typedef JSC::JSObject Base; +public: + static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + JSAbstractWorkerPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { } +}; + +// Functions + +JSC::JSValue JSC_HOST_CALL jsAbstractWorkerPrototypeFunctionAddEventListener(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsAbstractWorkerPrototypeFunctionRemoveEventListener(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsAbstractWorkerPrototypeFunctionDispatchEvent(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +// Attributes + +JSC::JSValue jsAbstractWorkerOnerror(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSAbstractWorkerOnerror(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); +JSC::JSValue jsAbstractWorkerConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); + +} // namespace WebCore + +#endif // ENABLE(WORKERS) + +#endif diff --git a/src/3rdparty/webkit/WebCore/generated/JSAttr.cpp b/src/3rdparty/webkit/WebCore/generated/JSAttr.cpp index 4659189e65..c4f56396f1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSAttr.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSAttr.cpp @@ -70,12 +70,12 @@ static JSC_CONST_HASHTABLE HashTable JSAttrConstructorTable = { 1, 0, JSAttrConstructorTableValues, 0 }; #endif -class JSAttrConstructor : public DOMObject { +class JSAttrConstructor : public DOMConstructorObject { public: - JSAttrConstructor(ExecState* exec) - : DOMObject(JSAttrConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSAttrConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSAttrConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSAttrPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSAttrPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -117,8 +117,8 @@ JSObject* JSAttrPrototype::self(ExecState* exec, JSGlobalObject* globalObject) const ClassInfo JSAttr::s_info = { "Attr", &JSNode::s_info, &JSAttrTable, 0 }; -JSAttr::JSAttr(PassRefPtr<Structure> structure, PassRefPtr<Attr> impl) - : JSNode(structure, impl) +JSAttr::JSAttr(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Attr> impl) + : JSNode(structure, globalObject, impl) { } @@ -134,42 +134,48 @@ bool JSAttr::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, JSValue jsAttrName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSAttr* castedThis = static_cast<JSAttr*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Attr* imp = static_cast<Attr*>(static_cast<JSAttr*>(asObject(slot.slotBase()))->impl()); + Attr* imp = static_cast<Attr*>(castedThis->impl()); return jsStringOrNull(exec, imp->name()); } JSValue jsAttrSpecified(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSAttr* castedThis = static_cast<JSAttr*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Attr* imp = static_cast<Attr*>(static_cast<JSAttr*>(asObject(slot.slotBase()))->impl()); + Attr* imp = static_cast<Attr*>(castedThis->impl()); return jsBoolean(imp->specified()); } JSValue jsAttrValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSAttr* castedThis = static_cast<JSAttr*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Attr* imp = static_cast<Attr*>(static_cast<JSAttr*>(asObject(slot.slotBase()))->impl()); + Attr* imp = static_cast<Attr*>(castedThis->impl()); return jsStringOrNull(exec, imp->value()); } JSValue jsAttrOwnerElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSAttr* castedThis = static_cast<JSAttr*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Attr* imp = static_cast<Attr*>(static_cast<JSAttr*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->ownerElement())); + Attr* imp = static_cast<Attr*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->ownerElement())); } JSValue jsAttrStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSAttr* castedThis = static_cast<JSAttr*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Attr* imp = static_cast<Attr*>(static_cast<JSAttr*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + Attr* imp = static_cast<Attr*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsAttrConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSAttr*>(asObject(slot.slotBase()))->getConstructor(exec); + JSAttr* domObject = static_cast<JSAttr*>(asObject(slot.slotBase())); + return JSAttr::getConstructor(exec, domObject->globalObject()); } void JSAttr::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -181,9 +187,9 @@ void setJSAttrValue(ExecState* exec, JSObject* thisObject, JSValue value) static_cast<JSAttr*>(thisObject)->setValue(exec, value); } -JSValue JSAttr::getConstructor(ExecState* exec) +JSValue JSAttr::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSAttrConstructor>(exec); + return getDOMConstructor<JSAttrConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } Attr* toAttr(JSC::JSValue value) diff --git a/src/3rdparty/webkit/WebCore/generated/JSAttr.h b/src/3rdparty/webkit/WebCore/generated/JSAttr.h index 4d13aa8ddb..a3b2165e92 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSAttr.h +++ b/src/3rdparty/webkit/WebCore/generated/JSAttr.h @@ -31,7 +31,7 @@ class Attr; class JSAttr : public JSNode { typedef JSNode Base; public: - JSAttr(PassRefPtr<JSC::Structure>, PassRefPtr<Attr>); + JSAttr(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Attr>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -43,7 +43,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes void setValue(JSC::ExecState*, JSC::JSValue); diff --git a/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp b/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp index 2b5afda962..c799f7f005 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp @@ -68,8 +68,8 @@ JSObject* JSBarInfoPrototype::self(ExecState* exec, JSGlobalObject* globalObject const ClassInfo JSBarInfo::s_info = { "BarInfo", 0, &JSBarInfoTable, 0 }; -JSBarInfo::JSBarInfo(PassRefPtr<Structure> structure, PassRefPtr<BarInfo> impl) - : DOMObject(structure) +JSBarInfo::JSBarInfo(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<BarInfo> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -91,14 +91,15 @@ bool JSBarInfo::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsBarInfoVisible(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSBarInfo* castedThis = static_cast<JSBarInfo*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - BarInfo* imp = static_cast<BarInfo*>(static_cast<JSBarInfo*>(asObject(slot.slotBase()))->impl()); + BarInfo* imp = static_cast<BarInfo*>(castedThis->impl()); return jsBoolean(imp->visible()); } -JSC::JSValue toJS(JSC::ExecState* exec, BarInfo* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, BarInfo* object) { - return getDOMObjectWrapper<JSBarInfo>(exec, object); + return getDOMObjectWrapper<JSBarInfo>(exec, globalObject, object); } BarInfo* toBarInfo(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSBarInfo.h b/src/3rdparty/webkit/WebCore/generated/JSBarInfo.h index c27d6c1994..5698443b2c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSBarInfo.h +++ b/src/3rdparty/webkit/WebCore/generated/JSBarInfo.h @@ -21,6 +21,7 @@ #ifndef JSBarInfo_h #define JSBarInfo_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class BarInfo; -class JSBarInfo : public DOMObject { - typedef DOMObject Base; +class JSBarInfo : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSBarInfo(PassRefPtr<JSC::Structure>, PassRefPtr<BarInfo>); + JSBarInfo(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<BarInfo>); virtual ~JSBarInfo(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -50,7 +51,7 @@ private: RefPtr<BarInfo> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, BarInfo*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, BarInfo*); BarInfo* toBarInfo(JSC::JSValue); class JSBarInfoPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp b/src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp index 51f543f29b..f3ef364ee3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp @@ -59,12 +59,12 @@ static JSC_CONST_HASHTABLE HashTable JSCDATASectionConstructorTable = { 1, 0, JSCDATASectionConstructorTableValues, 0 }; #endif -class JSCDATASectionConstructor : public DOMObject { +class JSCDATASectionConstructor : public DOMConstructorObject { public: - JSCDATASectionConstructor(ExecState* exec) - : DOMObject(JSCDATASectionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCDATASectionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCDATASectionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCDATASectionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCDATASectionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -106,8 +106,8 @@ JSObject* JSCDATASectionPrototype::self(ExecState* exec, JSGlobalObject* globalO const ClassInfo JSCDATASection::s_info = { "CDATASection", &JSText::s_info, &JSCDATASectionTable, 0 }; -JSCDATASection::JSCDATASection(PassRefPtr<Structure> structure, PassRefPtr<CDATASection> impl) - : JSText(structure, impl) +JSCDATASection::JSCDATASection(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CDATASection> impl) + : JSText(structure, globalObject, impl) { } @@ -123,11 +123,12 @@ bool JSCDATASection::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsCDATASectionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCDATASection*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCDATASection* domObject = static_cast<JSCDATASection*>(asObject(slot.slotBase())); + return JSCDATASection::getConstructor(exec, domObject->globalObject()); } -JSValue JSCDATASection::getConstructor(ExecState* exec) +JSValue JSCDATASection::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCDATASectionConstructor>(exec); + return getDOMConstructor<JSCDATASectionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCDATASection.h b/src/3rdparty/webkit/WebCore/generated/JSCDATASection.h index 724ca0be22..b45da05a58 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCDATASection.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCDATASection.h @@ -30,7 +30,7 @@ class CDATASection; class JSCDATASection : public JSText { typedef JSText Base; public: - JSCDATASection(PassRefPtr<JSC::Structure>, PassRefPtr<CDATASection>); + JSCDATASection(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CDATASection>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,10 +41,10 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; -JSC::JSValue toJSNewlyCreated(JSC::ExecState*, CDATASection*); +JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, CDATASection*); class JSCDATASectionPrototype : public JSC::JSObject { typedef JSC::JSObject Base; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp index 70a61d5da2..f0a22030e6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp @@ -61,12 +61,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSCharsetRuleConstructorTable = { 1, 0, JSCSSCharsetRuleConstructorTableValues, 0 }; #endif -class JSCSSCharsetRuleConstructor : public DOMObject { +class JSCSSCharsetRuleConstructor : public DOMConstructorObject { public: - JSCSSCharsetRuleConstructor(ExecState* exec) - : DOMObject(JSCSSCharsetRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSCharsetRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSCharsetRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSCharsetRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSCharsetRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -108,8 +108,8 @@ JSObject* JSCSSCharsetRulePrototype::self(ExecState* exec, JSGlobalObject* globa const ClassInfo JSCSSCharsetRule::s_info = { "CSSCharsetRule", &JSCSSRule::s_info, &JSCSSCharsetRuleTable, 0 }; -JSCSSCharsetRule::JSCSSCharsetRule(PassRefPtr<Structure> structure, PassRefPtr<CSSCharsetRule> impl) - : JSCSSRule(structure, impl) +JSCSSCharsetRule::JSCSSCharsetRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSCharsetRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -125,14 +125,16 @@ bool JSCSSCharsetRule::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsCSSCharsetRuleEncoding(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSCharsetRule* castedThis = static_cast<JSCSSCharsetRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSCharsetRule* imp = static_cast<CSSCharsetRule*>(static_cast<JSCSSCharsetRule*>(asObject(slot.slotBase()))->impl()); + CSSCharsetRule* imp = static_cast<CSSCharsetRule*>(castedThis->impl()); return jsStringOrNull(exec, imp->encoding()); } JSValue jsCSSCharsetRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSCharsetRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSCharsetRule* domObject = static_cast<JSCSSCharsetRule*>(asObject(slot.slotBase())); + return JSCSSCharsetRule::getConstructor(exec, domObject->globalObject()); } void JSCSSCharsetRule::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -147,9 +149,9 @@ void setJSCSSCharsetRuleEncoding(ExecState* exec, JSObject* thisObject, JSValue setDOMException(exec, ec); } -JSValue JSCSSCharsetRule::getConstructor(ExecState* exec) +JSValue JSCSSCharsetRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSCharsetRuleConstructor>(exec); + return getDOMConstructor<JSCSSCharsetRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.h b/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.h index 54c3be3cce..d7e303c580 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.h @@ -30,7 +30,7 @@ class CSSCharsetRule; class JSCSSCharsetRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSCSSCharsetRule(PassRefPtr<JSC::Structure>, PassRefPtr<CSSCharsetRule>); + JSCSSCharsetRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSCharsetRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp index 13c119ef7e..b8a1735d60 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp @@ -63,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSFontFaceRuleConstructorTable = { 1, 0, JSCSSFontFaceRuleConstructorTableValues, 0 }; #endif -class JSCSSFontFaceRuleConstructor : public DOMObject { +class JSCSSFontFaceRuleConstructor : public DOMConstructorObject { public: - JSCSSFontFaceRuleConstructor(ExecState* exec) - : DOMObject(JSCSSFontFaceRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSFontFaceRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSFontFaceRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSFontFaceRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSFontFaceRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -110,8 +110,8 @@ JSObject* JSCSSFontFaceRulePrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSCSSFontFaceRule::s_info = { "CSSFontFaceRule", &JSCSSRule::s_info, &JSCSSFontFaceRuleTable, 0 }; -JSCSSFontFaceRule::JSCSSFontFaceRule(PassRefPtr<Structure> structure, PassRefPtr<CSSFontFaceRule> impl) - : JSCSSRule(structure, impl) +JSCSSFontFaceRule::JSCSSFontFaceRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSFontFaceRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -127,18 +127,20 @@ bool JSCSSFontFaceRule::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsCSSFontFaceRuleStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSFontFaceRule* castedThis = static_cast<JSCSSFontFaceRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSFontFaceRule* imp = static_cast<CSSFontFaceRule*>(static_cast<JSCSSFontFaceRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + CSSFontFaceRule* imp = static_cast<CSSFontFaceRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsCSSFontFaceRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSFontFaceRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSFontFaceRule* domObject = static_cast<JSCSSFontFaceRule*>(asObject(slot.slotBase())); + return JSCSSFontFaceRule::getConstructor(exec, domObject->globalObject()); } -JSValue JSCSSFontFaceRule::getConstructor(ExecState* exec) +JSValue JSCSSFontFaceRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSFontFaceRuleConstructor>(exec); + return getDOMConstructor<JSCSSFontFaceRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.h b/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.h index a2acf4cfbf..26ced7616d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.h @@ -30,7 +30,7 @@ class CSSFontFaceRule; class JSCSSFontFaceRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSCSSFontFaceRule(PassRefPtr<JSC::Structure>, PassRefPtr<CSSFontFaceRule>); + JSCSSFontFaceRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSFontFaceRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp index 45d5d6083d..874eab323c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSImportRuleConstructorTable = { 1, 0, JSCSSImportRuleConstructorTableValues, 0 }; #endif -class JSCSSImportRuleConstructor : public DOMObject { +class JSCSSImportRuleConstructor : public DOMConstructorObject { public: - JSCSSImportRuleConstructor(ExecState* exec) - : DOMObject(JSCSSImportRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSImportRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSImportRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSImportRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSImportRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -114,8 +114,8 @@ JSObject* JSCSSImportRulePrototype::self(ExecState* exec, JSGlobalObject* global const ClassInfo JSCSSImportRule::s_info = { "CSSImportRule", &JSCSSRule::s_info, &JSCSSImportRuleTable, 0 }; -JSCSSImportRule::JSCSSImportRule(PassRefPtr<Structure> structure, PassRefPtr<CSSImportRule> impl) - : JSCSSRule(structure, impl) +JSCSSImportRule::JSCSSImportRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSImportRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -131,32 +131,36 @@ bool JSCSSImportRule::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsCSSImportRuleHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSImportRule* castedThis = static_cast<JSCSSImportRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSImportRule* imp = static_cast<CSSImportRule*>(static_cast<JSCSSImportRule*>(asObject(slot.slotBase()))->impl()); + CSSImportRule* imp = static_cast<CSSImportRule*>(castedThis->impl()); return jsStringOrNull(exec, imp->href()); } JSValue jsCSSImportRuleMedia(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSImportRule* castedThis = static_cast<JSCSSImportRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSImportRule* imp = static_cast<CSSImportRule*>(static_cast<JSCSSImportRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->media())); + CSSImportRule* imp = static_cast<CSSImportRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->media())); } JSValue jsCSSImportRuleStyleSheet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSImportRule* castedThis = static_cast<JSCSSImportRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSImportRule* imp = static_cast<CSSImportRule*>(static_cast<JSCSSImportRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->styleSheet())); + CSSImportRule* imp = static_cast<CSSImportRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->styleSheet())); } JSValue jsCSSImportRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSImportRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSImportRule* domObject = static_cast<JSCSSImportRule*>(asObject(slot.slotBase())); + return JSCSSImportRule::getConstructor(exec, domObject->globalObject()); } -JSValue JSCSSImportRule::getConstructor(ExecState* exec) +JSValue JSCSSImportRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSImportRuleConstructor>(exec); + return getDOMConstructor<JSCSSImportRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.h b/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.h index 14bae40223..a90a44ae9e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.h @@ -30,7 +30,7 @@ class CSSImportRule; class JSCSSImportRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSCSSImportRule(PassRefPtr<JSC::Structure>, PassRefPtr<CSSImportRule>); + JSCSSImportRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSImportRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp index 3e13a6983a..1b82aa6279 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSMediaRuleConstructorTable = { 1, 0, JSCSSMediaRuleConstructorTableValues, 0 }; #endif -class JSCSSMediaRuleConstructor : public DOMObject { +class JSCSSMediaRuleConstructor : public DOMConstructorObject { public: - JSCSSMediaRuleConstructor(ExecState* exec) - : DOMObject(JSCSSMediaRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSMediaRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSMediaRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSMediaRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSMediaRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -121,8 +121,8 @@ bool JSCSSMediaRulePrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSCSSMediaRule::s_info = { "CSSMediaRule", &JSCSSRule::s_info, &JSCSSMediaRuleTable, 0 }; -JSCSSMediaRule::JSCSSMediaRule(PassRefPtr<Structure> structure, PassRefPtr<CSSMediaRule> impl) - : JSCSSRule(structure, impl) +JSCSSMediaRule::JSCSSMediaRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSMediaRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -138,25 +138,28 @@ bool JSCSSMediaRule::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsCSSMediaRuleMedia(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSMediaRule* castedThis = static_cast<JSCSSMediaRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSMediaRule* imp = static_cast<CSSMediaRule*>(static_cast<JSCSSMediaRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->media())); + CSSMediaRule* imp = static_cast<CSSMediaRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->media())); } JSValue jsCSSMediaRuleCssRules(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSMediaRule* castedThis = static_cast<JSCSSMediaRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSMediaRule* imp = static_cast<CSSMediaRule*>(static_cast<JSCSSMediaRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->cssRules())); + CSSMediaRule* imp = static_cast<CSSMediaRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->cssRules())); } JSValue jsCSSMediaRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSMediaRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSMediaRule* domObject = static_cast<JSCSSMediaRule*>(asObject(slot.slotBase())); + return JSCSSMediaRule::getConstructor(exec, domObject->globalObject()); } -JSValue JSCSSMediaRule::getConstructor(ExecState* exec) +JSValue JSCSSMediaRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSMediaRuleConstructor>(exec); + return getDOMConstructor<JSCSSMediaRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCSSMediaRulePrototypeFunctionInsertRule(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.h b/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.h index bccda5d6c3..51f3d6a8c0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.h @@ -30,7 +30,7 @@ class CSSMediaRule; class JSCSSMediaRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSCSSMediaRule(PassRefPtr<JSC::Structure>, PassRefPtr<CSSMediaRule>); + JSCSSMediaRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSMediaRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp index c02abbd2f2..d9b3837401 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSPageRuleConstructorTable = { 1, 0, JSCSSPageRuleConstructorTableValues, 0 }; #endif -class JSCSSPageRuleConstructor : public DOMObject { +class JSCSSPageRuleConstructor : public DOMConstructorObject { public: - JSCSSPageRuleConstructor(ExecState* exec) - : DOMObject(JSCSSPageRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSPageRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSPageRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSPageRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSPageRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSCSSPageRulePrototype::self(ExecState* exec, JSGlobalObject* globalOb const ClassInfo JSCSSPageRule::s_info = { "CSSPageRule", &JSCSSRule::s_info, &JSCSSPageRuleTable, 0 }; -JSCSSPageRule::JSCSSPageRule(PassRefPtr<Structure> structure, PassRefPtr<CSSPageRule> impl) - : JSCSSRule(structure, impl) +JSCSSPageRule::JSCSSPageRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSPageRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -129,21 +129,24 @@ bool JSCSSPageRule::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsCSSPageRuleSelectorText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSPageRule* castedThis = static_cast<JSCSSPageRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSPageRule* imp = static_cast<CSSPageRule*>(static_cast<JSCSSPageRule*>(asObject(slot.slotBase()))->impl()); + CSSPageRule* imp = static_cast<CSSPageRule*>(castedThis->impl()); return jsStringOrNull(exec, imp->selectorText()); } JSValue jsCSSPageRuleStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSPageRule* castedThis = static_cast<JSCSSPageRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSPageRule* imp = static_cast<CSSPageRule*>(static_cast<JSCSSPageRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + CSSPageRule* imp = static_cast<CSSPageRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsCSSPageRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSPageRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSPageRule* domObject = static_cast<JSCSSPageRule*>(asObject(slot.slotBase())); + return JSCSSPageRule::getConstructor(exec, domObject->globalObject()); } void JSCSSPageRule::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -158,9 +161,9 @@ void setJSCSSPageRuleSelectorText(ExecState* exec, JSObject* thisObject, JSValue setDOMException(exec, ec); } -JSValue JSCSSPageRule::getConstructor(ExecState* exec) +JSValue JSCSSPageRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSPageRuleConstructor>(exec); + return getDOMConstructor<JSCSSPageRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.h b/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.h index a8159903ce..88050f19df 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.h @@ -30,7 +30,7 @@ class CSSPageRule; class JSCSSPageRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSCSSPageRule(PassRefPtr<JSC::Structure>, PassRefPtr<CSSPageRule>); + JSCSSPageRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSPageRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp index 5d81a44271..58c9487f0d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp @@ -27,6 +27,7 @@ #include "JSRGBColor.h" #include "JSRect.h" #include "KURL.h" +#include "RGBColor.h" #include "Rect.h" #include <runtime/Error.h> #include <runtime/JSNumberCell.h> @@ -95,12 +96,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSPrimitiveValueConstructorTable = { 69, 63, JSCSSPrimitiveValueConstructorTableValues, 0 }; #endif -class JSCSSPrimitiveValueConstructor : public DOMObject { +class JSCSSPrimitiveValueConstructor : public DOMConstructorObject { public: - JSCSSPrimitiveValueConstructor(ExecState* exec) - : DOMObject(JSCSSPrimitiveValueConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSPrimitiveValueConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSPrimitiveValueConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSPrimitiveValuePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSPrimitiveValuePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -180,8 +181,8 @@ bool JSCSSPrimitiveValuePrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSCSSPrimitiveValue::s_info = { "CSSPrimitiveValue", &JSCSSValue::s_info, &JSCSSPrimitiveValueTable, 0 }; -JSCSSPrimitiveValue::JSCSSPrimitiveValue(PassRefPtr<Structure> structure, PassRefPtr<CSSPrimitiveValue> impl) - : JSCSSValue(structure, impl) +JSCSSPrimitiveValue::JSCSSPrimitiveValue(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSPrimitiveValue> impl) + : JSCSSValue(structure, globalObject, impl) { } @@ -197,18 +198,20 @@ bool JSCSSPrimitiveValue::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsCSSPrimitiveValuePrimitiveType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSPrimitiveValue* castedThis = static_cast<JSCSSPrimitiveValue*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSPrimitiveValue* imp = static_cast<CSSPrimitiveValue*>(static_cast<JSCSSPrimitiveValue*>(asObject(slot.slotBase()))->impl()); + CSSPrimitiveValue* imp = static_cast<CSSPrimitiveValue*>(castedThis->impl()); return jsNumber(exec, imp->primitiveType()); } JSValue jsCSSPrimitiveValueConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSPrimitiveValue*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSPrimitiveValue* domObject = static_cast<JSCSSPrimitiveValue*>(asObject(slot.slotBase())); + return JSCSSPrimitiveValue::getConstructor(exec, domObject->globalObject()); } -JSValue JSCSSPrimitiveValue::getConstructor(ExecState* exec) +JSValue JSCSSPrimitiveValue::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSPrimitiveValueConstructor>(exec); + return getDOMConstructor<JSCSSPrimitiveValueConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCSSPrimitiveValuePrototypeFunctionSetFloatValue(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -284,7 +287,7 @@ JSValue JSC_HOST_CALL jsCSSPrimitiveValuePrototypeFunctionGetCounterValue(ExecSt ExceptionCode ec = 0; - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getCounterValue(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getCounterValue(ec))); setDOMException(exec, ec); return result; } @@ -299,7 +302,7 @@ JSValue JSC_HOST_CALL jsCSSPrimitiveValuePrototypeFunctionGetRectValue(ExecState ExceptionCode ec = 0; - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getRectValue(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getRectValue(ec))); setDOMException(exec, ec); return result; } @@ -314,7 +317,7 @@ JSValue JSC_HOST_CALL jsCSSPrimitiveValuePrototypeFunctionGetRGBColorValue(ExecS ExceptionCode ec = 0; - JSC::JSValue result = getJSRGBColor(exec, imp->getRGBColorValue(ec)); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getRGBColorValue(ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.h b/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.h index 39416aabc3..c1c8acc615 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.h @@ -30,7 +30,7 @@ class CSSPrimitiveValue; class JSCSSPrimitiveValue : public JSCSSValue { typedef JSCSSValue Base; public: - JSCSSPrimitiveValue(PassRefPtr<JSC::Structure>, PassRefPtr<CSSPrimitiveValue>); + JSCSSPrimitiveValue(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSPrimitiveValue>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp index 3aac528d30..ff2835299a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp @@ -78,12 +78,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSRuleConstructorTable = { 34, 31, JSCSSRuleConstructorTableValues, 0 }; #endif -class JSCSSRuleConstructor : public DOMObject { +class JSCSSRuleConstructor : public DOMConstructorObject { public: - JSCSSRuleConstructor(ExecState* exec) - : DOMObject(JSCSSRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -140,8 +140,8 @@ bool JSCSSRulePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& p const ClassInfo JSCSSRule::s_info = { "CSSRule", 0, &JSCSSRuleTable, 0 }; -JSCSSRule::JSCSSRule(PassRefPtr<Structure> structure, PassRefPtr<CSSRule> impl) - : DOMObject(structure) +JSCSSRule::JSCSSRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSRule> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -163,35 +163,40 @@ bool JSCSSRule::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsCSSRuleType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSRule* castedThis = static_cast<JSCSSRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSRule* imp = static_cast<CSSRule*>(static_cast<JSCSSRule*>(asObject(slot.slotBase()))->impl()); + CSSRule* imp = static_cast<CSSRule*>(castedThis->impl()); return jsNumber(exec, imp->type()); } JSValue jsCSSRuleCssText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSRule* castedThis = static_cast<JSCSSRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSRule* imp = static_cast<CSSRule*>(static_cast<JSCSSRule*>(asObject(slot.slotBase()))->impl()); + CSSRule* imp = static_cast<CSSRule*>(castedThis->impl()); return jsStringOrNull(exec, imp->cssText()); } JSValue jsCSSRuleParentStyleSheet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSRule* castedThis = static_cast<JSCSSRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSRule* imp = static_cast<CSSRule*>(static_cast<JSCSSRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parentStyleSheet())); + CSSRule* imp = static_cast<CSSRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentStyleSheet())); } JSValue jsCSSRuleParentRule(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSRule* castedThis = static_cast<JSCSSRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSRule* imp = static_cast<CSSRule*>(static_cast<JSCSSRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parentRule())); + CSSRule* imp = static_cast<CSSRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentRule())); } JSValue jsCSSRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSRule* domObject = static_cast<JSCSSRule*>(asObject(slot.slotBase())); + return JSCSSRule::getConstructor(exec, domObject->globalObject()); } void JSCSSRule::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -206,9 +211,9 @@ void setJSCSSRuleCssText(ExecState* exec, JSObject* thisObject, JSValue value) setDOMException(exec, ec); } -JSValue JSCSSRule::getConstructor(ExecState* exec) +JSValue JSCSSRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSRuleConstructor>(exec); + return getDOMConstructor<JSCSSRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSRule.h b/src/3rdparty/webkit/WebCore/generated/JSCSSRule.h index 75bb902559..c5a0c8dd06 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSRule.h @@ -21,6 +21,7 @@ #ifndef JSCSSRule_h #define JSCSSRule_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class CSSRule; -class JSCSSRule : public DOMObject { - typedef DOMObject Base; +class JSCSSRule : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCSSRule(PassRefPtr<JSC::Structure>, PassRefPtr<CSSRule>); + JSCSSRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSRule>); virtual ~JSCSSRule(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -45,14 +46,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); CSSRule* impl() const { return m_impl.get(); } private: RefPtr<CSSRule> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, CSSRule*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSRule*); CSSRule* toCSSRule(JSC::JSValue); class JSCSSRulePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp index 61880912ec..5717a53f2c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSRuleListConstructorTable = { 1, 0, JSCSSRuleListConstructorTableValues, 0 }; #endif -class JSCSSRuleListConstructor : public DOMObject { +class JSCSSRuleListConstructor : public DOMConstructorObject { public: - JSCSSRuleListConstructor(ExecState* exec) - : DOMObject(JSCSSRuleListConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSRuleListConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSRuleListConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSRuleListPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSRuleListPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -118,8 +118,8 @@ bool JSCSSRuleListPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSCSSRuleList::s_info = { "CSSRuleList", 0, &JSCSSRuleListTable, 0 }; -JSCSSRuleList::JSCSSRuleList(PassRefPtr<Structure> structure, PassRefPtr<CSSRuleList> impl) - : DOMObject(structure) +JSCSSRuleList::JSCSSRuleList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSRuleList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -161,14 +161,16 @@ bool JSCSSRuleList::getOwnPropertySlot(ExecState* exec, unsigned propertyName, P JSValue jsCSSRuleListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSRuleList* castedThis = static_cast<JSCSSRuleList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSRuleList* imp = static_cast<CSSRuleList*>(static_cast<JSCSSRuleList*>(asObject(slot.slotBase()))->impl()); + CSSRuleList* imp = static_cast<CSSRuleList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsCSSRuleListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSRuleList*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSRuleList* domObject = static_cast<JSCSSRuleList*>(asObject(slot.slotBase())); + return JSCSSRuleList::getConstructor(exec, domObject->globalObject()); } void JSCSSRuleList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -177,9 +179,9 @@ void JSCSSRuleList::getPropertyNames(ExecState* exec, PropertyNameArray& propert Base::getPropertyNames(exec, propertyNames); } -JSValue JSCSSRuleList::getConstructor(ExecState* exec) +JSValue JSCSSRuleList::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSRuleListConstructor>(exec); + return getDOMConstructor<JSCSSRuleListConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCSSRuleListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -192,7 +194,7 @@ JSValue JSC_HOST_CALL jsCSSRuleListPrototypeFunctionItem(ExecState* exec, JSObje unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -200,11 +202,11 @@ JSValue JSC_HOST_CALL jsCSSRuleListPrototypeFunctionItem(ExecState* exec, JSObje JSValue JSCSSRuleList::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSCSSRuleList* thisObj = static_cast<JSCSSRuleList*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<CSSRuleList*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<CSSRuleList*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, CSSRuleList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, CSSRuleList* object) { - return getDOMObjectWrapper<JSCSSRuleList>(exec, object); + return getDOMObjectWrapper<JSCSSRuleList>(exec, globalObject, object); } CSSRuleList* toCSSRuleList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.h b/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.h index ba3180c397..fb400b200a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.h @@ -21,6 +21,7 @@ #ifndef JSCSSRuleList_h #define JSCSSRuleList_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class CSSRuleList; -class JSCSSRuleList : public DOMObject { - typedef DOMObject Base; +class JSCSSRuleList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCSSRuleList(PassRefPtr<JSC::Structure>, PassRefPtr<CSSRuleList>); + JSCSSRuleList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSRuleList>); virtual ~JSCSSRuleList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); CSSRuleList* impl() const { return m_impl.get(); } private: @@ -54,7 +55,7 @@ private: static JSC::JSValue indexGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, CSSRuleList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSRuleList*); CSSRuleList* toCSSRuleList(JSC::JSValue); class JSCSSRuleListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp index c437238079..87fc6e3b23 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp @@ -72,12 +72,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSStyleDeclarationConstructorTable = { 1, 0, JSCSSStyleDeclarationConstructorTableValues, 0 }; #endif -class JSCSSStyleDeclarationConstructor : public DOMObject { +class JSCSSStyleDeclarationConstructor : public DOMConstructorObject { public: - JSCSSStyleDeclarationConstructor(ExecState* exec) - : DOMObject(JSCSSStyleDeclarationConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSStyleDeclarationConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSStyleDeclarationConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSStyleDeclarationPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSStyleDeclarationPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -132,8 +132,8 @@ bool JSCSSStyleDeclarationPrototype::getOwnPropertySlot(ExecState* exec, const I const ClassInfo JSCSSStyleDeclaration::s_info = { "CSSStyleDeclaration", 0, &JSCSSStyleDeclarationTable, 0 }; -JSCSSStyleDeclaration::JSCSSStyleDeclaration(PassRefPtr<Structure> structure, PassRefPtr<CSSStyleDeclaration> impl) - : DOMObject(structure) +JSCSSStyleDeclaration::JSCSSStyleDeclaration(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSStyleDeclaration> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -179,28 +179,32 @@ bool JSCSSStyleDeclaration::getOwnPropertySlot(ExecState* exec, unsigned propert JSValue jsCSSStyleDeclarationCssText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSStyleDeclaration* castedThis = static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase()))->impl()); + CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(castedThis->impl()); return jsStringOrNull(exec, imp->cssText()); } JSValue jsCSSStyleDeclarationLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSStyleDeclaration* castedThis = static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase()))->impl()); + CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsCSSStyleDeclarationParentRule(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSStyleDeclaration* castedThis = static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parentRule())); + CSSStyleDeclaration* imp = static_cast<CSSStyleDeclaration*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentRule())); } JSValue jsCSSStyleDeclarationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSStyleDeclaration* domObject = static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase())); + return JSCSSStyleDeclaration::getConstructor(exec, domObject->globalObject()); } void JSCSSStyleDeclaration::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -224,9 +228,9 @@ void JSCSSStyleDeclaration::getPropertyNames(ExecState* exec, PropertyNameArray& Base::getPropertyNames(exec, propertyNames); } -JSValue JSCSSStyleDeclaration::getConstructor(ExecState* exec) +JSValue JSCSSStyleDeclaration::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSStyleDeclarationConstructor>(exec); + return getDOMConstructor<JSCSSStyleDeclarationConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyValue(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -253,7 +257,7 @@ JSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyCSSValue( const UString& propertyName = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPropertyCSSValue(propertyName))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPropertyCSSValue(propertyName))); return result; } @@ -352,9 +356,9 @@ JSValue JSCSSStyleDeclaration::indexGetter(ExecState* exec, const Identifier&, c JSCSSStyleDeclaration* thisObj = static_cast<JSCSSStyleDeclaration*>(asObject(slot.slotBase())); return jsStringOrNull(exec, thisObj->impl()->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, CSSStyleDeclaration* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, CSSStyleDeclaration* object) { - return getDOMObjectWrapper<JSCSSStyleDeclaration>(exec, object); + return getDOMObjectWrapper<JSCSSStyleDeclaration>(exec, globalObject, object); } CSSStyleDeclaration* toCSSStyleDeclaration(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.h b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.h index df64ddea4e..075d438f22 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.h @@ -21,6 +21,7 @@ #ifndef JSCSSStyleDeclaration_h #define JSCSSStyleDeclaration_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class CSSStyleDeclaration; -class JSCSSStyleDeclaration : public DOMObject { - typedef DOMObject Base; +class JSCSSStyleDeclaration : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCSSStyleDeclaration(PassRefPtr<JSC::Structure>, PassRefPtr<CSSStyleDeclaration>); + JSCSSStyleDeclaration(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSStyleDeclaration>); virtual ~JSCSSStyleDeclaration(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,7 +49,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); CSSStyleDeclaration* impl() const { return m_impl.get(); } private: @@ -59,7 +60,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, CSSStyleDeclaration*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSStyleDeclaration*); CSSStyleDeclaration* toCSSStyleDeclaration(JSC::JSValue); class JSCSSStyleDeclarationPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp index a9f69a26c0..4e07880ded 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSStyleRuleConstructorTable = { 1, 0, JSCSSStyleRuleConstructorTableValues, 0 }; #endif -class JSCSSStyleRuleConstructor : public DOMObject { +class JSCSSStyleRuleConstructor : public DOMConstructorObject { public: - JSCSSStyleRuleConstructor(ExecState* exec) - : DOMObject(JSCSSStyleRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSStyleRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSStyleRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSStyleRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSStyleRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSCSSStyleRulePrototype::self(ExecState* exec, JSGlobalObject* globalO const ClassInfo JSCSSStyleRule::s_info = { "CSSStyleRule", &JSCSSRule::s_info, &JSCSSStyleRuleTable, 0 }; -JSCSSStyleRule::JSCSSStyleRule(PassRefPtr<Structure> structure, PassRefPtr<CSSStyleRule> impl) - : JSCSSRule(structure, impl) +JSCSSStyleRule::JSCSSStyleRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSStyleRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -129,21 +129,24 @@ bool JSCSSStyleRule::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsCSSStyleRuleSelectorText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSStyleRule* castedThis = static_cast<JSCSSStyleRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSStyleRule* imp = static_cast<CSSStyleRule*>(static_cast<JSCSSStyleRule*>(asObject(slot.slotBase()))->impl()); + CSSStyleRule* imp = static_cast<CSSStyleRule*>(castedThis->impl()); return jsStringOrNull(exec, imp->selectorText()); } JSValue jsCSSStyleRuleStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSStyleRule* castedThis = static_cast<JSCSSStyleRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSStyleRule* imp = static_cast<CSSStyleRule*>(static_cast<JSCSSStyleRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + CSSStyleRule* imp = static_cast<CSSStyleRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsCSSStyleRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSStyleRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSStyleRule* domObject = static_cast<JSCSSStyleRule*>(asObject(slot.slotBase())); + return JSCSSStyleRule::getConstructor(exec, domObject->globalObject()); } void JSCSSStyleRule::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -158,9 +161,9 @@ void setJSCSSStyleRuleSelectorText(ExecState* exec, JSObject* thisObject, JSValu setDOMException(exec, ec); } -JSValue JSCSSStyleRule::getConstructor(ExecState* exec) +JSValue JSCSSStyleRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSStyleRuleConstructor>(exec); + return getDOMConstructor<JSCSSStyleRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.h b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.h index 4f65c87de0..aaefdf39bb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.h @@ -30,7 +30,7 @@ class CSSStyleRule; class JSCSSStyleRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSCSSStyleRule(PassRefPtr<JSC::Structure>, PassRefPtr<CSSStyleRule>); + JSCSSStyleRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSStyleRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp index c1cc446018..7e745942dd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSStyleSheetConstructorTable = { 1, 0, JSCSSStyleSheetConstructorTableValues, 0 }; #endif -class JSCSSStyleSheetConstructor : public DOMObject { +class JSCSSStyleSheetConstructor : public DOMConstructorObject { public: - JSCSSStyleSheetConstructor(ExecState* exec) - : DOMObject(JSCSSStyleSheetConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSStyleSheetConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSStyleSheetConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSStyleSheetPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSStyleSheetPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -124,8 +124,8 @@ bool JSCSSStyleSheetPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSCSSStyleSheet::s_info = { "CSSStyleSheet", &JSStyleSheet::s_info, &JSCSSStyleSheetTable, 0 }; -JSCSSStyleSheet::JSCSSStyleSheet(PassRefPtr<Structure> structure, PassRefPtr<CSSStyleSheet> impl) - : JSStyleSheet(structure, impl) +JSCSSStyleSheet::JSCSSStyleSheet(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSStyleSheet> impl) + : JSStyleSheet(structure, globalObject, impl) { } @@ -141,32 +141,36 @@ bool JSCSSStyleSheet::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsCSSStyleSheetOwnerRule(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSStyleSheet* castedThis = static_cast<JSCSSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSStyleSheet* imp = static_cast<CSSStyleSheet*>(static_cast<JSCSSStyleSheet*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->ownerRule())); + CSSStyleSheet* imp = static_cast<CSSStyleSheet*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->ownerRule())); } JSValue jsCSSStyleSheetCssRules(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSStyleSheet* castedThis = static_cast<JSCSSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSStyleSheet* imp = static_cast<CSSStyleSheet*>(static_cast<JSCSSStyleSheet*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->cssRules())); + CSSStyleSheet* imp = static_cast<CSSStyleSheet*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->cssRules())); } JSValue jsCSSStyleSheetRules(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSStyleSheet* castedThis = static_cast<JSCSSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSStyleSheet* imp = static_cast<CSSStyleSheet*>(static_cast<JSCSSStyleSheet*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->rules())); + CSSStyleSheet* imp = static_cast<CSSStyleSheet*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->rules())); } JSValue jsCSSStyleSheetConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSStyleSheet*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSStyleSheet* domObject = static_cast<JSCSSStyleSheet*>(asObject(slot.slotBase())); + return JSCSSStyleSheet::getConstructor(exec, domObject->globalObject()); } -JSValue JSCSSStyleSheet::getConstructor(ExecState* exec) +JSValue JSCSSStyleSheet::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSStyleSheetConstructor>(exec); + return getDOMConstructor<JSCSSStyleSheetConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCSSStyleSheetPrototypeFunctionInsertRule(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.h b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.h index bd048f26cb..0881232943 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.h @@ -30,7 +30,7 @@ class CSSStyleSheet; class JSCSSStyleSheet : public JSStyleSheet { typedef JSStyleSheet Base; public: - JSCSSStyleSheet(PassRefPtr<JSC::Structure>, PassRefPtr<CSSStyleSheet>); + JSCSSStyleSheet(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSStyleSheet>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp index a4023049db..68c5bb8dc6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSValueConstructorTable = { 8, 7, JSCSSValueConstructorTableValues, 0 }; #endif -class JSCSSValueConstructor : public DOMObject { +class JSCSSValueConstructor : public DOMConstructorObject { public: - JSCSSValueConstructor(ExecState* exec) - : DOMObject(JSCSSValueConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSValueConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSValueConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSValuePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSValuePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -123,8 +123,8 @@ bool JSCSSValuePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSCSSValue::s_info = { "CSSValue", 0, &JSCSSValueTable, 0 }; -JSCSSValue::JSCSSValue(PassRefPtr<Structure> structure, PassRefPtr<CSSValue> impl) - : DOMObject(structure) +JSCSSValue::JSCSSValue(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSValue> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -146,21 +146,24 @@ bool JSCSSValue::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsCSSValueCssText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSValue* castedThis = static_cast<JSCSSValue*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSValue* imp = static_cast<CSSValue*>(static_cast<JSCSSValue*>(asObject(slot.slotBase()))->impl()); + CSSValue* imp = static_cast<CSSValue*>(castedThis->impl()); return jsStringOrNull(exec, imp->cssText()); } JSValue jsCSSValueCssValueType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSValue* castedThis = static_cast<JSCSSValue*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSValue* imp = static_cast<CSSValue*>(static_cast<JSCSSValue*>(asObject(slot.slotBase()))->impl()); + CSSValue* imp = static_cast<CSSValue*>(castedThis->impl()); return jsNumber(exec, imp->cssValueType()); } JSValue jsCSSValueConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSValue*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSValue* domObject = static_cast<JSCSSValue*>(asObject(slot.slotBase())); + return JSCSSValue::getConstructor(exec, domObject->globalObject()); } void JSCSSValue::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -175,9 +178,9 @@ void setJSCSSValueCssText(ExecState* exec, JSObject* thisObject, JSValue value) setDOMException(exec, ec); } -JSValue JSCSSValue::getConstructor(ExecState* exec) +JSValue JSCSSValue::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSValueConstructor>(exec); + return getDOMConstructor<JSCSSValueConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSValue.h b/src/3rdparty/webkit/WebCore/generated/JSCSSValue.h index d38c5c4296..82f03fd473 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSValue.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSValue.h @@ -21,6 +21,7 @@ #ifndef JSCSSValue_h #define JSCSSValue_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class CSSValue; -class JSCSSValue : public DOMObject { - typedef DOMObject Base; +class JSCSSValue : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCSSValue(PassRefPtr<JSC::Structure>, PassRefPtr<CSSValue>); + JSCSSValue(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSValue>); virtual ~JSCSSValue(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -45,14 +46,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); CSSValue* impl() const { return m_impl.get(); } private: RefPtr<CSSValue> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, CSSValue*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSValue*); CSSValue* toCSSValue(JSC::JSValue); class JSCSSValuePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp index 7322385227..c09806fc03 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSValueListConstructorTable = { 1, 0, JSCSSValueListConstructorTableValues, 0 }; #endif -class JSCSSValueListConstructor : public DOMObject { +class JSCSSValueListConstructor : public DOMConstructorObject { public: - JSCSSValueListConstructor(ExecState* exec) - : DOMObject(JSCSSValueListConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSValueListConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSValueListConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSValueListPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSValueListPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -118,8 +118,8 @@ bool JSCSSValueListPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSCSSValueList::s_info = { "CSSValueList", &JSCSSValue::s_info, &JSCSSValueListTable, 0 }; -JSCSSValueList::JSCSSValueList(PassRefPtr<Structure> structure, PassRefPtr<CSSValueList> impl) - : JSCSSValue(structure, impl) +JSCSSValueList::JSCSSValueList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSValueList> impl) + : JSCSSValue(structure, globalObject, impl) { } @@ -155,14 +155,16 @@ bool JSCSSValueList::getOwnPropertySlot(ExecState* exec, unsigned propertyName, JSValue jsCSSValueListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSValueList* castedThis = static_cast<JSCSSValueList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSValueList* imp = static_cast<CSSValueList*>(static_cast<JSCSSValueList*>(asObject(slot.slotBase()))->impl()); + CSSValueList* imp = static_cast<CSSValueList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsCSSValueListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSValueList*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSValueList* domObject = static_cast<JSCSSValueList*>(asObject(slot.slotBase())); + return JSCSSValueList::getConstructor(exec, domObject->globalObject()); } void JSCSSValueList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -171,9 +173,9 @@ void JSCSSValueList::getPropertyNames(ExecState* exec, PropertyNameArray& proper Base::getPropertyNames(exec, propertyNames); } -JSValue JSCSSValueList::getConstructor(ExecState* exec) +JSValue JSCSSValueList::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSValueListConstructor>(exec); + return getDOMConstructor<JSCSSValueListConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCSSValueListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -186,7 +188,7 @@ JSValue JSC_HOST_CALL jsCSSValueListPrototypeFunctionItem(ExecState* exec, JSObj unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -194,7 +196,7 @@ JSValue JSC_HOST_CALL jsCSSValueListPrototypeFunctionItem(ExecState* exec, JSObj JSValue JSCSSValueList::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSCSSValueList* thisObj = static_cast<JSCSSValueList*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<CSSValueList*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<CSSValueList*>(thisObj->impl())->item(slot.index())); } } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.h b/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.h index 3d350937a8..59eb2035c1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSValueList.h @@ -30,7 +30,7 @@ class CSSValueList; class JSCSSValueList : public JSCSSValue { typedef JSCSSValue Base; public: - JSCSSValueList(PassRefPtr<JSC::Structure>, PassRefPtr<CSSValueList>); + JSCSSValueList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSValueList>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); @@ -43,7 +43,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); static JSC::JSValue indexGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp index 4aa1770a89..307492804a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp @@ -69,12 +69,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSVariablesDeclarationConstructorTable = { 1, 0, JSCSSVariablesDeclarationConstructorTableValues, 0 }; #endif -class JSCSSVariablesDeclarationConstructor : public DOMObject { +class JSCSSVariablesDeclarationConstructor : public DOMConstructorObject { public: - JSCSSVariablesDeclarationConstructor(ExecState* exec) - : DOMObject(JSCSSVariablesDeclarationConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSVariablesDeclarationConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSVariablesDeclarationConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSVariablesDeclarationPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSVariablesDeclarationPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -125,8 +125,8 @@ bool JSCSSVariablesDeclarationPrototype::getOwnPropertySlot(ExecState* exec, con const ClassInfo JSCSSVariablesDeclaration::s_info = { "CSSVariablesDeclaration", 0, &JSCSSVariablesDeclarationTable, 0 }; -JSCSSVariablesDeclaration::JSCSSVariablesDeclaration(PassRefPtr<Structure> structure, PassRefPtr<CSSVariablesDeclaration> impl) - : DOMObject(structure) +JSCSSVariablesDeclaration::JSCSSVariablesDeclaration(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSVariablesDeclaration> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -168,28 +168,32 @@ bool JSCSSVariablesDeclaration::getOwnPropertySlot(ExecState* exec, unsigned pro JSValue jsCSSVariablesDeclarationCssText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSVariablesDeclaration* castedThis = static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSVariablesDeclaration* imp = static_cast<CSSVariablesDeclaration*>(static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase()))->impl()); + CSSVariablesDeclaration* imp = static_cast<CSSVariablesDeclaration*>(castedThis->impl()); return jsString(exec, imp->cssText()); } JSValue jsCSSVariablesDeclarationLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSVariablesDeclaration* castedThis = static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSVariablesDeclaration* imp = static_cast<CSSVariablesDeclaration*>(static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase()))->impl()); + CSSVariablesDeclaration* imp = static_cast<CSSVariablesDeclaration*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsCSSVariablesDeclarationParentRule(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSVariablesDeclaration* castedThis = static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSVariablesDeclaration* imp = static_cast<CSSVariablesDeclaration*>(static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parentRule())); + CSSVariablesDeclaration* imp = static_cast<CSSVariablesDeclaration*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentRule())); } JSValue jsCSSVariablesDeclarationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSVariablesDeclaration* domObject = static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase())); + return JSCSSVariablesDeclaration::getConstructor(exec, domObject->globalObject()); } void JSCSSVariablesDeclaration::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -209,9 +213,9 @@ void JSCSSVariablesDeclaration::getPropertyNames(ExecState* exec, PropertyNameAr Base::getPropertyNames(exec, propertyNames); } -JSValue JSCSSVariablesDeclaration::getConstructor(ExecState* exec) +JSValue JSCSSVariablesDeclaration::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSVariablesDeclarationConstructor>(exec); + return getDOMConstructor<JSCSSVariablesDeclarationConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCSSVariablesDeclarationPrototypeFunctionGetVariableValue(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -280,9 +284,9 @@ JSValue JSCSSVariablesDeclaration::indexGetter(ExecState* exec, const Identifier JSCSSVariablesDeclaration* thisObj = static_cast<JSCSSVariablesDeclaration*>(asObject(slot.slotBase())); return jsStringOrNull(exec, thisObj->impl()->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, CSSVariablesDeclaration* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, CSSVariablesDeclaration* object) { - return getDOMObjectWrapper<JSCSSVariablesDeclaration>(exec, object); + return getDOMObjectWrapper<JSCSSVariablesDeclaration>(exec, globalObject, object); } CSSVariablesDeclaration* toCSSVariablesDeclaration(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.h b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.h index fe98f8e13c..f2c62b045a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.h @@ -21,6 +21,7 @@ #ifndef JSCSSVariablesDeclaration_h #define JSCSSVariablesDeclaration_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class CSSVariablesDeclaration; -class JSCSSVariablesDeclaration : public DOMObject { - typedef DOMObject Base; +class JSCSSVariablesDeclaration : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCSSVariablesDeclaration(PassRefPtr<JSC::Structure>, PassRefPtr<CSSVariablesDeclaration>); + JSCSSVariablesDeclaration(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSVariablesDeclaration>); virtual ~JSCSSVariablesDeclaration(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,7 +48,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); CSSVariablesDeclaration* impl() const { return m_impl.get(); } private: @@ -55,7 +56,7 @@ private: static JSC::JSValue indexGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, CSSVariablesDeclaration*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSVariablesDeclaration*); CSSVariablesDeclaration* toCSSVariablesDeclaration(JSC::JSValue); class JSCSSVariablesDeclarationPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp index f28aaed4ec..241a4f10d9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSCSSVariablesRuleConstructorTable = { 1, 0, JSCSSVariablesRuleConstructorTableValues, 0 }; #endif -class JSCSSVariablesRuleConstructor : public DOMObject { +class JSCSSVariablesRuleConstructor : public DOMConstructorObject { public: - JSCSSVariablesRuleConstructor(ExecState* exec) - : DOMObject(JSCSSVariablesRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCSSVariablesRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCSSVariablesRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCSSVariablesRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCSSVariablesRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSCSSVariablesRulePrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSCSSVariablesRule::s_info = { "CSSVariablesRule", &JSCSSRule::s_info, &JSCSSVariablesRuleTable, 0 }; -JSCSSVariablesRule::JSCSSVariablesRule(PassRefPtr<Structure> structure, PassRefPtr<CSSVariablesRule> impl) - : JSCSSRule(structure, impl) +JSCSSVariablesRule::JSCSSVariablesRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSVariablesRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -129,25 +129,28 @@ bool JSCSSVariablesRule::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsCSSVariablesRuleMedia(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSVariablesRule* castedThis = static_cast<JSCSSVariablesRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSVariablesRule* imp = static_cast<CSSVariablesRule*>(static_cast<JSCSSVariablesRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->media())); + CSSVariablesRule* imp = static_cast<CSSVariablesRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->media())); } JSValue jsCSSVariablesRuleVariables(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCSSVariablesRule* castedThis = static_cast<JSCSSVariablesRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CSSVariablesRule* imp = static_cast<CSSVariablesRule*>(static_cast<JSCSSVariablesRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->variables())); + CSSVariablesRule* imp = static_cast<CSSVariablesRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->variables())); } JSValue jsCSSVariablesRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCSSVariablesRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCSSVariablesRule* domObject = static_cast<JSCSSVariablesRule*>(asObject(slot.slotBase())); + return JSCSSVariablesRule::getConstructor(exec, domObject->globalObject()); } -JSValue JSCSSVariablesRule::getConstructor(ExecState* exec) +JSValue JSCSSVariablesRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCSSVariablesRuleConstructor>(exec); + return getDOMConstructor<JSCSSVariablesRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.h b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.h index c204a1e2cf..b2f49dbd8a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.h @@ -30,7 +30,7 @@ class CSSVariablesRule; class JSCSSVariablesRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSCSSVariablesRule(PassRefPtr<JSC::Structure>, PassRefPtr<CSSVariablesRule>); + JSCSSVariablesRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CSSVariablesRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp index 79db6e0379..ef5fa3af8e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp @@ -61,8 +61,8 @@ bool JSCanvasGradientPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSCanvasGradient::s_info = { "CanvasGradient", 0, 0, 0 }; -JSCanvasGradient::JSCanvasGradient(PassRefPtr<Structure> structure, PassRefPtr<CanvasGradient> impl) - : DOMObject(structure) +JSCanvasGradient::JSCanvasGradient(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CanvasGradient> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -93,9 +93,9 @@ JSValue JSC_HOST_CALL jsCanvasGradientPrototypeFunctionAddColorStop(ExecState* e return jsUndefined(); } -JSC::JSValue toJS(JSC::ExecState* exec, CanvasGradient* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, CanvasGradient* object) { - return getDOMObjectWrapper<JSCanvasGradient>(exec, object); + return getDOMObjectWrapper<JSCanvasGradient>(exec, globalObject, object); } CanvasGradient* toCanvasGradient(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.h b/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.h index e81a3b44a0..f2673f0454 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.h @@ -21,6 +21,7 @@ #ifndef JSCanvasGradient_h #define JSCanvasGradient_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class CanvasGradient; -class JSCanvasGradient : public DOMObject { - typedef DOMObject Base; +class JSCanvasGradient : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCanvasGradient(PassRefPtr<JSC::Structure>, PassRefPtr<CanvasGradient>); + JSCanvasGradient(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CanvasGradient>); virtual ~JSCanvasGradient(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +45,7 @@ private: RefPtr<CanvasGradient> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, CanvasGradient*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CanvasGradient*); CanvasGradient* toCanvasGradient(JSC::JSValue); class JSCanvasGradientPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp index c443a9c1e0..3facb356fa 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp @@ -53,8 +53,8 @@ JSObject* JSCanvasPatternPrototype::self(ExecState* exec, JSGlobalObject* global const ClassInfo JSCanvasPattern::s_info = { "CanvasPattern", 0, 0, 0 }; -JSCanvasPattern::JSCanvasPattern(PassRefPtr<Structure> structure, PassRefPtr<CanvasPattern> impl) - : DOMObject(structure) +JSCanvasPattern::JSCanvasPattern(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CanvasPattern> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -69,9 +69,9 @@ JSObject* JSCanvasPattern::createPrototype(ExecState* exec, JSGlobalObject* glob return new (exec) JSCanvasPatternPrototype(JSCanvasPatternPrototype::createStructure(globalObject->objectPrototype())); } -JSC::JSValue toJS(JSC::ExecState* exec, CanvasPattern* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, CanvasPattern* object) { - return getDOMObjectWrapper<JSCanvasPattern>(exec, object); + return getDOMObjectWrapper<JSCanvasPattern>(exec, globalObject, object); } CanvasPattern* toCanvasPattern(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.h b/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.h index 776b830694..ec8c97f91d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.h @@ -21,6 +21,7 @@ #ifndef JSCanvasPattern_h #define JSCanvasPattern_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class CanvasPattern; -class JSCanvasPattern : public DOMObject { - typedef DOMObject Base; +class JSCanvasPattern : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCanvasPattern(PassRefPtr<JSC::Structure>, PassRefPtr<CanvasPattern>); + JSCanvasPattern(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CanvasPattern>); virtual ~JSCanvasPattern(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +45,7 @@ private: RefPtr<CanvasPattern> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, CanvasPattern*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CanvasPattern*); CanvasPattern* toCanvasPattern(JSC::JSValue); class JSCanvasPatternPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp index fd54b4f658..a42f8ab139 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp @@ -90,12 +90,12 @@ static JSC_CONST_HASHTABLE HashTable JSCanvasRenderingContext2DConstructorTable { 1, 0, JSCanvasRenderingContext2DConstructorTableValues, 0 }; #endif -class JSCanvasRenderingContext2DConstructor : public DOMObject { +class JSCanvasRenderingContext2DConstructor : public DOMConstructorObject { public: - JSCanvasRenderingContext2DConstructor(ExecState* exec) - : DOMObject(JSCanvasRenderingContext2DConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCanvasRenderingContext2DConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCanvasRenderingContext2DConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCanvasRenderingContext2DPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCanvasRenderingContext2DPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -186,8 +186,8 @@ bool JSCanvasRenderingContext2DPrototype::getOwnPropertySlot(ExecState* exec, co const ClassInfo JSCanvasRenderingContext2D::s_info = { "CanvasRenderingContext2D", 0, &JSCanvasRenderingContext2DTable, 0 }; -JSCanvasRenderingContext2D::JSCanvasRenderingContext2D(PassRefPtr<Structure> structure, PassRefPtr<CanvasRenderingContext2D> impl) - : DOMObject(structure) +JSCanvasRenderingContext2D::JSCanvasRenderingContext2D(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CanvasRenderingContext2D> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -209,115 +209,132 @@ bool JSCanvasRenderingContext2D::getOwnPropertySlot(ExecState* exec, const Ident JSValue jsCanvasRenderingContext2DCanvas(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->canvas())); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->canvas())); } JSValue jsCanvasRenderingContext2DGlobalAlpha(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsNumber(exec, imp->globalAlpha()); } JSValue jsCanvasRenderingContext2DGlobalCompositeOperation(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsString(exec, imp->globalCompositeOperation()); } JSValue jsCanvasRenderingContext2DLineWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsNumber(exec, imp->lineWidth()); } JSValue jsCanvasRenderingContext2DLineCap(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsString(exec, imp->lineCap()); } JSValue jsCanvasRenderingContext2DLineJoin(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsString(exec, imp->lineJoin()); } JSValue jsCanvasRenderingContext2DMiterLimit(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsNumber(exec, imp->miterLimit()); } JSValue jsCanvasRenderingContext2DShadowOffsetX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsNumber(exec, imp->shadowOffsetX()); } JSValue jsCanvasRenderingContext2DShadowOffsetY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsNumber(exec, imp->shadowOffsetY()); } JSValue jsCanvasRenderingContext2DShadowBlur(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsNumber(exec, imp->shadowBlur()); } JSValue jsCanvasRenderingContext2DShadowColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsString(exec, imp->shadowColor()); } JSValue jsCanvasRenderingContext2DFont(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsString(exec, imp->font()); } JSValue jsCanvasRenderingContext2DTextAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsString(exec, imp->textAlign()); } JSValue jsCanvasRenderingContext2DTextBaseline(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->impl()); + CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThis->impl()); return jsString(exec, imp->textBaseline()); } JSValue jsCanvasRenderingContext2DStrokeStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->strokeStyle(exec); + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); + return castedThis->strokeStyle(exec); } JSValue jsCanvasRenderingContext2DFillStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->fillStyle(exec); + JSCanvasRenderingContext2D* castedThis = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); + return castedThis->fillStyle(exec); } JSValue jsCanvasRenderingContext2DConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCanvasRenderingContext2D* domObject = static_cast<JSCanvasRenderingContext2D*>(asObject(slot.slotBase())); + return JSCanvasRenderingContext2D::getConstructor(exec, domObject->globalObject()); } void JSCanvasRenderingContext2D::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -412,9 +429,9 @@ void setJSCanvasRenderingContext2DFillStyle(ExecState* exec, JSObject* thisObjec static_cast<JSCanvasRenderingContext2D*>(thisObject)->setFillStyle(exec, value); } -JSValue JSCanvasRenderingContext2D::getConstructor(ExecState* exec) +JSValue JSCanvasRenderingContext2D::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCanvasRenderingContext2DConstructor>(exec); + return getDOMConstructor<JSCanvasRenderingContext2DConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionSave(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -532,7 +549,7 @@ JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionCreateLinearGra float y1 = args.at(3).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createLinearGradient(x0, y0, x1, y1, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createLinearGradient(x0, y0, x1, y1, ec))); setDOMException(exec, ec); return result; } @@ -553,7 +570,7 @@ JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionCreateRadialGra float r1 = args.at(5).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createRadialGradient(x0, y0, r0, x1, y1, r1, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createRadialGradient(x0, y0, r0, x1, y1, r1, ec))); setDOMException(exec, ec); return result; } @@ -810,7 +827,7 @@ JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionMeasureText(Exe const UString& text = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->measureText(text))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->measureText(text))); return result; } @@ -978,7 +995,7 @@ JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionCreateImageData float sh = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createImageData(sw, sh))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createImageData(sw, sh))); return result; } @@ -996,7 +1013,7 @@ JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionGetImageData(Ex float sh = args.at(3).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getImageData(sx, sy, sw, sh, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getImageData(sx, sy, sw, sh, ec))); setDOMException(exec, ec); return result; } @@ -1010,9 +1027,9 @@ JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionPutImageData(Ex return castedThisObj->putImageData(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, CanvasRenderingContext2D* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, CanvasRenderingContext2D* object) { - return getDOMObjectWrapper<JSCanvasRenderingContext2D>(exec, object); + return getDOMObjectWrapper<JSCanvasRenderingContext2D>(exec, globalObject, object); } CanvasRenderingContext2D* toCanvasRenderingContext2D(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h index 6c084d1a6c..cee9884dde 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h @@ -21,6 +21,7 @@ #ifndef JSCanvasRenderingContext2D_h #define JSCanvasRenderingContext2D_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class CanvasRenderingContext2D; -class JSCanvasRenderingContext2D : public DOMObject { - typedef DOMObject Base; +class JSCanvasRenderingContext2D : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCanvasRenderingContext2D(PassRefPtr<JSC::Structure>, PassRefPtr<CanvasRenderingContext2D>); + JSCanvasRenderingContext2D(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CanvasRenderingContext2D>); virtual ~JSCanvasRenderingContext2D(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -45,7 +46,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes JSC::JSValue strokeStyle(JSC::ExecState*) const; @@ -70,7 +71,7 @@ private: RefPtr<CanvasRenderingContext2D> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, CanvasRenderingContext2D*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CanvasRenderingContext2D*); CanvasRenderingContext2D* toCanvasRenderingContext2D(JSC::JSValue); class JSCanvasRenderingContext2DPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp b/src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp index a2d10e4090..5c86d072ee 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSCharacterDataConstructorTable = { 1, 0, JSCharacterDataConstructorTableValues, 0 }; #endif -class JSCharacterDataConstructor : public DOMObject { +class JSCharacterDataConstructor : public DOMConstructorObject { public: - JSCharacterDataConstructor(ExecState* exec) - : DOMObject(JSCharacterDataConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCharacterDataConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCharacterDataConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCharacterDataPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCharacterDataPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -123,8 +123,8 @@ bool JSCharacterDataPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSCharacterData::s_info = { "CharacterData", &JSNode::s_info, &JSCharacterDataTable, 0 }; -JSCharacterData::JSCharacterData(PassRefPtr<Structure> structure, PassRefPtr<CharacterData> impl) - : JSNode(structure, impl) +JSCharacterData::JSCharacterData(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CharacterData> impl) + : JSNode(structure, globalObject, impl) { } @@ -140,21 +140,24 @@ bool JSCharacterData::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsCharacterDataData(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCharacterData* castedThis = static_cast<JSCharacterData*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CharacterData* imp = static_cast<CharacterData*>(static_cast<JSCharacterData*>(asObject(slot.slotBase()))->impl()); + CharacterData* imp = static_cast<CharacterData*>(castedThis->impl()); return jsString(exec, imp->data()); } JSValue jsCharacterDataLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCharacterData* castedThis = static_cast<JSCharacterData*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - CharacterData* imp = static_cast<CharacterData*>(static_cast<JSCharacterData*>(asObject(slot.slotBase()))->impl()); + CharacterData* imp = static_cast<CharacterData*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsCharacterDataConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCharacterData*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCharacterData* domObject = static_cast<JSCharacterData*>(asObject(slot.slotBase())); + return JSCharacterData::getConstructor(exec, domObject->globalObject()); } void JSCharacterData::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -169,9 +172,9 @@ void setJSCharacterDataData(ExecState* exec, JSObject* thisObject, JSValue value setDOMException(exec, ec); } -JSValue JSCharacterData::getConstructor(ExecState* exec) +JSValue JSCharacterData::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCharacterDataConstructor>(exec); + return getDOMConstructor<JSCharacterDataConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsCharacterDataPrototypeFunctionSubstringData(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCharacterData.h b/src/3rdparty/webkit/WebCore/generated/JSCharacterData.h index 273318f6f3..1f6091f6e6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCharacterData.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCharacterData.h @@ -30,7 +30,7 @@ class CharacterData; class JSCharacterData : public JSNode { typedef JSNode Base; public: - JSCharacterData(PassRefPtr<JSC::Structure>, PassRefPtr<CharacterData>); + JSCharacterData(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<CharacterData>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp index aea6ac5342..ba2e7561e0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSClientRectConstructorTable = { 1, 0, JSClientRectConstructorTableValues, 0 }; #endif -class JSClientRectConstructor : public DOMObject { +class JSClientRectConstructor : public DOMConstructorObject { public: - JSClientRectConstructor(ExecState* exec) - : DOMObject(JSClientRectConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSClientRectConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSClientRectConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSClientRectPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSClientRectPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -113,8 +113,8 @@ JSObject* JSClientRectPrototype::self(ExecState* exec, JSGlobalObject* globalObj const ClassInfo JSClientRect::s_info = { "ClientRect", 0, &JSClientRectTable, 0 }; -JSClientRect::JSClientRect(PassRefPtr<Structure> structure, PassRefPtr<ClientRect> impl) - : DOMObject(structure) +JSClientRect::JSClientRect(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ClientRect> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -136,58 +136,65 @@ bool JSClientRect::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsClientRectTop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClientRect* castedThis = static_cast<JSClientRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ClientRect* imp = static_cast<ClientRect*>(static_cast<JSClientRect*>(asObject(slot.slotBase()))->impl()); + ClientRect* imp = static_cast<ClientRect*>(castedThis->impl()); return jsNumber(exec, imp->top()); } JSValue jsClientRectRight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClientRect* castedThis = static_cast<JSClientRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ClientRect* imp = static_cast<ClientRect*>(static_cast<JSClientRect*>(asObject(slot.slotBase()))->impl()); + ClientRect* imp = static_cast<ClientRect*>(castedThis->impl()); return jsNumber(exec, imp->right()); } JSValue jsClientRectBottom(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClientRect* castedThis = static_cast<JSClientRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ClientRect* imp = static_cast<ClientRect*>(static_cast<JSClientRect*>(asObject(slot.slotBase()))->impl()); + ClientRect* imp = static_cast<ClientRect*>(castedThis->impl()); return jsNumber(exec, imp->bottom()); } JSValue jsClientRectLeft(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClientRect* castedThis = static_cast<JSClientRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ClientRect* imp = static_cast<ClientRect*>(static_cast<JSClientRect*>(asObject(slot.slotBase()))->impl()); + ClientRect* imp = static_cast<ClientRect*>(castedThis->impl()); return jsNumber(exec, imp->left()); } JSValue jsClientRectWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClientRect* castedThis = static_cast<JSClientRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ClientRect* imp = static_cast<ClientRect*>(static_cast<JSClientRect*>(asObject(slot.slotBase()))->impl()); + ClientRect* imp = static_cast<ClientRect*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsClientRectHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClientRect* castedThis = static_cast<JSClientRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ClientRect* imp = static_cast<ClientRect*>(static_cast<JSClientRect*>(asObject(slot.slotBase()))->impl()); + ClientRect* imp = static_cast<ClientRect*>(castedThis->impl()); return jsNumber(exec, imp->height()); } JSValue jsClientRectConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSClientRect*>(asObject(slot.slotBase()))->getConstructor(exec); + JSClientRect* domObject = static_cast<JSClientRect*>(asObject(slot.slotBase())); + return JSClientRect::getConstructor(exec, domObject->globalObject()); } -JSValue JSClientRect::getConstructor(ExecState* exec) +JSValue JSClientRect::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSClientRectConstructor>(exec); + return getDOMConstructor<JSClientRectConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } -JSC::JSValue toJS(JSC::ExecState* exec, ClientRect* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, ClientRect* object) { - return getDOMObjectWrapper<JSClientRect>(exec, object); + return getDOMObjectWrapper<JSClientRect>(exec, globalObject, object); } ClientRect* toClientRect(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSClientRect.h b/src/3rdparty/webkit/WebCore/generated/JSClientRect.h index 13a7b3812e..9e6e951138 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClientRect.h +++ b/src/3rdparty/webkit/WebCore/generated/JSClientRect.h @@ -21,6 +21,7 @@ #ifndef JSClientRect_h #define JSClientRect_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class ClientRect; -class JSClientRect : public DOMObject { - typedef DOMObject Base; +class JSClientRect : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSClientRect(PassRefPtr<JSC::Structure>, PassRefPtr<ClientRect>); + JSClientRect(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<ClientRect>); virtual ~JSClientRect(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); ClientRect* impl() const { return m_impl.get(); } private: RefPtr<ClientRect> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, ClientRect*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, ClientRect*); ClientRect* toClientRect(JSC::JSValue); class JSClientRectPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp b/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp index 854daa3fc1..f8c99a2fc1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSClientRectListConstructorTable = { 1, 0, JSClientRectListConstructorTableValues, 0 }; #endif -class JSClientRectListConstructor : public DOMObject { +class JSClientRectListConstructor : public DOMConstructorObject { public: - JSClientRectListConstructor(ExecState* exec) - : DOMObject(JSClientRectListConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSClientRectListConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSClientRectListConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSClientRectListPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSClientRectListPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -119,8 +119,8 @@ bool JSClientRectListPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSClientRectList::s_info = { "ClientRectList", 0, &JSClientRectListTable, 0 }; -JSClientRectList::JSClientRectList(PassRefPtr<Structure> structure, PassRefPtr<ClientRectList> impl) - : DOMObject(structure) +JSClientRectList::JSClientRectList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ClientRectList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -162,14 +162,16 @@ bool JSClientRectList::getOwnPropertySlot(ExecState* exec, unsigned propertyName JSValue jsClientRectListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClientRectList* castedThis = static_cast<JSClientRectList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ClientRectList* imp = static_cast<ClientRectList*>(static_cast<JSClientRectList*>(asObject(slot.slotBase()))->impl()); + ClientRectList* imp = static_cast<ClientRectList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsClientRectListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSClientRectList*>(asObject(slot.slotBase()))->getConstructor(exec); + JSClientRectList* domObject = static_cast<JSClientRectList*>(asObject(slot.slotBase())); + return JSClientRectList::getConstructor(exec, domObject->globalObject()); } void JSClientRectList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -178,9 +180,9 @@ void JSClientRectList::getPropertyNames(ExecState* exec, PropertyNameArray& prop Base::getPropertyNames(exec, propertyNames); } -JSValue JSClientRectList::getConstructor(ExecState* exec) +JSValue JSClientRectList::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSClientRectListConstructor>(exec); + return getDOMConstructor<JSClientRectListConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsClientRectListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -197,7 +199,7 @@ JSValue JSC_HOST_CALL jsClientRectListPrototypeFunctionItem(ExecState* exec, JSO } - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -205,11 +207,11 @@ JSValue JSC_HOST_CALL jsClientRectListPrototypeFunctionItem(ExecState* exec, JSO JSValue JSClientRectList::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSClientRectList* thisObj = static_cast<JSClientRectList*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<ClientRectList*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<ClientRectList*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, ClientRectList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, ClientRectList* object) { - return getDOMObjectWrapper<JSClientRectList>(exec, object); + return getDOMObjectWrapper<JSClientRectList>(exec, globalObject, object); } ClientRectList* toClientRectList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSClientRectList.h b/src/3rdparty/webkit/WebCore/generated/JSClientRectList.h index fcb1f563f6..851a7f9e78 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClientRectList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSClientRectList.h @@ -21,6 +21,7 @@ #ifndef JSClientRectList_h #define JSClientRectList_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class ClientRectList; -class JSClientRectList : public DOMObject { - typedef DOMObject Base; +class JSClientRectList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSClientRectList(PassRefPtr<JSC::Structure>, PassRefPtr<ClientRectList>); + JSClientRectList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<ClientRectList>); virtual ~JSClientRectList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); ClientRectList* impl() const { return m_impl.get(); } private: @@ -54,7 +55,7 @@ private: static JSC::JSValue indexGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, ClientRectList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, ClientRectList*); ClientRectList* toClientRectList(JSC::JSValue); class JSClientRectListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp b/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp index 7306d2aa96..aea76dcec8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSClipboardConstructorTable = { 1, 0, JSClipboardConstructorTableValues, 0 }; #endif -class JSClipboardConstructor : public DOMObject { +class JSClipboardConstructor : public DOMConstructorObject { public: - JSClipboardConstructor(ExecState* exec) - : DOMObject(JSClipboardConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSClipboardConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSClipboardConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSClipboardPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSClipboardPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -123,8 +123,8 @@ bool JSClipboardPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSClipboard::s_info = { "Clipboard", 0, &JSClipboardTable, 0 }; -JSClipboard::JSClipboard(PassRefPtr<Structure> structure, PassRefPtr<Clipboard> impl) - : DOMObject(structure) +JSClipboard::JSClipboard(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Clipboard> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -146,33 +146,38 @@ bool JSClipboard::getOwnPropertySlot(ExecState* exec, const Identifier& property JSValue jsClipboardDropEffect(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Clipboard* imp = static_cast<Clipboard*>(static_cast<JSClipboard*>(asObject(slot.slotBase()))->impl()); + Clipboard* imp = static_cast<Clipboard*>(castedThis->impl()); return jsStringOrUndefined(exec, imp->dropEffect()); } JSValue jsClipboardEffectAllowed(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Clipboard* imp = static_cast<Clipboard*>(static_cast<JSClipboard*>(asObject(slot.slotBase()))->impl()); + Clipboard* imp = static_cast<Clipboard*>(castedThis->impl()); return jsStringOrUndefined(exec, imp->effectAllowed()); } JSValue jsClipboardTypes(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSClipboard*>(asObject(slot.slotBase()))->types(exec); + JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slot.slotBase())); + return castedThis->types(exec); } JSValue jsClipboardFiles(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSClipboard* castedThis = static_cast<JSClipboard*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Clipboard* imp = static_cast<Clipboard*>(static_cast<JSClipboard*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->files())); + Clipboard* imp = static_cast<Clipboard*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->files())); } JSValue jsClipboardConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSClipboard*>(asObject(slot.slotBase()))->getConstructor(exec); + JSClipboard* domObject = static_cast<JSClipboard*>(asObject(slot.slotBase())); + return JSClipboard::getConstructor(exec, domObject->globalObject()); } void JSClipboard::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -191,9 +196,9 @@ void setJSClipboardEffectAllowed(ExecState* exec, JSObject* thisObject, JSValue imp->setEffectAllowed(value.toString(exec)); } -JSValue JSClipboard::getConstructor(ExecState* exec) +JSValue JSClipboard::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSClipboardConstructor>(exec); + return getDOMConstructor<JSClipboardConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsClipboardPrototypeFunctionClearData(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -232,9 +237,9 @@ JSValue JSC_HOST_CALL jsClipboardPrototypeFunctionSetDragImage(ExecState* exec, return castedThisObj->setDragImage(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, Clipboard* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Clipboard* object) { - return getDOMObjectWrapper<JSClipboard>(exec, object); + return getDOMObjectWrapper<JSClipboard>(exec, globalObject, object); } Clipboard* toClipboard(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSClipboard.h b/src/3rdparty/webkit/WebCore/generated/JSClipboard.h index a6fbe3bf2b..68fbdf5630 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClipboard.h +++ b/src/3rdparty/webkit/WebCore/generated/JSClipboard.h @@ -21,6 +21,7 @@ #ifndef JSClipboard_h #define JSClipboard_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Clipboard; -class JSClipboard : public DOMObject { - typedef DOMObject Base; +class JSClipboard : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSClipboard(PassRefPtr<JSC::Structure>, PassRefPtr<Clipboard>); + JSClipboard(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Clipboard>); virtual ~JSClipboard(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -45,7 +46,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes JSC::JSValue types(JSC::ExecState*) const; @@ -61,7 +62,7 @@ private: RefPtr<Clipboard> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Clipboard*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Clipboard*); Clipboard* toClipboard(JSC::JSValue); class JSClipboardPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSComment.cpp b/src/3rdparty/webkit/WebCore/generated/JSComment.cpp index 6666541187..a1476ccce9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSComment.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSComment.cpp @@ -59,12 +59,12 @@ static JSC_CONST_HASHTABLE HashTable JSCommentConstructorTable = { 1, 0, JSCommentConstructorTableValues, 0 }; #endif -class JSCommentConstructor : public DOMObject { +class JSCommentConstructor : public DOMConstructorObject { public: - JSCommentConstructor(ExecState* exec) - : DOMObject(JSCommentConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCommentConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCommentConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCommentPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCommentPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -106,8 +106,8 @@ JSObject* JSCommentPrototype::self(ExecState* exec, JSGlobalObject* globalObject const ClassInfo JSComment::s_info = { "Comment", &JSCharacterData::s_info, &JSCommentTable, 0 }; -JSComment::JSComment(PassRefPtr<Structure> structure, PassRefPtr<Comment> impl) - : JSCharacterData(structure, impl) +JSComment::JSComment(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Comment> impl) + : JSCharacterData(structure, globalObject, impl) { } @@ -123,11 +123,12 @@ bool JSComment::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsCommentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSComment*>(asObject(slot.slotBase()))->getConstructor(exec); + JSComment* domObject = static_cast<JSComment*>(asObject(slot.slotBase())); + return JSComment::getConstructor(exec, domObject->globalObject()); } -JSValue JSComment::getConstructor(ExecState* exec) +JSValue JSComment::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCommentConstructor>(exec); + return getDOMConstructor<JSCommentConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSComment.h b/src/3rdparty/webkit/WebCore/generated/JSComment.h index 802256e2cb..f7d34aac95 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSComment.h +++ b/src/3rdparty/webkit/WebCore/generated/JSComment.h @@ -30,7 +30,7 @@ class Comment; class JSComment : public JSCharacterData { typedef JSCharacterData Base; public: - JSComment(PassRefPtr<JSC::Structure>, PassRefPtr<Comment>); + JSComment(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Comment>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp b/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp index 2b223a2082..110c7e1bf5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp @@ -91,8 +91,8 @@ bool JSConsolePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& p const ClassInfo JSConsole::s_info = { "Console", 0, &JSConsoleTable, 0 }; -JSConsole::JSConsole(PassRefPtr<Structure> structure, PassRefPtr<Console> impl) - : DOMObject(structure) +JSConsole::JSConsole(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Console> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -114,7 +114,8 @@ bool JSConsole::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsConsoleProfiles(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSConsole*>(asObject(slot.slotBase()))->profiles(exec); + JSConsole* castedThis = static_cast<JSConsole*>(asObject(slot.slotBase())); + return castedThis->profiles(exec); } JSValue JSC_HOST_CALL jsConsolePrototypeFunctionDebug(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -328,9 +329,9 @@ JSValue JSC_HOST_CALL jsConsolePrototypeFunctionGroupEnd(ExecState* exec, JSObje return jsUndefined(); } -JSC::JSValue toJS(JSC::ExecState* exec, Console* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Console* object) { - return getDOMObjectWrapper<JSConsole>(exec, object); + return getDOMObjectWrapper<JSConsole>(exec, globalObject, object); } Console* toConsole(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSConsole.h b/src/3rdparty/webkit/WebCore/generated/JSConsole.h index 0b7f0d53b2..f66f53f661 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSConsole.h +++ b/src/3rdparty/webkit/WebCore/generated/JSConsole.h @@ -21,6 +21,7 @@ #ifndef JSConsole_h #define JSConsole_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Console; -class JSConsole : public DOMObject { - typedef DOMObject Base; +class JSConsole : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSConsole(PassRefPtr<JSC::Structure>, PassRefPtr<Console>); + JSConsole(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Console>); virtual ~JSConsole(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -53,7 +54,7 @@ private: RefPtr<Console> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Console*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Console*); Console* toConsole(JSC::JSValue); class JSConsolePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp b/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp index eafee51dea..bddd8a916c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp @@ -84,8 +84,8 @@ bool JSCoordinatesPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSCoordinates::s_info = { "Coordinates", 0, &JSCoordinatesTable, 0 }; -JSCoordinates::JSCoordinates(PassRefPtr<Structure> structure, PassRefPtr<Coordinates> impl) - : DOMObject(structure) +JSCoordinates::JSCoordinates(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Coordinates> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -107,43 +107,50 @@ bool JSCoordinates::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsCoordinatesLatitude(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCoordinates* castedThis = static_cast<JSCoordinates*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Coordinates* imp = static_cast<Coordinates*>(static_cast<JSCoordinates*>(asObject(slot.slotBase()))->impl()); + Coordinates* imp = static_cast<Coordinates*>(castedThis->impl()); return jsNumber(exec, imp->latitude()); } JSValue jsCoordinatesLongitude(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCoordinates* castedThis = static_cast<JSCoordinates*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Coordinates* imp = static_cast<Coordinates*>(static_cast<JSCoordinates*>(asObject(slot.slotBase()))->impl()); + Coordinates* imp = static_cast<Coordinates*>(castedThis->impl()); return jsNumber(exec, imp->longitude()); } JSValue jsCoordinatesAltitude(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCoordinates*>(asObject(slot.slotBase()))->altitude(exec); + JSCoordinates* castedThis = static_cast<JSCoordinates*>(asObject(slot.slotBase())); + return castedThis->altitude(exec); } JSValue jsCoordinatesAccuracy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCoordinates* castedThis = static_cast<JSCoordinates*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Coordinates* imp = static_cast<Coordinates*>(static_cast<JSCoordinates*>(asObject(slot.slotBase()))->impl()); + Coordinates* imp = static_cast<Coordinates*>(castedThis->impl()); return jsNumber(exec, imp->accuracy()); } JSValue jsCoordinatesAltitudeAccuracy(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCoordinates*>(asObject(slot.slotBase()))->altitudeAccuracy(exec); + JSCoordinates* castedThis = static_cast<JSCoordinates*>(asObject(slot.slotBase())); + return castedThis->altitudeAccuracy(exec); } JSValue jsCoordinatesHeading(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCoordinates*>(asObject(slot.slotBase()))->heading(exec); + JSCoordinates* castedThis = static_cast<JSCoordinates*>(asObject(slot.slotBase())); + return castedThis->heading(exec); } JSValue jsCoordinatesSpeed(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCoordinates*>(asObject(slot.slotBase()))->speed(exec); + JSCoordinates* castedThis = static_cast<JSCoordinates*>(asObject(slot.slotBase())); + return castedThis->speed(exec); } JSValue JSC_HOST_CALL jsCoordinatesPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -159,9 +166,9 @@ JSValue JSC_HOST_CALL jsCoordinatesPrototypeFunctionToString(ExecState* exec, JS return result; } -JSC::JSValue toJS(JSC::ExecState* exec, Coordinates* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Coordinates* object) { - return getDOMObjectWrapper<JSCoordinates>(exec, object); + return getDOMObjectWrapper<JSCoordinates>(exec, globalObject, object); } Coordinates* toCoordinates(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCoordinates.h b/src/3rdparty/webkit/WebCore/generated/JSCoordinates.h index 8a8643da29..d2095407f1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCoordinates.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCoordinates.h @@ -21,6 +21,7 @@ #ifndef JSCoordinates_h #define JSCoordinates_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Coordinates; -class JSCoordinates : public DOMObject { - typedef DOMObject Base; +class JSCoordinates : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCoordinates(PassRefPtr<JSC::Structure>, PassRefPtr<Coordinates>); + JSCoordinates(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Coordinates>); virtual ~JSCoordinates(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -56,7 +57,7 @@ private: RefPtr<Coordinates> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Coordinates*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Coordinates*); Coordinates* toCoordinates(JSC::JSValue); class JSCoordinatesPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp b/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp index b3a834f700..0269696582 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp @@ -64,12 +64,12 @@ static JSC_CONST_HASHTABLE HashTable JSCounterConstructorTable = { 1, 0, JSCounterConstructorTableValues, 0 }; #endif -class JSCounterConstructor : public DOMObject { +class JSCounterConstructor : public DOMConstructorObject { public: - JSCounterConstructor(ExecState* exec) - : DOMObject(JSCounterConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSCounterConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSCounterConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSCounterPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSCounterPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -111,8 +111,8 @@ JSObject* JSCounterPrototype::self(ExecState* exec, JSGlobalObject* globalObject const ClassInfo JSCounter::s_info = { "Counter", 0, &JSCounterTable, 0 }; -JSCounter::JSCounter(PassRefPtr<Structure> structure, PassRefPtr<Counter> impl) - : DOMObject(structure) +JSCounter::JSCounter(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Counter> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -134,37 +134,41 @@ bool JSCounter::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsCounterIdentifier(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCounter* castedThis = static_cast<JSCounter*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Counter* imp = static_cast<Counter*>(static_cast<JSCounter*>(asObject(slot.slotBase()))->impl()); + Counter* imp = static_cast<Counter*>(castedThis->impl()); return jsString(exec, imp->identifier()); } JSValue jsCounterListStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCounter* castedThis = static_cast<JSCounter*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Counter* imp = static_cast<Counter*>(static_cast<JSCounter*>(asObject(slot.slotBase()))->impl()); + Counter* imp = static_cast<Counter*>(castedThis->impl()); return jsString(exec, imp->listStyle()); } JSValue jsCounterSeparator(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSCounter* castedThis = static_cast<JSCounter*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Counter* imp = static_cast<Counter*>(static_cast<JSCounter*>(asObject(slot.slotBase()))->impl()); + Counter* imp = static_cast<Counter*>(castedThis->impl()); return jsString(exec, imp->separator()); } JSValue jsCounterConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSCounter*>(asObject(slot.slotBase()))->getConstructor(exec); + JSCounter* domObject = static_cast<JSCounter*>(asObject(slot.slotBase())); + return JSCounter::getConstructor(exec, domObject->globalObject()); } -JSValue JSCounter::getConstructor(ExecState* exec) +JSValue JSCounter::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSCounterConstructor>(exec); + return getDOMConstructor<JSCounterConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } -JSC::JSValue toJS(JSC::ExecState* exec, Counter* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Counter* object) { - return getDOMObjectWrapper<JSCounter>(exec, object); + return getDOMObjectWrapper<JSCounter>(exec, globalObject, object); } Counter* toCounter(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSCounter.h b/src/3rdparty/webkit/WebCore/generated/JSCounter.h index ab195fe3be..cdfc523a35 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCounter.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCounter.h @@ -21,6 +21,7 @@ #ifndef JSCounter_h #define JSCounter_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Counter; -class JSCounter : public DOMObject { - typedef DOMObject Base; +class JSCounter : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSCounter(PassRefPtr<JSC::Structure>, PassRefPtr<Counter>); + JSCounter(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Counter>); virtual ~JSCounter(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); Counter* impl() const { return m_impl.get(); } private: RefPtr<Counter> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Counter*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Counter*); Counter* toCounter(JSC::JSValue); class JSCounterPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp index e9d43eebba..bf55e99e3b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp @@ -103,8 +103,8 @@ bool JSDOMApplicationCachePrototype::getOwnPropertySlot(ExecState* exec, const I const ClassInfo JSDOMApplicationCache::s_info = { "DOMApplicationCache", 0, &JSDOMApplicationCacheTable, 0 }; -JSDOMApplicationCache::JSDOMApplicationCache(PassRefPtr<Structure> structure, PassRefPtr<DOMApplicationCache> impl) - : DOMObject(structure) +JSDOMApplicationCache::JSDOMApplicationCache(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DOMApplicationCache> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -126,15 +126,17 @@ bool JSDOMApplicationCache::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsDOMApplicationCacheStatus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); return jsNumber(exec, imp->status()); } JSValue jsDOMApplicationCacheOnchecking(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); if (EventListener* listener = imp->onchecking()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -144,8 +146,9 @@ JSValue jsDOMApplicationCacheOnchecking(ExecState* exec, const Identifier&, cons JSValue jsDOMApplicationCacheOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); if (EventListener* listener = imp->onerror()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -155,8 +158,9 @@ JSValue jsDOMApplicationCacheOnerror(ExecState* exec, const Identifier&, const P JSValue jsDOMApplicationCacheOnnoupdate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); if (EventListener* listener = imp->onnoupdate()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -166,8 +170,9 @@ JSValue jsDOMApplicationCacheOnnoupdate(ExecState* exec, const Identifier&, cons JSValue jsDOMApplicationCacheOndownloading(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); if (EventListener* listener = imp->ondownloading()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -177,8 +182,9 @@ JSValue jsDOMApplicationCacheOndownloading(ExecState* exec, const Identifier&, c JSValue jsDOMApplicationCacheOnprogress(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); if (EventListener* listener = imp->onprogress()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -188,8 +194,9 @@ JSValue jsDOMApplicationCacheOnprogress(ExecState* exec, const Identifier&, cons JSValue jsDOMApplicationCacheOnupdateready(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); if (EventListener* listener = imp->onupdateready()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -199,8 +206,9 @@ JSValue jsDOMApplicationCacheOnupdateready(ExecState* exec, const Identifier&, c JSValue jsDOMApplicationCacheOncached(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); if (EventListener* listener = imp->oncached()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -210,8 +218,9 @@ JSValue jsDOMApplicationCacheOncached(ExecState* exec, const Identifier&, const JSValue jsDOMApplicationCacheOnobsolete(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMApplicationCache* castedThis = static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(static_cast<JSDOMApplicationCache*>(asObject(slot.slotBase()))->impl()); + DOMApplicationCache* imp = static_cast<DOMApplicationCache*>(castedThis->impl()); if (EventListener* listener = imp->onobsolete()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -398,9 +407,9 @@ JSValue jsDOMApplicationCacheOBSOLETE(ExecState* exec, const Identifier&, const return jsNumber(exec, static_cast<int>(5)); } -JSC::JSValue toJS(JSC::ExecState* exec, DOMApplicationCache* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMApplicationCache* object) { - return getDOMObjectWrapper<JSDOMApplicationCache>(exec, object); + return getDOMObjectWrapper<JSDOMApplicationCache>(exec, globalObject, object); } DOMApplicationCache* toDOMApplicationCache(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.h b/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.h index 7a6ea14ee7..6938f25b77 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.h @@ -23,6 +23,7 @@ #if ENABLE(OFFLINE_WEB_APPLICATIONS) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class DOMApplicationCache; -class JSDOMApplicationCache : public DOMObject { - typedef DOMObject Base; +class JSDOMApplicationCache : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSDOMApplicationCache(PassRefPtr<JSC::Structure>, PassRefPtr<DOMApplicationCache>); + JSDOMApplicationCache(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DOMApplicationCache>); virtual ~JSDOMApplicationCache(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -59,7 +60,7 @@ private: RefPtr<DOMApplicationCache> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, DOMApplicationCache*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMApplicationCache*); DOMApplicationCache* toDOMApplicationCache(JSC::JSValue); class JSDOMApplicationCachePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp index 22411822c4..da10b128e2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp @@ -88,12 +88,12 @@ static JSC_CONST_HASHTABLE HashTable JSDOMCoreExceptionConstructorTable = { 67, 63, JSDOMCoreExceptionConstructorTableValues, 0 }; #endif -class JSDOMCoreExceptionConstructor : public DOMObject { +class JSDOMCoreExceptionConstructor : public DOMConstructorObject { public: - JSDOMCoreExceptionConstructor(ExecState* exec) - : DOMObject(JSDOMCoreExceptionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSDOMCoreExceptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSDOMCoreExceptionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSDOMCoreExceptionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSDOMCoreExceptionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -163,8 +163,8 @@ bool JSDOMCoreExceptionPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSDOMCoreException::s_info = { "DOMException", 0, &JSDOMCoreExceptionTable, 0 }; -JSDOMCoreException::JSDOMCoreException(PassRefPtr<Structure> structure, PassRefPtr<DOMCoreException> impl) - : DOMObject(structure) +JSDOMCoreException::JSDOMCoreException(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DOMCoreException> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -186,32 +186,36 @@ bool JSDOMCoreException::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsDOMCoreExceptionCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMCoreException* castedThis = static_cast<JSDOMCoreException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMCoreException* imp = static_cast<DOMCoreException*>(static_cast<JSDOMCoreException*>(asObject(slot.slotBase()))->impl()); + DOMCoreException* imp = static_cast<DOMCoreException*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsDOMCoreExceptionName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMCoreException* castedThis = static_cast<JSDOMCoreException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMCoreException* imp = static_cast<DOMCoreException*>(static_cast<JSDOMCoreException*>(asObject(slot.slotBase()))->impl()); + DOMCoreException* imp = static_cast<DOMCoreException*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsDOMCoreExceptionMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMCoreException* castedThis = static_cast<JSDOMCoreException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMCoreException* imp = static_cast<DOMCoreException*>(static_cast<JSDOMCoreException*>(asObject(slot.slotBase()))->impl()); + DOMCoreException* imp = static_cast<DOMCoreException*>(castedThis->impl()); return jsString(exec, imp->message()); } JSValue jsDOMCoreExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDOMCoreException*>(asObject(slot.slotBase()))->getConstructor(exec); + JSDOMCoreException* domObject = static_cast<JSDOMCoreException*>(asObject(slot.slotBase())); + return JSDOMCoreException::getConstructor(exec, domObject->globalObject()); } -JSValue JSDOMCoreException::getConstructor(ExecState* exec) +JSValue JSDOMCoreException::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSDOMCoreExceptionConstructor>(exec); + return getDOMConstructor<JSDOMCoreExceptionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsDOMCoreExceptionPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -339,9 +343,9 @@ JSValue jsDOMCoreExceptionQUOTA_EXCEEDED_ERR(ExecState* exec, const Identifier&, return jsNumber(exec, static_cast<int>(22)); } -JSC::JSValue toJS(JSC::ExecState* exec, DOMCoreException* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMCoreException* object) { - return getDOMObjectWrapper<JSDOMCoreException>(exec, object); + return getDOMObjectWrapper<JSDOMCoreException>(exec, globalObject, object); } DOMCoreException* toDOMCoreException(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.h b/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.h index 75b43284eb..e0a45f9147 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.h @@ -21,6 +21,7 @@ #ifndef JSDOMCoreException_h #define JSDOMCoreException_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class DOMCoreException; -class JSDOMCoreException : public DOMObject { - typedef DOMObject Base; +class JSDOMCoreException : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSDOMCoreException(PassRefPtr<JSC::Structure>, PassRefPtr<DOMCoreException>); + JSDOMCoreException(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DOMCoreException>); virtual ~JSDOMCoreException(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); DOMCoreException* impl() const { return m_impl.get(); } private: RefPtr<DOMCoreException> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, DOMCoreException*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMCoreException*); DOMCoreException* toDOMCoreException(JSC::JSValue); class JSDOMCoreExceptionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp index 9b5787cc4e..6941521494 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp @@ -69,12 +69,12 @@ static JSC_CONST_HASHTABLE HashTable JSDOMImplementationConstructorTable = { 1, 0, JSDOMImplementationConstructorTableValues, 0 }; #endif -class JSDOMImplementationConstructor : public DOMObject { +class JSDOMImplementationConstructor : public DOMConstructorObject { public: - JSDOMImplementationConstructor(ExecState* exec) - : DOMObject(JSDOMImplementationConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSDOMImplementationConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSDOMImplementationConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSDOMImplementationPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSDOMImplementationPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -126,8 +126,8 @@ bool JSDOMImplementationPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSDOMImplementation::s_info = { "DOMImplementation", 0, &JSDOMImplementationTable, 0 }; -JSDOMImplementation::JSDOMImplementation(PassRefPtr<Structure> structure, PassRefPtr<DOMImplementation> impl) - : DOMObject(structure) +JSDOMImplementation::JSDOMImplementation(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DOMImplementation> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -149,11 +149,12 @@ bool JSDOMImplementation::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsDOMImplementationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDOMImplementation*>(asObject(slot.slotBase()))->getConstructor(exec); + JSDOMImplementation* domObject = static_cast<JSDOMImplementation*>(asObject(slot.slotBase())); + return JSDOMImplementation::getConstructor(exec, domObject->globalObject()); } -JSValue JSDOMImplementation::getConstructor(ExecState* exec) +JSValue JSDOMImplementation::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSDOMImplementationConstructor>(exec); + return getDOMConstructor<JSDOMImplementationConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsDOMImplementationPrototypeFunctionHasFeature(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -184,7 +185,7 @@ JSValue JSC_HOST_CALL jsDOMImplementationPrototypeFunctionCreateDocumentType(Exe const UString& systemId = valueToStringWithUndefinedOrNullCheck(exec, args.at(2)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createDocumentType(qualifiedName, publicId, systemId, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createDocumentType(qualifiedName, publicId, systemId, ec))); setDOMException(exec, ec); return result; } @@ -202,7 +203,7 @@ JSValue JSC_HOST_CALL jsDOMImplementationPrototypeFunctionCreateDocument(ExecSta DocumentType* doctype = toDocumentType(args.at(2)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createDocument(namespaceURI, qualifiedName, doctype, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createDocument(namespaceURI, qualifiedName, doctype, ec))); setDOMException(exec, ec); return result; } @@ -219,7 +220,7 @@ JSValue JSC_HOST_CALL jsDOMImplementationPrototypeFunctionCreateCSSStyleSheet(Ex const UString& media = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createCSSStyleSheet(title, media, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createCSSStyleSheet(title, media, ec))); setDOMException(exec, ec); return result; } @@ -234,13 +235,13 @@ JSValue JSC_HOST_CALL jsDOMImplementationPrototypeFunctionCreateHTMLDocument(Exe const UString& title = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createHTMLDocument(title))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createHTMLDocument(title))); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, DOMImplementation* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMImplementation* object) { - return getDOMObjectWrapper<JSDOMImplementation>(exec, object); + return getDOMObjectWrapper<JSDOMImplementation>(exec, globalObject, object); } DOMImplementation* toDOMImplementation(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.h b/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.h index e0177782ef..b81111089d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.h @@ -21,6 +21,7 @@ #ifndef JSDOMImplementation_h #define JSDOMImplementation_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class DOMImplementation; -class JSDOMImplementation : public DOMObject { - typedef DOMObject Base; +class JSDOMImplementation : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSDOMImplementation(PassRefPtr<JSC::Structure>, PassRefPtr<DOMImplementation>); + JSDOMImplementation(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DOMImplementation>); virtual ~JSDOMImplementation(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); DOMImplementation* impl() const { return m_impl.get(); } private: RefPtr<DOMImplementation> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, DOMImplementation*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMImplementation*); DOMImplementation* toDOMImplementation(JSC::JSValue); class JSDOMImplementationPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp index ac05d7d39b..31dd1fcf28 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp @@ -63,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSDOMParserConstructorTable = { 1, 0, JSDOMParserConstructorTableValues, 0 }; #endif -class JSDOMParserConstructor : public DOMObject { +class JSDOMParserConstructor : public DOMConstructorObject { public: - JSDOMParserConstructor(ExecState* exec) - : DOMObject(JSDOMParserConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSDOMParserConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSDOMParserConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSDOMParserPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSDOMParserPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -78,13 +78,13 @@ public: { return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); } - static JSObject* construct(ExecState* exec, JSObject*, const ArgList&) + static JSObject* constructDOMParser(ExecState* exec, JSObject* constructor, const ArgList&) { - return asObject(toJS(exec, DOMParser::create())); + return asObject(toJS(exec, static_cast<JSDOMParserConstructor*>(constructor)->globalObject(), DOMParser::create())); } virtual ConstructType getConstructData(ConstructData& constructData) { - constructData.native.function = construct; + constructData.native.function = constructDOMParser; return ConstructTypeHost; } }; @@ -125,8 +125,8 @@ bool JSDOMParserPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSDOMParser::s_info = { "DOMParser", 0, &JSDOMParserTable, 0 }; -JSDOMParser::JSDOMParser(PassRefPtr<Structure> structure, PassRefPtr<DOMParser> impl) - : DOMObject(structure) +JSDOMParser::JSDOMParser(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DOMParser> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -148,11 +148,12 @@ bool JSDOMParser::getOwnPropertySlot(ExecState* exec, const Identifier& property JSValue jsDOMParserConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDOMParser*>(asObject(slot.slotBase()))->getConstructor(exec); + JSDOMParser* domObject = static_cast<JSDOMParser*>(asObject(slot.slotBase())); + return JSDOMParser::getConstructor(exec, domObject->globalObject()); } -JSValue JSDOMParser::getConstructor(ExecState* exec) +JSValue JSDOMParser::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSDOMParserConstructor>(exec); + return getDOMConstructor<JSDOMParserConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsDOMParserPrototypeFunctionParseFromString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -166,13 +167,13 @@ JSValue JSC_HOST_CALL jsDOMParserPrototypeFunctionParseFromString(ExecState* exe const UString& contentType = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->parseFromString(str, contentType))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->parseFromString(str, contentType))); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, DOMParser* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMParser* object) { - return getDOMObjectWrapper<JSDOMParser>(exec, object); + return getDOMObjectWrapper<JSDOMParser>(exec, globalObject, object); } DOMParser* toDOMParser(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMParser.h b/src/3rdparty/webkit/WebCore/generated/JSDOMParser.h index cfdbe9b2a1..2271e188a3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMParser.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMParser.h @@ -21,6 +21,7 @@ #ifndef JSDOMParser_h #define JSDOMParser_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class DOMParser; -class JSDOMParser : public DOMObject { - typedef DOMObject Base; +class JSDOMParser : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSDOMParser(PassRefPtr<JSC::Structure>, PassRefPtr<DOMParser>); + JSDOMParser(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DOMParser>); virtual ~JSDOMParser(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); DOMParser* impl() const { return m_impl.get(); } private: RefPtr<DOMParser> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, DOMParser*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMParser*); DOMParser* toDOMParser(JSC::JSValue); class JSDOMParserPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp index b0a249d80c..ffb842a293 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp @@ -106,8 +106,8 @@ bool JSDOMSelectionPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSDOMSelection::s_info = { "DOMSelection", 0, &JSDOMSelectionTable, 0 }; -JSDOMSelection::JSDOMSelection(PassRefPtr<Structure> structure, PassRefPtr<DOMSelection> impl) - : DOMObject(structure) +JSDOMSelection::JSDOMSelection(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DOMSelection> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -129,78 +129,89 @@ bool JSDOMSelection::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsDOMSelectionAnchorNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->anchorNode())); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->anchorNode())); } JSValue jsDOMSelectionAnchorOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); return jsNumber(exec, imp->anchorOffset()); } JSValue jsDOMSelectionFocusNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->focusNode())); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->focusNode())); } JSValue jsDOMSelectionFocusOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); return jsNumber(exec, imp->focusOffset()); } JSValue jsDOMSelectionIsCollapsed(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); return jsBoolean(imp->isCollapsed()); } JSValue jsDOMSelectionRangeCount(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); return jsNumber(exec, imp->rangeCount()); } JSValue jsDOMSelectionBaseNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->baseNode())); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->baseNode())); } JSValue jsDOMSelectionBaseOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); return jsNumber(exec, imp->baseOffset()); } JSValue jsDOMSelectionExtentNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->extentNode())); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->extentNode())); } JSValue jsDOMSelectionExtentOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); return jsNumber(exec, imp->extentOffset()); } JSValue jsDOMSelectionType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMSelection* castedThis = static_cast<JSDOMSelection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMSelection* imp = static_cast<DOMSelection*>(static_cast<JSDOMSelection*>(asObject(slot.slotBase()))->impl()); + DOMSelection* imp = static_cast<DOMSelection*>(castedThis->impl()); return jsString(exec, imp->type()); } @@ -313,7 +324,7 @@ JSValue JSC_HOST_CALL jsDOMSelectionPrototypeFunctionGetRangeAt(ExecState* exec, int index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getRangeAt(index, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getRangeAt(index, ec))); setDOMException(exec, ec); return result; } @@ -417,9 +428,9 @@ JSValue JSC_HOST_CALL jsDOMSelectionPrototypeFunctionEmpty(ExecState* exec, JSOb return jsUndefined(); } -JSC::JSValue toJS(JSC::ExecState* exec, DOMSelection* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMSelection* object) { - return getDOMObjectWrapper<JSDOMSelection>(exec, object); + return getDOMObjectWrapper<JSDOMSelection>(exec, globalObject, object); } DOMSelection* toDOMSelection(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.h b/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.h index 2af8cbd088..a0fae0a8e0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.h @@ -21,6 +21,7 @@ #ifndef JSDOMSelection_h #define JSDOMSelection_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class DOMSelection; -class JSDOMSelection : public DOMObject { - typedef DOMObject Base; +class JSDOMSelection : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSDOMSelection(PassRefPtr<JSC::Structure>, PassRefPtr<DOMSelection>); + JSDOMSelection(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DOMSelection>); virtual ~JSDOMSelection(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -50,7 +51,7 @@ private: RefPtr<DOMSelection> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, DOMSelection*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMSelection*); DOMSelection* toDOMSelection(JSC::JSValue); class JSDOMSelectionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp index 6ac47498e7..364a975a9f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp @@ -167,6 +167,7 @@ #include "JSPluginArray.h" #include "JSProcessingInstruction.h" #include "JSProgressEvent.h" +#include "JSRGBColor.h" #include "JSRange.h" #include "JSRangeException.h" #include "JSRect.h" @@ -228,7 +229,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSDOMWindow); /* Hash table */ -static const HashTableValue JSDOMWindowTableValues[275] = +static const HashTableValue JSDOMWindowTableValues[276] = { { "screen", DontDelete|ReadOnly, (intptr_t)jsDOMWindowScreen, (intptr_t)0 }, { "history", DontDelete|ReadOnly, (intptr_t)jsDOMWindowHistory, (intptr_t)0 }, @@ -357,6 +358,7 @@ static const HashTableValue JSDOMWindowTableValues[275] = { "Counter", DontDelete, (intptr_t)jsDOMWindowCounterConstructor, (intptr_t)setJSDOMWindowCounterConstructor }, { "CSSRuleList", DontDelete, (intptr_t)jsDOMWindowCSSRuleListConstructor, (intptr_t)setJSDOMWindowCSSRuleListConstructor }, { "Rect", DontDelete, (intptr_t)jsDOMWindowRectConstructor, (intptr_t)setJSDOMWindowRectConstructor }, + { "RGBColor", DontDelete, (intptr_t)jsDOMWindowRGBColorConstructor, (intptr_t)setJSDOMWindowRGBColorConstructor }, { "StyleSheetList", DontDelete, (intptr_t)jsDOMWindowStyleSheetListConstructor, (intptr_t)setJSDOMWindowStyleSheetListConstructor }, { "DOMException", DontDelete, (intptr_t)jsDOMWindowDOMExceptionConstructor, (intptr_t)setJSDOMWindowDOMExceptionConstructor }, { "DOMImplementation", DontDelete, (intptr_t)jsDOMWindowDOMImplementationConstructor, (intptr_t)setJSDOMWindowDOMImplementationConstructor }, @@ -606,386 +608,432 @@ JSDOMWindow::~JSDOMWindow() JSValue jsDOMWindowScreen(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->screen())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->screen())); } JSValue jsDOMWindowHistory(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->history(exec); + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + return castedThis->history(exec); } JSValue jsDOMWindowLocationbar(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->locationbar())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->locationbar())); } JSValue jsDOMWindowMenubar(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->menubar())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->menubar())); } JSValue jsDOMWindowPersonalbar(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->personalbar())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->personalbar())); } JSValue jsDOMWindowScrollbars(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->scrollbars())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->scrollbars())); } JSValue jsDOMWindowStatusbar(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->statusbar())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->statusbar())); } JSValue jsDOMWindowToolbar(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->toolbar())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->toolbar())); } JSValue jsDOMWindowNavigator(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->navigator())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->navigator())); } JSValue jsDOMWindowClientInformation(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->clientInformation())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->clientInformation())); } JSValue jsDOMWindowLocation(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->location(exec); + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + return castedThis->location(exec); } JSValue jsDOMWindowEvent(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->event(exec); + return castedThis->event(exec); } JSValue jsDOMWindowCrypto(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->crypto(exec); + return castedThis->crypto(exec); } JSValue jsDOMWindowFrameElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return checkNodeSecurity(exec, imp->frameElement()) ? toJS(exec, WTF::getPtr(imp->frameElement())) : jsUndefined(); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return checkNodeSecurity(exec, imp->frameElement()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->frameElement())) : jsUndefined(); } JSValue jsDOMWindowOffscreenBuffering(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsBoolean(imp->offscreenBuffering()); } JSValue jsDOMWindowOuterHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->outerHeight()); } JSValue jsDOMWindowOuterWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->outerWidth()); } JSValue jsDOMWindowInnerHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->innerHeight()); } JSValue jsDOMWindowInnerWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->innerWidth()); } JSValue jsDOMWindowScreenX(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->screenX()); } JSValue jsDOMWindowScreenY(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->screenY()); } JSValue jsDOMWindowScreenLeft(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->screenLeft()); } JSValue jsDOMWindowScreenTop(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->screenTop()); } JSValue jsDOMWindowScrollX(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->scrollX()); } JSValue jsDOMWindowScrollY(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->scrollY()); } JSValue jsDOMWindowPageXOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->pageXOffset()); } JSValue jsDOMWindowPageYOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->pageYOffset()); } JSValue jsDOMWindowClosed(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsBoolean(imp->closed()); } JSValue jsDOMWindowLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsDOMWindowName(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsDOMWindowStatus(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsString(exec, imp->status()); } JSValue jsDOMWindowDefaultStatus(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsString(exec, imp->defaultStatus()); } JSValue jsDOMWindowDefaultstatus(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsString(exec, imp->defaultstatus()); } JSValue jsDOMWindowSelf(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->self())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->self())); } JSValue jsDOMWindowWindow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->window())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->window())); } JSValue jsDOMWindowFrames(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->frames())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->frames())); } JSValue jsDOMWindowOpener(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->opener())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->opener())); } JSValue jsDOMWindowParent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parent())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parent())); } JSValue jsDOMWindowTop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->top())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->top())); } JSValue jsDOMWindowDocument(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->document())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->document())); } JSValue jsDOMWindowDevicePixelRatio(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); return jsNumber(exec, imp->devicePixelRatio()); } JSValue jsDOMWindowApplicationCache(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->applicationCache())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->applicationCache())); } JSValue jsDOMWindowSessionStorage(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->sessionStorage())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->sessionStorage())); } JSValue jsDOMWindowLocalStorage(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->localStorage())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->localStorage())); } JSValue jsDOMWindowConsole(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->console())); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->console())); } JSValue jsDOMWindowOnabort(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onabort()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -995,10 +1043,11 @@ JSValue jsDOMWindowOnabort(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOnbeforeunload(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onbeforeunload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1008,10 +1057,11 @@ JSValue jsDOMWindowOnbeforeunload(ExecState* exec, const Identifier&, const Prop JSValue jsDOMWindowOnblur(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onblur()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1021,10 +1071,11 @@ JSValue jsDOMWindowOnblur(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDOMWindowOncanplay(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->oncanplay()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1034,10 +1085,11 @@ JSValue jsDOMWindowOncanplay(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOncanplaythrough(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->oncanplaythrough()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1047,10 +1099,11 @@ JSValue jsDOMWindowOncanplaythrough(ExecState* exec, const Identifier&, const Pr JSValue jsDOMWindowOnchange(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onchange()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1060,10 +1113,11 @@ JSValue jsDOMWindowOnchange(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnclick(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onclick()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1073,10 +1127,11 @@ JSValue jsDOMWindowOnclick(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOncontextmenu(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->oncontextmenu()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1086,10 +1141,11 @@ JSValue jsDOMWindowOncontextmenu(ExecState* exec, const Identifier&, const Prope JSValue jsDOMWindowOndblclick(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondblclick()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1099,10 +1155,11 @@ JSValue jsDOMWindowOndblclick(ExecState* exec, const Identifier&, const Property JSValue jsDOMWindowOndrag(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondrag()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1112,10 +1169,11 @@ JSValue jsDOMWindowOndrag(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDOMWindowOndragend(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondragend()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1125,10 +1183,11 @@ JSValue jsDOMWindowOndragend(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOndragenter(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondragenter()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1138,10 +1197,11 @@ JSValue jsDOMWindowOndragenter(ExecState* exec, const Identifier&, const Propert JSValue jsDOMWindowOndragleave(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondragleave()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1151,10 +1211,11 @@ JSValue jsDOMWindowOndragleave(ExecState* exec, const Identifier&, const Propert JSValue jsDOMWindowOndragover(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondragover()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1164,10 +1225,11 @@ JSValue jsDOMWindowOndragover(ExecState* exec, const Identifier&, const Property JSValue jsDOMWindowOndragstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondragstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1177,10 +1239,11 @@ JSValue jsDOMWindowOndragstart(ExecState* exec, const Identifier&, const Propert JSValue jsDOMWindowOndrop(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondrop()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1190,10 +1253,11 @@ JSValue jsDOMWindowOndrop(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDOMWindowOndurationchange(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ondurationchange()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1203,10 +1267,11 @@ JSValue jsDOMWindowOndurationchange(ExecState* exec, const Identifier&, const Pr JSValue jsDOMWindowOnemptied(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onemptied()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1216,10 +1281,11 @@ JSValue jsDOMWindowOnemptied(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnended(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onended()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1229,10 +1295,11 @@ JSValue jsDOMWindowOnended(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onerror()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1242,10 +1309,11 @@ JSValue jsDOMWindowOnerror(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOnfocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onfocus()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1255,10 +1323,11 @@ JSValue jsDOMWindowOnfocus(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOninput(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->oninput()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1268,10 +1337,11 @@ JSValue jsDOMWindowOninput(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOnkeydown(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onkeydown()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1281,10 +1351,11 @@ JSValue jsDOMWindowOnkeydown(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnkeypress(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onkeypress()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1294,10 +1365,11 @@ JSValue jsDOMWindowOnkeypress(ExecState* exec, const Identifier&, const Property JSValue jsDOMWindowOnkeyup(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onkeyup()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1307,10 +1379,11 @@ JSValue jsDOMWindowOnkeyup(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOnload(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1320,10 +1393,11 @@ JSValue jsDOMWindowOnload(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDOMWindowOnloadeddata(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onloadeddata()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1333,10 +1407,11 @@ JSValue jsDOMWindowOnloadeddata(ExecState* exec, const Identifier&, const Proper JSValue jsDOMWindowOnloadedmetadata(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onloadedmetadata()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1346,10 +1421,11 @@ JSValue jsDOMWindowOnloadedmetadata(ExecState* exec, const Identifier&, const Pr JSValue jsDOMWindowOnloadstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onloadstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1359,10 +1435,11 @@ JSValue jsDOMWindowOnloadstart(ExecState* exec, const Identifier&, const Propert JSValue jsDOMWindowOnmessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onmessage()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1372,10 +1449,11 @@ JSValue jsDOMWindowOnmessage(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnmousedown(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onmousedown()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1385,10 +1463,11 @@ JSValue jsDOMWindowOnmousedown(ExecState* exec, const Identifier&, const Propert JSValue jsDOMWindowOnmousemove(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onmousemove()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1398,10 +1477,11 @@ JSValue jsDOMWindowOnmousemove(ExecState* exec, const Identifier&, const Propert JSValue jsDOMWindowOnmouseout(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onmouseout()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1411,10 +1491,11 @@ JSValue jsDOMWindowOnmouseout(ExecState* exec, const Identifier&, const Property JSValue jsDOMWindowOnmouseover(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onmouseover()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1424,10 +1505,11 @@ JSValue jsDOMWindowOnmouseover(ExecState* exec, const Identifier&, const Propert JSValue jsDOMWindowOnmouseup(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onmouseup()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1437,10 +1519,11 @@ JSValue jsDOMWindowOnmouseup(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnmousewheel(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onmousewheel()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1450,10 +1533,11 @@ JSValue jsDOMWindowOnmousewheel(ExecState* exec, const Identifier&, const Proper JSValue jsDOMWindowOnoffline(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onoffline()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1463,10 +1547,11 @@ JSValue jsDOMWindowOnoffline(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnonline(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ononline()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1476,10 +1561,11 @@ JSValue jsDOMWindowOnonline(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnpause(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onpause()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1489,10 +1575,11 @@ JSValue jsDOMWindowOnpause(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOnplay(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onplay()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1502,10 +1589,11 @@ JSValue jsDOMWindowOnplay(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDOMWindowOnplaying(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onplaying()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1515,10 +1603,11 @@ JSValue jsDOMWindowOnplaying(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnprogress(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onprogress()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1528,10 +1617,11 @@ JSValue jsDOMWindowOnprogress(ExecState* exec, const Identifier&, const Property JSValue jsDOMWindowOnratechange(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onratechange()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1541,10 +1631,11 @@ JSValue jsDOMWindowOnratechange(ExecState* exec, const Identifier&, const Proper JSValue jsDOMWindowOnresize(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onresize()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1554,10 +1645,11 @@ JSValue jsDOMWindowOnresize(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnscroll(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onscroll()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1567,10 +1659,11 @@ JSValue jsDOMWindowOnscroll(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnseeked(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onseeked()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1580,10 +1673,11 @@ JSValue jsDOMWindowOnseeked(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnseeking(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onseeking()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1593,10 +1687,11 @@ JSValue jsDOMWindowOnseeking(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnselect(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onselect()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1606,10 +1701,11 @@ JSValue jsDOMWindowOnselect(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnstalled(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onstalled()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1619,10 +1715,11 @@ JSValue jsDOMWindowOnstalled(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnstorage(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onstorage()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1632,10 +1729,11 @@ JSValue jsDOMWindowOnstorage(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnsubmit(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onsubmit()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1645,10 +1743,11 @@ JSValue jsDOMWindowOnsubmit(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnsuspend(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onsuspend()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1658,10 +1757,11 @@ JSValue jsDOMWindowOnsuspend(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOntimeupdate(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->ontimeupdate()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1671,10 +1771,11 @@ JSValue jsDOMWindowOntimeupdate(ExecState* exec, const Identifier&, const Proper JSValue jsDOMWindowOnunload(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onunload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1684,10 +1785,11 @@ JSValue jsDOMWindowOnunload(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnvolumechange(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onvolumechange()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1697,10 +1799,11 @@ JSValue jsDOMWindowOnvolumechange(ExecState* exec, const Identifier&, const Prop JSValue jsDOMWindowOnwaiting(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onwaiting()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1710,10 +1813,11 @@ JSValue jsDOMWindowOnwaiting(ExecState* exec, const Identifier&, const PropertyS JSValue jsDOMWindowOnreset(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onreset()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1723,10 +1827,11 @@ JSValue jsDOMWindowOnreset(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDOMWindowOnsearch(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onsearch()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1736,10 +1841,11 @@ JSValue jsDOMWindowOnsearch(ExecState* exec, const Identifier&, const PropertySl JSValue jsDOMWindowOnwebkitanimationend(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onwebkitanimationend()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1749,10 +1855,11 @@ JSValue jsDOMWindowOnwebkitanimationend(ExecState* exec, const Identifier&, cons JSValue jsDOMWindowOnwebkitanimationiteration(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onwebkitanimationiteration()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1762,10 +1869,11 @@ JSValue jsDOMWindowOnwebkitanimationiteration(ExecState* exec, const Identifier& JSValue jsDOMWindowOnwebkitanimationstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onwebkitanimationstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1775,10 +1883,11 @@ JSValue jsDOMWindowOnwebkitanimationstart(ExecState* exec, const Identifier&, co JSValue jsDOMWindowOnwebkittransitionend(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); UNUSED_PARAM(exec); - DOMWindow* imp = static_cast<DOMWindow*>(static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->impl()); + DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl()); if (EventListener* listener = imp->onwebkittransitionend()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -1788,1346 +1897,1362 @@ JSValue jsDOMWindowOnwebkittransitionend(ExecState* exec, const Identifier&, con JSValue jsDOMWindowStyleSheetConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSStyleSheet::getConstructor(exec); + return JSStyleSheet::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSStyleSheetConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSStyleSheet::getConstructor(exec); + return JSCSSStyleSheet::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSValueConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSValue::getConstructor(exec); + return JSCSSValue::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSPrimitiveValueConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSPrimitiveValue::getConstructor(exec); + return JSCSSPrimitiveValue::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSValueListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSValueList::getConstructor(exec); + return JSCSSValueList::getConstructor(exec, castedThis); } JSValue jsDOMWindowWebKitCSSTransformValueConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSWebKitCSSTransformValue::getConstructor(exec); + return JSWebKitCSSTransformValue::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSRule::getConstructor(exec); + return JSCSSRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSCharsetRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSCharsetRule::getConstructor(exec); + return JSCSSCharsetRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSFontFaceRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSFontFaceRule::getConstructor(exec); + return JSCSSFontFaceRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSImportRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSImportRule::getConstructor(exec); + return JSCSSImportRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSMediaRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSMediaRule::getConstructor(exec); + return JSCSSMediaRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSPageRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSPageRule::getConstructor(exec); + return JSCSSPageRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSStyleRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSStyleRule::getConstructor(exec); + return JSCSSStyleRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSVariablesRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSVariablesRule::getConstructor(exec); + return JSCSSVariablesRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSVariablesDeclarationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSVariablesDeclaration::getConstructor(exec); + return JSCSSVariablesDeclaration::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSStyleDeclarationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSStyleDeclaration::getConstructor(exec); + return JSCSSStyleDeclaration::getConstructor(exec, castedThis); } JSValue jsDOMWindowMediaListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSMediaList::getConstructor(exec); + return JSMediaList::getConstructor(exec, castedThis); } JSValue jsDOMWindowCounterConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCounter::getConstructor(exec); + return JSCounter::getConstructor(exec, castedThis); } JSValue jsDOMWindowCSSRuleListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCSSRuleList::getConstructor(exec); + return JSCSSRuleList::getConstructor(exec, castedThis); } JSValue jsDOMWindowRectConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSRect::getConstructor(exec); + return JSRect::getConstructor(exec, castedThis); +} + +JSValue jsDOMWindowRGBColorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) + return jsUndefined(); + return JSRGBColor::getConstructor(exec, castedThis); } JSValue jsDOMWindowStyleSheetListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSStyleSheetList::getConstructor(exec); + return JSStyleSheetList::getConstructor(exec, castedThis); } JSValue jsDOMWindowDOMExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSDOMCoreException::getConstructor(exec); + return JSDOMCoreException::getConstructor(exec, castedThis); } JSValue jsDOMWindowDOMImplementationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSDOMImplementation::getConstructor(exec); + return JSDOMImplementation::getConstructor(exec, castedThis); } JSValue jsDOMWindowDocumentFragmentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSDocumentFragment::getConstructor(exec); + return JSDocumentFragment::getConstructor(exec, castedThis); } JSValue jsDOMWindowDocumentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSDocument::getConstructor(exec); + return JSDocument::getConstructor(exec, castedThis); } JSValue jsDOMWindowNodeConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSNode::getConstructor(exec); + return JSNode::getConstructor(exec, castedThis); } JSValue jsDOMWindowNodeListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSNodeList::getConstructor(exec); + return JSNodeList::getConstructor(exec, castedThis); } JSValue jsDOMWindowNamedNodeMapConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSNamedNodeMap::getConstructor(exec); + return JSNamedNodeMap::getConstructor(exec, castedThis); } JSValue jsDOMWindowCharacterDataConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCharacterData::getConstructor(exec); + return JSCharacterData::getConstructor(exec, castedThis); } JSValue jsDOMWindowAttrConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSAttr::getConstructor(exec); + return JSAttr::getConstructor(exec, castedThis); } JSValue jsDOMWindowElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSElement::getConstructor(exec); + return JSElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowTextConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSText::getConstructor(exec); + return JSText::getConstructor(exec, castedThis); } JSValue jsDOMWindowCommentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSComment::getConstructor(exec); + return JSComment::getConstructor(exec, castedThis); } JSValue jsDOMWindowCDATASectionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCDATASection::getConstructor(exec); + return JSCDATASection::getConstructor(exec, castedThis); } JSValue jsDOMWindowDocumentTypeConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSDocumentType::getConstructor(exec); + return JSDocumentType::getConstructor(exec, castedThis); } JSValue jsDOMWindowNotationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSNotation::getConstructor(exec); + return JSNotation::getConstructor(exec, castedThis); } JSValue jsDOMWindowEntityConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSEntity::getConstructor(exec); + return JSEntity::getConstructor(exec, castedThis); } JSValue jsDOMWindowEntityReferenceConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSEntityReference::getConstructor(exec); + return JSEntityReference::getConstructor(exec, castedThis); } JSValue jsDOMWindowProcessingInstructionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSProcessingInstruction::getConstructor(exec); + return JSProcessingInstruction::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLDocumentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLDocument::getConstructor(exec); + return JSHTMLDocument::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLElement::getConstructor(exec); + return JSHTMLElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLAnchorElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLAnchorElement::getConstructor(exec); + return JSHTMLAnchorElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLAppletElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLAppletElement::getConstructor(exec); + return JSHTMLAppletElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLAreaElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLAreaElement::getConstructor(exec); + return JSHTMLAreaElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLBRElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLBRElement::getConstructor(exec); + return JSHTMLBRElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLBaseElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLBaseElement::getConstructor(exec); + return JSHTMLBaseElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLBaseFontElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLBaseFontElement::getConstructor(exec); + return JSHTMLBaseFontElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLBlockquoteElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLBlockquoteElement::getConstructor(exec); + return JSHTMLBlockquoteElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLBodyElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLBodyElement::getConstructor(exec); + return JSHTMLBodyElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLButtonElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLButtonElement::getConstructor(exec); + return JSHTMLButtonElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLCanvasElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLCanvasElement::getConstructor(exec); + return JSHTMLCanvasElement::getConstructor(exec, castedThis); } #if ENABLE(DATAGRID) JSValue jsDOMWindowHTMLDataGridElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLDataGridElement::getConstructor(exec); + return JSHTMLDataGridElement::getConstructor(exec, castedThis); } #endif #if ENABLE(DATAGRID) JSValue jsDOMWindowHTMLDataGridCellElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLDataGridCellElement::getConstructor(exec); + return JSHTMLDataGridCellElement::getConstructor(exec, castedThis); } #endif #if ENABLE(DATAGRID) JSValue jsDOMWindowHTMLDataGridColElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLDataGridColElement::getConstructor(exec); + return JSHTMLDataGridColElement::getConstructor(exec, castedThis); } #endif JSValue jsDOMWindowHTMLDListElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLDListElement::getConstructor(exec); + return JSHTMLDListElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLDirectoryElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLDirectoryElement::getConstructor(exec); + return JSHTMLDirectoryElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLDivElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLDivElement::getConstructor(exec); + return JSHTMLDivElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLEmbedElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLEmbedElement::getConstructor(exec); + return JSHTMLEmbedElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLFieldSetElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLFieldSetElement::getConstructor(exec); + return JSHTMLFieldSetElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLFontElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLFontElement::getConstructor(exec); + return JSHTMLFontElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLFormElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLFormElement::getConstructor(exec); + return JSHTMLFormElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLFrameElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLFrameElement::getConstructor(exec); + return JSHTMLFrameElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLFrameSetElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLFrameSetElement::getConstructor(exec); + return JSHTMLFrameSetElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLHRElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLHRElement::getConstructor(exec); + return JSHTMLHRElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLHeadElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLHeadElement::getConstructor(exec); + return JSHTMLHeadElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLHeadingElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLHeadingElement::getConstructor(exec); + return JSHTMLHeadingElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLHtmlElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLHtmlElement::getConstructor(exec); + return JSHTMLHtmlElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLIFrameElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLIFrameElement::getConstructor(exec); + return JSHTMLIFrameElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLImageElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLImageElement::getConstructor(exec); + return JSHTMLImageElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLInputElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLInputElement::getConstructor(exec); + return JSHTMLInputElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLIsIndexElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLIsIndexElement::getConstructor(exec); + return JSHTMLIsIndexElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLLIElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLLIElement::getConstructor(exec); + return JSHTMLLIElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLLabelElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLLabelElement::getConstructor(exec); + return JSHTMLLabelElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLLegendElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLLegendElement::getConstructor(exec); + return JSHTMLLegendElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLLinkElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLLinkElement::getConstructor(exec); + return JSHTMLLinkElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLMapElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLMapElement::getConstructor(exec); + return JSHTMLMapElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLMarqueeElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLMarqueeElement::getConstructor(exec); + return JSHTMLMarqueeElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLMenuElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLMenuElement::getConstructor(exec); + return JSHTMLMenuElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLMetaElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLMetaElement::getConstructor(exec); + return JSHTMLMetaElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLModElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLModElement::getConstructor(exec); + return JSHTMLModElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLOListElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLOListElement::getConstructor(exec); + return JSHTMLOListElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLObjectElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLObjectElement::getConstructor(exec); + return JSHTMLObjectElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLOptGroupElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLOptGroupElement::getConstructor(exec); + return JSHTMLOptGroupElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLOptionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLOptionElement::getConstructor(exec); + return JSHTMLOptionElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLParagraphElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLParagraphElement::getConstructor(exec); + return JSHTMLParagraphElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLParamElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLParamElement::getConstructor(exec); + return JSHTMLParamElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLPreElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLPreElement::getConstructor(exec); + return JSHTMLPreElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLQuoteElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLQuoteElement::getConstructor(exec); + return JSHTMLQuoteElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLScriptElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLScriptElement::getConstructor(exec); + return JSHTMLScriptElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLSelectElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLSelectElement::getConstructor(exec); + return JSHTMLSelectElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLStyleElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLStyleElement::getConstructor(exec); + return JSHTMLStyleElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLTableCaptionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLTableCaptionElement::getConstructor(exec); + return JSHTMLTableCaptionElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLTableCellElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLTableCellElement::getConstructor(exec); + return JSHTMLTableCellElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLTableColElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLTableColElement::getConstructor(exec); + return JSHTMLTableColElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLTableElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLTableElement::getConstructor(exec); + return JSHTMLTableElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLTableRowElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLTableRowElement::getConstructor(exec); + return JSHTMLTableRowElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLTableSectionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLTableSectionElement::getConstructor(exec); + return JSHTMLTableSectionElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLTextAreaElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLTextAreaElement::getConstructor(exec); + return JSHTMLTextAreaElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLTitleElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLTitleElement::getConstructor(exec); + return JSHTMLTitleElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLUListElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLUListElement::getConstructor(exec); + return JSHTMLUListElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowHTMLCollectionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLCollection::getConstructor(exec); + return JSHTMLCollection::getConstructor(exec, castedThis); } JSValue jsDOMWindowImageConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->image(exec); + return castedThis->image(exec); } JSValue jsDOMWindowOptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->option(exec); + return castedThis->option(exec); } JSValue jsDOMWindowCanvasRenderingContext2DConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSCanvasRenderingContext2D::getConstructor(exec); + return JSCanvasRenderingContext2D::getConstructor(exec, castedThis); } JSValue jsDOMWindowTextMetricsConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSTextMetrics::getConstructor(exec); + return JSTextMetrics::getConstructor(exec, castedThis); } JSValue jsDOMWindowEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSEvent::getConstructor(exec); + return JSEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowKeyboardEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSKeyboardEvent::getConstructor(exec); + return JSKeyboardEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowMouseEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSMouseEvent::getConstructor(exec); + return JSMouseEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowMutationEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSMutationEvent::getConstructor(exec); + return JSMutationEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowOverflowEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSOverflowEvent::getConstructor(exec); + return JSOverflowEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowProgressEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSProgressEvent::getConstructor(exec); + return JSProgressEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowTextEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSTextEvent::getConstructor(exec); + return JSTextEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowUIEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSUIEvent::getConstructor(exec); + return JSUIEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowWebKitAnimationEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSWebKitAnimationEvent::getConstructor(exec); + return JSWebKitAnimationEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowWebKitTransitionEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSWebKitTransitionEvent::getConstructor(exec); + return JSWebKitTransitionEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowWheelEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSWheelEvent::getConstructor(exec); + return JSWheelEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowMessageEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSMessageEvent::getConstructor(exec); + return JSMessageEvent::getConstructor(exec, castedThis); } JSValue jsDOMWindowEventExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSEventException::getConstructor(exec); + return JSEventException::getConstructor(exec, castedThis); } JSValue jsDOMWindowWebKitCSSKeyframeRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSWebKitCSSKeyframeRule::getConstructor(exec); + return JSWebKitCSSKeyframeRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowWebKitCSSKeyframesRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSWebKitCSSKeyframesRule::getConstructor(exec); + return JSWebKitCSSKeyframesRule::getConstructor(exec, castedThis); } JSValue jsDOMWindowWebKitCSSMatrixConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->webKitCSSMatrix(exec); + return castedThis->webKitCSSMatrix(exec); } JSValue jsDOMWindowWebKitPointConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->webKitPoint(exec); + return castedThis->webKitPoint(exec); } JSValue jsDOMWindowClipboardConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSClipboard::getConstructor(exec); + return JSClipboard::getConstructor(exec, castedThis); } JSValue jsDOMWindowFileConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSFile::getConstructor(exec); + return JSFile::getConstructor(exec, castedThis); } JSValue jsDOMWindowFileListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSFileList::getConstructor(exec); + return JSFileList::getConstructor(exec, castedThis); } JSValue jsDOMWindowNodeFilterConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSNodeFilter::getConstructor(exec); + return JSNodeFilter::getConstructor(exec, castedThis); } JSValue jsDOMWindowRangeConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSRange::getConstructor(exec); + return JSRange::getConstructor(exec, castedThis); } JSValue jsDOMWindowRangeExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSRangeException::getConstructor(exec); + return JSRangeException::getConstructor(exec, castedThis); } JSValue jsDOMWindowXMLDocumentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSDocument::getConstructor(exec); + return JSDocument::getConstructor(exec, castedThis); } JSValue jsDOMWindowDOMParserConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSDOMParser::getConstructor(exec); + return JSDOMParser::getConstructor(exec, castedThis); } JSValue jsDOMWindowXMLSerializerConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSXMLSerializer::getConstructor(exec); + return JSXMLSerializer::getConstructor(exec, castedThis); } JSValue jsDOMWindowXMLHttpRequestConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->xmlHttpRequest(exec); + return castedThis->xmlHttpRequest(exec); } JSValue jsDOMWindowXMLHttpRequestUploadConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSXMLHttpRequestUpload::getConstructor(exec); + return JSXMLHttpRequestUpload::getConstructor(exec, castedThis); } JSValue jsDOMWindowXMLHttpRequestExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSXMLHttpRequestException::getConstructor(exec); + return JSXMLHttpRequestException::getConstructor(exec, castedThis); } JSValue jsDOMWindowMessagePortConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSMessagePort::getConstructor(exec); + return JSMessagePort::getConstructor(exec, castedThis); } JSValue jsDOMWindowMessageChannelConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->messageChannel(exec); + return castedThis->messageChannel(exec); } JSValue jsDOMWindowWorkerConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->worker(exec); + return castedThis->worker(exec); } JSValue jsDOMWindowPluginConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSPlugin::getConstructor(exec); + return JSPlugin::getConstructor(exec, castedThis); } JSValue jsDOMWindowPluginArrayConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSPluginArray::getConstructor(exec); + return JSPluginArray::getConstructor(exec, castedThis); } JSValue jsDOMWindowMimeTypeConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSMimeType::getConstructor(exec); + return JSMimeType::getConstructor(exec, castedThis); } JSValue jsDOMWindowMimeTypeArrayConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSMimeTypeArray::getConstructor(exec); + return JSMimeTypeArray::getConstructor(exec, castedThis); } JSValue jsDOMWindowClientRectConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSClientRect::getConstructor(exec); + return JSClientRect::getConstructor(exec, castedThis); } JSValue jsDOMWindowClientRectListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSClientRectList::getConstructor(exec); + return JSClientRectList::getConstructor(exec, castedThis); } JSValue jsDOMWindowStorageConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSStorage::getConstructor(exec); + return JSStorage::getConstructor(exec, castedThis); } JSValue jsDOMWindowStorageEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSStorageEvent::getConstructor(exec); + return JSStorageEvent::getConstructor(exec, castedThis); } #if ENABLE(VIDEO) JSValue jsDOMWindowAudioConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - return static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->audio(exec); + return castedThis->audio(exec); } #endif #if ENABLE(VIDEO) JSValue jsDOMWindowHTMLAudioElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLAudioElement::getConstructor(exec); + return JSHTMLAudioElement::getConstructor(exec, castedThis); } #endif #if ENABLE(VIDEO) JSValue jsDOMWindowHTMLMediaElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLMediaElement::getConstructor(exec); + return JSHTMLMediaElement::getConstructor(exec, castedThis); } #endif #if ENABLE(VIDEO) JSValue jsDOMWindowHTMLVideoElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSHTMLVideoElement::getConstructor(exec); + return JSHTMLVideoElement::getConstructor(exec, castedThis); } #endif #if ENABLE(VIDEO) JSValue jsDOMWindowMediaErrorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSMediaError::getConstructor(exec); + return JSMediaError::getConstructor(exec, castedThis); } #endif JSValue jsDOMWindowXPathEvaluatorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSXPathEvaluator::getConstructor(exec); + return JSXPathEvaluator::getConstructor(exec, castedThis); } JSValue jsDOMWindowXPathResultConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSXPathResult::getConstructor(exec); + return JSXPathResult::getConstructor(exec, castedThis); } JSValue jsDOMWindowXPathExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSXPathException::getConstructor(exec); + return JSXPathException::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGAngleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGAngle::getConstructor(exec); + return JSSVGAngle::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGColorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGColor::getConstructor(exec); + return JSSVGColor::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGException::getConstructor(exec); + return JSSVGException::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGGradientElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGGradientElement::getConstructor(exec); + return JSSVGGradientElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGLengthConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGLength::getConstructor(exec); + return JSSVGLength::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGMarkerElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGMarkerElement::getConstructor(exec); + return JSSVGMarkerElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGPaintConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGPaint::getConstructor(exec); + return JSSVGPaint::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGPathSegConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGPathSeg::getConstructor(exec); + return JSSVGPathSeg::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGPreserveAspectRatioConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGPreserveAspectRatio::getConstructor(exec); + return JSSVGPreserveAspectRatio::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGRenderingIntentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGRenderingIntent::getConstructor(exec); + return JSSVGRenderingIntent::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGTextContentElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGTextContentElement::getConstructor(exec); + return JSSVGTextContentElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGTextPathElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGTextPathElement::getConstructor(exec); + return JSSVGTextPathElement::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGTransformConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGTransform::getConstructor(exec); + return JSSVGTransform::getConstructor(exec, castedThis); } JSValue jsDOMWindowSVGUnitTypesConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - if (!static_cast<JSDOMWindow*>(asObject(slot.slotBase()))->allowsAccessFrom(exec)) + JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) return jsUndefined(); - UNUSED_PARAM(slot); - return JSSVGUnitTypes::getConstructor(exec); + return JSSVGUnitTypes::getConstructor(exec, castedThis); } void setJSDOMWindowLocationbar(ExecState* exec, JSObject* thisObject, JSValue value) @@ -4171,6 +4296,14 @@ void setJSDOMWindowRectConstructor(ExecState* exec, JSObject* thisObject, JSValu static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "Rect"), value); } +void setJSDOMWindowRGBColorConstructor(ExecState* exec, JSObject* thisObject, JSValue value) +{ + if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec)) + return; + // Shadowing a built-in constructor + static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "RGBColor"), value); +} + void setJSDOMWindowStyleSheetListConstructor(ExecState* exec, JSObject* thisObject, JSValue value) { if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec)) @@ -5358,7 +5491,7 @@ JSValue JSC_HOST_CALL jsDOMWindowPrototypeFunctionGetSelection(ExecState* exec, DOMWindow* imp = static_cast<DOMWindow*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getSelection())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getSelection())); return result; } @@ -5657,7 +5790,7 @@ JSValue JSC_HOST_CALL jsDOMWindowPrototypeFunctionGetComputedStyle(ExecState* ex const UString& pseudoElement = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getComputedStyle(element, pseudoElement))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getComputedStyle(element, pseudoElement))); return result; } @@ -5676,14 +5809,14 @@ JSValue JSC_HOST_CALL jsDOMWindowPrototypeFunctionGetMatchedCSSRules(ExecState* int argsCount = args.size(); if (argsCount < 3) { - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getMatchedCSSRules(element, pseudoElement))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getMatchedCSSRules(element, pseudoElement))); return result; } bool authorOnly = args.at(2).toBoolean(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getMatchedCSSRules(element, pseudoElement, authorOnly))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getMatchedCSSRules(element, pseudoElement, authorOnly))); return result; } @@ -5700,7 +5833,7 @@ JSValue JSC_HOST_CALL jsDOMWindowPrototypeFunctionWebkitConvertPointFromPageToNo WebKitPoint* p = toWebKitPoint(args.at(1)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->webkitConvertPointFromPageToNode(node, p))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->webkitConvertPointFromPageToNode(node, p))); return result; } @@ -5717,7 +5850,7 @@ JSValue JSC_HOST_CALL jsDOMWindowPrototypeFunctionWebkitConvertPointFromNodeToPa WebKitPoint* p = toWebKitPoint(args.at(1)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->webkitConvertPointFromNodeToPage(node, p))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->webkitConvertPointFromNodeToPage(node, p))); return result; } @@ -5737,7 +5870,7 @@ JSValue JSC_HOST_CALL jsDOMWindowPrototypeFunctionOpenDatabase(ExecState* exec, unsigned estimatedSize = args.at(3).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->openDatabase(name, version, displayName, estimatedSize, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->openDatabase(name, version, displayName, estimatedSize, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h index 073eff7331..8e7defe849 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h @@ -384,6 +384,8 @@ JSC::JSValue jsDOMWindowCSSRuleListConstructor(JSC::ExecState*, const JSC::Ident void setJSDOMWindowCSSRuleListConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowRectConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSDOMWindowRectConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); +JSC::JSValue jsDOMWindowRGBColorConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSDOMWindowRGBColorConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowStyleSheetListConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSDOMWindowStyleSheetListConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowDOMExceptionConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp index 9559fb5374..1f60693724 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp @@ -77,12 +77,12 @@ static JSC_CONST_HASHTABLE HashTable JSDataGridColumnConstructorTable = { 17, 15, JSDataGridColumnConstructorTableValues, 0 }; #endif -class JSDataGridColumnConstructor : public DOMObject { +class JSDataGridColumnConstructor : public DOMConstructorObject { public: - JSDataGridColumnConstructor(ExecState* exec) - : DOMObject(JSDataGridColumnConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSDataGridColumnConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSDataGridColumnConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSDataGridColumnPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSDataGridColumnPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -135,8 +135,8 @@ bool JSDataGridColumnPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSDataGridColumn::s_info = { "DataGridColumn", 0, &JSDataGridColumnTable, 0 }; -JSDataGridColumn::JSDataGridColumn(PassRefPtr<Structure> structure, PassRefPtr<DataGridColumn> impl) - : DOMObject(structure) +JSDataGridColumn::JSDataGridColumn(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DataGridColumn> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -158,49 +158,56 @@ bool JSDataGridColumn::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsDataGridColumnId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumn* castedThis = static_cast<JSDataGridColumn*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + DataGridColumn* imp = static_cast<DataGridColumn*>(castedThis->impl()); return jsString(exec, imp->id()); } JSValue jsDataGridColumnLabel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumn* castedThis = static_cast<JSDataGridColumn*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + DataGridColumn* imp = static_cast<DataGridColumn*>(castedThis->impl()); return jsString(exec, imp->label()); } JSValue jsDataGridColumnType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumn* castedThis = static_cast<JSDataGridColumn*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + DataGridColumn* imp = static_cast<DataGridColumn*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsDataGridColumnSortable(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumn* castedThis = static_cast<JSDataGridColumn*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + DataGridColumn* imp = static_cast<DataGridColumn*>(castedThis->impl()); return jsNumber(exec, imp->sortable()); } JSValue jsDataGridColumnSortDirection(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumn* castedThis = static_cast<JSDataGridColumn*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + DataGridColumn* imp = static_cast<DataGridColumn*>(castedThis->impl()); return jsNumber(exec, imp->sortDirection()); } JSValue jsDataGridColumnPrimary(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumn* castedThis = static_cast<JSDataGridColumn*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + DataGridColumn* imp = static_cast<DataGridColumn*>(castedThis->impl()); return jsBoolean(imp->primary()); } JSValue jsDataGridColumnConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->getConstructor(exec); + JSDataGridColumn* domObject = static_cast<JSDataGridColumn*>(asObject(slot.slotBase())); + return JSDataGridColumn::getConstructor(exec, domObject->globalObject()); } void JSDataGridColumn::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -243,9 +250,9 @@ void setJSDataGridColumnPrimary(ExecState* exec, JSObject* thisObject, JSValue v imp->setPrimary(value.toBoolean(exec)); } -JSValue JSDataGridColumn::getConstructor(ExecState* exec) +JSValue JSDataGridColumn::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSDataGridColumnConstructor>(exec); + return getDOMConstructor<JSDataGridColumnConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters @@ -280,9 +287,9 @@ JSValue jsDataGridColumnSORC_DESCENDING(ExecState* exec, const Identifier&, cons return jsNumber(exec, static_cast<int>(2)); } -JSC::JSValue toJS(JSC::ExecState* exec, DataGridColumn* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DataGridColumn* object) { - return getDOMObjectWrapper<JSDataGridColumn>(exec, object); + return getDOMObjectWrapper<JSDataGridColumn>(exec, globalObject, object); } DataGridColumn* toDataGridColumn(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h index a85b988e4e..cbb59bef8d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.h @@ -23,6 +23,7 @@ #if ENABLE(DATAGRID) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class DataGridColumn; -class JSDataGridColumn : public DOMObject { - typedef DOMObject Base; +class JSDataGridColumn : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSDataGridColumn(PassRefPtr<JSC::Structure>, PassRefPtr<DataGridColumn>); + JSDataGridColumn(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DataGridColumn>); virtual ~JSDataGridColumn(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,14 +48,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); DataGridColumn* impl() const { return m_impl.get(); } private: RefPtr<DataGridColumn> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, DataGridColumn*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DataGridColumn*); DataGridColumn* toDataGridColumn(JSC::JSValue); class JSDataGridColumnPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp index 3c0eb8d2ab..f2525a53ff 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp @@ -72,12 +72,12 @@ static JSC_CONST_HASHTABLE HashTable JSDataGridColumnListConstructorTable = { 1, 0, JSDataGridColumnListConstructorTableValues, 0 }; #endif -class JSDataGridColumnListConstructor : public DOMObject { +class JSDataGridColumnListConstructor : public DOMConstructorObject { public: - JSDataGridColumnListConstructor(ExecState* exec) - : DOMObject(JSDataGridColumnListConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSDataGridColumnListConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSDataGridColumnListConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSDataGridColumnListPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSDataGridColumnListPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -129,8 +129,8 @@ bool JSDataGridColumnListPrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSDataGridColumnList::s_info = { "DataGridColumnList", 0, &JSDataGridColumnListTable, 0 }; -JSDataGridColumnList::JSDataGridColumnList(PassRefPtr<Structure> structure, PassRefPtr<DataGridColumnList> impl) - : DOMObject(structure) +JSDataGridColumnList::JSDataGridColumnList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DataGridColumnList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -176,28 +176,32 @@ bool JSDataGridColumnList::getOwnPropertySlot(ExecState* exec, unsigned property JSValue jsDataGridColumnListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumnList* castedThis = static_cast<JSDataGridColumnList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumnList* imp = static_cast<DataGridColumnList*>(static_cast<JSDataGridColumnList*>(asObject(slot.slotBase()))->impl()); + DataGridColumnList* imp = static_cast<DataGridColumnList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsDataGridColumnListSortColumn(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumnList* castedThis = static_cast<JSDataGridColumnList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumnList* imp = static_cast<DataGridColumnList*>(static_cast<JSDataGridColumnList*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->sortColumn())); + DataGridColumnList* imp = static_cast<DataGridColumnList*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->sortColumn())); } JSValue jsDataGridColumnListPrimaryColumn(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDataGridColumnList* castedThis = static_cast<JSDataGridColumnList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DataGridColumnList* imp = static_cast<DataGridColumnList*>(static_cast<JSDataGridColumnList*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->primaryColumn())); + DataGridColumnList* imp = static_cast<DataGridColumnList*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->primaryColumn())); } JSValue jsDataGridColumnListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDataGridColumnList*>(asObject(slot.slotBase()))->getConstructor(exec); + JSDataGridColumnList* domObject = static_cast<JSDataGridColumnList*>(asObject(slot.slotBase())); + return JSDataGridColumnList::getConstructor(exec, domObject->globalObject()); } void JSDataGridColumnList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -206,9 +210,9 @@ void JSDataGridColumnList::getPropertyNames(ExecState* exec, PropertyNameArray& Base::getPropertyNames(exec, propertyNames); } -JSValue JSDataGridColumnList::getConstructor(ExecState* exec) +JSValue JSDataGridColumnList::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSDataGridColumnListConstructor>(exec); + return getDOMConstructor<JSDataGridColumnListConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsDataGridColumnListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -225,7 +229,7 @@ JSValue JSC_HOST_CALL jsDataGridColumnListPrototypeFunctionItem(ExecState* exec, } - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -243,7 +247,7 @@ JSValue JSC_HOST_CALL jsDataGridColumnListPrototypeFunctionAdd(ExecState* exec, unsigned short sortable = args.at(4).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->add(id, label, type, primary, sortable))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->add(id, label, type, primary, sortable))); return result; } @@ -290,11 +294,11 @@ JSValue JSC_HOST_CALL jsDataGridColumnListPrototypeFunctionClear(ExecState* exec JSValue JSDataGridColumnList::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSDataGridColumnList* thisObj = static_cast<JSDataGridColumnList*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<DataGridColumnList*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<DataGridColumnList*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, DataGridColumnList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DataGridColumnList* object) { - return getDOMObjectWrapper<JSDataGridColumnList>(exec, object); + return getDOMObjectWrapper<JSDataGridColumnList>(exec, globalObject, object); } DataGridColumnList* toDataGridColumnList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h index b76ffd5c29..b9041467e8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.h @@ -23,6 +23,7 @@ #if ENABLE(DATAGRID) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class DataGridColumnList; -class JSDataGridColumnList : public DOMObject { - typedef DOMObject Base; +class JSDataGridColumnList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSDataGridColumnList(PassRefPtr<JSC::Structure>, PassRefPtr<DataGridColumnList>); + JSDataGridColumnList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DataGridColumnList>); virtual ~JSDataGridColumnList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,7 +49,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); DataGridColumnList* impl() const { return m_impl.get(); } private: @@ -59,7 +60,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, DataGridColumnList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DataGridColumnList*); DataGridColumnList* toDataGridColumnList(JSC::JSValue); class JSDataGridColumnListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp b/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp index 894f93cdda..6f02f71ee2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp @@ -81,8 +81,8 @@ bool JSDatabasePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSDatabase::s_info = { "Database", 0, &JSDatabaseTable, 0 }; -JSDatabase::JSDatabase(PassRefPtr<Structure> structure, PassRefPtr<Database> impl) - : DOMObject(structure) +JSDatabase::JSDatabase(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Database> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -104,8 +104,9 @@ bool JSDatabase::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsDatabaseVersion(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDatabase* castedThis = static_cast<JSDatabase*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Database* imp = static_cast<Database*>(static_cast<JSDatabase*>(asObject(slot.slotBase()))->impl()); + Database* imp = static_cast<Database*>(castedThis->impl()); return jsString(exec, imp->version()); } @@ -127,9 +128,9 @@ JSValue JSC_HOST_CALL jsDatabasePrototypeFunctionTransaction(ExecState* exec, JS return castedThisObj->transaction(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, Database* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Database* object) { - return getDOMObjectWrapper<JSDatabase>(exec, object); + return getDOMObjectWrapper<JSDatabase>(exec, globalObject, object); } Database* toDatabase(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDatabase.h b/src/3rdparty/webkit/WebCore/generated/JSDatabase.h index 94b60befd3..8ca36a59b8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDatabase.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDatabase.h @@ -23,6 +23,7 @@ #if ENABLE(DATABASE) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class Database; -class JSDatabase : public DOMObject { - typedef DOMObject Base; +class JSDatabase : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSDatabase(PassRefPtr<JSC::Structure>, PassRefPtr<Database>); + JSDatabase(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Database>); virtual ~JSDatabase(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -56,7 +57,7 @@ private: RefPtr<Database> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Database*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Database*); Database* toDatabase(JSC::JSValue); class JSDatabasePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDedicatedWorkerContext.cpp b/src/3rdparty/webkit/WebCore/generated/JSDedicatedWorkerContext.cpp new file mode 100644 index 0000000000..373bb30540 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSDedicatedWorkerContext.cpp @@ -0,0 +1,158 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" + +#if ENABLE(WORKERS) + +#include "JSDedicatedWorkerContext.h" + +#include "DedicatedWorkerContext.h" +#include "EventListener.h" +#include "JSEventListener.h" +#include "JSMessagePort.h" +#include <runtime/Error.h> +#include <wtf/GetPtr.h> + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSDedicatedWorkerContext); + +/* Hash table */ + +static const HashTableValue JSDedicatedWorkerContextTableValues[2] = +{ + { "onmessage", DontDelete, (intptr_t)jsDedicatedWorkerContextOnmessage, (intptr_t)setJSDedicatedWorkerContextOnmessage }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSDedicatedWorkerContextTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSDedicatedWorkerContextTableValues, 0 }; +#else + { 2, 1, JSDedicatedWorkerContextTableValues, 0 }; +#endif + +/* Hash table for prototype */ + +static const HashTableValue JSDedicatedWorkerContextPrototypeTableValues[2] = +{ + { "postMessage", DontDelete|Function, (intptr_t)jsDedicatedWorkerContextPrototypeFunctionPostMessage, (intptr_t)2 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSDedicatedWorkerContextPrototypeTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSDedicatedWorkerContextPrototypeTableValues, 0 }; +#else + { 2, 1, JSDedicatedWorkerContextPrototypeTableValues, 0 }; +#endif + +static const HashTable* getJSDedicatedWorkerContextPrototypeTable(ExecState* exec) +{ + return getHashTableForGlobalData(exec->globalData(), &JSDedicatedWorkerContextPrototypeTable); +} +const ClassInfo JSDedicatedWorkerContextPrototype::s_info = { "DedicatedWorkerContextPrototype", 0, 0, getJSDedicatedWorkerContextPrototypeTable }; + +void* JSDedicatedWorkerContextPrototype::operator new(size_t size, JSGlobalData* globalData) +{ + return globalData->heap.allocate(size); +} + +bool JSDedicatedWorkerContextPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot<JSObject>(exec, getJSDedicatedWorkerContextPrototypeTable(exec), this, propertyName, slot); +} + +static const HashTable* getJSDedicatedWorkerContextTable(ExecState* exec) +{ + return getHashTableForGlobalData(exec->globalData(), &JSDedicatedWorkerContextTable); +} +const ClassInfo JSDedicatedWorkerContext::s_info = { "DedicatedWorkerContext", &JSWorkerContext::s_info, 0, getJSDedicatedWorkerContextTable }; + +JSDedicatedWorkerContext::JSDedicatedWorkerContext(PassRefPtr<Structure> structure, PassRefPtr<DedicatedWorkerContext> impl) + : JSWorkerContext(structure, impl) +{ +} + +bool JSDedicatedWorkerContext::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSDedicatedWorkerContext, Base>(exec, getJSDedicatedWorkerContextTable(exec), this, propertyName, slot); +} + +JSValue jsDedicatedWorkerContextOnmessage(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSDedicatedWorkerContext* castedThis = static_cast<JSDedicatedWorkerContext*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + DedicatedWorkerContext* imp = static_cast<DedicatedWorkerContext*>(castedThis->impl()); + if (EventListener* listener = imp->onmessage()) { + if (JSObject* jsFunction = listener->jsFunction()) + return jsFunction; + } + return jsNull(); +} + +void JSDedicatedWorkerContext::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) +{ + lookupPut<JSDedicatedWorkerContext, Base>(exec, propertyName, value, getJSDedicatedWorkerContextTable(exec), this, slot); +} + +void setJSDedicatedWorkerContextOnmessage(ExecState* exec, JSObject* thisObject, JSValue value) +{ + UNUSED_PARAM(exec); + DedicatedWorkerContext* imp = static_cast<DedicatedWorkerContext*>(static_cast<JSDedicatedWorkerContext*>(thisObject)->impl()); + JSDOMGlobalObject* globalObject = static_cast<JSDedicatedWorkerContext*>(thisObject); + imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); +} + +JSValue JSC_HOST_CALL jsDedicatedWorkerContextPrototypeFunctionPostMessage(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + JSDedicatedWorkerContext* castedThisObj = toJSDedicatedWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) + return throwError(exec, TypeError); + DedicatedWorkerContext* imp = static_cast<DedicatedWorkerContext*>(castedThisObj->impl()); + ExceptionCode ec = 0; + const UString& message = args.at(0).toString(exec); + + int argsCount = args.size(); + if (argsCount < 2) { + imp->postMessage(message, ec); + setDOMException(exec, ec); + return jsUndefined(); + } + + MessagePort* messagePort = toMessagePort(args.at(1)); + + imp->postMessage(message, messagePort, ec); + setDOMException(exec, ec); + return jsUndefined(); +} + +DedicatedWorkerContext* toDedicatedWorkerContext(JSC::JSValue value) +{ + return value.isObject(&JSDedicatedWorkerContext::s_info) ? static_cast<JSDedicatedWorkerContext*>(asObject(value))->impl() : 0; +} + +} + +#endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDedicatedWorkerContext.h b/src/3rdparty/webkit/WebCore/generated/JSDedicatedWorkerContext.h new file mode 100644 index 0000000000..6054c802a1 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSDedicatedWorkerContext.h @@ -0,0 +1,83 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef JSDedicatedWorkerContext_h +#define JSDedicatedWorkerContext_h + +#if ENABLE(WORKERS) + +#include "DedicatedWorkerContext.h" +#include "JSWorkerContext.h" + +namespace WebCore { + +class DedicatedWorkerContext; + +class JSDedicatedWorkerContext : public JSWorkerContext { + typedef JSWorkerContext Base; +public: + JSDedicatedWorkerContext(PassRefPtr<JSC::Structure>, PassRefPtr<DedicatedWorkerContext>); + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); + virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + + virtual void mark(); + + DedicatedWorkerContext* impl() const + { + return static_cast<DedicatedWorkerContext*>(Base::impl()); + } +}; + +DedicatedWorkerContext* toDedicatedWorkerContext(JSC::JSValue); + +class JSDedicatedWorkerContextPrototype : public JSC::JSObject { + typedef JSC::JSObject Base; +public: + void* operator new(size_t, JSC::JSGlobalData*); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + JSDedicatedWorkerContextPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { } +}; + +// Functions + +JSC::JSValue JSC_HOST_CALL jsDedicatedWorkerContextPrototypeFunctionPostMessage(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +// Attributes + +JSC::JSValue jsDedicatedWorkerContextOnmessage(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSDedicatedWorkerContextOnmessage(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); + +} // namespace WebCore + +#endif // ENABLE(WORKERS) + +#endif diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp b/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp index ce7b8504d7..68b7cccee9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp @@ -190,12 +190,12 @@ static JSC_CONST_HASHTABLE HashTable JSDocumentConstructorTable = { 1, 0, JSDocumentConstructorTableValues, 0 }; #endif -class JSDocumentConstructor : public DOMObject { +class JSDocumentConstructor : public DOMConstructorObject { public: - JSDocumentConstructor(ExecState* exec) - : DOMObject(JSDocumentConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSDocumentConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSDocumentConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSDocumentPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSDocumentPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -278,8 +278,8 @@ bool JSDocumentPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSDocument::s_info = { "Document", &JSNode::s_info, &JSDocumentTable, 0 }; -JSDocument::JSDocument(PassRefPtr<Structure> structure, PassRefPtr<Document> impl) - : JSNode(structure, impl) +JSDocument::JSDocument(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Document> impl) + : JSNode(structure, globalObject, impl) { } @@ -295,209 +295,239 @@ JSObject* JSDocument::createPrototype(ExecState* exec, JSGlobalObject* globalObj JSValue jsDocumentDoctype(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->doctype())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->doctype())); } JSValue jsDocumentImplementation(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->implementation())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->implementation())); } JSValue jsDocumentDocumentElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->documentElement())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->documentElement())); } JSValue jsDocumentInputEncoding(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrNull(exec, imp->inputEncoding()); } JSValue jsDocumentXMLEncoding(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrNull(exec, imp->xmlEncoding()); } JSValue jsDocumentXMLVersion(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrNull(exec, imp->xmlVersion()); } JSValue jsDocumentXMLStandalone(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsBoolean(imp->xmlStandalone()); } JSValue jsDocumentDocumentURI(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrNull(exec, imp->documentURI()); } JSValue jsDocumentDefaultView(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->defaultView())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->defaultView())); } JSValue jsDocumentStyleSheets(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->styleSheets())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->styleSheets())); } JSValue jsDocumentTitle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsString(exec, imp->title()); } JSValue jsDocumentReferrer(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsString(exec, imp->referrer()); } JSValue jsDocumentDomain(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsString(exec, imp->domain()); } JSValue jsDocumentURL(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsString(exec, imp->url()); } JSValue jsDocumentCookie(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsString(exec, imp->cookie()); } JSValue jsDocumentBody(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->body())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->body())); } JSValue jsDocumentImages(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->images())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->images())); } JSValue jsDocumentApplets(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->applets())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->applets())); } JSValue jsDocumentLinks(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->links())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->links())); } JSValue jsDocumentForms(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->forms())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->forms())); } JSValue jsDocumentAnchors(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->anchors())); + Document* imp = static_cast<Document*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->anchors())); } JSValue jsDocumentLastModified(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsString(exec, imp->lastModified()); } JSValue jsDocumentLocation(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDocument*>(asObject(slot.slotBase()))->location(exec); + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); + return castedThis->location(exec); } JSValue jsDocumentCharset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrUndefined(exec, imp->charset()); } JSValue jsDocumentDefaultCharset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrUndefined(exec, imp->defaultCharset()); } JSValue jsDocumentReadyState(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrUndefined(exec, imp->readyState()); } JSValue jsDocumentCharacterSet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrNull(exec, imp->characterSet()); } JSValue jsDocumentPreferredStylesheetSet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrNull(exec, imp->preferredStylesheetSet()); } JSValue jsDocumentSelectedStylesheetSet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); return jsStringOrNull(exec, imp->selectedStylesheetSet()); } JSValue jsDocumentOnabort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onabort()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -507,8 +537,9 @@ JSValue jsDocumentOnabort(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDocumentOnblur(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onblur()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -518,8 +549,9 @@ JSValue jsDocumentOnblur(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsDocumentOnchange(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onchange()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -529,8 +561,9 @@ JSValue jsDocumentOnchange(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDocumentOnclick(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onclick()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -540,8 +573,9 @@ JSValue jsDocumentOnclick(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDocumentOncontextmenu(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->oncontextmenu()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -551,8 +585,9 @@ JSValue jsDocumentOncontextmenu(ExecState* exec, const Identifier&, const Proper JSValue jsDocumentOndblclick(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->ondblclick()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -562,8 +597,9 @@ JSValue jsDocumentOndblclick(ExecState* exec, const Identifier&, const PropertyS JSValue jsDocumentOndrag(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->ondrag()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -573,8 +609,9 @@ JSValue jsDocumentOndrag(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsDocumentOndragend(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->ondragend()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -584,8 +621,9 @@ JSValue jsDocumentOndragend(ExecState* exec, const Identifier&, const PropertySl JSValue jsDocumentOndragenter(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->ondragenter()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -595,8 +633,9 @@ JSValue jsDocumentOndragenter(ExecState* exec, const Identifier&, const Property JSValue jsDocumentOndragleave(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->ondragleave()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -606,8 +645,9 @@ JSValue jsDocumentOndragleave(ExecState* exec, const Identifier&, const Property JSValue jsDocumentOndragover(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->ondragover()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -617,8 +657,9 @@ JSValue jsDocumentOndragover(ExecState* exec, const Identifier&, const PropertyS JSValue jsDocumentOndragstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->ondragstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -628,8 +669,9 @@ JSValue jsDocumentOndragstart(ExecState* exec, const Identifier&, const Property JSValue jsDocumentOndrop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->ondrop()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -639,8 +681,9 @@ JSValue jsDocumentOndrop(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsDocumentOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onerror()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -650,8 +693,9 @@ JSValue jsDocumentOnerror(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDocumentOnfocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onfocus()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -661,8 +705,9 @@ JSValue jsDocumentOnfocus(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDocumentOninput(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->oninput()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -672,8 +717,9 @@ JSValue jsDocumentOninput(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDocumentOnkeydown(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onkeydown()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -683,8 +729,9 @@ JSValue jsDocumentOnkeydown(ExecState* exec, const Identifier&, const PropertySl JSValue jsDocumentOnkeypress(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onkeypress()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -694,8 +741,9 @@ JSValue jsDocumentOnkeypress(ExecState* exec, const Identifier&, const PropertyS JSValue jsDocumentOnkeyup(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onkeyup()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -705,8 +753,9 @@ JSValue jsDocumentOnkeyup(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDocumentOnload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -716,8 +765,9 @@ JSValue jsDocumentOnload(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsDocumentOnmousedown(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onmousedown()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -727,8 +777,9 @@ JSValue jsDocumentOnmousedown(ExecState* exec, const Identifier&, const Property JSValue jsDocumentOnmousemove(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onmousemove()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -738,8 +789,9 @@ JSValue jsDocumentOnmousemove(ExecState* exec, const Identifier&, const Property JSValue jsDocumentOnmouseout(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onmouseout()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -749,8 +801,9 @@ JSValue jsDocumentOnmouseout(ExecState* exec, const Identifier&, const PropertyS JSValue jsDocumentOnmouseover(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onmouseover()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -760,8 +813,9 @@ JSValue jsDocumentOnmouseover(ExecState* exec, const Identifier&, const Property JSValue jsDocumentOnmouseup(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onmouseup()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -771,8 +825,9 @@ JSValue jsDocumentOnmouseup(ExecState* exec, const Identifier&, const PropertySl JSValue jsDocumentOnmousewheel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onmousewheel()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -782,8 +837,9 @@ JSValue jsDocumentOnmousewheel(ExecState* exec, const Identifier&, const Propert JSValue jsDocumentOnscroll(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onscroll()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -793,8 +849,9 @@ JSValue jsDocumentOnscroll(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDocumentOnselect(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onselect()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -804,8 +861,9 @@ JSValue jsDocumentOnselect(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDocumentOnsubmit(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onsubmit()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -815,8 +873,9 @@ JSValue jsDocumentOnsubmit(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDocumentOnbeforecut(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onbeforecut()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -826,8 +885,9 @@ JSValue jsDocumentOnbeforecut(ExecState* exec, const Identifier&, const Property JSValue jsDocumentOncut(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->oncut()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -837,8 +897,9 @@ JSValue jsDocumentOncut(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsDocumentOnbeforecopy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onbeforecopy()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -848,8 +909,9 @@ JSValue jsDocumentOnbeforecopy(ExecState* exec, const Identifier&, const Propert JSValue jsDocumentOncopy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->oncopy()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -859,8 +921,9 @@ JSValue jsDocumentOncopy(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsDocumentOnbeforepaste(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onbeforepaste()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -870,8 +933,9 @@ JSValue jsDocumentOnbeforepaste(ExecState* exec, const Identifier&, const Proper JSValue jsDocumentOnpaste(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onpaste()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -881,8 +945,9 @@ JSValue jsDocumentOnpaste(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDocumentOnreset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onreset()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -892,8 +957,9 @@ JSValue jsDocumentOnreset(ExecState* exec, const Identifier&, const PropertySlot JSValue jsDocumentOnsearch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onsearch()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -903,8 +969,9 @@ JSValue jsDocumentOnsearch(ExecState* exec, const Identifier&, const PropertySlo JSValue jsDocumentOnselectstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocument* castedThis = static_cast<JSDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Document* imp = static_cast<Document*>(static_cast<JSDocument*>(asObject(slot.slotBase()))->impl()); + Document* imp = static_cast<Document*>(castedThis->impl()); if (EventListener* listener = imp->onselectstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -914,7 +981,8 @@ JSValue jsDocumentOnselectstart(ExecState* exec, const Identifier&, const Proper JSValue jsDocumentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDocument*>(asObject(slot.slotBase()))->getConstructor(exec); + JSDocument* domObject = static_cast<JSDocument*>(asObject(slot.slotBase())); + return JSDocument::getConstructor(exec, domObject->globalObject()); } void JSDocument::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -1366,9 +1434,9 @@ void setJSDocumentOnselectstart(ExecState* exec, JSObject* thisObject, JSValue v imp->setOnselectstart(globalObject->createJSAttributeEventListener(value)); } -JSValue JSDocument::getConstructor(ExecState* exec) +JSValue JSDocument::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSDocumentConstructor>(exec); + return getDOMConstructor<JSDocumentConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateElement(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -1382,7 +1450,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateElement(ExecState* exec, const UString& tagName = valueToStringWithNullCheck(exec, args.at(0)); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createElement(tagName, ec))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createElement(tagName, ec))); setDOMException(exec, ec); return result; } @@ -1396,7 +1464,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateDocumentFragment(ExecStat Document* imp = static_cast<Document*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createDocumentFragment())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createDocumentFragment())); return result; } @@ -1410,7 +1478,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTextNode(ExecState* exec, const UString& data = args.at(0).toString(exec); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createTextNode(data))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createTextNode(data))); return result; } @@ -1424,7 +1492,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateComment(ExecState* exec, const UString& data = args.at(0).toString(exec); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createComment(data))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createComment(data))); return result; } @@ -1439,7 +1507,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateCDATASection(ExecState* e const UString& data = args.at(0).toString(exec); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createCDATASection(data, ec))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createCDATASection(data, ec))); setDOMException(exec, ec); return result; } @@ -1456,7 +1524,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateProcessingInstruction(Exe const UString& data = args.at(1).toString(exec); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createProcessingInstruction(target, data, ec))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createProcessingInstruction(target, data, ec))); setDOMException(exec, ec); return result; } @@ -1472,7 +1540,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateAttribute(ExecState* exec const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createAttribute(name, ec))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createAttribute(name, ec))); setDOMException(exec, ec); return result; } @@ -1488,7 +1556,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateEntityReference(ExecState const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createEntityReference(name, ec))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createEntityReference(name, ec))); setDOMException(exec, ec); return result; } @@ -1503,7 +1571,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByTagName(ExecState* const UString& tagname = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getElementsByTagName(tagname))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getElementsByTagName(tagname))); return result; } @@ -1519,7 +1587,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionImportNode(ExecState* exec, JSO bool deep = args.at(1).toBoolean(exec); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->importNode(importedNode, deep, ec))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->importNode(importedNode, deep, ec))); setDOMException(exec, ec); return result; } @@ -1536,7 +1604,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateElementNS(ExecState* exec const UString& qualifiedName = valueToStringWithNullCheck(exec, args.at(1)); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createElementNS(namespaceURI, qualifiedName, ec))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createElementNS(namespaceURI, qualifiedName, ec))); setDOMException(exec, ec); return result; } @@ -1553,7 +1621,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateAttributeNS(ExecState* ex const UString& qualifiedName = valueToStringWithNullCheck(exec, args.at(1)); - JSC::JSValue result = toJSNewlyCreated(exec, WTF::getPtr(imp->createAttributeNS(namespaceURI, qualifiedName, ec))); + JSC::JSValue result = toJSNewlyCreated(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createAttributeNS(namespaceURI, qualifiedName, ec))); setDOMException(exec, ec); return result; } @@ -1569,7 +1637,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByTagNameNS(ExecStat const UString& localName = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getElementsByTagNameNS(namespaceURI, localName))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getElementsByTagNameNS(namespaceURI, localName))); return result; } @@ -1583,7 +1651,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementById(ExecState* exec, const UString& elementId = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getElementById(elementId))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getElementById(elementId))); return result; } @@ -1598,7 +1666,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionAdoptNode(ExecState* exec, JSOb Node* source = toNode(args.at(0)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->adoptNode(source, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->adoptNode(source, ec))); setDOMException(exec, ec); return result; } @@ -1614,7 +1682,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateEvent(ExecState* exec, JS const UString& eventType = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createEvent(eventType, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createEvent(eventType, ec))); setDOMException(exec, ec); return result; } @@ -1628,7 +1696,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateRange(ExecState* exec, JS Document* imp = static_cast<Document*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createRange())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createRange())); return result; } @@ -1646,7 +1714,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateNodeIterator(ExecState* e bool expandEntityReferences = args.at(3).toBoolean(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createNodeIterator(root, whatToShow, filter.get(), expandEntityReferences, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createNodeIterator(root, whatToShow, filter.get(), expandEntityReferences, ec))); setDOMException(exec, ec); return result; } @@ -1665,7 +1733,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTreeWalker(ExecState* exe bool expandEntityReferences = args.at(3).toBoolean(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createTreeWalker(root, whatToShow, filter.get(), expandEntityReferences, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createTreeWalker(root, whatToShow, filter.get(), expandEntityReferences, ec))); setDOMException(exec, ec); return result; } @@ -1681,7 +1749,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetOverrideStyle(ExecState* exe const UString& pseudoElement = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getOverrideStyle(element, pseudoElement))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getOverrideStyle(element, pseudoElement))); return result; } @@ -1704,7 +1772,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateExpression(ExecState* exe } - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createExpression(expression, resolver, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createExpression(expression, resolver, ec))); setDOMException(exec, ec); return result; } @@ -1719,7 +1787,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateNSResolver(ExecState* exe Node* nodeResolver = toNode(args.at(0)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createNSResolver(nodeResolver))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createNSResolver(nodeResolver))); return result; } @@ -1745,7 +1813,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionEvaluate(ExecState* exec, JSObj XPathResult* inResult = toXPathResult(args.at(4)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->evaluate(expression, contextNode, resolver, type, inResult, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->evaluate(expression, contextNode, resolver, type, inResult, ec))); setDOMException(exec, ec); return result; } @@ -1846,7 +1914,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByName(ExecState* ex const UString& elementName = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getElementsByName(elementName))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getElementsByName(elementName))); return result; } @@ -1861,7 +1929,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionElementFromPoint(ExecState* exe int y = args.at(1).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->elementFromPoint(x, y))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->elementFromPoint(x, y))); return result; } @@ -1874,7 +1942,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetSelection(ExecState* exec, J Document* imp = static_cast<Document*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getSelection())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getSelection())); return result; } @@ -1891,7 +1959,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetCSSCanvasContext(ExecState* int height = args.at(3).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getCSSCanvasContext(contextId, name, width, height))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getCSSCanvasContext(contextId, name, width, height))); return result; } @@ -1905,7 +1973,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByClassName(ExecStat const UString& tagname = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getElementsByClassName(tagname))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getElementsByClassName(tagname))); return result; } @@ -1920,7 +1988,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelector(ExecState* exec, const UString& selectors = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->querySelector(selectors, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->querySelector(selectors, ec))); setDOMException(exec, ec); return result; } @@ -1936,7 +2004,7 @@ JSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelectorAll(ExecState* exe const UString& selectors = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->querySelectorAll(selectors, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->querySelectorAll(selectors, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocument.h b/src/3rdparty/webkit/WebCore/generated/JSDocument.h index c2032eaef5..470c67157e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDocument.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDocument.h @@ -33,7 +33,7 @@ class Document; class JSDocument : public JSNode { typedef JSNode Base; public: - JSDocument(PassRefPtr<JSC::Structure>, PassRefPtr<Document>); + JSDocument(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Document>); virtual ~JSDocument(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,7 +48,7 @@ public: virtual void mark(); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes JSC::JSValue location(JSC::ExecState*) const; @@ -64,7 +64,7 @@ ALWAYS_INLINE bool JSDocument::getOwnPropertySlot(JSC::ExecState* exec, const JS return JSC::getStaticValueSlot<JSDocument, Base>(exec, s_info.staticPropHashTable, this, propertyName, slot); } -JSC::JSValue toJS(JSC::ExecState*, Document*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Document*); Document* toDocument(JSC::JSValue); class JSDocumentPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp b/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp index 05deb3c4ef..0a1a7e9f24 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSDocumentFragmentConstructorTable = { 1, 0, JSDocumentFragmentConstructorTableValues, 0 }; #endif -class JSDocumentFragmentConstructor : public DOMObject { +class JSDocumentFragmentConstructor : public DOMConstructorObject { public: - JSDocumentFragmentConstructor(ExecState* exec) - : DOMObject(JSDocumentFragmentConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSDocumentFragmentConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSDocumentFragmentConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSDocumentFragmentPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSDocumentFragmentPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -119,8 +119,8 @@ bool JSDocumentFragmentPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSDocumentFragment::s_info = { "DocumentFragment", &JSNode::s_info, &JSDocumentFragmentTable, 0 }; -JSDocumentFragment::JSDocumentFragment(PassRefPtr<Structure> structure, PassRefPtr<DocumentFragment> impl) - : JSNode(structure, impl) +JSDocumentFragment::JSDocumentFragment(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DocumentFragment> impl) + : JSNode(structure, globalObject, impl) { } @@ -136,11 +136,12 @@ bool JSDocumentFragment::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsDocumentFragmentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDocumentFragment*>(asObject(slot.slotBase()))->getConstructor(exec); + JSDocumentFragment* domObject = static_cast<JSDocumentFragment*>(asObject(slot.slotBase())); + return JSDocumentFragment::getConstructor(exec, domObject->globalObject()); } -JSValue JSDocumentFragment::getConstructor(ExecState* exec) +JSValue JSDocumentFragment::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSDocumentFragmentConstructor>(exec); + return getDOMConstructor<JSDocumentFragmentConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsDocumentFragmentPrototypeFunctionQuerySelector(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -154,7 +155,7 @@ JSValue JSC_HOST_CALL jsDocumentFragmentPrototypeFunctionQuerySelector(ExecState const UString& selectors = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->querySelector(selectors, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->querySelector(selectors, ec))); setDOMException(exec, ec); return result; } @@ -170,7 +171,7 @@ JSValue JSC_HOST_CALL jsDocumentFragmentPrototypeFunctionQuerySelectorAll(ExecSt const UString& selectors = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->querySelectorAll(selectors, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->querySelectorAll(selectors, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.h b/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.h index d5f57a3b8a..d49b29863e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.h @@ -30,7 +30,7 @@ class DocumentFragment; class JSDocumentFragment : public JSNode { typedef JSNode Base; public: - JSDocumentFragment(PassRefPtr<JSC::Structure>, PassRefPtr<DocumentFragment>); + JSDocumentFragment(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DocumentFragment>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp b/src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp index 361e62fbc4..a0df48371f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp @@ -69,12 +69,12 @@ static JSC_CONST_HASHTABLE HashTable JSDocumentTypeConstructorTable = { 1, 0, JSDocumentTypeConstructorTableValues, 0 }; #endif -class JSDocumentTypeConstructor : public DOMObject { +class JSDocumentTypeConstructor : public DOMConstructorObject { public: - JSDocumentTypeConstructor(ExecState* exec) - : DOMObject(JSDocumentTypeConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSDocumentTypeConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSDocumentTypeConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSDocumentTypePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSDocumentTypePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -116,8 +116,8 @@ JSObject* JSDocumentTypePrototype::self(ExecState* exec, JSGlobalObject* globalO const ClassInfo JSDocumentType::s_info = { "DocumentType", &JSNode::s_info, &JSDocumentTypeTable, 0 }; -JSDocumentType::JSDocumentType(PassRefPtr<Structure> structure, PassRefPtr<DocumentType> impl) - : JSNode(structure, impl) +JSDocumentType::JSDocumentType(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<DocumentType> impl) + : JSNode(structure, globalObject, impl) { } @@ -133,53 +133,60 @@ bool JSDocumentType::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsDocumentTypeName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DocumentType* imp = static_cast<DocumentType*>(static_cast<JSDocumentType*>(asObject(slot.slotBase()))->impl()); + DocumentType* imp = static_cast<DocumentType*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsDocumentTypeEntities(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DocumentType* imp = static_cast<DocumentType*>(static_cast<JSDocumentType*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->entities())); + DocumentType* imp = static_cast<DocumentType*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->entities())); } JSValue jsDocumentTypeNotations(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DocumentType* imp = static_cast<DocumentType*>(static_cast<JSDocumentType*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->notations())); + DocumentType* imp = static_cast<DocumentType*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->notations())); } JSValue jsDocumentTypePublicId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DocumentType* imp = static_cast<DocumentType*>(static_cast<JSDocumentType*>(asObject(slot.slotBase()))->impl()); + DocumentType* imp = static_cast<DocumentType*>(castedThis->impl()); return jsStringOrNull(exec, imp->publicId()); } JSValue jsDocumentTypeSystemId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DocumentType* imp = static_cast<DocumentType*>(static_cast<JSDocumentType*>(asObject(slot.slotBase()))->impl()); + DocumentType* imp = static_cast<DocumentType*>(castedThis->impl()); return jsStringOrNull(exec, imp->systemId()); } JSValue jsDocumentTypeInternalSubset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - DocumentType* imp = static_cast<DocumentType*>(static_cast<JSDocumentType*>(asObject(slot.slotBase()))->impl()); + DocumentType* imp = static_cast<DocumentType*>(castedThis->impl()); return jsStringOrNull(exec, imp->internalSubset()); } JSValue jsDocumentTypeConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSDocumentType*>(asObject(slot.slotBase()))->getConstructor(exec); + JSDocumentType* domObject = static_cast<JSDocumentType*>(asObject(slot.slotBase())); + return JSDocumentType::getConstructor(exec, domObject->globalObject()); } -JSValue JSDocumentType::getConstructor(ExecState* exec) +JSValue JSDocumentType::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSDocumentTypeConstructor>(exec); + return getDOMConstructor<JSDocumentTypeConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } DocumentType* toDocumentType(JSC::JSValue value) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocumentType.h b/src/3rdparty/webkit/WebCore/generated/JSDocumentType.h index 10a5530b8c..e6569c83b9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDocumentType.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDocumentType.h @@ -31,7 +31,7 @@ class DocumentType; class JSDocumentType : public JSNode { typedef JSNode Base; public: - JSDocumentType(PassRefPtr<JSC::Structure>, PassRefPtr<DocumentType>); + JSDocumentType(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<DocumentType>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); DocumentType* impl() const { return static_cast<DocumentType*>(Base::impl()); diff --git a/src/3rdparty/webkit/WebCore/generated/JSElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSElement.cpp index a4d240974e..9c101b5032 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSElement.cpp @@ -138,12 +138,12 @@ static JSC_CONST_HASHTABLE HashTable JSElementConstructorTable = { 1, 0, JSElementConstructorTableValues, 0 }; #endif -class JSElementConstructor : public DOMObject { +class JSElementConstructor : public DOMConstructorObject { public: - JSElementConstructor(ExecState* exec) - : DOMObject(JSElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -217,8 +217,8 @@ bool JSElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& p const ClassInfo JSElement::s_info = { "Element", &JSNode::s_info, &JSElementTable, 0 }; -JSElement::JSElement(PassRefPtr<Structure> structure, PassRefPtr<Element> impl) - : JSNode(structure, impl) +JSElement::JSElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Element> impl) + : JSNode(structure, globalObject, impl) { } @@ -229,148 +229,169 @@ JSObject* JSElement::createPrototype(ExecState* exec, JSGlobalObject* globalObje JSValue jsElementTagName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsStringOrNull(exec, imp->tagName()); } JSValue jsElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + Element* imp = static_cast<Element*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsElementOffsetLeft(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->offsetLeft()); } JSValue jsElementOffsetTop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->offsetTop()); } JSValue jsElementOffsetWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->offsetWidth()); } JSValue jsElementOffsetHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->offsetHeight()); } JSValue jsElementOffsetParent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->offsetParent())); + Element* imp = static_cast<Element*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->offsetParent())); } JSValue jsElementClientLeft(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->clientLeft()); } JSValue jsElementClientTop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->clientTop()); } JSValue jsElementClientWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->clientWidth()); } JSValue jsElementClientHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->clientHeight()); } JSValue jsElementScrollLeft(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->scrollLeft()); } JSValue jsElementScrollTop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->scrollTop()); } JSValue jsElementScrollWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->scrollWidth()); } JSValue jsElementScrollHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->scrollHeight()); } JSValue jsElementFirstElementChild(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->firstElementChild())); + Element* imp = static_cast<Element*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->firstElementChild())); } JSValue jsElementLastElementChild(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->lastElementChild())); + Element* imp = static_cast<Element*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->lastElementChild())); } JSValue jsElementPreviousElementSibling(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->previousElementSibling())); + Element* imp = static_cast<Element*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->previousElementSibling())); } JSValue jsElementNextElementSibling(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nextElementSibling())); + Element* imp = static_cast<Element*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nextElementSibling())); } JSValue jsElementChildElementCount(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); return jsNumber(exec, imp->childElementCount()); } JSValue jsElementOnabort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onabort()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -380,8 +401,9 @@ JSValue jsElementOnabort(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnblur(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onblur()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -391,8 +413,9 @@ JSValue jsElementOnblur(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnchange(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onchange()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -402,8 +425,9 @@ JSValue jsElementOnchange(ExecState* exec, const Identifier&, const PropertySlot JSValue jsElementOnclick(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onclick()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -413,8 +437,9 @@ JSValue jsElementOnclick(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOncontextmenu(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->oncontextmenu()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -424,8 +449,9 @@ JSValue jsElementOncontextmenu(ExecState* exec, const Identifier&, const Propert JSValue jsElementOndblclick(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->ondblclick()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -435,8 +461,9 @@ JSValue jsElementOndblclick(ExecState* exec, const Identifier&, const PropertySl JSValue jsElementOndrag(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->ondrag()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -446,8 +473,9 @@ JSValue jsElementOndrag(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOndragend(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->ondragend()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -457,8 +485,9 @@ JSValue jsElementOndragend(ExecState* exec, const Identifier&, const PropertySlo JSValue jsElementOndragenter(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->ondragenter()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -468,8 +497,9 @@ JSValue jsElementOndragenter(ExecState* exec, const Identifier&, const PropertyS JSValue jsElementOndragleave(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->ondragleave()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -479,8 +509,9 @@ JSValue jsElementOndragleave(ExecState* exec, const Identifier&, const PropertyS JSValue jsElementOndragover(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->ondragover()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -490,8 +521,9 @@ JSValue jsElementOndragover(ExecState* exec, const Identifier&, const PropertySl JSValue jsElementOndragstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->ondragstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -501,8 +533,9 @@ JSValue jsElementOndragstart(ExecState* exec, const Identifier&, const PropertyS JSValue jsElementOndrop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->ondrop()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -512,8 +545,9 @@ JSValue jsElementOndrop(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onerror()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -523,8 +557,9 @@ JSValue jsElementOnerror(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnfocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onfocus()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -534,8 +569,9 @@ JSValue jsElementOnfocus(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOninput(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->oninput()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -545,8 +581,9 @@ JSValue jsElementOninput(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnkeydown(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onkeydown()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -556,8 +593,9 @@ JSValue jsElementOnkeydown(ExecState* exec, const Identifier&, const PropertySlo JSValue jsElementOnkeypress(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onkeypress()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -567,8 +605,9 @@ JSValue jsElementOnkeypress(ExecState* exec, const Identifier&, const PropertySl JSValue jsElementOnkeyup(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onkeyup()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -578,8 +617,9 @@ JSValue jsElementOnkeyup(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -589,8 +629,9 @@ JSValue jsElementOnload(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnmousedown(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onmousedown()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -600,8 +641,9 @@ JSValue jsElementOnmousedown(ExecState* exec, const Identifier&, const PropertyS JSValue jsElementOnmousemove(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onmousemove()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -611,8 +653,9 @@ JSValue jsElementOnmousemove(ExecState* exec, const Identifier&, const PropertyS JSValue jsElementOnmouseout(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onmouseout()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -622,8 +665,9 @@ JSValue jsElementOnmouseout(ExecState* exec, const Identifier&, const PropertySl JSValue jsElementOnmouseover(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onmouseover()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -633,8 +677,9 @@ JSValue jsElementOnmouseover(ExecState* exec, const Identifier&, const PropertyS JSValue jsElementOnmouseup(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onmouseup()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -644,8 +689,9 @@ JSValue jsElementOnmouseup(ExecState* exec, const Identifier&, const PropertySlo JSValue jsElementOnmousewheel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onmousewheel()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -655,8 +701,9 @@ JSValue jsElementOnmousewheel(ExecState* exec, const Identifier&, const Property JSValue jsElementOnscroll(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onscroll()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -666,8 +713,9 @@ JSValue jsElementOnscroll(ExecState* exec, const Identifier&, const PropertySlot JSValue jsElementOnselect(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onselect()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -677,8 +725,9 @@ JSValue jsElementOnselect(ExecState* exec, const Identifier&, const PropertySlot JSValue jsElementOnsubmit(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onsubmit()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -688,8 +737,9 @@ JSValue jsElementOnsubmit(ExecState* exec, const Identifier&, const PropertySlot JSValue jsElementOnbeforecut(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onbeforecut()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -699,8 +749,9 @@ JSValue jsElementOnbeforecut(ExecState* exec, const Identifier&, const PropertyS JSValue jsElementOncut(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->oncut()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -710,8 +761,9 @@ JSValue jsElementOncut(ExecState* exec, const Identifier&, const PropertySlot& s JSValue jsElementOnbeforecopy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onbeforecopy()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -721,8 +773,9 @@ JSValue jsElementOnbeforecopy(ExecState* exec, const Identifier&, const Property JSValue jsElementOncopy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->oncopy()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -732,8 +785,9 @@ JSValue jsElementOncopy(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnbeforepaste(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onbeforepaste()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -743,8 +797,9 @@ JSValue jsElementOnbeforepaste(ExecState* exec, const Identifier&, const Propert JSValue jsElementOnpaste(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onpaste()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -754,8 +809,9 @@ JSValue jsElementOnpaste(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnreset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onreset()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -765,8 +821,9 @@ JSValue jsElementOnreset(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsElementOnsearch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onsearch()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -776,8 +833,9 @@ JSValue jsElementOnsearch(ExecState* exec, const Identifier&, const PropertySlot JSValue jsElementOnselectstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSElement* castedThis = static_cast<JSElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Element* imp = static_cast<Element*>(static_cast<JSElement*>(asObject(slot.slotBase()))->impl()); + Element* imp = static_cast<Element*>(castedThis->impl()); if (EventListener* listener = imp->onselectstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -787,7 +845,8 @@ JSValue jsElementOnselectstart(ExecState* exec, const Identifier&, const Propert JSValue jsElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSElement* domObject = static_cast<JSElement*>(asObject(slot.slotBase())); + return JSElement::getConstructor(exec, domObject->globalObject()); } void JSElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -1186,9 +1245,9 @@ void setJSElementOnselectstart(ExecState* exec, JSObject* thisObject, JSValue va imp->setOnselectstart(globalObject->createJSAttributeEventListener(value)); } -JSValue JSElement::getConstructor(ExecState* exec) +JSValue JSElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSElementConstructor>(exec); + return getDOMConstructor<JSElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -1239,7 +1298,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetAttributeNode(ExecState* exec const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getAttributeNode(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getAttributeNode(name))); return result; } @@ -1263,7 +1322,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionRemoveAttributeNode(ExecState* e Attr* oldAttr = toAttr(args.at(0)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->removeAttributeNode(oldAttr, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->removeAttributeNode(oldAttr, ec))); setDOMException(exec, ec); return result; } @@ -1278,7 +1337,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetElementsByTagName(ExecState* const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getElementsByTagName(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getElementsByTagName(name))); return result; } @@ -1333,7 +1392,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetElementsByTagNameNS(ExecState const UString& localName = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getElementsByTagNameNS(namespaceURI, localName))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getElementsByTagNameNS(namespaceURI, localName))); return result; } @@ -1348,7 +1407,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetAttributeNodeNS(ExecState* ex const UString& localName = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getAttributeNodeNS(namespaceURI, localName))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getAttributeNodeNS(namespaceURI, localName))); return result; } @@ -1504,7 +1563,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetElementsByClassName(ExecState const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getElementsByClassName(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getElementsByClassName(name))); return result; } @@ -1519,7 +1578,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionQuerySelector(ExecState* exec, J const UString& selectors = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->querySelector(selectors, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->querySelector(selectors, ec))); setDOMException(exec, ec); return result; } @@ -1535,7 +1594,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionQuerySelectorAll(ExecState* exec const UString& selectors = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->querySelectorAll(selectors, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->querySelectorAll(selectors, ec))); setDOMException(exec, ec); return result; } @@ -1549,7 +1608,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetClientRects(ExecState* exec, Element* imp = static_cast<Element*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getClientRects())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getClientRects())); return result; } @@ -1562,7 +1621,7 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetBoundingClientRect(ExecState* Element* imp = static_cast<Element*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getBoundingClientRect())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getBoundingClientRect())); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSElement.h b/src/3rdparty/webkit/WebCore/generated/JSElement.h index 36c81ac655..b7a27479e4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSElement.h @@ -33,7 +33,7 @@ class Element; class JSElement : public JSNode { typedef JSNode Base; public: - JSElement(PassRefPtr<JSC::Structure>, PassRefPtr<Element>); + JSElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Element>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -45,7 +45,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue setAttribute(JSC::ExecState*, const JSC::ArgList&); @@ -64,7 +64,7 @@ ALWAYS_INLINE bool JSElement::getOwnPropertySlot(JSC::ExecState* exec, const JSC } Element* toElement(JSC::JSValue); -JSC::JSValue toJSNewlyCreated(JSC::ExecState*, Element*); +JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Element*); class JSElementPrototype : public JSC::JSObject { typedef JSC::JSObject Base; diff --git a/src/3rdparty/webkit/WebCore/generated/JSEntity.cpp b/src/3rdparty/webkit/WebCore/generated/JSEntity.cpp index 4b354b05d8..3b519ceabb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEntity.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSEntity.cpp @@ -63,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSEntityConstructorTable = { 1, 0, JSEntityConstructorTableValues, 0 }; #endif -class JSEntityConstructor : public DOMObject { +class JSEntityConstructor : public DOMConstructorObject { public: - JSEntityConstructor(ExecState* exec) - : DOMObject(JSEntityConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSEntityConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSEntityConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSEntityPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSEntityPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -110,8 +110,8 @@ JSObject* JSEntityPrototype::self(ExecState* exec, JSGlobalObject* globalObject) const ClassInfo JSEntity::s_info = { "Entity", &JSNode::s_info, &JSEntityTable, 0 }; -JSEntity::JSEntity(PassRefPtr<Structure> structure, PassRefPtr<Entity> impl) - : JSNode(structure, impl) +JSEntity::JSEntity(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Entity> impl) + : JSNode(structure, globalObject, impl) { } @@ -127,32 +127,36 @@ bool JSEntity::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNam JSValue jsEntityPublicId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEntity* castedThis = static_cast<JSEntity*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Entity* imp = static_cast<Entity*>(static_cast<JSEntity*>(asObject(slot.slotBase()))->impl()); + Entity* imp = static_cast<Entity*>(castedThis->impl()); return jsStringOrNull(exec, imp->publicId()); } JSValue jsEntitySystemId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEntity* castedThis = static_cast<JSEntity*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Entity* imp = static_cast<Entity*>(static_cast<JSEntity*>(asObject(slot.slotBase()))->impl()); + Entity* imp = static_cast<Entity*>(castedThis->impl()); return jsStringOrNull(exec, imp->systemId()); } JSValue jsEntityNotationName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEntity* castedThis = static_cast<JSEntity*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Entity* imp = static_cast<Entity*>(static_cast<JSEntity*>(asObject(slot.slotBase()))->impl()); + Entity* imp = static_cast<Entity*>(castedThis->impl()); return jsStringOrNull(exec, imp->notationName()); } JSValue jsEntityConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSEntity*>(asObject(slot.slotBase()))->getConstructor(exec); + JSEntity* domObject = static_cast<JSEntity*>(asObject(slot.slotBase())); + return JSEntity::getConstructor(exec, domObject->globalObject()); } -JSValue JSEntity::getConstructor(ExecState* exec) +JSValue JSEntity::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSEntityConstructor>(exec); + return getDOMConstructor<JSEntityConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSEntity.h b/src/3rdparty/webkit/WebCore/generated/JSEntity.h index b54cf58226..323d70c2ea 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEntity.h +++ b/src/3rdparty/webkit/WebCore/generated/JSEntity.h @@ -30,7 +30,7 @@ class Entity; class JSEntity : public JSNode { typedef JSNode Base; public: - JSEntity(PassRefPtr<JSC::Structure>, PassRefPtr<Entity>); + JSEntity(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Entity>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp b/src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp index 1d6b6ff23f..5e18f07330 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp @@ -59,12 +59,12 @@ static JSC_CONST_HASHTABLE HashTable JSEntityReferenceConstructorTable = { 1, 0, JSEntityReferenceConstructorTableValues, 0 }; #endif -class JSEntityReferenceConstructor : public DOMObject { +class JSEntityReferenceConstructor : public DOMConstructorObject { public: - JSEntityReferenceConstructor(ExecState* exec) - : DOMObject(JSEntityReferenceConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSEntityReferenceConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSEntityReferenceConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSEntityReferencePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSEntityReferencePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -106,8 +106,8 @@ JSObject* JSEntityReferencePrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSEntityReference::s_info = { "EntityReference", &JSNode::s_info, &JSEntityReferenceTable, 0 }; -JSEntityReference::JSEntityReference(PassRefPtr<Structure> structure, PassRefPtr<EntityReference> impl) - : JSNode(structure, impl) +JSEntityReference::JSEntityReference(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<EntityReference> impl) + : JSNode(structure, globalObject, impl) { } @@ -123,11 +123,12 @@ bool JSEntityReference::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsEntityReferenceConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSEntityReference*>(asObject(slot.slotBase()))->getConstructor(exec); + JSEntityReference* domObject = static_cast<JSEntityReference*>(asObject(slot.slotBase())); + return JSEntityReference::getConstructor(exec, domObject->globalObject()); } -JSValue JSEntityReference::getConstructor(ExecState* exec) +JSValue JSEntityReference::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSEntityReferenceConstructor>(exec); + return getDOMConstructor<JSEntityReferenceConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSEntityReference.h b/src/3rdparty/webkit/WebCore/generated/JSEntityReference.h index 0c0957a7a2..261e2e9ae1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEntityReference.h +++ b/src/3rdparty/webkit/WebCore/generated/JSEntityReference.h @@ -30,7 +30,7 @@ class EntityReference; class JSEntityReference : public JSNode { typedef JSNode Base; public: - JSEntityReference(PassRefPtr<JSC::Structure>, PassRefPtr<EntityReference>); + JSEntityReference(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<EntityReference>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSErrorEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSErrorEvent.cpp new file mode 100644 index 0000000000..24bf5f2790 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSErrorEvent.cpp @@ -0,0 +1,203 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" + +#if ENABLE(WORKERS) + +#include "JSErrorEvent.h" + +#include "ErrorEvent.h" +#include "KURL.h" +#include <runtime/Error.h> +#include <runtime/JSNumberCell.h> +#include <runtime/JSString.h> +#include <wtf/GetPtr.h> + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSErrorEvent); + +/* Hash table */ + +static const HashTableValue JSErrorEventTableValues[5] = +{ + { "message", DontDelete|ReadOnly, (intptr_t)jsErrorEventMessage, (intptr_t)0 }, + { "filename", DontDelete|ReadOnly, (intptr_t)jsErrorEventFilename, (intptr_t)0 }, + { "lineno", DontDelete|ReadOnly, (intptr_t)jsErrorEventLineno, (intptr_t)0 }, + { "constructor", DontEnum|ReadOnly, (intptr_t)jsErrorEventConstructor, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSErrorEventTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 15, JSErrorEventTableValues, 0 }; +#else + { 9, 7, JSErrorEventTableValues, 0 }; +#endif + +/* Hash table for constructor */ + +static const HashTableValue JSErrorEventConstructorTableValues[1] = +{ + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSErrorEventConstructorTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSErrorEventConstructorTableValues, 0 }; +#else + { 1, 0, JSErrorEventConstructorTableValues, 0 }; +#endif + +class JSErrorEventConstructor : public DOMConstructorObject { +public: + JSErrorEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSErrorEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) + { + putDirect(exec->propertyNames().prototype, JSErrorEventPrototype::self(exec, globalObject), None); + } + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual const ClassInfo* classInfo() const { return &s_info; } + static const ClassInfo s_info; + + static PassRefPtr<Structure> createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); + } +}; + +const ClassInfo JSErrorEventConstructor::s_info = { "ErrorEventConstructor", 0, &JSErrorEventConstructorTable, 0 }; + +bool JSErrorEventConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSErrorEventConstructor, DOMObject>(exec, &JSErrorEventConstructorTable, this, propertyName, slot); +} + +/* Hash table for prototype */ + +static const HashTableValue JSErrorEventPrototypeTableValues[2] = +{ + { "initErrorEvent", DontDelete|Function, (intptr_t)jsErrorEventPrototypeFunctionInitErrorEvent, (intptr_t)6 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSErrorEventPrototypeTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSErrorEventPrototypeTableValues, 0 }; +#else + { 2, 1, JSErrorEventPrototypeTableValues, 0 }; +#endif + +static const HashTable* getJSErrorEventPrototypeTable(ExecState* exec) +{ + return getHashTableForGlobalData(exec->globalData(), &JSErrorEventPrototypeTable); +} +const ClassInfo JSErrorEventPrototype::s_info = { "ErrorEventPrototype", 0, 0, getJSErrorEventPrototypeTable }; + +JSObject* JSErrorEventPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype<JSErrorEvent>(exec, globalObject); +} + +bool JSErrorEventPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot<JSObject>(exec, getJSErrorEventPrototypeTable(exec), this, propertyName, slot); +} + +static const HashTable* getJSErrorEventTable(ExecState* exec) +{ + return getHashTableForGlobalData(exec->globalData(), &JSErrorEventTable); +} +const ClassInfo JSErrorEvent::s_info = { "ErrorEvent", &JSEvent::s_info, 0, getJSErrorEventTable }; + +JSErrorEvent::JSErrorEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ErrorEvent> impl) + : JSEvent(structure, globalObject, impl) +{ +} + +JSObject* JSErrorEvent::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSErrorEventPrototype(JSErrorEventPrototype::createStructure(JSEventPrototype::self(exec, globalObject))); +} + +bool JSErrorEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSErrorEvent, Base>(exec, getJSErrorEventTable(exec), this, propertyName, slot); +} + +JSValue jsErrorEventMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSErrorEvent* castedThis = static_cast<JSErrorEvent*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + ErrorEvent* imp = static_cast<ErrorEvent*>(castedThis->impl()); + return jsString(exec, imp->message()); +} + +JSValue jsErrorEventFilename(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSErrorEvent* castedThis = static_cast<JSErrorEvent*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + ErrorEvent* imp = static_cast<ErrorEvent*>(castedThis->impl()); + return jsString(exec, imp->filename()); +} + +JSValue jsErrorEventLineno(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSErrorEvent* castedThis = static_cast<JSErrorEvent*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + ErrorEvent* imp = static_cast<ErrorEvent*>(castedThis->impl()); + return jsNumber(exec, imp->lineno()); +} + +JSValue jsErrorEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSErrorEvent* domObject = static_cast<JSErrorEvent*>(asObject(slot.slotBase())); + return JSErrorEvent::getConstructor(exec, domObject->globalObject()); +} +JSValue JSErrorEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor<JSErrorEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); +} + +JSValue JSC_HOST_CALL jsErrorEventPrototypeFunctionInitErrorEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSErrorEvent::s_info)) + return throwError(exec, TypeError); + JSErrorEvent* castedThisObj = static_cast<JSErrorEvent*>(asObject(thisValue)); + ErrorEvent* imp = static_cast<ErrorEvent*>(castedThisObj->impl()); + const UString& typeArg = args.at(0).toString(exec); + bool canBubbleArg = args.at(1).toBoolean(exec); + bool cancelableArg = args.at(2).toBoolean(exec); + const UString& messageArg = args.at(3).toString(exec); + const UString& filenameArg = args.at(4).toString(exec); + unsigned linenoArg = args.at(5).toInt32(exec); + + imp->initErrorEvent(typeArg, canBubbleArg, cancelableArg, messageArg, filenameArg, linenoArg); + return jsUndefined(); +} + + +} + +#endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/generated/JSErrorEvent.h b/src/3rdparty/webkit/WebCore/generated/JSErrorEvent.h new file mode 100644 index 0000000000..bcf57dedde --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSErrorEvent.h @@ -0,0 +1,78 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef JSErrorEvent_h +#define JSErrorEvent_h + +#if ENABLE(WORKERS) + +#include "JSEvent.h" + +namespace WebCore { + +class ErrorEvent; + +class JSErrorEvent : public JSEvent { + typedef JSEvent Base; +public: + JSErrorEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<ErrorEvent>); + static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); +}; + + +class JSErrorEventPrototype : public JSC::JSObject { + typedef JSC::JSObject Base; +public: + static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + JSErrorEventPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { } +}; + +// Functions + +JSC::JSValue JSC_HOST_CALL jsErrorEventPrototypeFunctionInitErrorEvent(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +// Attributes + +JSC::JSValue jsErrorEventMessage(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +JSC::JSValue jsErrorEventFilename(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +JSC::JSValue jsErrorEventLineno(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +JSC::JSValue jsErrorEventConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); + +} // namespace WebCore + +#endif // ENABLE(WORKERS) + +#endif diff --git a/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp index 550db25834..58865e0ead 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp @@ -95,12 +95,12 @@ static JSC_CONST_HASHTABLE HashTable JSEventConstructorTable = { 68, 63, JSEventConstructorTableValues, 0 }; #endif -class JSEventConstructor : public DOMObject { +class JSEventConstructor : public DOMConstructorObject { public: - JSEventConstructor(ExecState* exec) - : DOMObject(JSEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -177,8 +177,8 @@ static const HashTable* getJSEventTable(ExecState* exec) } const ClassInfo JSEvent::s_info = { "Event", 0, 0, getJSEventTable }; -JSEvent::JSEvent(PassRefPtr<Structure> structure, PassRefPtr<Event> impl) - : DOMObject(structure) +JSEvent::JSEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Event> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -200,82 +200,94 @@ bool JSEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName JSValue jsEventType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); + Event* imp = static_cast<Event*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsEventTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->target())); + Event* imp = static_cast<Event*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->target())); } JSValue jsEventCurrentTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->currentTarget())); + Event* imp = static_cast<Event*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->currentTarget())); } JSValue jsEventEventPhase(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); + Event* imp = static_cast<Event*>(castedThis->impl()); return jsNumber(exec, imp->eventPhase()); } JSValue jsEventBubbles(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); + Event* imp = static_cast<Event*>(castedThis->impl()); return jsBoolean(imp->bubbles()); } JSValue jsEventCancelable(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); + Event* imp = static_cast<Event*>(castedThis->impl()); return jsBoolean(imp->cancelable()); } JSValue jsEventTimeStamp(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); + Event* imp = static_cast<Event*>(castedThis->impl()); return jsNumber(exec, imp->timeStamp()); } JSValue jsEventSrcElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->srcElement())); + Event* imp = static_cast<Event*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->srcElement())); } JSValue jsEventReturnValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); + Event* imp = static_cast<Event*>(castedThis->impl()); return jsBoolean(imp->returnValue()); } JSValue jsEventCancelBubble(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Event* imp = static_cast<Event*>(static_cast<JSEvent*>(asObject(slot.slotBase()))->impl()); + Event* imp = static_cast<Event*>(castedThis->impl()); return jsBoolean(imp->cancelBubble()); } JSValue jsEventClipboardData(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSEvent*>(asObject(slot.slotBase()))->clipboardData(exec); + JSEvent* castedThis = static_cast<JSEvent*>(asObject(slot.slotBase())); + return castedThis->clipboardData(exec); } JSValue jsEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSEvent* domObject = static_cast<JSEvent*>(asObject(slot.slotBase())); + return JSEvent::getConstructor(exec, domObject->globalObject()); } void JSEvent::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -294,9 +306,9 @@ void setJSEventCancelBubble(ExecState* exec, JSObject* thisObject, JSValue value imp->setCancelBubble(value.toBoolean(exec)); } -JSValue JSEvent::getConstructor(ExecState* exec) +JSValue JSEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSEventConstructor>(exec); + return getDOMConstructor<JSEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsEventPrototypeFunctionStopPropagation(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSEvent.h b/src/3rdparty/webkit/WebCore/generated/JSEvent.h index 281010bee3..f56b8892fa 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSEvent.h @@ -21,6 +21,7 @@ #ifndef JSEvent_h #define JSEvent_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Event; -class JSEvent : public DOMObject { - typedef DOMObject Base; +class JSEvent : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSEvent(PassRefPtr<JSC::Structure>, PassRefPtr<Event>); + JSEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Event>); virtual ~JSEvent(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -45,7 +46,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes JSC::JSValue clipboardData(JSC::ExecState*) const; @@ -55,7 +56,7 @@ private: RefPtr<Event> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Event*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Event*); Event* toEvent(JSC::JSValue); class JSEventPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp b/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp index 1c39ced46c..b92465a9ce 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSEventExceptionConstructorTable = { 2, 1, JSEventExceptionConstructorTableValues, 0 }; #endif -class JSEventExceptionConstructor : public DOMObject { +class JSEventExceptionConstructor : public DOMConstructorObject { public: - JSEventExceptionConstructor(ExecState* exec) - : DOMObject(JSEventExceptionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSEventExceptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSEventExceptionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSEventExceptionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSEventExceptionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -129,8 +129,8 @@ static const HashTable* getJSEventExceptionTable(ExecState* exec) } const ClassInfo JSEventException::s_info = { "EventException", 0, 0, getJSEventExceptionTable }; -JSEventException::JSEventException(PassRefPtr<Structure> structure, PassRefPtr<EventException> impl) - : DOMObject(structure) +JSEventException::JSEventException(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<EventException> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -152,32 +152,36 @@ bool JSEventException::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsEventExceptionCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEventException* castedThis = static_cast<JSEventException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - EventException* imp = static_cast<EventException*>(static_cast<JSEventException*>(asObject(slot.slotBase()))->impl()); + EventException* imp = static_cast<EventException*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsEventExceptionName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEventException* castedThis = static_cast<JSEventException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - EventException* imp = static_cast<EventException*>(static_cast<JSEventException*>(asObject(slot.slotBase()))->impl()); + EventException* imp = static_cast<EventException*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsEventExceptionMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSEventException* castedThis = static_cast<JSEventException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - EventException* imp = static_cast<EventException*>(static_cast<JSEventException*>(asObject(slot.slotBase()))->impl()); + EventException* imp = static_cast<EventException*>(castedThis->impl()); return jsString(exec, imp->message()); } JSValue jsEventExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSEventException*>(asObject(slot.slotBase()))->getConstructor(exec); + JSEventException* domObject = static_cast<JSEventException*>(asObject(slot.slotBase())); + return JSEventException::getConstructor(exec, domObject->globalObject()); } -JSValue JSEventException::getConstructor(ExecState* exec) +JSValue JSEventException::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSEventExceptionConstructor>(exec); + return getDOMConstructor<JSEventExceptionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsEventExceptionPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -200,9 +204,9 @@ JSValue jsEventExceptionUNSPECIFIED_EVENT_TYPE_ERR(ExecState* exec, const Identi return jsNumber(exec, static_cast<int>(0)); } -JSC::JSValue toJS(JSC::ExecState* exec, EventException* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, EventException* object) { - return getDOMObjectWrapper<JSEventException>(exec, object); + return getDOMObjectWrapper<JSEventException>(exec, globalObject, object); } EventException* toEventException(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSEventException.h b/src/3rdparty/webkit/WebCore/generated/JSEventException.h index bc71abe9e4..433e440cef 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEventException.h +++ b/src/3rdparty/webkit/WebCore/generated/JSEventException.h @@ -21,6 +21,7 @@ #ifndef JSEventException_h #define JSEventException_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class EventException; -class JSEventException : public DOMObject { - typedef DOMObject Base; +class JSEventException : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSEventException(PassRefPtr<JSC::Structure>, PassRefPtr<EventException>); + JSEventException(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<EventException>); virtual ~JSEventException(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); EventException* impl() const { return m_impl.get(); } private: RefPtr<EventException> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, EventException*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, EventException*); EventException* toEventException(JSC::JSValue); class JSEventExceptionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSFile.cpp b/src/3rdparty/webkit/WebCore/generated/JSFile.cpp index 923e24b69f..86c9f1f9e2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSFile.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSFile.cpp @@ -64,12 +64,12 @@ static JSC_CONST_HASHTABLE HashTable JSFileConstructorTable = { 1, 0, JSFileConstructorTableValues, 0 }; #endif -class JSFileConstructor : public DOMObject { +class JSFileConstructor : public DOMConstructorObject { public: - JSFileConstructor(ExecState* exec) - : DOMObject(JSFileConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSFileConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSFileConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSFilePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSFilePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -111,8 +111,8 @@ JSObject* JSFilePrototype::self(ExecState* exec, JSGlobalObject* globalObject) const ClassInfo JSFile::s_info = { "File", 0, &JSFileTable, 0 }; -JSFile::JSFile(PassRefPtr<Structure> structure, PassRefPtr<File> impl) - : DOMObject(structure) +JSFile::JSFile(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<File> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -134,30 +134,33 @@ bool JSFile::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, JSValue jsFileFileName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSFile* castedThis = static_cast<JSFile*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - File* imp = static_cast<File*>(static_cast<JSFile*>(asObject(slot.slotBase()))->impl()); + File* imp = static_cast<File*>(castedThis->impl()); return jsString(exec, imp->fileName()); } JSValue jsFileFileSize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSFile* castedThis = static_cast<JSFile*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - File* imp = static_cast<File*>(static_cast<JSFile*>(asObject(slot.slotBase()))->impl()); + File* imp = static_cast<File*>(castedThis->impl()); return jsNumber(exec, imp->fileSize()); } JSValue jsFileConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSFile*>(asObject(slot.slotBase()))->getConstructor(exec); + JSFile* domObject = static_cast<JSFile*>(asObject(slot.slotBase())); + return JSFile::getConstructor(exec, domObject->globalObject()); } -JSValue JSFile::getConstructor(ExecState* exec) +JSValue JSFile::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSFileConstructor>(exec); + return getDOMConstructor<JSFileConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } -JSC::JSValue toJS(JSC::ExecState* exec, File* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, File* object) { - return getDOMObjectWrapper<JSFile>(exec, object); + return getDOMObjectWrapper<JSFile>(exec, globalObject, object); } File* toFile(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSFile.h b/src/3rdparty/webkit/WebCore/generated/JSFile.h index efa4744a09..afeaaf5962 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSFile.h +++ b/src/3rdparty/webkit/WebCore/generated/JSFile.h @@ -21,6 +21,7 @@ #ifndef JSFile_h #define JSFile_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class File; -class JSFile : public DOMObject { - typedef DOMObject Base; +class JSFile : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSFile(PassRefPtr<JSC::Structure>, PassRefPtr<File>); + JSFile(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<File>); virtual ~JSFile(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); File* impl() const { return m_impl.get(); } private: RefPtr<File> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, File*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, File*); File* toFile(JSC::JSValue); class JSFilePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp b/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp index 9d14098500..e359c6953d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSFileListConstructorTable = { 1, 0, JSFileListConstructorTableValues, 0 }; #endif -class JSFileListConstructor : public DOMObject { +class JSFileListConstructor : public DOMConstructorObject { public: - JSFileListConstructor(ExecState* exec) - : DOMObject(JSFileListConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSFileListConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSFileListConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSFileListPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSFileListPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -119,8 +119,8 @@ bool JSFileListPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSFileList::s_info = { "FileList", 0, &JSFileListTable, 0 }; -JSFileList::JSFileList(PassRefPtr<Structure> structure, PassRefPtr<FileList> impl) - : DOMObject(structure) +JSFileList::JSFileList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<FileList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -162,14 +162,16 @@ bool JSFileList::getOwnPropertySlot(ExecState* exec, unsigned propertyName, Prop JSValue jsFileListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSFileList* castedThis = static_cast<JSFileList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - FileList* imp = static_cast<FileList*>(static_cast<JSFileList*>(asObject(slot.slotBase()))->impl()); + FileList* imp = static_cast<FileList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsFileListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSFileList*>(asObject(slot.slotBase()))->getConstructor(exec); + JSFileList* domObject = static_cast<JSFileList*>(asObject(slot.slotBase())); + return JSFileList::getConstructor(exec, domObject->globalObject()); } void JSFileList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -178,9 +180,9 @@ void JSFileList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNa Base::getPropertyNames(exec, propertyNames); } -JSValue JSFileList::getConstructor(ExecState* exec) +JSValue JSFileList::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSFileListConstructor>(exec); + return getDOMConstructor<JSFileListConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsFileListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -197,7 +199,7 @@ JSValue JSC_HOST_CALL jsFileListPrototypeFunctionItem(ExecState* exec, JSObject* } - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -205,11 +207,11 @@ JSValue JSC_HOST_CALL jsFileListPrototypeFunctionItem(ExecState* exec, JSObject* JSValue JSFileList::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSFileList* thisObj = static_cast<JSFileList*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<FileList*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<FileList*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, FileList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, FileList* object) { - return getDOMObjectWrapper<JSFileList>(exec, object); + return getDOMObjectWrapper<JSFileList>(exec, globalObject, object); } FileList* toFileList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSFileList.h b/src/3rdparty/webkit/WebCore/generated/JSFileList.h index 4a7075d2ab..43cac56980 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSFileList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSFileList.h @@ -21,6 +21,7 @@ #ifndef JSFileList_h #define JSFileList_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class FileList; -class JSFileList : public DOMObject { - typedef DOMObject Base; +class JSFileList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSFileList(PassRefPtr<JSC::Structure>, PassRefPtr<FileList>); + JSFileList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<FileList>); virtual ~JSFileList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); FileList* impl() const { return m_impl.get(); } private: @@ -54,7 +55,7 @@ private: static JSC::JSValue indexGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, FileList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, FileList*); FileList* toFileList(JSC::JSValue); class JSFileListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp index 104d781a72..481852c7e1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp @@ -79,8 +79,8 @@ bool JSGeolocationPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSGeolocation::s_info = { "Geolocation", 0, &JSGeolocationTable, 0 }; -JSGeolocation::JSGeolocation(PassRefPtr<Structure> structure, PassRefPtr<Geolocation> impl) - : DOMObject(structure) +JSGeolocation::JSGeolocation(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Geolocation> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -102,9 +102,10 @@ bool JSGeolocation::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsGeolocationLastPosition(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSGeolocation* castedThis = static_cast<JSGeolocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Geolocation* imp = static_cast<Geolocation*>(static_cast<JSGeolocation*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->lastPosition())); + Geolocation* imp = static_cast<Geolocation*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->lastPosition())); } JSValue JSC_HOST_CALL jsGeolocationPrototypeFunctionGetCurrentPosition(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -138,9 +139,9 @@ JSValue JSC_HOST_CALL jsGeolocationPrototypeFunctionClearWatch(ExecState* exec, return jsUndefined(); } -JSC::JSValue toJS(JSC::ExecState* exec, Geolocation* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Geolocation* object) { - return getDOMObjectWrapper<JSGeolocation>(exec, object); + return getDOMObjectWrapper<JSGeolocation>(exec, globalObject, object); } Geolocation* toGeolocation(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.h b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.h index 736d019817..38af988a27 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.h +++ b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.h @@ -21,6 +21,7 @@ #ifndef JSGeolocation_h #define JSGeolocation_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Geolocation; -class JSGeolocation : public DOMObject { - typedef DOMObject Base; +class JSGeolocation : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSGeolocation(PassRefPtr<JSC::Structure>, PassRefPtr<Geolocation>); + JSGeolocation(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Geolocation>); virtual ~JSGeolocation(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -54,7 +55,7 @@ private: RefPtr<Geolocation> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Geolocation*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Geolocation*); Geolocation* toGeolocation(JSC::JSValue); class JSGeolocationPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp b/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp index b8721716d1..348f0a54f7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp @@ -81,8 +81,8 @@ bool JSGeopositionPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSGeoposition::s_info = { "Geoposition", 0, &JSGeopositionTable, 0 }; -JSGeoposition::JSGeoposition(PassRefPtr<Structure> structure, PassRefPtr<Geoposition> impl) - : DOMObject(structure) +JSGeoposition::JSGeoposition(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Geoposition> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -104,15 +104,17 @@ bool JSGeoposition::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsGeopositionCoords(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSGeoposition* castedThis = static_cast<JSGeoposition*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Geoposition* imp = static_cast<Geoposition*>(static_cast<JSGeoposition*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->coords())); + Geoposition* imp = static_cast<Geoposition*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->coords())); } JSValue jsGeopositionTimestamp(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSGeoposition* castedThis = static_cast<JSGeoposition*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Geoposition* imp = static_cast<Geoposition*>(static_cast<JSGeoposition*>(asObject(slot.slotBase()))->impl()); + Geoposition* imp = static_cast<Geoposition*>(castedThis->impl()); return jsNumber(exec, imp->timestamp()); } @@ -129,9 +131,9 @@ JSValue JSC_HOST_CALL jsGeopositionPrototypeFunctionToString(ExecState* exec, JS return result; } -JSC::JSValue toJS(JSC::ExecState* exec, Geoposition* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Geoposition* object) { - return getDOMObjectWrapper<JSGeoposition>(exec, object); + return getDOMObjectWrapper<JSGeoposition>(exec, globalObject, object); } Geoposition* toGeoposition(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeoposition.h b/src/3rdparty/webkit/WebCore/generated/JSGeoposition.h index 200bb6e0dc..8d5a2ba7fd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSGeoposition.h +++ b/src/3rdparty/webkit/WebCore/generated/JSGeoposition.h @@ -21,6 +21,7 @@ #ifndef JSGeoposition_h #define JSGeoposition_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Geoposition; -class JSGeoposition : public DOMObject { - typedef DOMObject Base; +class JSGeoposition : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSGeoposition(PassRefPtr<JSC::Structure>, PassRefPtr<Geoposition>); + JSGeoposition(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Geoposition>); virtual ~JSGeoposition(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -50,7 +51,7 @@ private: RefPtr<Geoposition> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Geoposition*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Geoposition*); Geoposition* toGeoposition(JSC::JSValue); class JSGeopositionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp index a9bbfcaaf4..1e301465ae 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp @@ -22,6 +22,7 @@ #include "JSHTMLAnchorElement.h" #include "HTMLAnchorElement.h" +#include "HTMLNames.h" #include "KURL.h" #include <runtime/Error.h> #include <runtime/JSString.h> @@ -81,12 +82,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLAnchorElementConstructorTable = { 1, 0, JSHTMLAnchorElementConstructorTableValues, 0 }; #endif -class JSHTMLAnchorElementConstructor : public DOMObject { +class JSHTMLAnchorElementConstructor : public DOMConstructorObject { public: - JSHTMLAnchorElementConstructor(ExecState* exec) - : DOMObject(JSHTMLAnchorElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLAnchorElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLAnchorElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLAnchorElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLAnchorElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -134,8 +135,8 @@ bool JSHTMLAnchorElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSHTMLAnchorElement::s_info = { "HTMLAnchorElement", &JSHTMLElement::s_info, &JSHTMLAnchorElementTable, 0 }; -JSHTMLAnchorElement::JSHTMLAnchorElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLAnchorElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLAnchorElement::JSHTMLAnchorElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLAnchorElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -151,140 +152,160 @@ bool JSHTMLAnchorElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLAnchorElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->accessKey()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::accesskeyAttr)); } JSValue jsHTMLAnchorElementCharset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->charset()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::charsetAttr)); } JSValue jsHTMLAnchorElementCoords(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->coords()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::coordsAttr)); } JSValue jsHTMLAnchorElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->href()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getURLAttribute(HTMLNames::hrefAttr)); } JSValue jsHTMLAnchorElementHreflang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->hreflang()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::hreflangAttr)); } JSValue jsHTMLAnchorElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->name()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::nameAttr)); } JSValue jsHTMLAnchorElementRel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->rel()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::relAttr)); } JSValue jsHTMLAnchorElementRev(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->rev()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::revAttr)); } JSValue jsHTMLAnchorElementShape(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->shape()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::shapeAttr)); } JSValue jsHTMLAnchorElementTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->target()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::targetAttr)); } JSValue jsHTMLAnchorElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->type()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::typeAttr)); } JSValue jsHTMLAnchorElementHash(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); return jsString(exec, imp->hash()); } JSValue jsHTMLAnchorElementHost(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); return jsString(exec, imp->host()); } JSValue jsHTMLAnchorElementHostname(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); return jsString(exec, imp->hostname()); } JSValue jsHTMLAnchorElementPathname(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); return jsString(exec, imp->pathname()); } JSValue jsHTMLAnchorElementPort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); return jsString(exec, imp->port()); } JSValue jsHTMLAnchorElementProtocol(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); return jsString(exec, imp->protocol()); } JSValue jsHTMLAnchorElementSearch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); return jsString(exec, imp->search()); } JSValue jsHTMLAnchorElementText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAnchorElement* castedThis = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->impl()); + HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(castedThis->impl()); return jsString(exec, imp->text()); } JSValue jsHTMLAnchorElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLAnchorElement* domObject = static_cast<JSHTMLAnchorElement*>(asObject(slot.slotBase())); + return JSHTMLAnchorElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLAnchorElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -294,72 +315,72 @@ void JSHTMLAnchorElement::put(ExecState* exec, const Identifier& propertyName, J void setJSHTMLAnchorElementAccessKey(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setAccessKey(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::accesskeyAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementCharset(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setCharset(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::charsetAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementCoords(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setCoords(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::coordsAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementHref(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setHref(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::hrefAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementHreflang(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setHreflang(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::hreflangAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementName(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setName(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::nameAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementRel(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setRel(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::relAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementRev(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setRev(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::revAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementShape(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setShape(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::shapeAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementTarget(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setTarget(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::targetAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAnchorElementType(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAnchorElement* imp = static_cast<HTMLAnchorElement*>(static_cast<JSHTMLAnchorElement*>(thisObject)->impl()); - imp->setType(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLAnchorElement::getConstructor(ExecState* exec) +JSValue JSHTMLAnchorElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLAnchorElementConstructor>(exec); + return getDOMConstructor<JSHTMLAnchorElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLAnchorElementPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.h index b7864c41c3..e9a99b3be1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.h @@ -30,7 +30,7 @@ class HTMLAnchorElement; class JSHTMLAnchorElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLAnchorElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLAnchorElement>); + JSHTMLAnchorElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLAnchorElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp index 4fe98d6e67..8731f25cfe 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp @@ -23,6 +23,7 @@ #include "AtomicString.h" #include "HTMLAppletElement.h" +#include "HTMLNames.h" #include "JSHTMLAppletElementCustom.h" #include "KURL.h" #include <runtime/JSString.h> @@ -74,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLAppletElementConstructorTable = { 1, 0, JSHTMLAppletElementConstructorTableValues, 0 }; #endif -class JSHTMLAppletElementConstructor : public DOMObject { +class JSHTMLAppletElementConstructor : public DOMConstructorObject { public: - JSHTMLAppletElementConstructor(ExecState* exec) - : DOMObject(JSHTMLAppletElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLAppletElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLAppletElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLAppletElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLAppletElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -121,8 +122,8 @@ JSObject* JSHTMLAppletElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSHTMLAppletElement::s_info = { "HTMLAppletElement", &JSHTMLElement::s_info, &JSHTMLAppletElementTable, 0 }; -JSHTMLAppletElement::JSHTMLAppletElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLAppletElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLAppletElement::JSHTMLAppletElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLAppletElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -144,84 +145,96 @@ bool JSHTMLAppletElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLAppletElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->align()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::alignAttr)); } JSValue jsHTMLAppletElementAlt(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->alt()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::altAttr)); } JSValue jsHTMLAppletElementArchive(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->archive()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::archiveAttr)); } JSValue jsHTMLAppletElementCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->code()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::codeAttr)); } JSValue jsHTMLAppletElementCodeBase(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->codeBase()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::codebaseAttr)); } JSValue jsHTMLAppletElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->height()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::heightAttr)); } JSValue jsHTMLAppletElementHspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->hspace()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::hspaceAttr)); } JSValue jsHTMLAppletElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->name()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::nameAttr)); } JSValue jsHTMLAppletElementObject(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->object()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::objectAttr)); } JSValue jsHTMLAppletElementVspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->vspace()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::vspaceAttr)); } JSValue jsHTMLAppletElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAppletElement* castedThis = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->width()); + HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::widthAttr)); } JSValue jsHTMLAppletElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLAppletElement* domObject = static_cast<JSHTMLAppletElement*>(asObject(slot.slotBase())); + return JSHTMLAppletElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLAppletElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -233,72 +246,72 @@ void JSHTMLAppletElement::put(ExecState* exec, const Identifier& propertyName, J void setJSHTMLAppletElementAlign(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setAlign(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::alignAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementAlt(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setAlt(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::altAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementArchive(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setArchive(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::archiveAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementCode(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setCode(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::codeAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementCodeBase(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setCodeBase(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::codebaseAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementHeight(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setHeight(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::heightAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementHspace(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setHspace(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::hspaceAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementName(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setName(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::nameAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementObject(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setObject(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::objectAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementVspace(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setVspace(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::vspaceAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAppletElementWidth(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAppletElement* imp = static_cast<HTMLAppletElement*>(static_cast<JSHTMLAppletElement*>(thisObject)->impl()); - imp->setWidth(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLAppletElement::getConstructor(ExecState* exec) +JSValue JSHTMLAppletElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLAppletElementConstructor>(exec); + return getDOMConstructor<JSHTMLAppletElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.h index 0ebfc7b531..256bfb6eac 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.h @@ -31,7 +31,7 @@ class HTMLAppletElement; class JSHTMLAppletElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLAppletElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLAppletElement>); + JSHTMLAppletElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLAppletElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); @@ -47,7 +47,7 @@ public: virtual JSC::CallType getCallData(JSC::CallData&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); private: static bool canGetItemsForName(JSC::ExecState*, HTMLAppletElement*, const JSC::Identifier&); static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp index f78a54bf5e..5fa1204149 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp @@ -22,6 +22,7 @@ #include "JSHTMLAreaElement.h" #include "HTMLAreaElement.h" +#include "HTMLNames.h" #include "KURL.h" #include <runtime/JSString.h> #include <wtf/GetPtr.h> @@ -75,12 +76,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLAreaElementConstructorTable = { 1, 0, JSHTMLAreaElementConstructorTableValues, 0 }; #endif -class JSHTMLAreaElementConstructor : public DOMObject { +class JSHTMLAreaElementConstructor : public DOMConstructorObject { public: - JSHTMLAreaElementConstructor(ExecState* exec) - : DOMObject(JSHTMLAreaElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLAreaElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLAreaElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLAreaElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLAreaElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -122,8 +123,8 @@ JSObject* JSHTMLAreaElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLAreaElement::s_info = { "HTMLAreaElement", &JSHTMLElement::s_info, &JSHTMLAreaElementTable, 0 }; -JSHTMLAreaElement::JSHTMLAreaElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLAreaElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLAreaElement::JSHTMLAreaElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLAreaElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -139,105 +140,120 @@ bool JSHTMLAreaElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLAreaElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->accessKey()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::accesskeyAttr)); } JSValue jsHTMLAreaElementAlt(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->alt()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::altAttr)); } JSValue jsHTMLAreaElementCoords(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->coords()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::coordsAttr)); } JSValue jsHTMLAreaElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->href()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); + return jsString(exec, imp->getURLAttribute(HTMLNames::hrefAttr)); } JSValue jsHTMLAreaElementNoHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); return jsBoolean(imp->noHref()); } JSValue jsHTMLAreaElementShape(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->shape()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::shapeAttr)); } JSValue jsHTMLAreaElementTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->target()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::targetAttr)); } JSValue jsHTMLAreaElementHash(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); return jsString(exec, imp->hash()); } JSValue jsHTMLAreaElementHost(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); return jsString(exec, imp->host()); } JSValue jsHTMLAreaElementHostname(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); return jsString(exec, imp->hostname()); } JSValue jsHTMLAreaElementPathname(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); return jsString(exec, imp->pathname()); } JSValue jsHTMLAreaElementPort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); return jsString(exec, imp->port()); } JSValue jsHTMLAreaElementProtocol(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); return jsString(exec, imp->protocol()); } JSValue jsHTMLAreaElementSearch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLAreaElement* castedThis = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(castedThis->impl()); return jsString(exec, imp->search()); } JSValue jsHTMLAreaElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLAreaElement* domObject = static_cast<JSHTMLAreaElement*>(asObject(slot.slotBase())); + return JSHTMLAreaElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLAreaElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -247,25 +263,25 @@ void JSHTMLAreaElement::put(ExecState* exec, const Identifier& propertyName, JSV void setJSHTMLAreaElementAccessKey(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(thisObject)->impl()); - imp->setAccessKey(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::accesskeyAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAreaElementAlt(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(thisObject)->impl()); - imp->setAlt(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::altAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAreaElementCoords(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(thisObject)->impl()); - imp->setCoords(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::coordsAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAreaElementHref(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(thisObject)->impl()); - imp->setHref(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::hrefAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAreaElementNoHref(ExecState* exec, JSObject* thisObject, JSValue value) @@ -277,18 +293,18 @@ void setJSHTMLAreaElementNoHref(ExecState* exec, JSObject* thisObject, JSValue v void setJSHTMLAreaElementShape(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(thisObject)->impl()); - imp->setShape(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::shapeAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLAreaElementTarget(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLAreaElement* imp = static_cast<HTMLAreaElement*>(static_cast<JSHTMLAreaElement*>(thisObject)->impl()); - imp->setTarget(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::targetAttr, valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLAreaElement::getConstructor(ExecState* exec) +JSValue JSHTMLAreaElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLAreaElementConstructor>(exec); + return getDOMConstructor<JSHTMLAreaElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.h index 9d2d8fcfd0..4b430210b7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.h @@ -30,7 +30,7 @@ class HTMLAreaElement; class JSHTMLAreaElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLAreaElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLAreaElement>); + JSHTMLAreaElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLAreaElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp index a2fbfce1ae..6c8ae85e51 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementConstructorTable = { 1, 0, JSHTMLAudioElementConstructorTableValues, 0 }; #endif -class JSHTMLAudioElementConstructor : public DOMObject { +class JSHTMLAudioElementConstructor : public DOMConstructorObject { public: - JSHTMLAudioElementConstructor(ExecState* exec) - : DOMObject(JSHTMLAudioElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLAudioElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLAudioElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLAudioElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLAudioElement::s_info = { "HTMLAudioElement", &JSHTMLMediaElement::s_info, &JSHTMLAudioElementTable, 0 }; -JSHTMLAudioElement::JSHTMLAudioElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLAudioElement> impl) - : JSHTMLMediaElement(structure, impl) +JSHTMLAudioElement::JSHTMLAudioElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLAudioElement> impl) + : JSHTMLMediaElement(structure, globalObject, impl) { } @@ -126,11 +126,12 @@ bool JSHTMLAudioElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLAudioElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLAudioElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLAudioElement* domObject = static_cast<JSHTMLAudioElement*>(asObject(slot.slotBase())); + return JSHTMLAudioElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSHTMLAudioElement::getConstructor(ExecState* exec) +JSValue JSHTMLAudioElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLAudioElementConstructor>(exec); + return getDOMConstructor<JSHTMLAudioElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.h index cea0209b9c..bb3e51d595 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.h @@ -32,7 +32,7 @@ class HTMLAudioElement; class JSHTMLAudioElement : public JSHTMLMediaElement { typedef JSHTMLMediaElement Base; public: - JSHTMLAudioElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLAudioElement>); + JSHTMLAudioElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLAudioElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -43,7 +43,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp index 2a43e6ca69..3cac476cf1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp @@ -22,6 +22,7 @@ #include "JSHTMLBRElement.h" #include "HTMLBRElement.h" +#include "HTMLNames.h" #include "KURL.h" #include <runtime/JSString.h> #include <wtf/GetPtr.h> @@ -62,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLBRElementConstructorTable = { 1, 0, JSHTMLBRElementConstructorTableValues, 0 }; #endif -class JSHTMLBRElementConstructor : public DOMObject { +class JSHTMLBRElementConstructor : public DOMConstructorObject { public: - JSHTMLBRElementConstructor(ExecState* exec) - : DOMObject(JSHTMLBRElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLBRElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLBRElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLBRElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLBRElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +110,8 @@ JSObject* JSHTMLBRElementPrototype::self(ExecState* exec, JSGlobalObject* global const ClassInfo JSHTMLBRElement::s_info = { "HTMLBRElement", &JSHTMLElement::s_info, &JSHTMLBRElementTable, 0 }; -JSHTMLBRElement::JSHTMLBRElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLBRElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLBRElement::JSHTMLBRElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBRElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +127,16 @@ bool JSHTMLBRElement::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsHTMLBRElementClear(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBRElement* castedThis = static_cast<JSHTMLBRElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBRElement* imp = static_cast<HTMLBRElement*>(static_cast<JSHTMLBRElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->clear()); + HTMLBRElement* imp = static_cast<HTMLBRElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::clearAttr)); } JSValue jsHTMLBRElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLBRElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLBRElement* domObject = static_cast<JSHTMLBRElement*>(asObject(slot.slotBase())); + return JSHTMLBRElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLBRElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -143,12 +146,12 @@ void JSHTMLBRElement::put(ExecState* exec, const Identifier& propertyName, JSVal void setJSHTMLBRElementClear(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBRElement* imp = static_cast<HTMLBRElement*>(static_cast<JSHTMLBRElement*>(thisObject)->impl()); - imp->setClear(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::clearAttr, valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLBRElement::getConstructor(ExecState* exec) +JSValue JSHTMLBRElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLBRElementConstructor>(exec); + return getDOMConstructor<JSHTMLBRElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.h index 3352cb7aec..d6b124bdb3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.h @@ -30,7 +30,7 @@ class HTMLBRElement; class JSHTMLBRElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLBRElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLBRElement>); + JSHTMLBRElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLBRElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp index 7c78555d44..10e393c3b3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp @@ -22,6 +22,7 @@ #include "JSHTMLBaseElement.h" #include "HTMLBaseElement.h" +#include "HTMLNames.h" #include "KURL.h" #include <runtime/JSString.h> #include <wtf/GetPtr.h> @@ -63,12 +64,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLBaseElementConstructorTable = { 1, 0, JSHTMLBaseElementConstructorTableValues, 0 }; #endif -class JSHTMLBaseElementConstructor : public DOMObject { +class JSHTMLBaseElementConstructor : public DOMConstructorObject { public: - JSHTMLBaseElementConstructor(ExecState* exec) - : DOMObject(JSHTMLBaseElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLBaseElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLBaseElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLBaseElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLBaseElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -110,8 +111,8 @@ JSObject* JSHTMLBaseElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLBaseElement::s_info = { "HTMLBaseElement", &JSHTMLElement::s_info, &JSHTMLBaseElementTable, 0 }; -JSHTMLBaseElement::JSHTMLBaseElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLBaseElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLBaseElement::JSHTMLBaseElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBaseElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -127,21 +128,24 @@ bool JSHTMLBaseElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLBaseElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBaseElement* castedThis = static_cast<JSHTMLBaseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(static_cast<JSHTMLBaseElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->href()); + HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::hrefAttr)); } JSValue jsHTMLBaseElementTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBaseElement* castedThis = static_cast<JSHTMLBaseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(static_cast<JSHTMLBaseElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->target()); + HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::targetAttr)); } JSValue jsHTMLBaseElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLBaseElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLBaseElement* domObject = static_cast<JSHTMLBaseElement*>(asObject(slot.slotBase())); + return JSHTMLBaseElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLBaseElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -151,18 +155,18 @@ void JSHTMLBaseElement::put(ExecState* exec, const Identifier& propertyName, JSV void setJSHTMLBaseElementHref(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(static_cast<JSHTMLBaseElement*>(thisObject)->impl()); - imp->setHref(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::hrefAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBaseElementTarget(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBaseElement* imp = static_cast<HTMLBaseElement*>(static_cast<JSHTMLBaseElement*>(thisObject)->impl()); - imp->setTarget(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::targetAttr, valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLBaseElement::getConstructor(ExecState* exec) +JSValue JSHTMLBaseElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLBaseElementConstructor>(exec); + return getDOMConstructor<JSHTMLBaseElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.h index 8fdbe06937..00649634dd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.h @@ -30,7 +30,7 @@ class HTMLBaseElement; class JSHTMLBaseElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLBaseElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLBaseElement>); + JSHTMLBaseElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLBaseElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp index 081be5a33b..277770bfea 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp @@ -22,6 +22,7 @@ #include "JSHTMLBaseFontElement.h" #include "HTMLBaseFontElement.h" +#include "HTMLNames.h" #include "KURL.h" #include <runtime/JSNumberCell.h> #include <runtime/JSString.h> @@ -65,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementConstructorTable = { 1, 0, JSHTMLBaseFontElementConstructorTableValues, 0 }; #endif -class JSHTMLBaseFontElementConstructor : public DOMObject { +class JSHTMLBaseFontElementConstructor : public DOMConstructorObject { public: - JSHTMLBaseFontElementConstructor(ExecState* exec) - : DOMObject(JSHTMLBaseFontElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLBaseFontElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLBaseFontElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLBaseFontElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLBaseFontElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +113,8 @@ JSObject* JSHTMLBaseFontElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLBaseFontElement::s_info = { "HTMLBaseFontElement", &JSHTMLElement::s_info, &JSHTMLBaseFontElementTable, 0 }; -JSHTMLBaseFontElement::JSHTMLBaseFontElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLBaseFontElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLBaseFontElement::JSHTMLBaseFontElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBaseFontElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -129,28 +130,32 @@ bool JSHTMLBaseFontElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsHTMLBaseFontElementColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->color()); + HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::colorAttr)); } JSValue jsHTMLBaseFontElementFace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->face()); + HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::faceAttr)); } JSValue jsHTMLBaseFontElementSize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()))->impl()); + HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl()); return jsNumber(exec, imp->size()); } JSValue jsHTMLBaseFontElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLBaseFontElement* domObject = static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase())); + return JSHTMLBaseFontElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLBaseFontElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -160,13 +165,13 @@ void JSHTMLBaseFontElement::put(ExecState* exec, const Identifier& propertyName, void setJSHTMLBaseFontElementColor(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl()); - imp->setColor(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::colorAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBaseFontElementFace(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl()); - imp->setFace(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::faceAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBaseFontElementSize(ExecState* exec, JSObject* thisObject, JSValue value) @@ -175,9 +180,9 @@ void setJSHTMLBaseFontElementSize(ExecState* exec, JSObject* thisObject, JSValue imp->setSize(value.toInt32(exec)); } -JSValue JSHTMLBaseFontElement::getConstructor(ExecState* exec) +JSValue JSHTMLBaseFontElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLBaseFontElementConstructor>(exec); + return getDOMConstructor<JSHTMLBaseFontElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.h index 534bb8082b..fcaa363951 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.h @@ -30,7 +30,7 @@ class HTMLBaseFontElement; class JSHTMLBaseFontElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLBaseFontElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLBaseFontElement>); + JSHTMLBaseFontElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLBaseFontElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp index 852568b092..bdf10b7e36 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp @@ -22,6 +22,7 @@ #include "JSHTMLBlockquoteElement.h" #include "HTMLBlockquoteElement.h" +#include "HTMLNames.h" #include "KURL.h" #include <runtime/JSString.h> #include <wtf/GetPtr.h> @@ -62,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLBlockquoteElementConstructorTable = { 1, 0, JSHTMLBlockquoteElementConstructorTableValues, 0 }; #endif -class JSHTMLBlockquoteElementConstructor : public DOMObject { +class JSHTMLBlockquoteElementConstructor : public DOMConstructorObject { public: - JSHTMLBlockquoteElementConstructor(ExecState* exec) - : DOMObject(JSHTMLBlockquoteElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLBlockquoteElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLBlockquoteElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLBlockquoteElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLBlockquoteElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +110,8 @@ JSObject* JSHTMLBlockquoteElementPrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSHTMLBlockquoteElement::s_info = { "HTMLBlockquoteElement", &JSHTMLElement::s_info, &JSHTMLBlockquoteElementTable, 0 }; -JSHTMLBlockquoteElement::JSHTMLBlockquoteElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLBlockquoteElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLBlockquoteElement::JSHTMLBlockquoteElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBlockquoteElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +127,16 @@ bool JSHTMLBlockquoteElement::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsHTMLBlockquoteElementCite(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBlockquoteElement* castedThis = static_cast<JSHTMLBlockquoteElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBlockquoteElement* imp = static_cast<HTMLBlockquoteElement*>(static_cast<JSHTMLBlockquoteElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->cite()); + HTMLBlockquoteElement* imp = static_cast<HTMLBlockquoteElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::citeAttr)); } JSValue jsHTMLBlockquoteElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLBlockquoteElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLBlockquoteElement* domObject = static_cast<JSHTMLBlockquoteElement*>(asObject(slot.slotBase())); + return JSHTMLBlockquoteElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLBlockquoteElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -143,12 +146,12 @@ void JSHTMLBlockquoteElement::put(ExecState* exec, const Identifier& propertyNam void setJSHTMLBlockquoteElementCite(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBlockquoteElement* imp = static_cast<HTMLBlockquoteElement*>(static_cast<JSHTMLBlockquoteElement*>(thisObject)->impl()); - imp->setCite(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::citeAttr, valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLBlockquoteElement::getConstructor(ExecState* exec) +JSValue JSHTMLBlockquoteElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLBlockquoteElementConstructor>(exec); + return getDOMConstructor<JSHTMLBlockquoteElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.h index 7949bddba2..a2046b31ca 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.h @@ -30,7 +30,7 @@ class HTMLBlockquoteElement; class JSHTMLBlockquoteElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLBlockquoteElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLBlockquoteElement>); + JSHTMLBlockquoteElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLBlockquoteElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp index d86b72376a..7628bd62e8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp @@ -24,6 +24,7 @@ #include "EventListener.h" #include "Frame.h" #include "HTMLBodyElement.h" +#include "HTMLNames.h" #include "JSDOMGlobalObject.h" #include "JSEventListener.h" #include "KURL.h" @@ -78,12 +79,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLBodyElementConstructorTable = { 1, 0, JSHTMLBodyElementConstructorTableValues, 0 }; #endif -class JSHTMLBodyElementConstructor : public DOMObject { +class JSHTMLBodyElementConstructor : public DOMConstructorObject { public: - JSHTMLBodyElementConstructor(ExecState* exec) - : DOMObject(JSHTMLBodyElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLBodyElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLBodyElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLBodyElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLBodyElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -125,8 +126,8 @@ JSObject* JSHTMLBodyElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLBodyElement::s_info = { "HTMLBodyElement", &JSHTMLElement::s_info, &JSHTMLBodyElementTable, 0 }; -JSHTMLBodyElement::JSHTMLBodyElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLBodyElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLBodyElement::JSHTMLBodyElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBodyElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -142,50 +143,57 @@ bool JSHTMLBodyElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLBodyElementALink(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->aLink()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::alinkAttr)); } JSValue jsHTMLBodyElementBackground(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->background()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::backgroundAttr)); } JSValue jsHTMLBodyElementBgColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->bgColor()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::bgcolorAttr)); } JSValue jsHTMLBodyElementLink(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->link()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::linkAttr)); } JSValue jsHTMLBodyElementText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->text()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::textAttr)); } JSValue jsHTMLBodyElementVLink(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); - return jsString(exec, imp->vLink()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::vlinkAttr)); } JSValue jsHTMLBodyElementOnbeforeunload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); if (EventListener* listener = imp->onbeforeunload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -195,8 +203,9 @@ JSValue jsHTMLBodyElementOnbeforeunload(ExecState* exec, const Identifier&, cons JSValue jsHTMLBodyElementOnmessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); if (EventListener* listener = imp->onmessage()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -206,8 +215,9 @@ JSValue jsHTMLBodyElementOnmessage(ExecState* exec, const Identifier&, const Pro JSValue jsHTMLBodyElementOnoffline(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); if (EventListener* listener = imp->onoffline()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -217,8 +227,9 @@ JSValue jsHTMLBodyElementOnoffline(ExecState* exec, const Identifier&, const Pro JSValue jsHTMLBodyElementOnonline(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); if (EventListener* listener = imp->ononline()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -228,8 +239,9 @@ JSValue jsHTMLBodyElementOnonline(ExecState* exec, const Identifier&, const Prop JSValue jsHTMLBodyElementOnresize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); if (EventListener* listener = imp->onresize()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -239,8 +251,9 @@ JSValue jsHTMLBodyElementOnresize(ExecState* exec, const Identifier&, const Prop JSValue jsHTMLBodyElementOnstorage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); if (EventListener* listener = imp->onstorage()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -250,8 +263,9 @@ JSValue jsHTMLBodyElementOnstorage(ExecState* exec, const Identifier&, const Pro JSValue jsHTMLBodyElementOnunload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLBodyElement* castedThis = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->impl()); + HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(castedThis->impl()); if (EventListener* listener = imp->onunload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -261,7 +275,8 @@ JSValue jsHTMLBodyElementOnunload(ExecState* exec, const Identifier&, const Prop JSValue jsHTMLBodyElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLBodyElement* domObject = static_cast<JSHTMLBodyElement*>(asObject(slot.slotBase())); + return JSHTMLBodyElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLBodyElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -271,37 +286,37 @@ void JSHTMLBodyElement::put(ExecState* exec, const Identifier& propertyName, JSV void setJSHTMLBodyElementALink(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); - imp->setALink(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::alinkAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBodyElementBackground(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); - imp->setBackground(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::backgroundAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBodyElementBgColor(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); - imp->setBgColor(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::bgcolorAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBodyElementLink(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); - imp->setLink(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::linkAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBodyElementText(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); - imp->setText(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::textAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBodyElementVLink(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLBodyElement* imp = static_cast<HTMLBodyElement*>(static_cast<JSHTMLBodyElement*>(thisObject)->impl()); - imp->setVLink(valueToStringWithNullCheck(exec, value)); + imp->setAttribute(HTMLNames::vlinkAttr, valueToStringWithNullCheck(exec, value)); } void setJSHTMLBodyElementOnbeforeunload(ExecState* exec, JSObject* thisObject, JSValue value) @@ -374,9 +389,9 @@ void setJSHTMLBodyElementOnunload(ExecState* exec, JSObject* thisObject, JSValue imp->setOnunload(globalObject->createJSAttributeEventListener(value)); } -JSValue JSHTMLBodyElement::getConstructor(ExecState* exec) +JSValue JSHTMLBodyElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLBodyElementConstructor>(exec); + return getDOMConstructor<JSHTMLBodyElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.h index caabc5b54e..706a3c4769 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.h @@ -30,7 +30,7 @@ class HTMLBodyElement; class JSHTMLBodyElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLBodyElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLBodyElement>); + JSHTMLBodyElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLBodyElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp index 098528d1b2..c0c73227ef 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp @@ -75,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLButtonElementConstructorTable = { 1, 0, JSHTMLButtonElementConstructorTableValues, 0 }; #endif -class JSHTMLButtonElementConstructor : public DOMObject { +class JSHTMLButtonElementConstructor : public DOMConstructorObject { public: - JSHTMLButtonElementConstructor(ExecState* exec) - : DOMObject(JSHTMLButtonElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLButtonElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLButtonElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLButtonElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLButtonElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -128,8 +128,8 @@ bool JSHTMLButtonElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSHTMLButtonElement::s_info = { "HTMLButtonElement", &JSHTMLElement::s_info, &JSHTMLButtonElementTable, 0 }; -JSHTMLButtonElement::JSHTMLButtonElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLButtonElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLButtonElement::JSHTMLButtonElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLButtonElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -145,70 +145,80 @@ bool JSHTMLButtonElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLButtonElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLButtonElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->validity())); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->validity())); } JSValue jsHTMLButtonElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); return jsString(exec, imp->accessKey()); } JSValue jsHTMLButtonElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLButtonElementAutofocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); return jsBoolean(imp->autofocus()); } JSValue jsHTMLButtonElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLButtonElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLButtonElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); return jsString(exec, imp->value()); } JSValue jsHTMLButtonElementWillValidate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLButtonElement* castedThis = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->impl()); + HTMLButtonElement* imp = static_cast<HTMLButtonElement*>(castedThis->impl()); return jsBoolean(imp->willValidate()); } JSValue jsHTMLButtonElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLButtonElement* domObject = static_cast<JSHTMLButtonElement*>(asObject(slot.slotBase())); + return JSHTMLButtonElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLButtonElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -245,9 +255,9 @@ void setJSHTMLButtonElementValue(ExecState* exec, JSObject* thisObject, JSValue imp->setValue(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLButtonElement::getConstructor(ExecState* exec) +JSValue JSHTMLButtonElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLButtonElementConstructor>(exec); + return getDOMConstructor<JSHTMLButtonElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLButtonElementPrototypeFunctionClick(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h index 1ac56c5662..9fa59ff9d7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h @@ -30,7 +30,7 @@ class HTMLButtonElement; class JSHTMLButtonElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLButtonElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLButtonElement>); + JSHTMLButtonElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLButtonElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp index d40e900205..5c5533fff9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLCanvasElementConstructorTable = { 1, 0, JSHTMLCanvasElementConstructorTableValues, 0 }; #endif -class JSHTMLCanvasElementConstructor : public DOMObject { +class JSHTMLCanvasElementConstructor : public DOMConstructorObject { public: - JSHTMLCanvasElementConstructor(ExecState* exec) - : DOMObject(JSHTMLCanvasElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLCanvasElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLCanvasElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLCanvasElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLCanvasElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -120,8 +120,8 @@ bool JSHTMLCanvasElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSHTMLCanvasElement::s_info = { "HTMLCanvasElement", &JSHTMLElement::s_info, &JSHTMLCanvasElementTable, 0 }; -JSHTMLCanvasElement::JSHTMLCanvasElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLCanvasElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLCanvasElement::JSHTMLCanvasElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLCanvasElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -137,21 +137,24 @@ bool JSHTMLCanvasElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLCanvasElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLCanvasElement* castedThis = static_cast<JSHTMLCanvasElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLCanvasElement* imp = static_cast<HTMLCanvasElement*>(static_cast<JSHTMLCanvasElement*>(asObject(slot.slotBase()))->impl()); + HTMLCanvasElement* imp = static_cast<HTMLCanvasElement*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsHTMLCanvasElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLCanvasElement* castedThis = static_cast<JSHTMLCanvasElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLCanvasElement* imp = static_cast<HTMLCanvasElement*>(static_cast<JSHTMLCanvasElement*>(asObject(slot.slotBase()))->impl()); + HTMLCanvasElement* imp = static_cast<HTMLCanvasElement*>(castedThis->impl()); return jsNumber(exec, imp->height()); } JSValue jsHTMLCanvasElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLCanvasElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLCanvasElement* domObject = static_cast<JSHTMLCanvasElement*>(asObject(slot.slotBase())); + return JSHTMLCanvasElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLCanvasElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -170,9 +173,9 @@ void setJSHTMLCanvasElementHeight(ExecState* exec, JSObject* thisObject, JSValue imp->setHeight(value.toInt32(exec)); } -JSValue JSHTMLCanvasElement::getConstructor(ExecState* exec) +JSValue JSHTMLCanvasElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLCanvasElementConstructor>(exec); + return getDOMConstructor<JSHTMLCanvasElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLCanvasElementPrototypeFunctionToDataURL(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -201,7 +204,7 @@ JSValue JSC_HOST_CALL jsHTMLCanvasElementPrototypeFunctionGetContext(ExecState* const UString& contextId = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getContext(contextId))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getContext(contextId))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.h index ad41d15267..5ccb23ac05 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.h @@ -30,7 +30,7 @@ class HTMLCanvasElement; class JSHTMLCanvasElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLCanvasElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLCanvasElement>); + JSHTMLCanvasElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLCanvasElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp index 9b6bda31ba..de01068700 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp @@ -69,12 +69,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLCollectionConstructorTable = { 1, 0, JSHTMLCollectionConstructorTableValues, 0 }; #endif -class JSHTMLCollectionConstructor : public DOMObject { +class JSHTMLCollectionConstructor : public DOMConstructorObject { public: - JSHTMLCollectionConstructor(ExecState* exec) - : DOMObject(JSHTMLCollectionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLCollectionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLCollectionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLCollectionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLCollectionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -124,8 +124,8 @@ bool JSHTMLCollectionPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSHTMLCollection::s_info = { "HTMLCollection", 0, &JSHTMLCollectionTable, 0 }; -JSHTMLCollection::JSHTMLCollection(PassRefPtr<Structure> structure, PassRefPtr<HTMLCollection> impl) - : DOMObject(structure) +JSHTMLCollection::JSHTMLCollection(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLCollection> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -175,14 +175,16 @@ bool JSHTMLCollection::getOwnPropertySlot(ExecState* exec, unsigned propertyName JSValue jsHTMLCollectionLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLCollection* castedThis = static_cast<JSHTMLCollection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLCollection* imp = static_cast<HTMLCollection*>(static_cast<JSHTMLCollection*>(asObject(slot.slotBase()))->impl()); + HTMLCollection* imp = static_cast<HTMLCollection*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsHTMLCollectionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLCollection*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLCollection* domObject = static_cast<JSHTMLCollection*>(asObject(slot.slotBase())); + return JSHTMLCollection::getConstructor(exec, domObject->globalObject()); } void JSHTMLCollection::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -191,9 +193,9 @@ void JSHTMLCollection::getPropertyNames(ExecState* exec, PropertyNameArray& prop Base::getPropertyNames(exec, propertyNames); } -JSValue JSHTMLCollection::getConstructor(ExecState* exec) +JSValue JSHTMLCollection::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLCollectionConstructor>(exec); + return getDOMConstructor<JSHTMLCollectionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -224,7 +226,7 @@ JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionTags(ExecState* exec, JSO const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->tags(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->tags(name))); return result; } @@ -232,7 +234,7 @@ JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionTags(ExecState* exec, JSO JSValue JSHTMLCollection::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLCollection* thisObj = static_cast<JSHTMLCollection*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<HTMLCollection*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<HTMLCollection*>(thisObj->impl())->item(slot.index())); } HTMLCollection* toHTMLCollection(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h index 44d977eb8b..c6b640658a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h @@ -21,6 +21,7 @@ #ifndef JSHTMLCollection_h #define JSHTMLCollection_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/CallData.h> #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { class HTMLCollection; -class JSHTMLCollection : public DOMObject { - typedef DOMObject Base; +class JSHTMLCollection : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSHTMLCollection(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLCollection>); + JSHTMLCollection(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLCollection>); virtual ~JSHTMLCollection(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -49,7 +50,7 @@ public: virtual JSC::CallType getCallData(JSC::CallData&); virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue item(JSC::ExecState*, const JSC::ArgList&); @@ -64,7 +65,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, HTMLCollection*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, HTMLCollection*); HTMLCollection* toHTMLCollection(JSC::JSValue); class JSHTMLCollectionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp index a3f60b292b..3e7c701e02 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp @@ -60,12 +60,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLDListElementConstructorTable = { 1, 0, JSHTMLDListElementConstructorTableValues, 0 }; #endif -class JSHTMLDListElementConstructor : public DOMObject { +class JSHTMLDListElementConstructor : public DOMConstructorObject { public: - JSHTMLDListElementConstructor(ExecState* exec) - : DOMObject(JSHTMLDListElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLDListElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLDListElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLDListElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLDListElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -107,8 +107,8 @@ JSObject* JSHTMLDListElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLDListElement::s_info = { "HTMLDListElement", &JSHTMLElement::s_info, &JSHTMLDListElementTable, 0 }; -JSHTMLDListElement::JSHTMLDListElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLDListElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLDListElement::JSHTMLDListElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDListElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -124,14 +124,16 @@ bool JSHTMLDListElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLDListElementCompact(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDListElement* castedThis = static_cast<JSHTMLDListElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDListElement* imp = static_cast<HTMLDListElement*>(static_cast<JSHTMLDListElement*>(asObject(slot.slotBase()))->impl()); + HTMLDListElement* imp = static_cast<HTMLDListElement*>(castedThis->impl()); return jsBoolean(imp->compact()); } JSValue jsHTMLDListElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDListElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLDListElement* domObject = static_cast<JSHTMLDListElement*>(asObject(slot.slotBase())); + return JSHTMLDListElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLDListElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -144,9 +146,9 @@ void setJSHTMLDListElementCompact(ExecState* exec, JSObject* thisObject, JSValue imp->setCompact(value.toBoolean(exec)); } -JSValue JSHTMLDListElement::getConstructor(ExecState* exec) +JSValue JSHTMLDListElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLDListElementConstructor>(exec); + return getDOMConstructor<JSHTMLDListElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.h index a1519ebcda..ea25315fc8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.h @@ -30,7 +30,7 @@ class HTMLDListElement; class JSHTMLDListElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLDListElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLDListElement>); + JSHTMLDListElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLDListElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp index f070da6182..91b63d8400 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.cpp @@ -70,12 +70,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridCellElementConstructorTable = { 1, 0, JSHTMLDataGridCellElementConstructorTableValues, 0 }; #endif -class JSHTMLDataGridCellElementConstructor : public DOMObject { +class JSHTMLDataGridCellElementConstructor : public DOMConstructorObject { public: - JSHTMLDataGridCellElementConstructor(ExecState* exec) - : DOMObject(JSHTMLDataGridCellElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLDataGridCellElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLDataGridCellElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLDataGridCellElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLDataGridCellElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -117,8 +117,8 @@ JSObject* JSHTMLDataGridCellElementPrototype::self(ExecState* exec, JSGlobalObje const ClassInfo JSHTMLDataGridCellElement::s_info = { "HTMLDataGridCellElement", &JSHTMLElement::s_info, &JSHTMLDataGridCellElementTable, 0 }; -JSHTMLDataGridCellElement::JSHTMLDataGridCellElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLDataGridCellElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLDataGridCellElement::JSHTMLDataGridCellElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDataGridCellElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -134,42 +134,48 @@ bool JSHTMLDataGridCellElement::getOwnPropertySlot(ExecState* exec, const Identi JSValue jsHTMLDataGridCellElementLabel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridCellElement* castedThis = static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(castedThis->impl()); return jsString(exec, imp->label()); } JSValue jsHTMLDataGridCellElementFocused(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridCellElement* castedThis = static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(castedThis->impl()); return jsBoolean(imp->focused()); } JSValue jsHTMLDataGridCellElementChecked(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridCellElement* castedThis = static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(castedThis->impl()); return jsBoolean(imp->checked()); } JSValue jsHTMLDataGridCellElementIndeterminate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridCellElement* castedThis = static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(castedThis->impl()); return jsBoolean(imp->indeterminate()); } JSValue jsHTMLDataGridCellElementProgress(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridCellElement* castedThis = static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridCellElement* imp = static_cast<HTMLDataGridCellElement*>(castedThis->impl()); return jsNumber(exec, imp->progress()); } JSValue jsHTMLDataGridCellElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLDataGridCellElement* domObject = static_cast<JSHTMLDataGridCellElement*>(asObject(slot.slotBase())); + return JSHTMLDataGridCellElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLDataGridCellElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -206,9 +212,9 @@ void setJSHTMLDataGridCellElementProgress(ExecState* exec, JSObject* thisObject, imp->setProgress(value.toFloat(exec)); } -JSValue JSHTMLDataGridCellElement::getConstructor(ExecState* exec) +JSValue JSHTMLDataGridCellElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLDataGridCellElementConstructor>(exec); + return getDOMConstructor<JSHTMLDataGridCellElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h index eb0a6defdd..05496eaf08 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridCellElement.h @@ -32,7 +32,7 @@ class HTMLDataGridCellElement; class JSHTMLDataGridCellElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLDataGridCellElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLDataGridCellElement>); + JSHTMLDataGridCellElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLDataGridCellElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp index 0f750e7943..7ecccbcf8b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.cpp @@ -70,12 +70,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridColElementConstructorTable = { 1, 0, JSHTMLDataGridColElementConstructorTableValues, 0 }; #endif -class JSHTMLDataGridColElementConstructor : public DOMObject { +class JSHTMLDataGridColElementConstructor : public DOMConstructorObject { public: - JSHTMLDataGridColElementConstructor(ExecState* exec) - : DOMObject(JSHTMLDataGridColElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLDataGridColElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLDataGridColElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLDataGridColElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLDataGridColElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -117,8 +117,8 @@ JSObject* JSHTMLDataGridColElementPrototype::self(ExecState* exec, JSGlobalObjec const ClassInfo JSHTMLDataGridColElement::s_info = { "HTMLDataGridColElement", &JSHTMLElement::s_info, &JSHTMLDataGridColElementTable, 0 }; -JSHTMLDataGridColElement::JSHTMLDataGridColElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLDataGridColElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLDataGridColElement::JSHTMLDataGridColElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDataGridColElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -134,42 +134,48 @@ bool JSHTMLDataGridColElement::getOwnPropertySlot(ExecState* exec, const Identif JSValue jsHTMLDataGridColElementLabel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridColElement* castedThis = static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(castedThis->impl()); return jsString(exec, imp->label()); } JSValue jsHTMLDataGridColElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridColElement* castedThis = static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLDataGridColElementSortable(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridColElement* castedThis = static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(castedThis->impl()); return jsNumber(exec, imp->sortable()); } JSValue jsHTMLDataGridColElementSortDirection(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridColElement* castedThis = static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(castedThis->impl()); return jsNumber(exec, imp->sortDirection()); } JSValue jsHTMLDataGridColElementPrimary(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridColElement* castedThis = static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridColElement* imp = static_cast<HTMLDataGridColElement*>(castedThis->impl()); return jsBoolean(imp->primary()); } JSValue jsHTMLDataGridColElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLDataGridColElement* domObject = static_cast<JSHTMLDataGridColElement*>(asObject(slot.slotBase())); + return JSHTMLDataGridColElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLDataGridColElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -206,9 +212,9 @@ void setJSHTMLDataGridColElementPrimary(ExecState* exec, JSObject* thisObject, J imp->setPrimary(value.toBoolean(exec)); } -JSValue JSHTMLDataGridColElement::getConstructor(ExecState* exec) +JSValue JSHTMLDataGridColElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLDataGridColElementConstructor>(exec); + return getDOMConstructor<JSHTMLDataGridColElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h index 0fe1b0ed55..bb219106e3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridColElement.h @@ -32,7 +32,7 @@ class HTMLDataGridColElement; class JSHTMLDataGridColElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLDataGridColElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLDataGridColElement>); + JSHTMLDataGridColElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLDataGridColElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp index d964c7b932..8da3253a14 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.cpp @@ -69,12 +69,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridElementConstructorTable = { 1, 0, JSHTMLDataGridElementConstructorTableValues, 0 }; #endif -class JSHTMLDataGridElementConstructor : public DOMObject { +class JSHTMLDataGridElementConstructor : public DOMConstructorObject { public: - JSHTMLDataGridElementConstructor(ExecState* exec) - : DOMObject(JSHTMLDataGridElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLDataGridElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLDataGridElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLDataGridElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLDataGridElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -116,8 +116,8 @@ JSObject* JSHTMLDataGridElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLDataGridElement::s_info = { "HTMLDataGridElement", &JSHTMLElement::s_info, &JSHTMLDataGridElementTable, 0 }; -JSHTMLDataGridElement::JSHTMLDataGridElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLDataGridElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLDataGridElement::JSHTMLDataGridElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDataGridElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -133,40 +133,46 @@ bool JSHTMLDataGridElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsHTMLDataGridElementDataSource(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase()))->dataSource(exec); + JSHTMLDataGridElement* castedThis = static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase())); + return castedThis->dataSource(exec); } JSValue jsHTMLDataGridElementColumns(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridElement* castedThis = static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridElement* imp = static_cast<HTMLDataGridElement*>(static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->columns())); + HTMLDataGridElement* imp = static_cast<HTMLDataGridElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->columns())); } JSValue jsHTMLDataGridElementAutofocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridElement* castedThis = static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridElement* imp = static_cast<HTMLDataGridElement*>(static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridElement* imp = static_cast<HTMLDataGridElement*>(castedThis->impl()); return jsBoolean(imp->autofocus()); } JSValue jsHTMLDataGridElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridElement* castedThis = static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridElement* imp = static_cast<HTMLDataGridElement*>(static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridElement* imp = static_cast<HTMLDataGridElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLDataGridElementMultiple(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridElement* castedThis = static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridElement* imp = static_cast<HTMLDataGridElement*>(static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridElement* imp = static_cast<HTMLDataGridElement*>(castedThis->impl()); return jsBoolean(imp->multiple()); } JSValue jsHTMLDataGridElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLDataGridElement* domObject = static_cast<JSHTMLDataGridElement*>(asObject(slot.slotBase())); + return JSHTMLDataGridElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLDataGridElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -196,9 +202,9 @@ void setJSHTMLDataGridElementMultiple(ExecState* exec, JSObject* thisObject, JSV imp->setMultiple(value.toBoolean(exec)); } -JSValue JSHTMLDataGridElement::getConstructor(ExecState* exec) +JSValue JSHTMLDataGridElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLDataGridElementConstructor>(exec); + return getDOMConstructor<JSHTMLDataGridElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h index 7be0e5e325..bec8e2328b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridElement.h @@ -32,7 +32,7 @@ class HTMLDataGridElement; class JSHTMLDataGridElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLDataGridElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLDataGridElement>); + JSHTMLDataGridElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLDataGridElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes JSC::JSValue dataSource(JSC::ExecState*) const; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp index b6a2d97063..af98411f4f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLDataGridRowElementConstructorTable = { 1, 0, JSHTMLDataGridRowElementConstructorTableValues, 0 }; #endif -class JSHTMLDataGridRowElementConstructor : public DOMObject { +class JSHTMLDataGridRowElementConstructor : public DOMConstructorObject { public: - JSHTMLDataGridRowElementConstructor(ExecState* exec) - : DOMObject(JSHTMLDataGridRowElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLDataGridRowElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLDataGridRowElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLDataGridRowElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLDataGridRowElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSHTMLDataGridRowElementPrototype::self(ExecState* exec, JSGlobalObjec const ClassInfo JSHTMLDataGridRowElement::s_info = { "HTMLDataGridRowElement", &JSHTMLElement::s_info, &JSHTMLDataGridRowElementTable, 0 }; -JSHTMLDataGridRowElement::JSHTMLDataGridRowElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLDataGridRowElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLDataGridRowElement::JSHTMLDataGridRowElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDataGridRowElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -129,28 +129,32 @@ bool JSHTMLDataGridRowElement::getOwnPropertySlot(ExecState* exec, const Identif JSValue jsHTMLDataGridRowElementSelected(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridRowElement* castedThis = static_cast<JSHTMLDataGridRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridRowElement* imp = static_cast<HTMLDataGridRowElement*>(static_cast<JSHTMLDataGridRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridRowElement* imp = static_cast<HTMLDataGridRowElement*>(castedThis->impl()); return jsBoolean(imp->selected()); } JSValue jsHTMLDataGridRowElementFocused(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridRowElement* castedThis = static_cast<JSHTMLDataGridRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridRowElement* imp = static_cast<HTMLDataGridRowElement*>(static_cast<JSHTMLDataGridRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridRowElement* imp = static_cast<HTMLDataGridRowElement*>(castedThis->impl()); return jsBoolean(imp->focused()); } JSValue jsHTMLDataGridRowElementExpanded(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDataGridRowElement* castedThis = static_cast<JSHTMLDataGridRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDataGridRowElement* imp = static_cast<HTMLDataGridRowElement*>(static_cast<JSHTMLDataGridRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLDataGridRowElement* imp = static_cast<HTMLDataGridRowElement*>(castedThis->impl()); return jsBoolean(imp->expanded()); } JSValue jsHTMLDataGridRowElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDataGridRowElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLDataGridRowElement* domObject = static_cast<JSHTMLDataGridRowElement*>(asObject(slot.slotBase())); + return JSHTMLDataGridRowElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLDataGridRowElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -175,9 +179,9 @@ void setJSHTMLDataGridRowElementExpanded(ExecState* exec, JSObject* thisObject, imp->setExpanded(value.toBoolean(exec)); } -JSValue JSHTMLDataGridRowElement::getConstructor(ExecState* exec) +JSValue JSHTMLDataGridRowElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLDataGridRowElementConstructor>(exec); + return getDOMConstructor<JSHTMLDataGridRowElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h index 987e8bfa1b..c7f77ddfdc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDataGridRowElement.h @@ -32,7 +32,7 @@ class HTMLDataGridRowElement; class JSHTMLDataGridRowElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLDataGridRowElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLDataGridRowElement>); + JSHTMLDataGridRowElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLDataGridRowElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp index ddad16bb31..a6d86c0579 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp @@ -60,12 +60,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLDirectoryElementConstructorTable = { 1, 0, JSHTMLDirectoryElementConstructorTableValues, 0 }; #endif -class JSHTMLDirectoryElementConstructor : public DOMObject { +class JSHTMLDirectoryElementConstructor : public DOMConstructorObject { public: - JSHTMLDirectoryElementConstructor(ExecState* exec) - : DOMObject(JSHTMLDirectoryElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLDirectoryElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLDirectoryElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLDirectoryElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLDirectoryElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -107,8 +107,8 @@ JSObject* JSHTMLDirectoryElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLDirectoryElement::s_info = { "HTMLDirectoryElement", &JSHTMLElement::s_info, &JSHTMLDirectoryElementTable, 0 }; -JSHTMLDirectoryElement::JSHTMLDirectoryElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLDirectoryElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLDirectoryElement::JSHTMLDirectoryElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDirectoryElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -124,14 +124,16 @@ bool JSHTMLDirectoryElement::getOwnPropertySlot(ExecState* exec, const Identifie JSValue jsHTMLDirectoryElementCompact(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDirectoryElement* castedThis = static_cast<JSHTMLDirectoryElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDirectoryElement* imp = static_cast<HTMLDirectoryElement*>(static_cast<JSHTMLDirectoryElement*>(asObject(slot.slotBase()))->impl()); + HTMLDirectoryElement* imp = static_cast<HTMLDirectoryElement*>(castedThis->impl()); return jsBoolean(imp->compact()); } JSValue jsHTMLDirectoryElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDirectoryElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLDirectoryElement* domObject = static_cast<JSHTMLDirectoryElement*>(asObject(slot.slotBase())); + return JSHTMLDirectoryElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLDirectoryElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -144,9 +146,9 @@ void setJSHTMLDirectoryElementCompact(ExecState* exec, JSObject* thisObject, JSV imp->setCompact(value.toBoolean(exec)); } -JSValue JSHTMLDirectoryElement::getConstructor(ExecState* exec) +JSValue JSHTMLDirectoryElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLDirectoryElementConstructor>(exec); + return getDOMConstructor<JSHTMLDirectoryElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.h index 09242bfe44..675587c031 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.h @@ -30,7 +30,7 @@ class HTMLDirectoryElement; class JSHTMLDirectoryElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLDirectoryElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLDirectoryElement>); + JSHTMLDirectoryElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLDirectoryElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp index 779666edef..15153e1b5a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLDivElementConstructorTable = { 1, 0, JSHTMLDivElementConstructorTableValues, 0 }; #endif -class JSHTMLDivElementConstructor : public DOMObject { +class JSHTMLDivElementConstructor : public DOMConstructorObject { public: - JSHTMLDivElementConstructor(ExecState* exec) - : DOMObject(JSHTMLDivElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLDivElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLDivElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLDivElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLDivElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLDivElementPrototype::self(ExecState* exec, JSGlobalObject* globa const ClassInfo JSHTMLDivElement::s_info = { "HTMLDivElement", &JSHTMLElement::s_info, &JSHTMLDivElementTable, 0 }; -JSHTMLDivElement::JSHTMLDivElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLDivElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLDivElement::JSHTMLDivElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDivElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +126,16 @@ bool JSHTMLDivElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsHTMLDivElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDivElement* castedThis = static_cast<JSHTMLDivElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDivElement* imp = static_cast<HTMLDivElement*>(static_cast<JSHTMLDivElement*>(asObject(slot.slotBase()))->impl()); + HTMLDivElement* imp = static_cast<HTMLDivElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLDivElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDivElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLDivElement* domObject = static_cast<JSHTMLDivElement*>(asObject(slot.slotBase())); + return JSHTMLDivElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLDivElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -146,9 +148,9 @@ void setJSHTMLDivElementAlign(ExecState* exec, JSObject* thisObject, JSValue val imp->setAlign(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLDivElement::getConstructor(ExecState* exec) +JSValue JSHTMLDivElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLDivElementConstructor>(exec); + return getDOMConstructor<JSHTMLDivElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.h index 1f3545b9ca..eeaa89b123 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.h @@ -30,7 +30,7 @@ class HTMLDivElement; class JSHTMLDivElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLDivElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLDivElement>); + JSHTMLDivElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLDivElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp index fd3aaf4bbd..f7c385932b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp @@ -83,12 +83,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLDocumentConstructorTable = { 1, 0, JSHTMLDocumentConstructorTableValues, 0 }; #endif -class JSHTMLDocumentConstructor : public DOMObject { +class JSHTMLDocumentConstructor : public DOMConstructorObject { public: - JSHTMLDocumentConstructor(ExecState* exec) - : DOMObject(JSHTMLDocumentConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLDocumentConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLDocumentConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLDocumentPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLDocumentPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -143,8 +143,8 @@ bool JSHTMLDocumentPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSHTMLDocument::s_info = { "HTMLDocument", &JSDocument::s_info, &JSHTMLDocumentTable, 0 }; -JSHTMLDocument::JSHTMLDocument(PassRefPtr<Structure> structure, PassRefPtr<HTMLDocument> impl) - : JSDocument(structure, impl) +JSHTMLDocument::JSHTMLDocument(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLDocument> impl) + : JSDocument(structure, globalObject, impl) { } @@ -164,110 +164,126 @@ bool JSHTMLDocument::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsHTMLDocumentEmbeds(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->embeds())); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->embeds())); } JSValue jsHTMLDocumentPlugins(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->plugins())); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->plugins())); } JSValue jsHTMLDocumentScripts(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->scripts())); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->scripts())); } JSValue jsHTMLDocumentAll(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->all(exec); + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); + return castedThis->all(exec); } JSValue jsHTMLDocumentWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsHTMLDocumentHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsNumber(exec, imp->height()); } JSValue jsHTMLDocumentDir(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsString(exec, imp->dir()); } JSValue jsHTMLDocumentDesignMode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsString(exec, imp->designMode()); } JSValue jsHTMLDocumentCompatMode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsString(exec, imp->compatMode()); } JSValue jsHTMLDocumentActiveElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->activeElement())); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->activeElement())); } JSValue jsHTMLDocumentBgColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsString(exec, imp->bgColor()); } JSValue jsHTMLDocumentFgColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsString(exec, imp->fgColor()); } JSValue jsHTMLDocumentAlinkColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsString(exec, imp->alinkColor()); } JSValue jsHTMLDocumentLinkColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsString(exec, imp->linkColor()); } JSValue jsHTMLDocumentVlinkColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLDocument* castedThis = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLDocument* imp = static_cast<HTMLDocument*>(static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->impl()); + HTMLDocument* imp = static_cast<HTMLDocument*>(castedThis->impl()); return jsString(exec, imp->vlinkColor()); } JSValue jsHTMLDocumentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLDocument*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLDocument* domObject = static_cast<JSHTMLDocument*>(asObject(slot.slotBase())); + return JSHTMLDocument::getConstructor(exec, domObject->globalObject()); } void JSHTMLDocument::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -321,9 +337,9 @@ void setJSHTMLDocumentVlinkColor(ExecState* exec, JSObject* thisObject, JSValue imp->setVlinkColor(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLDocument::getConstructor(ExecState* exec) +JSValue JSHTMLDocument::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLDocumentConstructor>(exec); + return getDOMConstructor<JSHTMLDocumentConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLDocumentPrototypeFunctionOpen(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.h index 3827df26cd..110c7e4aba 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.h @@ -30,7 +30,7 @@ class HTMLDocument; class JSHTMLDocument : public JSDocument { typedef JSDocument Base; public: - JSHTMLDocument(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLDocument>); + JSHTMLDocument(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLDocument>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes JSC::JSValue all(JSC::ExecState*) const; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp index 25e9bca382..7fe918a131 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp @@ -41,7 +41,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSHTMLElement); /* Hash table */ -static const HashTableValue JSHTMLElementTableValues[15] = +static const HashTableValue JSHTMLElementTableValues[16] = { { "id", DontDelete, (intptr_t)jsHTMLElementId, (intptr_t)setJSHTMLElementId }, { "title", DontDelete, (intptr_t)jsHTMLElementTitle, (intptr_t)setJSHTMLElementTitle }, @@ -49,6 +49,7 @@ static const HashTableValue JSHTMLElementTableValues[15] = { "dir", DontDelete, (intptr_t)jsHTMLElementDir, (intptr_t)setJSHTMLElementDir }, { "className", DontDelete, (intptr_t)jsHTMLElementClassName, (intptr_t)setJSHTMLElementClassName }, { "tabIndex", DontDelete, (intptr_t)jsHTMLElementTabIndex, (intptr_t)setJSHTMLElementTabIndex }, + { "draggable", DontDelete, (intptr_t)jsHTMLElementDraggable, (intptr_t)setJSHTMLElementDraggable }, { "innerHTML", DontDelete, (intptr_t)jsHTMLElementInnerHTML, (intptr_t)setJSHTMLElementInnerHTML }, { "innerText", DontDelete, (intptr_t)jsHTMLElementInnerText, (intptr_t)setJSHTMLElementInnerText }, { "outerHTML", DontDelete, (intptr_t)jsHTMLElementOuterHTML, (intptr_t)setJSHTMLElementOuterHTML }, @@ -81,12 +82,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLElementConstructorTable = { 1, 0, JSHTMLElementConstructorTableValues, 0 }; #endif -class JSHTMLElementConstructor : public DOMObject { +class JSHTMLElementConstructor : public DOMConstructorObject { public: - JSHTMLElementConstructor(ExecState* exec) - : DOMObject(JSHTMLElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -136,8 +137,8 @@ bool JSHTMLElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSHTMLElement::s_info = { "HTMLElement", &JSElement::s_info, &JSHTMLElementTable, 0 }; -JSHTMLElement::JSHTMLElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLElement> impl) - : JSElement(structure, impl) +JSHTMLElement::JSHTMLElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> impl) + : JSElement(structure, globalObject, impl) { } @@ -153,98 +154,120 @@ bool JSHTMLElement::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsHTMLElementId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::idAttr)); } JSValue jsHTMLElementTitle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::titleAttr)); } JSValue jsHTMLElementLang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::langAttr)); } JSValue jsHTMLElementDir(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::dirAttr)); } JSValue jsHTMLElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::classAttr)); } JSValue jsHTMLElementTabIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsNumber(exec, imp->tabIndex()); } +JSValue jsHTMLElementDraggable(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); + return jsBoolean(imp->draggable()); +} + JSValue jsHTMLElementInnerHTML(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->innerHTML()); } JSValue jsHTMLElementInnerText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->innerText()); } JSValue jsHTMLElementOuterHTML(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->outerHTML()); } JSValue jsHTMLElementOuterText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->outerText()); } JSValue jsHTMLElementChildren(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->children())); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->children())); } JSValue jsHTMLElementContentEditable(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsString(exec, imp->contentEditable()); } JSValue jsHTMLElementIsContentEditable(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->impl()); + HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl()); return jsBoolean(imp->isContentEditable()); } JSValue jsHTMLElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLElement* domObject = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); + return JSHTMLElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -287,6 +310,12 @@ void setJSHTMLElementTabIndex(ExecState* exec, JSObject* thisObject, JSValue val imp->setTabIndex(value.toInt32(exec)); } +void setJSHTMLElementDraggable(ExecState* exec, JSObject* thisObject, JSValue value) +{ + HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(thisObject)->impl()); + imp->setDraggable(value.toBoolean(exec)); +} + void setJSHTMLElementInnerHTML(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLElement* imp = static_cast<HTMLElement*>(static_cast<JSHTMLElement*>(thisObject)->impl()); @@ -325,9 +354,9 @@ void setJSHTMLElementContentEditable(ExecState* exec, JSObject* thisObject, JSVa imp->setContentEditable(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLElement::getConstructor(ExecState* exec) +JSValue JSHTMLElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLElementConstructor>(exec); + return getDOMConstructor<JSHTMLElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLElementPrototypeFunctionInsertAdjacentElement(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -342,7 +371,7 @@ JSValue JSC_HOST_CALL jsHTMLElementPrototypeFunctionInsertAdjacentElement(ExecSt Element* element = toElement(args.at(1)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->insertAdjacentElement(where, element, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->insertAdjacentElement(where, element, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.h index d4ca1f3330..76757324bc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLElement.h @@ -31,7 +31,7 @@ class HTMLElement; class JSHTMLElement : public JSElement { typedef JSElement Base; public: - JSHTMLElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLElement>); + JSHTMLElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -45,7 +45,7 @@ public: virtual void pushEventHandlerScope(JSC::ExecState*, JSC::ScopeChain&) const; - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); HTMLElement* impl() const { return static_cast<HTMLElement*>(Base::impl()); @@ -87,6 +87,8 @@ JSC::JSValue jsHTMLElementClassName(JSC::ExecState*, const JSC::Identifier&, con void setJSHTMLElementClassName(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLElementTabIndex(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSHTMLElementTabIndex(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); +JSC::JSValue jsHTMLElementDraggable(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSHTMLElementDraggable(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLElementInnerHTML(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSHTMLElementInnerHTML(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLElementInnerText(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp index aaedcca567..1e9dc42942 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp @@ -170,358 +170,358 @@ namespace WebCore { using namespace HTMLNames; -typedef JSNode* (*CreateHTMLElementWrapperFunction)(ExecState*, PassRefPtr<HTMLElement>); +typedef JSNode* (*CreateHTMLElementWrapperFunction)(ExecState*, JSDOMGlobalObject*, PassRefPtr<HTMLElement>); -static JSNode* createHTMLAnchorElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLAnchorElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLAnchorElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLAnchorElement, element.get()); } -static JSNode* createHTMLAppletElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLAppletElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLAppletElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLAppletElement, element.get()); } -static JSNode* createHTMLAreaElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLAreaElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLAreaElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLAreaElement, element.get()); } #if ENABLE(VIDEO) -static JSNode* createHTMLAudioElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLAudioElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { if (!MediaPlayer::isAvailable()) - return CREATE_DOM_NODE_WRAPPER(exec, HTMLElement, element.get()); - return CREATE_DOM_NODE_WRAPPER(exec, HTMLAudioElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLAudioElement, element.get()); } #endif -static JSNode* createHTMLBaseElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLBaseElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLBaseElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLBaseElement, element.get()); } -static JSNode* createHTMLBaseFontElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLBaseFontElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLBaseFontElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLBaseFontElement, element.get()); } -static JSNode* createHTMLBlockquoteElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLBlockquoteElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLBlockquoteElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLBlockquoteElement, element.get()); } -static JSNode* createHTMLBodyElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLBodyElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLBodyElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLBodyElement, element.get()); } -static JSNode* createHTMLBRElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLBRElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLBRElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLBRElement, element.get()); } -static JSNode* createHTMLButtonElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLButtonElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLButtonElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLButtonElement, element.get()); } -static JSNode* createHTMLCanvasElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLCanvasElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLCanvasElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLCanvasElement, element.get()); } -static JSNode* createHTMLTableCaptionElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLTableCaptionElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLTableCaptionElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLTableCaptionElement, element.get()); } -static JSNode* createHTMLTableColElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLTableColElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLTableColElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLTableColElement, element.get()); } #if ENABLE(DATAGRID) -static JSNode* createHTMLDataGridElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLDataGridElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLDataGridElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLDataGridElement, element.get()); } #endif #if ENABLE(DATAGRID) -static JSNode* createHTMLDataGridCellElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLDataGridCellElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLDataGridCellElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLDataGridCellElement, element.get()); } #endif #if ENABLE(DATAGRID) -static JSNode* createHTMLDataGridColElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLDataGridColElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLDataGridColElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLDataGridColElement, element.get()); } #endif -static JSNode* createHTMLModElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLModElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLModElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLModElement, element.get()); } -static JSNode* createHTMLDirectoryElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLDirectoryElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLDirectoryElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLDirectoryElement, element.get()); } -static JSNode* createHTMLDivElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLDivElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLDivElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLDivElement, element.get()); } -static JSNode* createHTMLDListElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLDListElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLDListElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLDListElement, element.get()); } #if ENABLE(DATAGRID) -static JSNode* createHTMLDataGridRowElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLDataGridRowElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLDataGridRowElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLDataGridRowElement, element.get()); } #endif -static JSNode* createHTMLEmbedElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLEmbedElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLEmbedElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLEmbedElement, element.get()); } -static JSNode* createHTMLFieldSetElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLFieldSetElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLFieldSetElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLFieldSetElement, element.get()); } -static JSNode* createHTMLFontElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLFontElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLFontElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLFontElement, element.get()); } -static JSNode* createHTMLFormElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLFormElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLFormElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLFormElement, element.get()); } -static JSNode* createHTMLFrameElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLFrameElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLFrameElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLFrameElement, element.get()); } -static JSNode* createHTMLFrameSetElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLFrameSetElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLFrameSetElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLFrameSetElement, element.get()); } -static JSNode* createHTMLHeadingElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLHeadingElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLHeadingElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLHeadingElement, element.get()); } -static JSNode* createHTMLHeadElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLHeadElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLHeadElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLHeadElement, element.get()); } -static JSNode* createHTMLHRElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLHRElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLHRElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLHRElement, element.get()); } -static JSNode* createHTMLHtmlElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLHtmlElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLHtmlElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLHtmlElement, element.get()); } -static JSNode* createHTMLIFrameElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLIFrameElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLIFrameElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLIFrameElement, element.get()); } -static JSNode* createHTMLImageElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLImageElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLImageElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLImageElement, element.get()); } -static JSNode* createHTMLInputElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLInputElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLInputElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLInputElement, element.get()); } -static JSNode* createHTMLIsIndexElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLIsIndexElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLIsIndexElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLIsIndexElement, element.get()); } -static JSNode* createHTMLSelectElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLSelectElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLSelectElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLSelectElement, element.get()); } -static JSNode* createHTMLLabelElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLLabelElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLLabelElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLLabelElement, element.get()); } -static JSNode* createHTMLLegendElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLLegendElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLLegendElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLLegendElement, element.get()); } -static JSNode* createHTMLLIElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLLIElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLLIElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLLIElement, element.get()); } -static JSNode* createHTMLLinkElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLLinkElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLLinkElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLLinkElement, element.get()); } -static JSNode* createHTMLPreElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLPreElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLPreElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLPreElement, element.get()); } -static JSNode* createHTMLMapElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLMapElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLMapElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLMapElement, element.get()); } -static JSNode* createHTMLMarqueeElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLMarqueeElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLMarqueeElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLMarqueeElement, element.get()); } -static JSNode* createHTMLMenuElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLMenuElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLMenuElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLMenuElement, element.get()); } -static JSNode* createHTMLMetaElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLMetaElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLMetaElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLMetaElement, element.get()); } -static JSNode* createHTMLObjectElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLObjectElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLObjectElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLObjectElement, element.get()); } -static JSNode* createHTMLOListElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLOListElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLOListElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLOListElement, element.get()); } -static JSNode* createHTMLOptGroupElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLOptGroupElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLOptGroupElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLOptGroupElement, element.get()); } -static JSNode* createHTMLOptionElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLOptionElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLOptionElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLOptionElement, element.get()); } -static JSNode* createHTMLParagraphElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLParagraphElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLParagraphElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLParagraphElement, element.get()); } -static JSNode* createHTMLParamElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLParamElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLParamElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLParamElement, element.get()); } -static JSNode* createHTMLQuoteElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLQuoteElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLQuoteElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLQuoteElement, element.get()); } -static JSNode* createHTMLScriptElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLScriptElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLScriptElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLScriptElement, element.get()); } #if ENABLE(VIDEO) -static JSNode* createHTMLSourceElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLSourceElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { if (!MediaPlayer::isAvailable()) - return CREATE_DOM_NODE_WRAPPER(exec, HTMLElement, element.get()); - return CREATE_DOM_NODE_WRAPPER(exec, HTMLSourceElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLSourceElement, element.get()); } #endif -static JSNode* createHTMLStyleElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLStyleElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLStyleElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLStyleElement, element.get()); } -static JSNode* createHTMLTableElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLTableElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLTableElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLTableElement, element.get()); } -static JSNode* createHTMLTableSectionElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLTableSectionElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLTableSectionElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLTableSectionElement, element.get()); } -static JSNode* createHTMLTableCellElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLTableCellElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLTableCellElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLTableCellElement, element.get()); } -static JSNode* createHTMLTextAreaElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLTextAreaElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLTextAreaElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLTextAreaElement, element.get()); } -static JSNode* createHTMLTitleElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLTitleElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLTitleElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLTitleElement, element.get()); } -static JSNode* createHTMLTableRowElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLTableRowElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLTableRowElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLTableRowElement, element.get()); } -static JSNode* createHTMLUListElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLUListElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, HTMLUListElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLUListElement, element.get()); } #if ENABLE(VIDEO) -static JSNode* createHTMLVideoElementWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +static JSNode* createHTMLVideoElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { if (!MediaPlayer::isAvailable()) - return CREATE_DOM_NODE_WRAPPER(exec, HTMLElement, element.get()); - return CREATE_DOM_NODE_WRAPPER(exec, HTMLVideoElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLVideoElement, element.get()); } #endif -JSNode* createJSHTMLWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) +JSNode* createJSHTMLWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLElement> element) { typedef HashMap<WebCore::AtomicStringImpl*, CreateHTMLElementWrapperFunction> FunctionMap; DEFINE_STATIC_LOCAL(FunctionMap, map, ()); @@ -620,8 +620,8 @@ JSNode* createJSHTMLWrapper(ExecState* exec, PassRefPtr<HTMLElement> element) } CreateHTMLElementWrapperFunction createWrapperFunction = map.get(element->localName().impl()); if (createWrapperFunction) - return createWrapperFunction(exec, element); - return CREATE_DOM_NODE_WRAPPER(exec, HTMLElement, element.get()); + return createWrapperFunction(exec, globalObject, element); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, HTMLElement, element.get()); } } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.h index 9d11bbf6e2..826f4fe81d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.h @@ -39,9 +39,10 @@ namespace JSC { namespace WebCore { class JSNode; + class JSDOMGlobalObject; class HTMLElement; - JSNode* createJSHTMLWrapper(JSC::ExecState*, PassRefPtr<HTMLElement>); + JSNode* createJSHTMLWrapper(JSC::ExecState*, JSDOMGlobalObject*, PassRefPtr<HTMLElement>); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp index b1c63f8a04..430ca1c52e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp @@ -73,12 +73,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLEmbedElementConstructorTable = { 1, 0, JSHTMLEmbedElementConstructorTableValues, 0 }; #endif -class JSHTMLEmbedElementConstructor : public DOMObject { +class JSHTMLEmbedElementConstructor : public DOMConstructorObject { public: - JSHTMLEmbedElementConstructor(ExecState* exec) - : DOMObject(JSHTMLEmbedElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLEmbedElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLEmbedElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLEmbedElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLEmbedElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -126,8 +126,8 @@ bool JSHTMLEmbedElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSHTMLEmbedElement::s_info = { "HTMLEmbedElement", &JSHTMLElement::s_info, &JSHTMLEmbedElementTable, 0 }; -JSHTMLEmbedElement::JSHTMLEmbedElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLEmbedElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLEmbedElement::JSHTMLEmbedElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLEmbedElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -149,49 +149,56 @@ bool JSHTMLEmbedElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLEmbedElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLEmbedElement* castedThis = static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase()))->impl()); + HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLEmbedElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLEmbedElement* castedThis = static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase()))->impl()); + HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(castedThis->impl()); return jsString(exec, imp->height()); } JSValue jsHTMLEmbedElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLEmbedElement* castedThis = static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase()))->impl()); + HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLEmbedElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLEmbedElement* castedThis = static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase()))->impl()); + HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(castedThis->impl()); return jsString(exec, imp->src()); } JSValue jsHTMLEmbedElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLEmbedElement* castedThis = static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase()))->impl()); + HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLEmbedElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLEmbedElement* castedThis = static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase()))->impl()); + HTMLEmbedElement* imp = static_cast<HTMLEmbedElement*>(castedThis->impl()); return jsString(exec, imp->width()); } JSValue jsHTMLEmbedElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLEmbedElement* domObject = static_cast<JSHTMLEmbedElement*>(asObject(slot.slotBase())); + return JSHTMLEmbedElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLEmbedElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -236,9 +243,9 @@ void setJSHTMLEmbedElementWidth(ExecState* exec, JSObject* thisObject, JSValue v imp->setWidth(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLEmbedElement::getConstructor(ExecState* exec) +JSValue JSHTMLEmbedElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLEmbedElementConstructor>(exec); + return getDOMConstructor<JSHTMLEmbedElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLEmbedElementPrototypeFunctionGetSVGDocument(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -253,7 +260,7 @@ JSValue JSC_HOST_CALL jsHTMLEmbedElementPrototypeFunctionGetSVGDocument(ExecStat return jsUndefined(); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getSVGDocument(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.h index 2538ee356d..92eb7fef8b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.h @@ -31,7 +31,7 @@ class HTMLEmbedElement; class JSHTMLEmbedElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLEmbedElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLEmbedElement>); + JSHTMLEmbedElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLEmbedElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); @@ -47,7 +47,7 @@ public: virtual JSC::CallType getCallData(JSC::CallData&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); private: static bool canGetItemsForName(JSC::ExecState*, HTMLEmbedElement*, const JSC::Identifier&); static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp index 07dc1700d0..ddf115f7b6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLFieldSetElementConstructorTable = { 1, 0, JSHTMLFieldSetElementConstructorTableValues, 0 }; #endif -class JSHTMLFieldSetElementConstructor : public DOMObject { +class JSHTMLFieldSetElementConstructor : public DOMConstructorObject { public: - JSHTMLFieldSetElementConstructor(ExecState* exec) - : DOMObject(JSHTMLFieldSetElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLFieldSetElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLFieldSetElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLFieldSetElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLFieldSetElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -113,8 +113,8 @@ JSObject* JSHTMLFieldSetElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLFieldSetElement::s_info = { "HTMLFieldSetElement", &JSHTMLElement::s_info, &JSHTMLFieldSetElementTable, 0 }; -JSHTMLFieldSetElement::JSHTMLFieldSetElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLFieldSetElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLFieldSetElement::JSHTMLFieldSetElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLFieldSetElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -130,32 +130,36 @@ bool JSHTMLFieldSetElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsHTMLFieldSetElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFieldSetElement* castedThis = static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFieldSetElement* imp = static_cast<HTMLFieldSetElement*>(static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLFieldSetElement* imp = static_cast<HTMLFieldSetElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLFieldSetElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFieldSetElement* castedThis = static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFieldSetElement* imp = static_cast<HTMLFieldSetElement*>(static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->validity())); + HTMLFieldSetElement* imp = static_cast<HTMLFieldSetElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->validity())); } JSValue jsHTMLFieldSetElementWillValidate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFieldSetElement* castedThis = static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFieldSetElement* imp = static_cast<HTMLFieldSetElement*>(static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFieldSetElement* imp = static_cast<HTMLFieldSetElement*>(castedThis->impl()); return jsBoolean(imp->willValidate()); } JSValue jsHTMLFieldSetElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLFieldSetElement* domObject = static_cast<JSHTMLFieldSetElement*>(asObject(slot.slotBase())); + return JSHTMLFieldSetElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSHTMLFieldSetElement::getConstructor(ExecState* exec) +JSValue JSHTMLFieldSetElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLFieldSetElementConstructor>(exec); + return getDOMConstructor<JSHTMLFieldSetElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h index 6966b40b98..d339d21e97 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h @@ -30,7 +30,7 @@ class HTMLFieldSetElement; class JSHTMLFieldSetElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLFieldSetElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLFieldSetElement>); + JSHTMLFieldSetElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLFieldSetElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp index 5d80326c4d..4ed60a21e5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp @@ -64,12 +64,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLFontElementConstructorTable = { 1, 0, JSHTMLFontElementConstructorTableValues, 0 }; #endif -class JSHTMLFontElementConstructor : public DOMObject { +class JSHTMLFontElementConstructor : public DOMConstructorObject { public: - JSHTMLFontElementConstructor(ExecState* exec) - : DOMObject(JSHTMLFontElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLFontElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLFontElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLFontElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLFontElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -111,8 +111,8 @@ JSObject* JSHTMLFontElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLFontElement::s_info = { "HTMLFontElement", &JSHTMLElement::s_info, &JSHTMLFontElementTable, 0 }; -JSHTMLFontElement::JSHTMLFontElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLFontElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLFontElement::JSHTMLFontElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLFontElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -128,28 +128,32 @@ bool JSHTMLFontElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLFontElementColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFontElement* castedThis = static_cast<JSHTMLFontElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFontElement* imp = static_cast<HTMLFontElement*>(static_cast<JSHTMLFontElement*>(asObject(slot.slotBase()))->impl()); + HTMLFontElement* imp = static_cast<HTMLFontElement*>(castedThis->impl()); return jsString(exec, imp->color()); } JSValue jsHTMLFontElementFace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFontElement* castedThis = static_cast<JSHTMLFontElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFontElement* imp = static_cast<HTMLFontElement*>(static_cast<JSHTMLFontElement*>(asObject(slot.slotBase()))->impl()); + HTMLFontElement* imp = static_cast<HTMLFontElement*>(castedThis->impl()); return jsString(exec, imp->face()); } JSValue jsHTMLFontElementSize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFontElement* castedThis = static_cast<JSHTMLFontElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFontElement* imp = static_cast<HTMLFontElement*>(static_cast<JSHTMLFontElement*>(asObject(slot.slotBase()))->impl()); + HTMLFontElement* imp = static_cast<HTMLFontElement*>(castedThis->impl()); return jsString(exec, imp->size()); } JSValue jsHTMLFontElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLFontElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLFontElement* domObject = static_cast<JSHTMLFontElement*>(asObject(slot.slotBase())); + return JSHTMLFontElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLFontElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -174,9 +178,9 @@ void setJSHTMLFontElementSize(ExecState* exec, JSObject* thisObject, JSValue val imp->setSize(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLFontElement::getConstructor(ExecState* exec) +JSValue JSHTMLFontElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLFontElementConstructor>(exec); + return getDOMConstructor<JSHTMLFontElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.h index c53d90aa48..6edf8fea64 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.h @@ -30,7 +30,7 @@ class HTMLFontElement; class JSHTMLFontElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLFontElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLFontElement>); + JSHTMLFontElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLFontElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp index c3cb279b2c..1f941c0259 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp @@ -76,12 +76,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLFormElementConstructorTable = { 1, 0, JSHTMLFormElementConstructorTableValues, 0 }; #endif -class JSHTMLFormElementConstructor : public DOMObject { +class JSHTMLFormElementConstructor : public DOMConstructorObject { public: - JSHTMLFormElementConstructor(ExecState* exec) - : DOMObject(JSHTMLFormElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLFormElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLFormElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLFormElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLFormElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -130,8 +130,8 @@ bool JSHTMLFormElementPrototype::getOwnPropertySlot(ExecState* exec, const Ident const ClassInfo JSHTMLFormElement::s_info = { "HTMLFormElement", &JSHTMLElement::s_info, &JSHTMLFormElementTable, 0 }; -JSHTMLFormElement::JSHTMLFormElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLFormElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLFormElement::JSHTMLFormElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLFormElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -162,70 +162,80 @@ bool JSHTMLFormElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLFormElementElements(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->elements())); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->elements())); } JSValue jsHTMLFormElementLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsHTMLFormElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLFormElementAcceptCharset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); return jsString(exec, imp->acceptCharset()); } JSValue jsHTMLFormElementAction(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); return jsString(exec, imp->action()); } JSValue jsHTMLFormElementEncoding(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); return jsString(exec, imp->encoding()); } JSValue jsHTMLFormElementEnctype(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); return jsString(exec, imp->enctype()); } JSValue jsHTMLFormElementMethod(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); return jsString(exec, imp->method()); } JSValue jsHTMLFormElementTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFormElement* castedThis = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFormElement* imp = static_cast<HTMLFormElement*>(static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->impl()); + HTMLFormElement* imp = static_cast<HTMLFormElement*>(castedThis->impl()); return jsString(exec, imp->target()); } JSValue jsHTMLFormElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLFormElement* domObject = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); + return JSHTMLFormElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLFormElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -281,9 +291,9 @@ void JSHTMLFormElement::getPropertyNames(ExecState* exec, PropertyNameArray& pro Base::getPropertyNames(exec, propertyNames); } -JSValue JSHTMLFormElement::getConstructor(ExecState* exec) +JSValue JSHTMLFormElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLFormElementConstructor>(exec); + return getDOMConstructor<JSHTMLFormElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLFormElementPrototypeFunctionSubmit(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -311,7 +321,7 @@ JSValue JSC_HOST_CALL jsHTMLFormElementPrototypeFunctionReset(ExecState* exec, J JSValue JSHTMLFormElement::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLFormElement* thisObj = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<HTMLFormElement*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<HTMLFormElement*>(thisObj->impl())->item(slot.index())); } } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.h index b44e6db04b..6ad5c004f0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.h @@ -30,7 +30,7 @@ class HTMLFormElement; class JSHTMLFormElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLFormElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLFormElement>); + JSHTMLFormElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLFormElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -43,7 +43,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue submit(JSC::ExecState*, const JSC::ArgList&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp index d11a90808a..2a8778547e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp @@ -83,12 +83,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLFrameElementConstructorTable = { 1, 0, JSHTMLFrameElementConstructorTableValues, 0 }; #endif -class JSHTMLFrameElementConstructor : public DOMObject { +class JSHTMLFrameElementConstructor : public DOMConstructorObject { public: - JSHTMLFrameElementConstructor(ExecState* exec) - : DOMObject(JSHTMLFrameElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLFrameElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLFrameElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLFrameElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLFrameElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -136,8 +136,8 @@ bool JSHTMLFrameElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSHTMLFrameElement::s_info = { "HTMLFrameElement", &JSHTMLElement::s_info, &JSHTMLFrameElementTable, 0 }; -JSHTMLFrameElement::JSHTMLFrameElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLFrameElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLFrameElement::JSHTMLFrameElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLFrameElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -153,97 +153,111 @@ bool JSHTMLFrameElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLFrameElementFrameBorder(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->frameBorder()); } JSValue jsHTMLFrameElementLongDesc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->longDesc()); } JSValue jsHTMLFrameElementMarginHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->marginHeight()); } JSValue jsHTMLFrameElementMarginWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->marginWidth()); } JSValue jsHTMLFrameElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLFrameElementNoResize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsBoolean(imp->noResize()); } JSValue jsHTMLFrameElementScrolling(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->scrolling()); } JSValue jsHTMLFrameElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->src()); } JSValue jsHTMLFrameElementContentDocument(ExecState* exec, const Identifier&, const PropertySlot& slot) { - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); - return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, WTF::getPtr(imp->contentDocument())) : jsUndefined(); + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); + return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentDocument())) : jsUndefined(); } JSValue jsHTMLFrameElementContentWindow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->contentWindow())); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentWindow())); } JSValue jsHTMLFrameElementLocation(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsString(exec, imp->location()); } JSValue jsHTMLFrameElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsHTMLFrameElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameElement* castedThis = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(castedThis->impl()); return jsNumber(exec, imp->height()); } JSValue jsHTMLFrameElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLFrameElement* domObject = static_cast<JSHTMLFrameElement*>(asObject(slot.slotBase())); + return JSHTMLFrameElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLFrameElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -302,9 +316,9 @@ void setJSHTMLFrameElementLocation(ExecState* exec, JSObject* thisObject, JSValu static_cast<JSHTMLFrameElement*>(thisObject)->setLocation(exec, value); } -JSValue JSHTMLFrameElement::getConstructor(ExecState* exec) +JSValue JSHTMLFrameElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLFrameElementConstructor>(exec); + return getDOMConstructor<JSHTMLFrameElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLFrameElementPrototypeFunctionGetSVGDocument(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -319,7 +333,7 @@ JSValue JSC_HOST_CALL jsHTMLFrameElementPrototypeFunctionGetSVGDocument(ExecStat return jsUndefined(); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getSVGDocument(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.h index 573ff5298d..c89f3f8667 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.h @@ -30,7 +30,7 @@ class HTMLFrameElement; class JSHTMLFrameElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLFrameElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLFrameElement>); + JSHTMLFrameElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLFrameElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes void setSrc(JSC::ExecState*, JSC::JSValue); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp index 358280c150..f72049281a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp @@ -75,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLFrameSetElementConstructorTable = { 1, 0, JSHTMLFrameSetElementConstructorTableValues, 0 }; #endif -class JSHTMLFrameSetElementConstructor : public DOMObject { +class JSHTMLFrameSetElementConstructor : public DOMConstructorObject { public: - JSHTMLFrameSetElementConstructor(ExecState* exec) - : DOMObject(JSHTMLFrameSetElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLFrameSetElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLFrameSetElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLFrameSetElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLFrameSetElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -122,8 +122,8 @@ JSObject* JSHTMLFrameSetElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLFrameSetElement::s_info = { "HTMLFrameSetElement", &JSHTMLElement::s_info, &JSHTMLFrameSetElementTable, 0 }; -JSHTMLFrameSetElement::JSHTMLFrameSetElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLFrameSetElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLFrameSetElement::JSHTMLFrameSetElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLFrameSetElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -143,22 +143,25 @@ bool JSHTMLFrameSetElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsHTMLFrameSetElementCols(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); return jsString(exec, imp->cols()); } JSValue jsHTMLFrameSetElementRows(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); return jsString(exec, imp->rows()); } JSValue jsHTMLFrameSetElementOnbeforeunload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); if (EventListener* listener = imp->onbeforeunload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -168,8 +171,9 @@ JSValue jsHTMLFrameSetElementOnbeforeunload(ExecState* exec, const Identifier&, JSValue jsHTMLFrameSetElementOnmessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); if (EventListener* listener = imp->onmessage()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -179,8 +183,9 @@ JSValue jsHTMLFrameSetElementOnmessage(ExecState* exec, const Identifier&, const JSValue jsHTMLFrameSetElementOnoffline(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); if (EventListener* listener = imp->onoffline()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -190,8 +195,9 @@ JSValue jsHTMLFrameSetElementOnoffline(ExecState* exec, const Identifier&, const JSValue jsHTMLFrameSetElementOnonline(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); if (EventListener* listener = imp->ononline()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -201,8 +207,9 @@ JSValue jsHTMLFrameSetElementOnonline(ExecState* exec, const Identifier&, const JSValue jsHTMLFrameSetElementOnresize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); if (EventListener* listener = imp->onresize()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -212,8 +219,9 @@ JSValue jsHTMLFrameSetElementOnresize(ExecState* exec, const Identifier&, const JSValue jsHTMLFrameSetElementOnstorage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); if (EventListener* listener = imp->onstorage()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -223,8 +231,9 @@ JSValue jsHTMLFrameSetElementOnstorage(ExecState* exec, const Identifier&, const JSValue jsHTMLFrameSetElementOnunload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLFrameSetElement* castedThis = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->impl()); + HTMLFrameSetElement* imp = static_cast<HTMLFrameSetElement*>(castedThis->impl()); if (EventListener* listener = imp->onunload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -234,7 +243,8 @@ JSValue jsHTMLFrameSetElementOnunload(ExecState* exec, const Identifier&, const JSValue jsHTMLFrameSetElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLFrameSetElement* domObject = static_cast<JSHTMLFrameSetElement*>(asObject(slot.slotBase())); + return JSHTMLFrameSetElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLFrameSetElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -323,9 +333,9 @@ void setJSHTMLFrameSetElementOnunload(ExecState* exec, JSObject* thisObject, JSV imp->setOnunload(globalObject->createJSAttributeEventListener(value)); } -JSValue JSHTMLFrameSetElement::getConstructor(ExecState* exec) +JSValue JSHTMLFrameSetElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLFrameSetElementConstructor>(exec); + return getDOMConstructor<JSHTMLFrameSetElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.h index c4528e5497..5b0f82f585 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.h @@ -30,7 +30,7 @@ class HTMLFrameSetElement; class JSHTMLFrameSetElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLFrameSetElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLFrameSetElement>); + JSHTMLFrameSetElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLFrameSetElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); private: static bool canGetItemsForName(JSC::ExecState*, HTMLFrameSetElement*, const JSC::Identifier&); static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp index e20897620a..2c4232cfa5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLHRElementConstructorTable = { 1, 0, JSHTMLHRElementConstructorTableValues, 0 }; #endif -class JSHTMLHRElementConstructor : public DOMObject { +class JSHTMLHRElementConstructor : public DOMConstructorObject { public: - JSHTMLHRElementConstructor(ExecState* exec) - : DOMObject(JSHTMLHRElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLHRElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLHRElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLHRElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLHRElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSHTMLHRElementPrototype::self(ExecState* exec, JSGlobalObject* global const ClassInfo JSHTMLHRElement::s_info = { "HTMLHRElement", &JSHTMLElement::s_info, &JSHTMLHRElementTable, 0 }; -JSHTMLHRElement::JSHTMLHRElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLHRElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLHRElement::JSHTMLHRElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLHRElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -129,35 +129,40 @@ bool JSHTMLHRElement::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsHTMLHRElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLHRElement* castedThis = static_cast<JSHTMLHRElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLHRElement* imp = static_cast<HTMLHRElement*>(static_cast<JSHTMLHRElement*>(asObject(slot.slotBase()))->impl()); + HTMLHRElement* imp = static_cast<HTMLHRElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLHRElementNoShade(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLHRElement* castedThis = static_cast<JSHTMLHRElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLHRElement* imp = static_cast<HTMLHRElement*>(static_cast<JSHTMLHRElement*>(asObject(slot.slotBase()))->impl()); + HTMLHRElement* imp = static_cast<HTMLHRElement*>(castedThis->impl()); return jsBoolean(imp->noShade()); } JSValue jsHTMLHRElementSize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLHRElement* castedThis = static_cast<JSHTMLHRElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLHRElement* imp = static_cast<HTMLHRElement*>(static_cast<JSHTMLHRElement*>(asObject(slot.slotBase()))->impl()); + HTMLHRElement* imp = static_cast<HTMLHRElement*>(castedThis->impl()); return jsString(exec, imp->size()); } JSValue jsHTMLHRElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLHRElement* castedThis = static_cast<JSHTMLHRElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLHRElement* imp = static_cast<HTMLHRElement*>(static_cast<JSHTMLHRElement*>(asObject(slot.slotBase()))->impl()); + HTMLHRElement* imp = static_cast<HTMLHRElement*>(castedThis->impl()); return jsString(exec, imp->width()); } JSValue jsHTMLHRElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLHRElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLHRElement* domObject = static_cast<JSHTMLHRElement*>(asObject(slot.slotBase())); + return JSHTMLHRElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLHRElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -188,9 +193,9 @@ void setJSHTMLHRElementWidth(ExecState* exec, JSObject* thisObject, JSValue valu imp->setWidth(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLHRElement::getConstructor(ExecState* exec) +JSValue JSHTMLHRElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLHRElementConstructor>(exec); + return getDOMConstructor<JSHTMLHRElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.h index fb624404ac..c420fae891 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.h @@ -30,7 +30,7 @@ class HTMLHRElement; class JSHTMLHRElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLHRElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLHRElement>); + JSHTMLHRElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLHRElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp index ff1f3e47bc..e04d2d9c02 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLHeadElementConstructorTable = { 1, 0, JSHTMLHeadElementConstructorTableValues, 0 }; #endif -class JSHTMLHeadElementConstructor : public DOMObject { +class JSHTMLHeadElementConstructor : public DOMConstructorObject { public: - JSHTMLHeadElementConstructor(ExecState* exec) - : DOMObject(JSHTMLHeadElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLHeadElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLHeadElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLHeadElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLHeadElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLHeadElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLHeadElement::s_info = { "HTMLHeadElement", &JSHTMLElement::s_info, &JSHTMLHeadElementTable, 0 }; -JSHTMLHeadElement::JSHTMLHeadElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLHeadElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLHeadElement::JSHTMLHeadElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLHeadElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +126,16 @@ bool JSHTMLHeadElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLHeadElementProfile(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLHeadElement* castedThis = static_cast<JSHTMLHeadElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLHeadElement* imp = static_cast<HTMLHeadElement*>(static_cast<JSHTMLHeadElement*>(asObject(slot.slotBase()))->impl()); + HTMLHeadElement* imp = static_cast<HTMLHeadElement*>(castedThis->impl()); return jsString(exec, imp->profile()); } JSValue jsHTMLHeadElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLHeadElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLHeadElement* domObject = static_cast<JSHTMLHeadElement*>(asObject(slot.slotBase())); + return JSHTMLHeadElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLHeadElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -146,9 +148,9 @@ void setJSHTMLHeadElementProfile(ExecState* exec, JSObject* thisObject, JSValue imp->setProfile(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLHeadElement::getConstructor(ExecState* exec) +JSValue JSHTMLHeadElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLHeadElementConstructor>(exec); + return getDOMConstructor<JSHTMLHeadElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.h index b63b31767f..95453499ca 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.h @@ -30,7 +30,7 @@ class HTMLHeadElement; class JSHTMLHeadElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLHeadElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLHeadElement>); + JSHTMLHeadElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLHeadElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp index b4702f3f26..57b3c235da 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLHeadingElementConstructorTable = { 1, 0, JSHTMLHeadingElementConstructorTableValues, 0 }; #endif -class JSHTMLHeadingElementConstructor : public DOMObject { +class JSHTMLHeadingElementConstructor : public DOMConstructorObject { public: - JSHTMLHeadingElementConstructor(ExecState* exec) - : DOMObject(JSHTMLHeadingElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLHeadingElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLHeadingElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLHeadingElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLHeadingElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLHeadingElementPrototype::self(ExecState* exec, JSGlobalObject* g const ClassInfo JSHTMLHeadingElement::s_info = { "HTMLHeadingElement", &JSHTMLElement::s_info, &JSHTMLHeadingElementTable, 0 }; -JSHTMLHeadingElement::JSHTMLHeadingElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLHeadingElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLHeadingElement::JSHTMLHeadingElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLHeadingElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +126,16 @@ bool JSHTMLHeadingElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLHeadingElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLHeadingElement* castedThis = static_cast<JSHTMLHeadingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLHeadingElement* imp = static_cast<HTMLHeadingElement*>(static_cast<JSHTMLHeadingElement*>(asObject(slot.slotBase()))->impl()); + HTMLHeadingElement* imp = static_cast<HTMLHeadingElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLHeadingElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLHeadingElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLHeadingElement* domObject = static_cast<JSHTMLHeadingElement*>(asObject(slot.slotBase())); + return JSHTMLHeadingElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLHeadingElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -146,9 +148,9 @@ void setJSHTMLHeadingElementAlign(ExecState* exec, JSObject* thisObject, JSValue imp->setAlign(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLHeadingElement::getConstructor(ExecState* exec) +JSValue JSHTMLHeadingElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLHeadingElementConstructor>(exec); + return getDOMConstructor<JSHTMLHeadingElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.h index a5fdd87c25..590d603adf 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.h @@ -30,7 +30,7 @@ class HTMLHeadingElement; class JSHTMLHeadingElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLHeadingElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLHeadingElement>); + JSHTMLHeadingElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLHeadingElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp index 8325f69bf5..8060fc171f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLHtmlElementConstructorTable = { 1, 0, JSHTMLHtmlElementConstructorTableValues, 0 }; #endif -class JSHTMLHtmlElementConstructor : public DOMObject { +class JSHTMLHtmlElementConstructor : public DOMConstructorObject { public: - JSHTMLHtmlElementConstructor(ExecState* exec) - : DOMObject(JSHTMLHtmlElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLHtmlElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLHtmlElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLHtmlElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLHtmlElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLHtmlElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLHtmlElement::s_info = { "HTMLHtmlElement", &JSHTMLElement::s_info, &JSHTMLHtmlElementTable, 0 }; -JSHTMLHtmlElement::JSHTMLHtmlElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLHtmlElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLHtmlElement::JSHTMLHtmlElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLHtmlElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +126,16 @@ bool JSHTMLHtmlElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLHtmlElementVersion(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLHtmlElement* castedThis = static_cast<JSHTMLHtmlElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLHtmlElement* imp = static_cast<HTMLHtmlElement*>(static_cast<JSHTMLHtmlElement*>(asObject(slot.slotBase()))->impl()); + HTMLHtmlElement* imp = static_cast<HTMLHtmlElement*>(castedThis->impl()); return jsString(exec, imp->version()); } JSValue jsHTMLHtmlElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLHtmlElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLHtmlElement* domObject = static_cast<JSHTMLHtmlElement*>(asObject(slot.slotBase())); + return JSHTMLHtmlElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLHtmlElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -146,9 +148,9 @@ void setJSHTMLHtmlElementVersion(ExecState* exec, JSObject* thisObject, JSValue imp->setVersion(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLHtmlElement::getConstructor(ExecState* exec) +JSValue JSHTMLHtmlElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLHtmlElementConstructor>(exec); + return getDOMConstructor<JSHTMLHtmlElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.h index b9e49c782f..fb6150acf7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.h @@ -30,7 +30,7 @@ class HTMLHtmlElement; class JSHTMLHtmlElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLHtmlElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLHtmlElement>); + JSHTMLHtmlElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLHtmlElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp index 557b3a4367..b11b75331d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp @@ -81,12 +81,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLIFrameElementConstructorTable = { 1, 0, JSHTMLIFrameElementConstructorTableValues, 0 }; #endif -class JSHTMLIFrameElementConstructor : public DOMObject { +class JSHTMLIFrameElementConstructor : public DOMConstructorObject { public: - JSHTMLIFrameElementConstructor(ExecState* exec) - : DOMObject(JSHTMLIFrameElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLIFrameElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLIFrameElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLIFrameElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLIFrameElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -134,8 +134,8 @@ bool JSHTMLIFrameElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSHTMLIFrameElement::s_info = { "HTMLIFrameElement", &JSHTMLElement::s_info, &JSHTMLIFrameElementTable, 0 }; -JSHTMLIFrameElement::JSHTMLIFrameElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLIFrameElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLIFrameElement::JSHTMLIFrameElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLIFrameElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -151,90 +151,103 @@ bool JSHTMLIFrameElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLIFrameElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLIFrameElementFrameBorder(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->frameBorder()); } JSValue jsHTMLIFrameElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->height()); } JSValue jsHTMLIFrameElementLongDesc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->longDesc()); } JSValue jsHTMLIFrameElementMarginHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->marginHeight()); } JSValue jsHTMLIFrameElementMarginWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->marginWidth()); } JSValue jsHTMLIFrameElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLIFrameElementScrolling(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->scrolling()); } JSValue jsHTMLIFrameElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->src()); } JSValue jsHTMLIFrameElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); return jsString(exec, imp->width()); } JSValue jsHTMLIFrameElementContentDocument(ExecState* exec, const Identifier&, const PropertySlot& slot) { - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); - return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, WTF::getPtr(imp->contentDocument())) : jsUndefined(); + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); + return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentDocument())) : jsUndefined(); } JSValue jsHTMLIFrameElementContentWindow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIFrameElement* castedThis = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->contentWindow())); + HTMLIFrameElement* imp = static_cast<HTMLIFrameElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentWindow())); } JSValue jsHTMLIFrameElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLIFrameElement* domObject = static_cast<JSHTMLIFrameElement*>(asObject(slot.slotBase())); + return JSHTMLIFrameElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLIFrameElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -300,9 +313,9 @@ void setJSHTMLIFrameElementWidth(ExecState* exec, JSObject* thisObject, JSValue imp->setWidth(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLIFrameElement::getConstructor(ExecState* exec) +JSValue JSHTMLIFrameElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLIFrameElementConstructor>(exec); + return getDOMConstructor<JSHTMLIFrameElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLIFrameElementPrototypeFunctionGetSVGDocument(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -317,7 +330,7 @@ JSValue JSC_HOST_CALL jsHTMLIFrameElementPrototypeFunctionGetSVGDocument(ExecSta return jsUndefined(); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getSVGDocument(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.h index 158ae70680..a1a62beebd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.h @@ -30,7 +30,7 @@ class HTMLIFrameElement; class JSHTMLIFrameElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLIFrameElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLIFrameElement>); + JSHTMLIFrameElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLIFrameElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes void setSrc(JSC::ExecState*, JSC::JSValue); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp index da621b2263..0fdb3343cb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp @@ -81,12 +81,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLImageElementConstructorTable = { 1, 0, JSHTMLImageElementConstructorTableValues, 0 }; #endif -class JSHTMLImageElementConstructor : public DOMObject { +class JSHTMLImageElementConstructor : public DOMConstructorObject { public: - JSHTMLImageElementConstructor(ExecState* exec) - : DOMObject(JSHTMLImageElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLImageElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLImageElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLImageElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLImageElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -128,8 +128,8 @@ JSObject* JSHTMLImageElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLImageElement::s_info = { "HTMLImageElement", &JSHTMLElement::s_info, &JSHTMLImageElementTable, 0 }; -JSHTMLImageElement::JSHTMLImageElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLImageElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLImageElement::JSHTMLImageElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLImageElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -145,133 +145,152 @@ bool JSHTMLImageElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLImageElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::nameAttr)); } JSValue jsHTMLImageElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::alignAttr)); } JSValue jsHTMLImageElementAlt(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::altAttr)); } JSValue jsHTMLImageElementBorder(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::borderAttr)); } JSValue jsHTMLImageElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsNumber(exec, imp->height()); } JSValue jsHTMLImageElementHspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsNumber(exec, imp->hspace()); } JSValue jsHTMLImageElementIsMap(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsBoolean(imp->isMap()); } JSValue jsHTMLImageElementLongDesc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsString(exec, imp->getURLAttribute(HTMLNames::longdescAttr)); } JSValue jsHTMLImageElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsString(exec, imp->getURLAttribute(HTMLNames::srcAttr)); } JSValue jsHTMLImageElementUseMap(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsString(exec, imp->getAttribute(HTMLNames::usemapAttr)); } JSValue jsHTMLImageElementVspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsNumber(exec, imp->vspace()); } JSValue jsHTMLImageElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsHTMLImageElementComplete(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsBoolean(imp->complete()); } JSValue jsHTMLImageElementLowsrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsString(exec, imp->getURLAttribute(HTMLNames::lowsrcAttr)); } JSValue jsHTMLImageElementNaturalHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsNumber(exec, imp->naturalHeight()); } JSValue jsHTMLImageElementNaturalWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsNumber(exec, imp->naturalWidth()); } JSValue jsHTMLImageElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsHTMLImageElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLImageElement* castedThis = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLImageElement* imp = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->impl()); + HTMLImageElement* imp = static_cast<HTMLImageElement*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsHTMLImageElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLImageElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLImageElement* domObject = static_cast<JSHTMLImageElement*>(asObject(slot.slotBase())); + return JSHTMLImageElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLImageElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -356,9 +375,9 @@ void setJSHTMLImageElementLowsrc(ExecState* exec, JSObject* thisObject, JSValue imp->setAttribute(HTMLNames::lowsrcAttr, valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLImageElement::getConstructor(ExecState* exec) +JSValue JSHTMLImageElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLImageElementConstructor>(exec); + return getDOMConstructor<JSHTMLImageElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.h index d24fda0302..ec618c0d2d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.h @@ -30,7 +30,7 @@ class HTMLImageElement; class JSHTMLImageElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLImageElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLImageElement>); + JSHTMLImageElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLImageElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp index e6111bb6ad..849989312b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp @@ -24,6 +24,7 @@ #include "FileList.h" #include "HTMLFormElement.h" #include "HTMLInputElement.h" +#include "HTMLNames.h" #include "JSFileList.h" #include "JSHTMLFormElement.h" #include "JSValidityState.h" @@ -42,7 +43,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSHTMLInputElement); /* Hash table */ -static const HashTableValue JSHTMLInputElementTableValues[28] = +static const HashTableValue JSHTMLInputElementTableValues[30] = { { "defaultValue", DontDelete, (intptr_t)jsHTMLInputElementDefaultValue, (intptr_t)setJSHTMLInputElementDefaultValue }, { "defaultChecked", DontDelete, (intptr_t)jsHTMLInputElementDefaultChecked, (intptr_t)setJSHTMLInputElementDefaultChecked }, @@ -58,8 +59,10 @@ static const HashTableValue JSHTMLInputElementTableValues[28] = { "maxLength", DontDelete, (intptr_t)jsHTMLInputElementMaxLength, (intptr_t)setJSHTMLInputElementMaxLength }, { "multiple", DontDelete, (intptr_t)jsHTMLInputElementMultiple, (intptr_t)setJSHTMLInputElementMultiple }, { "name", DontDelete, (intptr_t)jsHTMLInputElementName, (intptr_t)setJSHTMLInputElementName }, + { "pattern", DontDelete, (intptr_t)jsHTMLInputElementPattern, (intptr_t)setJSHTMLInputElementPattern }, { "placeholder", DontDelete, (intptr_t)jsHTMLInputElementPlaceholder, (intptr_t)setJSHTMLInputElementPlaceholder }, { "readOnly", DontDelete, (intptr_t)jsHTMLInputElementReadOnly, (intptr_t)setJSHTMLInputElementReadOnly }, + { "required", DontDelete, (intptr_t)jsHTMLInputElementRequired, (intptr_t)setJSHTMLInputElementRequired }, { "size", DontDelete, (intptr_t)jsHTMLInputElementSize, (intptr_t)setJSHTMLInputElementSize }, { "src", DontDelete, (intptr_t)jsHTMLInputElementSrc, (intptr_t)setJSHTMLInputElementSrc }, { "type", DontDelete, (intptr_t)jsHTMLInputElementType, (intptr_t)setJSHTMLInputElementType }, @@ -76,9 +79,9 @@ static const HashTableValue JSHTMLInputElementTableValues[28] = static JSC_CONST_HASHTABLE HashTable JSHTMLInputElementTable = #if ENABLE(PERFECT_HASH_SIZE) - { 255, JSHTMLInputElementTableValues, 0 }; + { 2047, JSHTMLInputElementTableValues, 0 }; #else - { 70, 63, JSHTMLInputElementTableValues, 0 }; + { 71, 63, JSHTMLInputElementTableValues, 0 }; #endif /* Hash table for constructor */ @@ -95,12 +98,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLInputElementConstructorTable = { 1, 0, JSHTMLInputElementConstructorTableValues, 0 }; #endif -class JSHTMLInputElementConstructor : public DOMObject { +class JSHTMLInputElementConstructor : public DOMConstructorObject { public: - JSHTMLInputElementConstructor(ExecState* exec) - : DOMObject(JSHTMLInputElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLInputElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLInputElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLInputElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLInputElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -150,8 +153,8 @@ bool JSHTMLInputElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSHTMLInputElement::s_info = { "HTMLInputElement", &JSHTMLElement::s_info, &JSHTMLInputElementTable, 0 }; -JSHTMLInputElement::JSHTMLInputElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLInputElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLInputElement::JSHTMLInputElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLInputElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -167,183 +170,226 @@ bool JSHTMLInputElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLInputElementDefaultValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->defaultValue()); } JSValue jsHTMLInputElementDefaultChecked(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsBoolean(imp->defaultChecked()); } JSValue jsHTMLInputElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLInputElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->validity())); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->validity())); } JSValue jsHTMLInputElementAccept(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->accept()); } JSValue jsHTMLInputElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->accessKey()); } JSValue jsHTMLInputElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLInputElementAlt(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->alt()); } JSValue jsHTMLInputElementChecked(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsBoolean(imp->checked()); } JSValue jsHTMLInputElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLInputElementAutofocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsBoolean(imp->autofocus()); } JSValue jsHTMLInputElementMaxLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsNumber(exec, imp->maxLength()); } JSValue jsHTMLInputElementMultiple(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsBoolean(imp->multiple()); } JSValue jsHTMLInputElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->name()); } +JSValue jsHTMLInputElementPattern(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); + return jsString(exec, imp->getAttribute(HTMLNames::patternAttr)); +} + JSValue jsHTMLInputElementPlaceholder(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->placeholder()); } JSValue jsHTMLInputElementReadOnly(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsBoolean(imp->readOnly()); } +JSValue jsHTMLInputElementRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); + return jsBoolean(imp->required()); +} + JSValue jsHTMLInputElementSize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsNumber(exec, imp->size()); } JSValue jsHTMLInputElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->src()); } JSValue jsHTMLInputElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->type(exec); + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); + return castedThis->type(exec); } JSValue jsHTMLInputElementUseMap(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->useMap()); } JSValue jsHTMLInputElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsString(exec, imp->value()); } JSValue jsHTMLInputElementWillValidate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsBoolean(imp->willValidate()); } JSValue jsHTMLInputElementIndeterminate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); return jsBoolean(imp->indeterminate()); } JSValue jsHTMLInputElementSelectionStart(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->selectionStart(exec); + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); + return castedThis->selectionStart(exec); } JSValue jsHTMLInputElementSelectionEnd(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->selectionEnd(exec); + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); + return castedThis->selectionEnd(exec); } JSValue jsHTMLInputElementFiles(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLInputElement* castedThis = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->files())); + HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->files())); } JSValue jsHTMLInputElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLInputElement* domObject = static_cast<JSHTMLInputElement*>(asObject(slot.slotBase())); + return JSHTMLInputElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLInputElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -422,6 +468,12 @@ void setJSHTMLInputElementName(ExecState* exec, JSObject* thisObject, JSValue va imp->setName(valueToStringWithNullCheck(exec, value)); } +void setJSHTMLInputElementPattern(ExecState* exec, JSObject* thisObject, JSValue value) +{ + HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(thisObject)->impl()); + imp->setAttribute(HTMLNames::patternAttr, value.toString(exec)); +} + void setJSHTMLInputElementPlaceholder(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(thisObject)->impl()); @@ -434,6 +486,12 @@ void setJSHTMLInputElementReadOnly(ExecState* exec, JSObject* thisObject, JSValu imp->setReadOnly(value.toBoolean(exec)); } +void setJSHTMLInputElementRequired(ExecState* exec, JSObject* thisObject, JSValue value) +{ + HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(thisObject)->impl()); + imp->setRequired(value.toBoolean(exec)); +} + void setJSHTMLInputElementSize(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(thisObject)->impl()); @@ -480,9 +538,9 @@ void setJSHTMLInputElementSelectionEnd(ExecState* exec, JSObject* thisObject, JS static_cast<JSHTMLInputElement*>(thisObject)->setSelectionEnd(exec, value); } -JSValue JSHTMLInputElement::getConstructor(ExecState* exec) +JSValue JSHTMLInputElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLInputElementConstructor>(exec); + return getDOMConstructor<JSHTMLInputElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLInputElementPrototypeFunctionSelect(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h index 52f455e498..8a5f61a5e8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h @@ -30,7 +30,7 @@ class HTMLInputElement; class JSHTMLInputElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLInputElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLInputElement>); + JSHTMLInputElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLInputElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes JSC::JSValue type(JSC::ExecState*) const; @@ -103,10 +103,14 @@ JSC::JSValue jsHTMLInputElementMultiple(JSC::ExecState*, const JSC::Identifier&, void setJSHTMLInputElementMultiple(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLInputElementName(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSHTMLInputElementName(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); +JSC::JSValue jsHTMLInputElementPattern(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSHTMLInputElementPattern(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLInputElementPlaceholder(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSHTMLInputElementPlaceholder(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLInputElementReadOnly(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSHTMLInputElementReadOnly(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); +JSC::JSValue jsHTMLInputElementRequired(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSHTMLInputElementRequired(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLInputElementSize(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSHTMLInputElementSize(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLInputElementSrc(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp index 6322e515cf..b937fb5832 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLIsIndexElementConstructorTable = { 1, 0, JSHTMLIsIndexElementConstructorTableValues, 0 }; #endif -class JSHTMLIsIndexElementConstructor : public DOMObject { +class JSHTMLIsIndexElementConstructor : public DOMConstructorObject { public: - JSHTMLIsIndexElementConstructor(ExecState* exec) - : DOMObject(JSHTMLIsIndexElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLIsIndexElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLIsIndexElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLIsIndexElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLIsIndexElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSHTMLIsIndexElementPrototype::self(ExecState* exec, JSGlobalObject* g const ClassInfo JSHTMLIsIndexElement::s_info = { "HTMLIsIndexElement", &JSHTMLInputElement::s_info, &JSHTMLIsIndexElementTable, 0 }; -JSHTMLIsIndexElement::JSHTMLIsIndexElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLIsIndexElement> impl) - : JSHTMLInputElement(structure, impl) +JSHTMLIsIndexElement::JSHTMLIsIndexElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLIsIndexElement> impl) + : JSHTMLInputElement(structure, globalObject, impl) { } @@ -129,21 +129,24 @@ bool JSHTMLIsIndexElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLIsIndexElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIsIndexElement* castedThis = static_cast<JSHTMLIsIndexElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIsIndexElement* imp = static_cast<HTMLIsIndexElement*>(static_cast<JSHTMLIsIndexElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLIsIndexElement* imp = static_cast<HTMLIsIndexElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLIsIndexElementPrompt(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLIsIndexElement* castedThis = static_cast<JSHTMLIsIndexElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLIsIndexElement* imp = static_cast<HTMLIsIndexElement*>(static_cast<JSHTMLIsIndexElement*>(asObject(slot.slotBase()))->impl()); + HTMLIsIndexElement* imp = static_cast<HTMLIsIndexElement*>(castedThis->impl()); return jsString(exec, imp->prompt()); } JSValue jsHTMLIsIndexElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLIsIndexElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLIsIndexElement* domObject = static_cast<JSHTMLIsIndexElement*>(asObject(slot.slotBase())); + return JSHTMLIsIndexElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLIsIndexElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -156,9 +159,9 @@ void setJSHTMLIsIndexElementPrompt(ExecState* exec, JSObject* thisObject, JSValu imp->setPrompt(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLIsIndexElement::getConstructor(ExecState* exec) +JSValue JSHTMLIsIndexElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLIsIndexElementConstructor>(exec); + return getDOMConstructor<JSHTMLIsIndexElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.h index a4a3363c27..335e785750 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.h @@ -30,7 +30,7 @@ class HTMLIsIndexElement; class JSHTMLIsIndexElement : public JSHTMLInputElement { typedef JSHTMLInputElement Base; public: - JSHTMLIsIndexElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLIsIndexElement>); + JSHTMLIsIndexElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLIsIndexElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp index 14ba46454e..f82c7b0327 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp @@ -64,12 +64,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLLIElementConstructorTable = { 1, 0, JSHTMLLIElementConstructorTableValues, 0 }; #endif -class JSHTMLLIElementConstructor : public DOMObject { +class JSHTMLLIElementConstructor : public DOMConstructorObject { public: - JSHTMLLIElementConstructor(ExecState* exec) - : DOMObject(JSHTMLLIElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLLIElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLLIElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLLIElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLLIElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -111,8 +111,8 @@ JSObject* JSHTMLLIElementPrototype::self(ExecState* exec, JSGlobalObject* global const ClassInfo JSHTMLLIElement::s_info = { "HTMLLIElement", &JSHTMLElement::s_info, &JSHTMLLIElementTable, 0 }; -JSHTMLLIElement::JSHTMLLIElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLLIElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLLIElement::JSHTMLLIElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLIElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -128,21 +128,24 @@ bool JSHTMLLIElement::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsHTMLLIElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLIElement* castedThis = static_cast<JSHTMLLIElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLIElement* imp = static_cast<HTMLLIElement*>(static_cast<JSHTMLLIElement*>(asObject(slot.slotBase()))->impl()); + HTMLLIElement* imp = static_cast<HTMLLIElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLLIElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLIElement* castedThis = static_cast<JSHTMLLIElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLIElement* imp = static_cast<HTMLLIElement*>(static_cast<JSHTMLLIElement*>(asObject(slot.slotBase()))->impl()); + HTMLLIElement* imp = static_cast<HTMLLIElement*>(castedThis->impl()); return jsNumber(exec, imp->value()); } JSValue jsHTMLLIElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLLIElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLLIElement* domObject = static_cast<JSHTMLLIElement*>(asObject(slot.slotBase())); + return JSHTMLLIElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLLIElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -161,9 +164,9 @@ void setJSHTMLLIElementValue(ExecState* exec, JSObject* thisObject, JSValue valu imp->setValue(value.toInt32(exec)); } -JSValue JSHTMLLIElement::getConstructor(ExecState* exec) +JSValue JSHTMLLIElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLLIElementConstructor>(exec); + return getDOMConstructor<JSHTMLLIElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.h index 1c3ffcd2f2..92ee1a6ace 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.h @@ -30,7 +30,7 @@ class HTMLLIElement; class JSHTMLLIElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLLIElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLLIElement>); + JSHTMLLIElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLLIElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp index 37c7c76714..c765a38c0c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLLabelElementConstructorTable = { 1, 0, JSHTMLLabelElementConstructorTableValues, 0 }; #endif -class JSHTMLLabelElementConstructor : public DOMObject { +class JSHTMLLabelElementConstructor : public DOMConstructorObject { public: - JSHTMLLabelElementConstructor(ExecState* exec) - : DOMObject(JSHTMLLabelElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLLabelElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLLabelElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLLabelElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLLabelElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -113,8 +113,8 @@ JSObject* JSHTMLLabelElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLLabelElement::s_info = { "HTMLLabelElement", &JSHTMLElement::s_info, &JSHTMLLabelElementTable, 0 }; -JSHTMLLabelElement::JSHTMLLabelElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLLabelElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLLabelElement::JSHTMLLabelElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLabelElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -130,28 +130,32 @@ bool JSHTMLLabelElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLLabelElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(static_cast<JSHTMLLabelElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLLabelElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(static_cast<JSHTMLLabelElement*>(asObject(slot.slotBase()))->impl()); + HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl()); return jsString(exec, imp->accessKey()); } JSValue jsHTMLLabelElementHtmlFor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLabelElement* castedThis = static_cast<JSHTMLLabelElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(static_cast<JSHTMLLabelElement*>(asObject(slot.slotBase()))->impl()); + HTMLLabelElement* imp = static_cast<HTMLLabelElement*>(castedThis->impl()); return jsString(exec, imp->htmlFor()); } JSValue jsHTMLLabelElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLLabelElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLLabelElement* domObject = static_cast<JSHTMLLabelElement*>(asObject(slot.slotBase())); + return JSHTMLLabelElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLLabelElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -170,9 +174,9 @@ void setJSHTMLLabelElementHtmlFor(ExecState* exec, JSObject* thisObject, JSValue imp->setHtmlFor(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLLabelElement::getConstructor(ExecState* exec) +JSValue JSHTMLLabelElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLLabelElementConstructor>(exec); + return getDOMConstructor<JSHTMLLabelElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.h index 32eb0569be..4ec25cc949 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.h @@ -30,7 +30,7 @@ class HTMLLabelElement; class JSHTMLLabelElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLLabelElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLLabelElement>); + JSHTMLLabelElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLLabelElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp index b3b985a9f7..1094cf4eea 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLLegendElementConstructorTable = { 1, 0, JSHTMLLegendElementConstructorTableValues, 0 }; #endif -class JSHTMLLegendElementConstructor : public DOMObject { +class JSHTMLLegendElementConstructor : public DOMConstructorObject { public: - JSHTMLLegendElementConstructor(ExecState* exec) - : DOMObject(JSHTMLLegendElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLLegendElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLLegendElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLLegendElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLLegendElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -113,8 +113,8 @@ JSObject* JSHTMLLegendElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSHTMLLegendElement::s_info = { "HTMLLegendElement", &JSHTMLElement::s_info, &JSHTMLLegendElementTable, 0 }; -JSHTMLLegendElement::JSHTMLLegendElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLLegendElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLLegendElement::JSHTMLLegendElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLegendElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -130,28 +130,32 @@ bool JSHTMLLegendElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLLegendElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(static_cast<JSHTMLLegendElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLLegendElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(static_cast<JSHTMLLegendElement*>(asObject(slot.slotBase()))->impl()); + HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl()); return jsString(exec, imp->accessKey()); } JSValue jsHTMLLegendElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLegendElement* castedThis = static_cast<JSHTMLLegendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(static_cast<JSHTMLLegendElement*>(asObject(slot.slotBase()))->impl()); + HTMLLegendElement* imp = static_cast<HTMLLegendElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLLegendElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLLegendElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLLegendElement* domObject = static_cast<JSHTMLLegendElement*>(asObject(slot.slotBase())); + return JSHTMLLegendElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLLegendElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -170,9 +174,9 @@ void setJSHTMLLegendElementAlign(ExecState* exec, JSObject* thisObject, JSValue imp->setAlign(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLLegendElement::getConstructor(ExecState* exec) +JSValue JSHTMLLegendElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLLegendElementConstructor>(exec); + return getDOMConstructor<JSHTMLLegendElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.h index 9f0b2c2ca6..507a8ba575 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.h @@ -30,7 +30,7 @@ class HTMLLegendElement; class JSHTMLLegendElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLLegendElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLLegendElement>); + JSHTMLLegendElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLLegendElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp index d6bf6340ff..616387201c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp @@ -73,12 +73,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLLinkElementConstructorTable = { 1, 0, JSHTMLLinkElementConstructorTableValues, 0 }; #endif -class JSHTMLLinkElementConstructor : public DOMObject { +class JSHTMLLinkElementConstructor : public DOMConstructorObject { public: - JSHTMLLinkElementConstructor(ExecState* exec) - : DOMObject(JSHTMLLinkElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLLinkElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLLinkElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLLinkElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLLinkElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -120,8 +120,8 @@ JSObject* JSHTMLLinkElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLLinkElement::s_info = { "HTMLLinkElement", &JSHTMLElement::s_info, &JSHTMLLinkElementTable, 0 }; -JSHTMLLinkElement::JSHTMLLinkElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLLinkElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLLinkElement::JSHTMLLinkElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLLinkElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -137,77 +137,88 @@ bool JSHTMLLinkElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLLinkElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLLinkElementCharset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsString(exec, imp->charset()); } JSValue jsHTMLLinkElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsString(exec, imp->href()); } JSValue jsHTMLLinkElementHreflang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsString(exec, imp->hreflang()); } JSValue jsHTMLLinkElementMedia(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsString(exec, imp->media()); } JSValue jsHTMLLinkElementRel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsString(exec, imp->rel()); } JSValue jsHTMLLinkElementRev(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsString(exec, imp->rev()); } JSValue jsHTMLLinkElementTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsString(exec, imp->target()); } JSValue jsHTMLLinkElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLLinkElementSheet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLLinkElement* castedThis = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->sheet())); + HTMLLinkElement* imp = static_cast<HTMLLinkElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->sheet())); } JSValue jsHTMLLinkElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLLinkElement* domObject = static_cast<JSHTMLLinkElement*>(asObject(slot.slotBase())); + return JSHTMLLinkElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLLinkElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -268,9 +279,9 @@ void setJSHTMLLinkElementType(ExecState* exec, JSObject* thisObject, JSValue val imp->setType(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLLinkElement::getConstructor(ExecState* exec) +JSValue JSHTMLLinkElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLLinkElementConstructor>(exec); + return getDOMConstructor<JSHTMLLinkElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.h index d1bb4de458..4d3e094bda 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.h @@ -30,7 +30,7 @@ class HTMLLinkElement; class JSHTMLLinkElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLLinkElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLLinkElement>); + JSHTMLLinkElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLLinkElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp index 9c9345f6a6..ab7fcd61a6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLMapElementConstructorTable = { 1, 0, JSHTMLMapElementConstructorTableValues, 0 }; #endif -class JSHTMLMapElementConstructor : public DOMObject { +class JSHTMLMapElementConstructor : public DOMConstructorObject { public: - JSHTMLMapElementConstructor(ExecState* exec) - : DOMObject(JSHTMLMapElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLMapElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLMapElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLMapElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLMapElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSHTMLMapElementPrototype::self(ExecState* exec, JSGlobalObject* globa const ClassInfo JSHTMLMapElement::s_info = { "HTMLMapElement", &JSHTMLElement::s_info, &JSHTMLMapElementTable, 0 }; -JSHTMLMapElement::JSHTMLMapElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLMapElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLMapElement::JSHTMLMapElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLMapElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -129,21 +129,24 @@ bool JSHTMLMapElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsHTMLMapElementAreas(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMapElement* castedThis = static_cast<JSHTMLMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMapElement* imp = static_cast<HTMLMapElement*>(static_cast<JSHTMLMapElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->areas())); + HTMLMapElement* imp = static_cast<HTMLMapElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->areas())); } JSValue jsHTMLMapElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMapElement* castedThis = static_cast<JSHTMLMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMapElement* imp = static_cast<HTMLMapElement*>(static_cast<JSHTMLMapElement*>(asObject(slot.slotBase()))->impl()); + HTMLMapElement* imp = static_cast<HTMLMapElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLMapElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLMapElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLMapElement* domObject = static_cast<JSHTMLMapElement*>(asObject(slot.slotBase())); + return JSHTMLMapElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLMapElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -156,9 +159,9 @@ void setJSHTMLMapElementName(ExecState* exec, JSObject* thisObject, JSValue valu imp->setName(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLMapElement::getConstructor(ExecState* exec) +JSValue JSHTMLMapElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLMapElementConstructor>(exec); + return getDOMConstructor<JSHTMLMapElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.h index 8476c3a662..23d3a90ccb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.h @@ -30,7 +30,7 @@ class HTMLMapElement; class JSHTMLMapElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLMapElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLMapElement>); + JSHTMLMapElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLMapElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp index 2e8c6d3578..be92487a15 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp @@ -60,12 +60,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLMarqueeElementConstructorTable = { 1, 0, JSHTMLMarqueeElementConstructorTableValues, 0 }; #endif -class JSHTMLMarqueeElementConstructor : public DOMObject { +class JSHTMLMarqueeElementConstructor : public DOMConstructorObject { public: - JSHTMLMarqueeElementConstructor(ExecState* exec) - : DOMObject(JSHTMLMarqueeElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLMarqueeElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLMarqueeElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLMarqueeElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLMarqueeElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -114,8 +114,8 @@ bool JSHTMLMarqueeElementPrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSHTMLMarqueeElement::s_info = { "HTMLMarqueeElement", &JSHTMLElement::s_info, &JSHTMLMarqueeElementTable, 0 }; -JSHTMLMarqueeElement::JSHTMLMarqueeElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLMarqueeElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLMarqueeElement::JSHTMLMarqueeElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLMarqueeElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -131,11 +131,12 @@ bool JSHTMLMarqueeElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLMarqueeElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLMarqueeElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLMarqueeElement* domObject = static_cast<JSHTMLMarqueeElement*>(asObject(slot.slotBase())); + return JSHTMLMarqueeElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSHTMLMarqueeElement::getConstructor(ExecState* exec) +JSValue JSHTMLMarqueeElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLMarqueeElementConstructor>(exec); + return getDOMConstructor<JSHTMLMarqueeElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLMarqueeElementPrototypeFunctionStart(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.h index 238b8d34ed..b1ec1afc84 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.h @@ -30,7 +30,7 @@ class HTMLMarqueeElement; class JSHTMLMarqueeElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLMarqueeElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLMarqueeElement>); + JSHTMLMarqueeElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLMarqueeElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp index c3c74d385e..2778b6e08e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp @@ -103,12 +103,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLMediaElementConstructorTable = { 33, 31, JSHTMLMediaElementConstructorTableValues, 0 }; #endif -class JSHTMLMediaElementConstructor : public DOMObject { +class JSHTMLMediaElementConstructor : public DOMConstructorObject { public: - JSHTMLMediaElementConstructor(ExecState* exec) - : DOMObject(JSHTMLMediaElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLMediaElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLMediaElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLMediaElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLMediaElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -169,8 +169,8 @@ bool JSHTMLMediaElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSHTMLMediaElement::s_info = { "HTMLMediaElement", &JSHTMLElement::s_info, &JSHTMLMediaElementTable, 0 }; -JSHTMLMediaElement::JSHTMLMediaElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLMediaElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLMediaElement::JSHTMLMediaElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLMediaElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -186,168 +186,192 @@ bool JSHTMLMediaElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLMediaElementError(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->error())); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->error())); } JSValue jsHTMLMediaElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsString(exec, imp->src()); } JSValue jsHTMLMediaElementCurrentSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsString(exec, imp->currentSrc()); } JSValue jsHTMLMediaElementNetworkState(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsNumber(exec, imp->networkState()); } JSValue jsHTMLMediaElementAutobuffer(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->autobuffer()); } JSValue jsHTMLMediaElementBuffered(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->buffered())); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->buffered())); } JSValue jsHTMLMediaElementReadyState(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsNumber(exec, imp->readyState()); } JSValue jsHTMLMediaElementSeeking(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->seeking()); } JSValue jsHTMLMediaElementCurrentTime(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsNumber(exec, imp->currentTime()); } JSValue jsHTMLMediaElementStartTime(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsNumber(exec, imp->startTime()); } JSValue jsHTMLMediaElementDuration(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsNumber(exec, imp->duration()); } JSValue jsHTMLMediaElementPaused(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->paused()); } JSValue jsHTMLMediaElementDefaultPlaybackRate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsNumber(exec, imp->defaultPlaybackRate()); } JSValue jsHTMLMediaElementPlaybackRate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsNumber(exec, imp->playbackRate()); } JSValue jsHTMLMediaElementPlayed(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->played())); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->played())); } JSValue jsHTMLMediaElementSeekable(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->seekable())); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->seekable())); } JSValue jsHTMLMediaElementEnded(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->ended()); } JSValue jsHTMLMediaElementAutoplay(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->autoplay()); } JSValue jsHTMLMediaElementLoop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->loop()); } JSValue jsHTMLMediaElementControls(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->controls()); } JSValue jsHTMLMediaElementVolume(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsNumber(exec, imp->volume()); } JSValue jsHTMLMediaElementMuted(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->muted()); } JSValue jsHTMLMediaElementWebkitPreservesPitch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMediaElement* castedThis = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMediaElement* imp = static_cast<HTMLMediaElement*>(castedThis->impl()); return jsBoolean(imp->webkitPreservesPitch()); } JSValue jsHTMLMediaElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLMediaElement* domObject = static_cast<JSHTMLMediaElement*>(asObject(slot.slotBase())); + return JSHTMLMediaElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLMediaElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -424,9 +448,9 @@ void setJSHTMLMediaElementWebkitPreservesPitch(ExecState* exec, JSObject* thisOb imp->setWebkitPreservesPitch(value.toBoolean(exec)); } -JSValue JSHTMLMediaElement::getConstructor(ExecState* exec) +JSValue JSHTMLMediaElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLMediaElementConstructor>(exec); + return getDOMConstructor<JSHTMLMediaElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLMediaElementPrototypeFunctionLoad(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.h index c0fb829b43..01e1e10f82 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.h @@ -32,7 +32,7 @@ class HTMLMediaElement; class JSHTMLMediaElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLMediaElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLMediaElement>); + JSHTMLMediaElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLMediaElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp index e658ed8439..5319a46886 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp @@ -60,12 +60,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLMenuElementConstructorTable = { 1, 0, JSHTMLMenuElementConstructorTableValues, 0 }; #endif -class JSHTMLMenuElementConstructor : public DOMObject { +class JSHTMLMenuElementConstructor : public DOMConstructorObject { public: - JSHTMLMenuElementConstructor(ExecState* exec) - : DOMObject(JSHTMLMenuElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLMenuElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLMenuElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLMenuElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLMenuElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -107,8 +107,8 @@ JSObject* JSHTMLMenuElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLMenuElement::s_info = { "HTMLMenuElement", &JSHTMLElement::s_info, &JSHTMLMenuElementTable, 0 }; -JSHTMLMenuElement::JSHTMLMenuElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLMenuElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLMenuElement::JSHTMLMenuElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLMenuElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -124,14 +124,16 @@ bool JSHTMLMenuElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLMenuElementCompact(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMenuElement* castedThis = static_cast<JSHTMLMenuElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMenuElement* imp = static_cast<HTMLMenuElement*>(static_cast<JSHTMLMenuElement*>(asObject(slot.slotBase()))->impl()); + HTMLMenuElement* imp = static_cast<HTMLMenuElement*>(castedThis->impl()); return jsBoolean(imp->compact()); } JSValue jsHTMLMenuElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLMenuElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLMenuElement* domObject = static_cast<JSHTMLMenuElement*>(asObject(slot.slotBase())); + return JSHTMLMenuElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLMenuElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -144,9 +146,9 @@ void setJSHTMLMenuElementCompact(ExecState* exec, JSObject* thisObject, JSValue imp->setCompact(value.toBoolean(exec)); } -JSValue JSHTMLMenuElement::getConstructor(ExecState* exec) +JSValue JSHTMLMenuElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLMenuElementConstructor>(exec); + return getDOMConstructor<JSHTMLMenuElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.h index ca9321c191..0002e55bb8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.h @@ -30,7 +30,7 @@ class HTMLMenuElement; class JSHTMLMenuElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLMenuElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLMenuElement>); + JSHTMLMenuElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLMenuElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp index 6b2652013b..c1df168517 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLMetaElementConstructorTable = { 1, 0, JSHTMLMetaElementConstructorTableValues, 0 }; #endif -class JSHTMLMetaElementConstructor : public DOMObject { +class JSHTMLMetaElementConstructor : public DOMConstructorObject { public: - JSHTMLMetaElementConstructor(ExecState* exec) - : DOMObject(JSHTMLMetaElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLMetaElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLMetaElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLMetaElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLMetaElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSHTMLMetaElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSHTMLMetaElement::s_info = { "HTMLMetaElement", &JSHTMLElement::s_info, &JSHTMLMetaElementTable, 0 }; -JSHTMLMetaElement::JSHTMLMetaElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLMetaElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLMetaElement::JSHTMLMetaElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLMetaElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -129,35 +129,40 @@ bool JSHTMLMetaElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsHTMLMetaElementContent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMetaElement* castedThis = static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMetaElement* imp = static_cast<HTMLMetaElement*>(static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMetaElement* imp = static_cast<HTMLMetaElement*>(castedThis->impl()); return jsString(exec, imp->content()); } JSValue jsHTMLMetaElementHttpEquiv(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMetaElement* castedThis = static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMetaElement* imp = static_cast<HTMLMetaElement*>(static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMetaElement* imp = static_cast<HTMLMetaElement*>(castedThis->impl()); return jsString(exec, imp->httpEquiv()); } JSValue jsHTMLMetaElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMetaElement* castedThis = static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMetaElement* imp = static_cast<HTMLMetaElement*>(static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMetaElement* imp = static_cast<HTMLMetaElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLMetaElementScheme(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLMetaElement* castedThis = static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLMetaElement* imp = static_cast<HTMLMetaElement*>(static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase()))->impl()); + HTMLMetaElement* imp = static_cast<HTMLMetaElement*>(castedThis->impl()); return jsString(exec, imp->scheme()); } JSValue jsHTMLMetaElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLMetaElement* domObject = static_cast<JSHTMLMetaElement*>(asObject(slot.slotBase())); + return JSHTMLMetaElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLMetaElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -188,9 +193,9 @@ void setJSHTMLMetaElementScheme(ExecState* exec, JSObject* thisObject, JSValue v imp->setScheme(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLMetaElement::getConstructor(ExecState* exec) +JSValue JSHTMLMetaElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLMetaElementConstructor>(exec); + return getDOMConstructor<JSHTMLMetaElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.h index ee531c5d7d..acb73af0fc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.h @@ -30,7 +30,7 @@ class HTMLMetaElement; class JSHTMLMetaElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLMetaElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLMetaElement>); + JSHTMLMetaElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLMetaElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp index ded7e9f0d1..27b71e9007 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp @@ -63,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLModElementConstructorTable = { 1, 0, JSHTMLModElementConstructorTableValues, 0 }; #endif -class JSHTMLModElementConstructor : public DOMObject { +class JSHTMLModElementConstructor : public DOMConstructorObject { public: - JSHTMLModElementConstructor(ExecState* exec) - : DOMObject(JSHTMLModElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLModElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLModElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLModElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLModElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -110,8 +110,8 @@ JSObject* JSHTMLModElementPrototype::self(ExecState* exec, JSGlobalObject* globa const ClassInfo JSHTMLModElement::s_info = { "HTMLModElement", &JSHTMLElement::s_info, &JSHTMLModElementTable, 0 }; -JSHTMLModElement::JSHTMLModElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLModElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLModElement::JSHTMLModElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLModElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -127,21 +127,24 @@ bool JSHTMLModElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsHTMLModElementCite(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLModElement* castedThis = static_cast<JSHTMLModElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLModElement* imp = static_cast<HTMLModElement*>(static_cast<JSHTMLModElement*>(asObject(slot.slotBase()))->impl()); + HTMLModElement* imp = static_cast<HTMLModElement*>(castedThis->impl()); return jsString(exec, imp->cite()); } JSValue jsHTMLModElementDateTime(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLModElement* castedThis = static_cast<JSHTMLModElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLModElement* imp = static_cast<HTMLModElement*>(static_cast<JSHTMLModElement*>(asObject(slot.slotBase()))->impl()); + HTMLModElement* imp = static_cast<HTMLModElement*>(castedThis->impl()); return jsString(exec, imp->dateTime()); } JSValue jsHTMLModElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLModElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLModElement* domObject = static_cast<JSHTMLModElement*>(asObject(slot.slotBase())); + return JSHTMLModElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLModElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -160,9 +163,9 @@ void setJSHTMLModElementDateTime(ExecState* exec, JSObject* thisObject, JSValue imp->setDateTime(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLModElement::getConstructor(ExecState* exec) +JSValue JSHTMLModElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLModElementConstructor>(exec); + return getDOMConstructor<JSHTMLModElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.h index 67b6e0236c..b9cfe5b99f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.h @@ -30,7 +30,7 @@ class HTMLModElement; class JSHTMLModElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLModElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLModElement>); + JSHTMLModElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLModElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp index 63b781c574..189107c0a3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLOListElementConstructorTable = { 1, 0, JSHTMLOListElementConstructorTableValues, 0 }; #endif -class JSHTMLOListElementConstructor : public DOMObject { +class JSHTMLOListElementConstructor : public DOMConstructorObject { public: - JSHTMLOListElementConstructor(ExecState* exec) - : DOMObject(JSHTMLOListElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLOListElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLOListElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLOListElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLOListElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSHTMLOListElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLOListElement::s_info = { "HTMLOListElement", &JSHTMLElement::s_info, &JSHTMLOListElementTable, 0 }; -JSHTMLOListElement::JSHTMLOListElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLOListElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLOListElement::JSHTMLOListElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLOListElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -129,28 +129,32 @@ bool JSHTMLOListElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLOListElementCompact(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOListElement* imp = static_cast<HTMLOListElement*>(static_cast<JSHTMLOListElement*>(asObject(slot.slotBase()))->impl()); + HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl()); return jsBoolean(imp->compact()); } JSValue jsHTMLOListElementStart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOListElement* imp = static_cast<HTMLOListElement*>(static_cast<JSHTMLOListElement*>(asObject(slot.slotBase()))->impl()); + HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl()); return jsNumber(exec, imp->start()); } JSValue jsHTMLOListElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOListElement* imp = static_cast<HTMLOListElement*>(static_cast<JSHTMLOListElement*>(asObject(slot.slotBase()))->impl()); + HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLOListElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLOListElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLOListElement* domObject = static_cast<JSHTMLOListElement*>(asObject(slot.slotBase())); + return JSHTMLOListElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLOListElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -175,9 +179,9 @@ void setJSHTMLOListElementType(ExecState* exec, JSObject* thisObject, JSValue va imp->setType(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLOListElement::getConstructor(ExecState* exec) +JSValue JSHTMLOListElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLOListElementConstructor>(exec); + return getDOMConstructor<JSHTMLOListElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.h index e7cfac5386..57dcb6afd1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.h @@ -30,7 +30,7 @@ class HTMLOListElement; class JSHTMLOListElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLOListElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLOListElement>); + JSHTMLOListElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLOListElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp index c9f7102538..4ca8e94b64 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp @@ -90,12 +90,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLObjectElementConstructorTable = { 1, 0, JSHTMLObjectElementConstructorTableValues, 0 }; #endif -class JSHTMLObjectElementConstructor : public DOMObject { +class JSHTMLObjectElementConstructor : public DOMConstructorObject { public: - JSHTMLObjectElementConstructor(ExecState* exec) - : DOMObject(JSHTMLObjectElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLObjectElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLObjectElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLObjectElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLObjectElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -143,8 +143,8 @@ bool JSHTMLObjectElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSHTMLObjectElement::s_info = { "HTMLObjectElement", &JSHTMLElement::s_info, &JSHTMLObjectElementTable, 0 }; -JSHTMLObjectElement::JSHTMLObjectElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLObjectElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLObjectElement::JSHTMLObjectElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLObjectElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -166,132 +166,151 @@ bool JSHTMLObjectElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLObjectElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLObjectElementCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->code()); } JSValue jsHTMLObjectElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLObjectElementArchive(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->archive()); } JSValue jsHTMLObjectElementBorder(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->border()); } JSValue jsHTMLObjectElementCodeBase(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->codeBase()); } JSValue jsHTMLObjectElementCodeType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->codeType()); } JSValue jsHTMLObjectElementData(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->data()); } JSValue jsHTMLObjectElementDeclare(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsBoolean(imp->declare()); } JSValue jsHTMLObjectElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->height()); } JSValue jsHTMLObjectElementHspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsNumber(exec, imp->hspace()); } JSValue jsHTMLObjectElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLObjectElementStandby(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->standby()); } JSValue jsHTMLObjectElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLObjectElementUseMap(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->useMap()); } JSValue jsHTMLObjectElementVspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsNumber(exec, imp->vspace()); } JSValue jsHTMLObjectElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); return jsString(exec, imp->width()); } JSValue jsHTMLObjectElementContentDocument(ExecState* exec, const Identifier&, const PropertySlot& slot) { - HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->impl()); - return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, WTF::getPtr(imp->contentDocument())) : jsUndefined(); + JSHTMLObjectElement* castedThis = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); + HTMLObjectElement* imp = static_cast<HTMLObjectElement*>(castedThis->impl()); + return checkNodeSecurity(exec, imp->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->contentDocument())) : jsUndefined(); } JSValue jsHTMLObjectElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLObjectElement* domObject = static_cast<JSHTMLObjectElement*>(asObject(slot.slotBase())); + return JSHTMLObjectElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLObjectElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -396,9 +415,9 @@ void setJSHTMLObjectElementWidth(ExecState* exec, JSObject* thisObject, JSValue imp->setWidth(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLObjectElement::getConstructor(ExecState* exec) +JSValue JSHTMLObjectElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLObjectElementConstructor>(exec); + return getDOMConstructor<JSHTMLObjectElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLObjectElementPrototypeFunctionGetSVGDocument(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -413,7 +432,7 @@ JSValue JSC_HOST_CALL jsHTMLObjectElementPrototypeFunctionGetSVGDocument(ExecSta return jsUndefined(); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getSVGDocument(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getSVGDocument(ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.h index 5e9d01c68f..7414b0cb82 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.h @@ -31,7 +31,7 @@ class HTMLObjectElement; class JSHTMLObjectElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLObjectElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLObjectElement>); + JSHTMLObjectElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLObjectElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); @@ -47,7 +47,7 @@ public: virtual JSC::CallType getCallData(JSC::CallData&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); private: static bool canGetItemsForName(JSC::ExecState*, HTMLObjectElement*, const JSC::Identifier&); static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp index 4b651c4e31..0ed746ecaf 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp @@ -63,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLOptGroupElementConstructorTable = { 1, 0, JSHTMLOptGroupElementConstructorTableValues, 0 }; #endif -class JSHTMLOptGroupElementConstructor : public DOMObject { +class JSHTMLOptGroupElementConstructor : public DOMConstructorObject { public: - JSHTMLOptGroupElementConstructor(ExecState* exec) - : DOMObject(JSHTMLOptGroupElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLOptGroupElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLOptGroupElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLOptGroupElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLOptGroupElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -110,8 +110,8 @@ JSObject* JSHTMLOptGroupElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLOptGroupElement::s_info = { "HTMLOptGroupElement", &JSHTMLElement::s_info, &JSHTMLOptGroupElementTable, 0 }; -JSHTMLOptGroupElement::JSHTMLOptGroupElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLOptGroupElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLOptGroupElement::JSHTMLOptGroupElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLOptGroupElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -127,21 +127,24 @@ bool JSHTMLOptGroupElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsHTMLOptGroupElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptGroupElement* castedThis = static_cast<JSHTMLOptGroupElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptGroupElement* imp = static_cast<HTMLOptGroupElement*>(static_cast<JSHTMLOptGroupElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptGroupElement* imp = static_cast<HTMLOptGroupElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLOptGroupElementLabel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptGroupElement* castedThis = static_cast<JSHTMLOptGroupElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptGroupElement* imp = static_cast<HTMLOptGroupElement*>(static_cast<JSHTMLOptGroupElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptGroupElement* imp = static_cast<HTMLOptGroupElement*>(castedThis->impl()); return jsString(exec, imp->label()); } JSValue jsHTMLOptGroupElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLOptGroupElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLOptGroupElement* domObject = static_cast<JSHTMLOptGroupElement*>(asObject(slot.slotBase())); + return JSHTMLOptGroupElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLOptGroupElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -160,9 +163,9 @@ void setJSHTMLOptGroupElementLabel(ExecState* exec, JSObject* thisObject, JSValu imp->setLabel(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLOptGroupElement::getConstructor(ExecState* exec) +JSValue JSHTMLOptGroupElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLOptGroupElementConstructor>(exec); + return getDOMConstructor<JSHTMLOptGroupElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.h index 44cfa44165..d489b26b29 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.h @@ -30,7 +30,7 @@ class HTMLOptGroupElement; class JSHTMLOptGroupElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLOptGroupElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLOptGroupElement>); + JSHTMLOptGroupElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLOptGroupElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp index 4c9b51a5ce..65d92e610d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp @@ -72,12 +72,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLOptionElementConstructorTable = { 1, 0, JSHTMLOptionElementConstructorTableValues, 0 }; #endif -class JSHTMLOptionElementConstructor : public DOMObject { +class JSHTMLOptionElementConstructor : public DOMConstructorObject { public: - JSHTMLOptionElementConstructor(ExecState* exec) - : DOMObject(JSHTMLOptionElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLOptionElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLOptionElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLOptionElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLOptionElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -119,8 +119,8 @@ JSObject* JSHTMLOptionElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSHTMLOptionElement::s_info = { "HTMLOptionElement", &JSHTMLElement::s_info, &JSHTMLOptionElementTable, 0 }; -JSHTMLOptionElement::JSHTMLOptionElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLOptionElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLOptionElement::JSHTMLOptionElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLOptionElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -136,63 +136,72 @@ bool JSHTMLOptionElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLOptionElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionElement* castedThis = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLOptionElementDefaultSelected(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionElement* castedThis = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(castedThis->impl()); return jsBoolean(imp->defaultSelected()); } JSValue jsHTMLOptionElementText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionElement* castedThis = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(castedThis->impl()); return jsString(exec, imp->text()); } JSValue jsHTMLOptionElementIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionElement* castedThis = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(castedThis->impl()); return jsNumber(exec, imp->index()); } JSValue jsHTMLOptionElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionElement* castedThis = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLOptionElementLabel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionElement* castedThis = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(castedThis->impl()); return jsString(exec, imp->label()); } JSValue jsHTMLOptionElementSelected(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionElement* castedThis = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(castedThis->impl()); return jsBoolean(imp->selected()); } JSValue jsHTMLOptionElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionElement* castedThis = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->impl()); + HTMLOptionElement* imp = static_cast<HTMLOptionElement*>(castedThis->impl()); return jsString(exec, imp->value()); } JSValue jsHTMLOptionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLOptionElement* domObject = static_cast<JSHTMLOptionElement*>(asObject(slot.slotBase())); + return JSHTMLOptionElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLOptionElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -237,9 +246,9 @@ void setJSHTMLOptionElementValue(ExecState* exec, JSObject* thisObject, JSValue imp->setValue(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLOptionElement::getConstructor(ExecState* exec) +JSValue JSHTMLOptionElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLOptionElementConstructor>(exec); + return getDOMConstructor<JSHTMLOptionElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } HTMLOptionElement* toHTMLOptionElement(JSC::JSValue value) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.h index d9bd33843d..be931837fc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.h @@ -31,7 +31,7 @@ class HTMLOptionElement; class JSHTMLOptionElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLOptionElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLOptionElement>); + JSHTMLOptionElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLOptionElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -43,7 +43,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); HTMLOptionElement* impl() const { return static_cast<HTMLOptionElement*>(Base::impl()); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp index b9e8d15d2a..bebf56ac25 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp @@ -78,8 +78,8 @@ bool JSHTMLOptionsCollectionPrototype::getOwnPropertySlot(ExecState* exec, const const ClassInfo JSHTMLOptionsCollection::s_info = { "HTMLOptionsCollection", &JSHTMLCollection::s_info, &JSHTMLOptionsCollectionTable, 0 }; -JSHTMLOptionsCollection::JSHTMLOptionsCollection(PassRefPtr<Structure> structure, PassRefPtr<HTMLOptionsCollection> impl) - : JSHTMLCollection(structure, impl) +JSHTMLOptionsCollection::JSHTMLOptionsCollection(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLOptionsCollection> impl) + : JSHTMLCollection(structure, globalObject, impl) { } @@ -95,14 +95,16 @@ bool JSHTMLOptionsCollection::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsHTMLOptionsCollectionSelectedIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLOptionsCollection* castedThis = static_cast<JSHTMLOptionsCollection*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(static_cast<JSHTMLOptionsCollection*>(asObject(slot.slotBase()))->impl()); + HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(castedThis->impl()); return jsNumber(exec, imp->selectedIndex()); } JSValue jsHTMLOptionsCollectionLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLOptionsCollection*>(asObject(slot.slotBase()))->length(exec); + JSHTMLOptionsCollection* castedThis = static_cast<JSHTMLOptionsCollection*>(asObject(slot.slotBase())); + return castedThis->length(exec); } void JSHTMLOptionsCollection::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.h index 40d89f609c..de86695468 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.h @@ -31,7 +31,7 @@ class HTMLOptionsCollection; class JSHTMLOptionsCollection : public JSHTMLCollection { typedef JSHTMLCollection Base; public: - JSHTMLOptionsCollection(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLOptionsCollection>); + JSHTMLOptionsCollection(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLOptionsCollection>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp index b267dc211c..f8e9fd617f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLParagraphElementConstructorTable = { 1, 0, JSHTMLParagraphElementConstructorTableValues, 0 }; #endif -class JSHTMLParagraphElementConstructor : public DOMObject { +class JSHTMLParagraphElementConstructor : public DOMConstructorObject { public: - JSHTMLParagraphElementConstructor(ExecState* exec) - : DOMObject(JSHTMLParagraphElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLParagraphElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLParagraphElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLParagraphElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLParagraphElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLParagraphElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLParagraphElement::s_info = { "HTMLParagraphElement", &JSHTMLElement::s_info, &JSHTMLParagraphElementTable, 0 }; -JSHTMLParagraphElement::JSHTMLParagraphElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLParagraphElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLParagraphElement::JSHTMLParagraphElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLParagraphElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +126,16 @@ bool JSHTMLParagraphElement::getOwnPropertySlot(ExecState* exec, const Identifie JSValue jsHTMLParagraphElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLParagraphElement* castedThis = static_cast<JSHTMLParagraphElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLParagraphElement* imp = static_cast<HTMLParagraphElement*>(static_cast<JSHTMLParagraphElement*>(asObject(slot.slotBase()))->impl()); + HTMLParagraphElement* imp = static_cast<HTMLParagraphElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLParagraphElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLParagraphElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLParagraphElement* domObject = static_cast<JSHTMLParagraphElement*>(asObject(slot.slotBase())); + return JSHTMLParagraphElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLParagraphElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -146,9 +148,9 @@ void setJSHTMLParagraphElementAlign(ExecState* exec, JSObject* thisObject, JSVal imp->setAlign(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLParagraphElement::getConstructor(ExecState* exec) +JSValue JSHTMLParagraphElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLParagraphElementConstructor>(exec); + return getDOMConstructor<JSHTMLParagraphElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.h index 369384989d..1fa7ea50c5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.h @@ -30,7 +30,7 @@ class HTMLParagraphElement; class JSHTMLParagraphElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLParagraphElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLParagraphElement>); + JSHTMLParagraphElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLParagraphElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp index 467df03802..717ff80715 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLParamElementConstructorTable = { 1, 0, JSHTMLParamElementConstructorTableValues, 0 }; #endif -class JSHTMLParamElementConstructor : public DOMObject { +class JSHTMLParamElementConstructor : public DOMConstructorObject { public: - JSHTMLParamElementConstructor(ExecState* exec) - : DOMObject(JSHTMLParamElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLParamElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLParamElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLParamElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLParamElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSHTMLParamElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLParamElement::s_info = { "HTMLParamElement", &JSHTMLElement::s_info, &JSHTMLParamElementTable, 0 }; -JSHTMLParamElement::JSHTMLParamElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLParamElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLParamElement::JSHTMLParamElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLParamElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -129,35 +129,40 @@ bool JSHTMLParamElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLParamElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLParamElement* castedThis = static_cast<JSHTMLParamElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLParamElement* imp = static_cast<HTMLParamElement*>(static_cast<JSHTMLParamElement*>(asObject(slot.slotBase()))->impl()); + HTMLParamElement* imp = static_cast<HTMLParamElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLParamElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLParamElement* castedThis = static_cast<JSHTMLParamElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLParamElement* imp = static_cast<HTMLParamElement*>(static_cast<JSHTMLParamElement*>(asObject(slot.slotBase()))->impl()); + HTMLParamElement* imp = static_cast<HTMLParamElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLParamElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLParamElement* castedThis = static_cast<JSHTMLParamElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLParamElement* imp = static_cast<HTMLParamElement*>(static_cast<JSHTMLParamElement*>(asObject(slot.slotBase()))->impl()); + HTMLParamElement* imp = static_cast<HTMLParamElement*>(castedThis->impl()); return jsString(exec, imp->value()); } JSValue jsHTMLParamElementValueType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLParamElement* castedThis = static_cast<JSHTMLParamElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLParamElement* imp = static_cast<HTMLParamElement*>(static_cast<JSHTMLParamElement*>(asObject(slot.slotBase()))->impl()); + HTMLParamElement* imp = static_cast<HTMLParamElement*>(castedThis->impl()); return jsString(exec, imp->valueType()); } JSValue jsHTMLParamElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLParamElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLParamElement* domObject = static_cast<JSHTMLParamElement*>(asObject(slot.slotBase())); + return JSHTMLParamElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLParamElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -188,9 +193,9 @@ void setJSHTMLParamElementValueType(ExecState* exec, JSObject* thisObject, JSVal imp->setValueType(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLParamElement::getConstructor(ExecState* exec) +JSValue JSHTMLParamElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLParamElementConstructor>(exec); + return getDOMConstructor<JSHTMLParamElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.h index 7e7760e557..12b80d6731 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.h @@ -30,7 +30,7 @@ class HTMLParamElement; class JSHTMLParamElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLParamElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLParamElement>); + JSHTMLParamElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLParamElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp index b6bc6fb0ad..2b7320a1f8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLPreElementConstructorTable = { 1, 0, JSHTMLPreElementConstructorTableValues, 0 }; #endif -class JSHTMLPreElementConstructor : public DOMObject { +class JSHTMLPreElementConstructor : public DOMConstructorObject { public: - JSHTMLPreElementConstructor(ExecState* exec) - : DOMObject(JSHTMLPreElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLPreElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLPreElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLPreElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLPreElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLPreElementPrototype::self(ExecState* exec, JSGlobalObject* globa const ClassInfo JSHTMLPreElement::s_info = { "HTMLPreElement", &JSHTMLElement::s_info, &JSHTMLPreElementTable, 0 }; -JSHTMLPreElement::JSHTMLPreElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLPreElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLPreElement::JSHTMLPreElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLPreElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,21 +126,24 @@ bool JSHTMLPreElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsHTMLPreElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLPreElement* castedThis = static_cast<JSHTMLPreElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLPreElement* imp = static_cast<HTMLPreElement*>(static_cast<JSHTMLPreElement*>(asObject(slot.slotBase()))->impl()); + HTMLPreElement* imp = static_cast<HTMLPreElement*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsHTMLPreElementWrap(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLPreElement* castedThis = static_cast<JSHTMLPreElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLPreElement* imp = static_cast<HTMLPreElement*>(static_cast<JSHTMLPreElement*>(asObject(slot.slotBase()))->impl()); + HTMLPreElement* imp = static_cast<HTMLPreElement*>(castedThis->impl()); return jsBoolean(imp->wrap()); } JSValue jsHTMLPreElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLPreElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLPreElement* domObject = static_cast<JSHTMLPreElement*>(asObject(slot.slotBase())); + return JSHTMLPreElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLPreElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -159,9 +162,9 @@ void setJSHTMLPreElementWrap(ExecState* exec, JSObject* thisObject, JSValue valu imp->setWrap(value.toBoolean(exec)); } -JSValue JSHTMLPreElement::getConstructor(ExecState* exec) +JSValue JSHTMLPreElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLPreElementConstructor>(exec); + return getDOMConstructor<JSHTMLPreElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.h index 1938f930ce..439a7b34ae 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.h @@ -30,7 +30,7 @@ class HTMLPreElement; class JSHTMLPreElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLPreElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLPreElement>); + JSHTMLPreElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLPreElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp index a8313b920e..84fce1b238 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLQuoteElementConstructorTable = { 1, 0, JSHTMLQuoteElementConstructorTableValues, 0 }; #endif -class JSHTMLQuoteElementConstructor : public DOMObject { +class JSHTMLQuoteElementConstructor : public DOMConstructorObject { public: - JSHTMLQuoteElementConstructor(ExecState* exec) - : DOMObject(JSHTMLQuoteElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLQuoteElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLQuoteElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLQuoteElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLQuoteElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLQuoteElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLQuoteElement::s_info = { "HTMLQuoteElement", &JSHTMLElement::s_info, &JSHTMLQuoteElementTable, 0 }; -JSHTMLQuoteElement::JSHTMLQuoteElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLQuoteElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLQuoteElement::JSHTMLQuoteElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLQuoteElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +126,16 @@ bool JSHTMLQuoteElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLQuoteElementCite(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLQuoteElement* castedThis = static_cast<JSHTMLQuoteElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLQuoteElement* imp = static_cast<HTMLQuoteElement*>(static_cast<JSHTMLQuoteElement*>(asObject(slot.slotBase()))->impl()); + HTMLQuoteElement* imp = static_cast<HTMLQuoteElement*>(castedThis->impl()); return jsString(exec, imp->cite()); } JSValue jsHTMLQuoteElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLQuoteElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLQuoteElement* domObject = static_cast<JSHTMLQuoteElement*>(asObject(slot.slotBase())); + return JSHTMLQuoteElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLQuoteElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -146,9 +148,9 @@ void setJSHTMLQuoteElementCite(ExecState* exec, JSObject* thisObject, JSValue va imp->setCite(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLQuoteElement::getConstructor(ExecState* exec) +JSValue JSHTMLQuoteElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLQuoteElementConstructor>(exec); + return getDOMConstructor<JSHTMLQuoteElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.h index a45fc2f2e5..26d985ccd1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.h @@ -30,7 +30,7 @@ class HTMLQuoteElement; class JSHTMLQuoteElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLQuoteElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLQuoteElement>); + JSHTMLQuoteElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLQuoteElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp index 8e157d1c4a..42d4410d3f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLScriptElementConstructorTable = { 1, 0, JSHTMLScriptElementConstructorTableValues, 0 }; #endif -class JSHTMLScriptElementConstructor : public DOMObject { +class JSHTMLScriptElementConstructor : public DOMConstructorObject { public: - JSHTMLScriptElementConstructor(ExecState* exec) - : DOMObject(JSHTMLScriptElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLScriptElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLScriptElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLScriptElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLScriptElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -115,8 +115,8 @@ JSObject* JSHTMLScriptElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSHTMLScriptElement::s_info = { "HTMLScriptElement", &JSHTMLElement::s_info, &JSHTMLScriptElementTable, 0 }; -JSHTMLScriptElement::JSHTMLScriptElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLScriptElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLScriptElement::JSHTMLScriptElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLScriptElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -132,56 +132,64 @@ bool JSHTMLScriptElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLScriptElementText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl()); + HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl()); return jsString(exec, imp->text()); } JSValue jsHTMLScriptElementHtmlFor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl()); + HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl()); return jsString(exec, imp->htmlFor()); } JSValue jsHTMLScriptElementEvent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl()); + HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl()); return jsString(exec, imp->event()); } JSValue jsHTMLScriptElementCharset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl()); + HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl()); return jsString(exec, imp->charset()); } JSValue jsHTMLScriptElementDefer(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl()); + HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl()); return jsBoolean(imp->defer()); } JSValue jsHTMLScriptElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl()); + HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl()); return jsString(exec, imp->src()); } JSValue jsHTMLScriptElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLScriptElement* castedThis = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->impl()); + HTMLScriptElement* imp = static_cast<HTMLScriptElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLScriptElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLScriptElement* domObject = static_cast<JSHTMLScriptElement*>(asObject(slot.slotBase())); + return JSHTMLScriptElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLScriptElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -230,9 +238,9 @@ void setJSHTMLScriptElementType(ExecState* exec, JSObject* thisObject, JSValue v imp->setType(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLScriptElement::getConstructor(ExecState* exec) +JSValue JSHTMLScriptElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLScriptElementConstructor>(exec); + return getDOMConstructor<JSHTMLScriptElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.h index 89b67ef33a..a028470a46 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.h @@ -30,7 +30,7 @@ class HTMLScriptElement; class JSHTMLScriptElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLScriptElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLScriptElement>); + JSHTMLScriptElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLScriptElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp index 08e765c7be..794d24c555 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp @@ -87,12 +87,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLSelectElementConstructorTable = { 1, 0, JSHTMLSelectElementConstructorTableValues, 0 }; #endif -class JSHTMLSelectElementConstructor : public DOMObject { +class JSHTMLSelectElementConstructor : public DOMConstructorObject { public: - JSHTMLSelectElementConstructor(ExecState* exec) - : DOMObject(JSHTMLSelectElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLSelectElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLSelectElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLSelectElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLSelectElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -143,8 +143,8 @@ bool JSHTMLSelectElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSHTMLSelectElement::s_info = { "HTMLSelectElement", &JSHTMLElement::s_info, &JSHTMLSelectElementTable, 0 }; -JSHTMLSelectElement::JSHTMLSelectElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLSelectElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLSelectElement::JSHTMLSelectElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLSelectElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -180,98 +180,112 @@ bool JSHTMLSelectElement::getOwnPropertySlot(ExecState* exec, unsigned propertyN JSValue jsHTMLSelectElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLSelectElementSelectedIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsNumber(exec, imp->selectedIndex()); } JSValue jsHTMLSelectElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsString(exec, imp->value()); } JSValue jsHTMLSelectElementLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsHTMLSelectElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLSelectElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->validity())); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->validity())); } JSValue jsHTMLSelectElementWillValidate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsBoolean(imp->willValidate()); } JSValue jsHTMLSelectElementOptions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->options())); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->options())); } JSValue jsHTMLSelectElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLSelectElementAutofocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsBoolean(imp->autofocus()); } JSValue jsHTMLSelectElementMultiple(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsBoolean(imp->multiple()); } JSValue jsHTMLSelectElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLSelectElementSize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->impl()); + HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); return jsNumber(exec, imp->size()); } JSValue jsHTMLSelectElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLSelectElement* domObject = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); + return JSHTMLSelectElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLSelectElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -347,9 +361,9 @@ void JSHTMLSelectElement::getPropertyNames(ExecState* exec, PropertyNameArray& p Base::getPropertyNames(exec, propertyNames); } -JSValue JSHTMLSelectElement::getConstructor(ExecState* exec) +JSValue JSHTMLSelectElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLSelectElementConstructor>(exec); + return getDOMConstructor<JSHTMLSelectElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionAdd(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -391,7 +405,7 @@ JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionItem(ExecState* exec, } - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -405,7 +419,7 @@ JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionNamedItem(ExecState* e const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->namedItem(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->namedItem(name))); return result; } @@ -413,7 +427,7 @@ JSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionNamedItem(ExecState* e JSValue JSHTMLSelectElement::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSHTMLSelectElement* thisObj = static_cast<JSHTMLSelectElement*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<HTMLSelectElement*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<HTMLSelectElement*>(thisObj->impl())->item(slot.index())); } } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h index 53459cb04c..654425487a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h @@ -30,7 +30,7 @@ class HTMLSelectElement; class JSHTMLSelectElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLSelectElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLSelectElement>); + JSHTMLSelectElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLSelectElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); @@ -45,7 +45,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue remove(JSC::ExecState*, const JSC::ArgList&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp index 5e534cfbaa..d4a7d72ef4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLSourceElementConstructorTable = { 1, 0, JSHTMLSourceElementConstructorTableValues, 0 }; #endif -class JSHTMLSourceElementConstructor : public DOMObject { +class JSHTMLSourceElementConstructor : public DOMConstructorObject { public: - JSHTMLSourceElementConstructor(ExecState* exec) - : DOMObject(JSHTMLSourceElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLSourceElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLSourceElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLSourceElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLSourceElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -114,8 +114,8 @@ JSObject* JSHTMLSourceElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSHTMLSourceElement::s_info = { "HTMLSourceElement", &JSHTMLElement::s_info, &JSHTMLSourceElementTable, 0 }; -JSHTMLSourceElement::JSHTMLSourceElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLSourceElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLSourceElement::JSHTMLSourceElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLSourceElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -131,28 +131,32 @@ bool JSHTMLSourceElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsHTMLSourceElementSrc(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSourceElement* castedThis = static_cast<JSHTMLSourceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(static_cast<JSHTMLSourceElement*>(asObject(slot.slotBase()))->impl()); + HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(castedThis->impl()); return jsString(exec, imp->src()); } JSValue jsHTMLSourceElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSourceElement* castedThis = static_cast<JSHTMLSourceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(static_cast<JSHTMLSourceElement*>(asObject(slot.slotBase()))->impl()); + HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLSourceElementMedia(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLSourceElement* castedThis = static_cast<JSHTMLSourceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(static_cast<JSHTMLSourceElement*>(asObject(slot.slotBase()))->impl()); + HTMLSourceElement* imp = static_cast<HTMLSourceElement*>(castedThis->impl()); return jsString(exec, imp->media()); } JSValue jsHTMLSourceElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLSourceElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLSourceElement* domObject = static_cast<JSHTMLSourceElement*>(asObject(slot.slotBase())); + return JSHTMLSourceElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLSourceElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -177,9 +181,9 @@ void setJSHTMLSourceElementMedia(ExecState* exec, JSObject* thisObject, JSValue imp->setMedia(value.toString(exec)); } -JSValue JSHTMLSourceElement::getConstructor(ExecState* exec) +JSValue JSHTMLSourceElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLSourceElementConstructor>(exec); + return getDOMConstructor<JSHTMLSourceElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.h index 18ece59a1e..7c00c0e31c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.h @@ -32,7 +32,7 @@ class HTMLSourceElement; class JSHTMLSourceElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLSourceElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLSourceElement>); + JSHTMLSourceElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLSourceElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp index 77b1b1abab..4de3dc87e4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLStyleElementConstructorTable = { 1, 0, JSHTMLStyleElementConstructorTableValues, 0 }; #endif -class JSHTMLStyleElementConstructor : public DOMObject { +class JSHTMLStyleElementConstructor : public DOMConstructorObject { public: - JSHTMLStyleElementConstructor(ExecState* exec) - : DOMObject(JSHTMLStyleElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLStyleElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLStyleElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLStyleElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLStyleElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -114,8 +114,8 @@ JSObject* JSHTMLStyleElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLStyleElement::s_info = { "HTMLStyleElement", &JSHTMLElement::s_info, &JSHTMLStyleElementTable, 0 }; -JSHTMLStyleElement::JSHTMLStyleElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLStyleElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLStyleElement::JSHTMLStyleElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLStyleElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -131,35 +131,40 @@ bool JSHTMLStyleElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLStyleElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLStyleElement* castedThis = static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLStyleElement* imp = static_cast<HTMLStyleElement*>(static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase()))->impl()); + HTMLStyleElement* imp = static_cast<HTMLStyleElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLStyleElementMedia(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLStyleElement* castedThis = static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLStyleElement* imp = static_cast<HTMLStyleElement*>(static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase()))->impl()); + HTMLStyleElement* imp = static_cast<HTMLStyleElement*>(castedThis->impl()); return jsString(exec, imp->media()); } JSValue jsHTMLStyleElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLStyleElement* castedThis = static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLStyleElement* imp = static_cast<HTMLStyleElement*>(static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase()))->impl()); + HTMLStyleElement* imp = static_cast<HTMLStyleElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLStyleElementSheet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLStyleElement* castedThis = static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLStyleElement* imp = static_cast<HTMLStyleElement*>(static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->sheet())); + HTMLStyleElement* imp = static_cast<HTMLStyleElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->sheet())); } JSValue jsHTMLStyleElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLStyleElement* domObject = static_cast<JSHTMLStyleElement*>(asObject(slot.slotBase())); + return JSHTMLStyleElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLStyleElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -184,9 +189,9 @@ void setJSHTMLStyleElementType(ExecState* exec, JSObject* thisObject, JSValue va imp->setType(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLStyleElement::getConstructor(ExecState* exec) +JSValue JSHTMLStyleElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLStyleElementConstructor>(exec); + return getDOMConstructor<JSHTMLStyleElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.h index d0e9201eb2..3698a232b5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.h @@ -30,7 +30,7 @@ class HTMLStyleElement; class JSHTMLStyleElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLStyleElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLStyleElement>); + JSHTMLStyleElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLStyleElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp index 3fcbcba37b..62069312ef 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTableCaptionElementConstructorTable = { 1, 0, JSHTMLTableCaptionElementConstructorTableValues, 0 }; #endif -class JSHTMLTableCaptionElementConstructor : public DOMObject { +class JSHTMLTableCaptionElementConstructor : public DOMConstructorObject { public: - JSHTMLTableCaptionElementConstructor(ExecState* exec) - : DOMObject(JSHTMLTableCaptionElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLTableCaptionElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLTableCaptionElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLTableCaptionElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLTableCaptionElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLTableCaptionElementPrototype::self(ExecState* exec, JSGlobalObje const ClassInfo JSHTMLTableCaptionElement::s_info = { "HTMLTableCaptionElement", &JSHTMLElement::s_info, &JSHTMLTableCaptionElementTable, 0 }; -JSHTMLTableCaptionElement::JSHTMLTableCaptionElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTableCaptionElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLTableCaptionElement::JSHTMLTableCaptionElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableCaptionElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +126,16 @@ bool JSHTMLTableCaptionElement::getOwnPropertySlot(ExecState* exec, const Identi JSValue jsHTMLTableCaptionElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCaptionElement* castedThis = static_cast<JSHTMLTableCaptionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCaptionElement* imp = static_cast<HTMLTableCaptionElement*>(static_cast<JSHTMLTableCaptionElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCaptionElement* imp = static_cast<HTMLTableCaptionElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLTableCaptionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLTableCaptionElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLTableCaptionElement* domObject = static_cast<JSHTMLTableCaptionElement*>(asObject(slot.slotBase())); + return JSHTMLTableCaptionElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLTableCaptionElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -146,9 +148,9 @@ void setJSHTMLTableCaptionElementAlign(ExecState* exec, JSObject* thisObject, JS imp->setAlign(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLTableCaptionElement::getConstructor(ExecState* exec) +JSValue JSHTMLTableCaptionElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLTableCaptionElementConstructor>(exec); + return getDOMConstructor<JSHTMLTableCaptionElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } HTMLTableCaptionElement* toHTMLTableCaptionElement(JSC::JSValue value) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.h index bc37fd4bb8..50711863f1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.h @@ -31,7 +31,7 @@ class HTMLTableCaptionElement; class JSHTMLTableCaptionElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLTableCaptionElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLTableCaptionElement>); + JSHTMLTableCaptionElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLTableCaptionElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -43,7 +43,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); HTMLTableCaptionElement* impl() const { return static_cast<HTMLTableCaptionElement*>(Base::impl()); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp index 8ddf4ca28d..02a8e96bd3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp @@ -77,12 +77,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTableCellElementConstructorTable = { 1, 0, JSHTMLTableCellElementConstructorTableValues, 0 }; #endif -class JSHTMLTableCellElementConstructor : public DOMObject { +class JSHTMLTableCellElementConstructor : public DOMConstructorObject { public: - JSHTMLTableCellElementConstructor(ExecState* exec) - : DOMObject(JSHTMLTableCellElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLTableCellElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLTableCellElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLTableCellElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLTableCellElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -124,8 +124,8 @@ JSObject* JSHTMLTableCellElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLTableCellElement::s_info = { "HTMLTableCellElement", &JSHTMLElement::s_info, &JSHTMLTableCellElementTable, 0 }; -JSHTMLTableCellElement::JSHTMLTableCellElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTableCellElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLTableCellElement::JSHTMLTableCellElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableCellElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -141,112 +141,128 @@ bool JSHTMLTableCellElement::getOwnPropertySlot(ExecState* exec, const Identifie JSValue jsHTMLTableCellElementCellIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsNumber(exec, imp->cellIndex()); } JSValue jsHTMLTableCellElementAbbr(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->abbr()); } JSValue jsHTMLTableCellElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLTableCellElementAxis(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->axis()); } JSValue jsHTMLTableCellElementBgColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->bgColor()); } JSValue jsHTMLTableCellElementCh(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->ch()); } JSValue jsHTMLTableCellElementChOff(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->chOff()); } JSValue jsHTMLTableCellElementColSpan(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsNumber(exec, imp->colSpan()); } JSValue jsHTMLTableCellElementHeaders(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->headers()); } JSValue jsHTMLTableCellElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->height()); } JSValue jsHTMLTableCellElementNoWrap(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsBoolean(imp->noWrap()); } JSValue jsHTMLTableCellElementRowSpan(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsNumber(exec, imp->rowSpan()); } JSValue jsHTMLTableCellElementScope(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->scope()); } JSValue jsHTMLTableCellElementVAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->vAlign()); } JSValue jsHTMLTableCellElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl()); return jsString(exec, imp->width()); } JSValue jsHTMLTableCellElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLTableCellElement* domObject = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase())); + return JSHTMLTableCellElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLTableCellElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -337,9 +353,9 @@ void setJSHTMLTableCellElementWidth(ExecState* exec, JSObject* thisObject, JSVal imp->setWidth(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLTableCellElement::getConstructor(ExecState* exec) +JSValue JSHTMLTableCellElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLTableCellElementConstructor>(exec); + return getDOMConstructor<JSHTMLTableCellElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.h index 7aa08ef006..3575ad984c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.h @@ -30,7 +30,7 @@ class HTMLTableCellElement; class JSHTMLTableCellElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLTableCellElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLTableCellElement>); + JSHTMLTableCellElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLTableCellElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp index b79eda4ce8..033a6e0d9f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTableColElementConstructorTable = { 1, 0, JSHTMLTableColElementConstructorTableValues, 0 }; #endif -class JSHTMLTableColElementConstructor : public DOMObject { +class JSHTMLTableColElementConstructor : public DOMConstructorObject { public: - JSHTMLTableColElementConstructor(ExecState* exec) - : DOMObject(JSHTMLTableColElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLTableColElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLTableColElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLTableColElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLTableColElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -115,8 +115,8 @@ JSObject* JSHTMLTableColElementPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSHTMLTableColElement::s_info = { "HTMLTableColElement", &JSHTMLElement::s_info, &JSHTMLTableColElementTable, 0 }; -JSHTMLTableColElement::JSHTMLTableColElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTableColElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLTableColElement::JSHTMLTableColElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableColElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -132,49 +132,56 @@ bool JSHTMLTableColElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsHTMLTableColElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLTableColElementCh(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl()); return jsString(exec, imp->ch()); } JSValue jsHTMLTableColElementChOff(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl()); return jsString(exec, imp->chOff()); } JSValue jsHTMLTableColElementSpan(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl()); return jsNumber(exec, imp->span()); } JSValue jsHTMLTableColElementVAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl()); return jsString(exec, imp->vAlign()); } JSValue jsHTMLTableColElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableColElement* castedThis = static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableColElement* imp = static_cast<HTMLTableColElement*>(castedThis->impl()); return jsString(exec, imp->width()); } JSValue jsHTMLTableColElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLTableColElement* domObject = static_cast<JSHTMLTableColElement*>(asObject(slot.slotBase())); + return JSHTMLTableColElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLTableColElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -217,9 +224,9 @@ void setJSHTMLTableColElementWidth(ExecState* exec, JSObject* thisObject, JSValu imp->setWidth(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLTableColElement::getConstructor(ExecState* exec) +JSValue JSHTMLTableColElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLTableColElementConstructor>(exec); + return getDOMConstructor<JSHTMLTableColElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.h index a060d19bac..87584cd87f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.h @@ -30,7 +30,7 @@ class HTMLTableColElement; class JSHTMLTableColElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLTableColElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLTableColElement>); + JSHTMLTableColElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLTableColElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp index 6965555c52..55e43e05e9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp @@ -84,12 +84,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTableElementConstructorTable = { 1, 0, JSHTMLTableElementConstructorTableValues, 0 }; #endif -class JSHTMLTableElementConstructor : public DOMObject { +class JSHTMLTableElementConstructor : public DOMConstructorObject { public: - JSHTMLTableElementConstructor(ExecState* exec) - : DOMObject(JSHTMLTableElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLTableElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLTableElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLTableElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLTableElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -144,8 +144,8 @@ bool JSHTMLTableElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSHTMLTableElement::s_info = { "HTMLTableElement", &JSHTMLElement::s_info, &JSHTMLTableElementTable, 0 }; -JSHTMLTableElement::JSHTMLTableElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTableElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLTableElement::JSHTMLTableElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -161,105 +161,120 @@ bool JSHTMLTableElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLTableElementCaption(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->caption())); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->caption())); } JSValue jsHTMLTableElementTHead(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->tHead())); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->tHead())); } JSValue jsHTMLTableElementTFoot(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->tFoot())); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->tFoot())); } JSValue jsHTMLTableElementRows(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->rows())); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->rows())); } JSValue jsHTMLTableElementTBodies(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->tBodies())); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->tBodies())); } JSValue jsHTMLTableElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLTableElementBgColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->bgColor()); } JSValue jsHTMLTableElementBorder(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->border()); } JSValue jsHTMLTableElementCellPadding(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->cellPadding()); } JSValue jsHTMLTableElementCellSpacing(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->cellSpacing()); } JSValue jsHTMLTableElementFrame(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->frame()); } JSValue jsHTMLTableElementRules(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->rules()); } JSValue jsHTMLTableElementSummary(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->summary()); } JSValue jsHTMLTableElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableElement* castedThis = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableElement* imp = static_cast<HTMLTableElement*>(static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThis->impl()); return jsString(exec, imp->width()); } JSValue jsHTMLTableElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLTableElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLTableElement* domObject = static_cast<JSHTMLTableElement*>(asObject(slot.slotBase())); + return JSHTMLTableElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLTableElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -344,9 +359,9 @@ void setJSHTMLTableElementWidth(ExecState* exec, JSObject* thisObject, JSValue v imp->setWidth(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLTableElement::getConstructor(ExecState* exec) +JSValue JSHTMLTableElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLTableElementConstructor>(exec); + return getDOMConstructor<JSHTMLTableElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLTableElementPrototypeFunctionCreateTHead(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -358,7 +373,7 @@ JSValue JSC_HOST_CALL jsHTMLTableElementPrototypeFunctionCreateTHead(ExecState* HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createTHead())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createTHead())); return result; } @@ -383,7 +398,7 @@ JSValue JSC_HOST_CALL jsHTMLTableElementPrototypeFunctionCreateTFoot(ExecState* HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createTFoot())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createTFoot())); return result; } @@ -408,7 +423,7 @@ JSValue JSC_HOST_CALL jsHTMLTableElementPrototypeFunctionCreateCaption(ExecState HTMLTableElement* imp = static_cast<HTMLTableElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createCaption())); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createCaption())); return result; } @@ -435,7 +450,7 @@ JSValue JSC_HOST_CALL jsHTMLTableElementPrototypeFunctionInsertRow(ExecState* ex int index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->insertRow(index, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->insertRow(index, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.h index 234d812468..ebef7fd0c6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.h @@ -30,7 +30,7 @@ class HTMLTableElement; class JSHTMLTableElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLTableElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLTableElement>); + JSHTMLTableElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLTableElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp index d806271f8f..3305604ada 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp @@ -75,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTableRowElementConstructorTable = { 1, 0, JSHTMLTableRowElementConstructorTableValues, 0 }; #endif -class JSHTMLTableRowElementConstructor : public DOMObject { +class JSHTMLTableRowElementConstructor : public DOMConstructorObject { public: - JSHTMLTableRowElementConstructor(ExecState* exec) - : DOMObject(JSHTMLTableRowElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLTableRowElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLTableRowElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLTableRowElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLTableRowElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -129,8 +129,8 @@ bool JSHTMLTableRowElementPrototype::getOwnPropertySlot(ExecState* exec, const I const ClassInfo JSHTMLTableRowElement::s_info = { "HTMLTableRowElement", &JSHTMLElement::s_info, &JSHTMLTableRowElementTable, 0 }; -JSHTMLTableRowElement::JSHTMLTableRowElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTableRowElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLTableRowElement::JSHTMLTableRowElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableRowElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -146,63 +146,72 @@ bool JSHTMLTableRowElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsHTMLTableRowElementRowIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableRowElement* castedThis = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(castedThis->impl()); return jsNumber(exec, imp->rowIndex()); } JSValue jsHTMLTableRowElementSectionRowIndex(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableRowElement* castedThis = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(castedThis->impl()); return jsNumber(exec, imp->sectionRowIndex()); } JSValue jsHTMLTableRowElementCells(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableRowElement* castedThis = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->cells())); + HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->cells())); } JSValue jsHTMLTableRowElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableRowElement* castedThis = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLTableRowElementBgColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableRowElement* castedThis = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(castedThis->impl()); return jsString(exec, imp->bgColor()); } JSValue jsHTMLTableRowElementCh(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableRowElement* castedThis = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(castedThis->impl()); return jsString(exec, imp->ch()); } JSValue jsHTMLTableRowElementChOff(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableRowElement* castedThis = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(castedThis->impl()); return jsString(exec, imp->chOff()); } JSValue jsHTMLTableRowElementVAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableRowElement* castedThis = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableRowElement* imp = static_cast<HTMLTableRowElement*>(castedThis->impl()); return jsString(exec, imp->vAlign()); } JSValue jsHTMLTableRowElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLTableRowElement* domObject = static_cast<JSHTMLTableRowElement*>(asObject(slot.slotBase())); + return JSHTMLTableRowElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLTableRowElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -239,9 +248,9 @@ void setJSHTMLTableRowElementVAlign(ExecState* exec, JSObject* thisObject, JSVal imp->setVAlign(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLTableRowElement::getConstructor(ExecState* exec) +JSValue JSHTMLTableRowElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLTableRowElementConstructor>(exec); + return getDOMConstructor<JSHTMLTableRowElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLTableRowElementPrototypeFunctionInsertCell(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -255,7 +264,7 @@ JSValue JSC_HOST_CALL jsHTMLTableRowElementPrototypeFunctionInsertCell(ExecState int index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->insertCell(index, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->insertCell(index, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.h index e3e93bceb2..3a592b48ad 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.h @@ -30,7 +30,7 @@ class HTMLTableRowElement; class JSHTMLTableRowElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLTableRowElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLTableRowElement>); + JSHTMLTableRowElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLTableRowElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp index 7515cfd890..fa3c5b584e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp @@ -71,12 +71,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTableSectionElementConstructorTable = { 1, 0, JSHTMLTableSectionElementConstructorTableValues, 0 }; #endif -class JSHTMLTableSectionElementConstructor : public DOMObject { +class JSHTMLTableSectionElementConstructor : public DOMConstructorObject { public: - JSHTMLTableSectionElementConstructor(ExecState* exec) - : DOMObject(JSHTMLTableSectionElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLTableSectionElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLTableSectionElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLTableSectionElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLTableSectionElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -125,8 +125,8 @@ bool JSHTMLTableSectionElementPrototype::getOwnPropertySlot(ExecState* exec, con const ClassInfo JSHTMLTableSectionElement::s_info = { "HTMLTableSectionElement", &JSHTMLElement::s_info, &JSHTMLTableSectionElementTable, 0 }; -JSHTMLTableSectionElement::JSHTMLTableSectionElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTableSectionElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLTableSectionElement::JSHTMLTableSectionElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTableSectionElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -142,42 +142,48 @@ bool JSHTMLTableSectionElement::getOwnPropertySlot(ExecState* exec, const Identi JSValue jsHTMLTableSectionElementAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl()); return jsString(exec, imp->align()); } JSValue jsHTMLTableSectionElementCh(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl()); return jsString(exec, imp->ch()); } JSValue jsHTMLTableSectionElementChOff(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl()); return jsString(exec, imp->chOff()); } JSValue jsHTMLTableSectionElementVAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl()); + HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl()); return jsString(exec, imp->vAlign()); } JSValue jsHTMLTableSectionElementRows(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTableSectionElement* castedThis = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->rows())); + HTMLTableSectionElement* imp = static_cast<HTMLTableSectionElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->rows())); } JSValue jsHTMLTableSectionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLTableSectionElement* domObject = static_cast<JSHTMLTableSectionElement*>(asObject(slot.slotBase())); + return JSHTMLTableSectionElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLTableSectionElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -208,9 +214,9 @@ void setJSHTMLTableSectionElementVAlign(ExecState* exec, JSObject* thisObject, J imp->setVAlign(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLTableSectionElement::getConstructor(ExecState* exec) +JSValue JSHTMLTableSectionElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLTableSectionElementConstructor>(exec); + return getDOMConstructor<JSHTMLTableSectionElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLTableSectionElementPrototypeFunctionInsertRow(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -224,7 +230,7 @@ JSValue JSC_HOST_CALL jsHTMLTableSectionElementPrototypeFunctionInsertRow(ExecSt int index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->insertRow(index, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->insertRow(index, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.h index 672165fe9b..0734bdbaaa 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.h @@ -31,7 +31,7 @@ class HTMLTableSectionElement; class JSHTMLTableSectionElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLTableSectionElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLTableSectionElement>); + JSHTMLTableSectionElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLTableSectionElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -43,7 +43,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); HTMLTableSectionElement* impl() const { return static_cast<HTMLTableSectionElement*>(Base::impl()); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp index f103fb7750..0a2c779496 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp @@ -40,7 +40,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSHTMLTextAreaElement); /* Hash table */ -static const HashTableValue JSHTMLTextAreaElementTableValues[17] = +static const HashTableValue JSHTMLTextAreaElementTableValues[18] = { { "defaultValue", DontDelete, (intptr_t)jsHTMLTextAreaElementDefaultValue, (intptr_t)setJSHTMLTextAreaElementDefaultValue }, { "form", DontDelete|ReadOnly, (intptr_t)jsHTMLTextAreaElementForm, (intptr_t)0 }, @@ -51,6 +51,7 @@ static const HashTableValue JSHTMLTextAreaElementTableValues[17] = { "autofocus", DontDelete, (intptr_t)jsHTMLTextAreaElementAutofocus, (intptr_t)setJSHTMLTextAreaElementAutofocus }, { "name", DontDelete, (intptr_t)jsHTMLTextAreaElementName, (intptr_t)setJSHTMLTextAreaElementName }, { "readOnly", DontDelete, (intptr_t)jsHTMLTextAreaElementReadOnly, (intptr_t)setJSHTMLTextAreaElementReadOnly }, + { "required", DontDelete, (intptr_t)jsHTMLTextAreaElementRequired, (intptr_t)setJSHTMLTextAreaElementRequired }, { "rows", DontDelete, (intptr_t)jsHTMLTextAreaElementRows, (intptr_t)setJSHTMLTextAreaElementRows }, { "type", DontDelete|ReadOnly, (intptr_t)jsHTMLTextAreaElementType, (intptr_t)0 }, { "value", DontDelete, (intptr_t)jsHTMLTextAreaElementValue, (intptr_t)setJSHTMLTextAreaElementValue }, @@ -65,7 +66,7 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTextAreaElementTable = #if ENABLE(PERFECT_HASH_SIZE) { 255, JSHTMLTextAreaElementTableValues, 0 }; #else - { 36, 31, JSHTMLTextAreaElementTableValues, 0 }; + { 67, 63, JSHTMLTextAreaElementTableValues, 0 }; #endif /* Hash table for constructor */ @@ -82,12 +83,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTextAreaElementConstructorTable = { 1, 0, JSHTMLTextAreaElementConstructorTableValues, 0 }; #endif -class JSHTMLTextAreaElementConstructor : public DOMObject { +class JSHTMLTextAreaElementConstructor : public DOMConstructorObject { public: - JSHTMLTextAreaElementConstructor(ExecState* exec) - : DOMObject(JSHTMLTextAreaElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLTextAreaElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLTextAreaElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLTextAreaElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLTextAreaElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -136,8 +137,8 @@ bool JSHTMLTextAreaElementPrototype::getOwnPropertySlot(ExecState* exec, const I const ClassInfo JSHTMLTextAreaElement::s_info = { "HTMLTextAreaElement", &JSHTMLElement::s_info, &JSHTMLTextAreaElementTable, 0 }; -JSHTMLTextAreaElement::JSHTMLTextAreaElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTextAreaElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLTextAreaElement::JSHTMLTextAreaElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTextAreaElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -153,112 +154,136 @@ bool JSHTMLTextAreaElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsHTMLTextAreaElementDefaultValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsString(exec, imp->defaultValue()); } JSValue jsHTMLTextAreaElementForm(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->form())); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->form())); } JSValue jsHTMLTextAreaElementValidity(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->validity())); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->validity())); } JSValue jsHTMLTextAreaElementAccessKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsString(exec, imp->accessKey()); } JSValue jsHTMLTextAreaElementCols(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsNumber(exec, imp->cols()); } JSValue jsHTMLTextAreaElementDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsHTMLTextAreaElementAutofocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsBoolean(imp->autofocus()); } JSValue jsHTMLTextAreaElementName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsHTMLTextAreaElementReadOnly(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsBoolean(imp->readOnly()); } +JSValue jsHTMLTextAreaElementRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); + return jsBoolean(imp->required()); +} + JSValue jsHTMLTextAreaElementRows(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsNumber(exec, imp->rows()); } JSValue jsHTMLTextAreaElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLTextAreaElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsString(exec, imp->value()); } JSValue jsHTMLTextAreaElementWillValidate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsBoolean(imp->willValidate()); } JSValue jsHTMLTextAreaElementSelectionStart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsNumber(exec, imp->selectionStart()); } JSValue jsHTMLTextAreaElementSelectionEnd(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTextAreaElement* castedThis = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl()); + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(castedThis->impl()); return jsNumber(exec, imp->selectionEnd()); } JSValue jsHTMLTextAreaElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLTextAreaElement* domObject = static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase())); + return JSHTMLTextAreaElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLTextAreaElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -307,6 +332,12 @@ void setJSHTMLTextAreaElementReadOnly(ExecState* exec, JSObject* thisObject, JSV imp->setReadOnly(value.toBoolean(exec)); } +void setJSHTMLTextAreaElementRequired(ExecState* exec, JSObject* thisObject, JSValue value) +{ + HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(thisObject)->impl()); + imp->setRequired(value.toBoolean(exec)); +} + void setJSHTMLTextAreaElementRows(ExecState* exec, JSObject* thisObject, JSValue value) { HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(thisObject)->impl()); @@ -331,9 +362,9 @@ void setJSHTMLTextAreaElementSelectionEnd(ExecState* exec, JSObject* thisObject, imp->setSelectionEnd(value.toInt32(exec)); } -JSValue JSHTMLTextAreaElement::getConstructor(ExecState* exec) +JSValue JSHTMLTextAreaElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLTextAreaElementConstructor>(exec); + return getDOMConstructor<JSHTMLTextAreaElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsHTMLTextAreaElementPrototypeFunctionSelect(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h index 63d0575375..52b05dda7c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h @@ -30,7 +30,7 @@ class HTMLTextAreaElement; class JSHTMLTextAreaElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLTextAreaElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLTextAreaElement>); + JSHTMLTextAreaElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLTextAreaElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; @@ -82,6 +82,8 @@ JSC::JSValue jsHTMLTextAreaElementName(JSC::ExecState*, const JSC::Identifier&, void setJSHTMLTextAreaElementName(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLTextAreaElementReadOnly(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSHTMLTextAreaElementReadOnly(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); +JSC::JSValue jsHTMLTextAreaElementRequired(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSHTMLTextAreaElementRequired(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLTextAreaElementRows(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSHTMLTextAreaElementRows(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLTextAreaElementType(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp index dbc9932734..04bf7e058b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLTitleElementConstructorTable = { 1, 0, JSHTMLTitleElementConstructorTableValues, 0 }; #endif -class JSHTMLTitleElementConstructor : public DOMObject { +class JSHTMLTitleElementConstructor : public DOMConstructorObject { public: - JSHTMLTitleElementConstructor(ExecState* exec) - : DOMObject(JSHTMLTitleElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLTitleElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLTitleElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLTitleElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLTitleElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSHTMLTitleElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLTitleElement::s_info = { "HTMLTitleElement", &JSHTMLElement::s_info, &JSHTMLTitleElementTable, 0 }; -JSHTMLTitleElement::JSHTMLTitleElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLTitleElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLTitleElement::JSHTMLTitleElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLTitleElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -126,14 +126,16 @@ bool JSHTMLTitleElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLTitleElementText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLTitleElement* castedThis = static_cast<JSHTMLTitleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLTitleElement* imp = static_cast<HTMLTitleElement*>(static_cast<JSHTMLTitleElement*>(asObject(slot.slotBase()))->impl()); + HTMLTitleElement* imp = static_cast<HTMLTitleElement*>(castedThis->impl()); return jsString(exec, imp->text()); } JSValue jsHTMLTitleElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLTitleElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLTitleElement* domObject = static_cast<JSHTMLTitleElement*>(asObject(slot.slotBase())); + return JSHTMLTitleElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLTitleElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -146,9 +148,9 @@ void setJSHTMLTitleElementText(ExecState* exec, JSObject* thisObject, JSValue va imp->setText(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLTitleElement::getConstructor(ExecState* exec) +JSValue JSHTMLTitleElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLTitleElementConstructor>(exec); + return getDOMConstructor<JSHTMLTitleElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.h index 79e73aecc2..fa8c4c6c6b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.h @@ -30,7 +30,7 @@ class HTMLTitleElement; class JSHTMLTitleElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLTitleElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLTitleElement>); + JSHTMLTitleElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLTitleElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp index aae57e3da3..017a317e02 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp @@ -63,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLUListElementConstructorTable = { 1, 0, JSHTMLUListElementConstructorTableValues, 0 }; #endif -class JSHTMLUListElementConstructor : public DOMObject { +class JSHTMLUListElementConstructor : public DOMConstructorObject { public: - JSHTMLUListElementConstructor(ExecState* exec) - : DOMObject(JSHTMLUListElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLUListElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLUListElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLUListElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLUListElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -110,8 +110,8 @@ JSObject* JSHTMLUListElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLUListElement::s_info = { "HTMLUListElement", &JSHTMLElement::s_info, &JSHTMLUListElementTable, 0 }; -JSHTMLUListElement::JSHTMLUListElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLUListElement> impl) - : JSHTMLElement(structure, impl) +JSHTMLUListElement::JSHTMLUListElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLUListElement> impl) + : JSHTMLElement(structure, globalObject, impl) { } @@ -127,21 +127,24 @@ bool JSHTMLUListElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLUListElementCompact(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLUListElement* castedThis = static_cast<JSHTMLUListElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLUListElement* imp = static_cast<HTMLUListElement*>(static_cast<JSHTMLUListElement*>(asObject(slot.slotBase()))->impl()); + HTMLUListElement* imp = static_cast<HTMLUListElement*>(castedThis->impl()); return jsBoolean(imp->compact()); } JSValue jsHTMLUListElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLUListElement* castedThis = static_cast<JSHTMLUListElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLUListElement* imp = static_cast<HTMLUListElement*>(static_cast<JSHTMLUListElement*>(asObject(slot.slotBase()))->impl()); + HTMLUListElement* imp = static_cast<HTMLUListElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsHTMLUListElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLUListElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLUListElement* domObject = static_cast<JSHTMLUListElement*>(asObject(slot.slotBase())); + return JSHTMLUListElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLUListElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -160,9 +163,9 @@ void setJSHTMLUListElementType(ExecState* exec, JSObject* thisObject, JSValue va imp->setType(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLUListElement::getConstructor(ExecState* exec) +JSValue JSHTMLUListElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLUListElementConstructor>(exec); + return getDOMConstructor<JSHTMLUListElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.h index 339b5f027f..9c1cc105ce 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.h @@ -30,7 +30,7 @@ class HTMLUListElement; class JSHTMLUListElement : public JSHTMLElement { typedef JSHTMLElement Base; public: - JSHTMLUListElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLUListElement>); + JSHTMLUListElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLUListElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp index 19c1a203a2..152ae5fc23 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp @@ -70,12 +70,12 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLVideoElementConstructorTable = { 1, 0, JSHTMLVideoElementConstructorTableValues, 0 }; #endif -class JSHTMLVideoElementConstructor : public DOMObject { +class JSHTMLVideoElementConstructor : public DOMConstructorObject { public: - JSHTMLVideoElementConstructor(ExecState* exec) - : DOMObject(JSHTMLVideoElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSHTMLVideoElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLVideoElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSHTMLVideoElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSHTMLVideoElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -117,8 +117,8 @@ JSObject* JSHTMLVideoElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSHTMLVideoElement::s_info = { "HTMLVideoElement", &JSHTMLMediaElement::s_info, &JSHTMLVideoElementTable, 0 }; -JSHTMLVideoElement::JSHTMLVideoElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLVideoElement> impl) - : JSHTMLMediaElement(structure, impl) +JSHTMLVideoElement::JSHTMLVideoElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLVideoElement> impl) + : JSHTMLMediaElement(structure, globalObject, impl) { } @@ -134,42 +134,48 @@ bool JSHTMLVideoElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsHTMLVideoElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLVideoElement* castedThis = static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase()))->impl()); + HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsHTMLVideoElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLVideoElement* castedThis = static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase()))->impl()); + HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(castedThis->impl()); return jsNumber(exec, imp->height()); } JSValue jsHTMLVideoElementVideoWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLVideoElement* castedThis = static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase()))->impl()); + HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(castedThis->impl()); return jsNumber(exec, imp->videoWidth()); } JSValue jsHTMLVideoElementVideoHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLVideoElement* castedThis = static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase()))->impl()); + HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(castedThis->impl()); return jsNumber(exec, imp->videoHeight()); } JSValue jsHTMLVideoElementPoster(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHTMLVideoElement* castedThis = static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase()))->impl()); + HTMLVideoElement* imp = static_cast<HTMLVideoElement*>(castedThis->impl()); return jsString(exec, imp->poster()); } JSValue jsHTMLVideoElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSHTMLVideoElement* domObject = static_cast<JSHTMLVideoElement*>(asObject(slot.slotBase())); + return JSHTMLVideoElement::getConstructor(exec, domObject->globalObject()); } void JSHTMLVideoElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -194,9 +200,9 @@ void setJSHTMLVideoElementPoster(ExecState* exec, JSObject* thisObject, JSValue imp->setPoster(valueToStringWithNullCheck(exec, value)); } -JSValue JSHTMLVideoElement::getConstructor(ExecState* exec) +JSValue JSHTMLVideoElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSHTMLVideoElementConstructor>(exec); + return getDOMConstructor<JSHTMLVideoElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.h index 3e3b8c2ff3..15bcc89941 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.h @@ -32,7 +32,7 @@ class HTMLVideoElement; class JSHTMLVideoElement : public JSHTMLMediaElement { typedef JSHTMLMediaElement Base; public: - JSHTMLVideoElement(PassRefPtr<JSC::Structure>, PassRefPtr<HTMLVideoElement>); + JSHTMLVideoElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLVideoElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp b/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp index 097a6b7f33..fc8c0b60bd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp @@ -79,8 +79,8 @@ bool JSHistoryPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& p const ClassInfo JSHistory::s_info = { "History", 0, &JSHistoryTable, 0 }; -JSHistory::JSHistory(PassRefPtr<Structure> structure, PassRefPtr<History> impl) - : DOMObject(structure) +JSHistory::JSHistory(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<History> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -104,8 +104,9 @@ bool JSHistory::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsHistoryLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSHistory* castedThis = static_cast<JSHistory*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - History* imp = static_cast<History*>(static_cast<JSHistory*>(asObject(slot.slotBase()))->impl()); + History* imp = static_cast<History*>(castedThis->impl()); return jsNumber(exec, imp->length()); } @@ -153,9 +154,9 @@ JSValue JSC_HOST_CALL jsHistoryPrototypeFunctionGo(ExecState* exec, JSObject*, J return jsUndefined(); } -JSC::JSValue toJS(JSC::ExecState* exec, History* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, History* object) { - return getDOMObjectWrapper<JSHistory>(exec, object); + return getDOMObjectWrapper<JSHistory>(exec, globalObject, object); } History* toHistory(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSHistory.h b/src/3rdparty/webkit/WebCore/generated/JSHistory.h index e81255aebd..8163882f37 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHistory.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHistory.h @@ -21,6 +21,7 @@ #ifndef JSHistory_h #define JSHistory_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class History; -class JSHistory : public DOMObject { - typedef DOMObject Base; +class JSHistory : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSHistory(PassRefPtr<JSC::Structure>, PassRefPtr<History>); + JSHistory(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<History>); virtual ~JSHistory(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -55,7 +56,7 @@ private: RefPtr<History> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, History*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, History*); History* toHistory(JSC::JSValue); class JSHistoryPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp b/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp index 139249b9be..841b1a2e62 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSImageDataConstructorTable = { 1, 0, JSImageDataConstructorTableValues, 0 }; #endif -class JSImageDataConstructor : public DOMObject { +class JSImageDataConstructor : public DOMConstructorObject { public: - JSImageDataConstructor(ExecState* exec) - : DOMObject(JSImageDataConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSImageDataConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSImageDataConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSImageDataPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSImageDataPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSImageDataPrototype::self(ExecState* exec, JSGlobalObject* globalObje const ClassInfo JSImageData::s_info = { "ImageData", 0, &JSImageDataTable, 0 }; -JSImageData::JSImageData(PassRefPtr<Structure> structure, PassRefPtr<ImageData> impl) - : DOMObject(structure) +JSImageData::JSImageData(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ImageData> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -132,25 +132,28 @@ bool JSImageData::getOwnPropertySlot(ExecState* exec, const Identifier& property JSValue jsImageDataWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSImageData* castedThis = static_cast<JSImageData*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ImageData* imp = static_cast<ImageData*>(static_cast<JSImageData*>(asObject(slot.slotBase()))->impl()); + ImageData* imp = static_cast<ImageData*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsImageDataHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSImageData* castedThis = static_cast<JSImageData*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ImageData* imp = static_cast<ImageData*>(static_cast<JSImageData*>(asObject(slot.slotBase()))->impl()); + ImageData* imp = static_cast<ImageData*>(castedThis->impl()); return jsNumber(exec, imp->height()); } JSValue jsImageDataConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSImageData*>(asObject(slot.slotBase()))->getConstructor(exec); + JSImageData* domObject = static_cast<JSImageData*>(asObject(slot.slotBase())); + return JSImageData::getConstructor(exec, domObject->globalObject()); } -JSValue JSImageData::getConstructor(ExecState* exec) +JSValue JSImageData::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSImageDataConstructor>(exec); + return getDOMConstructor<JSImageDataConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } ImageData* toImageData(JSC::JSValue value) diff --git a/src/3rdparty/webkit/WebCore/generated/JSImageData.h b/src/3rdparty/webkit/WebCore/generated/JSImageData.h index 12a9f014a4..5b6ab1d080 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSImageData.h +++ b/src/3rdparty/webkit/WebCore/generated/JSImageData.h @@ -21,6 +21,7 @@ #ifndef JSImageData_h #define JSImageData_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class ImageData; -class JSImageData : public DOMObject { - typedef DOMObject Base; +class JSImageData : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSImageData(PassRefPtr<JSC::Structure>, PassRefPtr<ImageData>); + JSImageData(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<ImageData>); virtual ~JSImageData(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); ImageData* impl() const { return m_impl.get(); } private: RefPtr<ImageData> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, ImageData*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, ImageData*); ImageData* toImageData(JSC::JSValue); class JSImageDataPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp new file mode 100644 index 0000000000..78e5420058 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp @@ -0,0 +1,773 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "JSInspectorBackend.h" + +#include "DOMWindow.h" +#include "InspectorBackend.h" +#include "JSNode.h" +#include "KURL.h" +#include <runtime/Error.h> +#include <runtime/JSString.h> +#include <wtf/GetPtr.h> + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSInspectorBackend); + +/* Hash table */ + +static const HashTableValue JSInspectorBackendTableValues[2] = +{ + { "constructor", DontEnum|ReadOnly, (intptr_t)jsInspectorBackendConstructor, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSInspectorBackendTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSInspectorBackendTableValues, 0 }; +#else + { 2, 1, JSInspectorBackendTableValues, 0 }; +#endif + +/* Hash table for constructor */ + +static const HashTableValue JSInspectorBackendConstructorTableValues[1] = +{ + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSInspectorBackendConstructorTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSInspectorBackendConstructorTableValues, 0 }; +#else + { 1, 0, JSInspectorBackendConstructorTableValues, 0 }; +#endif + +class JSInspectorBackendConstructor : public DOMConstructorObject { +public: + JSInspectorBackendConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSInspectorBackendConstructor::createStructure(globalObject->objectPrototype()), globalObject) + { + putDirect(exec->propertyNames().prototype, JSInspectorBackendPrototype::self(exec, globalObject), None); + } + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual const ClassInfo* classInfo() const { return &s_info; } + static const ClassInfo s_info; + + static PassRefPtr<Structure> createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); + } +}; + +const ClassInfo JSInspectorBackendConstructor::s_info = { "InspectorBackendConstructor", 0, &JSInspectorBackendConstructorTable, 0 }; + +bool JSInspectorBackendConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSInspectorBackendConstructor, DOMObject>(exec, &JSInspectorBackendConstructorTable, this, propertyName, slot); +} + +/* Hash table for prototype */ + +static const HashTableValue JSInspectorBackendPrototypeTableValues[48] = +{ + { "hideDOMNodeHighlight", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionHideDOMNodeHighlight, (intptr_t)0 }, + { "highlightDOMNode", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionHighlightDOMNode, (intptr_t)1 }, + { "loaded", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionLoaded, (intptr_t)0 }, + { "windowUnloading", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionWindowUnloading, (intptr_t)0 }, + { "attach", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionAttach, (intptr_t)0 }, + { "detach", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionDetach, (intptr_t)0 }, + { "closeWindow", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionCloseWindow, (intptr_t)0 }, + { "clearMessages", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionClearMessages, (intptr_t)0 }, + { "toggleNodeSearch", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionToggleNodeSearch, (intptr_t)0 }, + { "isWindowVisible", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionIsWindowVisible, (intptr_t)0 }, + { "searchingForNode", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionSearchingForNode, (intptr_t)0 }, + { "addResourceSourceToFrame", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionAddResourceSourceToFrame, (intptr_t)2 }, + { "addSourceToFrame", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionAddSourceToFrame, (intptr_t)3 }, + { "search", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionSearch, (intptr_t)2 }, + { "databaseTableNames", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionDatabaseTableNames, (intptr_t)1 }, + { "setting", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionSetting, (intptr_t)1 }, + { "setSetting", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionSetSetting, (intptr_t)2 }, + { "inspectedWindow", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionInspectedWindow, (intptr_t)0 }, + { "localizedStringsURL", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionLocalizedStringsURL, (intptr_t)0 }, + { "hiddenPanels", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionHiddenPanels, (intptr_t)0 }, + { "platform", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionPlatform, (intptr_t)0 }, + { "moveByUnrestricted", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionMoveByUnrestricted, (intptr_t)2 }, + { "setAttachedWindowHeight", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionSetAttachedWindowHeight, (intptr_t)1 }, + { "wrapCallback", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionWrapCallback, (intptr_t)1 }, + { "resourceTrackingEnabled", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionResourceTrackingEnabled, (intptr_t)0 }, + { "enableResourceTracking", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionEnableResourceTracking, (intptr_t)1 }, + { "disableResourceTracking", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionDisableResourceTracking, (intptr_t)1 }, + { "storeLastActivePanel", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionStoreLastActivePanel, (intptr_t)1 }, + { "debuggerEnabled", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionDebuggerEnabled, (intptr_t)0 }, + { "enableDebugger", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionEnableDebugger, (intptr_t)1 }, + { "disableDebugger", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionDisableDebugger, (intptr_t)1 }, + { "addBreakpoint", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionAddBreakpoint, (intptr_t)2 }, + { "removeBreakpoint", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionRemoveBreakpoint, (intptr_t)2 }, + { "pauseInDebugger", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionPauseInDebugger, (intptr_t)0 }, + { "resumeDebugger", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionResumeDebugger, (intptr_t)0 }, + { "stepOverStatementInDebugger", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionStepOverStatementInDebugger, (intptr_t)0 }, + { "stepIntoStatementInDebugger", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionStepIntoStatementInDebugger, (intptr_t)0 }, + { "stepOutOfFunctionInDebugger", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionStepOutOfFunctionInDebugger, (intptr_t)0 }, + { "currentCallFrame", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionCurrentCallFrame, (intptr_t)0 }, + { "pauseOnExceptions", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionPauseOnExceptions, (intptr_t)0 }, + { "setPauseOnExceptions", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionSetPauseOnExceptions, (intptr_t)1 }, + { "profilerEnabled", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionProfilerEnabled, (intptr_t)0 }, + { "enableProfiler", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionEnableProfiler, (intptr_t)1 }, + { "disableProfiler", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionDisableProfiler, (intptr_t)1 }, + { "startProfiling", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionStartProfiling, (intptr_t)0 }, + { "stopProfiling", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionStopProfiling, (intptr_t)0 }, + { "profiles", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionProfiles, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSInspectorBackendPrototypeTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 2047, JSInspectorBackendPrototypeTableValues, 0 }; +#else + { 137, 127, JSInspectorBackendPrototypeTableValues, 0 }; +#endif + +const ClassInfo JSInspectorBackendPrototype::s_info = { "InspectorBackendPrototype", 0, &JSInspectorBackendPrototypeTable, 0 }; + +JSObject* JSInspectorBackendPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype<JSInspectorBackend>(exec, globalObject); +} + +bool JSInspectorBackendPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot<JSObject>(exec, &JSInspectorBackendPrototypeTable, this, propertyName, slot); +} + +const ClassInfo JSInspectorBackend::s_info = { "InspectorBackend", 0, &JSInspectorBackendTable, 0 }; + +JSInspectorBackend::JSInspectorBackend(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<InspectorBackend> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) + , m_impl(impl) +{ +} + +JSInspectorBackend::~JSInspectorBackend() +{ + forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get()); +} + +JSObject* JSInspectorBackend::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSInspectorBackendPrototype(JSInspectorBackendPrototype::createStructure(globalObject->objectPrototype())); +} + +bool JSInspectorBackend::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSInspectorBackend, Base>(exec, &JSInspectorBackendTable, this, propertyName, slot); +} + +JSValue jsInspectorBackendConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSInspectorBackend* domObject = static_cast<JSInspectorBackend*>(asObject(slot.slotBase())); + return JSInspectorBackend::getConstructor(exec, domObject->globalObject()); +} +JSValue JSInspectorBackend::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor<JSInspectorBackendConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionHideDOMNodeHighlight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->hideDOMNodeHighlight(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionHighlightDOMNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->highlightDOMNode(exec, args); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionLoaded(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->loaded(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionWindowUnloading(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->windowUnloading(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionAttach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->attach(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDetach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->detach(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionCloseWindow(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->closeWindow(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionClearMessages(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->clearMessages(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionToggleNodeSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->toggleNodeSearch(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionIsWindowVisible(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsBoolean(imp->isWindowVisible()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSearchingForNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsBoolean(imp->searchingForNode()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionAddResourceSourceToFrame(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + int identifier = args.at(0).toInt32(exec); + Node* frame = toNode(args.at(1)); + + imp->addResourceSourceToFrame(identifier, frame); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionAddSourceToFrame(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + const UString& mimeType = args.at(0).toString(exec); + const UString& sourceValue = args.at(1).toString(exec); + Node* frame = toNode(args.at(2)); + + + JSC::JSValue result = jsBoolean(imp->addSourceToFrame(mimeType, sourceValue, frame)); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->search(exec, args); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDatabaseTableNames(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->databaseTableNames(exec, args); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetting(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->setting(exec, args); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetSetting(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->setSetting(exec, args); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionInspectedWindow(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->inspectedWindow(exec, args); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionLocalizedStringsURL(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsString(exec, imp->localizedStringsURL()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionHiddenPanels(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsString(exec, imp->hiddenPanels()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPlatform(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsString(exec, imp->platform()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionMoveByUnrestricted(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + float x = args.at(0).toFloat(exec); + float y = args.at(1).toFloat(exec); + + imp->moveWindowBy(x, y); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetAttachedWindowHeight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + unsigned height = args.at(0).toInt32(exec); + + imp->setAttachedWindowHeight(height); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionWrapCallback(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->wrapCallback(exec, args); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionResourceTrackingEnabled(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsBoolean(imp->resourceTrackingEnabled()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionEnableResourceTracking(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + bool always = args.at(0).toBoolean(exec); + + imp->enableResourceTracking(always); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDisableResourceTracking(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + bool always = args.at(0).toBoolean(exec); + + imp->disableResourceTracking(always); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStoreLastActivePanel(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + const UString& panelName = args.at(0).toString(exec); + + imp->storeLastActivePanel(panelName); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDebuggerEnabled(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsBoolean(imp->debuggerEnabled()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionEnableDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + bool always = args.at(0).toBoolean(exec); + + imp->enableDebugger(always); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDisableDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + bool always = args.at(0).toBoolean(exec); + + imp->disableDebugger(always); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionAddBreakpoint(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + const UString& sourceID = args.at(0).toString(exec); + unsigned lineNumber = args.at(1).toInt32(exec); + + imp->addBreakpoint(sourceID, lineNumber); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionRemoveBreakpoint(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + const UString& sourceID = args.at(0).toString(exec); + unsigned lineNumber = args.at(1).toInt32(exec); + + imp->removeBreakpoint(sourceID, lineNumber); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPauseInDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->pauseInDebugger(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionResumeDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->resumeDebugger(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStepOverStatementInDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->stepOverStatementInDebugger(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStepIntoStatementInDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->stepIntoStatementInDebugger(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStepOutOfFunctionInDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->stepOutOfFunctionInDebugger(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionCurrentCallFrame(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->currentCallFrame(exec, args); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPauseOnExceptions(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsBoolean(imp->pauseOnExceptions()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetPauseOnExceptions(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + bool pauseOnExceptions = args.at(0).toBoolean(exec); + + imp->setPauseOnExceptions(pauseOnExceptions); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionProfilerEnabled(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsBoolean(imp->profilerEnabled()); + return result; +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionEnableProfiler(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + bool always = args.at(0).toBoolean(exec); + + imp->enableProfiler(always); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDisableProfiler(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + bool always = args.at(0).toBoolean(exec); + + imp->disableProfiler(always); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStartProfiling(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->startProfiling(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStopProfiling(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + imp->stopProfiling(); + return jsUndefined(); +} + +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionProfiles(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.isObject(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + return castedThisObj->profiles(exec, args); +} + +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, InspectorBackend* object) +{ + return getDOMObjectWrapper<JSInspectorBackend>(exec, globalObject, object); +} +InspectorBackend* toInspectorBackend(JSC::JSValue value) +{ + return value.isObject(&JSInspectorBackend::s_info) ? static_cast<JSInspectorBackend*>(asObject(value))->impl() : 0; +} + +} diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h new file mode 100644 index 0000000000..da9a09ebcb --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h @@ -0,0 +1,138 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef JSInspectorBackend_h +#define JSInspectorBackend_h + +#include "DOMObjectWithSVGContext.h" +#include "JSDOMBinding.h" +#include <runtime/JSGlobalObject.h> +#include <runtime/ObjectPrototype.h> + +namespace WebCore { + +class InspectorBackend; + +class JSInspectorBackend : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; +public: + JSInspectorBackend(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<InspectorBackend>); + virtual ~JSInspectorBackend(); + static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); + + // Custom functions + JSC::JSValue highlightDOMNode(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue search(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue databaseTableNames(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue setting(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue setSetting(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue inspectedWindow(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue wrapCallback(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue currentCallFrame(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue profiles(JSC::ExecState*, const JSC::ArgList&); + InspectorBackend* impl() const { return m_impl.get(); } + +private: + RefPtr<InspectorBackend> m_impl; +}; + +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, InspectorBackend*); +InspectorBackend* toInspectorBackend(JSC::JSValue); + +class JSInspectorBackendPrototype : public JSC::JSObject { + typedef JSC::JSObject Base; +public: + static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + JSInspectorBackendPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { } +}; + +// Functions + +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionHideDOMNodeHighlight(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionHighlightDOMNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionLoaded(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionWindowUnloading(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionAttach(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDetach(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionCloseWindow(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionClearMessages(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionToggleNodeSearch(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionIsWindowVisible(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSearchingForNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionAddResourceSourceToFrame(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionAddSourceToFrame(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSearch(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDatabaseTableNames(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetting(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetSetting(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionInspectedWindow(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionLocalizedStringsURL(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionHiddenPanels(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPlatform(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionMoveByUnrestricted(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetAttachedWindowHeight(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionWrapCallback(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionResourceTrackingEnabled(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionEnableResourceTracking(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDisableResourceTracking(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStoreLastActivePanel(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDebuggerEnabled(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionEnableDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDisableDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionAddBreakpoint(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionRemoveBreakpoint(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPauseInDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionResumeDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStepOverStatementInDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStepIntoStatementInDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStepOutOfFunctionInDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionCurrentCallFrame(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPauseOnExceptions(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetPauseOnExceptions(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionProfilerEnabled(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionEnableProfiler(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionDisableProfiler(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStartProfiling(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStopProfiling(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionProfiles(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +// Attributes + +JSC::JSValue jsInspectorBackendConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); + +} // namespace WebCore + +#endif diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorController.cpp b/src/3rdparty/webkit/WebCore/generated/JSInspectorController.cpp deleted file mode 100644 index a457224c8e..0000000000 --- a/src/3rdparty/webkit/WebCore/generated/JSInspectorController.cpp +++ /dev/null @@ -1,769 +0,0 @@ -/* - This file is part of the WebKit open source project. - This file has been generated by generate-bindings.pl. DO NOT MODIFY! - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "config.h" -#include "JSInspectorController.h" - -#include "DOMWindow.h" -#include "InspectorController.h" -#include "JSNode.h" -#include "KURL.h" -#include "Node.h" -#include <runtime/Error.h> -#include <runtime/JSString.h> -#include <wtf/GetPtr.h> - -using namespace JSC; - -namespace WebCore { - -ASSERT_CLASS_FITS_IN_CELL(JSInspectorController); - -/* Hash table */ - -static const HashTableValue JSInspectorControllerTableValues[2] = -{ - { "constructor", DontEnum|ReadOnly, (intptr_t)jsInspectorControllerConstructor, (intptr_t)0 }, - { 0, 0, 0, 0 } -}; - -static JSC_CONST_HASHTABLE HashTable JSInspectorControllerTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 0, JSInspectorControllerTableValues, 0 }; -#else - { 2, 1, JSInspectorControllerTableValues, 0 }; -#endif - -/* Hash table for constructor */ - -static const HashTableValue JSInspectorControllerConstructorTableValues[1] = -{ - { 0, 0, 0, 0 } -}; - -static JSC_CONST_HASHTABLE HashTable JSInspectorControllerConstructorTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 0, JSInspectorControllerConstructorTableValues, 0 }; -#else - { 1, 0, JSInspectorControllerConstructorTableValues, 0 }; -#endif - -class JSInspectorControllerConstructor : public DOMObject { -public: - JSInspectorControllerConstructor(ExecState* exec) - : DOMObject(JSInspectorControllerConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) - { - putDirect(exec->propertyNames().prototype, JSInspectorControllerPrototype::self(exec, exec->lexicalGlobalObject()), None); - } - virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); - virtual const ClassInfo* classInfo() const { return &s_info; } - static const ClassInfo s_info; - - static PassRefPtr<Structure> createStructure(JSValue proto) - { - return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); - } -}; - -const ClassInfo JSInspectorControllerConstructor::s_info = { "InspectorControllerConstructor", 0, &JSInspectorControllerConstructorTable, 0 }; - -bool JSInspectorControllerConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) -{ - return getStaticValueSlot<JSInspectorControllerConstructor, DOMObject>(exec, &JSInspectorControllerConstructorTable, this, propertyName, slot); -} - -/* Hash table for prototype */ - -static const HashTableValue JSInspectorControllerPrototypeTableValues[48] = -{ - { "hideDOMNodeHighlight", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionHideDOMNodeHighlight, (intptr_t)0 }, - { "highlightDOMNode", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionHighlightDOMNode, (intptr_t)1 }, - { "loaded", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionLoaded, (intptr_t)0 }, - { "windowUnloading", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionWindowUnloading, (intptr_t)0 }, - { "attach", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionAttach, (intptr_t)0 }, - { "detach", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionDetach, (intptr_t)0 }, - { "closeWindow", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionCloseWindow, (intptr_t)0 }, - { "clearMessages", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionClearMessages, (intptr_t)0 }, - { "toggleNodeSearch", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionToggleNodeSearch, (intptr_t)0 }, - { "isWindowVisible", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionIsWindowVisible, (intptr_t)0 }, - { "searchingForNode", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionSearchingForNode, (intptr_t)0 }, - { "addResourceSourceToFrame", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionAddResourceSourceToFrame, (intptr_t)2 }, - { "addSourceToFrame", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionAddSourceToFrame, (intptr_t)3 }, - { "getResourceDocumentNode", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionGetResourceDocumentNode, (intptr_t)1 }, - { "search", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionSearch, (intptr_t)2 }, - { "databaseTableNames", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionDatabaseTableNames, (intptr_t)1 }, - { "setting", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionSetting, (intptr_t)1 }, - { "setSetting", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionSetSetting, (intptr_t)2 }, - { "inspectedWindow", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionInspectedWindow, (intptr_t)0 }, - { "localizedStringsURL", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionLocalizedStringsURL, (intptr_t)0 }, - { "hiddenPanels", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionHiddenPanels, (intptr_t)0 }, - { "platform", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionPlatform, (intptr_t)0 }, - { "moveByUnrestricted", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionMoveByUnrestricted, (intptr_t)2 }, - { "setAttachedWindowHeight", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionSetAttachedWindowHeight, (intptr_t)1 }, - { "wrapCallback", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionWrapCallback, (intptr_t)1 }, - { "resourceTrackingEnabled", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionResourceTrackingEnabled, (intptr_t)0 }, - { "enableResourceTracking", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionEnableResourceTracking, (intptr_t)1 }, - { "disableResourceTracking", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionDisableResourceTracking, (intptr_t)1 }, - { "enableDebuggerFromFrontend", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionEnableDebuggerFromFrontend, (intptr_t)1 }, - { "disableDebugger", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionDisableDebugger, (intptr_t)1 }, - { "pauseInDebugger", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionPauseInDebugger, (intptr_t)0 }, - { "resumeDebugger", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionResumeDebugger, (intptr_t)0 }, - { "stepOverStatementInDebugger", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionStepOverStatementInDebugger, (intptr_t)0 }, - { "stepIntoStatementInDebugger", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionStepIntoStatementInDebugger, (intptr_t)0 }, - { "stepOutOfFunctionInDebugger", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionStepOutOfFunctionInDebugger, (intptr_t)0 }, - { "debuggerEnabled", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionDebuggerEnabled, (intptr_t)0 }, - { "pauseOnExceptions", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionPauseOnExceptions, (intptr_t)0 }, - { "profilerEnabled", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionProfilerEnabled, (intptr_t)0 }, - { "startProfiling", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionStartProfiling, (intptr_t)0 }, - { "stopProfiling", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionStopProfiling, (intptr_t)0 }, - { "enableProfiler", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionEnableProfiler, (intptr_t)1 }, - { "disableProfiler", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionDisableProfiler, (intptr_t)1 }, - { "currentCallFrame", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionCurrentCallFrame, (intptr_t)0 }, - { "setPauseOnExceptions", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionSetPauseOnExceptions, (intptr_t)1 }, - { "addBreakpoint", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionAddBreakpoint, (intptr_t)2 }, - { "removeBreakpoint", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionRemoveBreakpoint, (intptr_t)2 }, - { "profiles", DontDelete|Function, (intptr_t)jsInspectorControllerPrototypeFunctionProfiles, (intptr_t)0 }, - { 0, 0, 0, 0 } -}; - -static JSC_CONST_HASHTABLE HashTable JSInspectorControllerPrototypeTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 2047, JSInspectorControllerPrototypeTableValues, 0 }; -#else - { 137, 127, JSInspectorControllerPrototypeTableValues, 0 }; -#endif - -const ClassInfo JSInspectorControllerPrototype::s_info = { "InspectorControllerPrototype", 0, &JSInspectorControllerPrototypeTable, 0 }; - -JSObject* JSInspectorControllerPrototype::self(ExecState* exec, JSGlobalObject* globalObject) -{ - return getDOMPrototype<JSInspectorController>(exec, globalObject); -} - -bool JSInspectorControllerPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) -{ - return getStaticFunctionSlot<JSObject>(exec, &JSInspectorControllerPrototypeTable, this, propertyName, slot); -} - -const ClassInfo JSInspectorController::s_info = { "InspectorController", 0, &JSInspectorControllerTable, 0 }; - -JSInspectorController::JSInspectorController(PassRefPtr<Structure> structure, PassRefPtr<InspectorController> impl) - : DOMObject(structure) - , m_impl(impl) -{ -} - -JSInspectorController::~JSInspectorController() -{ - forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get()); -} - -JSObject* JSInspectorController::createPrototype(ExecState* exec, JSGlobalObject* globalObject) -{ - return new (exec) JSInspectorControllerPrototype(JSInspectorControllerPrototype::createStructure(globalObject->objectPrototype())); -} - -bool JSInspectorController::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) -{ - return getStaticValueSlot<JSInspectorController, Base>(exec, &JSInspectorControllerTable, this, propertyName, slot); -} - -JSValue jsInspectorControllerConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) -{ - return static_cast<JSInspectorController*>(asObject(slot.slotBase()))->getConstructor(exec); -} -JSValue JSInspectorController::getConstructor(ExecState* exec) -{ - return getDOMConstructor<JSInspectorControllerConstructor>(exec); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionHideDOMNodeHighlight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->hideHighlight(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionHighlightDOMNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->highlightDOMNode(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionLoaded(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->scriptObjectReady(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionWindowUnloading(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->close(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionAttach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->attachWindow(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDetach(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->detachWindow(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionCloseWindow(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->closeWindow(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionClearMessages(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->clearConsoleMessages(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionToggleNodeSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->toggleSearchForNodeInPage(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionIsWindowVisible(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsBoolean(imp->windowVisible()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSearchingForNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsBoolean(imp->searchingForNodeInPage()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionAddResourceSourceToFrame(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - int identifier = args.at(0).toInt32(exec); - Node* frame = toNode(args.at(1)); - - imp->addResourceSourceToFrame(identifier, frame); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionAddSourceToFrame(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - const UString& mimeType = args.at(0).toString(exec); - const UString& sourceValue = args.at(1).toString(exec); - Node* frame = toNode(args.at(2)); - - - JSC::JSValue result = jsBoolean(imp->addSourceToFrame(mimeType, sourceValue, frame)); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionGetResourceDocumentNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->getResourceDocumentNode(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSearch(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->search(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDatabaseTableNames(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->databaseTableNames(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSetting(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->setting(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSetSetting(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->setSetting(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionInspectedWindow(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->inspectedWindow(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionLocalizedStringsURL(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsString(exec, imp->localizedStringsURL()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionHiddenPanels(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsString(exec, imp->hiddenPanels()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionPlatform(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsString(exec, imp->platform()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionMoveByUnrestricted(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - float x = args.at(0).toFloat(exec); - float y = args.at(1).toFloat(exec); - - imp->moveWindowBy(x, y); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSetAttachedWindowHeight(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - unsigned height = args.at(0).toInt32(exec); - - imp->setAttachedWindowHeight(height); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionWrapCallback(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->wrapCallback(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionResourceTrackingEnabled(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsBoolean(imp->resourceTrackingEnabled()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionEnableResourceTracking(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - bool always = args.at(0).toBoolean(exec); - - imp->enableResourceTracking(always); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDisableResourceTracking(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - bool always = args.at(0).toBoolean(exec); - - imp->disableResourceTracking(always); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionEnableDebuggerFromFrontend(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - bool always = args.at(0).toBoolean(exec); - - imp->enableDebuggerFromFrontend(always); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDisableDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - bool always = args.at(0).toBoolean(exec); - - imp->disableDebugger(always); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionPauseInDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->pauseInDebugger(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionResumeDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->resumeDebugger(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStepOverStatementInDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->stepOverStatementInDebugger(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStepIntoStatementInDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->stepIntoStatementInDebugger(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStepOutOfFunctionInDebugger(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->stepOutOfFunctionInDebugger(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDebuggerEnabled(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsBoolean(imp->debuggerEnabled()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionPauseOnExceptions(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsBoolean(imp->pauseOnExceptions()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionProfilerEnabled(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - - JSC::JSValue result = jsBoolean(imp->profilerEnabled()); - return result; -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStartProfiling(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->startUserInitiatedProfiling(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStopProfiling(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - - imp->stopUserInitiatedProfiling(); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionEnableProfiler(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - bool always = args.at(0).toBoolean(exec); - - imp->enableProfiler(always); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDisableProfiler(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - bool always = args.at(0).toBoolean(exec); - - imp->disableProfiler(always); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionCurrentCallFrame(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->currentCallFrame(exec, args); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSetPauseOnExceptions(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - bool pauseOnExceptions = args.at(0).toBoolean(exec); - - imp->setPauseOnExceptions(pauseOnExceptions); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionAddBreakpoint(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - const UString& sourceID = args.at(0).toString(exec); - unsigned lineNumber = args.at(1).toInt32(exec); - - imp->addBreakpoint(sourceID, lineNumber); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionRemoveBreakpoint(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - InspectorController* imp = static_cast<InspectorController*>(castedThisObj->impl()); - const UString& sourceID = args.at(0).toString(exec); - unsigned lineNumber = args.at(1).toInt32(exec); - - imp->removeBreakpoint(sourceID, lineNumber); - return jsUndefined(); -} - -JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionProfiles(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSInspectorController::s_info)) - return throwError(exec, TypeError); - JSInspectorController* castedThisObj = static_cast<JSInspectorController*>(asObject(thisValue)); - return castedThisObj->profiles(exec, args); -} - -JSC::JSValue toJS(JSC::ExecState* exec, InspectorController* object) -{ - return getDOMObjectWrapper<JSInspectorController>(exec, object); -} -InspectorController* toInspectorController(JSC::JSValue value) -{ - return value.isObject(&JSInspectorController::s_info) ? static_cast<JSInspectorController*>(asObject(value))->impl() : 0; -} - -} diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorController.h b/src/3rdparty/webkit/WebCore/generated/JSInspectorController.h deleted file mode 100644 index 3bb1480d0c..0000000000 --- a/src/3rdparty/webkit/WebCore/generated/JSInspectorController.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - This file is part of the WebKit open source project. - This file has been generated by generate-bindings.pl. DO NOT MODIFY! - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef JSInspectorController_h -#define JSInspectorController_h - -#include "JSDOMBinding.h" -#include <runtime/JSGlobalObject.h> -#include <runtime/ObjectPrototype.h> - -namespace WebCore { - -class InspectorController; - -class JSInspectorController : public DOMObject { - typedef DOMObject Base; -public: - JSInspectorController(PassRefPtr<JSC::Structure>, PassRefPtr<InspectorController>); - virtual ~JSInspectorController(); - static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); - virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); - virtual const JSC::ClassInfo* classInfo() const { return &s_info; } - static const JSC::ClassInfo s_info; - - static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) - { - return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); - } - - static JSC::JSValue getConstructor(JSC::ExecState*); - - // Custom functions - JSC::JSValue highlightDOMNode(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue getResourceDocumentNode(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue search(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue databaseTableNames(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue setting(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue setSetting(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue inspectedWindow(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue wrapCallback(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue currentCallFrame(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue profiles(JSC::ExecState*, const JSC::ArgList&); - InspectorController* impl() const { return m_impl.get(); } - -private: - RefPtr<InspectorController> m_impl; -}; - -JSC::JSValue toJS(JSC::ExecState*, InspectorController*); -InspectorController* toInspectorController(JSC::JSValue); - -class JSInspectorControllerPrototype : public JSC::JSObject { - typedef JSC::JSObject Base; -public: - static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); - virtual const JSC::ClassInfo* classInfo() const { return &s_info; } - static const JSC::ClassInfo s_info; - virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); - static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) - { - return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); - } - JSInspectorControllerPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { } -}; - -// Functions - -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionHideDOMNodeHighlight(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionHighlightDOMNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionLoaded(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionWindowUnloading(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionAttach(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDetach(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionCloseWindow(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionClearMessages(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionToggleNodeSearch(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionIsWindowVisible(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSearchingForNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionAddResourceSourceToFrame(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionAddSourceToFrame(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionGetResourceDocumentNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSearch(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDatabaseTableNames(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSetting(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSetSetting(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionInspectedWindow(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionLocalizedStringsURL(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionHiddenPanels(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionPlatform(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionMoveByUnrestricted(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSetAttachedWindowHeight(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionWrapCallback(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionResourceTrackingEnabled(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionEnableResourceTracking(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDisableResourceTracking(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionEnableDebuggerFromFrontend(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDisableDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionPauseInDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionResumeDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStepOverStatementInDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStepIntoStatementInDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStepOutOfFunctionInDebugger(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDebuggerEnabled(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionPauseOnExceptions(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionProfilerEnabled(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStartProfiling(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionStopProfiling(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionEnableProfiler(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionDisableProfiler(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionCurrentCallFrame(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionSetPauseOnExceptions(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionAddBreakpoint(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionRemoveBreakpoint(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsInspectorControllerPrototypeFunctionProfiles(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -// Attributes - -JSC::JSValue jsInspectorControllerConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); - -} // namespace WebCore - -#endif diff --git a/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp b/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp index a4a4f8be5f..dc9389f774 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp @@ -88,8 +88,8 @@ bool JSJavaScriptCallFramePrototype::getOwnPropertySlot(ExecState* exec, const I const ClassInfo JSJavaScriptCallFrame::s_info = { "JavaScriptCallFrame", 0, &JSJavaScriptCallFrameTable, 0 }; -JSJavaScriptCallFrame::JSJavaScriptCallFrame(PassRefPtr<Structure> structure, PassRefPtr<JavaScriptCallFrame> impl) - : DOMObject(structure) +JSJavaScriptCallFrame::JSJavaScriptCallFrame(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JavaScriptCallFrame> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -111,45 +111,52 @@ bool JSJavaScriptCallFrame::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsJavaScriptCallFrameCaller(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSJavaScriptCallFrame* castedThis = static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - JavaScriptCallFrame* imp = static_cast<JavaScriptCallFrame*>(static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->caller())); + JavaScriptCallFrame* imp = static_cast<JavaScriptCallFrame*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->caller())); } JSValue jsJavaScriptCallFrameSourceID(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSJavaScriptCallFrame* castedThis = static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - JavaScriptCallFrame* imp = static_cast<JavaScriptCallFrame*>(static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase()))->impl()); + JavaScriptCallFrame* imp = static_cast<JavaScriptCallFrame*>(castedThis->impl()); return jsNumber(exec, imp->sourceID()); } JSValue jsJavaScriptCallFrameLine(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSJavaScriptCallFrame* castedThis = static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - JavaScriptCallFrame* imp = static_cast<JavaScriptCallFrame*>(static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase()))->impl()); + JavaScriptCallFrame* imp = static_cast<JavaScriptCallFrame*>(castedThis->impl()); return jsNumber(exec, imp->line()); } JSValue jsJavaScriptCallFrameScopeChain(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase()))->scopeChain(exec); + JSJavaScriptCallFrame* castedThis = static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase())); + return castedThis->scopeChain(exec); } JSValue jsJavaScriptCallFrameThisObject(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase()))->thisObject(exec); + JSJavaScriptCallFrame* castedThis = static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase())); + return castedThis->thisObject(exec); } JSValue jsJavaScriptCallFrameFunctionName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSJavaScriptCallFrame* castedThis = static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - JavaScriptCallFrame* imp = static_cast<JavaScriptCallFrame*>(static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase()))->impl()); + JavaScriptCallFrame* imp = static_cast<JavaScriptCallFrame*>(castedThis->impl()); return jsString(exec, imp->functionName()); } JSValue jsJavaScriptCallFrameType(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase()))->type(exec); + JSJavaScriptCallFrame* castedThis = static_cast<JSJavaScriptCallFrame*>(asObject(slot.slotBase())); + return castedThis->type(exec); } JSValue JSC_HOST_CALL jsJavaScriptCallFramePrototypeFunctionEvaluate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -161,9 +168,9 @@ JSValue JSC_HOST_CALL jsJavaScriptCallFramePrototypeFunctionEvaluate(ExecState* return castedThisObj->evaluate(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, JavaScriptCallFrame* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JavaScriptCallFrame* object) { - return getDOMObjectWrapper<JSJavaScriptCallFrame>(exec, object); + return getDOMObjectWrapper<JSJavaScriptCallFrame>(exec, globalObject, object); } JavaScriptCallFrame* toJavaScriptCallFrame(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.h b/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.h index 166ee60579..3dff1bc315 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.h +++ b/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.h @@ -23,6 +23,7 @@ #if ENABLE(JAVASCRIPT_DEBUGGER) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class JavaScriptCallFrame; -class JSJavaScriptCallFrame : public DOMObject { - typedef DOMObject Base; +class JSJavaScriptCallFrame : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSJavaScriptCallFrame(PassRefPtr<JSC::Structure>, PassRefPtr<JavaScriptCallFrame>); + JSJavaScriptCallFrame(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<JavaScriptCallFrame>); virtual ~JSJavaScriptCallFrame(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -60,7 +61,7 @@ private: RefPtr<JavaScriptCallFrame> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, JavaScriptCallFrame*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JavaScriptCallFrame*); JavaScriptCallFrame* toJavaScriptCallFrame(JSC::JSValue); class JSJavaScriptCallFramePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp index a03e149b79..2c5d0bd13b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp @@ -71,12 +71,12 @@ static JSC_CONST_HASHTABLE HashTable JSKeyboardEventConstructorTable = { 1, 0, JSKeyboardEventConstructorTableValues, 0 }; #endif -class JSKeyboardEventConstructor : public DOMObject { +class JSKeyboardEventConstructor : public DOMConstructorObject { public: - JSKeyboardEventConstructor(ExecState* exec) - : DOMObject(JSKeyboardEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSKeyboardEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSKeyboardEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSKeyboardEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSKeyboardEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -124,8 +124,8 @@ bool JSKeyboardEventPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSKeyboardEvent::s_info = { "KeyboardEvent", &JSUIEvent::s_info, &JSKeyboardEventTable, 0 }; -JSKeyboardEvent::JSKeyboardEvent(PassRefPtr<Structure> structure, PassRefPtr<KeyboardEvent> impl) - : JSUIEvent(structure, impl) +JSKeyboardEvent::JSKeyboardEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<KeyboardEvent> impl) + : JSUIEvent(structure, globalObject, impl) { } @@ -141,60 +141,68 @@ bool JSKeyboardEvent::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsKeyboardEventKeyIdentifier(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - KeyboardEvent* imp = static_cast<KeyboardEvent*>(static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()))->impl()); + KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl()); return jsString(exec, imp->keyIdentifier()); } JSValue jsKeyboardEventKeyLocation(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - KeyboardEvent* imp = static_cast<KeyboardEvent*>(static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()))->impl()); + KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl()); return jsNumber(exec, imp->keyLocation()); } JSValue jsKeyboardEventCtrlKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - KeyboardEvent* imp = static_cast<KeyboardEvent*>(static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()))->impl()); + KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl()); return jsBoolean(imp->ctrlKey()); } JSValue jsKeyboardEventShiftKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - KeyboardEvent* imp = static_cast<KeyboardEvent*>(static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()))->impl()); + KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl()); return jsBoolean(imp->shiftKey()); } JSValue jsKeyboardEventAltKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - KeyboardEvent* imp = static_cast<KeyboardEvent*>(static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()))->impl()); + KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl()); return jsBoolean(imp->altKey()); } JSValue jsKeyboardEventMetaKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - KeyboardEvent* imp = static_cast<KeyboardEvent*>(static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()))->impl()); + KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl()); return jsBoolean(imp->metaKey()); } JSValue jsKeyboardEventAltGraphKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSKeyboardEvent* castedThis = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - KeyboardEvent* imp = static_cast<KeyboardEvent*>(static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()))->impl()); + KeyboardEvent* imp = static_cast<KeyboardEvent*>(castedThis->impl()); return jsBoolean(imp->altGraphKey()); } JSValue jsKeyboardEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSKeyboardEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSKeyboardEvent* domObject = static_cast<JSKeyboardEvent*>(asObject(slot.slotBase())); + return JSKeyboardEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSKeyboardEvent::getConstructor(ExecState* exec) +JSValue JSKeyboardEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSKeyboardEventConstructor>(exec); + return getDOMConstructor<JSKeyboardEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsKeyboardEventPrototypeFunctionInitKeyboardEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.h b/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.h index 40e6eb1c2f..b1ead271a8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.h @@ -30,7 +30,7 @@ class KeyboardEvent; class JSKeyboardEvent : public JSUIEvent { typedef JSUIEvent Base; public: - JSKeyboardEvent(PassRefPtr<JSC::Structure>, PassRefPtr<KeyboardEvent>); + JSKeyboardEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<KeyboardEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp index 01b1416ba3..f6d9be462e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp @@ -95,8 +95,8 @@ void JSLocationPrototype::put(ExecState* exec, const Identifier& propertyName, J const ClassInfo JSLocation::s_info = { "Location", 0, &JSLocationTable, 0 }; -JSLocation::JSLocation(PassRefPtr<Structure> structure, PassRefPtr<Location> impl) - : DOMObject(structure) +JSLocation::JSLocation(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Location> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -120,57 +120,65 @@ bool JSLocation::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsLocationHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl()); + Location* imp = static_cast<Location*>(castedThis->impl()); return jsString(exec, imp->href()); } JSValue jsLocationProtocol(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl()); + Location* imp = static_cast<Location*>(castedThis->impl()); return jsString(exec, imp->protocol()); } JSValue jsLocationHost(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl()); + Location* imp = static_cast<Location*>(castedThis->impl()); return jsString(exec, imp->host()); } JSValue jsLocationHostname(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl()); + Location* imp = static_cast<Location*>(castedThis->impl()); return jsString(exec, imp->hostname()); } JSValue jsLocationPort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl()); + Location* imp = static_cast<Location*>(castedThis->impl()); return jsString(exec, imp->port()); } JSValue jsLocationPathname(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl()); + Location* imp = static_cast<Location*>(castedThis->impl()); return jsString(exec, imp->pathname()); } JSValue jsLocationSearch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl()); + Location* imp = static_cast<Location*>(castedThis->impl()); return jsString(exec, imp->search()); } JSValue jsLocationHash(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl()); + Location* imp = static_cast<Location*>(castedThis->impl()); return jsString(exec, imp->hash()); } @@ -257,9 +265,9 @@ JSValue JSC_HOST_CALL jsLocationPrototypeFunctionToString(ExecState* exec, JSObj return castedThisObj->toString(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, Location* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Location* object) { - return getDOMObjectWrapper<JSLocation>(exec, object); + return getDOMObjectWrapper<JSLocation>(exec, globalObject, object); } Location* toLocation(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSLocation.h b/src/3rdparty/webkit/WebCore/generated/JSLocation.h index 81cb7a37a4..155cfbc4f2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSLocation.h +++ b/src/3rdparty/webkit/WebCore/generated/JSLocation.h @@ -21,6 +21,7 @@ #ifndef JSLocation_h #define JSLocation_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Location; -class JSLocation : public DOMObject { - typedef DOMObject Base; +class JSLocation : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSLocation(PassRefPtr<JSC::Structure>, PassRefPtr<Location>); + JSLocation(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Location>); virtual ~JSLocation(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -72,7 +73,7 @@ private: RefPtr<Location> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Location*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Location*); Location* toLocation(JSC::JSValue); class JSLocationPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp b/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp index 76d80441f4..37b1b43df7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSMediaErrorConstructorTable = { 9, 7, JSMediaErrorConstructorTableValues, 0 }; #endif -class JSMediaErrorConstructor : public DOMObject { +class JSMediaErrorConstructor : public DOMConstructorObject { public: - JSMediaErrorConstructor(ExecState* exec) - : DOMObject(JSMediaErrorConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSMediaErrorConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSMediaErrorConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMediaErrorPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMediaErrorPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -124,8 +124,8 @@ bool JSMediaErrorPrototype::getOwnPropertySlot(ExecState* exec, const Identifier const ClassInfo JSMediaError::s_info = { "MediaError", 0, &JSMediaErrorTable, 0 }; -JSMediaError::JSMediaError(PassRefPtr<Structure> structure, PassRefPtr<MediaError> impl) - : DOMObject(structure) +JSMediaError::JSMediaError(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MediaError> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -147,18 +147,20 @@ bool JSMediaError::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsMediaErrorCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMediaError* castedThis = static_cast<JSMediaError*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MediaError* imp = static_cast<MediaError*>(static_cast<JSMediaError*>(asObject(slot.slotBase()))->impl()); + MediaError* imp = static_cast<MediaError*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsMediaErrorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSMediaError*>(asObject(slot.slotBase()))->getConstructor(exec); + JSMediaError* domObject = static_cast<JSMediaError*>(asObject(slot.slotBase())); + return JSMediaError::getConstructor(exec, domObject->globalObject()); } -JSValue JSMediaError::getConstructor(ExecState* exec) +JSValue JSMediaError::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSMediaErrorConstructor>(exec); + return getDOMConstructor<JSMediaErrorConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters @@ -183,9 +185,9 @@ JSValue jsMediaErrorMEDIA_ERR_SRC_NOT_SUPPORTED(ExecState* exec, const Identifie return jsNumber(exec, static_cast<int>(4)); } -JSC::JSValue toJS(JSC::ExecState* exec, MediaError* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, MediaError* object) { - return getDOMObjectWrapper<JSMediaError>(exec, object); + return getDOMObjectWrapper<JSMediaError>(exec, globalObject, object); } MediaError* toMediaError(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMediaError.h b/src/3rdparty/webkit/WebCore/generated/JSMediaError.h index 54f58a7d1d..5a159b92d1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMediaError.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMediaError.h @@ -23,6 +23,7 @@ #if ENABLE(VIDEO) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class MediaError; -class JSMediaError : public DOMObject { - typedef DOMObject Base; +class JSMediaError : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSMediaError(PassRefPtr<JSC::Structure>, PassRefPtr<MediaError>); + JSMediaError(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MediaError>); virtual ~JSMediaError(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); MediaError* impl() const { return m_impl.get(); } private: RefPtr<MediaError> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, MediaError*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, MediaError*); MediaError* toMediaError(JSC::JSValue); class JSMediaErrorPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp b/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp index 448b378ce4..007e9762d0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSMediaListConstructorTable = { 1, 0, JSMediaListConstructorTableValues, 0 }; #endif -class JSMediaListConstructor : public DOMObject { +class JSMediaListConstructor : public DOMConstructorObject { public: - JSMediaListConstructor(ExecState* exec) - : DOMObject(JSMediaListConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSMediaListConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSMediaListConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMediaListPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMediaListPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -120,8 +120,8 @@ bool JSMediaListPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSMediaList::s_info = { "MediaList", 0, &JSMediaListTable, 0 }; -JSMediaList::JSMediaList(PassRefPtr<Structure> structure, PassRefPtr<MediaList> impl) - : DOMObject(structure) +JSMediaList::JSMediaList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MediaList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -163,21 +163,24 @@ bool JSMediaList::getOwnPropertySlot(ExecState* exec, unsigned propertyName, Pro JSValue jsMediaListMediaText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMediaList* castedThis = static_cast<JSMediaList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MediaList* imp = static_cast<MediaList*>(static_cast<JSMediaList*>(asObject(slot.slotBase()))->impl()); + MediaList* imp = static_cast<MediaList*>(castedThis->impl()); return jsStringOrNull(exec, imp->mediaText()); } JSValue jsMediaListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMediaList* castedThis = static_cast<JSMediaList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MediaList* imp = static_cast<MediaList*>(static_cast<JSMediaList*>(asObject(slot.slotBase()))->impl()); + MediaList* imp = static_cast<MediaList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsMediaListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSMediaList*>(asObject(slot.slotBase()))->getConstructor(exec); + JSMediaList* domObject = static_cast<JSMediaList*>(asObject(slot.slotBase())); + return JSMediaList::getConstructor(exec, domObject->globalObject()); } void JSMediaList::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -199,9 +202,9 @@ void JSMediaList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyN Base::getPropertyNames(exec, propertyNames); } -JSValue JSMediaList::getConstructor(ExecState* exec) +JSValue JSMediaList::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSMediaListConstructor>(exec); + return getDOMConstructor<JSMediaListConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsMediaListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -254,9 +257,9 @@ JSValue JSMediaList::indexGetter(ExecState* exec, const Identifier&, const Prope JSMediaList* thisObj = static_cast<JSMediaList*>(asObject(slot.slotBase())); return jsStringOrNull(exec, thisObj->impl()->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, MediaList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, MediaList* object) { - return getDOMObjectWrapper<JSMediaList>(exec, object); + return getDOMObjectWrapper<JSMediaList>(exec, globalObject, object); } MediaList* toMediaList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMediaList.h b/src/3rdparty/webkit/WebCore/generated/JSMediaList.h index 800d9d4b91..da82e56e75 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMediaList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMediaList.h @@ -21,6 +21,7 @@ #ifndef JSMediaList_h #define JSMediaList_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class MediaList; -class JSMediaList : public DOMObject { - typedef DOMObject Base; +class JSMediaList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSMediaList(PassRefPtr<JSC::Structure>, PassRefPtr<MediaList>); + JSMediaList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MediaList>); virtual ~JSMediaList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,7 +48,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); MediaList* impl() const { return m_impl.get(); } private: @@ -55,7 +56,7 @@ private: static JSC::JSValue indexGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, MediaList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, MediaList*); MediaList* toMediaList(JSC::JSValue); class JSMediaListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp b/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp index 5b41a54c6e..9304f83421 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp @@ -79,8 +79,8 @@ static const HashTable* getJSMessageChannelTable(ExecState* exec) } const ClassInfo JSMessageChannel::s_info = { "MessageChannel", 0, 0, getJSMessageChannelTable }; -JSMessageChannel::JSMessageChannel(PassRefPtr<Structure> structure, PassRefPtr<MessageChannel> impl) - : DOMObject(structure) +JSMessageChannel::JSMessageChannel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MessageChannel> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -102,21 +102,23 @@ bool JSMessageChannel::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsMessageChannelPort1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMessageChannel* castedThis = static_cast<JSMessageChannel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MessageChannel* imp = static_cast<MessageChannel*>(static_cast<JSMessageChannel*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->port1())); + MessageChannel* imp = static_cast<MessageChannel*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->port1())); } JSValue jsMessageChannelPort2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMessageChannel* castedThis = static_cast<JSMessageChannel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MessageChannel* imp = static_cast<MessageChannel*>(static_cast<JSMessageChannel*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->port2())); + MessageChannel* imp = static_cast<MessageChannel*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->port2())); } -JSC::JSValue toJS(JSC::ExecState* exec, MessageChannel* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, MessageChannel* object) { - return getDOMObjectWrapper<JSMessageChannel>(exec, object); + return getDOMObjectWrapper<JSMessageChannel>(exec, globalObject, object); } MessageChannel* toMessageChannel(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.h b/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.h index f9a90261be..a56f7c319a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.h @@ -21,6 +21,7 @@ #ifndef JSMessageChannel_h #define JSMessageChannel_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class MessageChannel; -class JSMessageChannel : public DOMObject { - typedef DOMObject Base; +class JSMessageChannel : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSMessageChannel(PassRefPtr<JSC::Structure>, PassRefPtr<MessageChannel>); + JSMessageChannel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MessageChannel>); virtual ~JSMessageChannel(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -52,7 +53,7 @@ private: RefPtr<MessageChannel> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, MessageChannel*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, MessageChannel*); MessageChannel* toMessageChannel(JSC::JSValue); class JSMessageChannelPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp index 190fb5a8aa..293655d04e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp @@ -71,12 +71,12 @@ static JSC_CONST_HASHTABLE HashTable JSMessageEventConstructorTable = { 1, 0, JSMessageEventConstructorTableValues, 0 }; #endif -class JSMessageEventConstructor : public DOMObject { +class JSMessageEventConstructor : public DOMConstructorObject { public: - JSMessageEventConstructor(ExecState* exec) - : DOMObject(JSMessageEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSMessageEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSMessageEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMessageEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMessageEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -132,8 +132,8 @@ static const HashTable* getJSMessageEventTable(ExecState* exec) } const ClassInfo JSMessageEvent::s_info = { "MessageEvent", &JSEvent::s_info, 0, getJSMessageEventTable }; -JSMessageEvent::JSMessageEvent(PassRefPtr<Structure> structure, PassRefPtr<MessageEvent> impl) - : JSEvent(structure, impl) +JSMessageEvent::JSMessageEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MessageEvent> impl) + : JSEvent(structure, globalObject, impl) { } @@ -149,46 +149,52 @@ bool JSMessageEvent::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsMessageEventData(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMessageEvent* castedThis = static_cast<JSMessageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MessageEvent* imp = static_cast<MessageEvent*>(static_cast<JSMessageEvent*>(asObject(slot.slotBase()))->impl()); + MessageEvent* imp = static_cast<MessageEvent*>(castedThis->impl()); return jsString(exec, imp->data()); } JSValue jsMessageEventOrigin(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMessageEvent* castedThis = static_cast<JSMessageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MessageEvent* imp = static_cast<MessageEvent*>(static_cast<JSMessageEvent*>(asObject(slot.slotBase()))->impl()); + MessageEvent* imp = static_cast<MessageEvent*>(castedThis->impl()); return jsString(exec, imp->origin()); } JSValue jsMessageEventLastEventId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMessageEvent* castedThis = static_cast<JSMessageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MessageEvent* imp = static_cast<MessageEvent*>(static_cast<JSMessageEvent*>(asObject(slot.slotBase()))->impl()); + MessageEvent* imp = static_cast<MessageEvent*>(castedThis->impl()); return jsString(exec, imp->lastEventId()); } JSValue jsMessageEventSource(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMessageEvent* castedThis = static_cast<JSMessageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MessageEvent* imp = static_cast<MessageEvent*>(static_cast<JSMessageEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->source())); + MessageEvent* imp = static_cast<MessageEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->source())); } JSValue jsMessageEventMessagePort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMessageEvent* castedThis = static_cast<JSMessageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MessageEvent* imp = static_cast<MessageEvent*>(static_cast<JSMessageEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->messagePort())); + MessageEvent* imp = static_cast<MessageEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->messagePort())); } JSValue jsMessageEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSMessageEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSMessageEvent* domObject = static_cast<JSMessageEvent*>(asObject(slot.slotBase())); + return JSMessageEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSMessageEvent::getConstructor(ExecState* exec) +JSValue JSMessageEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSMessageEventConstructor>(exec); + return getDOMConstructor<JSMessageEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsMessageEventPrototypeFunctionInitMessageEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.h b/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.h index 4cdefab8f2..34a0b9fb21 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMessageEvent.h @@ -30,7 +30,7 @@ class MessageEvent; class JSMessageEvent : public JSEvent { typedef JSEvent Base; public: - JSMessageEvent(PassRefPtr<JSC::Structure>, PassRefPtr<MessageEvent>); + JSMessageEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MessageEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp b/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp index cc43258eff..2969c2243f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp @@ -69,12 +69,12 @@ static JSC_CONST_HASHTABLE HashTable JSMessagePortConstructorTable = { 1, 0, JSMessagePortConstructorTableValues, 0 }; #endif -class JSMessagePortConstructor : public DOMObject { +class JSMessagePortConstructor : public DOMConstructorObject { public: - JSMessagePortConstructor(ExecState* exec) - : DOMObject(JSMessagePortConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSMessagePortConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSMessagePortConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMessagePortPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMessagePortPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -135,8 +135,8 @@ static const HashTable* getJSMessagePortTable(ExecState* exec) } const ClassInfo JSMessagePort::s_info = { "MessagePort", 0, 0, getJSMessagePortTable }; -JSMessagePort::JSMessagePort(PassRefPtr<Structure> structure, PassRefPtr<MessagePort> impl) - : DOMObject(structure) +JSMessagePort::JSMessagePort(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MessagePort> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -158,8 +158,9 @@ bool JSMessagePort::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsMessagePortOnmessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMessagePort* castedThis = static_cast<JSMessagePort*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MessagePort* imp = static_cast<MessagePort*>(static_cast<JSMessagePort*>(asObject(slot.slotBase()))->impl()); + MessagePort* imp = static_cast<MessagePort*>(castedThis->impl()); if (EventListener* listener = imp->onmessage()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -169,7 +170,8 @@ JSValue jsMessagePortOnmessage(ExecState* exec, const Identifier&, const Propert JSValue jsMessagePortConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSMessagePort*>(asObject(slot.slotBase()))->getConstructor(exec); + JSMessagePort* domObject = static_cast<JSMessagePort*>(asObject(slot.slotBase())); + return JSMessagePort::getConstructor(exec, domObject->globalObject()); } void JSMessagePort::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -186,9 +188,9 @@ void setJSMessagePortOnmessage(ExecState* exec, JSObject* thisObject, JSValue va imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); } -JSValue JSMessagePort::getConstructor(ExecState* exec) +JSValue JSMessagePort::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSMessagePortConstructor>(exec); + return getDOMConstructor<JSMessagePortConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsMessagePortPrototypeFunctionPostMessage(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -273,9 +275,9 @@ JSValue JSC_HOST_CALL jsMessagePortPrototypeFunctionDispatchEvent(ExecState* exe return result; } -JSC::JSValue toJS(JSC::ExecState* exec, MessagePort* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, MessagePort* object) { - return getDOMObjectWrapper<JSMessagePort>(exec, object); + return getDOMObjectWrapper<JSMessagePort>(exec, globalObject, object); } MessagePort* toMessagePort(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessagePort.h b/src/3rdparty/webkit/WebCore/generated/JSMessagePort.h index 1804d8d7e9..7db583858b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMessagePort.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMessagePort.h @@ -21,6 +21,7 @@ #ifndef JSMessagePort_h #define JSMessagePort_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class MessagePort; -class JSMessagePort : public DOMObject { - typedef DOMObject Base; +class JSMessagePort : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSMessagePort(PassRefPtr<JSC::Structure>, PassRefPtr<MessagePort>); + JSMessagePort(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MessagePort>); virtual ~JSMessagePort(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,7 +48,7 @@ public: virtual void mark(); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue addEventListener(JSC::ExecState*, const JSC::ArgList&); @@ -58,7 +59,7 @@ private: RefPtr<MessagePort> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, MessagePort*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, MessagePort*); MessagePort* toMessagePort(JSC::JSValue); class JSMessagePortPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp b/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp index 19380617ea..e5ef403f80 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSMimeTypeConstructorTable = { 1, 0, JSMimeTypeConstructorTableValues, 0 }; #endif -class JSMimeTypeConstructor : public DOMObject { +class JSMimeTypeConstructor : public DOMConstructorObject { public: - JSMimeTypeConstructor(ExecState* exec) - : DOMObject(JSMimeTypeConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSMimeTypeConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSMimeTypeConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMimeTypePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMimeTypePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -114,8 +114,8 @@ JSObject* JSMimeTypePrototype::self(ExecState* exec, JSGlobalObject* globalObjec const ClassInfo JSMimeType::s_info = { "MimeType", 0, &JSMimeTypeTable, 0 }; -JSMimeType::JSMimeType(PassRefPtr<Structure> structure, PassRefPtr<MimeType> impl) - : DOMObject(structure) +JSMimeType::JSMimeType(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MimeType> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -137,44 +137,49 @@ bool JSMimeType::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsMimeTypeType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMimeType* castedThis = static_cast<JSMimeType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MimeType* imp = static_cast<MimeType*>(static_cast<JSMimeType*>(asObject(slot.slotBase()))->impl()); + MimeType* imp = static_cast<MimeType*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsMimeTypeSuffixes(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMimeType* castedThis = static_cast<JSMimeType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MimeType* imp = static_cast<MimeType*>(static_cast<JSMimeType*>(asObject(slot.slotBase()))->impl()); + MimeType* imp = static_cast<MimeType*>(castedThis->impl()); return jsString(exec, imp->suffixes()); } JSValue jsMimeTypeDescription(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMimeType* castedThis = static_cast<JSMimeType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MimeType* imp = static_cast<MimeType*>(static_cast<JSMimeType*>(asObject(slot.slotBase()))->impl()); + MimeType* imp = static_cast<MimeType*>(castedThis->impl()); return jsString(exec, imp->description()); } JSValue jsMimeTypeEnabledPlugin(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMimeType* castedThis = static_cast<JSMimeType*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MimeType* imp = static_cast<MimeType*>(static_cast<JSMimeType*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->enabledPlugin())); + MimeType* imp = static_cast<MimeType*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->enabledPlugin())); } JSValue jsMimeTypeConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSMimeType*>(asObject(slot.slotBase()))->getConstructor(exec); + JSMimeType* domObject = static_cast<JSMimeType*>(asObject(slot.slotBase())); + return JSMimeType::getConstructor(exec, domObject->globalObject()); } -JSValue JSMimeType::getConstructor(ExecState* exec) +JSValue JSMimeType::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSMimeTypeConstructor>(exec); + return getDOMConstructor<JSMimeTypeConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } -JSC::JSValue toJS(JSC::ExecState* exec, MimeType* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, MimeType* object) { - return getDOMObjectWrapper<JSMimeType>(exec, object); + return getDOMObjectWrapper<JSMimeType>(exec, globalObject, object); } MimeType* toMimeType(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMimeType.h b/src/3rdparty/webkit/WebCore/generated/JSMimeType.h index 79b904d42e..662945a703 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMimeType.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMimeType.h @@ -21,6 +21,7 @@ #ifndef JSMimeType_h #define JSMimeType_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class MimeType; -class JSMimeType : public DOMObject { - typedef DOMObject Base; +class JSMimeType : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSMimeType(PassRefPtr<JSC::Structure>, PassRefPtr<MimeType>); + JSMimeType(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MimeType>); virtual ~JSMimeType(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); MimeType* impl() const { return m_impl.get(); } private: RefPtr<MimeType> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, MimeType*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, MimeType*); MimeType* toMimeType(JSC::JSValue); class JSMimeTypePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp b/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp index 28e39304fd..8f769fb572 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSMimeTypeArrayConstructorTable = { 1, 0, JSMimeTypeArrayConstructorTableValues, 0 }; #endif -class JSMimeTypeArrayConstructor : public DOMObject { +class JSMimeTypeArrayConstructor : public DOMConstructorObject { public: - JSMimeTypeArrayConstructor(ExecState* exec) - : DOMObject(JSMimeTypeArrayConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSMimeTypeArrayConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSMimeTypeArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMimeTypeArrayPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMimeTypeArrayPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -120,8 +120,8 @@ bool JSMimeTypeArrayPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSMimeTypeArray::s_info = { "MimeTypeArray", 0, &JSMimeTypeArrayTable, 0 }; -JSMimeTypeArray::JSMimeTypeArray(PassRefPtr<Structure> structure, PassRefPtr<MimeTypeArray> impl) - : DOMObject(structure) +JSMimeTypeArray::JSMimeTypeArray(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MimeTypeArray> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -167,14 +167,16 @@ bool JSMimeTypeArray::getOwnPropertySlot(ExecState* exec, unsigned propertyName, JSValue jsMimeTypeArrayLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMimeTypeArray* castedThis = static_cast<JSMimeTypeArray*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MimeTypeArray* imp = static_cast<MimeTypeArray*>(static_cast<JSMimeTypeArray*>(asObject(slot.slotBase()))->impl()); + MimeTypeArray* imp = static_cast<MimeTypeArray*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsMimeTypeArrayConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSMimeTypeArray*>(asObject(slot.slotBase()))->getConstructor(exec); + JSMimeTypeArray* domObject = static_cast<JSMimeTypeArray*>(asObject(slot.slotBase())); + return JSMimeTypeArray::getConstructor(exec, domObject->globalObject()); } void JSMimeTypeArray::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -183,9 +185,9 @@ void JSMimeTypeArray::getPropertyNames(ExecState* exec, PropertyNameArray& prope Base::getPropertyNames(exec, propertyNames); } -JSValue JSMimeTypeArray::getConstructor(ExecState* exec) +JSValue JSMimeTypeArray::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSMimeTypeArrayConstructor>(exec); + return getDOMConstructor<JSMimeTypeArrayConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsMimeTypeArrayPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -198,7 +200,7 @@ JSValue JSC_HOST_CALL jsMimeTypeArrayPrototypeFunctionItem(ExecState* exec, JSOb unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -212,7 +214,7 @@ JSValue JSC_HOST_CALL jsMimeTypeArrayPrototypeFunctionNamedItem(ExecState* exec, const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->namedItem(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->namedItem(name))); return result; } @@ -220,11 +222,11 @@ JSValue JSC_HOST_CALL jsMimeTypeArrayPrototypeFunctionNamedItem(ExecState* exec, JSValue JSMimeTypeArray::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSMimeTypeArray* thisObj = static_cast<JSMimeTypeArray*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<MimeTypeArray*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<MimeTypeArray*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, MimeTypeArray* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, MimeTypeArray* object) { - return getDOMObjectWrapper<JSMimeTypeArray>(exec, object); + return getDOMObjectWrapper<JSMimeTypeArray>(exec, globalObject, object); } MimeTypeArray* toMimeTypeArray(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.h b/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.h index adc48244ff..f0625e478a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.h @@ -21,6 +21,7 @@ #ifndef JSMimeTypeArray_h #define JSMimeTypeArray_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class MimeTypeArray; -class JSMimeTypeArray : public DOMObject { - typedef DOMObject Base; +class JSMimeTypeArray : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSMimeTypeArray(PassRefPtr<JSC::Structure>, PassRefPtr<MimeTypeArray>); + JSMimeTypeArray(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MimeTypeArray>); virtual ~JSMimeTypeArray(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); MimeTypeArray* impl() const { return m_impl.get(); } private: @@ -57,7 +58,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, MimeTypeArray*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, MimeTypeArray*); MimeTypeArray* toMimeTypeArray(JSC::JSValue); class JSMimeTypeArrayPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp index fca18c5aef..1ba4b0ec3d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp @@ -85,12 +85,12 @@ static JSC_CONST_HASHTABLE HashTable JSMouseEventConstructorTable = { 1, 0, JSMouseEventConstructorTableValues, 0 }; #endif -class JSMouseEventConstructor : public DOMObject { +class JSMouseEventConstructor : public DOMConstructorObject { public: - JSMouseEventConstructor(ExecState* exec) - : DOMObject(JSMouseEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSMouseEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSMouseEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMouseEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMouseEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -138,8 +138,8 @@ bool JSMouseEventPrototype::getOwnPropertySlot(ExecState* exec, const Identifier const ClassInfo JSMouseEvent::s_info = { "MouseEvent", &JSUIEvent::s_info, &JSMouseEventTable, 0 }; -JSMouseEvent::JSMouseEvent(PassRefPtr<Structure> structure, PassRefPtr<MouseEvent> impl) - : JSUIEvent(structure, impl) +JSMouseEvent::JSMouseEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MouseEvent> impl) + : JSUIEvent(structure, globalObject, impl) { } @@ -155,130 +155,148 @@ bool JSMouseEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsMouseEventScreenX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->screenX()); } JSValue jsMouseEventScreenY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->screenY()); } JSValue jsMouseEventClientX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->clientX()); } JSValue jsMouseEventClientY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->clientY()); } JSValue jsMouseEventCtrlKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsBoolean(imp->ctrlKey()); } JSValue jsMouseEventShiftKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsBoolean(imp->shiftKey()); } JSValue jsMouseEventAltKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsBoolean(imp->altKey()); } JSValue jsMouseEventMetaKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsBoolean(imp->metaKey()); } JSValue jsMouseEventButton(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->button()); } JSValue jsMouseEventRelatedTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->relatedTarget())); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->relatedTarget())); } JSValue jsMouseEventOffsetX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->offsetX()); } JSValue jsMouseEventOffsetY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->offsetY()); } JSValue jsMouseEventX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsMouseEventY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsMouseEventFromElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->fromElement())); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->fromElement())); } JSValue jsMouseEventToElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->toElement())); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->toElement())); } JSValue jsMouseEventDataTransfer(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMouseEvent* castedThis = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MouseEvent* imp = static_cast<MouseEvent*>(static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->dataTransfer())); + MouseEvent* imp = static_cast<MouseEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->dataTransfer())); } JSValue jsMouseEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSMouseEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSMouseEvent* domObject = static_cast<JSMouseEvent*>(asObject(slot.slotBase())); + return JSMouseEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSMouseEvent::getConstructor(ExecState* exec) +JSValue JSMouseEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSMouseEventConstructor>(exec); + return getDOMConstructor<JSMouseEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsMouseEventPrototypeFunctionInitMouseEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.h b/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.h index 3730d934c1..73727e5f3e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMouseEvent.h @@ -30,7 +30,7 @@ class MouseEvent; class JSMouseEvent : public JSUIEvent { typedef JSUIEvent Base; public: - JSMouseEvent(PassRefPtr<JSC::Structure>, PassRefPtr<MouseEvent>); + JSMouseEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MouseEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp index 2f6bc8e6c0..7632b91c6e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp @@ -73,12 +73,12 @@ static JSC_CONST_HASHTABLE HashTable JSMutationEventConstructorTable = { 8, 7, JSMutationEventConstructorTableValues, 0 }; #endif -class JSMutationEventConstructor : public DOMObject { +class JSMutationEventConstructor : public DOMConstructorObject { public: - JSMutationEventConstructor(ExecState* exec) - : DOMObject(JSMutationEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSMutationEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSMutationEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSMutationEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSMutationEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -129,8 +129,8 @@ bool JSMutationEventPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSMutationEvent::s_info = { "MutationEvent", &JSEvent::s_info, &JSMutationEventTable, 0 }; -JSMutationEvent::JSMutationEvent(PassRefPtr<Structure> structure, PassRefPtr<MutationEvent> impl) - : JSEvent(structure, impl) +JSMutationEvent::JSMutationEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<MutationEvent> impl) + : JSEvent(structure, globalObject, impl) { } @@ -146,46 +146,52 @@ bool JSMutationEvent::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsMutationEventRelatedNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MutationEvent* imp = static_cast<MutationEvent*>(static_cast<JSMutationEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->relatedNode())); + MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->relatedNode())); } JSValue jsMutationEventPrevValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MutationEvent* imp = static_cast<MutationEvent*>(static_cast<JSMutationEvent*>(asObject(slot.slotBase()))->impl()); + MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); return jsString(exec, imp->prevValue()); } JSValue jsMutationEventNewValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MutationEvent* imp = static_cast<MutationEvent*>(static_cast<JSMutationEvent*>(asObject(slot.slotBase()))->impl()); + MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); return jsString(exec, imp->newValue()); } JSValue jsMutationEventAttrName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MutationEvent* imp = static_cast<MutationEvent*>(static_cast<JSMutationEvent*>(asObject(slot.slotBase()))->impl()); + MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); return jsString(exec, imp->attrName()); } JSValue jsMutationEventAttrChange(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - MutationEvent* imp = static_cast<MutationEvent*>(static_cast<JSMutationEvent*>(asObject(slot.slotBase()))->impl()); + MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); return jsNumber(exec, imp->attrChange()); } JSValue jsMutationEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSMutationEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSMutationEvent* domObject = static_cast<JSMutationEvent*>(asObject(slot.slotBase())); + return JSMutationEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSMutationEvent::getConstructor(ExecState* exec) +JSValue JSMutationEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSMutationEventConstructor>(exec); + return getDOMConstructor<JSMutationEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsMutationEventPrototypeFunctionInitMutationEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.h b/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.h index 7948398738..faa1b647a0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSMutationEvent.h @@ -30,7 +30,7 @@ class MutationEvent; class JSMutationEvent : public JSEvent { typedef JSEvent Base; public: - JSMutationEvent(PassRefPtr<JSC::Structure>, PassRefPtr<MutationEvent>); + JSMutationEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<MutationEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp index 47a7643123..355464c131 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSNamedNodeMapConstructorTable = { 1, 0, JSNamedNodeMapConstructorTableValues, 0 }; #endif -class JSNamedNodeMapConstructor : public DOMObject { +class JSNamedNodeMapConstructor : public DOMConstructorObject { public: - JSNamedNodeMapConstructor(ExecState* exec) - : DOMObject(JSNamedNodeMapConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSNamedNodeMapConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSNamedNodeMapConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSNamedNodeMapPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSNamedNodeMapPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -125,8 +125,8 @@ bool JSNamedNodeMapPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSNamedNodeMap::s_info = { "NamedNodeMap", 0, &JSNamedNodeMapTable, 0 }; -JSNamedNodeMap::JSNamedNodeMap(PassRefPtr<Structure> structure, PassRefPtr<NamedNodeMap> impl) - : DOMObject(structure) +JSNamedNodeMap::JSNamedNodeMap(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<NamedNodeMap> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -176,14 +176,16 @@ bool JSNamedNodeMap::getOwnPropertySlot(ExecState* exec, unsigned propertyName, JSValue jsNamedNodeMapLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNamedNodeMap* castedThis = static_cast<JSNamedNodeMap*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - NamedNodeMap* imp = static_cast<NamedNodeMap*>(static_cast<JSNamedNodeMap*>(asObject(slot.slotBase()))->impl()); + NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsNamedNodeMapConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSNamedNodeMap*>(asObject(slot.slotBase()))->getConstructor(exec); + JSNamedNodeMap* domObject = static_cast<JSNamedNodeMap*>(asObject(slot.slotBase())); + return JSNamedNodeMap::getConstructor(exec, domObject->globalObject()); } void JSNamedNodeMap::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -192,9 +194,9 @@ void JSNamedNodeMap::getPropertyNames(ExecState* exec, PropertyNameArray& proper Base::getPropertyNames(exec, propertyNames); } -JSValue JSNamedNodeMap::getConstructor(ExecState* exec) +JSValue JSNamedNodeMap::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSNamedNodeMapConstructor>(exec); + return getDOMConstructor<JSNamedNodeMapConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionGetNamedItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -207,7 +209,7 @@ JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionGetNamedItem(ExecState* exe const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getNamedItem(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getNamedItem(name))); return result; } @@ -222,7 +224,7 @@ JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionSetNamedItem(ExecState* exe Node* node = toNode(args.at(0)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->setNamedItem(node, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->setNamedItem(node, ec))); setDOMException(exec, ec); return result; } @@ -238,7 +240,7 @@ JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionRemoveNamedItem(ExecState* const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->removeNamedItem(name, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->removeNamedItem(name, ec))); setDOMException(exec, ec); return result; } @@ -253,7 +255,7 @@ JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionItem(ExecState* exec, JSObj unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -268,7 +270,7 @@ JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionGetNamedItemNS(ExecState* e const UString& localName = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getNamedItemNS(namespaceURI, localName))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getNamedItemNS(namespaceURI, localName))); return result; } @@ -283,7 +285,7 @@ JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionSetNamedItemNS(ExecState* e Node* node = toNode(args.at(0)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->setNamedItemNS(node, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->setNamedItemNS(node, ec))); setDOMException(exec, ec); return result; } @@ -300,7 +302,7 @@ JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionRemoveNamedItemNS(ExecState const UString& localName = args.at(1).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->removeNamedItemNS(namespaceURI, localName, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->removeNamedItemNS(namespaceURI, localName, ec))); setDOMException(exec, ec); return result; } @@ -309,11 +311,11 @@ JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionRemoveNamedItemNS(ExecState JSValue JSNamedNodeMap::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSNamedNodeMap* thisObj = static_cast<JSNamedNodeMap*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<NamedNodeMap*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<NamedNodeMap*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, NamedNodeMap* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, NamedNodeMap* object) { - return getDOMObjectWrapper<JSNamedNodeMap>(exec, object); + return getDOMObjectWrapper<JSNamedNodeMap>(exec, globalObject, object); } NamedNodeMap* toNamedNodeMap(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h index f7c132e87f..ca64bfb7ca 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h +++ b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h @@ -21,6 +21,7 @@ #ifndef JSNamedNodeMap_h #define JSNamedNodeMap_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class NamedNodeMap; -class JSNamedNodeMap : public DOMObject { - typedef DOMObject Base; +class JSNamedNodeMap : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSNamedNodeMap(PassRefPtr<JSC::Structure>, PassRefPtr<NamedNodeMap>); + JSNamedNodeMap(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<NamedNodeMap>); virtual ~JSNamedNodeMap(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); NamedNodeMap* impl() const { return m_impl.get(); } private: @@ -57,7 +58,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, NamedNodeMap*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, NamedNodeMap*); NamedNodeMap* toNamedNodeMap(JSC::JSValue); class JSNamedNodeMapPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp b/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp index e55a3ccf17..19dfdee537 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp @@ -94,8 +94,8 @@ bool JSNavigatorPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSNavigator::s_info = { "Navigator", 0, &JSNavigatorTable, 0 }; -JSNavigator::JSNavigator(PassRefPtr<Structure> structure, PassRefPtr<Navigator> impl) - : DOMObject(structure) +JSNavigator::JSNavigator(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Navigator> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -117,99 +117,113 @@ bool JSNavigator::getOwnPropertySlot(ExecState* exec, const Identifier& property JSValue jsNavigatorAppCodeName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->appCodeName()); } JSValue jsNavigatorAppName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->appName()); } JSValue jsNavigatorAppVersion(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->appVersion()); } JSValue jsNavigatorLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->language()); } JSValue jsNavigatorUserAgent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->userAgent()); } JSValue jsNavigatorPlatform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->platform()); } JSValue jsNavigatorPlugins(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->plugins())); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->plugins())); } JSValue jsNavigatorMimeTypes(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->mimeTypes())); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->mimeTypes())); } JSValue jsNavigatorProduct(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->product()); } JSValue jsNavigatorProductSub(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->productSub()); } JSValue jsNavigatorVendor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->vendor()); } JSValue jsNavigatorVendorSub(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsString(exec, imp->vendorSub()); } JSValue jsNavigatorCookieEnabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsBoolean(imp->cookieEnabled()); } JSValue jsNavigatorOnLine(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNavigator* castedThis = static_cast<JSNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Navigator* imp = static_cast<Navigator*>(static_cast<JSNavigator*>(asObject(slot.slotBase()))->impl()); + Navigator* imp = static_cast<Navigator*>(castedThis->impl()); return jsBoolean(imp->onLine()); } @@ -226,9 +240,9 @@ JSValue JSC_HOST_CALL jsNavigatorPrototypeFunctionJavaEnabled(ExecState* exec, J return result; } -JSC::JSValue toJS(JSC::ExecState* exec, Navigator* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Navigator* object) { - return getDOMObjectWrapper<JSNavigator>(exec, object); + return getDOMObjectWrapper<JSNavigator>(exec, globalObject, object); } Navigator* toNavigator(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNavigator.h b/src/3rdparty/webkit/WebCore/generated/JSNavigator.h index 0a3a5df598..b332f74485 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNavigator.h +++ b/src/3rdparty/webkit/WebCore/generated/JSNavigator.h @@ -21,6 +21,7 @@ #ifndef JSNavigator_h #define JSNavigator_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Navigator; -class JSNavigator : public DOMObject { - typedef DOMObject Base; +class JSNavigator : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSNavigator(PassRefPtr<JSC::Structure>, PassRefPtr<Navigator>); + JSNavigator(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Navigator>); virtual ~JSNavigator(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -52,7 +53,7 @@ private: RefPtr<Navigator> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Navigator*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Navigator*); Navigator* toNavigator(JSC::JSValue); class JSNavigatorPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNode.cpp b/src/3rdparty/webkit/WebCore/generated/JSNode.cpp index d9d3d35ce2..98d82ce7b3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNode.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNode.cpp @@ -110,12 +110,12 @@ static JSC_CONST_HASHTABLE HashTable JSNodeConstructorTable = { 67, 63, JSNodeConstructorTableValues, 0 }; #endif -class JSNodeConstructor : public DOMObject { +class JSNodeConstructor : public DOMConstructorObject { public: - JSNodeConstructor(ExecState* exec) - : DOMObject(JSNodeConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSNodeConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSNodeConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSNodePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSNodePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -198,8 +198,8 @@ bool JSNodePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& prop const ClassInfo JSNode::s_info = { "Node", 0, &JSNodeTable, 0 }; -JSNode::JSNode(PassRefPtr<Structure> structure, PassRefPtr<Node> impl) - : DOMObject(structure) +JSNode::JSNode(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Node> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -217,126 +217,144 @@ JSObject* JSNode::createPrototype(ExecState* exec, JSGlobalObject* globalObject) JSValue jsNodeNodeName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); + Node* imp = static_cast<Node*>(castedThis->impl()); return jsStringOrNull(exec, imp->nodeName()); } JSValue jsNodeNodeValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); + Node* imp = static_cast<Node*>(castedThis->impl()); return jsStringOrNull(exec, imp->nodeValue()); } JSValue jsNodeNodeType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); + Node* imp = static_cast<Node*>(castedThis->impl()); return jsNumber(exec, imp->nodeType()); } JSValue jsNodeParentNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parentNode())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentNode())); } JSValue jsNodeChildNodes(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->childNodes())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->childNodes())); } JSValue jsNodeFirstChild(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->firstChild())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->firstChild())); } JSValue jsNodeLastChild(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->lastChild())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->lastChild())); } JSValue jsNodePreviousSibling(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->previousSibling())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->previousSibling())); } JSValue jsNodeNextSibling(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nextSibling())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nextSibling())); } JSValue jsNodeAttributes(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->attributes())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->attributes())); } JSValue jsNodeOwnerDocument(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->ownerDocument())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->ownerDocument())); } JSValue jsNodeNamespaceURI(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); + Node* imp = static_cast<Node*>(castedThis->impl()); return jsStringOrNull(exec, imp->namespaceURI()); } JSValue jsNodePrefix(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); + Node* imp = static_cast<Node*>(castedThis->impl()); return jsStringOrNull(exec, imp->prefix()); } JSValue jsNodeLocalName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); + Node* imp = static_cast<Node*>(castedThis->impl()); return jsStringOrNull(exec, imp->localName()); } JSValue jsNodeBaseURI(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); + Node* imp = static_cast<Node*>(castedThis->impl()); return jsStringOrNull(exec, imp->baseURI()); } JSValue jsNodeTextContent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); + Node* imp = static_cast<Node*>(castedThis->impl()); return jsStringOrNull(exec, imp->textContent()); } JSValue jsNodeParentElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNode* castedThis = static_cast<JSNode*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Node* imp = static_cast<Node*>(static_cast<JSNode*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parentElement())); + Node* imp = static_cast<Node*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentElement())); } JSValue jsNodeConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSNode*>(asObject(slot.slotBase()))->getConstructor(exec); + JSNode* domObject = static_cast<JSNode*>(asObject(slot.slotBase())); + return JSNode::getConstructor(exec, domObject->globalObject()); } void JSNode::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -367,9 +385,9 @@ void setJSNodeTextContent(ExecState* exec, JSObject* thisObject, JSValue value) setDOMException(exec, ec); } -JSValue JSNode::getConstructor(ExecState* exec) +JSValue JSNode::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSNodeConstructor>(exec); + return getDOMConstructor<JSNodeConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsNodePrototypeFunctionInsertBefore(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -431,7 +449,7 @@ JSValue JSC_HOST_CALL jsNodePrototypeFunctionCloneNode(ExecState* exec, JSObject bool deep = args.at(0).toBoolean(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->cloneNode(deep))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->cloneNode(deep))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSNode.h b/src/3rdparty/webkit/WebCore/generated/JSNode.h index 3fdc5a3252..d4d1f59235 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNode.h +++ b/src/3rdparty/webkit/WebCore/generated/JSNode.h @@ -21,6 +21,7 @@ #ifndef JSNode_h #define JSNode_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/Lookup.h> @@ -31,10 +32,10 @@ namespace WebCore { class Node; -class JSNode : public DOMObject { - typedef DOMObject Base; +class JSNode : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSNode(PassRefPtr<JSC::Structure>, PassRefPtr<Node>); + JSNode(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Node>); virtual ~JSNode(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -51,7 +52,7 @@ public: virtual void pushEventHandlerScope(JSC::ExecState*, JSC::ScopeChain&) const; - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue insertBefore(JSC::ExecState*, const JSC::ArgList&); @@ -71,9 +72,9 @@ ALWAYS_INLINE bool JSNode::getOwnPropertySlot(JSC::ExecState* exec, const JSC::I return JSC::getStaticValueSlot<JSNode, Base>(exec, s_info.staticPropHashTable, this, propertyName, slot); } -JSC::JSValue toJS(JSC::ExecState*, Node*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Node*); Node* toNode(JSC::JSValue); -JSC::JSValue toJSNewlyCreated(JSC::ExecState*, Node*); +JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Node*); class JSNodePrototype : public JSC::JSObject { typedef JSC::JSObject Base; diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp index 32ef1011b4..ead0b47b9a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp @@ -76,12 +76,12 @@ static JSC_CONST_HASHTABLE HashTable JSNodeFilterConstructorTable = { 34, 31, JSNodeFilterConstructorTableValues, 0 }; #endif -class JSNodeFilterConstructor : public DOMObject { +class JSNodeFilterConstructor : public DOMConstructorObject { public: - JSNodeFilterConstructor(ExecState* exec) - : DOMObject(JSNodeFilterConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSNodeFilterConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSNodeFilterConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSNodeFilterPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSNodeFilterPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -145,8 +145,8 @@ bool JSNodeFilterPrototype::getOwnPropertySlot(ExecState* exec, const Identifier const ClassInfo JSNodeFilter::s_info = { "NodeFilter", 0, &JSNodeFilterTable, 0 }; -JSNodeFilter::JSNodeFilter(PassRefPtr<Structure> structure, PassRefPtr<NodeFilter> impl) - : DOMObject(structure) +JSNodeFilter::JSNodeFilter(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<NodeFilter> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -168,11 +168,12 @@ bool JSNodeFilter::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsNodeFilterConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSNodeFilter*>(asObject(slot.slotBase()))->getConstructor(exec); + JSNodeFilter* domObject = static_cast<JSNodeFilter*>(asObject(slot.slotBase())); + return JSNodeFilter::getConstructor(exec, domObject->globalObject()); } -JSValue JSNodeFilter::getConstructor(ExecState* exec) +JSValue JSNodeFilter::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSNodeFilterConstructor>(exec); + return getDOMConstructor<JSNodeFilterConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsNodeFilterPrototypeFunctionAcceptNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -266,9 +267,9 @@ JSValue jsNodeFilterSHOW_NOTATION(ExecState* exec, const Identifier&, const Prop return jsNumber(exec, static_cast<int>(0x00000800)); } -JSC::JSValue toJS(JSC::ExecState* exec, NodeFilter* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, NodeFilter* object) { - return getDOMObjectWrapper<JSNodeFilter>(exec, object); + return getDOMObjectWrapper<JSNodeFilter>(exec, globalObject, object); } } diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.h b/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.h index 0fd1b42901..b955a03be6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.h +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.h @@ -21,6 +21,7 @@ #ifndef JSNodeFilter_h #define JSNodeFilter_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class NodeFilter; -class JSNodeFilter : public DOMObject { - typedef DOMObject Base; +class JSNodeFilter : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSNodeFilter(PassRefPtr<JSC::Structure>, PassRefPtr<NodeFilter>); + JSNodeFilter(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<NodeFilter>); virtual ~JSNodeFilter(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: virtual void mark(); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue acceptNode(JSC::ExecState*, const JSC::ArgList&); @@ -56,7 +57,7 @@ private: RefPtr<NodeFilter> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, NodeFilter*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, NodeFilter*); PassRefPtr<NodeFilter> toNodeFilter(JSC::JSValue); class JSNodeFilterPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp index 6e79669492..81613a0c9e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp @@ -71,12 +71,12 @@ static JSC_CONST_HASHTABLE HashTable JSNodeIteratorConstructorTable = { 1, 0, JSNodeIteratorConstructorTableValues, 0 }; #endif -class JSNodeIteratorConstructor : public DOMObject { +class JSNodeIteratorConstructor : public DOMConstructorObject { public: - JSNodeIteratorConstructor(ExecState* exec) - : DOMObject(JSNodeIteratorConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSNodeIteratorConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSNodeIteratorConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSNodeIteratorPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSNodeIteratorPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -126,8 +126,8 @@ bool JSNodeIteratorPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSNodeIterator::s_info = { "NodeIterator", 0, &JSNodeIteratorTable, 0 }; -JSNodeIterator::JSNodeIterator(PassRefPtr<Structure> structure, PassRefPtr<NodeIterator> impl) - : DOMObject(structure) +JSNodeIterator::JSNodeIterator(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<NodeIterator> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -149,53 +149,60 @@ bool JSNodeIterator::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsNodeIteratorRoot(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNodeIterator* castedThis = static_cast<JSNodeIterator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - NodeIterator* imp = static_cast<NodeIterator*>(static_cast<JSNodeIterator*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->root())); + NodeIterator* imp = static_cast<NodeIterator*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->root())); } JSValue jsNodeIteratorWhatToShow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNodeIterator* castedThis = static_cast<JSNodeIterator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - NodeIterator* imp = static_cast<NodeIterator*>(static_cast<JSNodeIterator*>(asObject(slot.slotBase()))->impl()); + NodeIterator* imp = static_cast<NodeIterator*>(castedThis->impl()); return jsNumber(exec, imp->whatToShow()); } JSValue jsNodeIteratorFilter(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNodeIterator* castedThis = static_cast<JSNodeIterator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - NodeIterator* imp = static_cast<NodeIterator*>(static_cast<JSNodeIterator*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->filter())); + NodeIterator* imp = static_cast<NodeIterator*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->filter())); } JSValue jsNodeIteratorExpandEntityReferences(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNodeIterator* castedThis = static_cast<JSNodeIterator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - NodeIterator* imp = static_cast<NodeIterator*>(static_cast<JSNodeIterator*>(asObject(slot.slotBase()))->impl()); + NodeIterator* imp = static_cast<NodeIterator*>(castedThis->impl()); return jsBoolean(imp->expandEntityReferences()); } JSValue jsNodeIteratorReferenceNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNodeIterator* castedThis = static_cast<JSNodeIterator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - NodeIterator* imp = static_cast<NodeIterator*>(static_cast<JSNodeIterator*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->referenceNode())); + NodeIterator* imp = static_cast<NodeIterator*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->referenceNode())); } JSValue jsNodeIteratorPointerBeforeReferenceNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNodeIterator* castedThis = static_cast<JSNodeIterator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - NodeIterator* imp = static_cast<NodeIterator*>(static_cast<JSNodeIterator*>(asObject(slot.slotBase()))->impl()); + NodeIterator* imp = static_cast<NodeIterator*>(castedThis->impl()); return jsBoolean(imp->pointerBeforeReferenceNode()); } JSValue jsNodeIteratorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSNodeIterator*>(asObject(slot.slotBase()))->getConstructor(exec); + JSNodeIterator* domObject = static_cast<JSNodeIterator*>(asObject(slot.slotBase())); + return JSNodeIterator::getConstructor(exec, domObject->globalObject()); } -JSValue JSNodeIterator::getConstructor(ExecState* exec) +JSValue JSNodeIterator::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSNodeIteratorConstructor>(exec); + return getDOMConstructor<JSNodeIteratorConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsNodeIteratorPrototypeFunctionNextNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -228,9 +235,9 @@ JSValue JSC_HOST_CALL jsNodeIteratorPrototypeFunctionDetach(ExecState* exec, JSO return jsUndefined(); } -JSC::JSValue toJS(JSC::ExecState* exec, NodeIterator* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, NodeIterator* object) { - return getDOMObjectWrapper<JSNodeIterator>(exec, object); + return getDOMObjectWrapper<JSNodeIterator>(exec, globalObject, object); } NodeIterator* toNodeIterator(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.h b/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.h index ab5e7c670a..e521a05d78 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.h +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.h @@ -21,6 +21,7 @@ #ifndef JSNodeIterator_h #define JSNodeIterator_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class NodeIterator; -class JSNodeIterator : public DOMObject { - typedef DOMObject Base; +class JSNodeIterator : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSNodeIterator(PassRefPtr<JSC::Structure>, PassRefPtr<NodeIterator>); + JSNodeIterator(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<NodeIterator>); virtual ~JSNodeIterator(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: virtual void mark(); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue nextNode(JSC::ExecState*, const JSC::ArgList&); @@ -57,7 +58,7 @@ private: RefPtr<NodeIterator> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, NodeIterator*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, NodeIterator*); NodeIterator* toNodeIterator(JSC::JSValue); class JSNodeIteratorPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp index f02b7b7fde..437dd84e07 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSNodeListConstructorTable = { 1, 0, JSNodeListConstructorTableValues, 0 }; #endif -class JSNodeListConstructor : public DOMObject { +class JSNodeListConstructor : public DOMConstructorObject { public: - JSNodeListConstructor(ExecState* exec) - : DOMObject(JSNodeListConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSNodeListConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSNodeListConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSNodeListPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSNodeListPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -120,8 +120,8 @@ bool JSNodeListPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSNodeList::s_info = { "NodeList", 0, &JSNodeListTable, 0 }; -JSNodeList::JSNodeList(PassRefPtr<Structure> structure, PassRefPtr<NodeList> impl) - : DOMObject(structure) +JSNodeList::JSNodeList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<NodeList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -167,14 +167,16 @@ bool JSNodeList::getOwnPropertySlot(ExecState* exec, unsigned propertyName, Prop JSValue jsNodeListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNodeList* castedThis = static_cast<JSNodeList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - NodeList* imp = static_cast<NodeList*>(static_cast<JSNodeList*>(asObject(slot.slotBase()))->impl()); + NodeList* imp = static_cast<NodeList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsNodeListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSNodeList*>(asObject(slot.slotBase()))->getConstructor(exec); + JSNodeList* domObject = static_cast<JSNodeList*>(asObject(slot.slotBase())); + return JSNodeList::getConstructor(exec, domObject->globalObject()); } void JSNodeList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -183,9 +185,9 @@ void JSNodeList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNa Base::getPropertyNames(exec, propertyNames); } -JSValue JSNodeList::getConstructor(ExecState* exec) +JSValue JSNodeList::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSNodeListConstructor>(exec); + return getDOMConstructor<JSNodeListConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsNodeListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -202,7 +204,7 @@ JSValue JSC_HOST_CALL jsNodeListPrototypeFunctionItem(ExecState* exec, JSObject* } - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -210,11 +212,11 @@ JSValue JSC_HOST_CALL jsNodeListPrototypeFunctionItem(ExecState* exec, JSObject* JSValue JSNodeList::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSNodeList* thisObj = static_cast<JSNodeList*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<NodeList*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<NodeList*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, NodeList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, NodeList* object) { - return getDOMObjectWrapper<JSNodeList>(exec, object); + return getDOMObjectWrapper<JSNodeList>(exec, globalObject, object); } NodeList* toNodeList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeList.h b/src/3rdparty/webkit/WebCore/generated/JSNodeList.h index c4fce0b6e6..21faa3a30e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeList.h @@ -21,6 +21,7 @@ #ifndef JSNodeList_h #define JSNodeList_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/CallData.h> #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { class NodeList; -class JSNodeList : public DOMObject { - typedef DOMObject Base; +class JSNodeList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSNodeList(PassRefPtr<JSC::Structure>, PassRefPtr<NodeList>); + JSNodeList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<NodeList>); virtual ~JSNodeList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -49,7 +50,7 @@ public: virtual JSC::CallType getCallData(JSC::CallData&); virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); NodeList* impl() const { return m_impl.get(); } private: @@ -60,7 +61,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, NodeList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, NodeList*); NodeList* toNodeList(JSC::JSValue); class JSNodeListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSNotation.cpp b/src/3rdparty/webkit/WebCore/generated/JSNotation.cpp index 13ac97bb77..31b9d18308 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNotation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNotation.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSNotationConstructorTable = { 1, 0, JSNotationConstructorTableValues, 0 }; #endif -class JSNotationConstructor : public DOMObject { +class JSNotationConstructor : public DOMConstructorObject { public: - JSNotationConstructor(ExecState* exec) - : DOMObject(JSNotationConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSNotationConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSNotationConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSNotationPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSNotationPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -109,8 +109,8 @@ JSObject* JSNotationPrototype::self(ExecState* exec, JSGlobalObject* globalObjec const ClassInfo JSNotation::s_info = { "Notation", &JSNode::s_info, &JSNotationTable, 0 }; -JSNotation::JSNotation(PassRefPtr<Structure> structure, PassRefPtr<Notation> impl) - : JSNode(structure, impl) +JSNotation::JSNotation(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Notation> impl) + : JSNode(structure, globalObject, impl) { } @@ -126,25 +126,28 @@ bool JSNotation::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsNotationPublicId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNotation* castedThis = static_cast<JSNotation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Notation* imp = static_cast<Notation*>(static_cast<JSNotation*>(asObject(slot.slotBase()))->impl()); + Notation* imp = static_cast<Notation*>(castedThis->impl()); return jsStringOrNull(exec, imp->publicId()); } JSValue jsNotationSystemId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSNotation* castedThis = static_cast<JSNotation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Notation* imp = static_cast<Notation*>(static_cast<JSNotation*>(asObject(slot.slotBase()))->impl()); + Notation* imp = static_cast<Notation*>(castedThis->impl()); return jsStringOrNull(exec, imp->systemId()); } JSValue jsNotationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSNotation*>(asObject(slot.slotBase()))->getConstructor(exec); + JSNotation* domObject = static_cast<JSNotation*>(asObject(slot.slotBase())); + return JSNotation::getConstructor(exec, domObject->globalObject()); } -JSValue JSNotation::getConstructor(ExecState* exec) +JSValue JSNotation::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSNotationConstructor>(exec); + return getDOMConstructor<JSNotationConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSNotation.h b/src/3rdparty/webkit/WebCore/generated/JSNotation.h index 00d3427893..5928834b7e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNotation.h +++ b/src/3rdparty/webkit/WebCore/generated/JSNotation.h @@ -30,7 +30,7 @@ class Notation; class JSNotation : public JSNode { typedef JSNode Base; public: - JSNotation(PassRefPtr<JSC::Structure>, PassRefPtr<Notation>); + JSNotation(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Notation>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp index 88a8bd3708..69715e3fc2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp @@ -67,12 +67,12 @@ static JSC_CONST_HASHTABLE HashTable JSOverflowEventConstructorTable = { 9, 7, JSOverflowEventConstructorTableValues, 0 }; #endif -class JSOverflowEventConstructor : public DOMObject { +class JSOverflowEventConstructor : public DOMConstructorObject { public: - JSOverflowEventConstructor(ExecState* exec) - : DOMObject(JSOverflowEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSOverflowEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSOverflowEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSOverflowEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSOverflowEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -123,8 +123,8 @@ bool JSOverflowEventPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSOverflowEvent::s_info = { "OverflowEvent", &JSEvent::s_info, &JSOverflowEventTable, 0 }; -JSOverflowEvent::JSOverflowEvent(PassRefPtr<Structure> structure, PassRefPtr<OverflowEvent> impl) - : JSEvent(structure, impl) +JSOverflowEvent::JSOverflowEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<OverflowEvent> impl) + : JSEvent(structure, globalObject, impl) { } @@ -140,32 +140,36 @@ bool JSOverflowEvent::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsOverflowEventOrient(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSOverflowEvent* castedThis = static_cast<JSOverflowEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - OverflowEvent* imp = static_cast<OverflowEvent*>(static_cast<JSOverflowEvent*>(asObject(slot.slotBase()))->impl()); + OverflowEvent* imp = static_cast<OverflowEvent*>(castedThis->impl()); return jsNumber(exec, imp->orient()); } JSValue jsOverflowEventHorizontalOverflow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSOverflowEvent* castedThis = static_cast<JSOverflowEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - OverflowEvent* imp = static_cast<OverflowEvent*>(static_cast<JSOverflowEvent*>(asObject(slot.slotBase()))->impl()); + OverflowEvent* imp = static_cast<OverflowEvent*>(castedThis->impl()); return jsBoolean(imp->horizontalOverflow()); } JSValue jsOverflowEventVerticalOverflow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSOverflowEvent* castedThis = static_cast<JSOverflowEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - OverflowEvent* imp = static_cast<OverflowEvent*>(static_cast<JSOverflowEvent*>(asObject(slot.slotBase()))->impl()); + OverflowEvent* imp = static_cast<OverflowEvent*>(castedThis->impl()); return jsBoolean(imp->verticalOverflow()); } JSValue jsOverflowEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSOverflowEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSOverflowEvent* domObject = static_cast<JSOverflowEvent*>(asObject(slot.slotBase())); + return JSOverflowEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSOverflowEvent::getConstructor(ExecState* exec) +JSValue JSOverflowEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSOverflowEventConstructor>(exec); + return getDOMConstructor<JSOverflowEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsOverflowEventPrototypeFunctionInitOverflowEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.h b/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.h index b018a86cbc..f179a71b5f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.h @@ -30,7 +30,7 @@ class OverflowEvent; class JSOverflowEvent : public JSEvent { typedef JSEvent Base; public: - JSOverflowEvent(PassRefPtr<JSC::Structure>, PassRefPtr<OverflowEvent>); + JSOverflowEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<OverflowEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp b/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp index c8d04327bf..39616d6ed2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp @@ -71,12 +71,12 @@ static JSC_CONST_HASHTABLE HashTable JSPluginConstructorTable = { 1, 0, JSPluginConstructorTableValues, 0 }; #endif -class JSPluginConstructor : public DOMObject { +class JSPluginConstructor : public DOMConstructorObject { public: - JSPluginConstructor(ExecState* exec) - : DOMObject(JSPluginConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSPluginConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSPluginConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSPluginPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSPluginPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -125,8 +125,8 @@ bool JSPluginPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& pr const ClassInfo JSPlugin::s_info = { "Plugin", 0, &JSPluginTable, 0 }; -JSPlugin::JSPlugin(PassRefPtr<Structure> structure, PassRefPtr<Plugin> impl) - : DOMObject(structure) +JSPlugin::JSPlugin(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Plugin> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -172,35 +172,40 @@ bool JSPlugin::getOwnPropertySlot(ExecState* exec, unsigned propertyName, Proper JSValue jsPluginName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSPlugin* castedThis = static_cast<JSPlugin*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Plugin* imp = static_cast<Plugin*>(static_cast<JSPlugin*>(asObject(slot.slotBase()))->impl()); + Plugin* imp = static_cast<Plugin*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsPluginFilename(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSPlugin* castedThis = static_cast<JSPlugin*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Plugin* imp = static_cast<Plugin*>(static_cast<JSPlugin*>(asObject(slot.slotBase()))->impl()); + Plugin* imp = static_cast<Plugin*>(castedThis->impl()); return jsString(exec, imp->filename()); } JSValue jsPluginDescription(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSPlugin* castedThis = static_cast<JSPlugin*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Plugin* imp = static_cast<Plugin*>(static_cast<JSPlugin*>(asObject(slot.slotBase()))->impl()); + Plugin* imp = static_cast<Plugin*>(castedThis->impl()); return jsString(exec, imp->description()); } JSValue jsPluginLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSPlugin* castedThis = static_cast<JSPlugin*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Plugin* imp = static_cast<Plugin*>(static_cast<JSPlugin*>(asObject(slot.slotBase()))->impl()); + Plugin* imp = static_cast<Plugin*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsPluginConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSPlugin*>(asObject(slot.slotBase()))->getConstructor(exec); + JSPlugin* domObject = static_cast<JSPlugin*>(asObject(slot.slotBase())); + return JSPlugin::getConstructor(exec, domObject->globalObject()); } void JSPlugin::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -209,9 +214,9 @@ void JSPlugin::getPropertyNames(ExecState* exec, PropertyNameArray& propertyName Base::getPropertyNames(exec, propertyNames); } -JSValue JSPlugin::getConstructor(ExecState* exec) +JSValue JSPlugin::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSPluginConstructor>(exec); + return getDOMConstructor<JSPluginConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsPluginPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -224,7 +229,7 @@ JSValue JSC_HOST_CALL jsPluginPrototypeFunctionItem(ExecState* exec, JSObject*, unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -238,7 +243,7 @@ JSValue JSC_HOST_CALL jsPluginPrototypeFunctionNamedItem(ExecState* exec, JSObje const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->namedItem(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->namedItem(name))); return result; } @@ -246,11 +251,11 @@ JSValue JSC_HOST_CALL jsPluginPrototypeFunctionNamedItem(ExecState* exec, JSObje JSValue JSPlugin::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSPlugin* thisObj = static_cast<JSPlugin*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<Plugin*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<Plugin*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, Plugin* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Plugin* object) { - return getDOMObjectWrapper<JSPlugin>(exec, object); + return getDOMObjectWrapper<JSPlugin>(exec, globalObject, object); } Plugin* toPlugin(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSPlugin.h b/src/3rdparty/webkit/WebCore/generated/JSPlugin.h index 7ff040fd94..eee4c7dd6a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPlugin.h +++ b/src/3rdparty/webkit/WebCore/generated/JSPlugin.h @@ -21,6 +21,7 @@ #ifndef JSPlugin_h #define JSPlugin_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Plugin; -class JSPlugin : public DOMObject { - typedef DOMObject Base; +class JSPlugin : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSPlugin(PassRefPtr<JSC::Structure>, PassRefPtr<Plugin>); + JSPlugin(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Plugin>); virtual ~JSPlugin(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); Plugin* impl() const { return m_impl.get(); } private: @@ -57,7 +58,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, Plugin*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Plugin*); Plugin* toPlugin(JSC::JSValue); class JSPluginPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp b/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp index 2d0ec3665a..955d50ca4f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSPluginArrayConstructorTable = { 1, 0, JSPluginArrayConstructorTableValues, 0 }; #endif -class JSPluginArrayConstructor : public DOMObject { +class JSPluginArrayConstructor : public DOMConstructorObject { public: - JSPluginArrayConstructor(ExecState* exec) - : DOMObject(JSPluginArrayConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSPluginArrayConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSPluginArrayConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSPluginArrayPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSPluginArrayPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -121,8 +121,8 @@ bool JSPluginArrayPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSPluginArray::s_info = { "PluginArray", 0, &JSPluginArrayTable, 0 }; -JSPluginArray::JSPluginArray(PassRefPtr<Structure> structure, PassRefPtr<PluginArray> impl) - : DOMObject(structure) +JSPluginArray::JSPluginArray(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<PluginArray> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -168,14 +168,16 @@ bool JSPluginArray::getOwnPropertySlot(ExecState* exec, unsigned propertyName, P JSValue jsPluginArrayLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSPluginArray* castedThis = static_cast<JSPluginArray*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - PluginArray* imp = static_cast<PluginArray*>(static_cast<JSPluginArray*>(asObject(slot.slotBase()))->impl()); + PluginArray* imp = static_cast<PluginArray*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsPluginArrayConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSPluginArray*>(asObject(slot.slotBase()))->getConstructor(exec); + JSPluginArray* domObject = static_cast<JSPluginArray*>(asObject(slot.slotBase())); + return JSPluginArray::getConstructor(exec, domObject->globalObject()); } void JSPluginArray::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -184,9 +186,9 @@ void JSPluginArray::getPropertyNames(ExecState* exec, PropertyNameArray& propert Base::getPropertyNames(exec, propertyNames); } -JSValue JSPluginArray::getConstructor(ExecState* exec) +JSValue JSPluginArray::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSPluginArrayConstructor>(exec); + return getDOMConstructor<JSPluginArrayConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsPluginArrayPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -199,7 +201,7 @@ JSValue JSC_HOST_CALL jsPluginArrayPrototypeFunctionItem(ExecState* exec, JSObje unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -213,7 +215,7 @@ JSValue JSC_HOST_CALL jsPluginArrayPrototypeFunctionNamedItem(ExecState* exec, J const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->namedItem(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->namedItem(name))); return result; } @@ -234,11 +236,11 @@ JSValue JSC_HOST_CALL jsPluginArrayPrototypeFunctionRefresh(ExecState* exec, JSO JSValue JSPluginArray::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSPluginArray* thisObj = static_cast<JSPluginArray*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<PluginArray*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<PluginArray*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, PluginArray* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, PluginArray* object) { - return getDOMObjectWrapper<JSPluginArray>(exec, object); + return getDOMObjectWrapper<JSPluginArray>(exec, globalObject, object); } PluginArray* toPluginArray(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSPluginArray.h b/src/3rdparty/webkit/WebCore/generated/JSPluginArray.h index 56bb33e68e..44443f36e6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPluginArray.h +++ b/src/3rdparty/webkit/WebCore/generated/JSPluginArray.h @@ -21,6 +21,7 @@ #ifndef JSPluginArray_h #define JSPluginArray_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class PluginArray; -class JSPluginArray : public DOMObject { - typedef DOMObject Base; +class JSPluginArray : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSPluginArray(PassRefPtr<JSC::Structure>, PassRefPtr<PluginArray>); + JSPluginArray(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<PluginArray>); virtual ~JSPluginArray(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); PluginArray* impl() const { return m_impl.get(); } private: @@ -57,7 +58,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, PluginArray*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, PluginArray*); PluginArray* toPluginArray(JSC::JSValue); class JSPluginArrayPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp b/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp index 680cfc3dd9..c0c1a10cac 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSPositionErrorConstructorTable = { 10, 7, JSPositionErrorConstructorTableValues, 0 }; #endif -class JSPositionErrorConstructor : public DOMObject { +class JSPositionErrorConstructor : public DOMConstructorObject { public: - JSPositionErrorConstructor(ExecState* exec) - : DOMObject(JSPositionErrorConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSPositionErrorConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSPositionErrorConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSPositionErrorPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSPositionErrorPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -124,8 +124,8 @@ bool JSPositionErrorPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSPositionError::s_info = { "PositionError", 0, &JSPositionErrorTable, 0 }; -JSPositionError::JSPositionError(PassRefPtr<Structure> structure, PassRefPtr<PositionError> impl) - : DOMObject(structure) +JSPositionError::JSPositionError(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<PositionError> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -147,25 +147,28 @@ bool JSPositionError::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsPositionErrorCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSPositionError* castedThis = static_cast<JSPositionError*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - PositionError* imp = static_cast<PositionError*>(static_cast<JSPositionError*>(asObject(slot.slotBase()))->impl()); + PositionError* imp = static_cast<PositionError*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsPositionErrorMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSPositionError* castedThis = static_cast<JSPositionError*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - PositionError* imp = static_cast<PositionError*>(static_cast<JSPositionError*>(asObject(slot.slotBase()))->impl()); + PositionError* imp = static_cast<PositionError*>(castedThis->impl()); return jsString(exec, imp->message()); } JSValue jsPositionErrorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSPositionError*>(asObject(slot.slotBase()))->getConstructor(exec); + JSPositionError* domObject = static_cast<JSPositionError*>(asObject(slot.slotBase())); + return JSPositionError::getConstructor(exec, domObject->globalObject()); } -JSValue JSPositionError::getConstructor(ExecState* exec) +JSValue JSPositionError::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSPositionErrorConstructor>(exec); + return getDOMConstructor<JSPositionErrorConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters @@ -190,9 +193,9 @@ JSValue jsPositionErrorTIMEOUT(ExecState* exec, const Identifier&, const Propert return jsNumber(exec, static_cast<int>(3)); } -JSC::JSValue toJS(JSC::ExecState* exec, PositionError* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, PositionError* object) { - return getDOMObjectWrapper<JSPositionError>(exec, object); + return getDOMObjectWrapper<JSPositionError>(exec, globalObject, object); } PositionError* toPositionError(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSPositionError.h b/src/3rdparty/webkit/WebCore/generated/JSPositionError.h index 9f256f4499..a7478fc394 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPositionError.h +++ b/src/3rdparty/webkit/WebCore/generated/JSPositionError.h @@ -21,6 +21,7 @@ #ifndef JSPositionError_h #define JSPositionError_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class PositionError; -class JSPositionError : public DOMObject { - typedef DOMObject Base; +class JSPositionError : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSPositionError(PassRefPtr<JSC::Structure>, PassRefPtr<PositionError>); + JSPositionError(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<PositionError>); virtual ~JSPositionError(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); PositionError* impl() const { return m_impl.get(); } private: RefPtr<PositionError> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, PositionError*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, PositionError*); PositionError* toPositionError(JSC::JSValue); class JSPositionErrorPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp b/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp index f9d2fc0f01..c945742b3c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSProcessingInstructionConstructorTable = { 1, 0, JSProcessingInstructionConstructorTableValues, 0 }; #endif -class JSProcessingInstructionConstructor : public DOMObject { +class JSProcessingInstructionConstructor : public DOMConstructorObject { public: - JSProcessingInstructionConstructor(ExecState* exec) - : DOMObject(JSProcessingInstructionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSProcessingInstructionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSProcessingInstructionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSProcessingInstructionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSProcessingInstructionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSProcessingInstructionPrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSProcessingInstruction::s_info = { "ProcessingInstruction", &JSNode::s_info, &JSProcessingInstructionTable, 0 }; -JSProcessingInstruction::JSProcessingInstruction(PassRefPtr<Structure> structure, PassRefPtr<ProcessingInstruction> impl) - : JSNode(structure, impl) +JSProcessingInstruction::JSProcessingInstruction(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ProcessingInstruction> impl) + : JSNode(structure, globalObject, impl) { } @@ -129,28 +129,32 @@ bool JSProcessingInstruction::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsProcessingInstructionTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSProcessingInstruction* castedThis = static_cast<JSProcessingInstruction*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ProcessingInstruction* imp = static_cast<ProcessingInstruction*>(static_cast<JSProcessingInstruction*>(asObject(slot.slotBase()))->impl()); + ProcessingInstruction* imp = static_cast<ProcessingInstruction*>(castedThis->impl()); return jsStringOrNull(exec, imp->target()); } JSValue jsProcessingInstructionData(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSProcessingInstruction* castedThis = static_cast<JSProcessingInstruction*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ProcessingInstruction* imp = static_cast<ProcessingInstruction*>(static_cast<JSProcessingInstruction*>(asObject(slot.slotBase()))->impl()); + ProcessingInstruction* imp = static_cast<ProcessingInstruction*>(castedThis->impl()); return jsStringOrNull(exec, imp->data()); } JSValue jsProcessingInstructionSheet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSProcessingInstruction* castedThis = static_cast<JSProcessingInstruction*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ProcessingInstruction* imp = static_cast<ProcessingInstruction*>(static_cast<JSProcessingInstruction*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->sheet())); + ProcessingInstruction* imp = static_cast<ProcessingInstruction*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->sheet())); } JSValue jsProcessingInstructionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSProcessingInstruction*>(asObject(slot.slotBase()))->getConstructor(exec); + JSProcessingInstruction* domObject = static_cast<JSProcessingInstruction*>(asObject(slot.slotBase())); + return JSProcessingInstruction::getConstructor(exec, domObject->globalObject()); } void JSProcessingInstruction::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -165,9 +169,9 @@ void setJSProcessingInstructionData(ExecState* exec, JSObject* thisObject, JSVal setDOMException(exec, ec); } -JSValue JSProcessingInstruction::getConstructor(ExecState* exec) +JSValue JSProcessingInstruction::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSProcessingInstructionConstructor>(exec); + return getDOMConstructor<JSProcessingInstructionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.h b/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.h index 7c0ccd6f44..0b2b7dfec9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.h +++ b/src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.h @@ -30,7 +30,7 @@ class ProcessingInstruction; class JSProcessingInstruction : public JSNode { typedef JSNode Base; public: - JSProcessingInstruction(PassRefPtr<JSC::Structure>, PassRefPtr<ProcessingInstruction>); + JSProcessingInstruction(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<ProcessingInstruction>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp index 5c7bd50b6d..bb7be660ea 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp @@ -64,12 +64,12 @@ static JSC_CONST_HASHTABLE HashTable JSProgressEventConstructorTable = { 1, 0, JSProgressEventConstructorTableValues, 0 }; #endif -class JSProgressEventConstructor : public DOMObject { +class JSProgressEventConstructor : public DOMConstructorObject { public: - JSProgressEventConstructor(ExecState* exec) - : DOMObject(JSProgressEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSProgressEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSProgressEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSProgressEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSProgressEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -117,8 +117,8 @@ bool JSProgressEventPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSProgressEvent::s_info = { "ProgressEvent", &JSEvent::s_info, &JSProgressEventTable, 0 }; -JSProgressEvent::JSProgressEvent(PassRefPtr<Structure> structure, PassRefPtr<ProgressEvent> impl) - : JSEvent(structure, impl) +JSProgressEvent::JSProgressEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ProgressEvent> impl) + : JSEvent(structure, globalObject, impl) { } @@ -134,32 +134,36 @@ bool JSProgressEvent::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsProgressEventLengthComputable(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSProgressEvent* castedThis = static_cast<JSProgressEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ProgressEvent* imp = static_cast<ProgressEvent*>(static_cast<JSProgressEvent*>(asObject(slot.slotBase()))->impl()); + ProgressEvent* imp = static_cast<ProgressEvent*>(castedThis->impl()); return jsBoolean(imp->lengthComputable()); } JSValue jsProgressEventLoaded(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSProgressEvent* castedThis = static_cast<JSProgressEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ProgressEvent* imp = static_cast<ProgressEvent*>(static_cast<JSProgressEvent*>(asObject(slot.slotBase()))->impl()); + ProgressEvent* imp = static_cast<ProgressEvent*>(castedThis->impl()); return jsNumber(exec, imp->loaded()); } JSValue jsProgressEventTotal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSProgressEvent* castedThis = static_cast<JSProgressEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ProgressEvent* imp = static_cast<ProgressEvent*>(static_cast<JSProgressEvent*>(asObject(slot.slotBase()))->impl()); + ProgressEvent* imp = static_cast<ProgressEvent*>(castedThis->impl()); return jsNumber(exec, imp->total()); } JSValue jsProgressEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSProgressEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSProgressEvent* domObject = static_cast<JSProgressEvent*>(asObject(slot.slotBase())); + return JSProgressEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSProgressEvent::getConstructor(ExecState* exec) +JSValue JSProgressEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSProgressEventConstructor>(exec); + return getDOMConstructor<JSProgressEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsProgressEventPrototypeFunctionInitProgressEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.h b/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.h index 5f0744ace1..7e436be81f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSProgressEvent.h @@ -30,7 +30,7 @@ class ProgressEvent; class JSProgressEvent : public JSEvent { typedef JSEvent Base; public: - JSProgressEvent(PassRefPtr<JSC::Structure>, PassRefPtr<ProgressEvent>); + JSProgressEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<ProgressEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSRGBColor.cpp b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.cpp new file mode 100644 index 0000000000..27d17a9738 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.cpp @@ -0,0 +1,178 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "JSRGBColor.h" + +#include "CSSPrimitiveValue.h" +#include "JSCSSPrimitiveValue.h" +#include "RGBColor.h" +#include <wtf/GetPtr.h> + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSRGBColor); + +/* Hash table */ + +static const HashTableValue JSRGBColorTableValues[5] = +{ + { "red", DontDelete|ReadOnly, (intptr_t)jsRGBColorRed, (intptr_t)0 }, + { "green", DontDelete|ReadOnly, (intptr_t)jsRGBColorGreen, (intptr_t)0 }, + { "blue", DontDelete|ReadOnly, (intptr_t)jsRGBColorBlue, (intptr_t)0 }, + { "constructor", DontEnum|ReadOnly, (intptr_t)jsRGBColorConstructor, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSRGBColorTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 7, JSRGBColorTableValues, 0 }; +#else + { 8, 7, JSRGBColorTableValues, 0 }; +#endif + +/* Hash table for constructor */ + +static const HashTableValue JSRGBColorConstructorTableValues[1] = +{ + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSRGBColorConstructorTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSRGBColorConstructorTableValues, 0 }; +#else + { 1, 0, JSRGBColorConstructorTableValues, 0 }; +#endif + +class JSRGBColorConstructor : public DOMConstructorObject { +public: + JSRGBColorConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSRGBColorConstructor::createStructure(globalObject->objectPrototype()), globalObject) + { + putDirect(exec->propertyNames().prototype, JSRGBColorPrototype::self(exec, globalObject), None); + } + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual const ClassInfo* classInfo() const { return &s_info; } + static const ClassInfo s_info; + + static PassRefPtr<Structure> createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); + } +}; + +const ClassInfo JSRGBColorConstructor::s_info = { "RGBColorConstructor", 0, &JSRGBColorConstructorTable, 0 }; + +bool JSRGBColorConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSRGBColorConstructor, DOMObject>(exec, &JSRGBColorConstructorTable, this, propertyName, slot); +} + +/* Hash table for prototype */ + +static const HashTableValue JSRGBColorPrototypeTableValues[1] = +{ + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSRGBColorPrototypeTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSRGBColorPrototypeTableValues, 0 }; +#else + { 1, 0, JSRGBColorPrototypeTableValues, 0 }; +#endif + +const ClassInfo JSRGBColorPrototype::s_info = { "RGBColorPrototype", 0, &JSRGBColorPrototypeTable, 0 }; + +JSObject* JSRGBColorPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype<JSRGBColor>(exec, globalObject); +} + +const ClassInfo JSRGBColor::s_info = { "RGBColor", 0, &JSRGBColorTable, 0 }; + +JSRGBColor::JSRGBColor(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<RGBColor> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) + , m_impl(impl) +{ +} + +JSRGBColor::~JSRGBColor() +{ + forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get()); +} + +JSObject* JSRGBColor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSRGBColorPrototype(JSRGBColorPrototype::createStructure(globalObject->objectPrototype())); +} + +bool JSRGBColor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSRGBColor, Base>(exec, &JSRGBColorTable, this, propertyName, slot); +} + +JSValue jsRGBColorRed(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSRGBColor* castedThis = static_cast<JSRGBColor*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + RGBColor* imp = static_cast<RGBColor*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->red())); +} + +JSValue jsRGBColorGreen(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSRGBColor* castedThis = static_cast<JSRGBColor*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + RGBColor* imp = static_cast<RGBColor*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->green())); +} + +JSValue jsRGBColorBlue(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSRGBColor* castedThis = static_cast<JSRGBColor*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + RGBColor* imp = static_cast<RGBColor*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->blue())); +} + +JSValue jsRGBColorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSRGBColor* domObject = static_cast<JSRGBColor*>(asObject(slot.slotBase())); + return JSRGBColor::getConstructor(exec, domObject->globalObject()); +} +JSValue JSRGBColor::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor<JSRGBColorConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); +} + +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, RGBColor* object) +{ + return getDOMObjectWrapper<JSRGBColor>(exec, globalObject, object); +} +RGBColor* toRGBColor(JSC::JSValue value) +{ + return value.isObject(&JSRGBColor::s_info) ? static_cast<JSRGBColor*>(asObject(value))->impl() : 0; +} + +} diff --git a/src/3rdparty/webkit/WebCore/generated/JSRGBColor.h b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.h new file mode 100644 index 0000000000..8116d7bc28 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.h @@ -0,0 +1,76 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef JSRGBColor_h +#define JSRGBColor_h + +#include "DOMObjectWithSVGContext.h" +#include "JSDOMBinding.h" +#include <runtime/JSGlobalObject.h> +#include <runtime/ObjectPrototype.h> + +namespace WebCore { + +class RGBColor; + +class JSRGBColor : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; +public: + JSRGBColor(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<RGBColor>); + virtual ~JSRGBColor(); + static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + + static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); + } + + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); + RGBColor* impl() const { return m_impl.get(); } + +private: + RefPtr<RGBColor> m_impl; +}; + +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, RGBColor*); +RGBColor* toRGBColor(JSC::JSValue); + +class JSRGBColorPrototype : public JSC::JSObject { + typedef JSC::JSObject Base; +public: + static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + JSRGBColorPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { } +}; + +// Attributes + +JSC::JSValue jsRGBColorRed(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +JSC::JSValue jsRGBColorGreen(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +JSC::JSValue jsRGBColorBlue(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +JSC::JSValue jsRGBColorConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); + +} // namespace WebCore + +#endif diff --git a/src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h deleted file mode 100644 index 4bcba9c906..0000000000 --- a/src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h +++ /dev/null @@ -1,16 +0,0 @@ -// Automatically generated from ../bindings/js/JSRGBColor.cpp using WebCore/../JavaScriptCore/create_hash_table. DO NOT EDIT! - -namespace WebCore { - -using namespace JSC; - -static const struct HashTableValue JSRGBColorTableValues[4] = { - { "red", DontDelete|ReadOnly, (intptr_t)jsRGBColorRed, (intptr_t)0 }, - { "green", DontDelete|ReadOnly, (intptr_t)jsRGBColorGreen, (intptr_t)0 }, - { "blue", DontDelete|ReadOnly, (intptr_t)jsRGBColorBlue, (intptr_t)0 }, - { 0, 0, 0, 0 } -}; - -extern JSC_CONST_HASHTABLE HashTable JSRGBColorTable = - { 8, 7, JSRGBColorTableValues, 0 }; -} // namespace diff --git a/src/3rdparty/webkit/WebCore/generated/JSRange.cpp b/src/3rdparty/webkit/WebCore/generated/JSRange.cpp index 35582f5d41..cefe592512 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRange.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSRange.cpp @@ -82,12 +82,12 @@ static JSC_CONST_HASHTABLE HashTable JSRangeConstructorTable = { 18, 15, JSRangeConstructorTableValues, 0 }; #endif -class JSRangeConstructor : public DOMObject { +class JSRangeConstructor : public DOMConstructorObject { public: - JSRangeConstructor(ExecState* exec) - : DOMObject(JSRangeConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSRangeConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSRangeConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSRangePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSRangePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -165,8 +165,8 @@ bool JSRangePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& pro const ClassInfo JSRange::s_info = { "Range", 0, &JSRangeTable, 0 }; -JSRange::JSRange(PassRefPtr<Structure> structure, PassRefPtr<Range> impl) - : DOMObject(structure) +JSRange::JSRange(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Range> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -188,17 +188,19 @@ bool JSRange::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName JSValue jsRangeStartContainer(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRange* castedThis = static_cast<JSRange*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - Range* imp = static_cast<Range*>(static_cast<JSRange*>(asObject(slot.slotBase()))->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->startContainer(ec))); + Range* imp = static_cast<Range*>(castedThis->impl()); + JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->startContainer(ec))); setDOMException(exec, ec); return result; } JSValue jsRangeStartOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRange* castedThis = static_cast<JSRange*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - Range* imp = static_cast<Range*>(static_cast<JSRange*>(asObject(slot.slotBase()))->impl()); + Range* imp = static_cast<Range*>(castedThis->impl()); JSC::JSValue result = jsNumber(exec, imp->startOffset(ec)); setDOMException(exec, ec); return result; @@ -206,17 +208,19 @@ JSValue jsRangeStartOffset(ExecState* exec, const Identifier&, const PropertySlo JSValue jsRangeEndContainer(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRange* castedThis = static_cast<JSRange*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - Range* imp = static_cast<Range*>(static_cast<JSRange*>(asObject(slot.slotBase()))->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->endContainer(ec))); + Range* imp = static_cast<Range*>(castedThis->impl()); + JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->endContainer(ec))); setDOMException(exec, ec); return result; } JSValue jsRangeEndOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRange* castedThis = static_cast<JSRange*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - Range* imp = static_cast<Range*>(static_cast<JSRange*>(asObject(slot.slotBase()))->impl()); + Range* imp = static_cast<Range*>(castedThis->impl()); JSC::JSValue result = jsNumber(exec, imp->endOffset(ec)); setDOMException(exec, ec); return result; @@ -224,8 +228,9 @@ JSValue jsRangeEndOffset(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsRangeCollapsed(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRange* castedThis = static_cast<JSRange*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - Range* imp = static_cast<Range*>(static_cast<JSRange*>(asObject(slot.slotBase()))->impl()); + Range* imp = static_cast<Range*>(castedThis->impl()); JSC::JSValue result = jsBoolean(imp->collapsed(ec)); setDOMException(exec, ec); return result; @@ -233,20 +238,22 @@ JSValue jsRangeCollapsed(ExecState* exec, const Identifier&, const PropertySlot& JSValue jsRangeCommonAncestorContainer(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRange* castedThis = static_cast<JSRange*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - Range* imp = static_cast<Range*>(static_cast<JSRange*>(asObject(slot.slotBase()))->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->commonAncestorContainer(ec))); + Range* imp = static_cast<Range*>(castedThis->impl()); + JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->commonAncestorContainer(ec))); setDOMException(exec, ec); return result; } JSValue jsRangeConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSRange*>(asObject(slot.slotBase()))->getConstructor(exec); + JSRange* domObject = static_cast<JSRange*>(asObject(slot.slotBase())); + return JSRange::getConstructor(exec, domObject->globalObject()); } -JSValue JSRange::getConstructor(ExecState* exec) +JSValue JSRange::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSRangeConstructor>(exec); + return getDOMConstructor<JSRangeConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsRangePrototypeFunctionSetStart(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -427,7 +434,7 @@ JSValue JSC_HOST_CALL jsRangePrototypeFunctionExtractContents(ExecState* exec, J ExceptionCode ec = 0; - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->extractContents(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->extractContents(ec))); setDOMException(exec, ec); return result; } @@ -442,7 +449,7 @@ JSValue JSC_HOST_CALL jsRangePrototypeFunctionCloneContents(ExecState* exec, JSO ExceptionCode ec = 0; - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->cloneContents(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->cloneContents(ec))); setDOMException(exec, ec); return result; } @@ -487,7 +494,7 @@ JSValue JSC_HOST_CALL jsRangePrototypeFunctionCloneRange(ExecState* exec, JSObje ExceptionCode ec = 0; - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->cloneRange(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->cloneRange(ec))); setDOMException(exec, ec); return result; } @@ -532,7 +539,7 @@ JSValue JSC_HOST_CALL jsRangePrototypeFunctionCreateContextualFragment(ExecState const UString& html = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createContextualFragment(html, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createContextualFragment(html, ec))); setDOMException(exec, ec); return result; } @@ -645,9 +652,9 @@ JSValue jsRangeNODE_INSIDE(ExecState* exec, const Identifier&, const PropertySlo return jsNumber(exec, static_cast<int>(3)); } -JSC::JSValue toJS(JSC::ExecState* exec, Range* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Range* object) { - return getDOMObjectWrapper<JSRange>(exec, object); + return getDOMObjectWrapper<JSRange>(exec, globalObject, object); } Range* toRange(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSRange.h b/src/3rdparty/webkit/WebCore/generated/JSRange.h index 4d8a6f9294..a97f75945e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRange.h +++ b/src/3rdparty/webkit/WebCore/generated/JSRange.h @@ -21,6 +21,7 @@ #ifndef JSRange_h #define JSRange_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Range; -class JSRange : public DOMObject { - typedef DOMObject Base; +class JSRange : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSRange(PassRefPtr<JSC::Structure>, PassRefPtr<Range>); + JSRange(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Range>); virtual ~JSRange(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); Range* impl() const { return m_impl.get(); } private: RefPtr<Range> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Range*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Range*); Range* toRange(JSC::JSValue); class JSRangePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp b/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp index 799616e8cc..fb8addff67 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSRangeExceptionConstructorTable = { 4, 3, JSRangeExceptionConstructorTableValues, 0 }; #endif -class JSRangeExceptionConstructor : public DOMObject { +class JSRangeExceptionConstructor : public DOMConstructorObject { public: - JSRangeExceptionConstructor(ExecState* exec) - : DOMObject(JSRangeExceptionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSRangeExceptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSRangeExceptionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSRangeExceptionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSRangeExceptionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -123,8 +123,8 @@ bool JSRangeExceptionPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSRangeException::s_info = { "RangeException", 0, &JSRangeExceptionTable, 0 }; -JSRangeException::JSRangeException(PassRefPtr<Structure> structure, PassRefPtr<RangeException> impl) - : DOMObject(structure) +JSRangeException::JSRangeException(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<RangeException> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -146,32 +146,36 @@ bool JSRangeException::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsRangeExceptionCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRangeException* castedThis = static_cast<JSRangeException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - RangeException* imp = static_cast<RangeException*>(static_cast<JSRangeException*>(asObject(slot.slotBase()))->impl()); + RangeException* imp = static_cast<RangeException*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsRangeExceptionName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRangeException* castedThis = static_cast<JSRangeException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - RangeException* imp = static_cast<RangeException*>(static_cast<JSRangeException*>(asObject(slot.slotBase()))->impl()); + RangeException* imp = static_cast<RangeException*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsRangeExceptionMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRangeException* castedThis = static_cast<JSRangeException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - RangeException* imp = static_cast<RangeException*>(static_cast<JSRangeException*>(asObject(slot.slotBase()))->impl()); + RangeException* imp = static_cast<RangeException*>(castedThis->impl()); return jsString(exec, imp->message()); } JSValue jsRangeExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSRangeException*>(asObject(slot.slotBase()))->getConstructor(exec); + JSRangeException* domObject = static_cast<JSRangeException*>(asObject(slot.slotBase())); + return JSRangeException::getConstructor(exec, domObject->globalObject()); } -JSValue JSRangeException::getConstructor(ExecState* exec) +JSValue JSRangeException::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSRangeExceptionConstructor>(exec); + return getDOMConstructor<JSRangeExceptionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsRangeExceptionPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -199,9 +203,9 @@ JSValue jsRangeExceptionINVALID_NODE_TYPE_ERR(ExecState* exec, const Identifier& return jsNumber(exec, static_cast<int>(2)); } -JSC::JSValue toJS(JSC::ExecState* exec, RangeException* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, RangeException* object) { - return getDOMObjectWrapper<JSRangeException>(exec, object); + return getDOMObjectWrapper<JSRangeException>(exec, globalObject, object); } RangeException* toRangeException(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSRangeException.h b/src/3rdparty/webkit/WebCore/generated/JSRangeException.h index 5c45cd2df1..7afd133962 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRangeException.h +++ b/src/3rdparty/webkit/WebCore/generated/JSRangeException.h @@ -21,6 +21,7 @@ #ifndef JSRangeException_h #define JSRangeException_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class RangeException; -class JSRangeException : public DOMObject { - typedef DOMObject Base; +class JSRangeException : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSRangeException(PassRefPtr<JSC::Structure>, PassRefPtr<RangeException>); + JSRangeException(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<RangeException>); virtual ~JSRangeException(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); RangeException* impl() const { return m_impl.get(); } private: RefPtr<RangeException> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, RangeException*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, RangeException*); RangeException* toRangeException(JSC::JSValue); class JSRangeExceptionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSRect.cpp index 4f6a2f776c..998f649a96 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRect.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSRect.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSRectConstructorTable = { 1, 0, JSRectConstructorTableValues, 0 }; #endif -class JSRectConstructor : public DOMObject { +class JSRectConstructor : public DOMConstructorObject { public: - JSRectConstructor(ExecState* exec) - : DOMObject(JSRectConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSRectConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSRectConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSRectPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSRectPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -112,8 +112,8 @@ JSObject* JSRectPrototype::self(ExecState* exec, JSGlobalObject* globalObject) const ClassInfo JSRect::s_info = { "Rect", 0, &JSRectTable, 0 }; -JSRect::JSRect(PassRefPtr<Structure> structure, PassRefPtr<Rect> impl) - : DOMObject(structure) +JSRect::JSRect(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Rect> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -135,44 +135,49 @@ bool JSRect::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, JSValue jsRectTop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRect* castedThis = static_cast<JSRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Rect* imp = static_cast<Rect*>(static_cast<JSRect*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->top())); + Rect* imp = static_cast<Rect*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->top())); } JSValue jsRectRight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRect* castedThis = static_cast<JSRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Rect* imp = static_cast<Rect*>(static_cast<JSRect*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->right())); + Rect* imp = static_cast<Rect*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->right())); } JSValue jsRectBottom(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRect* castedThis = static_cast<JSRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Rect* imp = static_cast<Rect*>(static_cast<JSRect*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->bottom())); + Rect* imp = static_cast<Rect*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->bottom())); } JSValue jsRectLeft(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSRect* castedThis = static_cast<JSRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Rect* imp = static_cast<Rect*>(static_cast<JSRect*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->left())); + Rect* imp = static_cast<Rect*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->left())); } JSValue jsRectConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSRect*>(asObject(slot.slotBase()))->getConstructor(exec); + JSRect* domObject = static_cast<JSRect*>(asObject(slot.slotBase())); + return JSRect::getConstructor(exec, domObject->globalObject()); } -JSValue JSRect::getConstructor(ExecState* exec) +JSValue JSRect::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSRectConstructor>(exec); + return getDOMConstructor<JSRectConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } -JSC::JSValue toJS(JSC::ExecState* exec, Rect* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Rect* object) { - return getDOMObjectWrapper<JSRect>(exec, object); + return getDOMObjectWrapper<JSRect>(exec, globalObject, object); } Rect* toRect(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSRect.h b/src/3rdparty/webkit/WebCore/generated/JSRect.h index be2396609d..4b1e427ebd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRect.h +++ b/src/3rdparty/webkit/WebCore/generated/JSRect.h @@ -21,6 +21,7 @@ #ifndef JSRect_h #define JSRect_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Rect; -class JSRect : public DOMObject { - typedef DOMObject Base; +class JSRect : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSRect(PassRefPtr<JSC::Structure>, PassRefPtr<Rect>); + JSRect(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Rect>); virtual ~JSRect(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); Rect* impl() const { return m_impl.get(); } private: RefPtr<Rect> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Rect*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Rect*); Rect* toRect(JSC::JSValue); class JSRectPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp index f907210c27..bb987c38c4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp @@ -75,8 +75,8 @@ JSObject* JSSQLErrorPrototype::self(ExecState* exec, JSGlobalObject* globalObjec const ClassInfo JSSQLError::s_info = { "SQLError", 0, &JSSQLErrorTable, 0 }; -JSSQLError::JSSQLError(PassRefPtr<Structure> structure, PassRefPtr<SQLError> impl) - : DOMObject(structure) +JSSQLError::JSSQLError(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SQLError> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -98,21 +98,23 @@ bool JSSQLError::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsSQLErrorCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSQLError* castedThis = static_cast<JSSQLError*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SQLError* imp = static_cast<SQLError*>(static_cast<JSSQLError*>(asObject(slot.slotBase()))->impl()); + SQLError* imp = static_cast<SQLError*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsSQLErrorMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSQLError* castedThis = static_cast<JSSQLError*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SQLError* imp = static_cast<SQLError*>(static_cast<JSSQLError*>(asObject(slot.slotBase()))->impl()); + SQLError* imp = static_cast<SQLError*>(castedThis->impl()); return jsString(exec, imp->message()); } -JSC::JSValue toJS(JSC::ExecState* exec, SQLError* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SQLError* object) { - return getDOMObjectWrapper<JSSQLError>(exec, object); + return getDOMObjectWrapper<JSSQLError>(exec, globalObject, object); } SQLError* toSQLError(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLError.h b/src/3rdparty/webkit/WebCore/generated/JSSQLError.h index d500434f84..04aad811de 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLError.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLError.h @@ -23,6 +23,7 @@ #if ENABLE(DATABASE) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class SQLError; -class JSSQLError : public DOMObject { - typedef DOMObject Base; +class JSSQLError : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSSQLError(PassRefPtr<JSC::Structure>, PassRefPtr<SQLError>); + JSSQLError(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SQLError>); virtual ~JSSQLError(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -52,7 +53,7 @@ private: RefPtr<SQLError> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SQLError*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SQLError*); SQLError* toSQLError(JSC::JSValue); class JSSQLErrorPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp index e00abfe2cd..11d8ffcc02 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp @@ -76,8 +76,8 @@ JSObject* JSSQLResultSetPrototype::self(ExecState* exec, JSGlobalObject* globalO const ClassInfo JSSQLResultSet::s_info = { "SQLResultSet", 0, &JSSQLResultSetTable, 0 }; -JSSQLResultSet::JSSQLResultSet(PassRefPtr<Structure> structure, PassRefPtr<SQLResultSet> impl) - : DOMObject(structure) +JSSQLResultSet::JSSQLResultSet(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SQLResultSet> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -99,15 +99,17 @@ bool JSSQLResultSet::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsSQLResultSetRows(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSQLResultSet* castedThis = static_cast<JSSQLResultSet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SQLResultSet* imp = static_cast<SQLResultSet*>(static_cast<JSSQLResultSet*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->rows())); + SQLResultSet* imp = static_cast<SQLResultSet*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->rows())); } JSValue jsSQLResultSetInsertId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSQLResultSet* castedThis = static_cast<JSSQLResultSet*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - SQLResultSet* imp = static_cast<SQLResultSet*>(static_cast<JSSQLResultSet*>(asObject(slot.slotBase()))->impl()); + SQLResultSet* imp = static_cast<SQLResultSet*>(castedThis->impl()); JSC::JSValue result = jsNumber(exec, imp->insertId(ec)); setDOMException(exec, ec); return result; @@ -115,14 +117,15 @@ JSValue jsSQLResultSetInsertId(ExecState* exec, const Identifier&, const Propert JSValue jsSQLResultSetRowsAffected(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSQLResultSet* castedThis = static_cast<JSSQLResultSet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SQLResultSet* imp = static_cast<SQLResultSet*>(static_cast<JSSQLResultSet*>(asObject(slot.slotBase()))->impl()); + SQLResultSet* imp = static_cast<SQLResultSet*>(castedThis->impl()); return jsNumber(exec, imp->rowsAffected()); } -JSC::JSValue toJS(JSC::ExecState* exec, SQLResultSet* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SQLResultSet* object) { - return getDOMObjectWrapper<JSSQLResultSet>(exec, object); + return getDOMObjectWrapper<JSSQLResultSet>(exec, globalObject, object); } SQLResultSet* toSQLResultSet(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.h b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.h index d009dadf80..401bc3a68b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.h @@ -23,6 +23,7 @@ #if ENABLE(DATABASE) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class SQLResultSet; -class JSSQLResultSet : public DOMObject { - typedef DOMObject Base; +class JSSQLResultSet : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSSQLResultSet(PassRefPtr<JSC::Structure>, PassRefPtr<SQLResultSet>); + JSSQLResultSet(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SQLResultSet>); virtual ~JSSQLResultSet(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -52,7 +53,7 @@ private: RefPtr<SQLResultSet> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SQLResultSet*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SQLResultSet*); SQLResultSet* toSQLResultSet(JSC::JSValue); class JSSQLResultSetPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp index 1a8af169b9..a166fb0034 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp @@ -79,8 +79,8 @@ bool JSSQLResultSetRowListPrototype::getOwnPropertySlot(ExecState* exec, const I const ClassInfo JSSQLResultSetRowList::s_info = { "SQLResultSetRowList", 0, &JSSQLResultSetRowListTable, 0 }; -JSSQLResultSetRowList::JSSQLResultSetRowList(PassRefPtr<Structure> structure, PassRefPtr<SQLResultSetRowList> impl) - : DOMObject(structure) +JSSQLResultSetRowList::JSSQLResultSetRowList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SQLResultSetRowList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -102,8 +102,9 @@ bool JSSQLResultSetRowList::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsSQLResultSetRowListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSQLResultSetRowList* castedThis = static_cast<JSSQLResultSetRowList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SQLResultSetRowList* imp = static_cast<SQLResultSetRowList*>(static_cast<JSSQLResultSetRowList*>(asObject(slot.slotBase()))->impl()); + SQLResultSetRowList* imp = static_cast<SQLResultSetRowList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } @@ -116,9 +117,9 @@ JSValue JSC_HOST_CALL jsSQLResultSetRowListPrototypeFunctionItem(ExecState* exec return castedThisObj->item(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, SQLResultSetRowList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SQLResultSetRowList* object) { - return getDOMObjectWrapper<JSSQLResultSetRowList>(exec, object); + return getDOMObjectWrapper<JSSQLResultSetRowList>(exec, globalObject, object); } SQLResultSetRowList* toSQLResultSetRowList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.h b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.h index df285679ce..22fb844ea2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.h @@ -23,6 +23,7 @@ #if ENABLE(DATABASE) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class SQLResultSetRowList; -class JSSQLResultSetRowList : public DOMObject { - typedef DOMObject Base; +class JSSQLResultSetRowList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSSQLResultSetRowList(PassRefPtr<JSC::Structure>, PassRefPtr<SQLResultSetRowList>); + JSSQLResultSetRowList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SQLResultSetRowList>); virtual ~JSSQLResultSetRowList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -55,7 +56,7 @@ private: RefPtr<SQLResultSetRowList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SQLResultSetRowList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SQLResultSetRowList*); SQLResultSetRowList* toSQLResultSetRowList(JSC::JSValue); class JSSQLResultSetRowListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp index cb7dabdb6e..f8c6d6711b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp @@ -63,8 +63,8 @@ bool JSSQLTransactionPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSQLTransaction::s_info = { "SQLTransaction", 0, 0, 0 }; -JSSQLTransaction::JSSQLTransaction(PassRefPtr<Structure> structure, PassRefPtr<SQLTransaction> impl) - : DOMObject(structure) +JSSQLTransaction::JSSQLTransaction(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SQLTransaction> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -88,9 +88,9 @@ JSValue JSC_HOST_CALL jsSQLTransactionPrototypeFunctionExecuteSql(ExecState* exe return castedThisObj->executeSql(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, SQLTransaction* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SQLTransaction* object) { - return getDOMObjectWrapper<JSSQLTransaction>(exec, object); + return getDOMObjectWrapper<JSSQLTransaction>(exec, globalObject, object); } SQLTransaction* toSQLTransaction(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.h b/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.h index 94c10a5e6b..bb72108ec9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.h @@ -23,6 +23,7 @@ #if ENABLE(DATABASE) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class SQLTransaction; -class JSSQLTransaction : public DOMObject { - typedef DOMObject Base; +class JSSQLTransaction : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSSQLTransaction(PassRefPtr<JSC::Structure>, PassRefPtr<SQLTransaction>); + JSSQLTransaction(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SQLTransaction>); virtual ~JSSQLTransaction(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -49,7 +50,7 @@ private: RefPtr<SQLTransaction> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SQLTransaction*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SQLTransaction*); SQLTransaction* toSQLTransaction(JSC::JSValue); class JSSQLTransactionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp index b7a323775d..dd66b1fabe 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp @@ -111,8 +111,8 @@ bool JSSVGAElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSSVGAElement::s_info = { "SVGAElement", &JSSVGElement::s_info, &JSSVGAElementTable, 0 }; -JSSVGAElement::JSSVGAElement(PassRefPtr<Structure> structure, PassRefPtr<SVGAElement> impl) - : JSSVGElement(structure, impl) +JSSVGAElement::JSSVGAElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -128,98 +128,111 @@ bool JSSVGAElement::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsSVGAElementTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->targetAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGAElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGAElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGAElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGAElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGAElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGAElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGAElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGAElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGAElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGAElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGAElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGAElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAElement* castedThis = static_cast<JSSVGAElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAElement* imp = static_cast<SVGAElement*>(static_cast<JSSVGAElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGAElement* imp = static_cast<SVGAElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGAElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -263,7 +276,7 @@ JSValue JSC_HOST_CALL jsSVGAElementPrototypeFunctionGetPresentationAttribute(Exe const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -276,7 +289,7 @@ JSValue JSC_HOST_CALL jsSVGAElementPrototypeFunctionGetBBox(ExecState* exec, JSO SVGAElement* imp = static_cast<SVGAElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -289,7 +302,7 @@ JSValue JSC_HOST_CALL jsSVGAElementPrototypeFunctionGetCTM(ExecState* exec, JSOb SVGAElement* imp = static_cast<SVGAElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -302,7 +315,7 @@ JSValue JSC_HOST_CALL jsSVGAElementPrototypeFunctionGetScreenCTM(ExecState* exec SVGAElement* imp = static_cast<SVGAElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -317,7 +330,7 @@ JSValue JSC_HOST_CALL jsSVGAElementPrototypeFunctionGetTransformToElement(ExecSt SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.h index 78406f6173..09d21e3e0c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAElement.h @@ -33,7 +33,7 @@ class SVGAElement; class JSSVGAElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGAElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAElement>); + JSSVGAElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp index 56a4392098..8f8a5faf5f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp @@ -76,8 +76,8 @@ JSObject* JSSVGAltGlyphElementPrototype::self(ExecState* exec, JSGlobalObject* g const ClassInfo JSSVGAltGlyphElement::s_info = { "SVGAltGlyphElement", &JSSVGTextPositioningElement::s_info, &JSSVGAltGlyphElementTable, 0 }; -JSSVGAltGlyphElement::JSSVGAltGlyphElement(PassRefPtr<Structure> structure, PassRefPtr<SVGAltGlyphElement> impl) - : JSSVGTextPositioningElement(structure, impl) +JSSVGAltGlyphElement::JSSVGAltGlyphElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAltGlyphElement> impl) + : JSSVGTextPositioningElement(structure, globalObject, impl) { } @@ -93,24 +93,27 @@ bool JSSVGAltGlyphElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGAltGlyphElementGlyphRef(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(static_cast<JSSVGAltGlyphElement*>(asObject(slot.slotBase()))->impl()); + SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl()); return jsString(exec, imp->glyphRef()); } JSValue jsSVGAltGlyphElementFormat(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(static_cast<JSSVGAltGlyphElement*>(asObject(slot.slotBase()))->impl()); + SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl()); return jsString(exec, imp->format()); } JSValue jsSVGAltGlyphElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAltGlyphElement* castedThis = static_cast<JSSVGAltGlyphElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(static_cast<JSSVGAltGlyphElement*>(asObject(slot.slotBase()))->impl()); + SVGAltGlyphElement* imp = static_cast<SVGAltGlyphElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } void JSSVGAltGlyphElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.h index f92bdcd34f..5df51fede0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.h @@ -33,7 +33,7 @@ class SVGAltGlyphElement; class JSSVGAltGlyphElement : public JSSVGTextPositioningElement { typedef JSSVGTextPositioningElement Base; public: - JSSVGAltGlyphElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAltGlyphElement>); + JSSVGAltGlyphElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAltGlyphElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp index 4bb4518e34..be8000303d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp @@ -75,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGAngleConstructorTable = { 18, 15, JSSVGAngleConstructorTableValues, 0 }; #endif -class JSSVGAngleConstructor : public DOMObject { +class JSSVGAngleConstructor : public DOMConstructorObject { public: - JSSVGAngleConstructor(ExecState* exec) - : DOMObject(JSSVGAngleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGAngleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGAngleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGAnglePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGAnglePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -134,9 +134,8 @@ bool JSSVGAnglePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSSVGAngle::s_info = { "SVGAngle", 0, &JSSVGAngleTable, 0 }; -JSSVGAngle::JSSVGAngle(PassRefPtr<Structure> structure, PassRefPtr<SVGAngle> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAngle::JSSVGAngle(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAngle> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -158,35 +157,40 @@ bool JSSVGAngle::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsSVGAngleUnitType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAngle* castedThis = static_cast<JSSVGAngle*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAngle* imp = static_cast<SVGAngle*>(static_cast<JSSVGAngle*>(asObject(slot.slotBase()))->impl()); + SVGAngle* imp = static_cast<SVGAngle*>(castedThis->impl()); return jsNumber(exec, imp->unitType()); } JSValue jsSVGAngleValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAngle* castedThis = static_cast<JSSVGAngle*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAngle* imp = static_cast<SVGAngle*>(static_cast<JSSVGAngle*>(asObject(slot.slotBase()))->impl()); + SVGAngle* imp = static_cast<SVGAngle*>(castedThis->impl()); return jsNumber(exec, imp->value()); } JSValue jsSVGAngleValueInSpecifiedUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAngle* castedThis = static_cast<JSSVGAngle*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAngle* imp = static_cast<SVGAngle*>(static_cast<JSSVGAngle*>(asObject(slot.slotBase()))->impl()); + SVGAngle* imp = static_cast<SVGAngle*>(castedThis->impl()); return jsNumber(exec, imp->valueInSpecifiedUnits()); } JSValue jsSVGAngleValueAsString(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAngle* castedThis = static_cast<JSSVGAngle*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAngle* imp = static_cast<SVGAngle*>(static_cast<JSSVGAngle*>(asObject(slot.slotBase()))->impl()); + SVGAngle* imp = static_cast<SVGAngle*>(castedThis->impl()); return jsString(exec, imp->valueAsString()); } JSValue jsSVGAngleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGAngle*>(asObject(slot.slotBase()))->getConstructor(exec); + UNUSED_PARAM(slot); + return JSSVGAngle::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec)); } void JSSVGAngle::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -217,9 +221,9 @@ void setJSSVGAngleValueAsString(ExecState* exec, JSObject* thisObject, JSValue v static_cast<JSSVGAngle*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGAngle*>(thisObject)->impl()->associatedAttributeName()); } -JSValue JSSVGAngle::getConstructor(ExecState* exec) +JSValue JSSVGAngle::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGAngleConstructor>(exec); + return getDOMConstructor<JSSVGAngleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGAnglePrototypeFunctionNewValueSpecifiedUnits(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -276,9 +280,9 @@ JSValue jsSVGAngleSVG_ANGLETYPE_GRAD(ExecState* exec, const Identifier&, const P return jsNumber(exec, static_cast<int>(4)); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAngle* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAngle* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAngle>(exec, object, context); + return getDOMObjectWrapper<JSSVGAngle>(exec, globalObject, object, context); } SVGAngle* toSVGAngle(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.h index 531258108d..92cf6b50ef 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGAngle; -class JSSVGAngle : public DOMObject { - typedef DOMObject Base; +class JSSVGAngle : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAngle(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAngle>, SVGElement* context); + JSSVGAngle(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAngle>, SVGElement* context); virtual ~JSSVGAngle(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,16 +49,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); SVGAngle* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAngle > m_impl; + RefPtr<SVGAngle> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAngle*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAngle*, SVGElement* context); SVGAngle* toSVGAngle(JSC::JSValue); class JSSVGAnglePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp index 432bd7e8d6..e6aa047802 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGAnimateColorElementPrototype::self(ExecState* exec, JSGlobalObjec const ClassInfo JSSVGAnimateColorElement::s_info = { "SVGAnimateColorElement", &JSSVGAnimationElement::s_info, 0, 0 }; -JSSVGAnimateColorElement::JSSVGAnimateColorElement(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimateColorElement> impl) - : JSSVGAnimationElement(structure, impl) +JSSVGAnimateColorElement::JSSVGAnimateColorElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimateColorElement> impl) + : JSSVGAnimationElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.h index a1519a4b81..2a44d41387 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.h @@ -33,7 +33,7 @@ class SVGAnimateColorElement; class JSSVGAnimateColorElement : public JSSVGAnimationElement { typedef JSSVGAnimationElement Base; public: - JSSVGAnimateColorElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimateColorElement>); + JSSVGAnimateColorElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimateColorElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp index b79ba69007..a49dea6287 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGAnimateElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSSVGAnimateElement::s_info = { "SVGAnimateElement", &JSSVGAnimationElement::s_info, 0, 0 }; -JSSVGAnimateElement::JSSVGAnimateElement(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimateElement> impl) - : JSSVGAnimationElement(structure, impl) +JSSVGAnimateElement::JSSVGAnimateElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimateElement> impl) + : JSSVGAnimationElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.h index 77415d9b3a..90937ca842 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.h @@ -33,7 +33,7 @@ class SVGAnimateElement; class JSSVGAnimateElement : public JSSVGAnimationElement { typedef JSSVGAnimationElement Base; public: - JSSVGAnimateElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimateElement>); + JSSVGAnimateElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimateElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp index 8b68ea4d4b..d5c70c05f5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGAnimateTransformElementPrototype::self(ExecState* exec, JSGlobalO const ClassInfo JSSVGAnimateTransformElement::s_info = { "SVGAnimateTransformElement", &JSSVGAnimationElement::s_info, 0, 0 }; -JSSVGAnimateTransformElement::JSSVGAnimateTransformElement(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimateTransformElement> impl) - : JSSVGAnimationElement(structure, impl) +JSSVGAnimateTransformElement::JSSVGAnimateTransformElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimateTransformElement> impl) + : JSSVGAnimationElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.h index ed8d9bbc7d..fb8c1c30e2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.h @@ -33,7 +33,7 @@ class SVGAnimateTransformElement; class JSSVGAnimateTransformElement : public JSSVGAnimationElement { typedef JSSVGAnimationElement Base; public: - JSSVGAnimateTransformElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimateTransformElement>); + JSSVGAnimateTransformElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimateTransformElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp index 34a9a9bd54..e123d2f3ac 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp @@ -73,9 +73,8 @@ JSObject* JSSVGAnimatedAnglePrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSSVGAnimatedAngle::s_info = { "SVGAnimatedAngle", 0, &JSSVGAnimatedAngleTable, 0 }; -JSSVGAnimatedAngle::JSSVGAnimatedAngle(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedAngle> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedAngle::JSSVGAnimatedAngle(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedAngle> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -97,21 +96,23 @@ bool JSSVGAnimatedAngle::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGAnimatedAngleBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedAngle* castedThis = static_cast<JSSVGAnimatedAngle*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedAngle* imp = static_cast<SVGAnimatedAngle*>(static_cast<JSSVGAnimatedAngle*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->baseVal()), static_cast<JSSVGAnimatedAngle*>(asObject(slot.slotBase()))->context()); + SVGAnimatedAngle* imp = static_cast<SVGAnimatedAngle*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->baseVal()), castedThis->context()); } JSValue jsSVGAnimatedAngleAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedAngle* castedThis = static_cast<JSSVGAnimatedAngle*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedAngle* imp = static_cast<SVGAnimatedAngle*>(static_cast<JSSVGAnimatedAngle*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animVal()), static_cast<JSSVGAnimatedAngle*>(asObject(slot.slotBase()))->context()); + SVGAnimatedAngle* imp = static_cast<SVGAnimatedAngle*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->animVal()), castedThis->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedAngle* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedAngle* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedAngle>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedAngle>(exec, globalObject, object, context); } SVGAnimatedAngle* toSVGAnimatedAngle(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.h index 95000548e4..fb2a73ffe8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedAngle : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedAngle : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedAngle(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedAngle>, SVGElement* context); + JSSVGAnimatedAngle(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedAngle>, SVGElement* context); virtual ~JSSVGAnimatedAngle(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,12 @@ public: } SVGAnimatedAngle* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedAngle > m_impl; + RefPtr<SVGAnimatedAngle> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedAngle*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedAngle*, SVGElement* context); SVGAnimatedAngle* toSVGAnimatedAngle(JSC::JSValue); class JSSVGAnimatedAnglePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp index 969a5c9dbe..983dd2a158 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp @@ -71,9 +71,8 @@ JSObject* JSSVGAnimatedBooleanPrototype::self(ExecState* exec, JSGlobalObject* g const ClassInfo JSSVGAnimatedBoolean::s_info = { "SVGAnimatedBoolean", 0, &JSSVGAnimatedBooleanTable, 0 }; -JSSVGAnimatedBoolean::JSSVGAnimatedBoolean(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedBoolean> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedBoolean::JSSVGAnimatedBoolean(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedBoolean> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -95,15 +94,17 @@ bool JSSVGAnimatedBoolean::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGAnimatedBooleanBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedBoolean* castedThis = static_cast<JSSVGAnimatedBoolean*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedBoolean* imp = static_cast<SVGAnimatedBoolean*>(static_cast<JSSVGAnimatedBoolean*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedBoolean* imp = static_cast<SVGAnimatedBoolean*>(castedThis->impl()); return jsBoolean(imp->baseVal()); } JSValue jsSVGAnimatedBooleanAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedBoolean* castedThis = static_cast<JSSVGAnimatedBoolean*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedBoolean* imp = static_cast<SVGAnimatedBoolean*>(static_cast<JSSVGAnimatedBoolean*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedBoolean* imp = static_cast<SVGAnimatedBoolean*>(castedThis->impl()); return jsBoolean(imp->animVal()); } @@ -120,9 +121,9 @@ void setJSSVGAnimatedBooleanBaseVal(ExecState* exec, JSObject* thisObject, JSVal static_cast<JSSVGAnimatedBoolean*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGAnimatedBoolean*>(thisObject)->impl()->associatedAttributeName()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedBoolean* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedBoolean* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedBoolean>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedBoolean>(exec, globalObject, object, context); } SVGAnimatedBoolean* toSVGAnimatedBoolean(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.h index 4a4d6f6981..599e2a0c72 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedBoolean : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedBoolean : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedBoolean(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedBoolean>, SVGElement* context); + JSSVGAnimatedBoolean(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedBoolean>, SVGElement* context); virtual ~JSSVGAnimatedBoolean(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,14 +48,12 @@ public: } SVGAnimatedBoolean* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedBoolean > m_impl; + RefPtr<SVGAnimatedBoolean> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedBoolean*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedBoolean*, SVGElement* context); SVGAnimatedBoolean* toSVGAnimatedBoolean(JSC::JSValue); class JSSVGAnimatedBooleanPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp index d61ea12ab9..2cf3ad9196 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp @@ -72,9 +72,8 @@ JSObject* JSSVGAnimatedEnumerationPrototype::self(ExecState* exec, JSGlobalObjec const ClassInfo JSSVGAnimatedEnumeration::s_info = { "SVGAnimatedEnumeration", 0, &JSSVGAnimatedEnumerationTable, 0 }; -JSSVGAnimatedEnumeration::JSSVGAnimatedEnumeration(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedEnumeration> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedEnumeration::JSSVGAnimatedEnumeration(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedEnumeration> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -96,15 +95,17 @@ bool JSSVGAnimatedEnumeration::getOwnPropertySlot(ExecState* exec, const Identif JSValue jsSVGAnimatedEnumerationBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedEnumeration* castedThis = static_cast<JSSVGAnimatedEnumeration*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedEnumeration* imp = static_cast<SVGAnimatedEnumeration*>(static_cast<JSSVGAnimatedEnumeration*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedEnumeration* imp = static_cast<SVGAnimatedEnumeration*>(castedThis->impl()); return jsNumber(exec, imp->baseVal()); } JSValue jsSVGAnimatedEnumerationAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedEnumeration* castedThis = static_cast<JSSVGAnimatedEnumeration*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedEnumeration* imp = static_cast<SVGAnimatedEnumeration*>(static_cast<JSSVGAnimatedEnumeration*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedEnumeration* imp = static_cast<SVGAnimatedEnumeration*>(castedThis->impl()); return jsNumber(exec, imp->animVal()); } @@ -121,9 +122,9 @@ void setJSSVGAnimatedEnumerationBaseVal(ExecState* exec, JSObject* thisObject, J static_cast<JSSVGAnimatedEnumeration*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGAnimatedEnumeration*>(thisObject)->impl()->associatedAttributeName()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedEnumeration* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedEnumeration* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedEnumeration>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedEnumeration>(exec, globalObject, object, context); } SVGAnimatedEnumeration* toSVGAnimatedEnumeration(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.h index b02118390b..20403abb4a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedEnumeration : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedEnumeration : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedEnumeration(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedEnumeration>, SVGElement* context); + JSSVGAnimatedEnumeration(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedEnumeration>, SVGElement* context); virtual ~JSSVGAnimatedEnumeration(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,14 +48,12 @@ public: } SVGAnimatedEnumeration* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedEnumeration > m_impl; + RefPtr<SVGAnimatedEnumeration> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedEnumeration*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedEnumeration*, SVGElement* context); SVGAnimatedEnumeration* toSVGAnimatedEnumeration(JSC::JSValue); class JSSVGAnimatedEnumerationPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp index 8228409133..6602bcd847 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp @@ -72,9 +72,8 @@ JSObject* JSSVGAnimatedIntegerPrototype::self(ExecState* exec, JSGlobalObject* g const ClassInfo JSSVGAnimatedInteger::s_info = { "SVGAnimatedInteger", 0, &JSSVGAnimatedIntegerTable, 0 }; -JSSVGAnimatedInteger::JSSVGAnimatedInteger(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedInteger> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedInteger::JSSVGAnimatedInteger(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedInteger> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -96,15 +95,17 @@ bool JSSVGAnimatedInteger::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGAnimatedIntegerBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedInteger* castedThis = static_cast<JSSVGAnimatedInteger*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedInteger* imp = static_cast<SVGAnimatedInteger*>(static_cast<JSSVGAnimatedInteger*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedInteger* imp = static_cast<SVGAnimatedInteger*>(castedThis->impl()); return jsNumber(exec, imp->baseVal()); } JSValue jsSVGAnimatedIntegerAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedInteger* castedThis = static_cast<JSSVGAnimatedInteger*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedInteger* imp = static_cast<SVGAnimatedInteger*>(static_cast<JSSVGAnimatedInteger*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedInteger* imp = static_cast<SVGAnimatedInteger*>(castedThis->impl()); return jsNumber(exec, imp->animVal()); } @@ -121,9 +122,9 @@ void setJSSVGAnimatedIntegerBaseVal(ExecState* exec, JSObject* thisObject, JSVal static_cast<JSSVGAnimatedInteger*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGAnimatedInteger*>(thisObject)->impl()->associatedAttributeName()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedInteger* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedInteger* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedInteger>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedInteger>(exec, globalObject, object, context); } SVGAnimatedInteger* toSVGAnimatedInteger(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.h index 34947f0b5a..9045693e0b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedInteger : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedInteger : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedInteger(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedInteger>, SVGElement* context); + JSSVGAnimatedInteger(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedInteger>, SVGElement* context); virtual ~JSSVGAnimatedInteger(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,14 +48,12 @@ public: } SVGAnimatedInteger* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedInteger > m_impl; + RefPtr<SVGAnimatedInteger> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedInteger*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedInteger*, SVGElement* context); SVGAnimatedInteger* toSVGAnimatedInteger(JSC::JSValue); class JSSVGAnimatedIntegerPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp index e680aea11b..bcc5a818b0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp @@ -72,9 +72,8 @@ JSObject* JSSVGAnimatedLengthPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSSVGAnimatedLength::s_info = { "SVGAnimatedLength", 0, &JSSVGAnimatedLengthTable, 0 }; -JSSVGAnimatedLength::JSSVGAnimatedLength(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedLength> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedLength::JSSVGAnimatedLength(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedLength> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -96,21 +95,23 @@ bool JSSVGAnimatedLength::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGAnimatedLengthBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedLength* castedThis = static_cast<JSSVGAnimatedLength*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedLength* imp = static_cast<SVGAnimatedLength*>(static_cast<JSSVGAnimatedLength*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGDynamicPODTypeWrapperCache<SVGLength, SVGAnimatedLength>::lookupOrCreateWrapper(imp, &SVGAnimatedLength::baseVal, &SVGAnimatedLength::setBaseVal).get(), static_cast<JSSVGAnimatedLength*>(asObject(slot.slotBase()))->context()); + SVGAnimatedLength* imp = static_cast<SVGAnimatedLength*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGDynamicPODTypeWrapperCache<SVGLength, SVGAnimatedLength>::lookupOrCreateWrapper(imp, &SVGAnimatedLength::baseVal, &SVGAnimatedLength::setBaseVal).get(), castedThis->context()); } JSValue jsSVGAnimatedLengthAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedLength* castedThis = static_cast<JSSVGAnimatedLength*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedLength* imp = static_cast<SVGAnimatedLength*>(static_cast<JSSVGAnimatedLength*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGDynamicPODTypeWrapperCache<SVGLength, SVGAnimatedLength>::lookupOrCreateWrapper(imp, &SVGAnimatedLength::animVal, &SVGAnimatedLength::setAnimVal).get(), static_cast<JSSVGAnimatedLength*>(asObject(slot.slotBase()))->context()); + SVGAnimatedLength* imp = static_cast<SVGAnimatedLength*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGDynamicPODTypeWrapperCache<SVGLength, SVGAnimatedLength>::lookupOrCreateWrapper(imp, &SVGAnimatedLength::animVal, &SVGAnimatedLength::setAnimVal).get(), castedThis->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedLength* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedLength* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedLength>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedLength>(exec, globalObject, object, context); } SVGAnimatedLength* toSVGAnimatedLength(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.h index 430d78bda3..7e3ba122a1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedLength : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedLength : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedLength(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedLength>, SVGElement* context); + JSSVGAnimatedLength(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedLength>, SVGElement* context); virtual ~JSSVGAnimatedLength(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,12 @@ public: } SVGAnimatedLength* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedLength > m_impl; + RefPtr<SVGAnimatedLength> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedLength*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedLength*, SVGElement* context); SVGAnimatedLength* toSVGAnimatedLength(JSC::JSValue); class JSSVGAnimatedLengthPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp index f6bf5143f3..6dc24abcf2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp @@ -73,9 +73,8 @@ JSObject* JSSVGAnimatedLengthListPrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSSVGAnimatedLengthList::s_info = { "SVGAnimatedLengthList", 0, &JSSVGAnimatedLengthListTable, 0 }; -JSSVGAnimatedLengthList::JSSVGAnimatedLengthList(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedLengthList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedLengthList::JSSVGAnimatedLengthList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedLengthList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -97,21 +96,23 @@ bool JSSVGAnimatedLengthList::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsSVGAnimatedLengthListBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedLengthList* castedThis = static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedLengthList* imp = static_cast<SVGAnimatedLengthList*>(static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->baseVal()), static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()))->context()); + SVGAnimatedLengthList* imp = static_cast<SVGAnimatedLengthList*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->baseVal()), castedThis->context()); } JSValue jsSVGAnimatedLengthListAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedLengthList* castedThis = static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedLengthList* imp = static_cast<SVGAnimatedLengthList*>(static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animVal()), static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()))->context()); + SVGAnimatedLengthList* imp = static_cast<SVGAnimatedLengthList*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->animVal()), castedThis->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedLengthList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedLengthList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedLengthList>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedLengthList>(exec, globalObject, object, context); } SVGAnimatedLengthList* toSVGAnimatedLengthList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.h index bd19ac9ae9..288ccfcf0e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedLengthList : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedLengthList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedLengthList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedLengthList>, SVGElement* context); + JSSVGAnimatedLengthList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedLengthList>, SVGElement* context); virtual ~JSSVGAnimatedLengthList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,12 @@ public: } SVGAnimatedLengthList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedLengthList > m_impl; + RefPtr<SVGAnimatedLengthList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedLengthList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedLengthList*, SVGElement* context); SVGAnimatedLengthList* toSVGAnimatedLengthList(JSC::JSValue); class JSSVGAnimatedLengthListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp index 232b0850f5..9081e47c1a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp @@ -72,9 +72,8 @@ JSObject* JSSVGAnimatedNumberPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSSVGAnimatedNumber::s_info = { "SVGAnimatedNumber", 0, &JSSVGAnimatedNumberTable, 0 }; -JSSVGAnimatedNumber::JSSVGAnimatedNumber(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedNumber> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedNumber::JSSVGAnimatedNumber(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedNumber> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -96,15 +95,17 @@ bool JSSVGAnimatedNumber::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGAnimatedNumberBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedNumber* castedThis = static_cast<JSSVGAnimatedNumber*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedNumber* imp = static_cast<SVGAnimatedNumber*>(static_cast<JSSVGAnimatedNumber*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedNumber* imp = static_cast<SVGAnimatedNumber*>(castedThis->impl()); return jsNumber(exec, imp->baseVal()); } JSValue jsSVGAnimatedNumberAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedNumber* castedThis = static_cast<JSSVGAnimatedNumber*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedNumber* imp = static_cast<SVGAnimatedNumber*>(static_cast<JSSVGAnimatedNumber*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedNumber* imp = static_cast<SVGAnimatedNumber*>(castedThis->impl()); return jsNumber(exec, imp->animVal()); } @@ -121,9 +122,9 @@ void setJSSVGAnimatedNumberBaseVal(ExecState* exec, JSObject* thisObject, JSValu static_cast<JSSVGAnimatedNumber*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGAnimatedNumber*>(thisObject)->impl()->associatedAttributeName()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedNumber* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedNumber* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedNumber>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedNumber>(exec, globalObject, object, context); } SVGAnimatedNumber* toSVGAnimatedNumber(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.h index 77f77a6f1b..eab38884fe 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedNumber : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedNumber : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedNumber(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedNumber>, SVGElement* context); + JSSVGAnimatedNumber(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedNumber>, SVGElement* context); virtual ~JSSVGAnimatedNumber(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,14 +48,12 @@ public: } SVGAnimatedNumber* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedNumber > m_impl; + RefPtr<SVGAnimatedNumber> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedNumber*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedNumber*, SVGElement* context); SVGAnimatedNumber* toSVGAnimatedNumber(JSC::JSValue); class JSSVGAnimatedNumberPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp index c782499be6..224936f4cb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp @@ -73,9 +73,8 @@ JSObject* JSSVGAnimatedNumberListPrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSSVGAnimatedNumberList::s_info = { "SVGAnimatedNumberList", 0, &JSSVGAnimatedNumberListTable, 0 }; -JSSVGAnimatedNumberList::JSSVGAnimatedNumberList(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedNumberList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedNumberList::JSSVGAnimatedNumberList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedNumberList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -97,21 +96,23 @@ bool JSSVGAnimatedNumberList::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsSVGAnimatedNumberListBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedNumberList* castedThis = static_cast<JSSVGAnimatedNumberList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedNumberList* imp = static_cast<SVGAnimatedNumberList*>(static_cast<JSSVGAnimatedNumberList*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->baseVal()), static_cast<JSSVGAnimatedNumberList*>(asObject(slot.slotBase()))->context()); + SVGAnimatedNumberList* imp = static_cast<SVGAnimatedNumberList*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->baseVal()), castedThis->context()); } JSValue jsSVGAnimatedNumberListAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedNumberList* castedThis = static_cast<JSSVGAnimatedNumberList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedNumberList* imp = static_cast<SVGAnimatedNumberList*>(static_cast<JSSVGAnimatedNumberList*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animVal()), static_cast<JSSVGAnimatedNumberList*>(asObject(slot.slotBase()))->context()); + SVGAnimatedNumberList* imp = static_cast<SVGAnimatedNumberList*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->animVal()), castedThis->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedNumberList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedNumberList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedNumberList>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedNumberList>(exec, globalObject, object, context); } SVGAnimatedNumberList* toSVGAnimatedNumberList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.h index bc1c751d6d..c37905ca74 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedNumberList : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedNumberList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedNumberList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedNumberList>, SVGElement* context); + JSSVGAnimatedNumberList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedNumberList>, SVGElement* context); virtual ~JSSVGAnimatedNumberList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,12 @@ public: } SVGAnimatedNumberList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedNumberList > m_impl; + RefPtr<SVGAnimatedNumberList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedNumberList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedNumberList*, SVGElement* context); SVGAnimatedNumberList* toSVGAnimatedNumberList(JSC::JSValue); class JSSVGAnimatedNumberListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp index 6fd809c65d..6a602c4043 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp @@ -73,9 +73,8 @@ JSObject* JSSVGAnimatedPreserveAspectRatioPrototype::self(ExecState* exec, JSGlo const ClassInfo JSSVGAnimatedPreserveAspectRatio::s_info = { "SVGAnimatedPreserveAspectRatio", 0, &JSSVGAnimatedPreserveAspectRatioTable, 0 }; -JSSVGAnimatedPreserveAspectRatio::JSSVGAnimatedPreserveAspectRatio(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedPreserveAspectRatio> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedPreserveAspectRatio::JSSVGAnimatedPreserveAspectRatio(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedPreserveAspectRatio> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -97,21 +96,23 @@ bool JSSVGAnimatedPreserveAspectRatio::getOwnPropertySlot(ExecState* exec, const JSValue jsSVGAnimatedPreserveAspectRatioBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedPreserveAspectRatio* castedThis = static_cast<JSSVGAnimatedPreserveAspectRatio*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedPreserveAspectRatio* imp = static_cast<SVGAnimatedPreserveAspectRatio*>(static_cast<JSSVGAnimatedPreserveAspectRatio*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->baseVal()), static_cast<JSSVGAnimatedPreserveAspectRatio*>(asObject(slot.slotBase()))->context()); + SVGAnimatedPreserveAspectRatio* imp = static_cast<SVGAnimatedPreserveAspectRatio*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->baseVal()), castedThis->context()); } JSValue jsSVGAnimatedPreserveAspectRatioAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedPreserveAspectRatio* castedThis = static_cast<JSSVGAnimatedPreserveAspectRatio*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedPreserveAspectRatio* imp = static_cast<SVGAnimatedPreserveAspectRatio*>(static_cast<JSSVGAnimatedPreserveAspectRatio*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animVal()), static_cast<JSSVGAnimatedPreserveAspectRatio*>(asObject(slot.slotBase()))->context()); + SVGAnimatedPreserveAspectRatio* imp = static_cast<SVGAnimatedPreserveAspectRatio*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->animVal()), castedThis->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedPreserveAspectRatio* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedPreserveAspectRatio* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedPreserveAspectRatio>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedPreserveAspectRatio>(exec, globalObject, object, context); } SVGAnimatedPreserveAspectRatio* toSVGAnimatedPreserveAspectRatio(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.h index 3a36ff9f5b..172691a333 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedPreserveAspectRatio : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedPreserveAspectRatio : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedPreserveAspectRatio(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedPreserveAspectRatio>, SVGElement* context); + JSSVGAnimatedPreserveAspectRatio(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedPreserveAspectRatio>, SVGElement* context); virtual ~JSSVGAnimatedPreserveAspectRatio(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,12 @@ public: } SVGAnimatedPreserveAspectRatio* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedPreserveAspectRatio > m_impl; + RefPtr<SVGAnimatedPreserveAspectRatio> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedPreserveAspectRatio*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedPreserveAspectRatio*, SVGElement* context); SVGAnimatedPreserveAspectRatio* toSVGAnimatedPreserveAspectRatio(JSC::JSValue); class JSSVGAnimatedPreserveAspectRatioPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp index 8d8a4da4d4..34bd262ff9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp @@ -73,9 +73,8 @@ JSObject* JSSVGAnimatedRectPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSSVGAnimatedRect::s_info = { "SVGAnimatedRect", 0, &JSSVGAnimatedRectTable, 0 }; -JSSVGAnimatedRect::JSSVGAnimatedRect(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedRect> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedRect::JSSVGAnimatedRect(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedRect> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -97,21 +96,23 @@ bool JSSVGAnimatedRect::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsSVGAnimatedRectBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedRect* castedThis = static_cast<JSSVGAnimatedRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedRect* imp = static_cast<SVGAnimatedRect*>(static_cast<JSSVGAnimatedRect*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGDynamicPODTypeWrapperCache<FloatRect, SVGAnimatedRect>::lookupOrCreateWrapper(imp, &SVGAnimatedRect::baseVal, &SVGAnimatedRect::setBaseVal).get(), static_cast<JSSVGAnimatedRect*>(asObject(slot.slotBase()))->context()); + SVGAnimatedRect* imp = static_cast<SVGAnimatedRect*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGDynamicPODTypeWrapperCache<FloatRect, SVGAnimatedRect>::lookupOrCreateWrapper(imp, &SVGAnimatedRect::baseVal, &SVGAnimatedRect::setBaseVal).get(), castedThis->context()); } JSValue jsSVGAnimatedRectAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedRect* castedThis = static_cast<JSSVGAnimatedRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedRect* imp = static_cast<SVGAnimatedRect*>(static_cast<JSSVGAnimatedRect*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGDynamicPODTypeWrapperCache<FloatRect, SVGAnimatedRect>::lookupOrCreateWrapper(imp, &SVGAnimatedRect::animVal, &SVGAnimatedRect::setAnimVal).get(), static_cast<JSSVGAnimatedRect*>(asObject(slot.slotBase()))->context()); + SVGAnimatedRect* imp = static_cast<SVGAnimatedRect*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGDynamicPODTypeWrapperCache<FloatRect, SVGAnimatedRect>::lookupOrCreateWrapper(imp, &SVGAnimatedRect::animVal, &SVGAnimatedRect::setAnimVal).get(), castedThis->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedRect* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedRect* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedRect>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedRect>(exec, globalObject, object, context); } SVGAnimatedRect* toSVGAnimatedRect(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.h index 00c9ffa7e4..c71c0b3014 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedRect : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedRect : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedRect(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedRect>, SVGElement* context); + JSSVGAnimatedRect(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedRect>, SVGElement* context); virtual ~JSSVGAnimatedRect(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,12 @@ public: } SVGAnimatedRect* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedRect > m_impl; + RefPtr<SVGAnimatedRect> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedRect*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedRect*, SVGElement* context); SVGAnimatedRect* toSVGAnimatedRect(JSC::JSValue); class JSSVGAnimatedRectPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp index cfcebf0332..52c8129190 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp @@ -74,9 +74,8 @@ JSObject* JSSVGAnimatedStringPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSSVGAnimatedString::s_info = { "SVGAnimatedString", 0, &JSSVGAnimatedStringTable, 0 }; -JSSVGAnimatedString::JSSVGAnimatedString(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedString> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedString::JSSVGAnimatedString(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedString> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -98,15 +97,17 @@ bool JSSVGAnimatedString::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGAnimatedStringBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedString* castedThis = static_cast<JSSVGAnimatedString*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedString* imp = static_cast<SVGAnimatedString*>(static_cast<JSSVGAnimatedString*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedString* imp = static_cast<SVGAnimatedString*>(castedThis->impl()); return jsString(exec, imp->baseVal()); } JSValue jsSVGAnimatedStringAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedString* castedThis = static_cast<JSSVGAnimatedString*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedString* imp = static_cast<SVGAnimatedString*>(static_cast<JSSVGAnimatedString*>(asObject(slot.slotBase()))->impl()); + SVGAnimatedString* imp = static_cast<SVGAnimatedString*>(castedThis->impl()); return jsString(exec, imp->animVal()); } @@ -123,9 +124,9 @@ void setJSSVGAnimatedStringBaseVal(ExecState* exec, JSObject* thisObject, JSValu static_cast<JSSVGAnimatedString*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGAnimatedString*>(thisObject)->impl()->associatedAttributeName()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedString* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedString* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedString>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedString>(exec, globalObject, object, context); } SVGAnimatedString* toSVGAnimatedString(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.h index c7fd6dbc5d..6380728b85 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedString : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedString : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedString(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedString>, SVGElement* context); + JSSVGAnimatedString(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedString>, SVGElement* context); virtual ~JSSVGAnimatedString(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,14 +48,12 @@ public: } SVGAnimatedString* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedString > m_impl; + RefPtr<SVGAnimatedString> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedString*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedString*, SVGElement* context); SVGAnimatedString* toSVGAnimatedString(JSC::JSValue); class JSSVGAnimatedStringPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp index 80d48c9d0a..077f379737 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp @@ -73,9 +73,8 @@ JSObject* JSSVGAnimatedTransformListPrototype::self(ExecState* exec, JSGlobalObj const ClassInfo JSSVGAnimatedTransformList::s_info = { "SVGAnimatedTransformList", 0, &JSSVGAnimatedTransformListTable, 0 }; -JSSVGAnimatedTransformList::JSSVGAnimatedTransformList(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedTransformList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGAnimatedTransformList::JSSVGAnimatedTransformList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedTransformList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -97,21 +96,23 @@ bool JSSVGAnimatedTransformList::getOwnPropertySlot(ExecState* exec, const Ident JSValue jsSVGAnimatedTransformListBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedTransformList* castedThis = static_cast<JSSVGAnimatedTransformList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedTransformList* imp = static_cast<SVGAnimatedTransformList*>(static_cast<JSSVGAnimatedTransformList*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->baseVal()), static_cast<JSSVGAnimatedTransformList*>(asObject(slot.slotBase()))->context()); + SVGAnimatedTransformList* imp = static_cast<SVGAnimatedTransformList*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->baseVal()), castedThis->context()); } JSValue jsSVGAnimatedTransformListAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimatedTransformList* castedThis = static_cast<JSSVGAnimatedTransformList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimatedTransformList* imp = static_cast<SVGAnimatedTransformList*>(static_cast<JSSVGAnimatedTransformList*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animVal()), static_cast<JSSVGAnimatedTransformList*>(asObject(slot.slotBase()))->context()); + SVGAnimatedTransformList* imp = static_cast<SVGAnimatedTransformList*>(castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->animVal()), castedThis->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGAnimatedTransformList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedTransformList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGAnimatedTransformList>(exec, object, context); + return getDOMObjectWrapper<JSSVGAnimatedTransformList>(exec, globalObject, object, context); } SVGAnimatedTransformList* toSVGAnimatedTransformList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.h index eb129ef306..358905c4af 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -30,10 +31,10 @@ namespace WebCore { -class JSSVGAnimatedTransformList : public DOMObject { - typedef DOMObject Base; +class JSSVGAnimatedTransformList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGAnimatedTransformList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimatedTransformList>, SVGElement* context); + JSSVGAnimatedTransformList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimatedTransformList>, SVGElement* context); virtual ~JSSVGAnimatedTransformList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,12 @@ public: } SVGAnimatedTransformList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGAnimatedTransformList > m_impl; + RefPtr<SVGAnimatedTransformList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGAnimatedTransformList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGAnimatedTransformList*, SVGElement* context); SVGAnimatedTransformList* toSVGAnimatedTransformList(JSC::JSValue); class JSSVGAnimatedTransformListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp index 70fc7b33da..48a51e4b80 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp @@ -95,8 +95,8 @@ bool JSSVGAnimationElementPrototype::getOwnPropertySlot(ExecState* exec, const I const ClassInfo JSSVGAnimationElement::s_info = { "SVGAnimationElement", &JSSVGElement::s_info, &JSSVGAnimationElementTable, 0 }; -JSSVGAnimationElement::JSSVGAnimationElement(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimationElement> impl) - : JSSVGElement(structure, impl) +JSSVGAnimationElement::JSSVGAnimationElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimationElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -112,38 +112,43 @@ bool JSSVGAnimationElement::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsSVGAnimationElementTargetElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimationElement* castedThis = static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->targetElement())); + SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->targetElement())); } JSValue jsSVGAnimationElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimationElement* castedThis = static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGAnimationElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimationElement* castedThis = static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGAnimationElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimationElement* castedThis = static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGAnimationElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGAnimationElement* castedThis = static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(static_cast<JSSVGAnimationElement*>(asObject(slot.slotBase()))->impl()); + SVGAnimationElement* imp = static_cast<SVGAnimationElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue JSC_HOST_CALL jsSVGAnimationElementPrototypeFunctionGetStartTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.h index 989c0d047f..4a48a7bbe8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.h @@ -33,7 +33,7 @@ class SVGAnimationElement; class JSSVGAnimationElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGAnimationElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGAnimationElement>); + JSSVGAnimationElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGAnimationElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp index a487e9c806..92213c79bc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp @@ -113,8 +113,8 @@ bool JSSVGCircleElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSSVGCircleElement::s_info = { "SVGCircleElement", &JSSVGElement::s_info, &JSSVGCircleElementTable, 0 }; -JSSVGCircleElement::JSSVGCircleElement(PassRefPtr<Structure> structure, PassRefPtr<SVGCircleElement> impl) - : JSSVGElement(structure, impl) +JSSVGCircleElement::JSSVGCircleElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGCircleElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -130,106 +130,120 @@ bool JSSVGCircleElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGCircleElementCx(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->cxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCircleElementCy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->cyAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCircleElementR(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->rAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCircleElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGCircleElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGCircleElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGCircleElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGCircleElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGCircleElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCircleElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCircleElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGCircleElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCircleElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGCircleElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCircleElement* castedThis = static_cast<JSSVGCircleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCircleElement* imp = static_cast<SVGCircleElement*>(static_cast<JSSVGCircleElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGCircleElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -273,7 +287,7 @@ JSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetPresentationAttribut const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -286,7 +300,7 @@ JSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetBBox(ExecState* exec SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -299,7 +313,7 @@ JSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetCTM(ExecState* exec, SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -312,7 +326,7 @@ JSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetScreenCTM(ExecState* SVGCircleElement* imp = static_cast<SVGCircleElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -327,7 +341,7 @@ JSValue JSC_HOST_CALL jsSVGCircleElementPrototypeFunctionGetTransformToElement(E SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.h index 8c9acda5e0..6dfad23fc2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.h @@ -33,7 +33,7 @@ class SVGCircleElement; class JSSVGCircleElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGCircleElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGCircleElement>); + JSSVGCircleElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGCircleElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp index 5adfdb9c6a..c67ced4ce6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp @@ -111,8 +111,8 @@ bool JSSVGClipPathElementPrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSSVGClipPathElement::s_info = { "SVGClipPathElement", &JSSVGElement::s_info, &JSSVGClipPathElementTable, 0 }; -JSSVGClipPathElement::JSSVGClipPathElement(PassRefPtr<Structure> structure, PassRefPtr<SVGClipPathElement> impl) - : JSSVGElement(structure, impl) +JSSVGClipPathElement::JSSVGClipPathElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGClipPathElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -128,90 +128,102 @@ bool JSSVGClipPathElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGClipPathElementClipPathUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->clipPathUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGClipPathElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGClipPathElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGClipPathElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGClipPathElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGClipPathElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGClipPathElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGClipPathElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGClipPathElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGClipPathElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGClipPathElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGClipPathElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGClipPathElement* castedThis = static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(static_cast<JSSVGClipPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGClipPathElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -255,7 +267,7 @@ JSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetPresentationAttrib const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -268,7 +280,7 @@ JSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetBBox(ExecState* ex SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -281,7 +293,7 @@ JSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetCTM(ExecState* exe SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -294,7 +306,7 @@ JSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetScreenCTM(ExecStat SVGClipPathElement* imp = static_cast<SVGClipPathElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -309,7 +321,7 @@ JSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetTransformToElement SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.h index b4a44cffa8..b27abca22b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.h @@ -33,7 +33,7 @@ class SVGClipPathElement; class JSSVGClipPathElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGClipPathElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGClipPathElement>); + JSSVGClipPathElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGClipPathElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp index 97ea35b06a..59c2549cb9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp @@ -25,6 +25,7 @@ #include "JSSVGColor.h" #include "JSRGBColor.h" +#include "RGBColor.h" #include "SVGColor.h" #include <runtime/Error.h> #include <runtime/JSNumberCell.h> @@ -71,12 +72,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGColorConstructorTable = { 8, 7, JSSVGColorConstructorTableValues, 0 }; #endif -class JSSVGColorConstructor : public DOMObject { +class JSSVGColorConstructor : public DOMConstructorObject { public: - JSSVGColorConstructor(ExecState* exec) - : DOMObject(JSSVGColorConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGColorConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGColorConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGColorPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGColorPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -130,8 +131,8 @@ bool JSSVGColorPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSSVGColor::s_info = { "SVGColor", &JSCSSValue::s_info, &JSSVGColorTable, 0 }; -JSSVGColor::JSSVGColor(PassRefPtr<Structure> structure, PassRefPtr<SVGColor> impl) - : JSCSSValue(structure, impl) +JSSVGColor::JSSVGColor(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGColor> impl) + : JSCSSValue(structure, globalObject, impl) { } @@ -147,25 +148,28 @@ bool JSSVGColor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsSVGColorColorType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGColor* castedThis = static_cast<JSSVGColor*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGColor* imp = static_cast<SVGColor*>(static_cast<JSSVGColor*>(asObject(slot.slotBase()))->impl()); + SVGColor* imp = static_cast<SVGColor*>(castedThis->impl()); return jsNumber(exec, imp->colorType()); } JSValue jsSVGColorRgbColor(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGColor* castedThis = static_cast<JSSVGColor*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGColor* imp = static_cast<SVGColor*>(static_cast<JSSVGColor*>(asObject(slot.slotBase()))->impl()); - return getJSRGBColor(exec, imp->rgbColor()); + SVGColor* imp = static_cast<SVGColor*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->rgbColor())); } JSValue jsSVGColorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGColor*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGColor* domObject = static_cast<JSSVGColor*>(asObject(slot.slotBase())); + return JSSVGColor::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGColor::getConstructor(ExecState* exec) +JSValue JSSVGColor::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGColorConstructor>(exec); + return getDOMConstructor<JSSVGColorConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGColorPrototypeFunctionSetRGBColor(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGColor.h b/src/3rdparty/webkit/WebCore/generated/JSSVGColor.h index 43baabb3e4..9161bfcfc4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGColor.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGColor.h @@ -33,7 +33,7 @@ class SVGColor; class JSSVGColor : public JSCSSValue { typedef JSCSSValue Base; public: - JSSVGColor(PassRefPtr<JSC::Structure>, PassRefPtr<SVGColor>); + JSSVGColor(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGColor>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp index 3fc9adca09..be144bbd73 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp @@ -78,12 +78,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGComponentTransferFunctionElementConstr { 17, 15, JSSVGComponentTransferFunctionElementConstructorTableValues, 0 }; #endif -class JSSVGComponentTransferFunctionElementConstructor : public DOMObject { +class JSSVGComponentTransferFunctionElementConstructor : public DOMConstructorObject { public: - JSSVGComponentTransferFunctionElementConstructor(ExecState* exec) - : DOMObject(JSSVGComponentTransferFunctionElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGComponentTransferFunctionElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGComponentTransferFunctionElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGComponentTransferFunctionElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGComponentTransferFunctionElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -136,8 +136,8 @@ bool JSSVGComponentTransferFunctionElementPrototype::getOwnPropertySlot(ExecStat const ClassInfo JSSVGComponentTransferFunctionElement::s_info = { "SVGComponentTransferFunctionElement", &JSSVGElement::s_info, &JSSVGComponentTransferFunctionElementTable, 0 }; -JSSVGComponentTransferFunctionElement::JSSVGComponentTransferFunctionElement(PassRefPtr<Structure> structure, PassRefPtr<SVGComponentTransferFunctionElement> impl) - : JSSVGElement(structure, impl) +JSSVGComponentTransferFunctionElement::JSSVGComponentTransferFunctionElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGComponentTransferFunctionElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -153,67 +153,75 @@ bool JSSVGComponentTransferFunctionElement::getOwnPropertySlot(ExecState* exec, JSValue jsSVGComponentTransferFunctionElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase()))->impl()); + SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->typeAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGComponentTransferFunctionElementTableValues(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase()))->impl()); + SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumberList> obj = imp->tableValuesAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGComponentTransferFunctionElementSlope(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase()))->impl()); + SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->slopeAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGComponentTransferFunctionElementIntercept(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase()))->impl()); + SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->interceptAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGComponentTransferFunctionElementAmplitude(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase()))->impl()); + SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->amplitudeAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGComponentTransferFunctionElementExponent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase()))->impl()); + SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->exponentAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGComponentTransferFunctionElementOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase()))->impl()); + SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->offsetAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGComponentTransferFunctionElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGComponentTransferFunctionElement* domObject = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slot.slotBase())); + return JSSVGComponentTransferFunctionElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGComponentTransferFunctionElement::getConstructor(ExecState* exec) +JSValue JSSVGComponentTransferFunctionElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGComponentTransferFunctionElementConstructor>(exec); + return getDOMConstructor<JSSVGComponentTransferFunctionElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.h index 6576e322ad..6cc0d9ea99 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.h @@ -33,7 +33,7 @@ class SVGComponentTransferFunctionElement; class JSSVGComponentTransferFunctionElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGComponentTransferFunctionElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGComponentTransferFunctionElement>); + JSSVGComponentTransferFunctionElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGComponentTransferFunctionElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp index c38cb5b62d..ed175417d8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp @@ -89,8 +89,8 @@ bool JSSVGCursorElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSSVGCursorElement::s_info = { "SVGCursorElement", &JSSVGElement::s_info, &JSSVGCursorElementTable, 0 }; -JSSVGCursorElement::JSSVGCursorElement(PassRefPtr<Structure> structure, PassRefPtr<SVGCursorElement> impl) - : JSSVGElement(structure, impl) +JSSVGCursorElement::JSSVGCursorElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGCursorElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -106,55 +106,62 @@ bool JSSVGCursorElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGCursorElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCursorElement* imp = static_cast<SVGCursorElement*>(static_cast<JSSVGCursorElement*>(asObject(slot.slotBase()))->impl()); + SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCursorElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCursorElement* imp = static_cast<SVGCursorElement*>(static_cast<JSSVGCursorElement*>(asObject(slot.slotBase()))->impl()); + SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCursorElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCursorElement* imp = static_cast<SVGCursorElement*>(static_cast<JSSVGCursorElement*>(asObject(slot.slotBase()))->impl()); + SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGCursorElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCursorElement* imp = static_cast<SVGCursorElement*>(static_cast<JSSVGCursorElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGCursorElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCursorElement* imp = static_cast<SVGCursorElement*>(static_cast<JSSVGCursorElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGCursorElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCursorElement* imp = static_cast<SVGCursorElement*>(static_cast<JSSVGCursorElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGCursorElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGCursorElement* imp = static_cast<SVGCursorElement*>(static_cast<JSSVGCursorElement*>(asObject(slot.slotBase()))->impl()); + SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue JSC_HOST_CALL jsSVGCursorElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.h index 3771090718..81921c4eb4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.h @@ -33,7 +33,7 @@ class SVGCursorElement; class JSSVGCursorElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGCursorElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGCursorElement>); + JSSVGCursorElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGCursorElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp index 207bbe72da..9550465b8a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGDefinitionSrcElementPrototype::self(ExecState* exec, JSGlobalObje const ClassInfo JSSVGDefinitionSrcElement::s_info = { "SVGDefinitionSrcElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGDefinitionSrcElement::JSSVGDefinitionSrcElement(PassRefPtr<Structure> structure, PassRefPtr<SVGDefinitionSrcElement> impl) - : JSSVGElement(structure, impl) +JSSVGDefinitionSrcElement::JSSVGDefinitionSrcElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGDefinitionSrcElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.h index 9997f52100..2afb3e9628 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.h @@ -33,7 +33,7 @@ class SVGDefinitionSrcElement; class JSSVGDefinitionSrcElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGDefinitionSrcElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGDefinitionSrcElement>); + JSSVGDefinitionSrcElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGDefinitionSrcElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp index dd87211542..f5e8ac78c7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp @@ -109,8 +109,8 @@ bool JSSVGDefsElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGDefsElement::s_info = { "SVGDefsElement", &JSSVGElement::s_info, &JSSVGDefsElementTable, 0 }; -JSSVGDefsElement::JSSVGDefsElement(PassRefPtr<Structure> structure, PassRefPtr<SVGDefsElement> impl) - : JSSVGElement(structure, impl) +JSSVGDefsElement::JSSVGDefsElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGDefsElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -126,82 +126,93 @@ bool JSSVGDefsElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGDefsElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGDefsElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGDefsElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGDefsElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGDefsElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGDefsElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGDefsElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGDefsElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGDefsElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGDefsElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGDefsElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDefsElement* imp = static_cast<SVGDefsElement*>(static_cast<JSSVGDefsElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGDefsElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -245,7 +256,7 @@ JSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetPresentationAttribute( const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -258,7 +269,7 @@ JSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetBBox(ExecState* exec, SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -271,7 +282,7 @@ JSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetCTM(ExecState* exec, J SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -284,7 +295,7 @@ JSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetScreenCTM(ExecState* e SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -299,7 +310,7 @@ JSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetTransformToElement(Exe SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.h index e4fa8b5470..b96022645e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.h @@ -33,7 +33,7 @@ class SVGDefsElement; class JSSVGDefsElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGDefsElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGDefsElement>); + JSSVGDefsElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGDefsElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp index 77be621992..55ab0556cb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp @@ -89,8 +89,8 @@ bool JSSVGDescElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGDescElement::s_info = { "SVGDescElement", &JSSVGElement::s_info, &JSSVGDescElementTable, 0 }; -JSSVGDescElement::JSSVGDescElement(PassRefPtr<Structure> structure, PassRefPtr<SVGDescElement> impl) - : JSSVGElement(structure, impl) +JSSVGDescElement::JSSVGDescElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGDescElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -106,31 +106,35 @@ bool JSSVGDescElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGDescElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDescElement* castedThis = static_cast<JSSVGDescElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDescElement* imp = static_cast<SVGDescElement*>(static_cast<JSSVGDescElement*>(asObject(slot.slotBase()))->impl()); + SVGDescElement* imp = static_cast<SVGDescElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGDescElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDescElement* castedThis = static_cast<JSSVGDescElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDescElement* imp = static_cast<SVGDescElement*>(static_cast<JSSVGDescElement*>(asObject(slot.slotBase()))->impl()); + SVGDescElement* imp = static_cast<SVGDescElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGDescElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDescElement* castedThis = static_cast<JSSVGDescElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDescElement* imp = static_cast<SVGDescElement*>(static_cast<JSSVGDescElement*>(asObject(slot.slotBase()))->impl()); + SVGDescElement* imp = static_cast<SVGDescElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGDescElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDescElement* castedThis = static_cast<JSSVGDescElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDescElement* imp = static_cast<SVGDescElement*>(static_cast<JSSVGDescElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGDescElement* imp = static_cast<SVGDescElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } void JSSVGDescElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -160,7 +164,7 @@ JSValue JSC_HOST_CALL jsSVGDescElementPrototypeFunctionGetPresentationAttribute( const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.h index b8ca101d6d..179d7b3b00 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.h @@ -33,7 +33,7 @@ class SVGDescElement; class JSSVGDescElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGDescElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGDescElement>); + JSSVGDescElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGDescElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp index 6d91ccc034..0e7d8fd083 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp @@ -82,8 +82,8 @@ bool JSSVGDocumentPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSSVGDocument::s_info = { "SVGDocument", &JSDocument::s_info, &JSSVGDocumentTable, 0 }; -JSSVGDocument::JSSVGDocument(PassRefPtr<Structure> structure, PassRefPtr<SVGDocument> impl) - : JSDocument(structure, impl) +JSSVGDocument::JSSVGDocument(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGDocument> impl) + : JSDocument(structure, globalObject, impl) { } @@ -99,9 +99,10 @@ bool JSSVGDocument::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsSVGDocumentRootElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGDocument* castedThis = static_cast<JSSVGDocument*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGDocument* imp = static_cast<SVGDocument*>(static_cast<JSSVGDocument*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->rootElement())); + SVGDocument* imp = static_cast<SVGDocument*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->rootElement())); } JSValue JSC_HOST_CALL jsSVGDocumentPrototypeFunctionCreateEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -115,7 +116,7 @@ JSValue JSC_HOST_CALL jsSVGDocumentPrototypeFunctionCreateEvent(ExecState* exec, const UString& eventType = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createEvent(eventType, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createEvent(eventType, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.h b/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.h index d4bd50e619..8f279c9093 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGDocument.h @@ -33,7 +33,7 @@ class SVGDocument; class JSSVGDocument : public JSDocument { typedef JSDocument Base; public: - JSSVGDocument(PassRefPtr<JSC::Structure>, PassRefPtr<SVGDocument>); + JSSVGDocument(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGDocument>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp index b9e0a2d163..f6a775bb82 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp @@ -79,8 +79,8 @@ JSObject* JSSVGElementPrototype::self(ExecState* exec, JSGlobalObject* globalObj const ClassInfo JSSVGElement::s_info = { "SVGElement", &JSElement::s_info, &JSSVGElementTable, 0 }; -JSSVGElement::JSSVGElement(PassRefPtr<Structure> structure, PassRefPtr<SVGElement> impl) - : JSElement(structure, impl) +JSSVGElement::JSSVGElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> impl) + : JSElement(structure, globalObject, impl) { } @@ -96,30 +96,34 @@ bool JSSVGElement::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsSVGElementId(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElement* castedThis = static_cast<JSSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElement* imp = static_cast<SVGElement*>(static_cast<JSSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGElement* imp = static_cast<SVGElement*>(castedThis->impl()); return jsString(exec, imp->id()); } JSValue jsSVGElementXmlbase(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElement* castedThis = static_cast<JSSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElement* imp = static_cast<SVGElement*>(static_cast<JSSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGElement* imp = static_cast<SVGElement*>(castedThis->impl()); return jsString(exec, imp->xmlbase()); } JSValue jsSVGElementOwnerSVGElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElement* castedThis = static_cast<JSSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElement* imp = static_cast<SVGElement*>(static_cast<JSSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->ownerSVGElement())); + SVGElement* imp = static_cast<SVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->ownerSVGElement())); } JSValue jsSVGElementViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElement* castedThis = static_cast<JSSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElement* imp = static_cast<SVGElement*>(static_cast<JSSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->viewportElement())); + SVGElement* imp = static_cast<SVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->viewportElement())); } void JSSVGElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGElement.h index 7123c7d5d5..cb2ae10629 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElement.h @@ -33,7 +33,7 @@ class SVGElement; class JSSVGElement : public JSElement { typedef JSElement Base; public: - JSSVGElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGElement>); + JSSVGElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp index 560630dbce..979d2acbea 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp @@ -140,8 +140,8 @@ bool JSSVGElementInstancePrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSSVGElementInstance::s_info = { "SVGElementInstance", 0, &JSSVGElementInstanceTable, 0 }; -JSSVGElementInstance::JSSVGElementInstance(PassRefPtr<Structure> structure, PassRefPtr<SVGElementInstance> impl) - : DOMObject(structure) +JSSVGElementInstance::JSSVGElementInstance(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElementInstance> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -163,64 +163,73 @@ bool JSSVGElementInstance::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGElementInstanceCorrespondingElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->correspondingElement())); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->correspondingElement())); } JSValue jsSVGElementInstanceCorrespondingUseElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->correspondingUseElement())); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->correspondingUseElement())); } JSValue jsSVGElementInstanceParentNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parentNode())); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentNode())); } JSValue jsSVGElementInstanceChildNodes(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->childNodes())); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->childNodes())); } JSValue jsSVGElementInstanceFirstChild(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->firstChild())); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->firstChild())); } JSValue jsSVGElementInstanceLastChild(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->lastChild())); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->lastChild())); } JSValue jsSVGElementInstancePreviousSibling(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->previousSibling())); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->previousSibling())); } JSValue jsSVGElementInstanceNextSibling(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nextSibling())); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nextSibling())); } JSValue jsSVGElementInstanceOnabort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onabort()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -230,8 +239,9 @@ JSValue jsSVGElementInstanceOnabort(ExecState* exec, const Identifier&, const Pr JSValue jsSVGElementInstanceOnblur(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onblur()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -241,8 +251,9 @@ JSValue jsSVGElementInstanceOnblur(ExecState* exec, const Identifier&, const Pro JSValue jsSVGElementInstanceOnchange(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onchange()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -252,8 +263,9 @@ JSValue jsSVGElementInstanceOnchange(ExecState* exec, const Identifier&, const P JSValue jsSVGElementInstanceOnclick(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onclick()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -263,8 +275,9 @@ JSValue jsSVGElementInstanceOnclick(ExecState* exec, const Identifier&, const Pr JSValue jsSVGElementInstanceOncontextmenu(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->oncontextmenu()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -274,8 +287,9 @@ JSValue jsSVGElementInstanceOncontextmenu(ExecState* exec, const Identifier&, co JSValue jsSVGElementInstanceOndblclick(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->ondblclick()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -285,8 +299,9 @@ JSValue jsSVGElementInstanceOndblclick(ExecState* exec, const Identifier&, const JSValue jsSVGElementInstanceOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onerror()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -296,8 +311,9 @@ JSValue jsSVGElementInstanceOnerror(ExecState* exec, const Identifier&, const Pr JSValue jsSVGElementInstanceOnfocus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onfocus()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -307,8 +323,9 @@ JSValue jsSVGElementInstanceOnfocus(ExecState* exec, const Identifier&, const Pr JSValue jsSVGElementInstanceOninput(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->oninput()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -318,8 +335,9 @@ JSValue jsSVGElementInstanceOninput(ExecState* exec, const Identifier&, const Pr JSValue jsSVGElementInstanceOnkeydown(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onkeydown()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -329,8 +347,9 @@ JSValue jsSVGElementInstanceOnkeydown(ExecState* exec, const Identifier&, const JSValue jsSVGElementInstanceOnkeypress(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onkeypress()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -340,8 +359,9 @@ JSValue jsSVGElementInstanceOnkeypress(ExecState* exec, const Identifier&, const JSValue jsSVGElementInstanceOnkeyup(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onkeyup()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -351,8 +371,9 @@ JSValue jsSVGElementInstanceOnkeyup(ExecState* exec, const Identifier&, const Pr JSValue jsSVGElementInstanceOnload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -362,8 +383,9 @@ JSValue jsSVGElementInstanceOnload(ExecState* exec, const Identifier&, const Pro JSValue jsSVGElementInstanceOnmousedown(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onmousedown()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -373,8 +395,9 @@ JSValue jsSVGElementInstanceOnmousedown(ExecState* exec, const Identifier&, cons JSValue jsSVGElementInstanceOnmousemove(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onmousemove()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -384,8 +407,9 @@ JSValue jsSVGElementInstanceOnmousemove(ExecState* exec, const Identifier&, cons JSValue jsSVGElementInstanceOnmouseout(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onmouseout()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -395,8 +419,9 @@ JSValue jsSVGElementInstanceOnmouseout(ExecState* exec, const Identifier&, const JSValue jsSVGElementInstanceOnmouseover(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onmouseover()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -406,8 +431,9 @@ JSValue jsSVGElementInstanceOnmouseover(ExecState* exec, const Identifier&, cons JSValue jsSVGElementInstanceOnmouseup(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onmouseup()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -417,8 +443,9 @@ JSValue jsSVGElementInstanceOnmouseup(ExecState* exec, const Identifier&, const JSValue jsSVGElementInstanceOnmousewheel(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onmousewheel()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -428,8 +455,9 @@ JSValue jsSVGElementInstanceOnmousewheel(ExecState* exec, const Identifier&, con JSValue jsSVGElementInstanceOnbeforecut(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onbeforecut()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -439,8 +467,9 @@ JSValue jsSVGElementInstanceOnbeforecut(ExecState* exec, const Identifier&, cons JSValue jsSVGElementInstanceOncut(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->oncut()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -450,8 +479,9 @@ JSValue jsSVGElementInstanceOncut(ExecState* exec, const Identifier&, const Prop JSValue jsSVGElementInstanceOnbeforecopy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onbeforecopy()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -461,8 +491,9 @@ JSValue jsSVGElementInstanceOnbeforecopy(ExecState* exec, const Identifier&, con JSValue jsSVGElementInstanceOncopy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->oncopy()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -472,8 +503,9 @@ JSValue jsSVGElementInstanceOncopy(ExecState* exec, const Identifier&, const Pro JSValue jsSVGElementInstanceOnbeforepaste(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onbeforepaste()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -483,8 +515,9 @@ JSValue jsSVGElementInstanceOnbeforepaste(ExecState* exec, const Identifier&, co JSValue jsSVGElementInstanceOnpaste(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onpaste()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -494,8 +527,9 @@ JSValue jsSVGElementInstanceOnpaste(ExecState* exec, const Identifier&, const Pr JSValue jsSVGElementInstanceOndragenter(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->ondragenter()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -505,8 +539,9 @@ JSValue jsSVGElementInstanceOndragenter(ExecState* exec, const Identifier&, cons JSValue jsSVGElementInstanceOndragover(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->ondragover()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -516,8 +551,9 @@ JSValue jsSVGElementInstanceOndragover(ExecState* exec, const Identifier&, const JSValue jsSVGElementInstanceOndragleave(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->ondragleave()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -527,8 +563,9 @@ JSValue jsSVGElementInstanceOndragleave(ExecState* exec, const Identifier&, cons JSValue jsSVGElementInstanceOndrop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->ondrop()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -538,8 +575,9 @@ JSValue jsSVGElementInstanceOndrop(ExecState* exec, const Identifier&, const Pro JSValue jsSVGElementInstanceOndragstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->ondragstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -549,8 +587,9 @@ JSValue jsSVGElementInstanceOndragstart(ExecState* exec, const Identifier&, cons JSValue jsSVGElementInstanceOndrag(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->ondrag()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -560,8 +599,9 @@ JSValue jsSVGElementInstanceOndrag(ExecState* exec, const Identifier&, const Pro JSValue jsSVGElementInstanceOndragend(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->ondragend()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -571,8 +611,9 @@ JSValue jsSVGElementInstanceOndragend(ExecState* exec, const Identifier&, const JSValue jsSVGElementInstanceOnreset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onreset()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -582,8 +623,9 @@ JSValue jsSVGElementInstanceOnreset(ExecState* exec, const Identifier&, const Pr JSValue jsSVGElementInstanceOnresize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onresize()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -593,8 +635,9 @@ JSValue jsSVGElementInstanceOnresize(ExecState* exec, const Identifier&, const P JSValue jsSVGElementInstanceOnscroll(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onscroll()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -604,8 +647,9 @@ JSValue jsSVGElementInstanceOnscroll(ExecState* exec, const Identifier&, const P JSValue jsSVGElementInstanceOnsearch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onsearch()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -615,8 +659,9 @@ JSValue jsSVGElementInstanceOnsearch(ExecState* exec, const Identifier&, const P JSValue jsSVGElementInstanceOnselect(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onselect()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -626,8 +671,9 @@ JSValue jsSVGElementInstanceOnselect(ExecState* exec, const Identifier&, const P JSValue jsSVGElementInstanceOnselectstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onselectstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -637,8 +683,9 @@ JSValue jsSVGElementInstanceOnselectstart(ExecState* exec, const Identifier&, co JSValue jsSVGElementInstanceOnsubmit(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onsubmit()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -648,8 +695,9 @@ JSValue jsSVGElementInstanceOnsubmit(ExecState* exec, const Identifier&, const P JSValue jsSVGElementInstanceOnunload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstance* castedThis = static_cast<JSSVGElementInstance*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstance* imp = static_cast<SVGElementInstance*>(static_cast<JSSVGElementInstance*>(asObject(slot.slotBase()))->impl()); + SVGElementInstance* imp = static_cast<SVGElementInstance*>(castedThis->impl()); if (EventListener* listener = imp->onunload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.h b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.h index 59a9c10a69..2922b42d1b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGElementInstance; -class JSSVGElementInstance : public DOMObject { - typedef DOMObject Base; +class JSSVGElementInstance : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSSVGElementInstance(PassRefPtr<JSC::Structure>, PassRefPtr<SVGElementInstance>); + JSSVGElementInstance(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGElementInstance>); virtual ~JSSVGElementInstance(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -62,7 +63,7 @@ private: RefPtr<SVGElementInstance> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGElementInstance*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGElementInstance*); SVGElementInstance* toSVGElementInstance(JSC::JSValue); class JSSVGElementInstancePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp index 312345f67a..1f965aab0a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp @@ -81,8 +81,8 @@ bool JSSVGElementInstanceListPrototype::getOwnPropertySlot(ExecState* exec, cons const ClassInfo JSSVGElementInstanceList::s_info = { "SVGElementInstanceList", 0, &JSSVGElementInstanceListTable, 0 }; -JSSVGElementInstanceList::JSSVGElementInstanceList(PassRefPtr<Structure> structure, PassRefPtr<SVGElementInstanceList> impl) - : DOMObject(structure) +JSSVGElementInstanceList::JSSVGElementInstanceList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElementInstanceList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -104,8 +104,9 @@ bool JSSVGElementInstanceList::getOwnPropertySlot(ExecState* exec, const Identif JSValue jsSVGElementInstanceListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGElementInstanceList* castedThis = static_cast<JSSVGElementInstanceList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGElementInstanceList* imp = static_cast<SVGElementInstanceList*>(static_cast<JSSVGElementInstanceList*>(asObject(slot.slotBase()))->impl()); + SVGElementInstanceList* imp = static_cast<SVGElementInstanceList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } @@ -119,13 +120,13 @@ JSValue JSC_HOST_CALL jsSVGElementInstanceListPrototypeFunctionItem(ExecState* e unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, SVGElementInstanceList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGElementInstanceList* object) { - return getDOMObjectWrapper<JSSVGElementInstanceList>(exec, object); + return getDOMObjectWrapper<JSSVGElementInstanceList>(exec, globalObject, object); } SVGElementInstanceList* toSVGElementInstanceList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.h index 956d44a5bc..fa9f8535d7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGElementInstanceList; -class JSSVGElementInstanceList : public DOMObject { - typedef DOMObject Base; +class JSSVGElementInstanceList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSSVGElementInstanceList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGElementInstanceList>); + JSSVGElementInstanceList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGElementInstanceList>); virtual ~JSSVGElementInstanceList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -53,7 +54,7 @@ private: RefPtr<SVGElementInstanceList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGElementInstanceList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGElementInstanceList*); SVGElementInstanceList* toSVGElementInstanceList(JSC::JSValue); class JSSVGElementInstanceListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.cpp index 657983330b..3b44712b5d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.cpp @@ -143,249 +143,249 @@ namespace WebCore { using namespace SVGNames; -typedef JSNode* (*CreateSVGElementWrapperFunction)(ExecState*, PassRefPtr<SVGElement>); +typedef JSNode* (*CreateSVGElementWrapperFunction)(ExecState*, JSDOMGlobalObject*, PassRefPtr<SVGElement>); -static JSNode* createSVGAElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGAElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGAElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAElement, element.get()); } -static JSNode* createSVGAltGlyphElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGAltGlyphElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGAltGlyphElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAltGlyphElement, element.get()); } -static JSNode* createSVGAnimateElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGAnimateElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGAnimateElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAnimateElement, element.get()); } -static JSNode* createSVGAnimateColorElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGAnimateColorElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGAnimateColorElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAnimateColorElement, element.get()); } -static JSNode* createSVGAnimateTransformElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGAnimateTransformElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGAnimateTransformElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGAnimateTransformElement, element.get()); } -static JSNode* createSVGCircleElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGCircleElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGCircleElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGCircleElement, element.get()); } -static JSNode* createSVGClipPathElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGClipPathElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGClipPathElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGClipPathElement, element.get()); } -static JSNode* createSVGCursorElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGCursorElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGCursorElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGCursorElement, element.get()); } -static JSNode* createSVGDefinitionSrcElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGDefinitionSrcElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGDefinitionSrcElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGDefinitionSrcElement, element.get()); } -static JSNode* createSVGDefsElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGDefsElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGDefsElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGDefsElement, element.get()); } -static JSNode* createSVGDescElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGDescElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGDescElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGDescElement, element.get()); } -static JSNode* createSVGEllipseElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGEllipseElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGEllipseElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGEllipseElement, element.get()); } -static JSNode* createSVGFontElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGFontElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGFontElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontElement, element.get()); } -static JSNode* createSVGFontFaceElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGFontFaceElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGFontFaceElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceElement, element.get()); } -static JSNode* createSVGFontFaceFormatElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGFontFaceFormatElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGFontFaceFormatElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceFormatElement, element.get()); } -static JSNode* createSVGFontFaceNameElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGFontFaceNameElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGFontFaceNameElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceNameElement, element.get()); } -static JSNode* createSVGFontFaceSrcElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGFontFaceSrcElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGFontFaceSrcElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceSrcElement, element.get()); } -static JSNode* createSVGFontFaceUriElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGFontFaceUriElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGFontFaceUriElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGFontFaceUriElement, element.get()); } -static JSNode* createSVGForeignObjectElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGForeignObjectElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGForeignObjectElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGForeignObjectElement, element.get()); } -static JSNode* createSVGGElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGGElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGGElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGGElement, element.get()); } -static JSNode* createSVGGlyphElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGGlyphElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGGlyphElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGGlyphElement, element.get()); } -static JSNode* createSVGImageElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGImageElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGImageElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGImageElement, element.get()); } -static JSNode* createSVGLineElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGLineElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGLineElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGLineElement, element.get()); } -static JSNode* createSVGLinearGradientElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGLinearGradientElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGLinearGradientElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGLinearGradientElement, element.get()); } -static JSNode* createSVGMarkerElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGMarkerElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGMarkerElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGMarkerElement, element.get()); } -static JSNode* createSVGMaskElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGMaskElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGMaskElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGMaskElement, element.get()); } -static JSNode* createSVGMetadataElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGMetadataElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGMetadataElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGMetadataElement, element.get()); } -static JSNode* createSVGMissingGlyphElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGMissingGlyphElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGMissingGlyphElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGMissingGlyphElement, element.get()); } -static JSNode* createSVGPathElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGPathElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGPathElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGPathElement, element.get()); } -static JSNode* createSVGPatternElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGPatternElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGPatternElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGPatternElement, element.get()); } -static JSNode* createSVGPolygonElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGPolygonElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGPolygonElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGPolygonElement, element.get()); } -static JSNode* createSVGPolylineElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGPolylineElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGPolylineElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGPolylineElement, element.get()); } -static JSNode* createSVGRadialGradientElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGRadialGradientElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGRadialGradientElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGRadialGradientElement, element.get()); } -static JSNode* createSVGRectElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGRectElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGRectElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGRectElement, element.get()); } -static JSNode* createSVGScriptElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGScriptElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGScriptElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGScriptElement, element.get()); } -static JSNode* createSVGSetElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGSetElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGSetElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGSetElement, element.get()); } -static JSNode* createSVGStopElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGStopElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGStopElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGStopElement, element.get()); } -static JSNode* createSVGStyleElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGStyleElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGStyleElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGStyleElement, element.get()); } -static JSNode* createSVGSVGElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGSVGElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGSVGElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGSVGElement, element.get()); } -static JSNode* createSVGSwitchElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGSwitchElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGSwitchElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGSwitchElement, element.get()); } -static JSNode* createSVGSymbolElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGSymbolElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGSymbolElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGSymbolElement, element.get()); } -static JSNode* createSVGTextElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGTextElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGTextElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTextElement, element.get()); } -static JSNode* createSVGTextPathElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGTextPathElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGTextPathElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTextPathElement, element.get()); } -static JSNode* createSVGTitleElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGTitleElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGTitleElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTitleElement, element.get()); } -static JSNode* createSVGTRefElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGTRefElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGTRefElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTRefElement, element.get()); } -static JSNode* createSVGTSpanElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGTSpanElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGTSpanElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGTSpanElement, element.get()); } -static JSNode* createSVGUseElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGUseElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGUseElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGUseElement, element.get()); } -static JSNode* createSVGViewElementWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +static JSNode* createSVGViewElementWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { - return CREATE_DOM_NODE_WRAPPER(exec, SVGViewElement, element.get()); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGViewElement, element.get()); } -JSNode* createJSSVGWrapper(ExecState* exec, PassRefPtr<SVGElement> element) +JSNode* createJSSVGWrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<SVGElement> element) { typedef HashMap<WebCore::AtomicStringImpl*, CreateSVGElementWrapperFunction> FunctionMap; DEFINE_STATIC_LOCAL(FunctionMap, map, ()); @@ -441,8 +441,8 @@ JSNode* createJSSVGWrapper(ExecState* exec, PassRefPtr<SVGElement> element) } CreateSVGElementWrapperFunction createWrapperFunction = map.get(element->localName().impl()); if (createWrapperFunction) - return createWrapperFunction(exec, element); - return CREATE_DOM_NODE_WRAPPER(exec, SVGElement, element.get()); + return createWrapperFunction(exec, globalObject, element); + return CREATE_DOM_NODE_WRAPPER(exec, globalObject, SVGElement, element.get()); } } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.h b/src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.h index 933906b2a5..843ba7e8b1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.h @@ -40,9 +40,10 @@ namespace JSC { namespace WebCore { class JSNode; + class JSDOMGlobalObject; class SVGElement; - JSNode* createJSSVGWrapper(JSC::ExecState*, PassRefPtr<SVGElement>); + JSNode* createJSSVGWrapper(JSC::ExecState*, JSDOMGlobalObject*, PassRefPtr<SVGElement>); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp index 73d7cfacd2..0297726af7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp @@ -114,8 +114,8 @@ bool JSSVGEllipseElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSSVGEllipseElement::s_info = { "SVGEllipseElement", &JSSVGElement::s_info, &JSSVGEllipseElementTable, 0 }; -JSSVGEllipseElement::JSSVGEllipseElement(PassRefPtr<Structure> structure, PassRefPtr<SVGEllipseElement> impl) - : JSSVGElement(structure, impl) +JSSVGEllipseElement::JSSVGEllipseElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGEllipseElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -131,114 +131,129 @@ bool JSSVGEllipseElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGEllipseElementCx(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->cxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGEllipseElementCy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->cyAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGEllipseElementRx(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->rxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGEllipseElementRy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->ryAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGEllipseElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGEllipseElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGEllipseElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGEllipseElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGEllipseElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGEllipseElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGEllipseElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGEllipseElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGEllipseElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGEllipseElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGEllipseElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGEllipseElement* castedThis = static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(static_cast<JSSVGEllipseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGEllipseElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -282,7 +297,7 @@ JSValue JSC_HOST_CALL jsSVGEllipseElementPrototypeFunctionGetPresentationAttribu const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -295,7 +310,7 @@ JSValue JSC_HOST_CALL jsSVGEllipseElementPrototypeFunctionGetBBox(ExecState* exe SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -308,7 +323,7 @@ JSValue JSC_HOST_CALL jsSVGEllipseElementPrototypeFunctionGetCTM(ExecState* exec SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -321,7 +336,7 @@ JSValue JSC_HOST_CALL jsSVGEllipseElementPrototypeFunctionGetScreenCTM(ExecState SVGEllipseElement* imp = static_cast<SVGEllipseElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -336,7 +351,7 @@ JSValue JSC_HOST_CALL jsSVGEllipseElementPrototypeFunctionGetTransformToElement( SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.h index 2ccb260373..37d23e3824 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.h @@ -33,7 +33,7 @@ class SVGEllipseElement; class JSSVGEllipseElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGEllipseElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGEllipseElement>); + JSSVGEllipseElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGEllipseElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp index 7860c9df50..bb8942ddc6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp @@ -72,12 +72,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGExceptionConstructorTable = { 9, 7, JSSVGExceptionConstructorTableValues, 0 }; #endif -class JSSVGExceptionConstructor : public DOMObject { +class JSSVGExceptionConstructor : public DOMConstructorObject { public: - JSSVGExceptionConstructor(ExecState* exec) - : DOMObject(JSSVGExceptionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGExceptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGExceptionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGExceptionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGExceptionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -128,9 +128,8 @@ bool JSSVGExceptionPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSSVGException::s_info = { "SVGException", 0, &JSSVGExceptionTable, 0 }; -JSSVGException::JSSVGException(PassRefPtr<Structure> structure, PassRefPtr<SVGException> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGException::JSSVGException(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGException> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -152,32 +151,36 @@ bool JSSVGException::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsSVGExceptionCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGException* castedThis = static_cast<JSSVGException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGException* imp = static_cast<SVGException*>(static_cast<JSSVGException*>(asObject(slot.slotBase()))->impl()); + SVGException* imp = static_cast<SVGException*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsSVGExceptionName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGException* castedThis = static_cast<JSSVGException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGException* imp = static_cast<SVGException*>(static_cast<JSSVGException*>(asObject(slot.slotBase()))->impl()); + SVGException* imp = static_cast<SVGException*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsSVGExceptionMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGException* castedThis = static_cast<JSSVGException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGException* imp = static_cast<SVGException*>(static_cast<JSSVGException*>(asObject(slot.slotBase()))->impl()); + SVGException* imp = static_cast<SVGException*>(castedThis->impl()); return jsString(exec, imp->message()); } JSValue jsSVGExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGException*>(asObject(slot.slotBase()))->getConstructor(exec); + UNUSED_PARAM(slot); + return JSSVGException::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec)); } -JSValue JSSVGException::getConstructor(ExecState* exec) +JSValue JSSVGException::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGExceptionConstructor>(exec); + return getDOMConstructor<JSSVGExceptionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGExceptionPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -210,9 +213,9 @@ JSValue jsSVGExceptionSVG_MATRIX_NOT_INVERTABLE(ExecState* exec, const Identifie return jsNumber(exec, static_cast<int>(2)); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGException* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGException* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGException>(exec, object, context); + return getDOMObjectWrapper<JSSVGException>(exec, globalObject, object, context); } SVGException* toSVGException(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGException.h b/src/3rdparty/webkit/WebCore/generated/JSSVGException.h index e8fb53dcaa..15b893d355 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGException.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGException.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGException; -class JSSVGException : public DOMObject { - typedef DOMObject Base; +class JSSVGException : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGException(PassRefPtr<JSC::Structure>, PassRefPtr<SVGException>, SVGElement* context); + JSSVGException(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGException>, SVGElement* context); virtual ~JSSVGException(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,16 +48,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); SVGException* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGException > m_impl; + RefPtr<SVGException> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGException*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGException*, SVGElement* context); SVGException* toSVGException(JSC::JSValue); class JSSVGExceptionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp index a353006335..a3ecf1c17a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp @@ -87,12 +87,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGFEBlendElementConstructorTable = { 16, 15, JSSVGFEBlendElementConstructorTableValues, 0 }; #endif -class JSSVGFEBlendElementConstructor : public DOMObject { +class JSSVGFEBlendElementConstructor : public DOMConstructorObject { public: - JSSVGFEBlendElementConstructor(ExecState* exec) - : DOMObject(JSSVGFEBlendElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGFEBlendElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGFEBlendElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGFEBlendElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGFEBlendElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -146,8 +146,8 @@ bool JSSVGFEBlendElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSSVGFEBlendElement::s_info = { "SVGFEBlendElement", &JSSVGElement::s_info, &JSSVGFEBlendElementTable, 0 }; -JSSVGFEBlendElement::JSSVGFEBlendElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEBlendElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEBlendElement::JSSVGFEBlendElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEBlendElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -163,90 +163,101 @@ bool JSSVGFEBlendElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGFEBlendElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementIn2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in2Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementMode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->modeAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEBlendElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEBlendElement* castedThis = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEBlendElement* imp = static_cast<SVGFEBlendElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGFEBlendElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGFEBlendElement* domObject = static_cast<JSSVGFEBlendElement*>(asObject(slot.slotBase())); + return JSSVGFEBlendElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGFEBlendElement::getConstructor(ExecState* exec) +JSValue JSSVGFEBlendElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGFEBlendElementConstructor>(exec); + return getDOMConstructor<JSSVGFEBlendElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGFEBlendElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -259,7 +270,7 @@ JSValue JSC_HOST_CALL jsSVGFEBlendElementPrototypeFunctionGetPresentationAttribu const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.h index 34750a9e7b..88033bb3bd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.h @@ -33,7 +33,7 @@ class SVGFEBlendElement; class JSSVGFEBlendElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEBlendElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEBlendElement>); + JSSVGFEBlendElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEBlendElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp index d87538656c..6aa69fc730 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp @@ -87,12 +87,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGFEColorMatrixElementConstructorTable = { 17, 15, JSSVGFEColorMatrixElementConstructorTableValues, 0 }; #endif -class JSSVGFEColorMatrixElementConstructor : public DOMObject { +class JSSVGFEColorMatrixElementConstructor : public DOMConstructorObject { public: - JSSVGFEColorMatrixElementConstructor(ExecState* exec) - : DOMObject(JSSVGFEColorMatrixElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGFEColorMatrixElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGFEColorMatrixElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGFEColorMatrixElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGFEColorMatrixElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -145,8 +145,8 @@ bool JSSVGFEColorMatrixElementPrototype::getOwnPropertySlot(ExecState* exec, con const ClassInfo JSSVGFEColorMatrixElement::s_info = { "SVGFEColorMatrixElement", &JSSVGElement::s_info, &JSSVGFEColorMatrixElementTable, 0 }; -JSSVGFEColorMatrixElement::JSSVGFEColorMatrixElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEColorMatrixElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEColorMatrixElement::JSSVGFEColorMatrixElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEColorMatrixElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -162,90 +162,101 @@ bool JSSVGFEColorMatrixElement::getOwnPropertySlot(ExecState* exec, const Identi JSValue jsSVGFEColorMatrixElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->typeAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementValues(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumberList> obj = imp->valuesAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEColorMatrixElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEColorMatrixElement* castedThis = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEColorMatrixElement* imp = static_cast<SVGFEColorMatrixElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGFEColorMatrixElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGFEColorMatrixElement* domObject = static_cast<JSSVGFEColorMatrixElement*>(asObject(slot.slotBase())); + return JSSVGFEColorMatrixElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGFEColorMatrixElement::getConstructor(ExecState* exec) +JSValue JSSVGFEColorMatrixElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGFEColorMatrixElementConstructor>(exec); + return getDOMConstructor<JSSVGFEColorMatrixElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGFEColorMatrixElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -258,7 +269,7 @@ JSValue JSC_HOST_CALL jsSVGFEColorMatrixElementPrototypeFunctionGetPresentationA const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.h index de9ef2ff1f..3a6aa6716a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.h @@ -33,7 +33,7 @@ class SVGFEColorMatrixElement; class JSSVGFEColorMatrixElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEColorMatrixElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEColorMatrixElement>); + JSSVGFEColorMatrixElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEColorMatrixElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp index c5238a8bdd..a0be501272 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp @@ -92,8 +92,8 @@ bool JSSVGFEComponentTransferElementPrototype::getOwnPropertySlot(ExecState* exe const ClassInfo JSSVGFEComponentTransferElement::s_info = { "SVGFEComponentTransferElement", &JSSVGElement::s_info, &JSSVGFEComponentTransferElementTable, 0 }; -JSSVGFEComponentTransferElement::JSSVGFEComponentTransferElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEComponentTransferElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEComponentTransferElement::JSSVGFEComponentTransferElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEComponentTransferElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -109,65 +109,73 @@ bool JSSVGFEComponentTransferElement::getOwnPropertySlot(ExecState* exec, const JSValue jsSVGFEComponentTransferElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase()))->impl()); + SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEComponentTransferElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase()))->impl()); + SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEComponentTransferElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase()))->impl()); + SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEComponentTransferElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase()))->impl()); + SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEComponentTransferElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase()))->impl()); + SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEComponentTransferElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase()))->impl()); + SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEComponentTransferElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase()))->impl()); + SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEComponentTransferElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(static_cast<JSSVGFEComponentTransferElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue JSC_HOST_CALL jsSVGFEComponentTransferElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -180,7 +188,7 @@ JSValue JSC_HOST_CALL jsSVGFEComponentTransferElementPrototypeFunctionGetPresent const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.h index 803a32b12a..c50b12be58 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.h @@ -33,7 +33,7 @@ class SVGFEComponentTransferElement; class JSSVGFEComponentTransferElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEComponentTransferElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEComponentTransferElement>); + JSSVGFEComponentTransferElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEComponentTransferElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp index 8edb5f07a8..42fe70a41a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp @@ -93,12 +93,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGFECompositeElementConstructorTable = { 16, 15, JSSVGFECompositeElementConstructorTableValues, 0 }; #endif -class JSSVGFECompositeElementConstructor : public DOMObject { +class JSSVGFECompositeElementConstructor : public DOMConstructorObject { public: - JSSVGFECompositeElementConstructor(ExecState* exec) - : DOMObject(JSSVGFECompositeElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGFECompositeElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGFECompositeElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGFECompositeElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGFECompositeElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -153,8 +153,8 @@ bool JSSVGFECompositeElementPrototype::getOwnPropertySlot(ExecState* exec, const const ClassInfo JSSVGFECompositeElement::s_info = { "SVGFECompositeElement", &JSSVGElement::s_info, &JSSVGFECompositeElementTable, 0 }; -JSSVGFECompositeElement::JSSVGFECompositeElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFECompositeElement> impl) - : JSSVGElement(structure, impl) +JSSVGFECompositeElement::JSSVGFECompositeElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFECompositeElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -170,122 +170,137 @@ bool JSSVGFECompositeElement::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsSVGFECompositeElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementIn2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in2Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElement_operator(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->_operatorAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementK1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->k1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementK2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->k2Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementK3(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->k3Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementK4(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->k4Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFECompositeElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFECompositeElement* castedThis = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFECompositeElement* imp = static_cast<SVGFECompositeElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGFECompositeElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGFECompositeElement* domObject = static_cast<JSSVGFECompositeElement*>(asObject(slot.slotBase())); + return JSSVGFECompositeElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGFECompositeElement::getConstructor(ExecState* exec) +JSValue JSSVGFECompositeElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGFECompositeElementConstructor>(exec); + return getDOMConstructor<JSSVGFECompositeElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGFECompositeElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -298,7 +313,7 @@ JSValue JSC_HOST_CALL jsSVGFECompositeElementPrototypeFunctionGetPresentationAtt const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.h index b2876c39d1..826db95f17 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.h @@ -33,7 +33,7 @@ class SVGFECompositeElement; class JSSVGFECompositeElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFECompositeElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFECompositeElement>); + JSSVGFECompositeElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFECompositeElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp index 0fffc6ecd2..01492c45db 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp @@ -97,8 +97,8 @@ bool JSSVGFEDiffuseLightingElementPrototype::getOwnPropertySlot(ExecState* exec, const ClassInfo JSSVGFEDiffuseLightingElement::s_info = { "SVGFEDiffuseLightingElement", &JSSVGElement::s_info, &JSSVGFEDiffuseLightingElementTable, 0 }; -JSSVGFEDiffuseLightingElement::JSSVGFEDiffuseLightingElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEDiffuseLightingElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEDiffuseLightingElement::JSSVGFEDiffuseLightingElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEDiffuseLightingElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -114,97 +114,109 @@ bool JSSVGFEDiffuseLightingElement::getOwnPropertySlot(ExecState* exec, const Id JSValue jsSVGFEDiffuseLightingElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementSurfaceScale(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->surfaceScaleAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementDiffuseConstant(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->diffuseConstantAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementKernelUnitLengthX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthXAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementKernelUnitLengthY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthYAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDiffuseLightingElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue JSC_HOST_CALL jsSVGFEDiffuseLightingElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -217,7 +229,7 @@ JSValue JSC_HOST_CALL jsSVGFEDiffuseLightingElementPrototypeFunctionGetPresentat const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.h index 96bb14d1ea..26e6e91268 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.h @@ -33,7 +33,7 @@ class SVGFEDiffuseLightingElement; class JSSVGFEDiffuseLightingElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEDiffuseLightingElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEDiffuseLightingElement>); + JSSVGFEDiffuseLightingElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEDiffuseLightingElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp index 0e8e342b32..a3441e4827 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp @@ -89,12 +89,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGFEDisplacementMapElementConstructorTab { 16, 15, JSSVGFEDisplacementMapElementConstructorTableValues, 0 }; #endif -class JSSVGFEDisplacementMapElementConstructor : public DOMObject { +class JSSVGFEDisplacementMapElementConstructor : public DOMConstructorObject { public: - JSSVGFEDisplacementMapElementConstructor(ExecState* exec) - : DOMObject(JSSVGFEDisplacementMapElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGFEDisplacementMapElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGFEDisplacementMapElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGFEDisplacementMapElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGFEDisplacementMapElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -147,8 +147,8 @@ bool JSSVGFEDisplacementMapElementPrototype::getOwnPropertySlot(ExecState* exec, const ClassInfo JSSVGFEDisplacementMapElement::s_info = { "SVGFEDisplacementMapElement", &JSSVGElement::s_info, &JSSVGFEDisplacementMapElementTable, 0 }; -JSSVGFEDisplacementMapElement::JSSVGFEDisplacementMapElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEDisplacementMapElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEDisplacementMapElement::JSSVGFEDisplacementMapElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEDisplacementMapElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -164,106 +164,119 @@ bool JSSVGFEDisplacementMapElement::getOwnPropertySlot(ExecState* exec, const Id JSValue jsSVGFEDisplacementMapElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementIn2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in2Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementScale(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->scaleAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementXChannelSelector(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->xChannelSelectorAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementYChannelSelector(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->yChannelSelectorAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDisplacementMapElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDisplacementMapElement* castedThis = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEDisplacementMapElement* imp = static_cast<SVGFEDisplacementMapElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGFEDisplacementMapElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGFEDisplacementMapElement* domObject = static_cast<JSSVGFEDisplacementMapElement*>(asObject(slot.slotBase())); + return JSSVGFEDisplacementMapElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGFEDisplacementMapElement::getConstructor(ExecState* exec) +JSValue JSSVGFEDisplacementMapElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGFEDisplacementMapElementConstructor>(exec); + return getDOMConstructor<JSSVGFEDisplacementMapElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGFEDisplacementMapElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -276,7 +289,7 @@ JSValue JSC_HOST_CALL jsSVGFEDisplacementMapElementPrototypeFunctionGetPresentat const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.h index 93c9fe5a7e..3c7db0fd66 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.h @@ -33,7 +33,7 @@ class SVGFEDisplacementMapElement; class JSSVGFEDisplacementMapElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEDisplacementMapElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEDisplacementMapElement>); + JSSVGFEDisplacementMapElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEDisplacementMapElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp index 63ece0d886..f494d914cd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp @@ -73,8 +73,8 @@ JSObject* JSSVGFEDistantLightElementPrototype::self(ExecState* exec, JSGlobalObj const ClassInfo JSSVGFEDistantLightElement::s_info = { "SVGFEDistantLightElement", &JSSVGElement::s_info, &JSSVGFEDistantLightElementTable, 0 }; -JSSVGFEDistantLightElement::JSSVGFEDistantLightElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEDistantLightElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEDistantLightElement::JSSVGFEDistantLightElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEDistantLightElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -90,18 +90,20 @@ bool JSSVGFEDistantLightElement::getOwnPropertySlot(ExecState* exec, const Ident JSValue jsSVGFEDistantLightElementAzimuth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDistantLightElement* castedThis = static_cast<JSSVGFEDistantLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDistantLightElement* imp = static_cast<SVGFEDistantLightElement*>(static_cast<JSSVGFEDistantLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDistantLightElement* imp = static_cast<SVGFEDistantLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->azimuthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEDistantLightElementElevation(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEDistantLightElement* castedThis = static_cast<JSSVGFEDistantLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEDistantLightElement* imp = static_cast<SVGFEDistantLightElement*>(static_cast<JSSVGFEDistantLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFEDistantLightElement* imp = static_cast<SVGFEDistantLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->elevationAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.h index 1a618716e8..c6d46e7f39 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.h @@ -33,7 +33,7 @@ class SVGFEDistantLightElement; class JSSVGFEDistantLightElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEDistantLightElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEDistantLightElement>); + JSSVGFEDistantLightElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEDistantLightElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp index f80ec71e17..dc392f2def 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp @@ -78,12 +78,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGFEFloodElementConstructorTable = { 1, 0, JSSVGFEFloodElementConstructorTableValues, 0 }; #endif -class JSSVGFEFloodElementConstructor : public DOMObject { +class JSSVGFEFloodElementConstructor : public DOMConstructorObject { public: - JSSVGFEFloodElementConstructor(ExecState* exec) - : DOMObject(JSSVGFEFloodElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGFEFloodElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGFEFloodElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGFEFloodElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGFEFloodElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -131,8 +131,8 @@ bool JSSVGFEFloodElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSSVGFEFloodElement::s_info = { "SVGFEFloodElement", &JSSVGElement::s_info, &JSSVGFEFloodElementTable, 0 }; -JSSVGFEFloodElement::JSSVGFEFloodElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEFloodElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEFloodElement::JSSVGFEFloodElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEFloodElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -148,74 +148,83 @@ bool JSSVGFEFloodElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGFEFloodElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->impl()); + SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->impl()); + SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->impl()); + SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->impl()); + SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->impl()); + SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->impl()); + SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->impl()); + SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGFEFloodElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGFEFloodElement* domObject = static_cast<JSSVGFEFloodElement*>(asObject(slot.slotBase())); + return JSSVGFEFloodElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGFEFloodElement::getConstructor(ExecState* exec) +JSValue JSSVGFEFloodElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGFEFloodElementConstructor>(exec); + return getDOMConstructor<JSSVGFEFloodElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGFEFloodElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -228,7 +237,7 @@ JSValue JSC_HOST_CALL jsSVGFEFloodElementPrototypeFunctionGetPresentationAttribu const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.h index fe54ca41cb..46aa9a58c7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.h @@ -33,7 +33,7 @@ class SVGFEFloodElement; class JSSVGFEFloodElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEFloodElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEFloodElement>); + JSSVGFEFloodElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEFloodElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp index a51799bf5f..e91153ebd1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFEFuncAElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSSVGFEFuncAElement::s_info = { "SVGFEFuncAElement", &JSSVGComponentTransferFunctionElement::s_info, 0, 0 }; -JSSVGFEFuncAElement::JSSVGFEFuncAElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEFuncAElement> impl) - : JSSVGComponentTransferFunctionElement(structure, impl) +JSSVGFEFuncAElement::JSSVGFEFuncAElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEFuncAElement> impl) + : JSSVGComponentTransferFunctionElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.h index 1afcb58460..f7a84bebf0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.h @@ -33,7 +33,7 @@ class SVGFEFuncAElement; class JSSVGFEFuncAElement : public JSSVGComponentTransferFunctionElement { typedef JSSVGComponentTransferFunctionElement Base; public: - JSSVGFEFuncAElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEFuncAElement>); + JSSVGFEFuncAElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEFuncAElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp index 710a37b47e..5475952cb2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFEFuncBElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSSVGFEFuncBElement::s_info = { "SVGFEFuncBElement", &JSSVGComponentTransferFunctionElement::s_info, 0, 0 }; -JSSVGFEFuncBElement::JSSVGFEFuncBElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEFuncBElement> impl) - : JSSVGComponentTransferFunctionElement(structure, impl) +JSSVGFEFuncBElement::JSSVGFEFuncBElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEFuncBElement> impl) + : JSSVGComponentTransferFunctionElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.h index 5f4484706f..b3acd3beec 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.h @@ -33,7 +33,7 @@ class SVGFEFuncBElement; class JSSVGFEFuncBElement : public JSSVGComponentTransferFunctionElement { typedef JSSVGComponentTransferFunctionElement Base; public: - JSSVGFEFuncBElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEFuncBElement>); + JSSVGFEFuncBElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEFuncBElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp index 82aa829303..afbf091185 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFEFuncGElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSSVGFEFuncGElement::s_info = { "SVGFEFuncGElement", &JSSVGComponentTransferFunctionElement::s_info, 0, 0 }; -JSSVGFEFuncGElement::JSSVGFEFuncGElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEFuncGElement> impl) - : JSSVGComponentTransferFunctionElement(structure, impl) +JSSVGFEFuncGElement::JSSVGFEFuncGElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEFuncGElement> impl) + : JSSVGComponentTransferFunctionElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.h index 2a1425272d..1b98d35d8e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.h @@ -33,7 +33,7 @@ class SVGFEFuncGElement; class JSSVGFEFuncGElement : public JSSVGComponentTransferFunctionElement { typedef JSSVGComponentTransferFunctionElement Base; public: - JSSVGFEFuncGElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEFuncGElement>); + JSSVGFEFuncGElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEFuncGElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp index 26b8c93d93..a1df1b70d4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFEFuncRElementPrototype::self(ExecState* exec, JSGlobalObject* gl const ClassInfo JSSVGFEFuncRElement::s_info = { "SVGFEFuncRElement", &JSSVGComponentTransferFunctionElement::s_info, 0, 0 }; -JSSVGFEFuncRElement::JSSVGFEFuncRElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEFuncRElement> impl) - : JSSVGComponentTransferFunctionElement(structure, impl) +JSSVGFEFuncRElement::JSSVGFEFuncRElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEFuncRElement> impl) + : JSSVGComponentTransferFunctionElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.h index c6ba5140b9..f427dfa69f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.h @@ -33,7 +33,7 @@ class SVGFEFuncRElement; class JSSVGFEFuncRElement : public JSSVGComponentTransferFunctionElement { typedef JSSVGComponentTransferFunctionElement Base; public: - JSSVGFEFuncRElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEFuncRElement>); + JSSVGFEFuncRElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEFuncRElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp index f36edd6ff6..e1ee3bd8d6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp @@ -96,8 +96,8 @@ bool JSSVGFEGaussianBlurElementPrototype::getOwnPropertySlot(ExecState* exec, co const ClassInfo JSSVGFEGaussianBlurElement::s_info = { "SVGFEGaussianBlurElement", &JSSVGElement::s_info, &JSSVGFEGaussianBlurElementTable, 0 }; -JSSVGFEGaussianBlurElement::JSSVGFEGaussianBlurElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEGaussianBlurElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEGaussianBlurElement::JSSVGFEGaussianBlurElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEGaussianBlurElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -113,81 +113,91 @@ bool JSSVGFEGaussianBlurElement::getOwnPropertySlot(ExecState* exec, const Ident JSValue jsSVGFEGaussianBlurElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementStdDeviationX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->stdDeviationXAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementStdDeviationY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->stdDeviationYAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEGaussianBlurElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEGaussianBlurElement* castedThis = static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(static_cast<JSSVGFEGaussianBlurElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEGaussianBlurElement* imp = static_cast<SVGFEGaussianBlurElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue JSC_HOST_CALL jsSVGFEGaussianBlurElementPrototypeFunctionSetStdDeviation(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -214,7 +224,7 @@ JSValue JSC_HOST_CALL jsSVGFEGaussianBlurElementPrototypeFunctionGetPresentation const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.h index 2a5bcd344d..dc02e5a9a0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.h @@ -33,7 +33,7 @@ class SVGFEGaussianBlurElement; class JSSVGFEGaussianBlurElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEGaussianBlurElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEGaussianBlurElement>); + JSSVGFEGaussianBlurElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEGaussianBlurElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp index d3f76f97cc..9b2625068d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp @@ -98,8 +98,8 @@ bool JSSVGFEImageElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSSVGFEImageElement::s_info = { "SVGFEImageElement", &JSSVGElement::s_info, &JSSVGFEImageElementTable, 0 }; -JSSVGFEImageElement::JSSVGFEImageElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEImageElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEImageElement::JSSVGFEImageElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEImageElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -115,87 +115,98 @@ bool JSSVGFEImageElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGFEImageElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEImageElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGFEImageElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGFEImageElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEImageElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEImageElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEImageElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEImageElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEImageElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEImageElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEImageElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(static_cast<JSSVGFEImageElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } void JSSVGFEImageElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -225,7 +236,7 @@ JSValue JSC_HOST_CALL jsSVGFEImageElementPrototypeFunctionGetPresentationAttribu const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.h index e07fb7d7b4..8b2d03ee02 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.h @@ -33,7 +33,7 @@ class SVGFEImageElement; class JSSVGFEImageElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEImageElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEImageElement>); + JSSVGFEImageElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEImageElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp index 4b18c0a84e..0d512aa359 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp @@ -91,8 +91,8 @@ bool JSSVGFEMergeElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSSVGFEMergeElement::s_info = { "SVGFEMergeElement", &JSSVGElement::s_info, &JSSVGFEMergeElementTable, 0 }; -JSSVGFEMergeElement::JSSVGFEMergeElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEMergeElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEMergeElement::JSSVGFEMergeElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEMergeElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -108,57 +108,64 @@ bool JSSVGFEMergeElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGFEMergeElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEMergeElement* castedThis = static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase()))->impl()); + SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEMergeElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEMergeElement* castedThis = static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase()))->impl()); + SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEMergeElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEMergeElement* castedThis = static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase()))->impl()); + SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEMergeElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEMergeElement* castedThis = static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase()))->impl()); + SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEMergeElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEMergeElement* castedThis = static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase()))->impl()); + SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEMergeElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEMergeElement* castedThis = static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase()))->impl()); + SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEMergeElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEMergeElement* castedThis = static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(static_cast<JSSVGFEMergeElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEMergeElement* imp = static_cast<SVGFEMergeElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue JSC_HOST_CALL jsSVGFEMergeElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -171,7 +178,7 @@ JSValue JSC_HOST_CALL jsSVGFEMergeElementPrototypeFunctionGetPresentationAttribu const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.h index 1d8265d12e..0d64712976 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.h @@ -33,7 +33,7 @@ class SVGFEMergeElement; class JSSVGFEMergeElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEMergeElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEMergeElement>); + JSSVGFEMergeElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEMergeElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp index 3ea7b74652..3358b9d19b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp @@ -72,8 +72,8 @@ JSObject* JSSVGFEMergeNodeElementPrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSSVGFEMergeNodeElement::s_info = { "SVGFEMergeNodeElement", &JSSVGElement::s_info, &JSSVGFEMergeNodeElementTable, 0 }; -JSSVGFEMergeNodeElement::JSSVGFEMergeNodeElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEMergeNodeElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEMergeNodeElement::JSSVGFEMergeNodeElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEMergeNodeElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -89,10 +89,11 @@ bool JSSVGFEMergeNodeElement::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsSVGFEMergeNodeElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEMergeNodeElement* castedThis = static_cast<JSSVGFEMergeNodeElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEMergeNodeElement* imp = static_cast<SVGFEMergeNodeElement*>(static_cast<JSSVGFEMergeNodeElement*>(asObject(slot.slotBase()))->impl()); + SVGFEMergeNodeElement* imp = static_cast<SVGFEMergeNodeElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.h index d5d192e9e5..da757a6267 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.h @@ -33,7 +33,7 @@ class SVGFEMergeNodeElement; class JSSVGFEMergeNodeElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEMergeNodeElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEMergeNodeElement>); + JSSVGFEMergeNodeElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEMergeNodeElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp index 4ea1f85476..dc30cf81c6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp @@ -95,8 +95,8 @@ bool JSSVGFEOffsetElementPrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSSVGFEOffsetElement::s_info = { "SVGFEOffsetElement", &JSSVGElement::s_info, &JSSVGFEOffsetElementTable, 0 }; -JSSVGFEOffsetElement::JSSVGFEOffsetElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEOffsetElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEOffsetElement::JSSVGFEOffsetElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEOffsetElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -112,81 +112,91 @@ bool JSSVGFEOffsetElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGFEOffsetElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementDx(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->dxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementDy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->dyAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEOffsetElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEOffsetElement* castedThis = static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(static_cast<JSSVGFEOffsetElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue JSC_HOST_CALL jsSVGFEOffsetElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -199,7 +209,7 @@ JSValue JSC_HOST_CALL jsSVGFEOffsetElementPrototypeFunctionGetPresentationAttrib const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.h index 0af9898a2e..7ee3daf840 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.h @@ -33,7 +33,7 @@ class SVGFEOffsetElement; class JSSVGFEOffsetElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEOffsetElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEOffsetElement>); + JSSVGFEOffsetElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEOffsetElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp index 6ca91ec747..724a55dddf 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp @@ -74,8 +74,8 @@ JSObject* JSSVGFEPointLightElementPrototype::self(ExecState* exec, JSGlobalObjec const ClassInfo JSSVGFEPointLightElement::s_info = { "SVGFEPointLightElement", &JSSVGElement::s_info, &JSSVGFEPointLightElementTable, 0 }; -JSSVGFEPointLightElement::JSSVGFEPointLightElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFEPointLightElement> impl) - : JSSVGElement(structure, impl) +JSSVGFEPointLightElement::JSSVGFEPointLightElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEPointLightElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -91,26 +91,29 @@ bool JSSVGFEPointLightElement::getOwnPropertySlot(ExecState* exec, const Identif JSValue jsSVGFEPointLightElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEPointLightElement* castedThis = static_cast<JSSVGFEPointLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEPointLightElement* imp = static_cast<SVGFEPointLightElement*>(static_cast<JSSVGFEPointLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFEPointLightElement* imp = static_cast<SVGFEPointLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEPointLightElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEPointLightElement* castedThis = static_cast<JSSVGFEPointLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEPointLightElement* imp = static_cast<SVGFEPointLightElement*>(static_cast<JSSVGFEPointLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFEPointLightElement* imp = static_cast<SVGFEPointLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEPointLightElementZ(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFEPointLightElement* castedThis = static_cast<JSSVGFEPointLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFEPointLightElement* imp = static_cast<SVGFEPointLightElement*>(static_cast<JSSVGFEPointLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFEPointLightElement* imp = static_cast<SVGFEPointLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->zAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.h index bd3567565a..cfbc2555b4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.h @@ -33,7 +33,7 @@ class SVGFEPointLightElement; class JSSVGFEPointLightElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFEPointLightElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFEPointLightElement>); + JSSVGFEPointLightElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFEPointLightElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp index 4f8ac6c188..a481c18f56 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp @@ -96,8 +96,8 @@ bool JSSVGFESpecularLightingElementPrototype::getOwnPropertySlot(ExecState* exec const ClassInfo JSSVGFESpecularLightingElement::s_info = { "SVGFESpecularLightingElement", &JSSVGElement::s_info, &JSSVGFESpecularLightingElementTable, 0 }; -JSSVGFESpecularLightingElement::JSSVGFESpecularLightingElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFESpecularLightingElement> impl) - : JSSVGElement(structure, impl) +JSSVGFESpecularLightingElement::JSSVGFESpecularLightingElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFESpecularLightingElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -113,89 +113,100 @@ bool JSSVGFESpecularLightingElement::getOwnPropertySlot(ExecState* exec, const I JSValue jsSVGFESpecularLightingElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementSurfaceScale(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->surfaceScaleAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementSpecularConstant(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->specularConstantAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementSpecularExponent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->specularExponentAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpecularLightingElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(static_cast<JSSVGFESpecularLightingElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue JSC_HOST_CALL jsSVGFESpecularLightingElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -208,7 +219,7 @@ JSValue JSC_HOST_CALL jsSVGFESpecularLightingElementPrototypeFunctionGetPresenta const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.h index 8085629c04..41d7575b56 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.h @@ -33,7 +33,7 @@ class SVGFESpecularLightingElement; class JSSVGFESpecularLightingElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFESpecularLightingElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFESpecularLightingElement>); + JSSVGFESpecularLightingElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFESpecularLightingElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp index b5ae3d1e8c..e6a70ea50b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp @@ -79,8 +79,8 @@ JSObject* JSSVGFESpotLightElementPrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSSVGFESpotLightElement::s_info = { "SVGFESpotLightElement", &JSSVGElement::s_info, &JSSVGFESpotLightElementTable, 0 }; -JSSVGFESpotLightElement::JSSVGFESpotLightElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFESpotLightElement> impl) - : JSSVGElement(structure, impl) +JSSVGFESpotLightElement::JSSVGFESpotLightElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFESpotLightElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -96,66 +96,74 @@ bool JSSVGFESpotLightElement::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsSVGFESpotLightElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpotLightElement* castedThis = static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpotLightElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpotLightElement* castedThis = static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpotLightElementZ(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpotLightElement* castedThis = static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->zAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpotLightElementPointsAtX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpotLightElement* castedThis = static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->pointsAtXAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpotLightElementPointsAtY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpotLightElement* castedThis = static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->pointsAtYAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpotLightElementPointsAtZ(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpotLightElement* castedThis = static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->pointsAtZAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpotLightElementSpecularExponent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpotLightElement* castedThis = static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->specularExponentAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFESpotLightElementLimitingConeAngle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFESpotLightElement* castedThis = static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(static_cast<JSSVGFESpotLightElement*>(asObject(slot.slotBase()))->impl()); + SVGFESpotLightElement* imp = static_cast<SVGFESpotLightElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->limitingConeAngleAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.h index 8a9d925b7a..bb2dfa5d8f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.h @@ -33,7 +33,7 @@ class SVGFESpotLightElement; class JSSVGFESpotLightElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFESpotLightElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFESpotLightElement>); + JSSVGFESpotLightElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFESpotLightElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp index bc0e33c392..8d804221c0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp @@ -92,8 +92,8 @@ bool JSSVGFETileElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSSVGFETileElement::s_info = { "SVGFETileElement", &JSSVGElement::s_info, &JSSVGFETileElementTable, 0 }; -JSSVGFETileElement::JSSVGFETileElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFETileElement> impl) - : JSSVGElement(structure, impl) +JSSVGFETileElement::JSSVGFETileElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFETileElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -109,65 +109,73 @@ bool JSSVGFETileElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGFETileElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETileElement* imp = static_cast<SVGFETileElement*>(static_cast<JSSVGFETileElement*>(asObject(slot.slotBase()))->impl()); + SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETileElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETileElement* imp = static_cast<SVGFETileElement*>(static_cast<JSSVGFETileElement*>(asObject(slot.slotBase()))->impl()); + SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETileElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETileElement* imp = static_cast<SVGFETileElement*>(static_cast<JSSVGFETileElement*>(asObject(slot.slotBase()))->impl()); + SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETileElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETileElement* imp = static_cast<SVGFETileElement*>(static_cast<JSSVGFETileElement*>(asObject(slot.slotBase()))->impl()); + SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETileElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETileElement* imp = static_cast<SVGFETileElement*>(static_cast<JSSVGFETileElement*>(asObject(slot.slotBase()))->impl()); + SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETileElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETileElement* imp = static_cast<SVGFETileElement*>(static_cast<JSSVGFETileElement*>(asObject(slot.slotBase()))->impl()); + SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETileElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETileElement* imp = static_cast<SVGFETileElement*>(static_cast<JSSVGFETileElement*>(asObject(slot.slotBase()))->impl()); + SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETileElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETileElement* imp = static_cast<SVGFETileElement*>(static_cast<JSSVGFETileElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue JSC_HOST_CALL jsSVGFETileElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -180,7 +188,7 @@ JSValue JSC_HOST_CALL jsSVGFETileElementPrototypeFunctionGetPresentationAttribut const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.h index b31e651364..13d9cbb791 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.h @@ -33,7 +33,7 @@ class SVGFETileElement; class JSSVGFETileElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFETileElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFETileElement>); + JSSVGFETileElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFETileElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp index c0e4fac60d..ae917a1a4e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp @@ -92,12 +92,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGFETurbulenceElementConstructorTable = { 18, 15, JSSVGFETurbulenceElementConstructorTableValues, 0 }; #endif -class JSSVGFETurbulenceElementConstructor : public DOMObject { +class JSSVGFETurbulenceElementConstructor : public DOMConstructorObject { public: - JSSVGFETurbulenceElementConstructor(ExecState* exec) - : DOMObject(JSSVGFETurbulenceElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGFETurbulenceElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGFETurbulenceElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGFETurbulenceElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGFETurbulenceElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -151,8 +151,8 @@ bool JSSVGFETurbulenceElementPrototype::getOwnPropertySlot(ExecState* exec, cons const ClassInfo JSSVGFETurbulenceElement::s_info = { "SVGFETurbulenceElement", &JSSVGElement::s_info, &JSSVGFETurbulenceElementTable, 0 }; -JSSVGFETurbulenceElement::JSSVGFETurbulenceElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFETurbulenceElement> impl) - : JSSVGElement(structure, impl) +JSSVGFETurbulenceElement::JSSVGFETurbulenceElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFETurbulenceElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -168,114 +168,128 @@ bool JSSVGFETurbulenceElement::getOwnPropertySlot(ExecState* exec, const Identif JSValue jsSVGFETurbulenceElementBaseFrequencyX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->baseFrequencyXAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementBaseFrequencyY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->baseFrequencyYAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementNumOctaves(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedInteger> obj = imp->numOctavesAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementSeed(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->seedAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementStitchTiles(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->stitchTilesAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->typeAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFETurbulenceElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFETurbulenceElement* castedThis = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFETurbulenceElement* imp = static_cast<SVGFETurbulenceElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGFETurbulenceElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGFETurbulenceElement* domObject = static_cast<JSSVGFETurbulenceElement*>(asObject(slot.slotBase())); + return JSSVGFETurbulenceElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGFETurbulenceElement::getConstructor(ExecState* exec) +JSValue JSSVGFETurbulenceElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGFETurbulenceElementConstructor>(exec); + return getDOMConstructor<JSSVGFETurbulenceElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGFETurbulenceElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -288,7 +302,7 @@ JSValue JSC_HOST_CALL jsSVGFETurbulenceElementPrototypeFunctionGetPresentationAt const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.h index c973954175..94c35c3fb0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.h @@ -33,7 +33,7 @@ class SVGFETurbulenceElement; class JSSVGFETurbulenceElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFETurbulenceElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFETurbulenceElement>); + JSSVGFETurbulenceElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFETurbulenceElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp index 6ba6d1b338..2bc864ae75 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp @@ -104,8 +104,8 @@ bool JSSVGFilterElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSSVGFilterElement::s_info = { "SVGFilterElement", &JSSVGElement::s_info, &JSSVGFilterElementTable, 0 }; -JSSVGFilterElement::JSSVGFilterElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFilterElement> impl) - : JSSVGElement(structure, impl) +JSSVGFilterElement::JSSVGFilterElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFilterElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -121,111 +121,125 @@ bool JSSVGFilterElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGFilterElementFilterUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->filterUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementPrimitiveUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->primitiveUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementFilterResX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedInteger> obj = imp->filterResXAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementFilterResY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedInteger> obj = imp->filterResYAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGFilterElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGFilterElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFilterElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } void JSSVGFilterElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -269,7 +283,7 @@ JSValue JSC_HOST_CALL jsSVGFilterElementPrototypeFunctionGetPresentationAttribut const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.h index faa8d3c13b..d5b1a2d516 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.h @@ -33,7 +33,7 @@ class SVGFilterElement; class JSSVGFilterElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFilterElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFilterElement>); + JSSVGFilterElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFilterElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp index 755c2c0e06..372b8e4642 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFontElementPrototype::self(ExecState* exec, JSGlobalObject* globa const ClassInfo JSSVGFontElement::s_info = { "SVGFontElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGFontElement::JSSVGFontElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFontElement> impl) - : JSSVGElement(structure, impl) +JSSVGFontElement::JSSVGFontElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFontElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.h index 4e6dd3b321..65f86e404a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.h @@ -33,7 +33,7 @@ class SVGFontElement; class JSSVGFontElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFontElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFontElement>); + JSSVGFontElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFontElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp index cddf759c81..269812705d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFontFaceElementPrototype::self(ExecState* exec, JSGlobalObject* g const ClassInfo JSSVGFontFaceElement::s_info = { "SVGFontFaceElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGFontFaceElement::JSSVGFontFaceElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFontFaceElement> impl) - : JSSVGElement(structure, impl) +JSSVGFontFaceElement::JSSVGFontFaceElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFontFaceElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.h index 2bae1cf7fc..24829ebfef 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.h @@ -33,7 +33,7 @@ class SVGFontFaceElement; class JSSVGFontFaceElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFontFaceElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFontFaceElement>); + JSSVGFontFaceElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFontFaceElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp index bc0d0ae45f..f4f772ad7e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFontFaceFormatElementPrototype::self(ExecState* exec, JSGlobalObj const ClassInfo JSSVGFontFaceFormatElement::s_info = { "SVGFontFaceFormatElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGFontFaceFormatElement::JSSVGFontFaceFormatElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFontFaceFormatElement> impl) - : JSSVGElement(structure, impl) +JSSVGFontFaceFormatElement::JSSVGFontFaceFormatElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFontFaceFormatElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.h index e7b9ad849b..e345b40b5f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.h @@ -33,7 +33,7 @@ class SVGFontFaceFormatElement; class JSSVGFontFaceFormatElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFontFaceFormatElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFontFaceFormatElement>); + JSSVGFontFaceFormatElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFontFaceFormatElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp index 87c749a4fc..38df90f55c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFontFaceNameElementPrototype::self(ExecState* exec, JSGlobalObjec const ClassInfo JSSVGFontFaceNameElement::s_info = { "SVGFontFaceNameElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGFontFaceNameElement::JSSVGFontFaceNameElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFontFaceNameElement> impl) - : JSSVGElement(structure, impl) +JSSVGFontFaceNameElement::JSSVGFontFaceNameElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFontFaceNameElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.h index a334f98875..0aac6fdf42 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.h @@ -33,7 +33,7 @@ class SVGFontFaceNameElement; class JSSVGFontFaceNameElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFontFaceNameElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFontFaceNameElement>); + JSSVGFontFaceNameElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFontFaceNameElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp index 302e4beea8..349fcac844 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFontFaceSrcElementPrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSSVGFontFaceSrcElement::s_info = { "SVGFontFaceSrcElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGFontFaceSrcElement::JSSVGFontFaceSrcElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFontFaceSrcElement> impl) - : JSSVGElement(structure, impl) +JSSVGFontFaceSrcElement::JSSVGFontFaceSrcElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFontFaceSrcElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.h index d6852c570b..6f2fec4270 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.h @@ -33,7 +33,7 @@ class SVGFontFaceSrcElement; class JSSVGFontFaceSrcElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFontFaceSrcElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFontFaceSrcElement>); + JSSVGFontFaceSrcElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFontFaceSrcElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp index 16507ff9cf..78aadeca88 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGFontFaceUriElementPrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSSVGFontFaceUriElement::s_info = { "SVGFontFaceUriElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGFontFaceUriElement::JSSVGFontFaceUriElement(PassRefPtr<Structure> structure, PassRefPtr<SVGFontFaceUriElement> impl) - : JSSVGElement(structure, impl) +JSSVGFontFaceUriElement::JSSVGFontFaceUriElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFontFaceUriElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.h index e9b9ec2c38..27b1d348bf 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.h @@ -33,7 +33,7 @@ class SVGFontFaceUriElement; class JSSVGFontFaceUriElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGFontFaceUriElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGFontFaceUriElement>); + JSSVGFontFaceUriElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGFontFaceUriElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp index 8bac171cb0..50ad695df4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp @@ -114,8 +114,8 @@ bool JSSVGForeignObjectElementPrototype::getOwnPropertySlot(ExecState* exec, con const ClassInfo JSSVGForeignObjectElement::s_info = { "SVGForeignObjectElement", &JSSVGElement::s_info, &JSSVGForeignObjectElementTable, 0 }; -JSSVGForeignObjectElement::JSSVGForeignObjectElement(PassRefPtr<Structure> structure, PassRefPtr<SVGForeignObjectElement> impl) - : JSSVGElement(structure, impl) +JSSVGForeignObjectElement::JSSVGForeignObjectElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGForeignObjectElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -131,114 +131,129 @@ bool JSSVGForeignObjectElement::getOwnPropertySlot(ExecState* exec, const Identi JSValue jsSVGForeignObjectElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGForeignObjectElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGForeignObjectElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGForeignObjectElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGForeignObjectElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGForeignObjectElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGForeignObjectElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGForeignObjectElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGForeignObjectElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGForeignObjectElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGForeignObjectElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGForeignObjectElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGForeignObjectElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGForeignObjectElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGForeignObjectElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(static_cast<JSSVGForeignObjectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGForeignObjectElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -282,7 +297,7 @@ JSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetPresentationA const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -295,7 +310,7 @@ JSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetBBox(ExecStat SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -308,7 +323,7 @@ JSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetCTM(ExecState SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -321,7 +336,7 @@ JSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetScreenCTM(Exe SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -336,7 +351,7 @@ JSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetTransformToEl SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.h index ad699b6864..006f61ed12 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.h @@ -33,7 +33,7 @@ class SVGForeignObjectElement; class JSSVGForeignObjectElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGForeignObjectElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGForeignObjectElement>); + JSSVGForeignObjectElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGForeignObjectElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp index 1ea98b257b..d9f0222605 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp @@ -109,8 +109,8 @@ bool JSSVGGElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSSVGGElement::s_info = { "SVGGElement", &JSSVGElement::s_info, &JSSVGGElementTable, 0 }; -JSSVGGElement::JSSVGGElement(PassRefPtr<Structure> structure, PassRefPtr<SVGGElement> impl) - : JSSVGElement(structure, impl) +JSSVGGElement::JSSVGGElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGGElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -126,82 +126,93 @@ bool JSSVGGElement::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsSVGGElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGGElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGGElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGGElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGGElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGGElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGGElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGGElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGElement* castedThis = static_cast<JSSVGGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGElement* imp = static_cast<SVGGElement*>(static_cast<JSSVGGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGGElement* imp = static_cast<SVGGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGGElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -245,7 +256,7 @@ JSValue JSC_HOST_CALL jsSVGGElementPrototypeFunctionGetPresentationAttribute(Exe const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -258,7 +269,7 @@ JSValue JSC_HOST_CALL jsSVGGElementPrototypeFunctionGetBBox(ExecState* exec, JSO SVGGElement* imp = static_cast<SVGGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -271,7 +282,7 @@ JSValue JSC_HOST_CALL jsSVGGElementPrototypeFunctionGetCTM(ExecState* exec, JSOb SVGGElement* imp = static_cast<SVGGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -284,7 +295,7 @@ JSValue JSC_HOST_CALL jsSVGGElementPrototypeFunctionGetScreenCTM(ExecState* exec SVGGElement* imp = static_cast<SVGGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -299,7 +310,7 @@ JSValue JSC_HOST_CALL jsSVGGElementPrototypeFunctionGetTransformToElement(ExecSt SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.h index 62c9addaf5..920096bb5e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGElement.h @@ -33,7 +33,7 @@ class SVGGElement; class JSSVGGElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGGElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGGElement>); + JSSVGGElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGGElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp index 6cd22118a2..61ff924d1a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGGlyphElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSSVGGlyphElement::s_info = { "SVGGlyphElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGGlyphElement::JSSVGGlyphElement(PassRefPtr<Structure> structure, PassRefPtr<SVGGlyphElement> impl) - : JSSVGElement(structure, impl) +JSSVGGlyphElement::JSSVGGlyphElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGGlyphElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.h index 36105e1c6f..e2fc42906d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.h @@ -33,7 +33,7 @@ class SVGGlyphElement; class JSSVGGlyphElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGGlyphElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGGlyphElement>); + JSSVGGlyphElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGGlyphElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp index bcadbfc25f..faea429e50 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp @@ -83,12 +83,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGGradientElementConstructorTable = { 8, 7, JSSVGGradientElementConstructorTableValues, 0 }; #endif -class JSSVGGradientElementConstructor : public DOMObject { +class JSSVGGradientElementConstructor : public DOMConstructorObject { public: - JSSVGGradientElementConstructor(ExecState* exec) - : DOMObject(JSSVGGradientElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGGradientElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGGradientElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGGradientElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGGradientElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -140,8 +140,8 @@ bool JSSVGGradientElementPrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSSVGGradientElement::s_info = { "SVGGradientElement", &JSSVGElement::s_info, &JSSVGGradientElementTable, 0 }; -JSSVGGradientElement::JSSVGGradientElement(PassRefPtr<Structure> structure, PassRefPtr<SVGGradientElement> impl) - : JSSVGElement(structure, impl) +JSSVGGradientElement::JSSVGGradientElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGGradientElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -157,66 +157,74 @@ bool JSSVGGradientElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGGradientElementGradientUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGradientElement* castedThis = static_cast<JSSVGGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGradientElement* imp = static_cast<SVGGradientElement*>(static_cast<JSSVGGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGGradientElement* imp = static_cast<SVGGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->gradientUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGradientElementGradientTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGradientElement* castedThis = static_cast<JSSVGGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGradientElement* imp = static_cast<SVGGradientElement*>(static_cast<JSSVGGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGGradientElement* imp = static_cast<SVGGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->gradientTransformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGradientElementSpreadMethod(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGradientElement* castedThis = static_cast<JSSVGGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGradientElement* imp = static_cast<SVGGradientElement*>(static_cast<JSSVGGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGGradientElement* imp = static_cast<SVGGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->spreadMethodAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGradientElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGradientElement* castedThis = static_cast<JSSVGGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGradientElement* imp = static_cast<SVGGradientElement*>(static_cast<JSSVGGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGGradientElement* imp = static_cast<SVGGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGradientElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGradientElement* castedThis = static_cast<JSSVGGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGradientElement* imp = static_cast<SVGGradientElement*>(static_cast<JSSVGGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGGradientElement* imp = static_cast<SVGGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGradientElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGradientElement* castedThis = static_cast<JSSVGGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGradientElement* imp = static_cast<SVGGradientElement*>(static_cast<JSSVGGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGGradientElement* imp = static_cast<SVGGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGGradientElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGGradientElement* castedThis = static_cast<JSSVGGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGGradientElement* imp = static_cast<SVGGradientElement*>(static_cast<JSSVGGradientElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGGradientElement* imp = static_cast<SVGGradientElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGGradientElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGGradientElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGGradientElement* domObject = static_cast<JSSVGGradientElement*>(asObject(slot.slotBase())); + return JSSVGGradientElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGGradientElement::getConstructor(ExecState* exec) +JSValue JSSVGGradientElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGGradientElementConstructor>(exec); + return getDOMConstructor<JSSVGGradientElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGGradientElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -229,7 +237,7 @@ JSValue JSC_HOST_CALL jsSVGGradientElementPrototypeFunctionGetPresentationAttrib const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.h index 11646e7f13..6600e215e6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.h @@ -33,7 +33,7 @@ class SVGGradientElement; class JSSVGGradientElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGGradientElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGGradientElement>); + JSSVGGradientElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGGradientElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp index d636a277bf..1d45adedf2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGHKernElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSSVGHKernElement::s_info = { "SVGHKernElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGHKernElement::JSSVGHKernElement(PassRefPtr<Structure> structure, PassRefPtr<SVGHKernElement> impl) - : JSSVGElement(structure, impl) +JSSVGHKernElement::JSSVGHKernElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGHKernElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.h index 7718ecf468..6639fe056a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.h @@ -33,7 +33,7 @@ class SVGHKernElement; class JSSVGHKernElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGHKernElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGHKernElement>); + JSSVGHKernElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGHKernElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp index 8aaa237b24..64efb43aea 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp @@ -117,8 +117,8 @@ bool JSSVGImageElementPrototype::getOwnPropertySlot(ExecState* exec, const Ident const ClassInfo JSSVGImageElement::s_info = { "SVGImageElement", &JSSVGElement::s_info, &JSSVGImageElementTable, 0 }; -JSSVGImageElement::JSSVGImageElement(PassRefPtr<Structure> structure, PassRefPtr<SVGImageElement> impl) - : JSSVGElement(structure, impl) +JSSVGImageElement::JSSVGImageElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGImageElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -134,130 +134,147 @@ bool JSSVGImageElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsSVGImageElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementPreserveAspectRatio(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGImageElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGImageElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGImageElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGImageElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGImageElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGImageElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGImageElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGImageElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGImageElement* castedThis = static_cast<JSSVGImageElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGImageElement* imp = static_cast<SVGImageElement*>(static_cast<JSSVGImageElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGImageElement* imp = static_cast<SVGImageElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGImageElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -301,7 +318,7 @@ JSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetPresentationAttribute const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -314,7 +331,7 @@ JSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetBBox(ExecState* exec, SVGImageElement* imp = static_cast<SVGImageElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -327,7 +344,7 @@ JSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetCTM(ExecState* exec, SVGImageElement* imp = static_cast<SVGImageElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -340,7 +357,7 @@ JSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetScreenCTM(ExecState* SVGImageElement* imp = static_cast<SVGImageElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -355,7 +372,7 @@ JSValue JSC_HOST_CALL jsSVGImageElementPrototypeFunctionGetTransformToElement(Ex SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.h index 17dbffb9a0..ef2182370b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.h @@ -33,7 +33,7 @@ class SVGImageElement; class JSSVGImageElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGImageElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGImageElement>); + JSSVGImageElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGImageElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp index 7a4d143f99..dd7522dee8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp @@ -81,12 +81,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGLengthConstructorTable = { 33, 31, JSSVGLengthConstructorTableValues, 0 }; #endif -class JSSVGLengthConstructor : public DOMObject { +class JSSVGLengthConstructor : public DOMConstructorObject { public: - JSSVGLengthConstructor(ExecState* exec) - : DOMObject(JSSVGLengthConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGLengthConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGLengthConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGLengthPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGLengthPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -146,9 +146,8 @@ bool JSSVGLengthPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSSVGLength::s_info = { "SVGLength", 0, &JSSVGLengthTable, 0 }; -JSSVGLength::JSSVGLength(PassRefPtr<Structure> structure, PassRefPtr<JSSVGPODTypeWrapper<SVGLength> > impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGLength::JSSVGLength(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JSSVGPODTypeWrapper<SVGLength> > impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -171,33 +170,38 @@ bool JSSVGLength::getOwnPropertySlot(ExecState* exec, const Identifier& property JSValue jsSVGLengthUnitType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLength* castedThis = static_cast<JSSVGLength*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLength imp(*static_cast<JSSVGLength*>(asObject(slot.slotBase()))->impl()); + SVGLength imp(*castedThis->impl()); return jsNumber(exec, imp.unitType()); } JSValue jsSVGLengthValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGLength*>(asObject(slot.slotBase()))->value(exec); + JSSVGLength* castedThis = static_cast<JSSVGLength*>(asObject(slot.slotBase())); + return castedThis->value(exec); } JSValue jsSVGLengthValueInSpecifiedUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLength* castedThis = static_cast<JSSVGLength*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLength imp(*static_cast<JSSVGLength*>(asObject(slot.slotBase()))->impl()); + SVGLength imp(*castedThis->impl()); return jsNumber(exec, imp.valueInSpecifiedUnits()); } JSValue jsSVGLengthValueAsString(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLength* castedThis = static_cast<JSSVGLength*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLength imp(*static_cast<JSSVGLength*>(asObject(slot.slotBase()))->impl()); + SVGLength imp(*castedThis->impl()); return jsString(exec, imp.valueAsString()); } JSValue jsSVGLengthConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGLength*>(asObject(slot.slotBase()))->getConstructor(exec); + UNUSED_PARAM(slot); + return JSSVGLength::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec)); } void JSSVGLength::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -225,9 +229,9 @@ void setJSSVGLengthValueAsString(ExecState* exec, JSObject* thisObject, JSValue static_cast<JSSVGLength*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGLength*>(thisObject)->context()); } -JSValue JSSVGLength::getConstructor(ExecState* exec) +JSValue JSSVGLength::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGLengthConstructor>(exec); + return getDOMConstructor<JSSVGLengthConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGLengthPrototypeFunctionNewValueSpecifiedUnits(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -312,9 +316,9 @@ JSValue jsSVGLengthSVG_LENGTHTYPE_PC(ExecState* exec, const Identifier&, const P return jsNumber(exec, static_cast<int>(10)); } -JSC::JSValue toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<SVGLength>* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<SVGLength>* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGLength, JSSVGPODTypeWrapper<SVGLength> >(exec, object, context); + return getDOMObjectWrapper<JSSVGLength, JSSVGPODTypeWrapper<SVGLength> >(exec, globalObject, object, context); } SVGLength toSVGLength(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLength.h b/src/3rdparty/webkit/WebCore/generated/JSSVGLength.h index 50ea7ced3d..1bf382a81e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLength.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLength.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "JSSVGPODTypeWrapper.h" #include "SVGElement.h" @@ -32,10 +33,10 @@ namespace WebCore { -class JSSVGLength : public DOMObject { - typedef DOMObject Base; +class JSSVGLength : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGLength(PassRefPtr<JSC::Structure>, PassRefPtr<JSSVGPODTypeWrapper<SVGLength> >, SVGElement* context); + JSSVGLength(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<JSSVGPODTypeWrapper<SVGLength> >, SVGElement* context); virtual ~JSSVGLength(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,22 +49,20 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom attributes JSC::JSValue value(JSC::ExecState*) const; // Custom functions JSC::JSValue convertToSpecifiedUnits(JSC::ExecState*, const JSC::ArgList&); - JSSVGPODTypeWrapper<SVGLength>* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } + JSSVGPODTypeWrapper<SVGLength> * impl() const { return m_impl.get(); } private: - RefPtr<SVGElement> m_context; RefPtr<JSSVGPODTypeWrapper<SVGLength> > m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, JSSVGPODTypeWrapper<SVGLength>*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<SVGLength>*, SVGElement* context); SVGLength toSVGLength(JSC::JSValue); class JSSVGLengthPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp index 86b93204ed..7157d65ce2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp @@ -87,9 +87,8 @@ bool JSSVGLengthListPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSSVGLengthList::s_info = { "SVGLengthList", 0, &JSSVGLengthListTable, 0 }; -JSSVGLengthList::JSSVGLengthList(PassRefPtr<Structure> structure, PassRefPtr<SVGLengthList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGLengthList::JSSVGLengthList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGLengthList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -111,8 +110,9 @@ bool JSSVGLengthList::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsSVGLengthListNumberOfItems(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLengthList* castedThis = static_cast<JSSVGLengthList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLengthList* imp = static_cast<SVGLengthList*>(static_cast<JSSVGLengthList*>(asObject(slot.slotBase()))->impl()); + SVGLengthList* imp = static_cast<SVGLengthList*>(castedThis->impl()); return jsNumber(exec, imp->numberOfItems()); } @@ -141,7 +141,7 @@ JSValue JSC_HOST_CALL jsSVGLengthListPrototypeFunctionInitialize(ExecState* exec SVGLength item = toSVGLength(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->initialize(item, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->initialize(item, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -157,7 +157,7 @@ JSValue JSC_HOST_CALL jsSVGLengthListPrototypeFunctionGetItem(ExecState* exec, J unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->getItem(index, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->getItem(index, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -174,7 +174,7 @@ JSValue JSC_HOST_CALL jsSVGLengthListPrototypeFunctionInsertItemBefore(ExecState unsigned index = args.at(1).toInt32(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->insertItemBefore(item, index, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->insertItemBefore(item, index, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -191,7 +191,7 @@ JSValue JSC_HOST_CALL jsSVGLengthListPrototypeFunctionReplaceItem(ExecState* exe unsigned index = args.at(1).toInt32(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->replaceItem(item, index, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->replaceItem(item, index, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -207,7 +207,7 @@ JSValue JSC_HOST_CALL jsSVGLengthListPrototypeFunctionRemoveItem(ExecState* exec unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->removeItem(index, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->removeItem(index, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -223,14 +223,14 @@ JSValue JSC_HOST_CALL jsSVGLengthListPrototypeFunctionAppendItem(ExecState* exec SVGLength item = toSVGLength(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->appendItem(item, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->appendItem(item, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, SVGLengthList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGLengthList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGLengthList>(exec, object, context); + return getDOMObjectWrapper<JSSVGLengthList>(exec, globalObject, object, context); } SVGLengthList* toSVGLengthList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.h index 1345203354..88500a0366 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGLengthList; -class JSSVGLengthList : public DOMObject { - typedef DOMObject Base; +class JSSVGLengthList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGLengthList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGLengthList>, SVGElement* context); + JSSVGLengthList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGLengthList>, SVGElement* context); virtual ~JSSVGLengthList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,14 +49,12 @@ public: } SVGLengthList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGLengthList > m_impl; + RefPtr<SVGLengthList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGLengthList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGLengthList*, SVGElement* context); SVGLengthList* toSVGLengthList(JSC::JSValue); class JSSVGLengthListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp index 9e7057b49d..26f31a95e0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp @@ -114,8 +114,8 @@ bool JSSVGLineElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGLineElement::s_info = { "SVGLineElement", &JSSVGElement::s_info, &JSSVGLineElementTable, 0 }; -JSSVGLineElement::JSSVGLineElement(PassRefPtr<Structure> structure, PassRefPtr<SVGLineElement> impl) - : JSSVGElement(structure, impl) +JSSVGLineElement::JSSVGLineElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGLineElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -131,114 +131,129 @@ bool JSSVGLineElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGLineElementX1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->x1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLineElementY1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->y1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLineElementX2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->x2Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLineElementY2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->y2Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLineElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGLineElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGLineElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGLineElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGLineElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGLineElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLineElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLineElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGLineElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLineElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGLineElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLineElement* castedThis = static_cast<JSSVGLineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLineElement* imp = static_cast<SVGLineElement*>(static_cast<JSSVGLineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGLineElement* imp = static_cast<SVGLineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGLineElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -282,7 +297,7 @@ JSValue JSC_HOST_CALL jsSVGLineElementPrototypeFunctionGetPresentationAttribute( const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -295,7 +310,7 @@ JSValue JSC_HOST_CALL jsSVGLineElementPrototypeFunctionGetBBox(ExecState* exec, SVGLineElement* imp = static_cast<SVGLineElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -308,7 +323,7 @@ JSValue JSC_HOST_CALL jsSVGLineElementPrototypeFunctionGetCTM(ExecState* exec, J SVGLineElement* imp = static_cast<SVGLineElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -321,7 +336,7 @@ JSValue JSC_HOST_CALL jsSVGLineElementPrototypeFunctionGetScreenCTM(ExecState* e SVGLineElement* imp = static_cast<SVGLineElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -336,7 +351,7 @@ JSValue JSC_HOST_CALL jsSVGLineElementPrototypeFunctionGetTransformToElement(Exe SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.h index bcdee6f35c..d31e6dc1d5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.h @@ -33,7 +33,7 @@ class SVGLineElement; class JSSVGLineElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGLineElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGLineElement>); + JSSVGLineElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGLineElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp index 56ec26c21e..1e3ff9afb0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp @@ -75,8 +75,8 @@ JSObject* JSSVGLinearGradientElementPrototype::self(ExecState* exec, JSGlobalObj const ClassInfo JSSVGLinearGradientElement::s_info = { "SVGLinearGradientElement", &JSSVGGradientElement::s_info, &JSSVGLinearGradientElementTable, 0 }; -JSSVGLinearGradientElement::JSSVGLinearGradientElement(PassRefPtr<Structure> structure, PassRefPtr<SVGLinearGradientElement> impl) - : JSSVGGradientElement(structure, impl) +JSSVGLinearGradientElement::JSSVGLinearGradientElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGLinearGradientElement> impl) + : JSSVGGradientElement(structure, globalObject, impl) { } @@ -92,34 +92,38 @@ bool JSSVGLinearGradientElement::getOwnPropertySlot(ExecState* exec, const Ident JSValue jsSVGLinearGradientElementX1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLinearGradientElement* castedThis = static_cast<JSSVGLinearGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLinearGradientElement* imp = static_cast<SVGLinearGradientElement*>(static_cast<JSSVGLinearGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGLinearGradientElement* imp = static_cast<SVGLinearGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->x1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLinearGradientElementY1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLinearGradientElement* castedThis = static_cast<JSSVGLinearGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLinearGradientElement* imp = static_cast<SVGLinearGradientElement*>(static_cast<JSSVGLinearGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGLinearGradientElement* imp = static_cast<SVGLinearGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->y1Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLinearGradientElementX2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLinearGradientElement* castedThis = static_cast<JSSVGLinearGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLinearGradientElement* imp = static_cast<SVGLinearGradientElement*>(static_cast<JSSVGLinearGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGLinearGradientElement* imp = static_cast<SVGLinearGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->x2Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGLinearGradientElementY2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGLinearGradientElement* castedThis = static_cast<JSSVGLinearGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGLinearGradientElement* imp = static_cast<SVGLinearGradientElement*>(static_cast<JSSVGLinearGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGLinearGradientElement* imp = static_cast<SVGLinearGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->y2Animated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.h index e05e515525..737db34f99 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.h @@ -33,7 +33,7 @@ class SVGLinearGradientElement; class JSSVGLinearGradientElement : public JSSVGGradientElement { typedef JSSVGGradientElement Base; public: - JSSVGLinearGradientElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGLinearGradientElement>); + JSSVGLinearGradientElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGLinearGradientElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp index d1b0cd6b96..d7a3b8232b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp @@ -98,12 +98,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGMarkerElementConstructorTable = { 16, 15, JSSVGMarkerElementConstructorTableValues, 0 }; #endif -class JSSVGMarkerElementConstructor : public DOMObject { +class JSSVGMarkerElementConstructor : public DOMConstructorObject { public: - JSSVGMarkerElementConstructor(ExecState* exec) - : DOMObject(JSSVGMarkerElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGMarkerElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGMarkerElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGMarkerElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGMarkerElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -159,8 +159,8 @@ bool JSSVGMarkerElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSSVGMarkerElement::s_info = { "SVGMarkerElement", &JSSVGElement::s_info, &JSSVGMarkerElementTable, 0 }; -JSSVGMarkerElement::JSSVGMarkerElement(PassRefPtr<Structure> structure, PassRefPtr<SVGMarkerElement> impl) - : JSSVGElement(structure, impl) +JSSVGMarkerElement::JSSVGMarkerElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGMarkerElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -176,116 +176,131 @@ bool JSSVGMarkerElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGMarkerElementRefX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->refXAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementRefY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->refYAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementMarkerUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->markerUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementMarkerWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->markerWidthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementMarkerHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->markerHeightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementOrientType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->orientTypeAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementOrientAngle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedAngle> obj = imp->orientAngleAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGMarkerElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGMarkerElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGMarkerElementViewBox(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedRect> obj = imp->viewBoxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementPreserveAspectRatio(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMarkerElement* castedThis = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->impl()); + SVGMarkerElement* imp = static_cast<SVGMarkerElement*>(castedThis->impl()); RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMarkerElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGMarkerElement* domObject = static_cast<JSSVGMarkerElement*>(asObject(slot.slotBase())); + return JSSVGMarkerElement::getConstructor(exec, domObject->globalObject()); } void JSSVGMarkerElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -304,9 +319,9 @@ void setJSSVGMarkerElementXmlspace(ExecState* exec, JSObject* thisObject, JSValu imp->setXmlspace(value.toString(exec)); } -JSValue JSSVGMarkerElement::getConstructor(ExecState* exec) +JSValue JSSVGMarkerElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGMarkerElementConstructor>(exec); + return getDOMConstructor<JSSVGMarkerElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGMarkerElementPrototypeFunctionSetOrientToAuto(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -344,7 +359,7 @@ JSValue JSC_HOST_CALL jsSVGMarkerElementPrototypeFunctionGetPresentationAttribut const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.h index bf626c7b34..4aad9ee891 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.h @@ -33,7 +33,7 @@ class SVGMarkerElement; class JSSVGMarkerElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGMarkerElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGMarkerElement>); + JSSVGMarkerElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGMarkerElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -45,7 +45,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp index c266956562..4919818bde 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp @@ -105,8 +105,8 @@ bool JSSVGMaskElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGMaskElement::s_info = { "SVGMaskElement", &JSSVGElement::s_info, &JSSVGMaskElementTable, 0 }; -JSSVGMaskElement::JSSVGMaskElement(PassRefPtr<Structure> structure, PassRefPtr<SVGMaskElement> impl) - : JSSVGElement(structure, impl) +JSSVGMaskElement::JSSVGMaskElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGMaskElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -122,108 +122,122 @@ bool JSSVGMaskElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGMaskElementMaskUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->maskUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMaskElementMaskContentUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->maskContentUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMaskElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMaskElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMaskElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMaskElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMaskElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGMaskElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGMaskElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGMaskElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGMaskElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGMaskElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMaskElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGMaskElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMaskElement* castedThis = static_cast<JSSVGMaskElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGMaskElement* imp = static_cast<SVGMaskElement*>(static_cast<JSSVGMaskElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGMaskElement* imp = static_cast<SVGMaskElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } void JSSVGMaskElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -267,7 +281,7 @@ JSValue JSC_HOST_CALL jsSVGMaskElementPrototypeFunctionGetPresentationAttribute( const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.h index 51f35cc49d..f8f7abfe34 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.h @@ -33,7 +33,7 @@ class SVGMaskElement; class JSSVGMaskElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGMaskElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGMaskElement>); + JSSVGMaskElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGMaskElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp index e668ab2812..d38cbec8cc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp @@ -94,9 +94,8 @@ bool JSSVGMatrixPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSSVGMatrix::s_info = { "SVGMatrix", 0, &JSSVGMatrixTable, 0 }; -JSSVGMatrix::JSSVGMatrix(PassRefPtr<Structure> structure, PassRefPtr<JSSVGPODTypeWrapper<TransformationMatrix> > impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGMatrix::JSSVGMatrix(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JSSVGPODTypeWrapper<TransformationMatrix> > impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -118,43 +117,49 @@ bool JSSVGMatrix::getOwnPropertySlot(ExecState* exec, const Identifier& property JSValue jsSVGMatrixA(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl()); + TransformationMatrix imp(*castedThis->impl()); return jsNumber(exec, imp.a()); } JSValue jsSVGMatrixB(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl()); + TransformationMatrix imp(*castedThis->impl()); return jsNumber(exec, imp.b()); } JSValue jsSVGMatrixC(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl()); + TransformationMatrix imp(*castedThis->impl()); return jsNumber(exec, imp.c()); } JSValue jsSVGMatrixD(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl()); + TransformationMatrix imp(*castedThis->impl()); return jsNumber(exec, imp.d()); } JSValue jsSVGMatrixE(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl()); + TransformationMatrix imp(*castedThis->impl()); return jsNumber(exec, imp.e()); } JSValue jsSVGMatrixF(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl()); + TransformationMatrix imp(*castedThis->impl()); return jsNumber(exec, imp.f()); } @@ -216,7 +221,7 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionMultiply(ExecState* exec, JSOb TransformationMatrix secondMatrix = toSVGMatrix(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.multiply(secondMatrix)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.multiply(secondMatrix)).get(), castedThisObj->context()); return result; } @@ -241,7 +246,7 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionTranslate(ExecState* exec, JSO float y = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.translate(x, y)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.translate(x, y)).get(), castedThisObj->context()); return result; } @@ -256,7 +261,7 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionScale(ExecState* exec, JSObjec float scaleFactor = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.scale(scaleFactor)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.scale(scaleFactor)).get(), castedThisObj->context()); return result; } @@ -272,7 +277,7 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionScaleNonUniform(ExecState* exe float scaleFactorY = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.scaleNonUniform(scaleFactorX, scaleFactorY)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.scaleNonUniform(scaleFactorX, scaleFactorY)).get(), castedThisObj->context()); return result; } @@ -287,7 +292,7 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionRotate(ExecState* exec, JSObje float angle = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotate(angle)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotate(angle)).get(), castedThisObj->context()); return result; } @@ -310,7 +315,7 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionFlipX(ExecState* exec, JSObjec TransformationMatrix imp(*wrapper); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.flipX()).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.flipX()).get(), castedThisObj->context()); return result; } @@ -324,7 +329,7 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionFlipY(ExecState* exec, JSObjec TransformationMatrix imp(*wrapper); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.flipY()).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.flipY()).get(), castedThisObj->context()); return result; } @@ -339,7 +344,7 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionSkewX(ExecState* exec, JSObjec float angle = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.skewX(angle)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.skewX(angle)).get(), castedThisObj->context()); return result; } @@ -354,13 +359,13 @@ JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionSkewY(ExecState* exec, JSObjec float angle = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.skewY(angle)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.skewY(angle)).get(), castedThisObj->context()); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<TransformationMatrix>* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<TransformationMatrix>* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGMatrix, JSSVGPODTypeWrapper<TransformationMatrix> >(exec, object, context); + return getDOMObjectWrapper<JSSVGMatrix, JSSVGPODTypeWrapper<TransformationMatrix> >(exec, globalObject, object, context); } TransformationMatrix toSVGMatrix(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.h b/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.h index c1c9068db0..b4a07f7e58 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "JSSVGPODTypeWrapper.h" #include "SVGElement.h" @@ -32,10 +33,10 @@ namespace WebCore { -class JSSVGMatrix : public DOMObject { - typedef DOMObject Base; +class JSSVGMatrix : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGMatrix(PassRefPtr<JSC::Structure>, PassRefPtr<JSSVGPODTypeWrapper<TransformationMatrix> >, SVGElement* context); + JSSVGMatrix(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<JSSVGPODTypeWrapper<TransformationMatrix> >, SVGElement* context); virtual ~JSSVGMatrix(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -52,15 +53,13 @@ public: // Custom functions JSC::JSValue inverse(JSC::ExecState*, const JSC::ArgList&); JSC::JSValue rotateFromVector(JSC::ExecState*, const JSC::ArgList&); - JSSVGPODTypeWrapper<TransformationMatrix>* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } + JSSVGPODTypeWrapper<TransformationMatrix> * impl() const { return m_impl.get(); } private: - RefPtr<SVGElement> m_context; RefPtr<JSSVGPODTypeWrapper<TransformationMatrix> > m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, JSSVGPODTypeWrapper<TransformationMatrix>*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<TransformationMatrix>*, SVGElement* context); TransformationMatrix toSVGMatrix(JSC::JSValue); class JSSVGMatrixPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp index 500bb33968..ee3f9789fd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGMetadataElementPrototype::self(ExecState* exec, JSGlobalObject* g const ClassInfo JSSVGMetadataElement::s_info = { "SVGMetadataElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGMetadataElement::JSSVGMetadataElement(PassRefPtr<Structure> structure, PassRefPtr<SVGMetadataElement> impl) - : JSSVGElement(structure, impl) +JSSVGMetadataElement::JSSVGMetadataElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGMetadataElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.h index 49eb3526d4..f6d97ee573 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.h @@ -33,7 +33,7 @@ class SVGMetadataElement; class JSSVGMetadataElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGMetadataElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGMetadataElement>); + JSSVGMetadataElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGMetadataElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp index b6efc8cbb0..279a7c7fff 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGMissingGlyphElementPrototype::self(ExecState* exec, JSGlobalObjec const ClassInfo JSSVGMissingGlyphElement::s_info = { "SVGMissingGlyphElement", &JSSVGElement::s_info, 0, 0 }; -JSSVGMissingGlyphElement::JSSVGMissingGlyphElement(PassRefPtr<Structure> structure, PassRefPtr<SVGMissingGlyphElement> impl) - : JSSVGElement(structure, impl) +JSSVGMissingGlyphElement::JSSVGMissingGlyphElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGMissingGlyphElement> impl) + : JSSVGElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.h index 76be663527..035160a76a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.h @@ -33,7 +33,7 @@ class SVGMissingGlyphElement; class JSSVGMissingGlyphElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGMissingGlyphElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGMissingGlyphElement>); + JSSVGMissingGlyphElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGMissingGlyphElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp index 491e6bfbfb..3131b44001 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp @@ -71,9 +71,8 @@ JSObject* JSSVGNumberPrototype::self(ExecState* exec, JSGlobalObject* globalObje const ClassInfo JSSVGNumber::s_info = { "SVGNumber", 0, &JSSVGNumberTable, 0 }; -JSSVGNumber::JSSVGNumber(PassRefPtr<Structure> structure, PassRefPtr<JSSVGPODTypeWrapper<float> > impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGNumber::JSSVGNumber(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JSSVGPODTypeWrapper<float> > impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -95,8 +94,9 @@ bool JSSVGNumber::getOwnPropertySlot(ExecState* exec, const Identifier& property JSValue jsSVGNumberValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGNumber* castedThis = static_cast<JSSVGNumber*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - float imp(*static_cast<JSSVGNumber*>(asObject(slot.slotBase()))->impl()); + float imp(*castedThis->impl()); return jsNumber(exec, imp); } @@ -112,9 +112,9 @@ void setJSSVGNumberValue(ExecState* exec, JSObject* thisObject, JSValue value) static_cast<JSSVGNumber*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGNumber*>(thisObject)->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<float>* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<float>* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGNumber, JSSVGPODTypeWrapper<float> >(exec, object, context); + return getDOMObjectWrapper<JSSVGNumber, JSSVGPODTypeWrapper<float> >(exec, globalObject, object, context); } float toSVGNumber(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.h b/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.h index 08bfe82881..de5e02350b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "JSSVGPODTypeWrapper.h" #include "SVGElement.h" @@ -31,10 +32,10 @@ namespace WebCore { -class JSSVGNumber : public DOMObject { - typedef DOMObject Base; +class JSSVGNumber : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGNumber(PassRefPtr<JSC::Structure>, PassRefPtr<JSSVGPODTypeWrapper<float> >, SVGElement* context); + JSSVGNumber(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<JSSVGPODTypeWrapper<float> >, SVGElement* context); virtual ~JSSVGNumber(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,15 +48,13 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - JSSVGPODTypeWrapper<float>* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } + JSSVGPODTypeWrapper<float> * impl() const { return m_impl.get(); } private: - RefPtr<SVGElement> m_context; RefPtr<JSSVGPODTypeWrapper<float> > m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, JSSVGPODTypeWrapper<float>*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<float>*, SVGElement* context); float toSVGNumber(JSC::JSValue); class JSSVGNumberPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp index 1558247dbb..8a635dd03f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp @@ -86,9 +86,8 @@ bool JSSVGNumberListPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSSVGNumberList::s_info = { "SVGNumberList", 0, &JSSVGNumberListTable, 0 }; -JSSVGNumberList::JSSVGNumberList(PassRefPtr<Structure> structure, PassRefPtr<SVGNumberList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGNumberList::JSSVGNumberList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGNumberList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -110,8 +109,9 @@ bool JSSVGNumberList::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsSVGNumberListNumberOfItems(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGNumberList* castedThis = static_cast<JSSVGNumberList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGNumberList* imp = static_cast<SVGNumberList*>(static_cast<JSSVGNumberList*>(asObject(slot.slotBase()))->impl()); + SVGNumberList* imp = static_cast<SVGNumberList*>(castedThis->impl()); return jsNumber(exec, imp->numberOfItems()); } @@ -140,7 +140,7 @@ JSValue JSC_HOST_CALL jsSVGNumberListPrototypeFunctionInitialize(ExecState* exec float item = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<float>::create(imp->initialize(item, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<float>::create(imp->initialize(item, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -156,7 +156,7 @@ JSValue JSC_HOST_CALL jsSVGNumberListPrototypeFunctionGetItem(ExecState* exec, J unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<float>::create(imp->getItem(index, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<float>::create(imp->getItem(index, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -173,7 +173,7 @@ JSValue JSC_HOST_CALL jsSVGNumberListPrototypeFunctionInsertItemBefore(ExecState unsigned index = args.at(1).toInt32(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<float>::create(imp->insertItemBefore(item, index, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<float>::create(imp->insertItemBefore(item, index, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -190,7 +190,7 @@ JSValue JSC_HOST_CALL jsSVGNumberListPrototypeFunctionReplaceItem(ExecState* exe unsigned index = args.at(1).toInt32(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<float>::create(imp->replaceItem(item, index, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<float>::create(imp->replaceItem(item, index, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -206,7 +206,7 @@ JSValue JSC_HOST_CALL jsSVGNumberListPrototypeFunctionRemoveItem(ExecState* exec unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<float>::create(imp->removeItem(index, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<float>::create(imp->removeItem(index, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } @@ -222,14 +222,14 @@ JSValue JSC_HOST_CALL jsSVGNumberListPrototypeFunctionAppendItem(ExecState* exec float item = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<float>::create(imp->appendItem(item, ec)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<float>::create(imp->appendItem(item, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, SVGNumberList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGNumberList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGNumberList>(exec, object, context); + return getDOMObjectWrapper<JSSVGNumberList>(exec, globalObject, object, context); } SVGNumberList* toSVGNumberList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.h index 3eb5ece31d..9e7b0b5d5b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGNumberList; -class JSSVGNumberList : public DOMObject { - typedef DOMObject Base; +class JSSVGNumberList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGNumberList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGNumberList>, SVGElement* context); + JSSVGNumberList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGNumberList>, SVGElement* context); virtual ~JSSVGNumberList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,14 +49,12 @@ public: } SVGNumberList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGNumberList > m_impl; + RefPtr<SVGNumberList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGNumberList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGNumberList*, SVGElement* context); SVGNumberList* toSVGNumberList(JSC::JSValue); class JSSVGNumberListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp index f3e7b6f466..732860adcd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp @@ -78,12 +78,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGPaintConstructorTable = { 35, 31, JSSVGPaintConstructorTableValues, 0 }; #endif -class JSSVGPaintConstructor : public DOMObject { +class JSSVGPaintConstructor : public DOMConstructorObject { public: - JSSVGPaintConstructor(ExecState* exec) - : DOMObject(JSSVGPaintConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGPaintConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGPaintConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGPaintPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGPaintPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -142,8 +142,8 @@ bool JSSVGPaintPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSSVGPaint::s_info = { "SVGPaint", &JSSVGColor::s_info, &JSSVGPaintTable, 0 }; -JSSVGPaint::JSSVGPaint(PassRefPtr<Structure> structure, PassRefPtr<SVGPaint> impl) - : JSSVGColor(structure, impl) +JSSVGPaint::JSSVGPaint(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPaint> impl) + : JSSVGColor(structure, globalObject, impl) { } @@ -159,25 +159,28 @@ bool JSSVGPaint::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsSVGPaintPaintType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPaint* castedThis = static_cast<JSSVGPaint*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPaint* imp = static_cast<SVGPaint*>(static_cast<JSSVGPaint*>(asObject(slot.slotBase()))->impl()); + SVGPaint* imp = static_cast<SVGPaint*>(castedThis->impl()); return jsNumber(exec, imp->paintType()); } JSValue jsSVGPaintUri(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPaint* castedThis = static_cast<JSSVGPaint*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPaint* imp = static_cast<SVGPaint*>(static_cast<JSSVGPaint*>(asObject(slot.slotBase()))->impl()); + SVGPaint* imp = static_cast<SVGPaint*>(castedThis->impl()); return jsString(exec, imp->uri()); } JSValue jsSVGPaintConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGPaint*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGPaint* domObject = static_cast<JSSVGPaint*>(asObject(slot.slotBase())); + return JSSVGPaint::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGPaint::getConstructor(ExecState* exec) +JSValue JSSVGPaint::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGPaintConstructor>(exec); + return getDOMConstructor<JSSVGPaintConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGPaintPrototypeFunctionSetUri(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.h index 495c5dd2ad..a751b9d731 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPaint.h @@ -33,7 +33,7 @@ class SVGPaint; class JSSVGPaint : public JSSVGColor { typedef JSSVGColor Base; public: - JSSVGPaint(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPaint>); + JSSVGPaint(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPaint>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp index 8da1204c08..fd5c679c21 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp @@ -170,8 +170,8 @@ bool JSSVGPathElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGPathElement::s_info = { "SVGPathElement", &JSSVGElement::s_info, &JSSVGPathElementTable, 0 }; -JSSVGPathElement::JSSVGPathElement(PassRefPtr<Structure> structure, PassRefPtr<SVGPathElement> impl) - : JSSVGElement(structure, impl) +JSSVGPathElement::JSSVGPathElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -187,118 +187,134 @@ bool JSSVGPathElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGPathElementPathLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->pathLengthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPathElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGPathElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGPathElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGPathElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGPathElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGPathElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPathElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPathElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGPathElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPathElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGPathElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } JSValue jsSVGPathElementPathSegList(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->pathSegList()), imp); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->pathSegList()), imp); } JSValue jsSVGPathElementNormalizedPathSegList(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->normalizedPathSegList()), imp); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->normalizedPathSegList()), imp); } JSValue jsSVGPathElementAnimatedPathSegList(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animatedPathSegList()), imp); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->animatedPathSegList()), imp); } JSValue jsSVGPathElementAnimatedNormalizedPathSegList(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathElement* castedThis = static_cast<JSSVGPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animatedNormalizedPathSegList()), imp); + SVGPathElement* imp = static_cast<SVGPathElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->animatedNormalizedPathSegList()), imp); } void JSSVGPathElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -341,7 +357,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionGetPointAtLength(ExecStat float distance = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->getPointAtLength(distance)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->getPointAtLength(distance)).get(), imp); return result; } @@ -368,7 +384,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegClosePath SVGPathElement* imp = static_cast<SVGPathElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegClosePath()), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegClosePath()), imp); return result; } @@ -383,7 +399,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegMovetoAbs float y = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegMovetoAbs(x, y)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegMovetoAbs(x, y)), imp); return result; } @@ -398,7 +414,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegMovetoRel float y = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegMovetoRel(x, y)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegMovetoRel(x, y)), imp); return result; } @@ -413,7 +429,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegLinetoAbs float y = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegLinetoAbs(x, y)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegLinetoAbs(x, y)), imp); return result; } @@ -428,7 +444,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegLinetoRel float y = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegLinetoRel(x, y)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegLinetoRel(x, y)), imp); return result; } @@ -447,7 +463,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegCurvetoCu float y2 = args.at(5).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2)), imp); return result; } @@ -466,7 +482,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegCurvetoCu float y2 = args.at(5).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2)), imp); return result; } @@ -483,7 +499,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegCurvetoQu float y1 = args.at(3).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1)), imp); return result; } @@ -500,7 +516,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegCurvetoQu float y1 = args.at(3).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticRel(x, y, x1, y1)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticRel(x, y, x1, y1)), imp); return result; } @@ -520,7 +536,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegArcAbs(Ex bool sweepFlag = args.at(6).toBoolean(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegArcAbs(x, y, r1, r2, angle, largeArcFlag, sweepFlag)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegArcAbs(x, y, r1, r2, angle, largeArcFlag, sweepFlag)), imp); return result; } @@ -540,7 +556,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegArcRel(Ex bool sweepFlag = args.at(6).toBoolean(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegArcRel(x, y, r1, r2, angle, largeArcFlag, sweepFlag)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegArcRel(x, y, r1, r2, angle, largeArcFlag, sweepFlag)), imp); return result; } @@ -554,7 +570,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegLinetoHor float x = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegLinetoHorizontalAbs(x)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegLinetoHorizontalAbs(x)), imp); return result; } @@ -568,7 +584,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegLinetoHor float x = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegLinetoHorizontalRel(x)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegLinetoHorizontalRel(x)), imp); return result; } @@ -582,7 +598,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegLinetoVer float y = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegLinetoVerticalAbs(y)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegLinetoVerticalAbs(y)), imp); return result; } @@ -596,7 +612,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegLinetoVer float y = args.at(0).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegLinetoVerticalRel(y)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegLinetoVerticalRel(y)), imp); return result; } @@ -613,7 +629,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegCurvetoCu float y2 = args.at(3).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2)), imp); return result; } @@ -630,7 +646,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegCurvetoCu float y2 = args.at(3).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2)), imp); return result; } @@ -645,7 +661,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegCurvetoQu float y = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticSmoothAbs(x, y)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticSmoothAbs(x, y)), imp); return result; } @@ -660,7 +676,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionCreateSVGPathSegCurvetoQu float y = args.at(1).toFloat(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticSmoothRel(x, y)), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticSmoothRel(x, y)), imp); return result; } @@ -688,7 +704,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionGetPresentationAttribute( const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -701,7 +717,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionGetBBox(ExecState* exec, SVGPathElement* imp = static_cast<SVGPathElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -714,7 +730,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionGetCTM(ExecState* exec, J SVGPathElement* imp = static_cast<SVGPathElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -727,7 +743,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionGetScreenCTM(ExecState* e SVGPathElement* imp = static_cast<SVGPathElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -742,7 +758,7 @@ JSValue JSC_HOST_CALL jsSVGPathElementPrototypeFunctionGetTransformToElement(Exe SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.h index 62fa4397a8..e96b612903 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.h @@ -33,7 +33,7 @@ class SVGPathElement; class JSSVGPathElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGPathElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathElement>); + JSSVGPathElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp index b19e3a0aae..04e307812e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp @@ -87,12 +87,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGPathSegConstructorTable = { 70, 63, JSSVGPathSegConstructorTableValues, 0 }; #endif -class JSSVGPathSegConstructor : public DOMObject { +class JSSVGPathSegConstructor : public DOMConstructorObject { public: - JSSVGPathSegConstructor(ExecState* exec) - : DOMObject(JSSVGPathSegConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGPathSegConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGPathSegConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGPathSegPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGPathSegPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -159,9 +159,8 @@ bool JSSVGPathSegPrototype::getOwnPropertySlot(ExecState* exec, const Identifier const ClassInfo JSSVGPathSeg::s_info = { "SVGPathSeg", 0, &JSSVGPathSegTable, 0 }; -JSSVGPathSeg::JSSVGPathSeg(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSeg> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGPathSeg::JSSVGPathSeg(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSeg> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -183,25 +182,28 @@ bool JSSVGPathSeg::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsSVGPathSegPathSegType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSeg* castedThis = static_cast<JSSVGPathSeg*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSeg* imp = static_cast<SVGPathSeg*>(static_cast<JSSVGPathSeg*>(asObject(slot.slotBase()))->impl()); + SVGPathSeg* imp = static_cast<SVGPathSeg*>(castedThis->impl()); return jsNumber(exec, imp->pathSegType()); } JSValue jsSVGPathSegPathSegTypeAsLetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSeg* castedThis = static_cast<JSSVGPathSeg*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSeg* imp = static_cast<SVGPathSeg*>(static_cast<JSSVGPathSeg*>(asObject(slot.slotBase()))->impl()); + SVGPathSeg* imp = static_cast<SVGPathSeg*>(castedThis->impl()); return jsString(exec, imp->pathSegTypeAsLetter()); } JSValue jsSVGPathSegConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGPathSeg*>(asObject(slot.slotBase()))->getConstructor(exec); + UNUSED_PARAM(slot); + return JSSVGPathSeg::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec)); } -JSValue JSSVGPathSeg::getConstructor(ExecState* exec) +JSValue JSSVGPathSeg::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGPathSegConstructor>(exec); + return getDOMConstructor<JSSVGPathSegConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.h index 7ba6512a26..7fb1ab4896 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGPathSeg; -class JSSVGPathSeg : public DOMObject { - typedef DOMObject Base; +class JSSVGPathSeg : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGPathSeg(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSeg>, SVGElement* context); + JSSVGPathSeg(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSeg>, SVGElement* context); virtual ~JSSVGPathSeg(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,16 +48,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); SVGPathSeg* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGPathSeg > m_impl; + RefPtr<SVGPathSeg> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGPathSeg*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGPathSeg*, SVGElement* context); SVGPathSeg* toSVGPathSeg(JSC::JSValue); class JSSVGPathSegPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp index d8f37b2a54..1edda2e894 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp @@ -78,8 +78,8 @@ JSObject* JSSVGPathSegArcAbsPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSSVGPathSegArcAbs::s_info = { "SVGPathSegArcAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegArcAbsTable, 0 }; -JSSVGPathSegArcAbs::JSSVGPathSegArcAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegArcAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegArcAbs::JSSVGPathSegArcAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegArcAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -95,50 +95,57 @@ bool JSSVGPathSegArcAbs::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGPathSegArcAbsX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcAbs* castedThis = static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegArcAbsY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcAbs* castedThis = static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsSVGPathSegArcAbsR1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcAbs* castedThis = static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(castedThis->impl()); return jsNumber(exec, imp->r1()); } JSValue jsSVGPathSegArcAbsR2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcAbs* castedThis = static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(castedThis->impl()); return jsNumber(exec, imp->r2()); } JSValue jsSVGPathSegArcAbsAngle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcAbs* castedThis = static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(castedThis->impl()); return jsNumber(exec, imp->angle()); } JSValue jsSVGPathSegArcAbsLargeArcFlag(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcAbs* castedThis = static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(castedThis->impl()); return jsBoolean(imp->largeArcFlag()); } JSValue jsSVGPathSegArcAbsSweepFlag(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcAbs* castedThis = static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(static_cast<JSSVGPathSegArcAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcAbs* imp = static_cast<SVGPathSegArcAbs*>(castedThis->impl()); return jsBoolean(imp->sweepFlag()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.h index b051822f1d..d91b14afff 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.h @@ -33,7 +33,7 @@ class SVGPathSegArcAbs; class JSSVGPathSegArcAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegArcAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegArcAbs>, SVGElement* context); + JSSVGPathSegArcAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegArcAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp index 0f59520f07..0c5bc66518 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp @@ -78,8 +78,8 @@ JSObject* JSSVGPathSegArcRelPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSSVGPathSegArcRel::s_info = { "SVGPathSegArcRel", &JSSVGPathSeg::s_info, &JSSVGPathSegArcRelTable, 0 }; -JSSVGPathSegArcRel::JSSVGPathSegArcRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegArcRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegArcRel::JSSVGPathSegArcRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegArcRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -95,50 +95,57 @@ bool JSSVGPathSegArcRel::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGPathSegArcRelX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcRel* castedThis = static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegArcRelY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcRel* castedThis = static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsSVGPathSegArcRelR1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcRel* castedThis = static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(castedThis->impl()); return jsNumber(exec, imp->r1()); } JSValue jsSVGPathSegArcRelR2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcRel* castedThis = static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(castedThis->impl()); return jsNumber(exec, imp->r2()); } JSValue jsSVGPathSegArcRelAngle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcRel* castedThis = static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(castedThis->impl()); return jsNumber(exec, imp->angle()); } JSValue jsSVGPathSegArcRelLargeArcFlag(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcRel* castedThis = static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(castedThis->impl()); return jsBoolean(imp->largeArcFlag()); } JSValue jsSVGPathSegArcRelSweepFlag(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegArcRel* castedThis = static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(static_cast<JSSVGPathSegArcRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegArcRel* imp = static_cast<SVGPathSegArcRel*>(castedThis->impl()); return jsBoolean(imp->sweepFlag()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.h index 22028d24df..4bb6d0aad8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.h @@ -33,7 +33,7 @@ class SVGPathSegArcRel; class JSSVGPathSegArcRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegArcRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegArcRel>, SVGElement* context); + JSSVGPathSegArcRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegArcRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp index 1519f2a189..bb220e4717 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGPathSegClosePathPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSSVGPathSegClosePath::s_info = { "SVGPathSegClosePath", &JSSVGPathSeg::s_info, 0, 0 }; -JSSVGPathSegClosePath::JSSVGPathSegClosePath(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegClosePath> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegClosePath::JSSVGPathSegClosePath(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegClosePath> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.h index 749eab1cb8..8a44528a91 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.h @@ -33,7 +33,7 @@ class SVGPathSegClosePath; class JSSVGPathSegClosePath : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegClosePath(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegClosePath>, SVGElement* context); + JSSVGPathSegClosePath(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegClosePath>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp index c86265355b..012e821baf 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp @@ -77,8 +77,8 @@ JSObject* JSSVGPathSegCurvetoCubicAbsPrototype::self(ExecState* exec, JSGlobalOb const ClassInfo JSSVGPathSegCurvetoCubicAbs::s_info = { "SVGPathSegCurvetoCubicAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegCurvetoCubicAbsTable, 0 }; -JSSVGPathSegCurvetoCubicAbs::JSSVGPathSegCurvetoCubicAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegCurvetoCubicAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegCurvetoCubicAbs::JSSVGPathSegCurvetoCubicAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoCubicAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -94,43 +94,49 @@ bool JSSVGPathSegCurvetoCubicAbs::getOwnPropertySlot(ExecState* exec, const Iden JSValue jsSVGPathSegCurvetoCubicAbsX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegCurvetoCubicAbsY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsSVGPathSegCurvetoCubicAbsX1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(castedThis->impl()); return jsNumber(exec, imp->x1()); } JSValue jsSVGPathSegCurvetoCubicAbsY1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(castedThis->impl()); return jsNumber(exec, imp->y1()); } JSValue jsSVGPathSegCurvetoCubicAbsX2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(castedThis->impl()); return jsNumber(exec, imp->x2()); } JSValue jsSVGPathSegCurvetoCubicAbsY2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(static_cast<JSSVGPathSegCurvetoCubicAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicAbs* imp = static_cast<SVGPathSegCurvetoCubicAbs*>(castedThis->impl()); return jsNumber(exec, imp->y2()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.h index 7ffb1a0043..e53a2080a7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.h @@ -33,7 +33,7 @@ class SVGPathSegCurvetoCubicAbs; class JSSVGPathSegCurvetoCubicAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegCurvetoCubicAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegCurvetoCubicAbs>, SVGElement* context); + JSSVGPathSegCurvetoCubicAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegCurvetoCubicAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp index 84c349cc53..c2b5c9b135 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp @@ -77,8 +77,8 @@ JSObject* JSSVGPathSegCurvetoCubicRelPrototype::self(ExecState* exec, JSGlobalOb const ClassInfo JSSVGPathSegCurvetoCubicRel::s_info = { "SVGPathSegCurvetoCubicRel", &JSSVGPathSeg::s_info, &JSSVGPathSegCurvetoCubicRelTable, 0 }; -JSSVGPathSegCurvetoCubicRel::JSSVGPathSegCurvetoCubicRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegCurvetoCubicRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegCurvetoCubicRel::JSSVGPathSegCurvetoCubicRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoCubicRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -94,43 +94,49 @@ bool JSSVGPathSegCurvetoCubicRel::getOwnPropertySlot(ExecState* exec, const Iden JSValue jsSVGPathSegCurvetoCubicRelX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegCurvetoCubicRelY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsSVGPathSegCurvetoCubicRelX1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(castedThis->impl()); return jsNumber(exec, imp->x1()); } JSValue jsSVGPathSegCurvetoCubicRelY1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(castedThis->impl()); return jsNumber(exec, imp->y1()); } JSValue jsSVGPathSegCurvetoCubicRelX2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(castedThis->impl()); return jsNumber(exec, imp->x2()); } JSValue jsSVGPathSegCurvetoCubicRelY2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(static_cast<JSSVGPathSegCurvetoCubicRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicRel* imp = static_cast<SVGPathSegCurvetoCubicRel*>(castedThis->impl()); return jsNumber(exec, imp->y2()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.h index 87d358d820..0f79a9504c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.h @@ -33,7 +33,7 @@ class SVGPathSegCurvetoCubicRel; class JSSVGPathSegCurvetoCubicRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegCurvetoCubicRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegCurvetoCubicRel>, SVGElement* context); + JSSVGPathSegCurvetoCubicRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegCurvetoCubicRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp index f5716b0f80..2ac3d0e3f1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp @@ -75,8 +75,8 @@ JSObject* JSSVGPathSegCurvetoCubicSmoothAbsPrototype::self(ExecState* exec, JSGl const ClassInfo JSSVGPathSegCurvetoCubicSmoothAbs::s_info = { "SVGPathSegCurvetoCubicSmoothAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegCurvetoCubicSmoothAbsTable, 0 }; -JSSVGPathSegCurvetoCubicSmoothAbs::JSSVGPathSegCurvetoCubicSmoothAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegCurvetoCubicSmoothAbs::JSSVGPathSegCurvetoCubicSmoothAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -92,29 +92,33 @@ bool JSSVGPathSegCurvetoCubicSmoothAbs::getOwnPropertySlot(ExecState* exec, cons JSValue jsSVGPathSegCurvetoCubicSmoothAbsX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicSmoothAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicSmoothAbs* imp = static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(static_cast<JSSVGPathSegCurvetoCubicSmoothAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicSmoothAbs* imp = static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegCurvetoCubicSmoothAbsY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicSmoothAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicSmoothAbs* imp = static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(static_cast<JSSVGPathSegCurvetoCubicSmoothAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicSmoothAbs* imp = static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsSVGPathSegCurvetoCubicSmoothAbsX2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicSmoothAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicSmoothAbs* imp = static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(static_cast<JSSVGPathSegCurvetoCubicSmoothAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicSmoothAbs* imp = static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(castedThis->impl()); return jsNumber(exec, imp->x2()); } JSValue jsSVGPathSegCurvetoCubicSmoothAbsY2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = static_cast<JSSVGPathSegCurvetoCubicSmoothAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicSmoothAbs* imp = static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(static_cast<JSSVGPathSegCurvetoCubicSmoothAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicSmoothAbs* imp = static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(castedThis->impl()); return jsNumber(exec, imp->y2()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.h index 9b4ce0fc93..b242e39a24 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.h @@ -33,7 +33,7 @@ class SVGPathSegCurvetoCubicSmoothAbs; class JSSVGPathSegCurvetoCubicSmoothAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegCurvetoCubicSmoothAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs>, SVGElement* context); + JSSVGPathSegCurvetoCubicSmoothAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp index c5c05d7397..ed122a366a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp @@ -75,8 +75,8 @@ JSObject* JSSVGPathSegCurvetoCubicSmoothRelPrototype::self(ExecState* exec, JSGl const ClassInfo JSSVGPathSegCurvetoCubicSmoothRel::s_info = { "SVGPathSegCurvetoCubicSmoothRel", &JSSVGPathSeg::s_info, &JSSVGPathSegCurvetoCubicSmoothRelTable, 0 }; -JSSVGPathSegCurvetoCubicSmoothRel::JSSVGPathSegCurvetoCubicSmoothRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegCurvetoCubicSmoothRel::JSSVGPathSegCurvetoCubicSmoothRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -92,29 +92,33 @@ bool JSSVGPathSegCurvetoCubicSmoothRel::getOwnPropertySlot(ExecState* exec, cons JSValue jsSVGPathSegCurvetoCubicSmoothRelX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicSmoothRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicSmoothRel* imp = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(static_cast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicSmoothRel* imp = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegCurvetoCubicSmoothRelY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicSmoothRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicSmoothRel* imp = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(static_cast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicSmoothRel* imp = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsSVGPathSegCurvetoCubicSmoothRelX2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicSmoothRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicSmoothRel* imp = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(static_cast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicSmoothRel* imp = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl()); return jsNumber(exec, imp->x2()); } JSValue jsSVGPathSegCurvetoCubicSmoothRelY2(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoCubicSmoothRel* castedThis = static_cast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoCubicSmoothRel* imp = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(static_cast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoCubicSmoothRel* imp = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl()); return jsNumber(exec, imp->y2()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.h index c705365bec..557ae46baa 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.h @@ -33,7 +33,7 @@ class SVGPathSegCurvetoCubicSmoothRel; class JSSVGPathSegCurvetoCubicSmoothRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegCurvetoCubicSmoothRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegCurvetoCubicSmoothRel>, SVGElement* context); + JSSVGPathSegCurvetoCubicSmoothRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegCurvetoCubicSmoothRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp index 4170299bb8..eb8515d3bd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp @@ -75,8 +75,8 @@ JSObject* JSSVGPathSegCurvetoQuadraticAbsPrototype::self(ExecState* exec, JSGlob const ClassInfo JSSVGPathSegCurvetoQuadraticAbs::s_info = { "SVGPathSegCurvetoQuadraticAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegCurvetoQuadraticAbsTable, 0 }; -JSSVGPathSegCurvetoQuadraticAbs::JSSVGPathSegCurvetoQuadraticAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegCurvetoQuadraticAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegCurvetoQuadraticAbs::JSSVGPathSegCurvetoQuadraticAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoQuadraticAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -92,29 +92,33 @@ bool JSSVGPathSegCurvetoQuadraticAbs::getOwnPropertySlot(ExecState* exec, const JSValue jsSVGPathSegCurvetoQuadraticAbsX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticAbs* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(static_cast<JSSVGPathSegCurvetoQuadraticAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegCurvetoQuadraticAbsY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticAbs* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(static_cast<JSSVGPathSegCurvetoQuadraticAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsSVGPathSegCurvetoQuadraticAbsX1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticAbs* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(static_cast<JSSVGPathSegCurvetoQuadraticAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(castedThis->impl()); return jsNumber(exec, imp->x1()); } JSValue jsSVGPathSegCurvetoQuadraticAbsY1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticAbs* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(static_cast<JSSVGPathSegCurvetoQuadraticAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticAbs* imp = static_cast<SVGPathSegCurvetoQuadraticAbs*>(castedThis->impl()); return jsNumber(exec, imp->y1()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.h index 6feebd860b..91125983e0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.h @@ -33,7 +33,7 @@ class SVGPathSegCurvetoQuadraticAbs; class JSSVGPathSegCurvetoQuadraticAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegCurvetoQuadraticAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegCurvetoQuadraticAbs>, SVGElement* context); + JSSVGPathSegCurvetoQuadraticAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegCurvetoQuadraticAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp index 4f5052255e..c62f6ac34e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp @@ -75,8 +75,8 @@ JSObject* JSSVGPathSegCurvetoQuadraticRelPrototype::self(ExecState* exec, JSGlob const ClassInfo JSSVGPathSegCurvetoQuadraticRel::s_info = { "SVGPathSegCurvetoQuadraticRel", &JSSVGPathSeg::s_info, &JSSVGPathSegCurvetoQuadraticRelTable, 0 }; -JSSVGPathSegCurvetoQuadraticRel::JSSVGPathSegCurvetoQuadraticRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegCurvetoQuadraticRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegCurvetoQuadraticRel::JSSVGPathSegCurvetoQuadraticRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoQuadraticRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -92,29 +92,33 @@ bool JSSVGPathSegCurvetoQuadraticRel::getOwnPropertySlot(ExecState* exec, const JSValue jsSVGPathSegCurvetoQuadraticRelX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticRel* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticRel* imp = static_cast<SVGPathSegCurvetoQuadraticRel*>(static_cast<JSSVGPathSegCurvetoQuadraticRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticRel* imp = static_cast<SVGPathSegCurvetoQuadraticRel*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegCurvetoQuadraticRelY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticRel* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticRel* imp = static_cast<SVGPathSegCurvetoQuadraticRel*>(static_cast<JSSVGPathSegCurvetoQuadraticRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticRel* imp = static_cast<SVGPathSegCurvetoQuadraticRel*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsSVGPathSegCurvetoQuadraticRelX1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticRel* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticRel* imp = static_cast<SVGPathSegCurvetoQuadraticRel*>(static_cast<JSSVGPathSegCurvetoQuadraticRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticRel* imp = static_cast<SVGPathSegCurvetoQuadraticRel*>(castedThis->impl()); return jsNumber(exec, imp->x1()); } JSValue jsSVGPathSegCurvetoQuadraticRelY1(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticRel* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticRel* imp = static_cast<SVGPathSegCurvetoQuadraticRel*>(static_cast<JSSVGPathSegCurvetoQuadraticRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticRel* imp = static_cast<SVGPathSegCurvetoQuadraticRel*>(castedThis->impl()); return jsNumber(exec, imp->y1()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.h index 50c484b44f..cfbb1b3783 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.h @@ -33,7 +33,7 @@ class SVGPathSegCurvetoQuadraticRel; class JSSVGPathSegCurvetoQuadraticRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegCurvetoQuadraticRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegCurvetoQuadraticRel>, SVGElement* context); + JSSVGPathSegCurvetoQuadraticRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegCurvetoQuadraticRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp index 0ebe08a0da..ea5f5da349 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp @@ -73,8 +73,8 @@ JSObject* JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype::self(ExecState* exec, const ClassInfo JSSVGPathSegCurvetoQuadraticSmoothAbs::s_info = { "SVGPathSegCurvetoQuadraticSmoothAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegCurvetoQuadraticSmoothAbsTable, 0 }; -JSSVGPathSegCurvetoQuadraticSmoothAbs::JSSVGPathSegCurvetoQuadraticSmoothAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegCurvetoQuadraticSmoothAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegCurvetoQuadraticSmoothAbs::JSSVGPathSegCurvetoQuadraticSmoothAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoQuadraticSmoothAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -90,15 +90,17 @@ bool JSSVGPathSegCurvetoQuadraticSmoothAbs::getOwnPropertySlot(ExecState* exec, JSValue jsSVGPathSegCurvetoQuadraticSmoothAbsX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticSmoothAbs* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticSmoothAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(static_cast<JSSVGPathSegCurvetoQuadraticSmoothAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegCurvetoQuadraticSmoothAbsY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticSmoothAbs* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticSmoothAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(static_cast<JSSVGPathSegCurvetoQuadraticSmoothAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticSmoothAbs* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(castedThis->impl()); return jsNumber(exec, imp->y()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.h index dee998c67b..48967a14c9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.h @@ -33,7 +33,7 @@ class SVGPathSegCurvetoQuadraticSmoothAbs; class JSSVGPathSegCurvetoQuadraticSmoothAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegCurvetoQuadraticSmoothAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegCurvetoQuadraticSmoothAbs>, SVGElement* context); + JSSVGPathSegCurvetoQuadraticSmoothAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegCurvetoQuadraticSmoothAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp index 69382f92c9..56a7163860 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp @@ -73,8 +73,8 @@ JSObject* JSSVGPathSegCurvetoQuadraticSmoothRelPrototype::self(ExecState* exec, const ClassInfo JSSVGPathSegCurvetoQuadraticSmoothRel::s_info = { "SVGPathSegCurvetoQuadraticSmoothRel", &JSSVGPathSeg::s_info, &JSSVGPathSegCurvetoQuadraticSmoothRelTable, 0 }; -JSSVGPathSegCurvetoQuadraticSmoothRel::JSSVGPathSegCurvetoQuadraticSmoothRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegCurvetoQuadraticSmoothRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegCurvetoQuadraticSmoothRel::JSSVGPathSegCurvetoQuadraticSmoothRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoQuadraticSmoothRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -90,15 +90,17 @@ bool JSSVGPathSegCurvetoQuadraticSmoothRel::getOwnPropertySlot(ExecState* exec, JSValue jsSVGPathSegCurvetoQuadraticSmoothRelX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticSmoothRel* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticSmoothRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticSmoothRel* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothRel*>(static_cast<JSSVGPathSegCurvetoQuadraticSmoothRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticSmoothRel* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothRel*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegCurvetoQuadraticSmoothRelY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegCurvetoQuadraticSmoothRel* castedThis = static_cast<JSSVGPathSegCurvetoQuadraticSmoothRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegCurvetoQuadraticSmoothRel* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothRel*>(static_cast<JSSVGPathSegCurvetoQuadraticSmoothRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegCurvetoQuadraticSmoothRel* imp = static_cast<SVGPathSegCurvetoQuadraticSmoothRel*>(castedThis->impl()); return jsNumber(exec, imp->y()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.h index 5854a94606..8e786091d3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.h @@ -33,7 +33,7 @@ class SVGPathSegCurvetoQuadraticSmoothRel; class JSSVGPathSegCurvetoQuadraticSmoothRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegCurvetoQuadraticSmoothRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegCurvetoQuadraticSmoothRel>, SVGElement* context); + JSSVGPathSegCurvetoQuadraticSmoothRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegCurvetoQuadraticSmoothRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp index bd7a4917b4..cb3049bba0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp @@ -73,8 +73,8 @@ JSObject* JSSVGPathSegLinetoAbsPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSSVGPathSegLinetoAbs::s_info = { "SVGPathSegLinetoAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegLinetoAbsTable, 0 }; -JSSVGPathSegLinetoAbs::JSSVGPathSegLinetoAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegLinetoAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegLinetoAbs::JSSVGPathSegLinetoAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegLinetoAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -90,15 +90,17 @@ bool JSSVGPathSegLinetoAbs::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsSVGPathSegLinetoAbsX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegLinetoAbs* castedThis = static_cast<JSSVGPathSegLinetoAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegLinetoAbs* imp = static_cast<SVGPathSegLinetoAbs*>(static_cast<JSSVGPathSegLinetoAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegLinetoAbs* imp = static_cast<SVGPathSegLinetoAbs*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegLinetoAbsY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegLinetoAbs* castedThis = static_cast<JSSVGPathSegLinetoAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegLinetoAbs* imp = static_cast<SVGPathSegLinetoAbs*>(static_cast<JSSVGPathSegLinetoAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegLinetoAbs* imp = static_cast<SVGPathSegLinetoAbs*>(castedThis->impl()); return jsNumber(exec, imp->y()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.h index f737c49df0..8e403de63a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.h @@ -33,7 +33,7 @@ class SVGPathSegLinetoAbs; class JSSVGPathSegLinetoAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegLinetoAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegLinetoAbs>, SVGElement* context); + JSSVGPathSegLinetoAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegLinetoAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp index d5b7b4f1fa..2a6a087bd5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp @@ -72,8 +72,8 @@ JSObject* JSSVGPathSegLinetoHorizontalAbsPrototype::self(ExecState* exec, JSGlob const ClassInfo JSSVGPathSegLinetoHorizontalAbs::s_info = { "SVGPathSegLinetoHorizontalAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegLinetoHorizontalAbsTable, 0 }; -JSSVGPathSegLinetoHorizontalAbs::JSSVGPathSegLinetoHorizontalAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegLinetoHorizontalAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegLinetoHorizontalAbs::JSSVGPathSegLinetoHorizontalAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegLinetoHorizontalAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -89,8 +89,9 @@ bool JSSVGPathSegLinetoHorizontalAbs::getOwnPropertySlot(ExecState* exec, const JSValue jsSVGPathSegLinetoHorizontalAbsX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegLinetoHorizontalAbs* castedThis = static_cast<JSSVGPathSegLinetoHorizontalAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegLinetoHorizontalAbs* imp = static_cast<SVGPathSegLinetoHorizontalAbs*>(static_cast<JSSVGPathSegLinetoHorizontalAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegLinetoHorizontalAbs* imp = static_cast<SVGPathSegLinetoHorizontalAbs*>(castedThis->impl()); return jsNumber(exec, imp->x()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.h index fe2d270bd1..237124aeb1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.h @@ -33,7 +33,7 @@ class SVGPathSegLinetoHorizontalAbs; class JSSVGPathSegLinetoHorizontalAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegLinetoHorizontalAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegLinetoHorizontalAbs>, SVGElement* context); + JSSVGPathSegLinetoHorizontalAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegLinetoHorizontalAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp index 2549cafdaf..68c5b374d7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp @@ -72,8 +72,8 @@ JSObject* JSSVGPathSegLinetoHorizontalRelPrototype::self(ExecState* exec, JSGlob const ClassInfo JSSVGPathSegLinetoHorizontalRel::s_info = { "SVGPathSegLinetoHorizontalRel", &JSSVGPathSeg::s_info, &JSSVGPathSegLinetoHorizontalRelTable, 0 }; -JSSVGPathSegLinetoHorizontalRel::JSSVGPathSegLinetoHorizontalRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegLinetoHorizontalRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegLinetoHorizontalRel::JSSVGPathSegLinetoHorizontalRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegLinetoHorizontalRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -89,8 +89,9 @@ bool JSSVGPathSegLinetoHorizontalRel::getOwnPropertySlot(ExecState* exec, const JSValue jsSVGPathSegLinetoHorizontalRelX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegLinetoHorizontalRel* castedThis = static_cast<JSSVGPathSegLinetoHorizontalRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegLinetoHorizontalRel* imp = static_cast<SVGPathSegLinetoHorizontalRel*>(static_cast<JSSVGPathSegLinetoHorizontalRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegLinetoHorizontalRel* imp = static_cast<SVGPathSegLinetoHorizontalRel*>(castedThis->impl()); return jsNumber(exec, imp->x()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.h index b8edfb7cc8..8c76dbf5da 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.h @@ -33,7 +33,7 @@ class SVGPathSegLinetoHorizontalRel; class JSSVGPathSegLinetoHorizontalRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegLinetoHorizontalRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegLinetoHorizontalRel>, SVGElement* context); + JSSVGPathSegLinetoHorizontalRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegLinetoHorizontalRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp index 117083b571..d90984d92a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp @@ -73,8 +73,8 @@ JSObject* JSSVGPathSegLinetoRelPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSSVGPathSegLinetoRel::s_info = { "SVGPathSegLinetoRel", &JSSVGPathSeg::s_info, &JSSVGPathSegLinetoRelTable, 0 }; -JSSVGPathSegLinetoRel::JSSVGPathSegLinetoRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegLinetoRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegLinetoRel::JSSVGPathSegLinetoRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegLinetoRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -90,15 +90,17 @@ bool JSSVGPathSegLinetoRel::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsSVGPathSegLinetoRelX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegLinetoRel* castedThis = static_cast<JSSVGPathSegLinetoRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegLinetoRel* imp = static_cast<SVGPathSegLinetoRel*>(static_cast<JSSVGPathSegLinetoRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegLinetoRel* imp = static_cast<SVGPathSegLinetoRel*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegLinetoRelY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegLinetoRel* castedThis = static_cast<JSSVGPathSegLinetoRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegLinetoRel* imp = static_cast<SVGPathSegLinetoRel*>(static_cast<JSSVGPathSegLinetoRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegLinetoRel* imp = static_cast<SVGPathSegLinetoRel*>(castedThis->impl()); return jsNumber(exec, imp->y()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.h index 5123bf16dc..7d6e156085 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.h @@ -33,7 +33,7 @@ class SVGPathSegLinetoRel; class JSSVGPathSegLinetoRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegLinetoRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegLinetoRel>, SVGElement* context); + JSSVGPathSegLinetoRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegLinetoRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp index dea3f902b0..a51ca334f7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp @@ -72,8 +72,8 @@ JSObject* JSSVGPathSegLinetoVerticalAbsPrototype::self(ExecState* exec, JSGlobal const ClassInfo JSSVGPathSegLinetoVerticalAbs::s_info = { "SVGPathSegLinetoVerticalAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegLinetoVerticalAbsTable, 0 }; -JSSVGPathSegLinetoVerticalAbs::JSSVGPathSegLinetoVerticalAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegLinetoVerticalAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegLinetoVerticalAbs::JSSVGPathSegLinetoVerticalAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegLinetoVerticalAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -89,8 +89,9 @@ bool JSSVGPathSegLinetoVerticalAbs::getOwnPropertySlot(ExecState* exec, const Id JSValue jsSVGPathSegLinetoVerticalAbsY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegLinetoVerticalAbs* castedThis = static_cast<JSSVGPathSegLinetoVerticalAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegLinetoVerticalAbs* imp = static_cast<SVGPathSegLinetoVerticalAbs*>(static_cast<JSSVGPathSegLinetoVerticalAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegLinetoVerticalAbs* imp = static_cast<SVGPathSegLinetoVerticalAbs*>(castedThis->impl()); return jsNumber(exec, imp->y()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.h index 184c021b08..8a2b51dad8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.h @@ -33,7 +33,7 @@ class SVGPathSegLinetoVerticalAbs; class JSSVGPathSegLinetoVerticalAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegLinetoVerticalAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegLinetoVerticalAbs>, SVGElement* context); + JSSVGPathSegLinetoVerticalAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegLinetoVerticalAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp index e1ff669cf6..03873cb5d5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp @@ -72,8 +72,8 @@ JSObject* JSSVGPathSegLinetoVerticalRelPrototype::self(ExecState* exec, JSGlobal const ClassInfo JSSVGPathSegLinetoVerticalRel::s_info = { "SVGPathSegLinetoVerticalRel", &JSSVGPathSeg::s_info, &JSSVGPathSegLinetoVerticalRelTable, 0 }; -JSSVGPathSegLinetoVerticalRel::JSSVGPathSegLinetoVerticalRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegLinetoVerticalRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegLinetoVerticalRel::JSSVGPathSegLinetoVerticalRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegLinetoVerticalRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -89,8 +89,9 @@ bool JSSVGPathSegLinetoVerticalRel::getOwnPropertySlot(ExecState* exec, const Id JSValue jsSVGPathSegLinetoVerticalRelY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegLinetoVerticalRel* castedThis = static_cast<JSSVGPathSegLinetoVerticalRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegLinetoVerticalRel* imp = static_cast<SVGPathSegLinetoVerticalRel*>(static_cast<JSSVGPathSegLinetoVerticalRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegLinetoVerticalRel* imp = static_cast<SVGPathSegLinetoVerticalRel*>(castedThis->impl()); return jsNumber(exec, imp->y()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.h index a0cade446f..25f03a0a30 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.h @@ -33,7 +33,7 @@ class SVGPathSegLinetoVerticalRel; class JSSVGPathSegLinetoVerticalRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegLinetoVerticalRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegLinetoVerticalRel>, SVGElement* context); + JSSVGPathSegLinetoVerticalRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegLinetoVerticalRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp index 8cfdc3c8c3..fddc132cb9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp @@ -86,9 +86,8 @@ bool JSSVGPathSegListPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGPathSegList::s_info = { "SVGPathSegList", 0, &JSSVGPathSegListTable, 0 }; -JSSVGPathSegList::JSSVGPathSegList(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGPathSegList::JSSVGPathSegList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -110,8 +109,9 @@ bool JSSVGPathSegList::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGPathSegListNumberOfItems(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegList* castedThis = static_cast<JSSVGPathSegList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegList* imp = static_cast<SVGPathSegList*>(static_cast<JSSVGPathSegList*>(asObject(slot.slotBase()))->impl()); + SVGPathSegList* imp = static_cast<SVGPathSegList*>(castedThis->impl()); return jsNumber(exec, imp->numberOfItems()); } @@ -178,9 +178,9 @@ JSValue JSC_HOST_CALL jsSVGPathSegListPrototypeFunctionAppendItem(ExecState* exe return castedThisObj->appendItem(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGPathSegList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGPathSegList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGPathSegList>(exec, object, context); + return getDOMObjectWrapper<JSSVGPathSegList>(exec, globalObject, object, context); } SVGPathSegList* toSVGPathSegList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.h index 5815d2cdec..dfa9d56a76 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGPathSegList; -class JSSVGPathSegList : public DOMObject { - typedef DOMObject Base; +class JSSVGPathSegList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGPathSegList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegList>, SVGElement* context); + JSSVGPathSegList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegList>, SVGElement* context); virtual ~JSSVGPathSegList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -57,14 +58,12 @@ public: JSC::JSValue removeItem(JSC::ExecState*, const JSC::ArgList&); JSC::JSValue appendItem(JSC::ExecState*, const JSC::ArgList&); SVGPathSegList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGPathSegList > m_impl; + RefPtr<SVGPathSegList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGPathSegList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGPathSegList*, SVGElement* context); SVGPathSegList* toSVGPathSegList(JSC::JSValue); class JSSVGPathSegListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp index 88ef122131..836096b257 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp @@ -73,8 +73,8 @@ JSObject* JSSVGPathSegMovetoAbsPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSSVGPathSegMovetoAbs::s_info = { "SVGPathSegMovetoAbs", &JSSVGPathSeg::s_info, &JSSVGPathSegMovetoAbsTable, 0 }; -JSSVGPathSegMovetoAbs::JSSVGPathSegMovetoAbs(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegMovetoAbs> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegMovetoAbs::JSSVGPathSegMovetoAbs(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegMovetoAbs> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -90,15 +90,17 @@ bool JSSVGPathSegMovetoAbs::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsSVGPathSegMovetoAbsX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegMovetoAbs* castedThis = static_cast<JSSVGPathSegMovetoAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegMovetoAbs* imp = static_cast<SVGPathSegMovetoAbs*>(static_cast<JSSVGPathSegMovetoAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegMovetoAbs* imp = static_cast<SVGPathSegMovetoAbs*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegMovetoAbsY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegMovetoAbs* castedThis = static_cast<JSSVGPathSegMovetoAbs*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegMovetoAbs* imp = static_cast<SVGPathSegMovetoAbs*>(static_cast<JSSVGPathSegMovetoAbs*>(asObject(slot.slotBase()))->impl()); + SVGPathSegMovetoAbs* imp = static_cast<SVGPathSegMovetoAbs*>(castedThis->impl()); return jsNumber(exec, imp->y()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.h index 99e8582671..d072b5df56 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.h @@ -33,7 +33,7 @@ class SVGPathSegMovetoAbs; class JSSVGPathSegMovetoAbs : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegMovetoAbs(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegMovetoAbs>, SVGElement* context); + JSSVGPathSegMovetoAbs(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegMovetoAbs>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp index 1f572b2bf2..ee180ac599 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp @@ -73,8 +73,8 @@ JSObject* JSSVGPathSegMovetoRelPrototype::self(ExecState* exec, JSGlobalObject* const ClassInfo JSSVGPathSegMovetoRel::s_info = { "SVGPathSegMovetoRel", &JSSVGPathSeg::s_info, &JSSVGPathSegMovetoRelTable, 0 }; -JSSVGPathSegMovetoRel::JSSVGPathSegMovetoRel(PassRefPtr<Structure> structure, PassRefPtr<SVGPathSegMovetoRel> impl, SVGElement* context) - : JSSVGPathSeg(structure, impl, context) +JSSVGPathSegMovetoRel::JSSVGPathSegMovetoRel(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegMovetoRel> impl, SVGElement* context) + : JSSVGPathSeg(structure, globalObject, impl, context) { } @@ -90,15 +90,17 @@ bool JSSVGPathSegMovetoRel::getOwnPropertySlot(ExecState* exec, const Identifier JSValue jsSVGPathSegMovetoRelX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegMovetoRel* castedThis = static_cast<JSSVGPathSegMovetoRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegMovetoRel* imp = static_cast<SVGPathSegMovetoRel*>(static_cast<JSSVGPathSegMovetoRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegMovetoRel* imp = static_cast<SVGPathSegMovetoRel*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsSVGPathSegMovetoRelY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPathSegMovetoRel* castedThis = static_cast<JSSVGPathSegMovetoRel*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPathSegMovetoRel* imp = static_cast<SVGPathSegMovetoRel*>(static_cast<JSSVGPathSegMovetoRel*>(asObject(slot.slotBase()))->impl()); + SVGPathSegMovetoRel* imp = static_cast<SVGPathSegMovetoRel*>(castedThis->impl()); return jsNumber(exec, imp->y()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.h index 179ea1a0ce..c82f216805 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.h @@ -33,7 +33,7 @@ class SVGPathSegMovetoRel; class JSSVGPathSegMovetoRel : public JSSVGPathSeg { typedef JSSVGPathSeg Base; public: - JSSVGPathSegMovetoRel(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPathSegMovetoRel>, SVGElement* context); + JSSVGPathSegMovetoRel(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPathSegMovetoRel>, SVGElement* context); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp index 4616edcd49..90c5ce07fa 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp @@ -112,8 +112,8 @@ bool JSSVGPatternElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSSVGPatternElement::s_info = { "SVGPatternElement", &JSSVGElement::s_info, &JSSVGPatternElementTable, 0 }; -JSSVGPatternElement::JSSVGPatternElement(PassRefPtr<Structure> structure, PassRefPtr<SVGPatternElement> impl) - : JSSVGElement(structure, impl) +JSSVGPatternElement::JSSVGPatternElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPatternElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -129,140 +129,158 @@ bool JSSVGPatternElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGPatternElementPatternUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->patternUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementPatternContentUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->patternContentUnitsAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementPatternTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->patternTransformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGPatternElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGPatternElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGPatternElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGPatternElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGPatternElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGPatternElementViewBox(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedRect> obj = imp->viewBoxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPatternElementPreserveAspectRatio(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPatternElement* castedThis = static_cast<JSSVGPatternElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPatternElement* imp = static_cast<SVGPatternElement*>(static_cast<JSSVGPatternElement*>(asObject(slot.slotBase()))->impl()); + SVGPatternElement* imp = static_cast<SVGPatternElement*>(castedThis->impl()); RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } void JSSVGPatternElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -306,7 +324,7 @@ JSValue JSC_HOST_CALL jsSVGPatternElementPrototypeFunctionGetPresentationAttribu const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.h index 7541db17aa..db19b4b740 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.h @@ -33,7 +33,7 @@ class SVGPatternElement; class JSSVGPatternElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGPatternElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPatternElement>); + JSSVGPatternElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPatternElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp index d0050bf3f9..8eff1cacc3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp @@ -81,9 +81,8 @@ bool JSSVGPointPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSSVGPoint::s_info = { "SVGPoint", 0, &JSSVGPointTable, 0 }; -JSSVGPoint::JSSVGPoint(PassRefPtr<Structure> structure, PassRefPtr<JSSVGPODTypeWrapper<FloatPoint> > impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGPoint::JSSVGPoint(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JSSVGPODTypeWrapper<FloatPoint> > impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -105,15 +104,17 @@ bool JSSVGPoint::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN JSValue jsSVGPointX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPoint* castedThis = static_cast<JSSVGPoint*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - FloatPoint imp(*static_cast<JSSVGPoint*>(asObject(slot.slotBase()))->impl()); + FloatPoint imp(*castedThis->impl()); return jsNumber(exec, imp.x()); } JSValue jsSVGPointY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPoint* castedThis = static_cast<JSSVGPoint*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - FloatPoint imp(*static_cast<JSSVGPoint*>(asObject(slot.slotBase()))->impl()); + FloatPoint imp(*castedThis->impl()); return jsNumber(exec, imp.y()); } @@ -147,14 +148,14 @@ JSValue JSC_HOST_CALL jsSVGPointPrototypeFunctionMatrixTransform(ExecState* exec TransformationMatrix matrix = toSVGMatrix(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp.matrixTransform(matrix)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp.matrixTransform(matrix)).get(), castedThisObj->context()); wrapper->commitChange(imp, castedThisObj->context()); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<FloatPoint>* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<FloatPoint>* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGPoint, JSSVGPODTypeWrapper<FloatPoint> >(exec, object, context); + return getDOMObjectWrapper<JSSVGPoint, JSSVGPODTypeWrapper<FloatPoint> >(exec, globalObject, object, context); } FloatPoint toSVGPoint(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.h index 95ee72d5ab..3f1b35ca4f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "FloatPoint.h" #include "JSDOMBinding.h" #include "JSSVGPODTypeWrapper.h" @@ -32,10 +33,10 @@ namespace WebCore { -class JSSVGPoint : public DOMObject { - typedef DOMObject Base; +class JSSVGPoint : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGPoint(PassRefPtr<JSC::Structure>, PassRefPtr<JSSVGPODTypeWrapper<FloatPoint> >, SVGElement* context); + JSSVGPoint(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<JSSVGPODTypeWrapper<FloatPoint> >, SVGElement* context); virtual ~JSSVGPoint(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,15 +49,13 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - JSSVGPODTypeWrapper<FloatPoint>* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } + JSSVGPODTypeWrapper<FloatPoint> * impl() const { return m_impl.get(); } private: - RefPtr<SVGElement> m_context; RefPtr<JSSVGPODTypeWrapper<FloatPoint> > m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, JSSVGPODTypeWrapper<FloatPoint>*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<FloatPoint>*, SVGElement* context); FloatPoint toSVGPoint(JSC::JSValue); class JSSVGPointPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp index 5c911bd6c3..b01266de28 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp @@ -85,9 +85,8 @@ bool JSSVGPointListPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSSVGPointList::s_info = { "SVGPointList", 0, &JSSVGPointListTable, 0 }; -JSSVGPointList::JSSVGPointList(PassRefPtr<Structure> structure, PassRefPtr<SVGPointList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGPointList::JSSVGPointList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPointList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -109,8 +108,9 @@ bool JSSVGPointList::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsSVGPointListNumberOfItems(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPointList* castedThis = static_cast<JSSVGPointList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPointList* imp = static_cast<SVGPointList*>(static_cast<JSSVGPointList*>(asObject(slot.slotBase()))->impl()); + SVGPointList* imp = static_cast<SVGPointList*>(castedThis->impl()); return jsNumber(exec, imp->numberOfItems()); } @@ -177,9 +177,9 @@ JSValue JSC_HOST_CALL jsSVGPointListPrototypeFunctionAppendItem(ExecState* exec, return castedThisObj->appendItem(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGPointList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGPointList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGPointList>(exec, object, context); + return getDOMObjectWrapper<JSSVGPointList>(exec, globalObject, object, context); } SVGPointList* toSVGPointList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.h index 29bd3230ec..3e39aae0db 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGPointList; -class JSSVGPointList : public DOMObject { - typedef DOMObject Base; +class JSSVGPointList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGPointList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPointList>, SVGElement* context); + JSSVGPointList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPointList>, SVGElement* context); virtual ~JSSVGPointList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -57,14 +58,12 @@ public: JSC::JSValue removeItem(JSC::ExecState*, const JSC::ArgList&); JSC::JSValue appendItem(JSC::ExecState*, const JSC::ArgList&); SVGPointList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGPointList > m_impl; + RefPtr<SVGPointList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGPointList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGPointList*, SVGElement* context); SVGPointList* toSVGPointList(JSC::JSValue); class JSSVGPointListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp index aba8123acb..8e517a1266 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp @@ -113,8 +113,8 @@ bool JSSVGPolygonElementPrototype::getOwnPropertySlot(ExecState* exec, const Ide const ClassInfo JSSVGPolygonElement::s_info = { "SVGPolygonElement", &JSSVGElement::s_info, &JSSVGPolygonElementTable, 0 }; -JSSVGPolygonElement::JSSVGPolygonElement(PassRefPtr<Structure> structure, PassRefPtr<SVGPolygonElement> impl) - : JSSVGElement(structure, impl) +JSSVGPolygonElement::JSSVGPolygonElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPolygonElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -130,96 +130,109 @@ bool JSSVGPolygonElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGPolygonElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGPolygonElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGPolygonElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGPolygonElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGPolygonElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGPolygonElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPolygonElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPolygonElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGPolygonElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPolygonElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGPolygonElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } JSValue jsSVGPolygonElementPoints(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->points()), imp); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->points()), imp); } JSValue jsSVGPolygonElementAnimatedPoints(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolygonElement* castedThis = static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(static_cast<JSSVGPolygonElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animatedPoints()), imp); + SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->animatedPoints()), imp); } void JSSVGPolygonElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -263,7 +276,7 @@ JSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetPresentationAttribu const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -276,7 +289,7 @@ JSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetBBox(ExecState* exe SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -289,7 +302,7 @@ JSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetCTM(ExecState* exec SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -302,7 +315,7 @@ JSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetScreenCTM(ExecState SVGPolygonElement* imp = static_cast<SVGPolygonElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -317,7 +330,7 @@ JSValue JSC_HOST_CALL jsSVGPolygonElementPrototypeFunctionGetTransformToElement( SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.h index b4c31314c9..f07549c2cc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.h @@ -33,7 +33,7 @@ class SVGPolygonElement; class JSSVGPolygonElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGPolygonElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPolygonElement>); + JSSVGPolygonElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPolygonElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp index 8a967cd0db..6bd7b70a2c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp @@ -113,8 +113,8 @@ bool JSSVGPolylineElementPrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSSVGPolylineElement::s_info = { "SVGPolylineElement", &JSSVGElement::s_info, &JSSVGPolylineElementTable, 0 }; -JSSVGPolylineElement::JSSVGPolylineElement(PassRefPtr<Structure> structure, PassRefPtr<SVGPolylineElement> impl) - : JSSVGElement(structure, impl) +JSSVGPolylineElement::JSSVGPolylineElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPolylineElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -130,96 +130,109 @@ bool JSSVGPolylineElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGPolylineElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGPolylineElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGPolylineElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGPolylineElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGPolylineElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGPolylineElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPolylineElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPolylineElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGPolylineElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGPolylineElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGPolylineElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } JSValue jsSVGPolylineElementPoints(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->points()), imp); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->points()), imp); } JSValue jsSVGPolylineElementAnimatedPoints(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPolylineElement* castedThis = static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(static_cast<JSSVGPolylineElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animatedPoints()), imp); + SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->animatedPoints()), imp); } void JSSVGPolylineElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -263,7 +276,7 @@ JSValue JSC_HOST_CALL jsSVGPolylineElementPrototypeFunctionGetPresentationAttrib const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -276,7 +289,7 @@ JSValue JSC_HOST_CALL jsSVGPolylineElementPrototypeFunctionGetBBox(ExecState* ex SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -289,7 +302,7 @@ JSValue JSC_HOST_CALL jsSVGPolylineElementPrototypeFunctionGetCTM(ExecState* exe SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -302,7 +315,7 @@ JSValue JSC_HOST_CALL jsSVGPolylineElementPrototypeFunctionGetScreenCTM(ExecStat SVGPolylineElement* imp = static_cast<SVGPolylineElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -317,7 +330,7 @@ JSValue JSC_HOST_CALL jsSVGPolylineElementPrototypeFunctionGetTransformToElement SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.h index 6501a25f3f..8260e0d1ad 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.h @@ -33,7 +33,7 @@ class SVGPolylineElement; class JSSVGPolylineElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGPolylineElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPolylineElement>); + JSSVGPolylineElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPolylineElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp index 85e123c807..dd40aff266 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp @@ -79,12 +79,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGPreserveAspectRatioConstructorTable = { 35, 31, JSSVGPreserveAspectRatioConstructorTableValues, 0 }; #endif -class JSSVGPreserveAspectRatioConstructor : public DOMObject { +class JSSVGPreserveAspectRatioConstructor : public DOMConstructorObject { public: - JSSVGPreserveAspectRatioConstructor(ExecState* exec) - : DOMObject(JSSVGPreserveAspectRatioConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGPreserveAspectRatioConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGPreserveAspectRatioConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGPreserveAspectRatioPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGPreserveAspectRatioPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -145,9 +145,8 @@ bool JSSVGPreserveAspectRatioPrototype::getOwnPropertySlot(ExecState* exec, cons const ClassInfo JSSVGPreserveAspectRatio::s_info = { "SVGPreserveAspectRatio", 0, &JSSVGPreserveAspectRatioTable, 0 }; -JSSVGPreserveAspectRatio::JSSVGPreserveAspectRatio(PassRefPtr<Structure> structure, PassRefPtr<SVGPreserveAspectRatio> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGPreserveAspectRatio::JSSVGPreserveAspectRatio(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPreserveAspectRatio> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -169,21 +168,24 @@ bool JSSVGPreserveAspectRatio::getOwnPropertySlot(ExecState* exec, const Identif JSValue jsSVGPreserveAspectRatioAlign(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPreserveAspectRatio* castedThis = static_cast<JSSVGPreserveAspectRatio*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPreserveAspectRatio* imp = static_cast<SVGPreserveAspectRatio*>(static_cast<JSSVGPreserveAspectRatio*>(asObject(slot.slotBase()))->impl()); + SVGPreserveAspectRatio* imp = static_cast<SVGPreserveAspectRatio*>(castedThis->impl()); return jsNumber(exec, imp->align()); } JSValue jsSVGPreserveAspectRatioMeetOrSlice(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGPreserveAspectRatio* castedThis = static_cast<JSSVGPreserveAspectRatio*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGPreserveAspectRatio* imp = static_cast<SVGPreserveAspectRatio*>(static_cast<JSSVGPreserveAspectRatio*>(asObject(slot.slotBase()))->impl()); + SVGPreserveAspectRatio* imp = static_cast<SVGPreserveAspectRatio*>(castedThis->impl()); return jsNumber(exec, imp->meetOrSlice()); } JSValue jsSVGPreserveAspectRatioConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGPreserveAspectRatio*>(asObject(slot.slotBase()))->getConstructor(exec); + UNUSED_PARAM(slot); + return JSSVGPreserveAspectRatio::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec)); } void JSSVGPreserveAspectRatio::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -206,9 +208,9 @@ void setJSSVGPreserveAspectRatioMeetOrSlice(ExecState* exec, JSObject* thisObjec static_cast<JSSVGPreserveAspectRatio*>(thisObject)->context()->svgAttributeChanged(static_cast<JSSVGPreserveAspectRatio*>(thisObject)->impl()->associatedAttributeName()); } -JSValue JSSVGPreserveAspectRatio::getConstructor(ExecState* exec) +JSValue JSSVGPreserveAspectRatio::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGPreserveAspectRatioConstructor>(exec); + return getDOMConstructor<JSSVGPreserveAspectRatioConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters @@ -283,9 +285,9 @@ JSValue jsSVGPreserveAspectRatioSVG_MEETORSLICE_SLICE(ExecState* exec, const Ide return jsNumber(exec, static_cast<int>(2)); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGPreserveAspectRatio* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGPreserveAspectRatio* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGPreserveAspectRatio>(exec, object, context); + return getDOMObjectWrapper<JSSVGPreserveAspectRatio>(exec, globalObject, object, context); } SVGPreserveAspectRatio* toSVGPreserveAspectRatio(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.h b/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.h index d8c7fc882b..7835542a26 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGPreserveAspectRatio; -class JSSVGPreserveAspectRatio : public DOMObject { - typedef DOMObject Base; +class JSSVGPreserveAspectRatio : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGPreserveAspectRatio(PassRefPtr<JSC::Structure>, PassRefPtr<SVGPreserveAspectRatio>, SVGElement* context); + JSSVGPreserveAspectRatio(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGPreserveAspectRatio>, SVGElement* context); virtual ~JSSVGPreserveAspectRatio(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,16 +49,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); SVGPreserveAspectRatio* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGPreserveAspectRatio > m_impl; + RefPtr<SVGPreserveAspectRatio> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGPreserveAspectRatio*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGPreserveAspectRatio*, SVGElement* context); SVGPreserveAspectRatio* toSVGPreserveAspectRatio(JSC::JSValue); class JSSVGPreserveAspectRatioPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp index ae2d18e9c1..b6e6e63c53 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp @@ -76,8 +76,8 @@ JSObject* JSSVGRadialGradientElementPrototype::self(ExecState* exec, JSGlobalObj const ClassInfo JSSVGRadialGradientElement::s_info = { "SVGRadialGradientElement", &JSSVGGradientElement::s_info, &JSSVGRadialGradientElementTable, 0 }; -JSSVGRadialGradientElement::JSSVGRadialGradientElement(PassRefPtr<Structure> structure, PassRefPtr<SVGRadialGradientElement> impl) - : JSSVGGradientElement(structure, impl) +JSSVGRadialGradientElement::JSSVGRadialGradientElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGRadialGradientElement> impl) + : JSSVGGradientElement(structure, globalObject, impl) { } @@ -93,42 +93,47 @@ bool JSSVGRadialGradientElement::getOwnPropertySlot(ExecState* exec, const Ident JSValue jsSVGRadialGradientElementCx(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->cxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRadialGradientElementCy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->cyAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRadialGradientElementR(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->rAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRadialGradientElementFx(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->fxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRadialGradientElementFy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()))->impl()); + SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->fyAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.h index a0e34a55b0..575f51173b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.h @@ -33,7 +33,7 @@ class SVGRadialGradientElement; class JSSVGRadialGradientElement : public JSSVGGradientElement { typedef JSSVGGradientElement Base; public: - JSSVGRadialGradientElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGRadialGradientElement>); + JSSVGRadialGradientElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGRadialGradientElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp index 59e412761a..6dc78d71e3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp @@ -74,9 +74,8 @@ JSObject* JSSVGRectPrototype::self(ExecState* exec, JSGlobalObject* globalObject const ClassInfo JSSVGRect::s_info = { "SVGRect", 0, &JSSVGRectTable, 0 }; -JSSVGRect::JSSVGRect(PassRefPtr<Structure> structure, PassRefPtr<JSSVGPODTypeWrapper<FloatRect> > impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGRect::JSSVGRect(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JSSVGPODTypeWrapper<FloatRect> > impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -99,29 +98,33 @@ bool JSSVGRect::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsSVGRectX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRect* castedThis = static_cast<JSSVGRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - FloatRect imp(*static_cast<JSSVGRect*>(asObject(slot.slotBase()))->impl()); + FloatRect imp(*castedThis->impl()); return jsNumber(exec, imp.x()); } JSValue jsSVGRectY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRect* castedThis = static_cast<JSSVGRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - FloatRect imp(*static_cast<JSSVGRect*>(asObject(slot.slotBase()))->impl()); + FloatRect imp(*castedThis->impl()); return jsNumber(exec, imp.y()); } JSValue jsSVGRectWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRect* castedThis = static_cast<JSSVGRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - FloatRect imp(*static_cast<JSSVGRect*>(asObject(slot.slotBase()))->impl()); + FloatRect imp(*castedThis->impl()); return jsNumber(exec, imp.width()); } JSValue jsSVGRectHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRect* castedThis = static_cast<JSSVGRect*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - FloatRect imp(*static_cast<JSSVGRect*>(asObject(slot.slotBase()))->impl()); + FloatRect imp(*castedThis->impl()); return jsNumber(exec, imp.height()); } @@ -158,9 +161,9 @@ void setJSSVGRectHeight(ExecState* exec, JSObject* thisObject, JSValue value) static_cast<JSSVGRect*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGRect*>(thisObject)->context()); } -JSC::JSValue toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<FloatRect>* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<FloatRect>* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGRect, JSSVGPODTypeWrapper<FloatRect> >(exec, object, context); + return getDOMObjectWrapper<JSSVGRect, JSSVGPODTypeWrapper<FloatRect> >(exec, globalObject, object, context); } FloatRect toSVGRect(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRect.h b/src/3rdparty/webkit/WebCore/generated/JSSVGRect.h index b699a03465..4a077d6971 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRect.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRect.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "FloatRect.h" #include "JSDOMBinding.h" #include "JSSVGPODTypeWrapper.h" @@ -32,10 +33,10 @@ namespace WebCore { -class JSSVGRect : public DOMObject { - typedef DOMObject Base; +class JSSVGRect : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGRect(PassRefPtr<JSC::Structure>, PassRefPtr<JSSVGPODTypeWrapper<FloatRect> >, SVGElement* context); + JSSVGRect(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<JSSVGPODTypeWrapper<FloatRect> >, SVGElement* context); virtual ~JSSVGRect(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,15 +49,13 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - JSSVGPODTypeWrapper<FloatRect>* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } + JSSVGPODTypeWrapper<FloatRect> * impl() const { return m_impl.get(); } private: - RefPtr<SVGElement> m_context; RefPtr<JSSVGPODTypeWrapper<FloatRect> > m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, JSSVGPODTypeWrapper<FloatRect>*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<FloatRect>*, SVGElement* context); FloatRect toSVGRect(JSC::JSValue); class JSSVGRectPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp index 423808c1e5..9f1f76d819 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp @@ -116,8 +116,8 @@ bool JSSVGRectElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGRectElement::s_info = { "SVGRectElement", &JSSVGElement::s_info, &JSSVGRectElementTable, 0 }; -JSSVGRectElement::JSSVGRectElement(PassRefPtr<Structure> structure, PassRefPtr<SVGRectElement> impl) - : JSSVGElement(structure, impl) +JSSVGRectElement::JSSVGRectElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGRectElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -133,130 +133,147 @@ bool JSSVGRectElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGRectElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementRx(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->rxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementRy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->ryAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGRectElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGRectElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGRectElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGRectElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGRectElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGRectElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGRectElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGRectElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGRectElement* castedThis = static_cast<JSSVGRectElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGRectElement* imp = static_cast<SVGRectElement*>(static_cast<JSSVGRectElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGRectElement* imp = static_cast<SVGRectElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGRectElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -300,7 +317,7 @@ JSValue JSC_HOST_CALL jsSVGRectElementPrototypeFunctionGetPresentationAttribute( const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -313,7 +330,7 @@ JSValue JSC_HOST_CALL jsSVGRectElementPrototypeFunctionGetBBox(ExecState* exec, SVGRectElement* imp = static_cast<SVGRectElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -326,7 +343,7 @@ JSValue JSC_HOST_CALL jsSVGRectElementPrototypeFunctionGetCTM(ExecState* exec, J SVGRectElement* imp = static_cast<SVGRectElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -339,7 +356,7 @@ JSValue JSC_HOST_CALL jsSVGRectElementPrototypeFunctionGetScreenCTM(ExecState* e SVGRectElement* imp = static_cast<SVGRectElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -354,7 +371,7 @@ JSValue JSC_HOST_CALL jsSVGRectElementPrototypeFunctionGetTransformToElement(Exe SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.h index 342b4be9db..d20104bcf9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.h @@ -33,7 +33,7 @@ class SVGRectElement; class JSSVGRectElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGRectElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGRectElement>); + JSSVGRectElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGRectElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp index 938f097921..9934b0b740 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGRenderingIntentConstructorTable = { 16, 15, JSSVGRenderingIntentConstructorTableValues, 0 }; #endif -class JSSVGRenderingIntentConstructor : public DOMObject { +class JSSVGRenderingIntentConstructor : public DOMConstructorObject { public: - JSSVGRenderingIntentConstructor(ExecState* exec) - : DOMObject(JSSVGRenderingIntentConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGRenderingIntentConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGRenderingIntentConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGRenderingIntentPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGRenderingIntentPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -126,9 +126,8 @@ bool JSSVGRenderingIntentPrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSSVGRenderingIntent::s_info = { "SVGRenderingIntent", 0, &JSSVGRenderingIntentTable, 0 }; -JSSVGRenderingIntent::JSSVGRenderingIntent(PassRefPtr<Structure> structure, PassRefPtr<SVGRenderingIntent> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGRenderingIntent::JSSVGRenderingIntent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGRenderingIntent> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -150,11 +149,12 @@ bool JSSVGRenderingIntent::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGRenderingIntentConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGRenderingIntent*>(asObject(slot.slotBase()))->getConstructor(exec); + UNUSED_PARAM(slot); + return JSSVGRenderingIntent::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec)); } -JSValue JSSVGRenderingIntent::getConstructor(ExecState* exec) +JSValue JSSVGRenderingIntent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGRenderingIntentConstructor>(exec); + return getDOMConstructor<JSSVGRenderingIntentConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters @@ -189,9 +189,9 @@ JSValue jsSVGRenderingIntentRENDERING_INTENT_ABSOLUTE_COLORIMETRIC(ExecState* ex return jsNumber(exec, static_cast<int>(5)); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGRenderingIntent* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGRenderingIntent* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGRenderingIntent>(exec, object, context); + return getDOMObjectWrapper<JSSVGRenderingIntent>(exec, globalObject, object, context); } SVGRenderingIntent* toSVGRenderingIntent(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.h b/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.h index 22aff9cdfd..8dad637efd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGRenderingIntent; -class JSSVGRenderingIntent : public DOMObject { - typedef DOMObject Base; +class JSSVGRenderingIntent : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGRenderingIntent(PassRefPtr<JSC::Structure>, PassRefPtr<SVGRenderingIntent>, SVGElement* context); + JSSVGRenderingIntent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGRenderingIntent>, SVGElement* context); virtual ~JSSVGRenderingIntent(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,16 +48,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); SVGRenderingIntent* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGRenderingIntent > m_impl; + RefPtr<SVGRenderingIntent> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGRenderingIntent*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGRenderingIntent*, SVGElement* context); SVGRenderingIntent* toSVGRenderingIntent(JSC::JSValue); class JSSVGRenderingIntentPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp index b6107797cb..5fec42f779 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp @@ -165,8 +165,8 @@ bool JSSVGSVGElementPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSSVGSVGElement::s_info = { "SVGSVGElement", &JSSVGElement::s_info, &JSSVGSVGElementTable, 0 }; -JSSVGSVGElement::JSSVGSVGElement(PassRefPtr<Structure> structure, PassRefPtr<SVGSVGElement> impl) - : JSSVGElement(structure, impl) +JSSVGSVGElement::JSSVGSVGElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGSVGElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -182,198 +182,225 @@ bool JSSVGSVGElement::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsSVGSVGElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSVGElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSVGElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSVGElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSVGElementContentScriptType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsString(exec, imp->contentScriptType()); } JSValue jsSVGSVGElementContentStyleType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsString(exec, imp->contentStyleType()); } JSValue jsSVGSVGElementViewport(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->viewport()).get(), imp); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->viewport()).get(), imp); } JSValue jsSVGSVGElementPixelUnitToMillimeterX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsNumber(exec, imp->pixelUnitToMillimeterX()); } JSValue jsSVGSVGElementPixelUnitToMillimeterY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsNumber(exec, imp->pixelUnitToMillimeterY()); } JSValue jsSVGSVGElementScreenPixelToMillimeterX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsNumber(exec, imp->screenPixelToMillimeterX()); } JSValue jsSVGSVGElementScreenPixelToMillimeterY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsNumber(exec, imp->screenPixelToMillimeterY()); } JSValue jsSVGSVGElementUseCurrentView(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsBoolean(imp->useCurrentView()); } JSValue jsSVGSVGElementCurrentScale(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsNumber(exec, imp->currentScale()); } JSValue jsSVGSVGElementCurrentTranslate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGStaticPODTypeWrapperWithParent<FloatPoint, SVGSVGElement>::create(imp, &SVGSVGElement::currentTranslate, &SVGSVGElement::setCurrentTranslate).get(), imp); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapperWithParent<FloatPoint, SVGSVGElement>::create(imp, &SVGSVGElement::currentTranslate, &SVGSVGElement::setCurrentTranslate).get(), imp); } JSValue jsSVGSVGElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGSVGElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGSVGElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGSVGElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGSVGElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGSVGElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSVGElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSVGElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGSVGElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGSVGElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } JSValue jsSVGSVGElementViewBox(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); RefPtr<SVGAnimatedRect> obj = imp->viewBoxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSVGElementPreserveAspectRatio(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSVGElementZoomAndPan(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSVGElement* castedThis = static_cast<JSSVGSVGElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSVGElement* imp = static_cast<SVGSVGElement*>(static_cast<JSSVGSVGElement*>(asObject(slot.slotBase()))->impl()); + SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThis->impl()); return jsNumber(exec, imp->zoomAndPan()); } @@ -551,7 +578,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetIntersectionList(ExecSt SVGElement* referenceElement = toSVGElement(args.at(1)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getIntersectionList(rect, referenceElement))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getIntersectionList(rect, referenceElement))); return result; } @@ -566,7 +593,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetEnclosureList(ExecState SVGElement* referenceElement = toSVGElement(args.at(1)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getEnclosureList(rect, referenceElement))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getEnclosureList(rect, referenceElement))); return result; } @@ -621,7 +648,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGNumber(ExecState* SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<float>::create(imp->createSVGNumber()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<float>::create(imp->createSVGNumber()).get(), imp); return result; } @@ -634,7 +661,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGLength(ExecState* SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->createSVGLength()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<SVGLength>::create(imp->createSVGLength()).get(), imp); return result; } @@ -647,7 +674,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGAngle(ExecState* SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createSVGAngle()), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createSVGAngle()), imp); return result; } @@ -660,7 +687,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGPoint(ExecState* SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->createSVGPoint()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->createSVGPoint()).get(), imp); return result; } @@ -673,7 +700,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGMatrix(ExecState* SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->createSVGMatrix()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->createSVGMatrix()).get(), imp); return result; } @@ -686,7 +713,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGRect(ExecState* e SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->createSVGRect()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->createSVGRect()).get(), imp); return result; } @@ -699,7 +726,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGTransform(ExecSta SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->createSVGTransform()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->createSVGTransform()).get(), imp); return result; } @@ -713,7 +740,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionCreateSVGTransformFromMatr TransformationMatrix matrix = toSVGMatrix(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->createSVGTransformFromMatrix(matrix)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->createSVGTransformFromMatrix(matrix)).get(), imp); return result; } @@ -741,7 +768,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetPresentationAttribute(E const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -754,7 +781,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetBBox(ExecState* exec, J SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -767,7 +794,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetCTM(ExecState* exec, JS SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -780,7 +807,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetScreenCTM(ExecState* ex SVGSVGElement* imp = static_cast<SVGSVGElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -795,7 +822,7 @@ JSValue JSC_HOST_CALL jsSVGSVGElementPrototypeFunctionGetTransformToElement(Exec SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.h index 7701efe9d7..2883b06b38 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.h @@ -33,7 +33,7 @@ class SVGSVGElement; class JSSVGSVGElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGSVGElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGSVGElement>); + JSSVGSVGElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGSVGElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp index 4c8e140fb0..69a416990b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp @@ -77,8 +77,8 @@ JSObject* JSSVGScriptElementPrototype::self(ExecState* exec, JSGlobalObject* glo const ClassInfo JSSVGScriptElement::s_info = { "SVGScriptElement", &JSSVGElement::s_info, &JSSVGScriptElementTable, 0 }; -JSSVGScriptElement::JSSVGScriptElement(PassRefPtr<Structure> structure, PassRefPtr<SVGScriptElement> impl) - : JSSVGElement(structure, impl) +JSSVGScriptElement::JSSVGScriptElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGScriptElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -94,25 +94,28 @@ bool JSSVGScriptElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGScriptElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGScriptElement* castedThis = static_cast<JSSVGScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGScriptElement* imp = static_cast<SVGScriptElement*>(static_cast<JSSVGScriptElement*>(asObject(slot.slotBase()))->impl()); + SVGScriptElement* imp = static_cast<SVGScriptElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsSVGScriptElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGScriptElement* castedThis = static_cast<JSSVGScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGScriptElement* imp = static_cast<SVGScriptElement*>(static_cast<JSSVGScriptElement*>(asObject(slot.slotBase()))->impl()); + SVGScriptElement* imp = static_cast<SVGScriptElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGScriptElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGScriptElement* castedThis = static_cast<JSSVGScriptElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGScriptElement* imp = static_cast<SVGScriptElement*>(static_cast<JSSVGScriptElement*>(asObject(slot.slotBase()))->impl()); + SVGScriptElement* imp = static_cast<SVGScriptElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } void JSSVGScriptElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.h index 0d7eb3ade4..b0c5143148 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.h @@ -33,7 +33,7 @@ class SVGScriptElement; class JSSVGScriptElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGScriptElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGScriptElement>); + JSSVGScriptElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGScriptElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp index 35f8787501..44316855b8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGSetElementPrototype::self(ExecState* exec, JSGlobalObject* global const ClassInfo JSSVGSetElement::s_info = { "SVGSetElement", &JSSVGAnimationElement::s_info, 0, 0 }; -JSSVGSetElement::JSSVGSetElement(PassRefPtr<Structure> structure, PassRefPtr<SVGSetElement> impl) - : JSSVGAnimationElement(structure, impl) +JSSVGSetElement::JSSVGSetElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGSetElement> impl) + : JSSVGAnimationElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.h index 23e7382c91..2d70694b03 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.h @@ -33,7 +33,7 @@ class SVGSetElement; class JSSVGSetElement : public JSSVGAnimationElement { typedef JSSVGAnimationElement Base; public: - JSSVGSetElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGSetElement>); + JSSVGSetElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGSetElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp index ea8be78642..ed15447a14 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp @@ -87,8 +87,8 @@ bool JSSVGStopElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGStopElement::s_info = { "SVGStopElement", &JSSVGElement::s_info, &JSSVGStopElementTable, 0 }; -JSSVGStopElement::JSSVGStopElement(PassRefPtr<Structure> structure, PassRefPtr<SVGStopElement> impl) - : JSSVGElement(structure, impl) +JSSVGStopElement::JSSVGStopElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGStopElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -104,25 +104,28 @@ bool JSSVGStopElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGStopElementOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGStopElement* castedThis = static_cast<JSSVGStopElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGStopElement* imp = static_cast<SVGStopElement*>(static_cast<JSSVGStopElement*>(asObject(slot.slotBase()))->impl()); + SVGStopElement* imp = static_cast<SVGStopElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumber> obj = imp->offsetAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGStopElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGStopElement* castedThis = static_cast<JSSVGStopElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGStopElement* imp = static_cast<SVGStopElement*>(static_cast<JSSVGStopElement*>(asObject(slot.slotBase()))->impl()); + SVGStopElement* imp = static_cast<SVGStopElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGStopElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGStopElement* castedThis = static_cast<JSSVGStopElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGStopElement* imp = static_cast<SVGStopElement*>(static_cast<JSSVGStopElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGStopElement* imp = static_cast<SVGStopElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue JSC_HOST_CALL jsSVGStopElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -135,7 +138,7 @@ JSValue JSC_HOST_CALL jsSVGStopElementPrototypeFunctionGetPresentationAttribute( const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.h index 56f181a1ac..b2bd243c83 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.h @@ -33,7 +33,7 @@ class SVGStopElement; class JSSVGStopElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGStopElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGStopElement>); + JSSVGStopElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGStopElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp index 1f806270e0..3ccbeaf359 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp @@ -87,9 +87,8 @@ bool JSSVGStringListPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSSVGStringList::s_info = { "SVGStringList", 0, &JSSVGStringListTable, 0 }; -JSSVGStringList::JSSVGStringList(PassRefPtr<Structure> structure, PassRefPtr<SVGStringList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGStringList::JSSVGStringList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGStringList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -111,8 +110,9 @@ bool JSSVGStringList::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsSVGStringListNumberOfItems(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGStringList* castedThis = static_cast<JSSVGStringList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGStringList* imp = static_cast<SVGStringList*>(static_cast<JSSVGStringList*>(asObject(slot.slotBase()))->impl()); + SVGStringList* imp = static_cast<SVGStringList*>(castedThis->impl()); return jsNumber(exec, imp->numberOfItems()); } @@ -228,9 +228,9 @@ JSValue JSC_HOST_CALL jsSVGStringListPrototypeFunctionAppendItem(ExecState* exec return result; } -JSC::JSValue toJS(JSC::ExecState* exec, SVGStringList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGStringList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGStringList>(exec, object, context); + return getDOMObjectWrapper<JSSVGStringList>(exec, globalObject, object, context); } SVGStringList* toSVGStringList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.h index e7b631ea44..c880b8c688 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGStringList; -class JSSVGStringList : public DOMObject { - typedef DOMObject Base; +class JSSVGStringList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGStringList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGStringList>, SVGElement* context); + JSSVGStringList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGStringList>, SVGElement* context); virtual ~JSSVGStringList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -48,14 +49,12 @@ public: } SVGStringList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGStringList > m_impl; + RefPtr<SVGStringList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGStringList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGStringList*, SVGElement* context); SVGStringList* toSVGStringList(JSC::JSValue); class JSSVGStringListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp index 1d7bd7a393..2e0c093f34 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp @@ -76,8 +76,8 @@ JSObject* JSSVGStyleElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSSVGStyleElement::s_info = { "SVGStyleElement", &JSSVGElement::s_info, &JSSVGStyleElementTable, 0 }; -JSSVGStyleElement::JSSVGStyleElement(PassRefPtr<Structure> structure, PassRefPtr<SVGStyleElement> impl) - : JSSVGElement(structure, impl) +JSSVGStyleElement::JSSVGStyleElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGStyleElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -93,29 +93,33 @@ bool JSSVGStyleElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsSVGStyleElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGStyleElement* imp = static_cast<SVGStyleElement*>(static_cast<JSSVGStyleElement*>(asObject(slot.slotBase()))->impl()); + SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGStyleElementType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGStyleElement* imp = static_cast<SVGStyleElement*>(static_cast<JSSVGStyleElement*>(asObject(slot.slotBase()))->impl()); + SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl()); return jsString(exec, imp->type()); } JSValue jsSVGStyleElementMedia(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGStyleElement* imp = static_cast<SVGStyleElement*>(static_cast<JSSVGStyleElement*>(asObject(slot.slotBase()))->impl()); + SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl()); return jsString(exec, imp->media()); } JSValue jsSVGStyleElementTitle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGStyleElement* castedThis = static_cast<JSSVGStyleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGStyleElement* imp = static_cast<SVGStyleElement*>(static_cast<JSSVGStyleElement*>(asObject(slot.slotBase()))->impl()); + SVGStyleElement* imp = static_cast<SVGStyleElement*>(castedThis->impl()); return jsString(exec, imp->title()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.h index d318c527ec..adf3ee22b5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.h @@ -33,7 +33,7 @@ class SVGStyleElement; class JSSVGStyleElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGStyleElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGStyleElement>); + JSSVGStyleElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGStyleElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp index 83b2146e6d..b8c180f166 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp @@ -109,8 +109,8 @@ bool JSSVGSwitchElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSSVGSwitchElement::s_info = { "SVGSwitchElement", &JSSVGElement::s_info, &JSSVGSwitchElementTable, 0 }; -JSSVGSwitchElement::JSSVGSwitchElement(PassRefPtr<Structure> structure, PassRefPtr<SVGSwitchElement> impl) - : JSSVGElement(structure, impl) +JSSVGSwitchElement::JSSVGSwitchElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGSwitchElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -126,82 +126,93 @@ bool JSSVGSwitchElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGSwitchElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGSwitchElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGSwitchElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGSwitchElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGSwitchElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGSwitchElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSwitchElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSwitchElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGSwitchElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSwitchElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGSwitchElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSwitchElement* castedThis = static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(static_cast<JSSVGSwitchElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGSwitchElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -245,7 +256,7 @@ JSValue JSC_HOST_CALL jsSVGSwitchElementPrototypeFunctionGetPresentationAttribut const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -258,7 +269,7 @@ JSValue JSC_HOST_CALL jsSVGSwitchElementPrototypeFunctionGetBBox(ExecState* exec SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -271,7 +282,7 @@ JSValue JSC_HOST_CALL jsSVGSwitchElementPrototypeFunctionGetCTM(ExecState* exec, SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -284,7 +295,7 @@ JSValue JSC_HOST_CALL jsSVGSwitchElementPrototypeFunctionGetScreenCTM(ExecState* SVGSwitchElement* imp = static_cast<SVGSwitchElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -299,7 +310,7 @@ JSValue JSC_HOST_CALL jsSVGSwitchElementPrototypeFunctionGetTransformToElement(E SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.h index 3ae9bd106c..727362248d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.h @@ -33,7 +33,7 @@ class SVGSwitchElement; class JSSVGSwitchElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGSwitchElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGSwitchElement>); + JSSVGSwitchElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGSwitchElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp index 4a34e05ea9..c5d16b0886 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp @@ -95,8 +95,8 @@ bool JSSVGSymbolElementPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSSVGSymbolElement::s_info = { "SVGSymbolElement", &JSSVGElement::s_info, &JSSVGSymbolElementTable, 0 }; -JSSVGSymbolElement::JSSVGSymbolElement(PassRefPtr<Structure> structure, PassRefPtr<SVGSymbolElement> impl) - : JSSVGElement(structure, impl) +JSSVGSymbolElement::JSSVGSymbolElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGSymbolElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -112,55 +112,62 @@ bool JSSVGSymbolElement::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGSymbolElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSymbolElement* castedThis = static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase()))->impl()); + SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGSymbolElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSymbolElement* castedThis = static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase()))->impl()); + SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGSymbolElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSymbolElement* castedThis = static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase()))->impl()); + SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSymbolElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSymbolElement* castedThis = static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase()))->impl()); + SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSymbolElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSymbolElement* castedThis = static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGSymbolElementViewBox(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSymbolElement* castedThis = static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase()))->impl()); + SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(castedThis->impl()); RefPtr<SVGAnimatedRect> obj = imp->viewBoxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGSymbolElementPreserveAspectRatio(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGSymbolElement* castedThis = static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(static_cast<JSSVGSymbolElement*>(asObject(slot.slotBase()))->impl()); + SVGSymbolElement* imp = static_cast<SVGSymbolElement*>(castedThis->impl()); RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } void JSSVGSymbolElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -190,7 +197,7 @@ JSValue JSC_HOST_CALL jsSVGSymbolElementPrototypeFunctionGetPresentationAttribut const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.h index c5e5f711cf..11aaced607 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.h @@ -33,7 +33,7 @@ class SVGSymbolElement; class JSSVGSymbolElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGSymbolElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGSymbolElement>); + JSSVGSymbolElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGSymbolElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp index 8ee0f5f906..85777769d4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp @@ -72,8 +72,8 @@ JSObject* JSSVGTRefElementPrototype::self(ExecState* exec, JSGlobalObject* globa const ClassInfo JSSVGTRefElement::s_info = { "SVGTRefElement", &JSSVGTextPositioningElement::s_info, &JSSVGTRefElementTable, 0 }; -JSSVGTRefElement::JSSVGTRefElement(PassRefPtr<Structure> structure, PassRefPtr<SVGTRefElement> impl) - : JSSVGTextPositioningElement(structure, impl) +JSSVGTRefElement::JSSVGTRefElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTRefElement> impl) + : JSSVGTextPositioningElement(structure, globalObject, impl) { } @@ -89,10 +89,11 @@ bool JSSVGTRefElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGTRefElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTRefElement* castedThis = static_cast<JSSVGTRefElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTRefElement* imp = static_cast<SVGTRefElement*>(static_cast<JSSVGTRefElement*>(asObject(slot.slotBase()))->impl()); + SVGTRefElement* imp = static_cast<SVGTRefElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.h index e70e821cb8..eabb96d64a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.h @@ -33,7 +33,7 @@ class SVGTRefElement; class JSSVGTRefElement : public JSSVGTextPositioningElement { typedef JSSVGTextPositioningElement Base; public: - JSSVGTRefElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGTRefElement>); + JSSVGTRefElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGTRefElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp index 5203dfbb70..a0a593b8cb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp @@ -56,8 +56,8 @@ JSObject* JSSVGTSpanElementPrototype::self(ExecState* exec, JSGlobalObject* glob const ClassInfo JSSVGTSpanElement::s_info = { "SVGTSpanElement", &JSSVGTextPositioningElement::s_info, 0, 0 }; -JSSVGTSpanElement::JSSVGTSpanElement(PassRefPtr<Structure> structure, PassRefPtr<SVGTSpanElement> impl) - : JSSVGTextPositioningElement(structure, impl) +JSSVGTSpanElement::JSSVGTSpanElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTSpanElement> impl) + : JSSVGTextPositioningElement(structure, globalObject, impl) { } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.h index a3e9b6a7c6..d85c4f110b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.h @@ -33,7 +33,7 @@ class SVGTSpanElement; class JSSVGTSpanElement : public JSSVGTextPositioningElement { typedef JSSVGTextPositioningElement Base; public: - JSSVGTSpanElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGTSpanElement>); + JSSVGTSpanElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGTSpanElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp index 4208aa38f9..ff8c8aa32e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp @@ -94,12 +94,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGTextContentElementConstructorTable = { 8, 7, JSSVGTextContentElementConstructorTableValues, 0 }; #endif -class JSSVGTextContentElementConstructor : public DOMObject { +class JSSVGTextContentElementConstructor : public DOMConstructorObject { public: - JSSVGTextContentElementConstructor(ExecState* exec) - : DOMObject(JSSVGTextContentElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGTextContentElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGTextContentElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGTextContentElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGTextContentElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -160,8 +160,8 @@ bool JSSVGTextContentElementPrototype::getOwnPropertySlot(ExecState* exec, const const ClassInfo JSSVGTextContentElement::s_info = { "SVGTextContentElement", &JSSVGElement::s_info, &JSSVGTextContentElementTable, 0 }; -JSSVGTextContentElement::JSSVGTextContentElement(PassRefPtr<Structure> structure, PassRefPtr<SVGTextContentElement> impl) - : JSSVGElement(structure, impl) +JSSVGTextContentElement::JSSVGTextContentElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTextContentElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -177,81 +177,92 @@ bool JSSVGTextContentElement::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsSVGTextContentElementTextLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->textLengthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextContentElementLengthAdjust(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->lengthAdjustAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextContentElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGTextContentElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGTextContentElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGTextContentElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGTextContentElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGTextContentElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextContentElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextContentElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGTextContentElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGTextContentElement* domObject = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase())); + return JSSVGTextContentElement::getConstructor(exec, domObject->globalObject()); } void JSSVGTextContentElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -270,9 +281,9 @@ void setJSSVGTextContentElementXmlspace(ExecState* exec, JSObject* thisObject, J imp->setXmlspace(value.toString(exec)); } -JSValue JSSVGTextContentElement::getConstructor(ExecState* exec) +JSValue JSSVGTextContentElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGTextContentElementConstructor>(exec); + return getDOMConstructor<JSSVGTextContentElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGTextContentElementPrototypeFunctionGetNumberOfChars(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -341,7 +352,7 @@ JSValue JSC_HOST_CALL jsSVGTextContentElementPrototypeFunctionGetStartPositionOf } - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->getStartPositionOfChar(offset, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->getStartPositionOfChar(offset, ec)).get(), imp); setDOMException(exec, ec); return result; } @@ -361,7 +372,7 @@ JSValue JSC_HOST_CALL jsSVGTextContentElementPrototypeFunctionGetEndPositionOfCh } - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->getEndPositionOfChar(offset, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->getEndPositionOfChar(offset, ec)).get(), imp); setDOMException(exec, ec); return result; } @@ -381,7 +392,7 @@ JSValue JSC_HOST_CALL jsSVGTextContentElementPrototypeFunctionGetExtentOfChar(Ex } - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getExtentOfChar(offset, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getExtentOfChar(offset, ec)).get(), imp); setDOMException(exec, ec); return result; } @@ -468,7 +479,7 @@ JSValue JSC_HOST_CALL jsSVGTextContentElementPrototypeFunctionGetPresentationAtt const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.h index 3fbc5fd820..0c90d837f6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.h @@ -33,7 +33,7 @@ class SVGTextContentElement; class JSSVGTextContentElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGTextContentElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGTextContentElement>); + JSSVGTextContentElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGTextContentElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -45,7 +45,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp index 270113bea7..4f1dda671f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp @@ -88,8 +88,8 @@ bool JSSVGTextElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGTextElement::s_info = { "SVGTextElement", &JSSVGTextPositioningElement::s_info, &JSSVGTextElementTable, 0 }; -JSSVGTextElement::JSSVGTextElement(PassRefPtr<Structure> structure, PassRefPtr<SVGTextElement> impl) - : JSSVGTextPositioningElement(structure, impl) +JSSVGTextElement::JSSVGTextElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTextElement> impl) + : JSSVGTextPositioningElement(structure, globalObject, impl) { } @@ -105,24 +105,27 @@ bool JSSVGTextElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGTextElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextElement* castedThis = static_cast<JSSVGTextElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextElement* imp = static_cast<SVGTextElement*>(static_cast<JSSVGTextElement*>(asObject(slot.slotBase()))->impl()); + SVGTextElement* imp = static_cast<SVGTextElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextElement* castedThis = static_cast<JSSVGTextElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextElement* imp = static_cast<SVGTextElement*>(static_cast<JSSVGTextElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGTextElement* imp = static_cast<SVGTextElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGTextElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextElement* castedThis = static_cast<JSSVGTextElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextElement* imp = static_cast<SVGTextElement*>(static_cast<JSSVGTextElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGTextElement* imp = static_cast<SVGTextElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } JSValue JSC_HOST_CALL jsSVGTextElementPrototypeFunctionGetBBox(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -134,7 +137,7 @@ JSValue JSC_HOST_CALL jsSVGTextElementPrototypeFunctionGetBBox(ExecState* exec, SVGTextElement* imp = static_cast<SVGTextElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -147,7 +150,7 @@ JSValue JSC_HOST_CALL jsSVGTextElementPrototypeFunctionGetCTM(ExecState* exec, J SVGTextElement* imp = static_cast<SVGTextElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -160,7 +163,7 @@ JSValue JSC_HOST_CALL jsSVGTextElementPrototypeFunctionGetScreenCTM(ExecState* e SVGTextElement* imp = static_cast<SVGTextElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -175,7 +178,7 @@ JSValue JSC_HOST_CALL jsSVGTextElementPrototypeFunctionGetTransformToElement(Exe SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.h index 4aff180463..357640a432 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.h @@ -33,7 +33,7 @@ class SVGTextElement; class JSSVGTextElement : public JSSVGTextPositioningElement { typedef JSSVGTextPositioningElement Base; public: - JSSVGTextElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGTextElement>); + JSSVGTextElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGTextElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp index 68bcbf83f3..ebc5ad84e5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp @@ -75,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGTextPathElementConstructorTable = { 18, 15, JSSVGTextPathElementConstructorTableValues, 0 }; #endif -class JSSVGTextPathElementConstructor : public DOMObject { +class JSSVGTextPathElementConstructor : public DOMConstructorObject { public: - JSSVGTextPathElementConstructor(ExecState* exec) - : DOMObject(JSSVGTextPathElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGTextPathElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGTextPathElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGTextPathElementPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGTextPathElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -133,8 +133,8 @@ bool JSSVGTextPathElementPrototype::getOwnPropertySlot(ExecState* exec, const Id const ClassInfo JSSVGTextPathElement::s_info = { "SVGTextPathElement", &JSSVGTextContentElement::s_info, &JSSVGTextPathElementTable, 0 }; -JSSVGTextPathElement::JSSVGTextPathElement(PassRefPtr<Structure> structure, PassRefPtr<SVGTextPathElement> impl) - : JSSVGTextContentElement(structure, impl) +JSSVGTextPathElement::JSSVGTextPathElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTextPathElement> impl) + : JSSVGTextContentElement(structure, globalObject, impl) { } @@ -150,43 +150,48 @@ bool JSSVGTextPathElement::getOwnPropertySlot(ExecState* exec, const Identifier& JSValue jsSVGTextPathElementStartOffset(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPathElement* castedThis = static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->startOffsetAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextPathElementMethod(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPathElement* castedThis = static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->methodAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextPathElementSpacing(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPathElement* castedThis = static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedEnumeration> obj = imp->spacingAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextPathElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPathElement* castedThis = static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPathElement* imp = static_cast<SVGTextPathElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextPathElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase()))->getConstructor(exec); + JSSVGTextPathElement* domObject = static_cast<JSSVGTextPathElement*>(asObject(slot.slotBase())); + return JSSVGTextPathElement::getConstructor(exec, domObject->globalObject()); } -JSValue JSSVGTextPathElement::getConstructor(ExecState* exec) +JSValue JSSVGTextPathElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGTextPathElementConstructor>(exec); + return getDOMConstructor<JSSVGTextPathElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.h index 9301f9dcd2..382f8f0871 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.h @@ -33,7 +33,7 @@ class SVGTextPathElement; class JSSVGTextPathElement : public JSSVGTextContentElement { typedef JSSVGTextContentElement Base; public: - JSSVGTextPathElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGTextPathElement>); + JSSVGTextPathElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGTextPathElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +44,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp index 24bc336a44..88260e7736 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp @@ -77,8 +77,8 @@ JSObject* JSSVGTextPositioningElementPrototype::self(ExecState* exec, JSGlobalOb const ClassInfo JSSVGTextPositioningElement::s_info = { "SVGTextPositioningElement", &JSSVGTextContentElement::s_info, &JSSVGTextPositioningElementTable, 0 }; -JSSVGTextPositioningElement::JSSVGTextPositioningElement(PassRefPtr<Structure> structure, PassRefPtr<SVGTextPositioningElement> impl) - : JSSVGTextContentElement(structure, impl) +JSSVGTextPositioningElement::JSSVGTextPositioningElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTextPositioningElement> impl) + : JSSVGTextContentElement(structure, globalObject, impl) { } @@ -94,42 +94,47 @@ bool JSSVGTextPositioningElement::getOwnPropertySlot(ExecState* exec, const Iden JSValue jsSVGTextPositioningElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPositioningElement* castedThis = static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(castedThis->impl()); RefPtr<SVGAnimatedLengthList> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextPositioningElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPositioningElement* castedThis = static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(castedThis->impl()); RefPtr<SVGAnimatedLengthList> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextPositioningElementDx(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPositioningElement* castedThis = static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(castedThis->impl()); RefPtr<SVGAnimatedLengthList> obj = imp->dxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextPositioningElementDy(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPositioningElement* castedThis = static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(castedThis->impl()); RefPtr<SVGAnimatedLengthList> obj = imp->dyAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTextPositioningElementRotate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTextPositioningElement* castedThis = static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(static_cast<JSSVGTextPositioningElement*>(asObject(slot.slotBase()))->impl()); + SVGTextPositioningElement* imp = static_cast<SVGTextPositioningElement*>(castedThis->impl()); RefPtr<SVGAnimatedNumberList> obj = imp->rotateAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.h index 3f4864d909..b34c095fe6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.h @@ -33,7 +33,7 @@ class SVGTextPositioningElement; class JSSVGTextPositioningElement : public JSSVGTextContentElement { typedef JSSVGTextContentElement Base; public: - JSSVGTextPositioningElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGTextPositioningElement>); + JSSVGTextPositioningElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGTextPositioningElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp index 962a9f5ff0..438ed3f39f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp @@ -89,8 +89,8 @@ bool JSSVGTitleElementPrototype::getOwnPropertySlot(ExecState* exec, const Ident const ClassInfo JSSVGTitleElement::s_info = { "SVGTitleElement", &JSSVGElement::s_info, &JSSVGTitleElementTable, 0 }; -JSSVGTitleElement::JSSVGTitleElement(PassRefPtr<Structure> structure, PassRefPtr<SVGTitleElement> impl) - : JSSVGElement(structure, impl) +JSSVGTitleElement::JSSVGTitleElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTitleElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -106,31 +106,35 @@ bool JSSVGTitleElement::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsSVGTitleElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTitleElement* castedThis = static_cast<JSSVGTitleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTitleElement* imp = static_cast<SVGTitleElement*>(static_cast<JSSVGTitleElement*>(asObject(slot.slotBase()))->impl()); + SVGTitleElement* imp = static_cast<SVGTitleElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGTitleElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTitleElement* castedThis = static_cast<JSSVGTitleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTitleElement* imp = static_cast<SVGTitleElement*>(static_cast<JSSVGTitleElement*>(asObject(slot.slotBase()))->impl()); + SVGTitleElement* imp = static_cast<SVGTitleElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGTitleElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTitleElement* castedThis = static_cast<JSSVGTitleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTitleElement* imp = static_cast<SVGTitleElement*>(static_cast<JSSVGTitleElement*>(asObject(slot.slotBase()))->impl()); + SVGTitleElement* imp = static_cast<SVGTitleElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGTitleElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTitleElement* castedThis = static_cast<JSSVGTitleElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTitleElement* imp = static_cast<SVGTitleElement*>(static_cast<JSSVGTitleElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGTitleElement* imp = static_cast<SVGTitleElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } void JSSVGTitleElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -160,7 +164,7 @@ JSValue JSC_HOST_CALL jsSVGTitleElementPrototypeFunctionGetPresentationAttribute const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.h index 31848a7939..91a49fd720 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.h @@ -33,7 +33,7 @@ class SVGTitleElement; class JSSVGTitleElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGTitleElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGTitleElement>); + JSSVGTitleElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGTitleElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp index 8f0aeb0df5..d50dfc5290 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp @@ -75,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGTransformConstructorTable = { 18, 15, JSSVGTransformConstructorTableValues, 0 }; #endif -class JSSVGTransformConstructor : public DOMObject { +class JSSVGTransformConstructor : public DOMConstructorObject { public: - JSSVGTransformConstructor(ExecState* exec) - : DOMObject(JSSVGTransformConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGTransformConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGTransformConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGTransformPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGTransformPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -140,9 +140,8 @@ bool JSSVGTransformPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSSVGTransform::s_info = { "SVGTransform", 0, &JSSVGTransformTable, 0 }; -JSSVGTransform::JSSVGTransform(PassRefPtr<Structure> structure, PassRefPtr<JSSVGPODTypeWrapper<SVGTransform> > impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGTransform::JSSVGTransform(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JSSVGPODTypeWrapper<SVGTransform> > impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -164,32 +163,36 @@ bool JSSVGTransform::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsSVGTransformType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTransform imp(*static_cast<JSSVGTransform*>(asObject(slot.slotBase()))->impl()); + SVGTransform imp(*castedThis->impl()); return jsNumber(exec, imp.type()); } JSValue jsSVGTransformMatrix(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTransform imp(*static_cast<JSSVGTransform*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGStaticPODTypeWrapperWithPODTypeParent<TransformationMatrix, SVGTransform>::create(imp.matrix(), static_cast<JSSVGTransform*>(asObject(slot.slotBase()))->impl()).get(), static_cast<JSSVGTransform*>(asObject(slot.slotBase()))->context()); + SVGTransform imp(*castedThis->impl()); + return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapperWithPODTypeParent<TransformationMatrix, SVGTransform>::create(imp.matrix(), castedThis->impl()).get(), castedThis->context()); } JSValue jsSVGTransformAngle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTransform imp(*static_cast<JSSVGTransform*>(asObject(slot.slotBase()))->impl()); + SVGTransform imp(*castedThis->impl()); return jsNumber(exec, imp.angle()); } JSValue jsSVGTransformConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGTransform*>(asObject(slot.slotBase()))->getConstructor(exec); + UNUSED_PARAM(slot); + return JSSVGTransform::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec)); } -JSValue JSSVGTransform::getConstructor(ExecState* exec) +JSValue JSSVGTransform::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGTransformConstructor>(exec); + return getDOMConstructor<JSSVGTransformConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsSVGTransformPrototypeFunctionSetMatrix(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -323,9 +326,9 @@ JSValue jsSVGTransformSVG_TRANSFORM_SKEWY(ExecState* exec, const Identifier&, co return jsNumber(exec, static_cast<int>(6)); } -JSC::JSValue toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<SVGTransform>* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<SVGTransform>* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGTransform, JSSVGPODTypeWrapper<SVGTransform> >(exec, object, context); + return getDOMObjectWrapper<JSSVGTransform, JSSVGPODTypeWrapper<SVGTransform> >(exec, globalObject, object, context); } SVGTransform toSVGTransform(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.h index c95932a3a5..90b8ef95ae 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "JSSVGPODTypeWrapper.h" #include "SVGElement.h" @@ -32,10 +33,10 @@ namespace WebCore { -class JSSVGTransform : public DOMObject { - typedef DOMObject Base; +class JSSVGTransform : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGTransform(PassRefPtr<JSC::Structure>, PassRefPtr<JSSVGPODTypeWrapper<SVGTransform> >, SVGElement* context); + JSSVGTransform(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<JSSVGPODTypeWrapper<SVGTransform> >, SVGElement* context); virtual ~JSSVGTransform(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,16 +48,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); - JSSVGPODTypeWrapper<SVGTransform>* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); + JSSVGPODTypeWrapper<SVGTransform> * impl() const { return m_impl.get(); } private: - RefPtr<SVGElement> m_context; RefPtr<JSSVGPODTypeWrapper<SVGTransform> > m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, JSSVGPODTypeWrapper<SVGTransform>*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSSVGPODTypeWrapper<SVGTransform>*, SVGElement* context); SVGTransform toSVGTransform(JSC::JSValue); class JSSVGTransformPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp index 855efe0843..676271d32b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp @@ -90,9 +90,8 @@ bool JSSVGTransformListPrototype::getOwnPropertySlot(ExecState* exec, const Iden const ClassInfo JSSVGTransformList::s_info = { "SVGTransformList", 0, &JSSVGTransformListTable, 0 }; -JSSVGTransformList::JSSVGTransformList(PassRefPtr<Structure> structure, PassRefPtr<SVGTransformList> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGTransformList::JSSVGTransformList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGTransformList> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -114,8 +113,9 @@ bool JSSVGTransformList::getOwnPropertySlot(ExecState* exec, const Identifier& p JSValue jsSVGTransformListNumberOfItems(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGTransformList* castedThis = static_cast<JSSVGTransformList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGTransformList* imp = static_cast<SVGTransformList*>(static_cast<JSSVGTransformList*>(asObject(slot.slotBase()))->impl()); + SVGTransformList* imp = static_cast<SVGTransformList*>(castedThis->impl()); return jsNumber(exec, imp->numberOfItems()); } @@ -192,7 +192,7 @@ JSValue JSC_HOST_CALL jsSVGTransformListPrototypeFunctionCreateSVGTransformFromM TransformationMatrix matrix = toSVGMatrix(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->createSVGTransformFromMatrix(matrix)).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->createSVGTransformFromMatrix(matrix)).get(), castedThisObj->context()); return result; } @@ -205,13 +205,13 @@ JSValue JSC_HOST_CALL jsSVGTransformListPrototypeFunctionConsolidate(ExecState* SVGTransformList* imp = static_cast<SVGTransformList*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->consolidate()).get(), castedThisObj->context()); + JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGTransform>::create(imp->consolidate()).get(), castedThisObj->context()); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, SVGTransformList* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGTransformList* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGTransformList>(exec, object, context); + return getDOMObjectWrapper<JSSVGTransformList>(exec, globalObject, object, context); } SVGTransformList* toSVGTransformList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.h b/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.h index 9718f9b6c5..463d0e41a0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGTransformList; -class JSSVGTransformList : public DOMObject { - typedef DOMObject Base; +class JSSVGTransformList : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGTransformList(PassRefPtr<JSC::Structure>, PassRefPtr<SVGTransformList>, SVGElement* context); + JSSVGTransformList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGTransformList>, SVGElement* context); virtual ~JSSVGTransformList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -57,14 +58,12 @@ public: JSC::JSValue removeItem(JSC::ExecState*, const JSC::ArgList&); JSC::JSValue appendItem(JSC::ExecState*, const JSC::ArgList&); SVGTransformList* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGTransformList > m_impl; + RefPtr<SVGTransformList> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGTransformList*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGTransformList*, SVGElement* context); SVGTransformList* toSVGTransformList(JSC::JSValue); class JSSVGTransformListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp index 569a35aaca..4eebca76bd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSSVGUnitTypesConstructorTable = { 8, 7, JSSVGUnitTypesConstructorTableValues, 0 }; #endif -class JSSVGUnitTypesConstructor : public DOMObject { +class JSSVGUnitTypesConstructor : public DOMConstructorObject { public: - JSSVGUnitTypesConstructor(ExecState* exec) - : DOMObject(JSSVGUnitTypesConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSSVGUnitTypesConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGUnitTypesConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSSVGUnitTypesPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSSVGUnitTypesPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -120,9 +120,8 @@ bool JSSVGUnitTypesPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSSVGUnitTypes::s_info = { "SVGUnitTypes", 0, &JSSVGUnitTypesTable, 0 }; -JSSVGUnitTypes::JSSVGUnitTypes(PassRefPtr<Structure> structure, PassRefPtr<SVGUnitTypes> impl, SVGElement* context) - : DOMObject(structure) - , m_context(context) +JSSVGUnitTypes::JSSVGUnitTypes(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGUnitTypes> impl, SVGElement* context) + : DOMObjectWithSVGContext(structure, globalObject, context) , m_impl(impl) { } @@ -144,11 +143,12 @@ bool JSSVGUnitTypes::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsSVGUnitTypesConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSSVGUnitTypes*>(asObject(slot.slotBase()))->getConstructor(exec); + UNUSED_PARAM(slot); + return JSSVGUnitTypes::getConstructor(exec, deprecatedGlobalObjectForPrototype(exec)); } -JSValue JSSVGUnitTypes::getConstructor(ExecState* exec) +JSValue JSSVGUnitTypes::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSSVGUnitTypesConstructor>(exec); + return getDOMConstructor<JSSVGUnitTypesConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters @@ -168,9 +168,9 @@ JSValue jsSVGUnitTypesSVG_UNIT_TYPE_OBJECTBOUNDINGBOX(ExecState* exec, const Ide return jsNumber(exec, static_cast<int>(2)); } -JSC::JSValue toJS(JSC::ExecState* exec, SVGUnitTypes* object, SVGElement* context) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGUnitTypes* object, SVGElement* context) { - return getDOMObjectWrapper<JSSVGUnitTypes>(exec, object, context); + return getDOMObjectWrapper<JSSVGUnitTypes>(exec, globalObject, object, context); } SVGUnitTypes* toSVGUnitTypes(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.h b/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.h index 080f7bae29..8ec3a94eea 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.h @@ -23,6 +23,7 @@ #if ENABLE(SVG) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include "SVGElement.h" #include <runtime/JSGlobalObject.h> @@ -32,10 +33,10 @@ namespace WebCore { class SVGUnitTypes; -class JSSVGUnitTypes : public DOMObject { - typedef DOMObject Base; +class JSSVGUnitTypes : public DOMObjectWithSVGContext { + typedef DOMObjectWithSVGContext Base; public: - JSSVGUnitTypes(PassRefPtr<JSC::Structure>, PassRefPtr<SVGUnitTypes>, SVGElement* context); + JSSVGUnitTypes(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGUnitTypes>, SVGElement* context); virtual ~JSSVGUnitTypes(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,16 +48,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); SVGUnitTypes* impl() const { return m_impl.get(); } - SVGElement* context() const { return m_context.get(); } private: - RefPtr<SVGElement> m_context; - RefPtr<SVGUnitTypes > m_impl; + RefPtr<SVGUnitTypes> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, SVGUnitTypes*, SVGElement* context); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, SVGUnitTypes*, SVGElement* context); SVGUnitTypes* toSVGUnitTypes(JSC::JSValue); class JSSVGUnitTypesPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp index f309e6d68d..43c337e1e0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp @@ -119,8 +119,8 @@ bool JSSVGUseElementPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSSVGUseElement::s_info = { "SVGUseElement", &JSSVGElement::s_info, &JSSVGUseElementTable, 0 }; -JSSVGUseElement::JSSVGUseElement(PassRefPtr<Structure> structure, PassRefPtr<SVGUseElement> impl) - : JSSVGElement(structure, impl) +JSSVGUseElement::JSSVGUseElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGUseElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -136,136 +136,154 @@ bool JSSVGUseElement::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsSVGUseElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGUseElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGUseElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGUseElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGUseElementInstanceRoot(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->instanceRoot())); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->instanceRoot())); } JSValue jsSVGUseElementAnimatedInstanceRoot(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->animatedInstanceRoot())); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->animatedInstanceRoot())); } JSValue jsSVGUseElementHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->hrefAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGUseElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); } JSValue jsSVGUseElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); } JSValue jsSVGUseElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); } JSValue jsSVGUseElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); return jsString(exec, imp->xmllang()); } JSValue jsSVGUseElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); return jsString(exec, imp->xmlspace()); } JSValue jsSVGUseElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGUseElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGUseElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGUseElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGUseElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); } JSValue jsSVGUseElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGUseElement* castedThis = static_cast<JSSVGUseElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGUseElement* imp = static_cast<SVGUseElement*>(static_cast<JSSVGUseElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); + SVGUseElement* imp = static_cast<SVGUseElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); } void JSSVGUseElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -309,7 +327,7 @@ JSValue JSC_HOST_CALL jsSVGUseElementPrototypeFunctionGetPresentationAttribute(E const UString& name = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } @@ -322,7 +340,7 @@ JSValue JSC_HOST_CALL jsSVGUseElementPrototypeFunctionGetBBox(ExecState* exec, J SVGUseElement* imp = static_cast<SVGUseElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), imp); return result; } @@ -335,7 +353,7 @@ JSValue JSC_HOST_CALL jsSVGUseElementPrototypeFunctionGetCTM(ExecState* exec, JS SVGUseElement* imp = static_cast<SVGUseElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getCTM()).get(), imp); return result; } @@ -348,7 +366,7 @@ JSValue JSC_HOST_CALL jsSVGUseElementPrototypeFunctionGetScreenCTM(ExecState* ex SVGUseElement* imp = static_cast<SVGUseElement*>(castedThisObj->impl()); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), imp); return result; } @@ -363,7 +381,7 @@ JSValue JSC_HOST_CALL jsSVGUseElementPrototypeFunctionGetTransformToElement(Exec SVGElement* element = toSVGElement(args.at(0)); - JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.h index e3ffef84cc..889f7fd972 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.h @@ -33,7 +33,7 @@ class SVGUseElement; class JSSVGUseElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGUseElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGUseElement>); + JSSVGUseElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGUseElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp index 16b1ffbbd3..0f54e3389a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp @@ -89,8 +89,8 @@ bool JSSVGViewElementPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSSVGViewElement::s_info = { "SVGViewElement", &JSSVGElement::s_info, &JSSVGViewElementTable, 0 }; -JSSVGViewElement::JSSVGViewElement(PassRefPtr<Structure> structure, PassRefPtr<SVGViewElement> impl) - : JSSVGElement(structure, impl) +JSSVGViewElement::JSSVGViewElement(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGViewElement> impl) + : JSSVGElement(structure, globalObject, impl) { } @@ -106,39 +106,44 @@ bool JSSVGViewElement::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsSVGViewElementViewTarget(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGViewElement* imp = static_cast<SVGViewElement*>(static_cast<JSSVGViewElement*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->viewTarget()), imp); + SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->viewTarget()), imp); } JSValue jsSVGViewElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGViewElement* imp = static_cast<SVGViewElement*>(static_cast<JSSVGViewElement*>(asObject(slot.slotBase()))->impl()); + SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl()); RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGViewElementViewBox(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGViewElement* imp = static_cast<SVGViewElement*>(static_cast<JSSVGViewElement*>(asObject(slot.slotBase()))->impl()); + SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl()); RefPtr<SVGAnimatedRect> obj = imp->viewBoxAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGViewElementPreserveAspectRatio(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGViewElement* imp = static_cast<SVGViewElement*>(static_cast<JSSVGViewElement*>(asObject(slot.slotBase()))->impl()); + SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl()); RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated(); - return toJS(exec, obj.get(), imp); + return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGViewElementZoomAndPan(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGViewElement* castedThis = static_cast<JSSVGViewElement*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGViewElement* imp = static_cast<SVGViewElement*>(static_cast<JSSVGViewElement*>(asObject(slot.slotBase()))->impl()); + SVGViewElement* imp = static_cast<SVGViewElement*>(castedThis->impl()); return jsNumber(exec, imp->zoomAndPan()); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.h b/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.h index 0941a00ed2..40f2ad93ec 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.h @@ -33,7 +33,7 @@ class SVGViewElement; class JSSVGViewElement : public JSSVGElement { typedef JSSVGElement Base; public: - JSSVGViewElement(PassRefPtr<JSC::Structure>, PassRefPtr<SVGViewElement>); + JSSVGViewElement(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGViewElement>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp index 74cdb26d89..6ff7a9e700 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp @@ -78,8 +78,8 @@ JSObject* JSSVGZoomEventPrototype::self(ExecState* exec, JSGlobalObject* globalO const ClassInfo JSSVGZoomEvent::s_info = { "SVGZoomEvent", &JSUIEvent::s_info, &JSSVGZoomEventTable, 0 }; -JSSVGZoomEvent::JSSVGZoomEvent(PassRefPtr<Structure> structure, PassRefPtr<SVGZoomEvent> impl, SVGElement*) - : JSUIEvent(structure, impl) +JSSVGZoomEvent::JSSVGZoomEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGZoomEvent> impl) + : JSUIEvent(structure, globalObject, impl) { } @@ -95,37 +95,42 @@ bool JSSVGZoomEvent::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsSVGZoomEventZoomRectScreen(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->zoomRectScreen()).get(), 0); + SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->zoomRectScreen()).get(), 0); } JSValue jsSVGZoomEventPreviousScale(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase()))->impl()); + SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl()); return jsNumber(exec, imp->previousScale()); } JSValue jsSVGZoomEventPreviousTranslate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->previousTranslate()).get(), 0); + SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->previousTranslate()).get(), 0); } JSValue jsSVGZoomEventNewScale(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase()))->impl()); + SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl()); return jsNumber(exec, imp->newScale()); } JSValue jsSVGZoomEventNewTranslate(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(static_cast<JSSVGZoomEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->newTranslate()).get(), 0); + SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->newTranslate()).get(), 0); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.h b/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.h index 59d27a2d7d..c96afe872c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.h @@ -33,7 +33,7 @@ class SVGZoomEvent; class JSSVGZoomEvent : public JSUIEvent { typedef JSUIEvent Base; public: - JSSVGZoomEvent(PassRefPtr<JSC::Structure>, PassRefPtr<SVGZoomEvent>, SVGElement* context); + JSSVGZoomEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<SVGZoomEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp b/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp index 0da88973f0..a1fc8b790c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp @@ -76,8 +76,8 @@ JSObject* JSScreenPrototype::self(ExecState* exec, JSGlobalObject* globalObject) const ClassInfo JSScreen::s_info = { "Screen", 0, &JSScreenTable, 0 }; -JSScreen::JSScreen(PassRefPtr<Structure> structure, PassRefPtr<Screen> impl) - : DOMObject(structure) +JSScreen::JSScreen(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Screen> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -99,63 +99,71 @@ bool JSScreen::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNam JSValue jsScreenHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSScreen* castedThis = static_cast<JSScreen*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Screen* imp = static_cast<Screen*>(static_cast<JSScreen*>(asObject(slot.slotBase()))->impl()); + Screen* imp = static_cast<Screen*>(castedThis->impl()); return jsNumber(exec, imp->height()); } JSValue jsScreenWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSScreen* castedThis = static_cast<JSScreen*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Screen* imp = static_cast<Screen*>(static_cast<JSScreen*>(asObject(slot.slotBase()))->impl()); + Screen* imp = static_cast<Screen*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsScreenColorDepth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSScreen* castedThis = static_cast<JSScreen*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Screen* imp = static_cast<Screen*>(static_cast<JSScreen*>(asObject(slot.slotBase()))->impl()); + Screen* imp = static_cast<Screen*>(castedThis->impl()); return jsNumber(exec, imp->colorDepth()); } JSValue jsScreenPixelDepth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSScreen* castedThis = static_cast<JSScreen*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Screen* imp = static_cast<Screen*>(static_cast<JSScreen*>(asObject(slot.slotBase()))->impl()); + Screen* imp = static_cast<Screen*>(castedThis->impl()); return jsNumber(exec, imp->pixelDepth()); } JSValue jsScreenAvailLeft(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSScreen* castedThis = static_cast<JSScreen*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Screen* imp = static_cast<Screen*>(static_cast<JSScreen*>(asObject(slot.slotBase()))->impl()); + Screen* imp = static_cast<Screen*>(castedThis->impl()); return jsNumber(exec, imp->availLeft()); } JSValue jsScreenAvailTop(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSScreen* castedThis = static_cast<JSScreen*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Screen* imp = static_cast<Screen*>(static_cast<JSScreen*>(asObject(slot.slotBase()))->impl()); + Screen* imp = static_cast<Screen*>(castedThis->impl()); return jsNumber(exec, imp->availTop()); } JSValue jsScreenAvailHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSScreen* castedThis = static_cast<JSScreen*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Screen* imp = static_cast<Screen*>(static_cast<JSScreen*>(asObject(slot.slotBase()))->impl()); + Screen* imp = static_cast<Screen*>(castedThis->impl()); return jsNumber(exec, imp->availHeight()); } JSValue jsScreenAvailWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSScreen* castedThis = static_cast<JSScreen*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Screen* imp = static_cast<Screen*>(static_cast<JSScreen*>(asObject(slot.slotBase()))->impl()); + Screen* imp = static_cast<Screen*>(castedThis->impl()); return jsNumber(exec, imp->availWidth()); } -JSC::JSValue toJS(JSC::ExecState* exec, Screen* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Screen* object) { - return getDOMObjectWrapper<JSScreen>(exec, object); + return getDOMObjectWrapper<JSScreen>(exec, globalObject, object); } Screen* toScreen(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSScreen.h b/src/3rdparty/webkit/WebCore/generated/JSScreen.h index 4e7be7b777..d55e9c5fe2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSScreen.h +++ b/src/3rdparty/webkit/WebCore/generated/JSScreen.h @@ -21,6 +21,7 @@ #ifndef JSScreen_h #define JSScreen_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class Screen; -class JSScreen : public DOMObject { - typedef DOMObject Base; +class JSScreen : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSScreen(PassRefPtr<JSC::Structure>, PassRefPtr<Screen>); + JSScreen(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Screen>); virtual ~JSScreen(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -50,7 +51,7 @@ private: RefPtr<Screen> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, Screen*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Screen*); Screen* toScreen(JSC::JSValue); class JSScreenPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp b/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp index 9f156448f3..41680a99f2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp @@ -69,12 +69,12 @@ static JSC_CONST_HASHTABLE HashTable JSStorageConstructorTable = { 1, 0, JSStorageConstructorTableValues, 0 }; #endif -class JSStorageConstructor : public DOMObject { +class JSStorageConstructor : public DOMConstructorObject { public: - JSStorageConstructor(ExecState* exec) - : DOMObject(JSStorageConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSStorageConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSStorageConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSStoragePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSStoragePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -126,8 +126,8 @@ bool JSStoragePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& p const ClassInfo JSStorage::s_info = { "Storage", 0, &JSStorageTable, 0 }; -JSStorage::JSStorage(PassRefPtr<Structure> structure, PassRefPtr<Storage> impl) - : DOMObject(structure) +JSStorage::JSStorage(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Storage> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -158,14 +158,16 @@ bool JSStorage::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsStorageLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStorage* castedThis = static_cast<JSStorage*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Storage* imp = static_cast<Storage*>(static_cast<JSStorage*>(asObject(slot.slotBase()))->impl()); + Storage* imp = static_cast<Storage*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsStorageConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSStorage*>(asObject(slot.slotBase()))->getConstructor(exec); + JSStorage* domObject = static_cast<JSStorage*>(asObject(slot.slotBase())); + return JSStorage::getConstructor(exec, domObject->globalObject()); } void JSStorage::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -174,9 +176,9 @@ void JSStorage::put(ExecState* exec, const Identifier& propertyName, JSValue val Base::put(exec, propertyName, value, slot); } -JSValue JSStorage::getConstructor(ExecState* exec) +JSValue JSStorage::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSStorageConstructor>(exec); + return getDOMConstructor<JSStorageConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsStoragePrototypeFunctionKey(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -250,9 +252,9 @@ JSValue JSC_HOST_CALL jsStoragePrototypeFunctionClear(ExecState* exec, JSObject* return jsUndefined(); } -JSC::JSValue toJS(JSC::ExecState* exec, Storage* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Storage* object) { - return getDOMObjectWrapper<JSStorage>(exec, object); + return getDOMObjectWrapper<JSStorage>(exec, globalObject, object); } Storage* toStorage(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSStorage.h b/src/3rdparty/webkit/WebCore/generated/JSStorage.h index 077ccfcae1..fbc4ff3e19 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStorage.h +++ b/src/3rdparty/webkit/WebCore/generated/JSStorage.h @@ -23,6 +23,7 @@ #if ENABLE(DOM_STORAGE) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class Storage; -class JSStorage : public DOMObject { - typedef DOMObject Base; +class JSStorage : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSStorage(PassRefPtr<JSC::Structure>, PassRefPtr<Storage>); + JSStorage(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Storage>); virtual ~JSStorage(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -50,7 +51,7 @@ public: virtual bool deleteProperty(JSC::ExecState*, const JSC::Identifier&); virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); Storage* impl() const { return m_impl.get(); } private: @@ -60,7 +61,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, Storage*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Storage*); Storage* toStorage(JSC::JSValue); class JSStoragePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp index 42aac0eb76..d2730d7b75 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp @@ -75,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSStorageEventConstructorTable = { 1, 0, JSStorageEventConstructorTableValues, 0 }; #endif -class JSStorageEventConstructor : public DOMObject { +class JSStorageEventConstructor : public DOMConstructorObject { public: - JSStorageEventConstructor(ExecState* exec) - : DOMObject(JSStorageEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSStorageEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSStorageEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSStorageEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSStorageEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -128,8 +128,8 @@ bool JSStorageEventPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSStorageEvent::s_info = { "StorageEvent", &JSEvent::s_info, &JSStorageEventTable, 0 }; -JSStorageEvent::JSStorageEvent(PassRefPtr<Structure> structure, PassRefPtr<StorageEvent> impl) - : JSEvent(structure, impl) +JSStorageEvent::JSStorageEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<StorageEvent> impl) + : JSEvent(structure, globalObject, impl) { } @@ -145,53 +145,60 @@ bool JSStorageEvent::getOwnPropertySlot(ExecState* exec, const Identifier& prope JSValue jsStorageEventKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStorageEvent* castedThis = static_cast<JSStorageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StorageEvent* imp = static_cast<StorageEvent*>(static_cast<JSStorageEvent*>(asObject(slot.slotBase()))->impl()); + StorageEvent* imp = static_cast<StorageEvent*>(castedThis->impl()); return jsString(exec, imp->key()); } JSValue jsStorageEventOldValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStorageEvent* castedThis = static_cast<JSStorageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StorageEvent* imp = static_cast<StorageEvent*>(static_cast<JSStorageEvent*>(asObject(slot.slotBase()))->impl()); + StorageEvent* imp = static_cast<StorageEvent*>(castedThis->impl()); return jsStringOrNull(exec, imp->oldValue()); } JSValue jsStorageEventNewValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStorageEvent* castedThis = static_cast<JSStorageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StorageEvent* imp = static_cast<StorageEvent*>(static_cast<JSStorageEvent*>(asObject(slot.slotBase()))->impl()); + StorageEvent* imp = static_cast<StorageEvent*>(castedThis->impl()); return jsStringOrNull(exec, imp->newValue()); } JSValue jsStorageEventUri(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStorageEvent* castedThis = static_cast<JSStorageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StorageEvent* imp = static_cast<StorageEvent*>(static_cast<JSStorageEvent*>(asObject(slot.slotBase()))->impl()); + StorageEvent* imp = static_cast<StorageEvent*>(castedThis->impl()); return jsString(exec, imp->uri()); } JSValue jsStorageEventSource(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStorageEvent* castedThis = static_cast<JSStorageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StorageEvent* imp = static_cast<StorageEvent*>(static_cast<JSStorageEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->source())); + StorageEvent* imp = static_cast<StorageEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->source())); } JSValue jsStorageEventStorageArea(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStorageEvent* castedThis = static_cast<JSStorageEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StorageEvent* imp = static_cast<StorageEvent*>(static_cast<JSStorageEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->storageArea())); + StorageEvent* imp = static_cast<StorageEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->storageArea())); } JSValue jsStorageEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSStorageEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSStorageEvent* domObject = static_cast<JSStorageEvent*>(asObject(slot.slotBase())); + return JSStorageEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSStorageEvent::getConstructor(ExecState* exec) +JSValue JSStorageEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSStorageEventConstructor>(exec); + return getDOMConstructor<JSStorageEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsStorageEventPrototypeFunctionInitStorageEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.h b/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.h index ec32abfbb3..1bf6d217d7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSStorageEvent.h @@ -32,7 +32,7 @@ class StorageEvent; class JSStorageEvent : public JSEvent { typedef JSEvent Base; public: - JSStorageEvent(PassRefPtr<JSC::Structure>, PassRefPtr<StorageEvent>); + JSStorageEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<StorageEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -43,7 +43,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp b/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp index 1e75a0dfe0..ab090d19bb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp @@ -72,12 +72,12 @@ static JSC_CONST_HASHTABLE HashTable JSStyleSheetConstructorTable = { 1, 0, JSStyleSheetConstructorTableValues, 0 }; #endif -class JSStyleSheetConstructor : public DOMObject { +class JSStyleSheetConstructor : public DOMConstructorObject { public: - JSStyleSheetConstructor(ExecState* exec) - : DOMObject(JSStyleSheetConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSStyleSheetConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSStyleSheetConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSStyleSheetPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSStyleSheetPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -119,8 +119,8 @@ JSObject* JSStyleSheetPrototype::self(ExecState* exec, JSGlobalObject* globalObj const ClassInfo JSStyleSheet::s_info = { "StyleSheet", 0, &JSStyleSheetTable, 0 }; -JSStyleSheet::JSStyleSheet(PassRefPtr<Structure> structure, PassRefPtr<StyleSheet> impl) - : DOMObject(structure) +JSStyleSheet::JSStyleSheet(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<StyleSheet> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -142,56 +142,64 @@ bool JSStyleSheet::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsStyleSheetType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStyleSheet* castedThis = static_cast<JSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StyleSheet* imp = static_cast<StyleSheet*>(static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->impl()); + StyleSheet* imp = static_cast<StyleSheet*>(castedThis->impl()); return jsStringOrNull(exec, imp->type()); } JSValue jsStyleSheetDisabled(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStyleSheet* castedThis = static_cast<JSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StyleSheet* imp = static_cast<StyleSheet*>(static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->impl()); + StyleSheet* imp = static_cast<StyleSheet*>(castedThis->impl()); return jsBoolean(imp->disabled()); } JSValue jsStyleSheetOwnerNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStyleSheet* castedThis = static_cast<JSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StyleSheet* imp = static_cast<StyleSheet*>(static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->ownerNode())); + StyleSheet* imp = static_cast<StyleSheet*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->ownerNode())); } JSValue jsStyleSheetParentStyleSheet(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStyleSheet* castedThis = static_cast<JSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StyleSheet* imp = static_cast<StyleSheet*>(static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->parentStyleSheet())); + StyleSheet* imp = static_cast<StyleSheet*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentStyleSheet())); } JSValue jsStyleSheetHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStyleSheet* castedThis = static_cast<JSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StyleSheet* imp = static_cast<StyleSheet*>(static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->impl()); + StyleSheet* imp = static_cast<StyleSheet*>(castedThis->impl()); return jsStringOrNull(exec, imp->href()); } JSValue jsStyleSheetTitle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStyleSheet* castedThis = static_cast<JSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StyleSheet* imp = static_cast<StyleSheet*>(static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->impl()); + StyleSheet* imp = static_cast<StyleSheet*>(castedThis->impl()); return jsStringOrNull(exec, imp->title()); } JSValue jsStyleSheetMedia(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStyleSheet* castedThis = static_cast<JSStyleSheet*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StyleSheet* imp = static_cast<StyleSheet*>(static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->media())); + StyleSheet* imp = static_cast<StyleSheet*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->media())); } JSValue jsStyleSheetConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSStyleSheet*>(asObject(slot.slotBase()))->getConstructor(exec); + JSStyleSheet* domObject = static_cast<JSStyleSheet*>(asObject(slot.slotBase())); + return JSStyleSheet::getConstructor(exec, domObject->globalObject()); } void JSStyleSheet::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -204,9 +212,9 @@ void setJSStyleSheetDisabled(ExecState* exec, JSObject* thisObject, JSValue valu imp->setDisabled(value.toBoolean(exec)); } -JSValue JSStyleSheet::getConstructor(ExecState* exec) +JSValue JSStyleSheet::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSStyleSheetConstructor>(exec); + return getDOMConstructor<JSStyleSheetConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } StyleSheet* toStyleSheet(JSC::JSValue value) diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.h b/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.h index d8e751e838..ccd0d0ff37 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.h +++ b/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.h @@ -21,6 +21,7 @@ #ifndef JSStyleSheet_h #define JSStyleSheet_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class StyleSheet; -class JSStyleSheet : public DOMObject { - typedef DOMObject Base; +class JSStyleSheet : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSStyleSheet(PassRefPtr<JSC::Structure>, PassRefPtr<StyleSheet>); + JSStyleSheet(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<StyleSheet>); virtual ~JSStyleSheet(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,14 +48,14 @@ public: virtual void mark(); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); StyleSheet* impl() const { return m_impl.get(); } private: RefPtr<StyleSheet> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, StyleSheet*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, StyleSheet*); StyleSheet* toStyleSheet(JSC::JSValue); class JSStyleSheetPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp b/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp index 41cc305eec..a431d096b0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSStyleSheetListConstructorTable = { 1, 0, JSStyleSheetListConstructorTableValues, 0 }; #endif -class JSStyleSheetListConstructor : public DOMObject { +class JSStyleSheetListConstructor : public DOMConstructorObject { public: - JSStyleSheetListConstructor(ExecState* exec) - : DOMObject(JSStyleSheetListConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSStyleSheetListConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSStyleSheetListConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSStyleSheetListPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSStyleSheetListPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -119,8 +119,8 @@ bool JSStyleSheetListPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSStyleSheetList::s_info = { "StyleSheetList", 0, &JSStyleSheetListTable, 0 }; -JSStyleSheetList::JSStyleSheetList(PassRefPtr<Structure> structure, PassRefPtr<StyleSheetList> impl) - : DOMObject(structure) +JSStyleSheetList::JSStyleSheetList(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<StyleSheetList> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -166,14 +166,16 @@ bool JSStyleSheetList::getOwnPropertySlot(ExecState* exec, unsigned propertyName JSValue jsStyleSheetListLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSStyleSheetList* castedThis = static_cast<JSStyleSheetList*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - StyleSheetList* imp = static_cast<StyleSheetList*>(static_cast<JSStyleSheetList*>(asObject(slot.slotBase()))->impl()); + StyleSheetList* imp = static_cast<StyleSheetList*>(castedThis->impl()); return jsNumber(exec, imp->length()); } JSValue jsStyleSheetListConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSStyleSheetList*>(asObject(slot.slotBase()))->getConstructor(exec); + JSStyleSheetList* domObject = static_cast<JSStyleSheetList*>(asObject(slot.slotBase())); + return JSStyleSheetList::getConstructor(exec, domObject->globalObject()); } void JSStyleSheetList::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { @@ -182,9 +184,9 @@ void JSStyleSheetList::getPropertyNames(ExecState* exec, PropertyNameArray& prop Base::getPropertyNames(exec, propertyNames); } -JSValue JSStyleSheetList::getConstructor(ExecState* exec) +JSValue JSStyleSheetList::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSStyleSheetListConstructor>(exec); + return getDOMConstructor<JSStyleSheetListConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsStyleSheetListPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -197,7 +199,7 @@ JSValue JSC_HOST_CALL jsStyleSheetListPrototypeFunctionItem(ExecState* exec, JSO unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->item(index))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->item(index))); return result; } @@ -205,11 +207,11 @@ JSValue JSC_HOST_CALL jsStyleSheetListPrototypeFunctionItem(ExecState* exec, JSO JSValue JSStyleSheetList::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSStyleSheetList* thisObj = static_cast<JSStyleSheetList*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<StyleSheetList*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<StyleSheetList*>(thisObj->impl())->item(slot.index())); } -JSC::JSValue toJS(JSC::ExecState* exec, StyleSheetList* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, StyleSheetList* object) { - return getDOMObjectWrapper<JSStyleSheetList>(exec, object); + return getDOMObjectWrapper<JSStyleSheetList>(exec, globalObject, object); } StyleSheetList* toStyleSheetList(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.h b/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.h index bb06c58ffc..75c8c6c43a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.h +++ b/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.h @@ -21,6 +21,7 @@ #ifndef JSStyleSheetList_h #define JSStyleSheetList_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class StyleSheetList; -class JSStyleSheetList : public DOMObject { - typedef DOMObject Base; +class JSStyleSheetList : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSStyleSheetList(PassRefPtr<JSC::Structure>, PassRefPtr<StyleSheetList>); + JSStyleSheetList(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<StyleSheetList>); virtual ~JSStyleSheetList(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,7 +47,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); StyleSheetList* impl() const { return m_impl.get(); } private: @@ -57,7 +58,7 @@ private: static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; -JSC::JSValue toJS(JSC::ExecState*, StyleSheetList*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, StyleSheetList*); StyleSheetList* toStyleSheetList(JSC::JSValue); class JSStyleSheetListPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSText.cpp b/src/3rdparty/webkit/WebCore/generated/JSText.cpp index 8be8a89076..e5ad3b28f6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSText.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSText.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSTextConstructorTable = { 1, 0, JSTextConstructorTableValues, 0 }; #endif -class JSTextConstructor : public DOMObject { +class JSTextConstructor : public DOMConstructorObject { public: - JSTextConstructor(ExecState* exec) - : DOMObject(JSTextConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSTextConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSTextConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSTextPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSTextPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -119,8 +119,8 @@ bool JSTextPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& prop const ClassInfo JSText::s_info = { "Text", &JSCharacterData::s_info, &JSTextTable, 0 }; -JSText::JSText(PassRefPtr<Structure> structure, PassRefPtr<Text> impl) - : JSCharacterData(structure, impl) +JSText::JSText(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Text> impl) + : JSCharacterData(structure, globalObject, impl) { } @@ -136,18 +136,20 @@ bool JSText::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, JSValue jsTextWholeText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSText* castedThis = static_cast<JSText*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Text* imp = static_cast<Text*>(static_cast<JSText*>(asObject(slot.slotBase()))->impl()); + Text* imp = static_cast<Text*>(castedThis->impl()); return jsString(exec, imp->wholeText()); } JSValue jsTextConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSText*>(asObject(slot.slotBase()))->getConstructor(exec); + JSText* domObject = static_cast<JSText*>(asObject(slot.slotBase())); + return JSText::getConstructor(exec, domObject->globalObject()); } -JSValue JSText::getConstructor(ExecState* exec) +JSValue JSText::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSTextConstructor>(exec); + return getDOMConstructor<JSTextConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsTextPrototypeFunctionSplitText(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -165,7 +167,7 @@ JSValue JSC_HOST_CALL jsTextPrototypeFunctionSplitText(ExecState* exec, JSObject } - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->splitText(offset, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->splitText(offset, ec))); setDOMException(exec, ec); return result; } @@ -181,7 +183,7 @@ JSValue JSC_HOST_CALL jsTextPrototypeFunctionReplaceWholeText(ExecState* exec, J const UString& content = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->replaceWholeText(content, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->replaceWholeText(content, ec))); setDOMException(exec, ec); return result; } diff --git a/src/3rdparty/webkit/WebCore/generated/JSText.h b/src/3rdparty/webkit/WebCore/generated/JSText.h index e489274f78..eff516f686 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSText.h +++ b/src/3rdparty/webkit/WebCore/generated/JSText.h @@ -30,7 +30,7 @@ class Text; class JSText : public JSCharacterData { typedef JSCharacterData Base; public: - JSText(PassRefPtr<JSC::Structure>, PassRefPtr<Text>); + JSText(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Text>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,10 +41,10 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; -JSC::JSValue toJSNewlyCreated(JSC::ExecState*, Text*); +JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Text*); class JSTextPrototype : public JSC::JSObject { typedef JSC::JSObject Base; diff --git a/src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp index de001cf7ff..721e0a36ee 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp @@ -64,12 +64,12 @@ static JSC_CONST_HASHTABLE HashTable JSTextEventConstructorTable = { 1, 0, JSTextEventConstructorTableValues, 0 }; #endif -class JSTextEventConstructor : public DOMObject { +class JSTextEventConstructor : public DOMConstructorObject { public: - JSTextEventConstructor(ExecState* exec) - : DOMObject(JSTextEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSTextEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSTextEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSTextEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSTextEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -117,8 +117,8 @@ bool JSTextEventPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& const ClassInfo JSTextEvent::s_info = { "TextEvent", &JSUIEvent::s_info, &JSTextEventTable, 0 }; -JSTextEvent::JSTextEvent(PassRefPtr<Structure> structure, PassRefPtr<TextEvent> impl) - : JSUIEvent(structure, impl) +JSTextEvent::JSTextEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<TextEvent> impl) + : JSUIEvent(structure, globalObject, impl) { } @@ -134,18 +134,20 @@ bool JSTextEvent::getOwnPropertySlot(ExecState* exec, const Identifier& property JSValue jsTextEventData(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSTextEvent* castedThis = static_cast<JSTextEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TextEvent* imp = static_cast<TextEvent*>(static_cast<JSTextEvent*>(asObject(slot.slotBase()))->impl()); + TextEvent* imp = static_cast<TextEvent*>(castedThis->impl()); return jsString(exec, imp->data()); } JSValue jsTextEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSTextEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSTextEvent* domObject = static_cast<JSTextEvent*>(asObject(slot.slotBase())); + return JSTextEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSTextEvent::getConstructor(ExecState* exec) +JSValue JSTextEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSTextEventConstructor>(exec); + return getDOMConstructor<JSTextEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsTextEventPrototypeFunctionInitTextEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSTextEvent.h b/src/3rdparty/webkit/WebCore/generated/JSTextEvent.h index 08f014173c..548d0f6ca5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTextEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSTextEvent.h @@ -30,7 +30,7 @@ class TextEvent; class JSTextEvent : public JSUIEvent { typedef JSUIEvent Base; public: - JSTextEvent(PassRefPtr<JSC::Structure>, PassRefPtr<TextEvent>); + JSTextEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<TextEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp b/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp index d11e8f8f2e..5b05886570 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp @@ -61,12 +61,12 @@ static JSC_CONST_HASHTABLE HashTable JSTextMetricsConstructorTable = { 1, 0, JSTextMetricsConstructorTableValues, 0 }; #endif -class JSTextMetricsConstructor : public DOMObject { +class JSTextMetricsConstructor : public DOMConstructorObject { public: - JSTextMetricsConstructor(ExecState* exec) - : DOMObject(JSTextMetricsConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSTextMetricsConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSTextMetricsConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSTextMetricsPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSTextMetricsPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -108,8 +108,8 @@ JSObject* JSTextMetricsPrototype::self(ExecState* exec, JSGlobalObject* globalOb const ClassInfo JSTextMetrics::s_info = { "TextMetrics", 0, &JSTextMetricsTable, 0 }; -JSTextMetrics::JSTextMetrics(PassRefPtr<Structure> structure, PassRefPtr<TextMetrics> impl) - : DOMObject(structure) +JSTextMetrics::JSTextMetrics(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<TextMetrics> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -131,23 +131,25 @@ bool JSTextMetrics::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsTextMetricsWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSTextMetrics* castedThis = static_cast<JSTextMetrics*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TextMetrics* imp = static_cast<TextMetrics*>(static_cast<JSTextMetrics*>(asObject(slot.slotBase()))->impl()); + TextMetrics* imp = static_cast<TextMetrics*>(castedThis->impl()); return jsNumber(exec, imp->width()); } JSValue jsTextMetricsConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSTextMetrics*>(asObject(slot.slotBase()))->getConstructor(exec); + JSTextMetrics* domObject = static_cast<JSTextMetrics*>(asObject(slot.slotBase())); + return JSTextMetrics::getConstructor(exec, domObject->globalObject()); } -JSValue JSTextMetrics::getConstructor(ExecState* exec) +JSValue JSTextMetrics::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSTextMetricsConstructor>(exec); + return getDOMConstructor<JSTextMetricsConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } -JSC::JSValue toJS(JSC::ExecState* exec, TextMetrics* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TextMetrics* object) { - return getDOMObjectWrapper<JSTextMetrics>(exec, object); + return getDOMObjectWrapper<JSTextMetrics>(exec, globalObject, object); } TextMetrics* toTextMetrics(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.h b/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.h index 4fb044fa7d..0e18cfc65a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.h +++ b/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.h @@ -21,6 +21,7 @@ #ifndef JSTextMetrics_h #define JSTextMetrics_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class TextMetrics; -class JSTextMetrics : public DOMObject { - typedef DOMObject Base; +class JSTextMetrics : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSTextMetrics(PassRefPtr<JSC::Structure>, PassRefPtr<TextMetrics>); + JSTextMetrics(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<TextMetrics>); virtual ~JSTextMetrics(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); TextMetrics* impl() const { return m_impl.get(); } private: RefPtr<TextMetrics> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, TextMetrics*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TextMetrics*); TextMetrics* toTextMetrics(JSC::JSValue); class JSTextMetricsPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp b/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp index fdd627830d..95ff627ada 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp @@ -77,8 +77,8 @@ bool JSTimeRangesPrototype::getOwnPropertySlot(ExecState* exec, const Identifier const ClassInfo JSTimeRanges::s_info = { "TimeRanges", 0, &JSTimeRangesTable, 0 }; -JSTimeRanges::JSTimeRanges(PassRefPtr<Structure> structure, PassRefPtr<TimeRanges> impl) - : DOMObject(structure) +JSTimeRanges::JSTimeRanges(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<TimeRanges> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -100,8 +100,9 @@ bool JSTimeRanges::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsTimeRangesLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSTimeRanges* castedThis = static_cast<JSTimeRanges*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TimeRanges* imp = static_cast<TimeRanges*>(static_cast<JSTimeRanges*>(asObject(slot.slotBase()))->impl()); + TimeRanges* imp = static_cast<TimeRanges*>(castedThis->impl()); return jsNumber(exec, imp->length()); } @@ -137,9 +138,9 @@ JSValue JSC_HOST_CALL jsTimeRangesPrototypeFunctionEnd(ExecState* exec, JSObject return result; } -JSC::JSValue toJS(JSC::ExecState* exec, TimeRanges* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TimeRanges* object) { - return getDOMObjectWrapper<JSTimeRanges>(exec, object); + return getDOMObjectWrapper<JSTimeRanges>(exec, globalObject, object); } TimeRanges* toTimeRanges(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.h b/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.h index 41da9efed4..b59d905b65 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.h +++ b/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.h @@ -21,6 +21,7 @@ #ifndef JSTimeRanges_h #define JSTimeRanges_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class TimeRanges; -class JSTimeRanges : public DOMObject { - typedef DOMObject Base; +class JSTimeRanges : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSTimeRanges(PassRefPtr<JSC::Structure>, PassRefPtr<TimeRanges>); + JSTimeRanges(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<TimeRanges>); virtual ~JSTimeRanges(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -50,7 +51,7 @@ private: RefPtr<TimeRanges> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, TimeRanges*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TimeRanges*); TimeRanges* toTimeRanges(JSC::JSValue); class JSTimeRangesPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp b/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp index b10b4cb87c..88ec3edd05 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp @@ -70,12 +70,12 @@ static JSC_CONST_HASHTABLE HashTable JSTreeWalkerConstructorTable = { 1, 0, JSTreeWalkerConstructorTableValues, 0 }; #endif -class JSTreeWalkerConstructor : public DOMObject { +class JSTreeWalkerConstructor : public DOMConstructorObject { public: - JSTreeWalkerConstructor(ExecState* exec) - : DOMObject(JSTreeWalkerConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSTreeWalkerConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSTreeWalkerConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSTreeWalkerPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSTreeWalkerPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -129,8 +129,8 @@ bool JSTreeWalkerPrototype::getOwnPropertySlot(ExecState* exec, const Identifier const ClassInfo JSTreeWalker::s_info = { "TreeWalker", 0, &JSTreeWalkerTable, 0 }; -JSTreeWalker::JSTreeWalker(PassRefPtr<Structure> structure, PassRefPtr<TreeWalker> impl) - : DOMObject(structure) +JSTreeWalker::JSTreeWalker(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<TreeWalker> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -152,42 +152,48 @@ bool JSTreeWalker::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsTreeWalkerRoot(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSTreeWalker* castedThis = static_cast<JSTreeWalker*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TreeWalker* imp = static_cast<TreeWalker*>(static_cast<JSTreeWalker*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->root())); + TreeWalker* imp = static_cast<TreeWalker*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->root())); } JSValue jsTreeWalkerWhatToShow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSTreeWalker* castedThis = static_cast<JSTreeWalker*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TreeWalker* imp = static_cast<TreeWalker*>(static_cast<JSTreeWalker*>(asObject(slot.slotBase()))->impl()); + TreeWalker* imp = static_cast<TreeWalker*>(castedThis->impl()); return jsNumber(exec, imp->whatToShow()); } JSValue jsTreeWalkerFilter(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSTreeWalker* castedThis = static_cast<JSTreeWalker*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TreeWalker* imp = static_cast<TreeWalker*>(static_cast<JSTreeWalker*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->filter())); + TreeWalker* imp = static_cast<TreeWalker*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->filter())); } JSValue jsTreeWalkerExpandEntityReferences(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSTreeWalker* castedThis = static_cast<JSTreeWalker*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TreeWalker* imp = static_cast<TreeWalker*>(static_cast<JSTreeWalker*>(asObject(slot.slotBase()))->impl()); + TreeWalker* imp = static_cast<TreeWalker*>(castedThis->impl()); return jsBoolean(imp->expandEntityReferences()); } JSValue jsTreeWalkerCurrentNode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSTreeWalker* castedThis = static_cast<JSTreeWalker*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - TreeWalker* imp = static_cast<TreeWalker*>(static_cast<JSTreeWalker*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->currentNode())); + TreeWalker* imp = static_cast<TreeWalker*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->currentNode())); } JSValue jsTreeWalkerConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSTreeWalker*>(asObject(slot.slotBase()))->getConstructor(exec); + JSTreeWalker* domObject = static_cast<JSTreeWalker*>(asObject(slot.slotBase())); + return JSTreeWalker::getConstructor(exec, domObject->globalObject()); } void JSTreeWalker::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -202,9 +208,9 @@ void setJSTreeWalkerCurrentNode(ExecState* exec, JSObject* thisObject, JSValue v setDOMException(exec, ec); } -JSValue JSTreeWalker::getConstructor(ExecState* exec) +JSValue JSTreeWalker::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSTreeWalkerConstructor>(exec); + return getDOMConstructor<JSTreeWalkerConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsTreeWalkerPrototypeFunctionParentNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -270,9 +276,9 @@ JSValue JSC_HOST_CALL jsTreeWalkerPrototypeFunctionNextNode(ExecState* exec, JSO return castedThisObj->nextNode(exec, args); } -JSC::JSValue toJS(JSC::ExecState* exec, TreeWalker* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TreeWalker* object) { - return getDOMObjectWrapper<JSTreeWalker>(exec, object); + return getDOMObjectWrapper<JSTreeWalker>(exec, globalObject, object); } TreeWalker* toTreeWalker(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.h b/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.h index 92b42bf4ea..bf007bb5fc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.h +++ b/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.h @@ -21,6 +21,7 @@ #ifndef JSTreeWalker_h #define JSTreeWalker_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class TreeWalker; -class JSTreeWalker : public DOMObject { - typedef DOMObject Base; +class JSTreeWalker : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSTreeWalker(PassRefPtr<JSC::Structure>, PassRefPtr<TreeWalker>); + JSTreeWalker(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<TreeWalker>); virtual ~JSTreeWalker(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,7 +48,7 @@ public: virtual void mark(); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue parentNode(JSC::ExecState*, const JSC::ArgList&); @@ -63,7 +64,7 @@ private: RefPtr<TreeWalker> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, TreeWalker*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TreeWalker*); TreeWalker* toTreeWalker(JSC::JSValue); class JSTreeWalkerPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp index cdf611f7a8..98891f35ee 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp @@ -72,12 +72,12 @@ static JSC_CONST_HASHTABLE HashTable JSUIEventConstructorTable = { 1, 0, JSUIEventConstructorTableValues, 0 }; #endif -class JSUIEventConstructor : public DOMObject { +class JSUIEventConstructor : public DOMConstructorObject { public: - JSUIEventConstructor(ExecState* exec) - : DOMObject(JSUIEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSUIEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSUIEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSUIEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSUIEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -125,8 +125,8 @@ bool JSUIEventPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& p const ClassInfo JSUIEvent::s_info = { "UIEvent", &JSEvent::s_info, &JSUIEventTable, 0 }; -JSUIEvent::JSUIEvent(PassRefPtr<Structure> structure, PassRefPtr<UIEvent> impl) - : JSEvent(structure, impl) +JSUIEvent::JSUIEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<UIEvent> impl) + : JSEvent(structure, globalObject, impl) { } @@ -142,74 +142,84 @@ bool JSUIEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa JSValue jsUIEventView(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->view())); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->view())); } JSValue jsUIEventDetail(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); return jsNumber(exec, imp->detail()); } JSValue jsUIEventKeyCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); return jsNumber(exec, imp->keyCode()); } JSValue jsUIEventCharCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); return jsNumber(exec, imp->charCode()); } JSValue jsUIEventLayerX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); return jsNumber(exec, imp->layerX()); } JSValue jsUIEventLayerY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); return jsNumber(exec, imp->layerY()); } JSValue jsUIEventPageX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); return jsNumber(exec, imp->pageX()); } JSValue jsUIEventPageY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); return jsNumber(exec, imp->pageY()); } JSValue jsUIEventWhich(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSUIEvent* castedThis = static_cast<JSUIEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - UIEvent* imp = static_cast<UIEvent*>(static_cast<JSUIEvent*>(asObject(slot.slotBase()))->impl()); + UIEvent* imp = static_cast<UIEvent*>(castedThis->impl()); return jsNumber(exec, imp->which()); } JSValue jsUIEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSUIEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSUIEvent* domObject = static_cast<JSUIEvent*>(asObject(slot.slotBase())); + return JSUIEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSUIEvent::getConstructor(ExecState* exec) +JSValue JSUIEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSUIEventConstructor>(exec); + return getDOMConstructor<JSUIEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsUIEventPrototypeFunctionInitUIEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSUIEvent.h b/src/3rdparty/webkit/WebCore/generated/JSUIEvent.h index 3999438014..587296b221 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSUIEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSUIEvent.h @@ -30,7 +30,7 @@ class UIEvent; class JSUIEvent : public JSEvent { typedef JSEvent Base; public: - JSUIEvent(PassRefPtr<JSC::Structure>, PassRefPtr<UIEvent>); + JSUIEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<UIEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp b/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp index fe8ea20744..e99ec02efc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp @@ -76,8 +76,8 @@ JSObject* JSValidityStatePrototype::self(ExecState* exec, JSGlobalObject* global const ClassInfo JSValidityState::s_info = { "ValidityState", 0, &JSValidityStateTable, 0 }; -JSValidityState::JSValidityState(PassRefPtr<Structure> structure, PassRefPtr<ValidityState> impl) - : DOMObject(structure) +JSValidityState::JSValidityState(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ValidityState> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -99,70 +99,79 @@ bool JSValidityState::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsValidityStateValueMissing(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->valueMissing()); } JSValue jsValidityStateTypeMismatch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->typeMismatch()); } JSValue jsValidityStatePatternMismatch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->patternMismatch()); } JSValue jsValidityStateTooLong(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->tooLong()); } JSValue jsValidityStateRangeUnderflow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->rangeUnderflow()); } JSValue jsValidityStateRangeOverflow(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->rangeOverflow()); } JSValue jsValidityStateStepMismatch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->stepMismatch()); } JSValue jsValidityStateCustomError(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->customError()); } JSValue jsValidityStateValid(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - ValidityState* imp = static_cast<ValidityState*>(static_cast<JSValidityState*>(asObject(slot.slotBase()))->impl()); + ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); return jsBoolean(imp->valid()); } -JSC::JSValue toJS(JSC::ExecState* exec, ValidityState* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, ValidityState* object) { - return getDOMObjectWrapper<JSValidityState>(exec, object); + return getDOMObjectWrapper<JSValidityState>(exec, globalObject, object); } ValidityState* toValidityState(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSValidityState.h b/src/3rdparty/webkit/WebCore/generated/JSValidityState.h index a866146fec..dab1307740 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSValidityState.h +++ b/src/3rdparty/webkit/WebCore/generated/JSValidityState.h @@ -21,6 +21,7 @@ #ifndef JSValidityState_h #define JSValidityState_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class ValidityState; -class JSValidityState : public DOMObject { - typedef DOMObject Base; +class JSValidityState : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSValidityState(PassRefPtr<JSC::Structure>, PassRefPtr<ValidityState>); + JSValidityState(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<ValidityState>); virtual ~JSValidityState(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -50,7 +51,7 @@ private: RefPtr<ValidityState> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, ValidityState*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, ValidityState*); ValidityState* toValidityState(JSC::JSValue); class JSValidityStatePrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp b/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp index b95c4402aa..8558c88ee2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp @@ -60,8 +60,8 @@ bool JSVoidCallbackPrototype::getOwnPropertySlot(ExecState* exec, const Identifi const ClassInfo JSVoidCallback::s_info = { "VoidCallback", 0, 0, 0 }; -JSVoidCallback::JSVoidCallback(PassRefPtr<Structure> structure, PassRefPtr<VoidCallback> impl) - : DOMObject(structure) +JSVoidCallback::JSVoidCallback(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<VoidCallback> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -88,9 +88,9 @@ JSValue JSC_HOST_CALL jsVoidCallbackPrototypeFunctionHandleEvent(ExecState* exec return jsUndefined(); } -JSC::JSValue toJS(JSC::ExecState* exec, VoidCallback* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, VoidCallback* object) { - return getDOMObjectWrapper<JSVoidCallback>(exec, object); + return getDOMObjectWrapper<JSVoidCallback>(exec, globalObject, object); } } diff --git a/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.h b/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.h index ac05cb9d12..ce61d3cbcf 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.h +++ b/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.h @@ -21,6 +21,7 @@ #ifndef JSVoidCallback_h #define JSVoidCallback_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class VoidCallback; -class JSVoidCallback : public DOMObject { - typedef DOMObject Base; +class JSVoidCallback : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSVoidCallback(PassRefPtr<JSC::Structure>, PassRefPtr<VoidCallback>); + JSVoidCallback(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<VoidCallback>); virtual ~JSVoidCallback(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -44,7 +45,7 @@ private: RefPtr<VoidCallback> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, VoidCallback*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, VoidCallback*); VoidCallback* toVoidCallback(JSC::JSValue); class JSVoidCallbackPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp index e8b791b696..9c15afd7a1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSWebKitAnimationEventConstructorTable = { 1, 0, JSWebKitAnimationEventConstructorTableValues, 0 }; #endif -class JSWebKitAnimationEventConstructor : public DOMObject { +class JSWebKitAnimationEventConstructor : public DOMConstructorObject { public: - JSWebKitAnimationEventConstructor(ExecState* exec) - : DOMObject(JSWebKitAnimationEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSWebKitAnimationEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitAnimationEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWebKitAnimationEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWebKitAnimationEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -118,8 +118,8 @@ bool JSWebKitAnimationEventPrototype::getOwnPropertySlot(ExecState* exec, const const ClassInfo JSWebKitAnimationEvent::s_info = { "WebKitAnimationEvent", &JSEvent::s_info, &JSWebKitAnimationEventTable, 0 }; -JSWebKitAnimationEvent::JSWebKitAnimationEvent(PassRefPtr<Structure> structure, PassRefPtr<WebKitAnimationEvent> impl) - : JSEvent(structure, impl) +JSWebKitAnimationEvent::JSWebKitAnimationEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitAnimationEvent> impl) + : JSEvent(structure, globalObject, impl) { } @@ -135,25 +135,28 @@ bool JSWebKitAnimationEvent::getOwnPropertySlot(ExecState* exec, const Identifie JSValue jsWebKitAnimationEventAnimationName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitAnimationEvent* castedThis = static_cast<JSWebKitAnimationEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitAnimationEvent* imp = static_cast<WebKitAnimationEvent*>(static_cast<JSWebKitAnimationEvent*>(asObject(slot.slotBase()))->impl()); + WebKitAnimationEvent* imp = static_cast<WebKitAnimationEvent*>(castedThis->impl()); return jsString(exec, imp->animationName()); } JSValue jsWebKitAnimationEventElapsedTime(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitAnimationEvent* castedThis = static_cast<JSWebKitAnimationEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitAnimationEvent* imp = static_cast<WebKitAnimationEvent*>(static_cast<JSWebKitAnimationEvent*>(asObject(slot.slotBase()))->impl()); + WebKitAnimationEvent* imp = static_cast<WebKitAnimationEvent*>(castedThis->impl()); return jsNumber(exec, imp->elapsedTime()); } JSValue jsWebKitAnimationEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWebKitAnimationEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSWebKitAnimationEvent* domObject = static_cast<JSWebKitAnimationEvent*>(asObject(slot.slotBase())); + return JSWebKitAnimationEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSWebKitAnimationEvent::getConstructor(ExecState* exec) +JSValue JSWebKitAnimationEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSWebKitAnimationEventConstructor>(exec); + return getDOMConstructor<JSWebKitAnimationEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsWebKitAnimationEventPrototypeFunctionInitWebKitAnimationEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.h b/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.h index 5c6862eb58..c6969d8f65 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.h @@ -30,7 +30,7 @@ class WebKitAnimationEvent; class JSWebKitAnimationEvent : public JSEvent { typedef JSEvent Base; public: - JSWebKitAnimationEvent(PassRefPtr<JSC::Structure>, PassRefPtr<WebKitAnimationEvent>); + JSWebKitAnimationEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WebKitAnimationEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp index a99fac6d85..2a712092a5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSWebKitCSSKeyframeRuleConstructorTable = { 1, 0, JSWebKitCSSKeyframeRuleConstructorTableValues, 0 }; #endif -class JSWebKitCSSKeyframeRuleConstructor : public DOMObject { +class JSWebKitCSSKeyframeRuleConstructor : public DOMConstructorObject { public: - JSWebKitCSSKeyframeRuleConstructor(ExecState* exec) - : DOMObject(JSWebKitCSSKeyframeRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSWebKitCSSKeyframeRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitCSSKeyframeRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWebKitCSSKeyframeRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWebKitCSSKeyframeRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -113,8 +113,8 @@ JSObject* JSWebKitCSSKeyframeRulePrototype::self(ExecState* exec, JSGlobalObject const ClassInfo JSWebKitCSSKeyframeRule::s_info = { "WebKitCSSKeyframeRule", &JSCSSRule::s_info, &JSWebKitCSSKeyframeRuleTable, 0 }; -JSWebKitCSSKeyframeRule::JSWebKitCSSKeyframeRule(PassRefPtr<Structure> structure, PassRefPtr<WebKitCSSKeyframeRule> impl) - : JSCSSRule(structure, impl) +JSWebKitCSSKeyframeRule::JSWebKitCSSKeyframeRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitCSSKeyframeRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -130,21 +130,24 @@ bool JSWebKitCSSKeyframeRule::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsWebKitCSSKeyframeRuleKeyText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSKeyframeRule* castedThis = static_cast<JSWebKitCSSKeyframeRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSKeyframeRule* imp = static_cast<WebKitCSSKeyframeRule*>(static_cast<JSWebKitCSSKeyframeRule*>(asObject(slot.slotBase()))->impl()); + WebKitCSSKeyframeRule* imp = static_cast<WebKitCSSKeyframeRule*>(castedThis->impl()); return jsString(exec, imp->keyText()); } JSValue jsWebKitCSSKeyframeRuleStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSKeyframeRule* castedThis = static_cast<JSWebKitCSSKeyframeRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSKeyframeRule* imp = static_cast<WebKitCSSKeyframeRule*>(static_cast<JSWebKitCSSKeyframeRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->style())); + WebKitCSSKeyframeRule* imp = static_cast<WebKitCSSKeyframeRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsWebKitCSSKeyframeRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWebKitCSSKeyframeRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSWebKitCSSKeyframeRule* domObject = static_cast<JSWebKitCSSKeyframeRule*>(asObject(slot.slotBase())); + return JSWebKitCSSKeyframeRule::getConstructor(exec, domObject->globalObject()); } void JSWebKitCSSKeyframeRule::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -157,9 +160,9 @@ void setJSWebKitCSSKeyframeRuleKeyText(ExecState* exec, JSObject* thisObject, JS imp->setKeyText(value.toString(exec)); } -JSValue JSWebKitCSSKeyframeRule::getConstructor(ExecState* exec) +JSValue JSWebKitCSSKeyframeRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSWebKitCSSKeyframeRuleConstructor>(exec); + return getDOMConstructor<JSWebKitCSSKeyframeRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.h b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.h index f77c22629b..36d05a84b2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.h @@ -30,7 +30,7 @@ class WebKitCSSKeyframeRule; class JSWebKitCSSKeyframeRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSWebKitCSSKeyframeRule(PassRefPtr<JSC::Structure>, PassRefPtr<WebKitCSSKeyframeRule>); + JSWebKitCSSKeyframeRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WebKitCSSKeyframeRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -42,7 +42,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp index 013622c5b3..baf4e51ce1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSWebKitCSSKeyframesRuleConstructorTable = { 1, 0, JSWebKitCSSKeyframesRuleConstructorTableValues, 0 }; #endif -class JSWebKitCSSKeyframesRuleConstructor : public DOMObject { +class JSWebKitCSSKeyframesRuleConstructor : public DOMConstructorObject { public: - JSWebKitCSSKeyframesRuleConstructor(ExecState* exec) - : DOMObject(JSWebKitCSSKeyframesRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSWebKitCSSKeyframesRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitCSSKeyframesRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWebKitCSSKeyframesRulePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWebKitCSSKeyframesRulePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -123,8 +123,8 @@ bool JSWebKitCSSKeyframesRulePrototype::getOwnPropertySlot(ExecState* exec, cons const ClassInfo JSWebKitCSSKeyframesRule::s_info = { "WebKitCSSKeyframesRule", &JSCSSRule::s_info, &JSWebKitCSSKeyframesRuleTable, 0 }; -JSWebKitCSSKeyframesRule::JSWebKitCSSKeyframesRule(PassRefPtr<Structure> structure, PassRefPtr<WebKitCSSKeyframesRule> impl) - : JSCSSRule(structure, impl) +JSWebKitCSSKeyframesRule::JSWebKitCSSKeyframesRule(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitCSSKeyframesRule> impl) + : JSCSSRule(structure, globalObject, impl) { } @@ -160,21 +160,24 @@ bool JSWebKitCSSKeyframesRule::getOwnPropertySlot(ExecState* exec, unsigned prop JSValue jsWebKitCSSKeyframesRuleName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSKeyframesRule* castedThis = static_cast<JSWebKitCSSKeyframesRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSKeyframesRule* imp = static_cast<WebKitCSSKeyframesRule*>(static_cast<JSWebKitCSSKeyframesRule*>(asObject(slot.slotBase()))->impl()); + WebKitCSSKeyframesRule* imp = static_cast<WebKitCSSKeyframesRule*>(castedThis->impl()); return jsStringOrNull(exec, imp->name()); } JSValue jsWebKitCSSKeyframesRuleCssRules(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSKeyframesRule* castedThis = static_cast<JSWebKitCSSKeyframesRule*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSKeyframesRule* imp = static_cast<WebKitCSSKeyframesRule*>(static_cast<JSWebKitCSSKeyframesRule*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->cssRules())); + WebKitCSSKeyframesRule* imp = static_cast<WebKitCSSKeyframesRule*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->cssRules())); } JSValue jsWebKitCSSKeyframesRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWebKitCSSKeyframesRule*>(asObject(slot.slotBase()))->getConstructor(exec); + JSWebKitCSSKeyframesRule* domObject = static_cast<JSWebKitCSSKeyframesRule*>(asObject(slot.slotBase())); + return JSWebKitCSSKeyframesRule::getConstructor(exec, domObject->globalObject()); } void JSWebKitCSSKeyframesRule::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -194,9 +197,9 @@ void JSWebKitCSSKeyframesRule::getPropertyNames(ExecState* exec, PropertyNameArr Base::getPropertyNames(exec, propertyNames); } -JSValue JSWebKitCSSKeyframesRule::getConstructor(ExecState* exec) +JSValue JSWebKitCSSKeyframesRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSWebKitCSSKeyframesRuleConstructor>(exec); + return getDOMConstructor<JSWebKitCSSKeyframesRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsWebKitCSSKeyframesRulePrototypeFunctionInsertRule(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -235,7 +238,7 @@ JSValue JSC_HOST_CALL jsWebKitCSSKeyframesRulePrototypeFunctionFindRule(ExecStat const UString& key = args.at(0).toString(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->findRule(key))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->findRule(key))); return result; } @@ -243,7 +246,7 @@ JSValue JSC_HOST_CALL jsWebKitCSSKeyframesRulePrototypeFunctionFindRule(ExecStat JSValue JSWebKitCSSKeyframesRule::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSWebKitCSSKeyframesRule* thisObj = static_cast<JSWebKitCSSKeyframesRule*>(asObject(slot.slotBase())); - return toJS(exec, static_cast<WebKitCSSKeyframesRule*>(thisObj->impl())->item(slot.index())); + return toJS(exec, thisObj->globalObject(), static_cast<WebKitCSSKeyframesRule*>(thisObj->impl())->item(slot.index())); } } diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.h b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.h index 789f0a1499..cae9a5f054 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.h @@ -30,7 +30,7 @@ class WebKitCSSKeyframesRule; class JSWebKitCSSKeyframesRule : public JSCSSRule { typedef JSCSSRule Base; public: - JSWebKitCSSKeyframesRule(PassRefPtr<JSC::Structure>, PassRefPtr<WebKitCSSKeyframesRule>); + JSWebKitCSSKeyframesRule(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WebKitCSSKeyframesRule>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); @@ -44,7 +44,7 @@ public: } virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); static JSC::JSValue indexGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp index 9c1436be89..bfd9a37b5a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp @@ -107,8 +107,8 @@ bool JSWebKitCSSMatrixPrototype::getOwnPropertySlot(ExecState* exec, const Ident const ClassInfo JSWebKitCSSMatrix::s_info = { "WebKitCSSMatrix", 0, &JSWebKitCSSMatrixTable, 0 }; -JSWebKitCSSMatrix::JSWebKitCSSMatrix(PassRefPtr<Structure> structure, PassRefPtr<WebKitCSSMatrix> impl) - : DOMObject(structure) +JSWebKitCSSMatrix::JSWebKitCSSMatrix(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitCSSMatrix> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -130,155 +130,177 @@ bool JSWebKitCSSMatrix::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsWebKitCSSMatrixA(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->a()); } JSValue jsWebKitCSSMatrixB(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->b()); } JSValue jsWebKitCSSMatrixC(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->c()); } JSValue jsWebKitCSSMatrixD(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->d()); } JSValue jsWebKitCSSMatrixE(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->e()); } JSValue jsWebKitCSSMatrixF(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->f()); } JSValue jsWebKitCSSMatrixM11(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m11()); } JSValue jsWebKitCSSMatrixM12(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m12()); } JSValue jsWebKitCSSMatrixM13(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m13()); } JSValue jsWebKitCSSMatrixM14(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m14()); } JSValue jsWebKitCSSMatrixM21(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m21()); } JSValue jsWebKitCSSMatrixM22(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m22()); } JSValue jsWebKitCSSMatrixM23(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m23()); } JSValue jsWebKitCSSMatrixM24(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m24()); } JSValue jsWebKitCSSMatrixM31(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m31()); } JSValue jsWebKitCSSMatrixM32(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m32()); } JSValue jsWebKitCSSMatrixM33(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m33()); } JSValue jsWebKitCSSMatrixM34(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m34()); } JSValue jsWebKitCSSMatrixM41(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m41()); } JSValue jsWebKitCSSMatrixM42(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m42()); } JSValue jsWebKitCSSMatrixM43(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m43()); } JSValue jsWebKitCSSMatrixM44(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSMatrix* castedThis = static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(static_cast<JSWebKitCSSMatrix*>(asObject(slot.slotBase()))->impl()); + WebKitCSSMatrix* imp = static_cast<WebKitCSSMatrix*>(castedThis->impl()); return jsNumber(exec, imp->m44()); } @@ -444,7 +466,7 @@ JSValue JSC_HOST_CALL jsWebKitCSSMatrixPrototypeFunctionMultiply(ExecState* exec WebKitCSSMatrix* secondMatrix = toWebKitCSSMatrix(args.at(0)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->multiply(secondMatrix))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->multiply(secondMatrix))); return result; } @@ -458,7 +480,7 @@ JSValue JSC_HOST_CALL jsWebKitCSSMatrixPrototypeFunctionInverse(ExecState* exec, ExceptionCode ec = 0; - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->inverse(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->inverse(ec))); setDOMException(exec, ec); return result; } @@ -475,7 +497,7 @@ JSValue JSC_HOST_CALL jsWebKitCSSMatrixPrototypeFunctionTranslate(ExecState* exe double z = args.at(2).toNumber(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->translate(x, y, z))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->translate(x, y, z))); return result; } @@ -491,7 +513,7 @@ JSValue JSC_HOST_CALL jsWebKitCSSMatrixPrototypeFunctionScale(ExecState* exec, J double scaleZ = args.at(2).toNumber(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->scale(scaleX, scaleY, scaleZ))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->scale(scaleX, scaleY, scaleZ))); return result; } @@ -507,7 +529,7 @@ JSValue JSC_HOST_CALL jsWebKitCSSMatrixPrototypeFunctionRotate(ExecState* exec, double rotZ = args.at(2).toNumber(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->rotate(rotX, rotY, rotZ))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->rotate(rotX, rotY, rotZ))); return result; } @@ -524,7 +546,7 @@ JSValue JSC_HOST_CALL jsWebKitCSSMatrixPrototypeFunctionRotateAxisAngle(ExecStat double angle = args.at(3).toNumber(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->rotateAxisAngle(x, y, z, angle))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->rotateAxisAngle(x, y, z, angle))); return result; } @@ -541,9 +563,9 @@ JSValue JSC_HOST_CALL jsWebKitCSSMatrixPrototypeFunctionToString(ExecState* exec return result; } -JSC::JSValue toJS(JSC::ExecState* exec, WebKitCSSMatrix* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebKitCSSMatrix* object) { - return getDOMObjectWrapper<JSWebKitCSSMatrix>(exec, object); + return getDOMObjectWrapper<JSWebKitCSSMatrix>(exec, globalObject, object); } WebKitCSSMatrix* toWebKitCSSMatrix(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.h b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.h index ad377126d1..2e44fcf9f1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.h @@ -21,6 +21,7 @@ #ifndef JSWebKitCSSMatrix_h #define JSWebKitCSSMatrix_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class WebKitCSSMatrix; -class JSWebKitCSSMatrix : public DOMObject { - typedef DOMObject Base; +class JSWebKitCSSMatrix : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSWebKitCSSMatrix(PassRefPtr<JSC::Structure>, PassRefPtr<WebKitCSSMatrix>); + JSWebKitCSSMatrix(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WebKitCSSMatrix>); virtual ~JSWebKitCSSMatrix(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -51,7 +52,7 @@ private: RefPtr<WebKitCSSMatrix> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, WebKitCSSMatrix*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WebKitCSSMatrix*); WebKitCSSMatrix* toWebKitCSSMatrix(JSC::JSValue); class JSWebKitCSSMatrixPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp index 59a4650b87..ca3b003895 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp @@ -82,12 +82,12 @@ static JSC_CONST_HASHTABLE HashTable JSWebKitCSSTransformValueConstructorTable = { 68, 63, JSWebKitCSSTransformValueConstructorTableValues, 0 }; #endif -class JSWebKitCSSTransformValueConstructor : public DOMObject { +class JSWebKitCSSTransformValueConstructor : public DOMConstructorObject { public: - JSWebKitCSSTransformValueConstructor(ExecState* exec) - : DOMObject(JSWebKitCSSTransformValueConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSWebKitCSSTransformValueConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitCSSTransformValueConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWebKitCSSTransformValuePrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWebKitCSSTransformValuePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -155,8 +155,8 @@ bool JSWebKitCSSTransformValuePrototype::getOwnPropertySlot(ExecState* exec, con const ClassInfo JSWebKitCSSTransformValue::s_info = { "WebKitCSSTransformValue", &JSCSSValueList::s_info, &JSWebKitCSSTransformValueTable, 0 }; -JSWebKitCSSTransformValue::JSWebKitCSSTransformValue(PassRefPtr<Structure> structure, PassRefPtr<WebKitCSSTransformValue> impl) - : JSCSSValueList(structure, impl) +JSWebKitCSSTransformValue::JSWebKitCSSTransformValue(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitCSSTransformValue> impl) + : JSCSSValueList(structure, globalObject, impl) { } @@ -172,18 +172,20 @@ bool JSWebKitCSSTransformValue::getOwnPropertySlot(ExecState* exec, const Identi JSValue jsWebKitCSSTransformValueOperationType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitCSSTransformValue* castedThis = static_cast<JSWebKitCSSTransformValue*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitCSSTransformValue* imp = static_cast<WebKitCSSTransformValue*>(static_cast<JSWebKitCSSTransformValue*>(asObject(slot.slotBase()))->impl()); + WebKitCSSTransformValue* imp = static_cast<WebKitCSSTransformValue*>(castedThis->impl()); return jsNumber(exec, imp->operationType()); } JSValue jsWebKitCSSTransformValueConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWebKitCSSTransformValue*>(asObject(slot.slotBase()))->getConstructor(exec); + JSWebKitCSSTransformValue* domObject = static_cast<JSWebKitCSSTransformValue*>(asObject(slot.slotBase())); + return JSWebKitCSSTransformValue::getConstructor(exec, domObject->globalObject()); } -JSValue JSWebKitCSSTransformValue::getConstructor(ExecState* exec) +JSValue JSWebKitCSSTransformValue::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSWebKitCSSTransformValueConstructor>(exec); + return getDOMConstructor<JSWebKitCSSTransformValueConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } // Constant getters diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.h b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.h index 3f636e3f29..58e7f5c6de 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.h @@ -30,7 +30,7 @@ class WebKitCSSTransformValue; class JSWebKitCSSTransformValue : public JSCSSValueList { typedef JSCSSValueList Base; public: - JSWebKitCSSTransformValue(PassRefPtr<JSC::Structure>, PassRefPtr<WebKitCSSTransformValue>); + JSWebKitCSSTransformValue(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WebKitCSSTransformValue>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp index ced49fb40c..bba55c0ae4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp @@ -70,8 +70,8 @@ JSObject* JSWebKitPointPrototype::self(ExecState* exec, JSGlobalObject* globalOb const ClassInfo JSWebKitPoint::s_info = { "WebKitPoint", 0, &JSWebKitPointTable, 0 }; -JSWebKitPoint::JSWebKitPoint(PassRefPtr<Structure> structure, PassRefPtr<WebKitPoint> impl) - : DOMObject(structure) +JSWebKitPoint::JSWebKitPoint(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitPoint> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -93,15 +93,17 @@ bool JSWebKitPoint::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsWebKitPointX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitPoint* castedThis = static_cast<JSWebKitPoint*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitPoint* imp = static_cast<WebKitPoint*>(static_cast<JSWebKitPoint*>(asObject(slot.slotBase()))->impl()); + WebKitPoint* imp = static_cast<WebKitPoint*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsWebKitPointY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitPoint* castedThis = static_cast<JSWebKitPoint*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitPoint* imp = static_cast<WebKitPoint*>(static_cast<JSWebKitPoint*>(asObject(slot.slotBase()))->impl()); + WebKitPoint* imp = static_cast<WebKitPoint*>(castedThis->impl()); return jsNumber(exec, imp->y()); } @@ -122,9 +124,9 @@ void setJSWebKitPointY(ExecState* exec, JSObject* thisObject, JSValue value) imp->setY(value.toFloat(exec)); } -JSC::JSValue toJS(JSC::ExecState* exec, WebKitPoint* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebKitPoint* object) { - return getDOMObjectWrapper<JSWebKitPoint>(exec, object); + return getDOMObjectWrapper<JSWebKitPoint>(exec, globalObject, object); } WebKitPoint* toWebKitPoint(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.h b/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.h index 1a7c88f011..fdc8d4727c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.h @@ -21,6 +21,7 @@ #ifndef JSWebKitPoint_h #define JSWebKitPoint_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class WebKitPoint; -class JSWebKitPoint : public DOMObject { - typedef DOMObject Base; +class JSWebKitPoint : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSWebKitPoint(PassRefPtr<JSC::Structure>, PassRefPtr<WebKitPoint>); + JSWebKitPoint(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WebKitPoint>); virtual ~JSWebKitPoint(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -51,7 +52,7 @@ private: RefPtr<WebKitPoint> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, WebKitPoint*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WebKitPoint*); WebKitPoint* toWebKitPoint(JSC::JSValue); class JSWebKitPointPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp index 75e4de7ed8..ec0aa0d88e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp @@ -65,12 +65,12 @@ static JSC_CONST_HASHTABLE HashTable JSWebKitTransitionEventConstructorTable = { 1, 0, JSWebKitTransitionEventConstructorTableValues, 0 }; #endif -class JSWebKitTransitionEventConstructor : public DOMObject { +class JSWebKitTransitionEventConstructor : public DOMConstructorObject { public: - JSWebKitTransitionEventConstructor(ExecState* exec) - : DOMObject(JSWebKitTransitionEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSWebKitTransitionEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitTransitionEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWebKitTransitionEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWebKitTransitionEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -118,8 +118,8 @@ bool JSWebKitTransitionEventPrototype::getOwnPropertySlot(ExecState* exec, const const ClassInfo JSWebKitTransitionEvent::s_info = { "WebKitTransitionEvent", &JSEvent::s_info, &JSWebKitTransitionEventTable, 0 }; -JSWebKitTransitionEvent::JSWebKitTransitionEvent(PassRefPtr<Structure> structure, PassRefPtr<WebKitTransitionEvent> impl) - : JSEvent(structure, impl) +JSWebKitTransitionEvent::JSWebKitTransitionEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitTransitionEvent> impl) + : JSEvent(structure, globalObject, impl) { } @@ -135,25 +135,28 @@ bool JSWebKitTransitionEvent::getOwnPropertySlot(ExecState* exec, const Identifi JSValue jsWebKitTransitionEventPropertyName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitTransitionEvent* castedThis = static_cast<JSWebKitTransitionEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitTransitionEvent* imp = static_cast<WebKitTransitionEvent*>(static_cast<JSWebKitTransitionEvent*>(asObject(slot.slotBase()))->impl()); + WebKitTransitionEvent* imp = static_cast<WebKitTransitionEvent*>(castedThis->impl()); return jsString(exec, imp->propertyName()); } JSValue jsWebKitTransitionEventElapsedTime(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWebKitTransitionEvent* castedThis = static_cast<JSWebKitTransitionEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WebKitTransitionEvent* imp = static_cast<WebKitTransitionEvent*>(static_cast<JSWebKitTransitionEvent*>(asObject(slot.slotBase()))->impl()); + WebKitTransitionEvent* imp = static_cast<WebKitTransitionEvent*>(castedThis->impl()); return jsNumber(exec, imp->elapsedTime()); } JSValue jsWebKitTransitionEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWebKitTransitionEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSWebKitTransitionEvent* domObject = static_cast<JSWebKitTransitionEvent*>(asObject(slot.slotBase())); + return JSWebKitTransitionEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSWebKitTransitionEvent::getConstructor(ExecState* exec) +JSValue JSWebKitTransitionEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSWebKitTransitionEventConstructor>(exec); + return getDOMConstructor<JSWebKitTransitionEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsWebKitTransitionEventPrototypeFunctionInitWebKitTransitionEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.h b/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.h index de22ec358d..d8bf92a256 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.h @@ -30,7 +30,7 @@ class WebKitTransitionEvent; class JSWebKitTransitionEvent : public JSEvent { typedef JSEvent Base; public: - JSWebKitTransitionEvent(PassRefPtr<JSC::Structure>, PassRefPtr<WebKitTransitionEvent>); + JSWebKitTransitionEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WebKitTransitionEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp index 1a47e6fc3a..fa29330fbc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp @@ -75,12 +75,12 @@ static JSC_CONST_HASHTABLE HashTable JSWheelEventConstructorTable = { 1, 0, JSWheelEventConstructorTableValues, 0 }; #endif -class JSWheelEventConstructor : public DOMObject { +class JSWheelEventConstructor : public DOMConstructorObject { public: - JSWheelEventConstructor(ExecState* exec) - : DOMObject(JSWheelEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSWheelEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWheelEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWheelEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWheelEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -122,8 +122,8 @@ JSObject* JSWheelEventPrototype::self(ExecState* exec, JSGlobalObject* globalObj const ClassInfo JSWheelEvent::s_info = { "WheelEvent", &JSUIEvent::s_info, &JSWheelEventTable, 0 }; -JSWheelEvent::JSWheelEvent(PassRefPtr<Structure> structure, PassRefPtr<WheelEvent> impl) - : JSUIEvent(structure, impl) +JSWheelEvent::JSWheelEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WheelEvent> impl) + : JSUIEvent(structure, globalObject, impl) { } @@ -139,116 +139,132 @@ bool JSWheelEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propert JSValue jsWheelEventScreenX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->screenX()); } JSValue jsWheelEventScreenY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->screenY()); } JSValue jsWheelEventClientX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->clientX()); } JSValue jsWheelEventClientY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->clientY()); } JSValue jsWheelEventCtrlKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsBoolean(imp->ctrlKey()); } JSValue jsWheelEventShiftKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsBoolean(imp->shiftKey()); } JSValue jsWheelEventAltKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsBoolean(imp->altKey()); } JSValue jsWheelEventMetaKey(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsBoolean(imp->metaKey()); } JSValue jsWheelEventWheelDelta(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->wheelDelta()); } JSValue jsWheelEventWheelDeltaX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->wheelDeltaX()); } JSValue jsWheelEventWheelDeltaY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->wheelDeltaY()); } JSValue jsWheelEventOffsetX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->offsetX()); } JSValue jsWheelEventOffsetY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->offsetY()); } JSValue jsWheelEventX(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->x()); } JSValue jsWheelEventY(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWheelEvent* castedThis = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WheelEvent* imp = static_cast<WheelEvent*>(static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->impl()); + WheelEvent* imp = static_cast<WheelEvent*>(castedThis->impl()); return jsNumber(exec, imp->y()); } JSValue jsWheelEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWheelEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSWheelEvent* domObject = static_cast<JSWheelEvent*>(asObject(slot.slotBase())); + return JSWheelEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSWheelEvent::getConstructor(ExecState* exec) +JSValue JSWheelEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSWheelEventConstructor>(exec); + return getDOMConstructor<JSWheelEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.h b/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.h index ae9730daab..78fdc12b8b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWheelEvent.h @@ -30,7 +30,7 @@ class WheelEvent; class JSWheelEvent : public JSUIEvent { typedef JSUIEvent Base; public: - JSWheelEvent(PassRefPtr<JSC::Structure>, PassRefPtr<WheelEvent>); + JSWheelEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WheelEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp index 979f43b75a..0e238e436b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp @@ -24,11 +24,9 @@ #include "JSWorker.h" -#include "Event.h" #include "EventListener.h" #include "Frame.h" #include "JSDOMGlobalObject.h" -#include "JSEvent.h" #include "JSEventListener.h" #include "JSMessagePort.h" #include "Worker.h" @@ -43,29 +41,25 @@ ASSERT_CLASS_FITS_IN_CELL(JSWorker); /* Hash table */ -static const HashTableValue JSWorkerTableValues[3] = +static const HashTableValue JSWorkerTableValues[2] = { - { "onerror", DontDelete, (intptr_t)jsWorkerOnerror, (intptr_t)setJSWorkerOnerror }, { "onmessage", DontDelete, (intptr_t)jsWorkerOnmessage, (intptr_t)setJSWorkerOnmessage }, { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSWorkerTable = #if ENABLE(PERFECT_HASH_SIZE) - { 3, JSWorkerTableValues, 0 }; + { 0, JSWorkerTableValues, 0 }; #else - { 4, 3, JSWorkerTableValues, 0 }; + { 2, 1, JSWorkerTableValues, 0 }; #endif /* Hash table for prototype */ -static const HashTableValue JSWorkerPrototypeTableValues[6] = +static const HashTableValue JSWorkerPrototypeTableValues[3] = { { "postMessage", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionPostMessage, (intptr_t)2 }, { "terminate", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionTerminate, (intptr_t)0 }, - { "addEventListener", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionAddEventListener, (intptr_t)3 }, - { "removeEventListener", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionRemoveEventListener, (intptr_t)3 }, - { "dispatchEvent", DontDelete|Function, (intptr_t)jsWorkerPrototypeFunctionDispatchEvent, (intptr_t)1 }, { 0, 0, 0, 0 } }; @@ -73,7 +67,7 @@ static JSC_CONST_HASHTABLE HashTable JSWorkerPrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 15, JSWorkerPrototypeTableValues, 0 }; #else - { 16, 15, JSWorkerPrototypeTableValues, 0 }; + { 5, 3, JSWorkerPrototypeTableValues, 0 }; #endif const ClassInfo JSWorkerPrototype::s_info = { "WorkerPrototype", 0, &JSWorkerPrototypeTable, 0 }; @@ -88,22 +82,16 @@ bool JSWorkerPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& pr return getStaticFunctionSlot<JSObject>(exec, &JSWorkerPrototypeTable, this, propertyName, slot); } -const ClassInfo JSWorker::s_info = { "Worker", 0, &JSWorkerTable, 0 }; +const ClassInfo JSWorker::s_info = { "Worker", &JSAbstractWorker::s_info, &JSWorkerTable, 0 }; -JSWorker::JSWorker(PassRefPtr<Structure> structure, PassRefPtr<Worker> impl) - : DOMObject(structure) - , m_impl(impl) +JSWorker::JSWorker(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Worker> impl) + : JSAbstractWorker(structure, globalObject, impl) { } -JSWorker::~JSWorker() -{ - forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get()); -} - JSObject* JSWorker::createPrototype(ExecState* exec, JSGlobalObject* globalObject) { - return new (exec) JSWorkerPrototype(JSWorkerPrototype::createStructure(globalObject->objectPrototype())); + return new (exec) JSWorkerPrototype(JSWorkerPrototype::createStructure(JSAbstractWorkerPrototype::self(exec, globalObject))); } bool JSWorker::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) @@ -111,21 +99,11 @@ bool JSWorker::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNam return getStaticValueSlot<JSWorker, Base>(exec, &JSWorkerTable, this, propertyName, slot); } -JSValue jsWorkerOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) -{ - UNUSED_PARAM(exec); - Worker* imp = static_cast<Worker*>(static_cast<JSWorker*>(asObject(slot.slotBase()))->impl()); - if (EventListener* listener = imp->onerror()) { - if (JSObject* jsFunction = listener->jsFunction()) - return jsFunction; - } - return jsNull(); -} - JSValue jsWorkerOnmessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorker* castedThis = static_cast<JSWorker*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - Worker* imp = static_cast<Worker*>(static_cast<JSWorker*>(asObject(slot.slotBase()))->impl()); + Worker* imp = static_cast<Worker*>(castedThis->impl()); if (EventListener* listener = imp->onmessage()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -138,16 +116,6 @@ void JSWorker::put(ExecState* exec, const Identifier& propertyName, JSValue valu lookupPut<JSWorker, Base>(exec, propertyName, value, &JSWorkerTable, this, slot); } -void setJSWorkerOnerror(ExecState* exec, JSObject* thisObject, JSValue value) -{ - UNUSED_PARAM(exec); - Worker* imp = static_cast<Worker*>(static_cast<JSWorker*>(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); - if (!globalObject) - return; - imp->setOnerror(globalObject->createJSAttributeEventListener(value)); -} - void setJSWorkerOnmessage(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); @@ -194,43 +162,9 @@ JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionTerminate(ExecState* exec, JSObje return jsUndefined(); } -JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionAddEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorker::s_info)) - return throwError(exec, TypeError); - JSWorker* castedThisObj = static_cast<JSWorker*>(asObject(thisValue)); - return castedThisObj->addEventListener(exec, args); -} - -JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionRemoveEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorker::s_info)) - return throwError(exec, TypeError); - JSWorker* castedThisObj = static_cast<JSWorker*>(asObject(thisValue)); - return castedThisObj->removeEventListener(exec, args); -} - -JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionDispatchEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorker::s_info)) - return throwError(exec, TypeError); - JSWorker* castedThisObj = static_cast<JSWorker*>(asObject(thisValue)); - Worker* imp = static_cast<Worker*>(castedThisObj->impl()); - ExceptionCode ec = 0; - Event* evt = toEvent(args.at(0)); - - - JSC::JSValue result = jsBoolean(imp->dispatchEvent(evt, ec)); - setDOMException(exec, ec); - return result; -} - -JSC::JSValue toJS(JSC::ExecState* exec, Worker* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Worker* object) { - return getDOMObjectWrapper<JSWorker>(exec, object); + return getDOMObjectWrapper<JSWorker>(exec, globalObject, object); } Worker* toWorker(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorker.h b/src/3rdparty/webkit/WebCore/generated/JSWorker.h index c1ed4af9fd..f04866b07b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorker.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWorker.h @@ -23,19 +23,17 @@ #if ENABLE(WORKERS) -#include "JSDOMBinding.h" -#include <runtime/JSGlobalObject.h> -#include <runtime/ObjectPrototype.h> +#include "JSAbstractWorker.h" +#include "Worker.h" namespace WebCore { class Worker; -class JSWorker : public DOMObject { - typedef DOMObject Base; +class JSWorker : public JSAbstractWorker { + typedef JSAbstractWorker Base; public: - JSWorker(PassRefPtr<JSC::Structure>, PassRefPtr<Worker>); - virtual ~JSWorker(); + JSWorker(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Worker>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); @@ -49,17 +47,13 @@ public: virtual void mark(); - - // Custom functions - JSC::JSValue addEventListener(JSC::ExecState*, const JSC::ArgList&); - JSC::JSValue removeEventListener(JSC::ExecState*, const JSC::ArgList&); - Worker* impl() const { return m_impl.get(); } - -private: - RefPtr<Worker> m_impl; + Worker* impl() const + { + return static_cast<Worker*>(Base::impl()); + } }; -JSC::JSValue toJS(JSC::ExecState*, Worker*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Worker*); Worker* toWorker(JSC::JSValue); class JSWorkerPrototype : public JSC::JSObject { @@ -80,13 +74,8 @@ public: JSC::JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionPostMessage(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionTerminate(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionAddEventListener(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionRemoveEventListener(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsWorkerPrototypeFunctionDispatchEvent(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); // Attributes -JSC::JSValue jsWorkerOnerror(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); -void setJSWorkerOnerror(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsWorkerOnmessage(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSWorkerOnmessage(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp index cf46141b10..59a8dcd353 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp @@ -30,7 +30,6 @@ #include "JSEventListener.h" #include "JSMessageChannel.h" #include "JSMessageEvent.h" -#include "JSMessagePort.h" #include "JSWorkerContext.h" #include "JSWorkerLocation.h" #include "JSWorkerNavigator.h" @@ -53,8 +52,8 @@ static const HashTableValue JSWorkerContextTableValues[9] = { { "self", DontDelete, (intptr_t)jsWorkerContextSelf, (intptr_t)setJSWorkerContextSelf }, { "location", DontDelete, (intptr_t)jsWorkerContextLocation, (intptr_t)setJSWorkerContextLocation }, + { "onerror", DontDelete, (intptr_t)jsWorkerContextOnerror, (intptr_t)setJSWorkerContextOnerror }, { "navigator", DontDelete, (intptr_t)jsWorkerContextNavigator, (intptr_t)setJSWorkerContextNavigator }, - { "onmessage", DontDelete, (intptr_t)jsWorkerContextOnmessage, (intptr_t)setJSWorkerContextOnmessage }, { "MessageEvent", DontDelete, (intptr_t)jsWorkerContextMessageEventConstructor, (intptr_t)setJSWorkerContextMessageEventConstructor }, { "WorkerLocation", DontDelete, (intptr_t)jsWorkerContextWorkerLocationConstructor, (intptr_t)setJSWorkerContextWorkerLocationConstructor }, { "MessageChannel", DontDelete, (intptr_t)jsWorkerContextMessageChannelConstructor, (intptr_t)setJSWorkerContextMessageChannelConstructor }, @@ -71,11 +70,10 @@ static JSC_CONST_HASHTABLE HashTable JSWorkerContextTable = /* Hash table for prototype */ -static const HashTableValue JSWorkerContextPrototypeTableValues[11] = +static const HashTableValue JSWorkerContextPrototypeTableValues[10] = { { "close", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionClose, (intptr_t)0 }, { "importScripts", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionImportScripts, (intptr_t)0 }, - { "postMessage", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionPostMessage, (intptr_t)2 }, { "setTimeout", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionSetTimeout, (intptr_t)2 }, { "clearTimeout", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionClearTimeout, (intptr_t)1 }, { "setInterval", DontDelete|Function, (intptr_t)jsWorkerContextPrototypeFunctionSetInterval, (intptr_t)2 }, @@ -129,56 +127,62 @@ bool JSWorkerContext::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsWorkerContextSelf(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerContext* castedThis = static_cast<JSWorkerContext*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerContext* imp = static_cast<WorkerContext*>(static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->self())); + WorkerContext* imp = static_cast<WorkerContext*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->self())); } JSValue jsWorkerContextLocation(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerContext* castedThis = static_cast<JSWorkerContext*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerContext* imp = static_cast<WorkerContext*>(static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->location())); + WorkerContext* imp = static_cast<WorkerContext*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->location())); } -JSValue jsWorkerContextNavigator(ExecState* exec, const Identifier&, const PropertySlot& slot) -{ - UNUSED_PARAM(exec); - WorkerContext* imp = static_cast<WorkerContext*>(static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->navigator())); -} - -JSValue jsWorkerContextOnmessage(ExecState* exec, const Identifier&, const PropertySlot& slot) +JSValue jsWorkerContextOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerContext* castedThis = static_cast<JSWorkerContext*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerContext* imp = static_cast<WorkerContext*>(static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->impl()); - if (EventListener* listener = imp->onmessage()) { + WorkerContext* imp = static_cast<WorkerContext*>(castedThis->impl()); + if (EventListener* listener = imp->onerror()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; } return jsNull(); } +JSValue jsWorkerContextNavigator(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSWorkerContext* castedThis = static_cast<JSWorkerContext*>(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + WorkerContext* imp = static_cast<WorkerContext*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->navigator())); +} + JSValue jsWorkerContextMessageEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - UNUSED_PARAM(slot); - return JSMessageEvent::getConstructor(exec); + JSWorkerContext* castedThis = static_cast<JSWorkerContext*>(asObject(slot.slotBase())); + return JSMessageEvent::getConstructor(exec, castedThis); } JSValue jsWorkerContextWorkerLocationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - UNUSED_PARAM(slot); - return JSWorkerLocation::getConstructor(exec); + JSWorkerContext* castedThis = static_cast<JSWorkerContext*>(asObject(slot.slotBase())); + return JSWorkerLocation::getConstructor(exec, castedThis); } JSValue jsWorkerContextMessageChannelConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->messageChannel(exec); + JSWorkerContext* castedThis = static_cast<JSWorkerContext*>(asObject(slot.slotBase())); + return castedThis->messageChannel(exec); } JSValue jsWorkerContextXMLHttpRequestConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWorkerContext*>(asObject(slot.slotBase()))->xmlHttpRequest(exec); + JSWorkerContext* castedThis = static_cast<JSWorkerContext*>(asObject(slot.slotBase())); + return castedThis->xmlHttpRequest(exec); } void JSWorkerContext::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) @@ -198,18 +202,18 @@ void setJSWorkerContextLocation(ExecState* exec, JSObject* thisObject, JSValue v static_cast<JSWorkerContext*>(thisObject)->putDirect(Identifier(exec, "location"), value); } -void setJSWorkerContextNavigator(ExecState* exec, JSObject* thisObject, JSValue value) -{ - // Shadowing a built-in object - static_cast<JSWorkerContext*>(thisObject)->putDirect(Identifier(exec, "navigator"), value); -} - -void setJSWorkerContextOnmessage(ExecState* exec, JSObject* thisObject, JSValue value) +void setJSWorkerContextOnerror(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); WorkerContext* imp = static_cast<WorkerContext*>(static_cast<JSWorkerContext*>(thisObject)->impl()); JSDOMGlobalObject* globalObject = static_cast<JSWorkerContext*>(thisObject); - imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); + imp->setOnerror(globalObject->createJSAttributeEventListener(value)); +} + +void setJSWorkerContextNavigator(ExecState* exec, JSObject* thisObject, JSValue value) +{ + // Shadowing a built-in object + static_cast<JSWorkerContext*>(thisObject)->putDirect(Identifier(exec, "navigator"), value); } void setJSWorkerContextMessageEventConstructor(ExecState* exec, JSObject* thisObject, JSValue value) @@ -239,9 +243,9 @@ void setJSWorkerContextXMLHttpRequestConstructor(ExecState* exec, JSObject* this JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClose(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); WorkerContext* imp = static_cast<WorkerContext*>(castedThisObj->impl()); imp->close(); @@ -251,51 +255,27 @@ JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClose(ExecState* exec, JSO JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionImportScripts(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); return castedThisObj->importScripts(exec, args); } -JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionPostMessage(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) - return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); - WorkerContext* imp = static_cast<WorkerContext*>(castedThisObj->impl()); - ExceptionCode ec = 0; - const UString& message = args.at(0).toString(exec); - - int argsCount = args.size(); - if (argsCount < 2) { - imp->postMessage(message, ec); - setDOMException(exec, ec); - return jsUndefined(); - } - - MessagePort* messagePort = toMessagePort(args.at(1)); - - imp->postMessage(message, messagePort, ec); - setDOMException(exec, ec); - return jsUndefined(); -} - JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionSetTimeout(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); return castedThisObj->setTimeout(exec, args); } JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClearTimeout(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); WorkerContext* imp = static_cast<WorkerContext*>(castedThisObj->impl()); int handle = args.at(0).toInt32(exec); @@ -306,18 +286,18 @@ JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClearTimeout(ExecState* ex JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionSetInterval(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); return castedThisObj->setInterval(exec, args); } JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClearInterval(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); WorkerContext* imp = static_cast<WorkerContext*>(castedThisObj->impl()); int handle = args.at(0).toInt32(exec); @@ -328,27 +308,27 @@ JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClearInterval(ExecState* e JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionAddEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); return castedThisObj->addEventListener(exec, args); } JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionRemoveEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); return castedThisObj->removeEventListener(exec, args); } JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionDispatchEvent(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); - if (!thisValue.isObject(&JSWorkerContext::s_info)) + JSWorkerContext* castedThisObj = toJSWorkerContext(thisValue.toThisObject(exec)); + if (!castedThisObj) return throwError(exec, TypeError); - JSWorkerContext* castedThisObj = static_cast<JSWorkerContext*>(asObject(thisValue)); WorkerContext* imp = static_cast<WorkerContext*>(castedThisObj->impl()); ExceptionCode ec = 0; Event* evt = toEvent(args.at(0)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h index 7453f275bc..5ce05b7adc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h @@ -78,7 +78,6 @@ public: JSC::JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClose(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionImportScripts(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionPostMessage(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionSetTimeout(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionClearTimeout(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsWorkerContextPrototypeFunctionSetInterval(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); @@ -92,10 +91,10 @@ JSC::JSValue jsWorkerContextSelf(JSC::ExecState*, const JSC::Identifier&, const void setJSWorkerContextSelf(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsWorkerContextLocation(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSWorkerContextLocation(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); +JSC::JSValue jsWorkerContextOnerror(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSWorkerContextOnerror(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsWorkerContextNavigator(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSWorkerContextNavigator(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); -JSC::JSValue jsWorkerContextOnmessage(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); -void setJSWorkerContextOnmessage(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsWorkerContextMessageEventConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSWorkerContextMessageEventConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsWorkerContextWorkerLocationConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp index d29c219d22..d45c06a43f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp @@ -73,12 +73,12 @@ static JSC_CONST_HASHTABLE HashTable JSWorkerLocationConstructorTable = { 1, 0, JSWorkerLocationConstructorTableValues, 0 }; #endif -class JSWorkerLocationConstructor : public DOMObject { +class JSWorkerLocationConstructor : public DOMConstructorObject { public: - JSWorkerLocationConstructor(ExecState* exec) - : DOMObject(JSWorkerLocationConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSWorkerLocationConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWorkerLocationConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSWorkerLocationPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSWorkerLocationPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -134,8 +134,8 @@ static const HashTable* getJSWorkerLocationTable(ExecState* exec) } const ClassInfo JSWorkerLocation::s_info = { "WorkerLocation", 0, 0, getJSWorkerLocationTable }; -JSWorkerLocation::JSWorkerLocation(PassRefPtr<Structure> structure, PassRefPtr<WorkerLocation> impl) - : DOMObject(structure) +JSWorkerLocation::JSWorkerLocation(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WorkerLocation> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -157,67 +157,76 @@ bool JSWorkerLocation::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsWorkerLocationHref(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerLocation* imp = static_cast<WorkerLocation*>(static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->impl()); + WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl()); return jsString(exec, imp->href()); } JSValue jsWorkerLocationProtocol(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerLocation* imp = static_cast<WorkerLocation*>(static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->impl()); + WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl()); return jsString(exec, imp->protocol()); } JSValue jsWorkerLocationHost(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerLocation* imp = static_cast<WorkerLocation*>(static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->impl()); + WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl()); return jsString(exec, imp->host()); } JSValue jsWorkerLocationHostname(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerLocation* imp = static_cast<WorkerLocation*>(static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->impl()); + WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl()); return jsString(exec, imp->hostname()); } JSValue jsWorkerLocationPort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerLocation* imp = static_cast<WorkerLocation*>(static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->impl()); + WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl()); return jsString(exec, imp->port()); } JSValue jsWorkerLocationPathname(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerLocation* imp = static_cast<WorkerLocation*>(static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->impl()); + WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl()); return jsString(exec, imp->pathname()); } JSValue jsWorkerLocationSearch(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerLocation* imp = static_cast<WorkerLocation*>(static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->impl()); + WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl()); return jsString(exec, imp->search()); } JSValue jsWorkerLocationHash(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerLocation* castedThis = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerLocation* imp = static_cast<WorkerLocation*>(static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->impl()); + WorkerLocation* imp = static_cast<WorkerLocation*>(castedThis->impl()); return jsString(exec, imp->hash()); } JSValue jsWorkerLocationConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSWorkerLocation*>(asObject(slot.slotBase()))->getConstructor(exec); + JSWorkerLocation* domObject = static_cast<JSWorkerLocation*>(asObject(slot.slotBase())); + return JSWorkerLocation::getConstructor(exec, domObject->globalObject()); } -JSValue JSWorkerLocation::getConstructor(ExecState* exec) +JSValue JSWorkerLocation::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSWorkerLocationConstructor>(exec); + return getDOMConstructor<JSWorkerLocationConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsWorkerLocationPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -233,9 +242,9 @@ JSValue JSC_HOST_CALL jsWorkerLocationPrototypeFunctionToString(ExecState* exec, return result; } -JSC::JSValue toJS(JSC::ExecState* exec, WorkerLocation* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WorkerLocation* object) { - return getDOMObjectWrapper<JSWorkerLocation>(exec, object); + return getDOMObjectWrapper<JSWorkerLocation>(exec, globalObject, object); } WorkerLocation* toWorkerLocation(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.h b/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.h index cab657d7b9..40c72c2ddf 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.h @@ -23,6 +23,7 @@ #if ENABLE(WORKERS) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class WorkerLocation; -class JSWorkerLocation : public DOMObject { - typedef DOMObject Base; +class JSWorkerLocation : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSWorkerLocation(PassRefPtr<JSC::Structure>, PassRefPtr<WorkerLocation>); + JSWorkerLocation(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WorkerLocation>); virtual ~JSWorkerLocation(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); WorkerLocation* impl() const { return m_impl.get(); } private: RefPtr<WorkerLocation> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, WorkerLocation*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WorkerLocation*); WorkerLocation* toWorkerLocation(JSC::JSValue); class JSWorkerLocationPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp index 76da8f1bc7..bc082b8569 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp @@ -85,8 +85,8 @@ static const HashTable* getJSWorkerNavigatorTable(ExecState* exec) } const ClassInfo JSWorkerNavigator::s_info = { "WorkerNavigator", 0, 0, getJSWorkerNavigatorTable }; -JSWorkerNavigator::JSWorkerNavigator(PassRefPtr<Structure> structure, PassRefPtr<WorkerNavigator> impl) - : DOMObject(structure) +JSWorkerNavigator::JSWorkerNavigator(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WorkerNavigator> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -108,42 +108,47 @@ bool JSWorkerNavigator::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsWorkerNavigatorAppName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerNavigator* castedThis = static_cast<JSWorkerNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerNavigator* imp = static_cast<WorkerNavigator*>(static_cast<JSWorkerNavigator*>(asObject(slot.slotBase()))->impl()); + WorkerNavigator* imp = static_cast<WorkerNavigator*>(castedThis->impl()); return jsString(exec, imp->appName()); } JSValue jsWorkerNavigatorAppVersion(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerNavigator* castedThis = static_cast<JSWorkerNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerNavigator* imp = static_cast<WorkerNavigator*>(static_cast<JSWorkerNavigator*>(asObject(slot.slotBase()))->impl()); + WorkerNavigator* imp = static_cast<WorkerNavigator*>(castedThis->impl()); return jsString(exec, imp->appVersion()); } JSValue jsWorkerNavigatorPlatform(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerNavigator* castedThis = static_cast<JSWorkerNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerNavigator* imp = static_cast<WorkerNavigator*>(static_cast<JSWorkerNavigator*>(asObject(slot.slotBase()))->impl()); + WorkerNavigator* imp = static_cast<WorkerNavigator*>(castedThis->impl()); return jsString(exec, imp->platform()); } JSValue jsWorkerNavigatorUserAgent(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerNavigator* castedThis = static_cast<JSWorkerNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerNavigator* imp = static_cast<WorkerNavigator*>(static_cast<JSWorkerNavigator*>(asObject(slot.slotBase()))->impl()); + WorkerNavigator* imp = static_cast<WorkerNavigator*>(castedThis->impl()); return jsString(exec, imp->userAgent()); } JSValue jsWorkerNavigatorOnLine(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSWorkerNavigator* castedThis = static_cast<JSWorkerNavigator*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - WorkerNavigator* imp = static_cast<WorkerNavigator*>(static_cast<JSWorkerNavigator*>(asObject(slot.slotBase()))->impl()); + WorkerNavigator* imp = static_cast<WorkerNavigator*>(castedThis->impl()); return jsBoolean(imp->onLine()); } -JSC::JSValue toJS(JSC::ExecState* exec, WorkerNavigator* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WorkerNavigator* object) { - return getDOMObjectWrapper<JSWorkerNavigator>(exec, object); + return getDOMObjectWrapper<JSWorkerNavigator>(exec, globalObject, object); } WorkerNavigator* toWorkerNavigator(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.h b/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.h index f07606c87d..a6c4046e7f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.h +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.h @@ -23,6 +23,7 @@ #if ENABLE(WORKERS) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class WorkerNavigator; -class JSWorkerNavigator : public DOMObject { - typedef DOMObject Base; +class JSWorkerNavigator : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSWorkerNavigator(PassRefPtr<JSC::Structure>, PassRefPtr<WorkerNavigator>); + JSWorkerNavigator(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<WorkerNavigator>); virtual ~JSWorkerNavigator(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -52,7 +53,7 @@ private: RefPtr<WorkerNavigator> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, WorkerNavigator*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WorkerNavigator*); WorkerNavigator* toWorkerNavigator(JSC::JSValue); class JSWorkerNavigatorPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp index ebd723e5aa..1817d2814e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp @@ -122,8 +122,8 @@ static const HashTable* getJSXMLHttpRequestTable(ExecState* exec) } const ClassInfo JSXMLHttpRequest::s_info = { "XMLHttpRequest", 0, 0, getJSXMLHttpRequestTable }; -JSXMLHttpRequest::JSXMLHttpRequest(PassRefPtr<Structure> structure, PassRefPtr<XMLHttpRequest> impl) - : DOMObject(structure) +JSXMLHttpRequest::JSXMLHttpRequest(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequest> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -145,8 +145,9 @@ bool JSXMLHttpRequest::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsXMLHttpRequestOnabort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); if (EventListener* listener = imp->onabort()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -156,8 +157,9 @@ JSValue jsXMLHttpRequestOnabort(ExecState* exec, const Identifier&, const Proper JSValue jsXMLHttpRequestOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); if (EventListener* listener = imp->onerror()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -167,8 +169,9 @@ JSValue jsXMLHttpRequestOnerror(ExecState* exec, const Identifier&, const Proper JSValue jsXMLHttpRequestOnload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); if (EventListener* listener = imp->onload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -178,8 +181,9 @@ JSValue jsXMLHttpRequestOnload(ExecState* exec, const Identifier&, const Propert JSValue jsXMLHttpRequestOnloadstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); if (EventListener* listener = imp->onloadstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -189,8 +193,9 @@ JSValue jsXMLHttpRequestOnloadstart(ExecState* exec, const Identifier&, const Pr JSValue jsXMLHttpRequestOnprogress(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); if (EventListener* listener = imp->onprogress()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -200,8 +205,9 @@ JSValue jsXMLHttpRequestOnprogress(ExecState* exec, const Identifier&, const Pro JSValue jsXMLHttpRequestOnreadystatechange(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); if (EventListener* listener = imp->onreadystatechange()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -211,41 +217,47 @@ JSValue jsXMLHttpRequestOnreadystatechange(ExecState* exec, const Identifier&, c JSValue jsXMLHttpRequestReadyState(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); return jsNumber(exec, imp->readyState()); } JSValue jsXMLHttpRequestWithCredentials(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); return jsBoolean(imp->withCredentials()); } JSValue jsXMLHttpRequestUpload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->upload())); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->upload())); } JSValue jsXMLHttpRequestResponseText(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->responseText(exec); + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); + return castedThis->responseText(exec); } JSValue jsXMLHttpRequestResponseXML(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); - return toJS(exec, WTF::getPtr(imp->responseXML())); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); + return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->responseXML())); } JSValue jsXMLHttpRequestStatus(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); JSC::JSValue result = jsNumber(exec, imp->status(ec)); setDOMException(exec, ec); return result; @@ -253,8 +265,9 @@ JSValue jsXMLHttpRequestStatus(ExecState* exec, const Identifier&, const Propert JSValue jsXMLHttpRequestStatusText(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequest* castedThis = static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(static_cast<JSXMLHttpRequest*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequest* imp = static_cast<XMLHttpRequest*>(castedThis->impl()); JSC::JSValue result = jsString(exec, imp->statusText(ec)); setDOMException(exec, ec); return result; @@ -466,9 +479,9 @@ JSValue jsXMLHttpRequestDONE(ExecState* exec, const Identifier&, const PropertyS return jsNumber(exec, static_cast<int>(4)); } -JSC::JSValue toJS(JSC::ExecState* exec, XMLHttpRequest* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XMLHttpRequest* object) { - return getDOMObjectWrapper<JSXMLHttpRequest>(exec, object); + return getDOMObjectWrapper<JSXMLHttpRequest>(exec, globalObject, object); } XMLHttpRequest* toXMLHttpRequest(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.h b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.h index 9529b0d4b7..b64b305034 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.h @@ -21,6 +21,7 @@ #ifndef JSXMLHttpRequest_h #define JSXMLHttpRequest_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class XMLHttpRequest; -class JSXMLHttpRequest : public DOMObject { - typedef DOMObject Base; +class JSXMLHttpRequest : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXMLHttpRequest(PassRefPtr<JSC::Structure>, PassRefPtr<XMLHttpRequest>); + JSXMLHttpRequest(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XMLHttpRequest>); virtual ~JSXMLHttpRequest(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -65,7 +66,7 @@ private: RefPtr<XMLHttpRequest> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XMLHttpRequest*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XMLHttpRequest*); XMLHttpRequest* toXMLHttpRequest(JSC::JSValue); class JSXMLHttpRequestPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp index 3820567026..6f81324db8 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp @@ -68,12 +68,12 @@ static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestExceptionConstructorTable = { 4, 3, JSXMLHttpRequestExceptionConstructorTableValues, 0 }; #endif -class JSXMLHttpRequestExceptionConstructor : public DOMObject { +class JSXMLHttpRequestExceptionConstructor : public DOMConstructorObject { public: - JSXMLHttpRequestExceptionConstructor(ExecState* exec) - : DOMObject(JSXMLHttpRequestExceptionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSXMLHttpRequestExceptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXMLHttpRequestExceptionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXMLHttpRequestExceptionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXMLHttpRequestExceptionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -131,8 +131,8 @@ static const HashTable* getJSXMLHttpRequestExceptionTable(ExecState* exec) } const ClassInfo JSXMLHttpRequestException::s_info = { "XMLHttpRequestException", 0, 0, getJSXMLHttpRequestExceptionTable }; -JSXMLHttpRequestException::JSXMLHttpRequestException(PassRefPtr<Structure> structure, PassRefPtr<XMLHttpRequestException> impl) - : DOMObject(structure) +JSXMLHttpRequestException::JSXMLHttpRequestException(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequestException> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -154,32 +154,36 @@ bool JSXMLHttpRequestException::getOwnPropertySlot(ExecState* exec, const Identi JSValue jsXMLHttpRequestExceptionCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestException* castedThis = static_cast<JSXMLHttpRequestException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestException* imp = static_cast<XMLHttpRequestException*>(static_cast<JSXMLHttpRequestException*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestException* imp = static_cast<XMLHttpRequestException*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsXMLHttpRequestExceptionName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestException* castedThis = static_cast<JSXMLHttpRequestException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestException* imp = static_cast<XMLHttpRequestException*>(static_cast<JSXMLHttpRequestException*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestException* imp = static_cast<XMLHttpRequestException*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsXMLHttpRequestExceptionMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestException* castedThis = static_cast<JSXMLHttpRequestException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestException* imp = static_cast<XMLHttpRequestException*>(static_cast<JSXMLHttpRequestException*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestException* imp = static_cast<XMLHttpRequestException*>(castedThis->impl()); return jsString(exec, imp->message()); } JSValue jsXMLHttpRequestExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXMLHttpRequestException*>(asObject(slot.slotBase()))->getConstructor(exec); + JSXMLHttpRequestException* domObject = static_cast<JSXMLHttpRequestException*>(asObject(slot.slotBase())); + return JSXMLHttpRequestException::getConstructor(exec, domObject->globalObject()); } -JSValue JSXMLHttpRequestException::getConstructor(ExecState* exec) +JSValue JSXMLHttpRequestException::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSXMLHttpRequestExceptionConstructor>(exec); + return getDOMConstructor<JSXMLHttpRequestExceptionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsXMLHttpRequestExceptionPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -207,9 +211,9 @@ JSValue jsXMLHttpRequestExceptionABORT_ERR(ExecState* exec, const Identifier&, c return jsNumber(exec, static_cast<int>(102)); } -JSC::JSValue toJS(JSC::ExecState* exec, XMLHttpRequestException* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XMLHttpRequestException* object) { - return getDOMObjectWrapper<JSXMLHttpRequestException>(exec, object); + return getDOMObjectWrapper<JSXMLHttpRequestException>(exec, globalObject, object); } XMLHttpRequestException* toXMLHttpRequestException(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.h b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.h index 52f26bfeb2..4923f6fac3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.h @@ -21,6 +21,7 @@ #ifndef JSXMLHttpRequestException_h #define JSXMLHttpRequestException_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class XMLHttpRequestException; -class JSXMLHttpRequestException : public DOMObject { - typedef DOMObject Base; +class JSXMLHttpRequestException : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXMLHttpRequestException(PassRefPtr<JSC::Structure>, PassRefPtr<XMLHttpRequestException>); + JSXMLHttpRequestException(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XMLHttpRequestException>); virtual ~JSXMLHttpRequestException(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); XMLHttpRequestException* impl() const { return m_impl.get(); } private: RefPtr<XMLHttpRequestException> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XMLHttpRequestException*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XMLHttpRequestException*); XMLHttpRequestException* toXMLHttpRequestException(JSC::JSValue); class JSXMLHttpRequestExceptionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp index d1a5324075..12c13293dd 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp @@ -62,12 +62,12 @@ static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventConstructorTab { 1, 0, JSXMLHttpRequestProgressEventConstructorTableValues, 0 }; #endif -class JSXMLHttpRequestProgressEventConstructor : public DOMObject { +class JSXMLHttpRequestProgressEventConstructor : public DOMConstructorObject { public: - JSXMLHttpRequestProgressEventConstructor(ExecState* exec) - : DOMObject(JSXMLHttpRequestProgressEventConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSXMLHttpRequestProgressEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXMLHttpRequestProgressEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -117,8 +117,8 @@ static const HashTable* getJSXMLHttpRequestProgressEventTable(ExecState* exec) } const ClassInfo JSXMLHttpRequestProgressEvent::s_info = { "XMLHttpRequestProgressEvent", &JSProgressEvent::s_info, 0, getJSXMLHttpRequestProgressEventTable }; -JSXMLHttpRequestProgressEvent::JSXMLHttpRequestProgressEvent(PassRefPtr<Structure> structure, PassRefPtr<XMLHttpRequestProgressEvent> impl) - : JSProgressEvent(structure, impl) +JSXMLHttpRequestProgressEvent::JSXMLHttpRequestProgressEvent(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequestProgressEvent> impl) + : JSProgressEvent(structure, globalObject, impl) { } @@ -134,25 +134,28 @@ bool JSXMLHttpRequestProgressEvent::getOwnPropertySlot(ExecState* exec, const Id JSValue jsXMLHttpRequestProgressEventPosition(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl()); return jsNumber(exec, imp->position()); } JSValue jsXMLHttpRequestProgressEventTotalSize(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl()); return jsNumber(exec, imp->totalSize()); } JSValue jsXMLHttpRequestProgressEventConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase()))->getConstructor(exec); + JSXMLHttpRequestProgressEvent* domObject = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slot.slotBase())); + return JSXMLHttpRequestProgressEvent::getConstructor(exec, domObject->globalObject()); } -JSValue JSXMLHttpRequestProgressEvent::getConstructor(ExecState* exec) +JSValue JSXMLHttpRequestProgressEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSXMLHttpRequestProgressEventConstructor>(exec); + return getDOMConstructor<JSXMLHttpRequestProgressEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.h b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.h index 45ce6103ff..d1ff5f65b5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.h @@ -30,7 +30,7 @@ class XMLHttpRequestProgressEvent; class JSXMLHttpRequestProgressEvent : public JSProgressEvent { typedef JSProgressEvent Base; public: - JSXMLHttpRequestProgressEvent(PassRefPtr<JSC::Structure>, PassRefPtr<XMLHttpRequestProgressEvent>); + JSXMLHttpRequestProgressEvent(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XMLHttpRequestProgressEvent>); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -41,7 +41,7 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); }; diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp index ad482ce7ac..b72aefa98a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp @@ -71,12 +71,12 @@ static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestUploadConstructorTable = { 1, 0, JSXMLHttpRequestUploadConstructorTableValues, 0 }; #endif -class JSXMLHttpRequestUploadConstructor : public DOMObject { +class JSXMLHttpRequestUploadConstructor : public DOMConstructorObject { public: - JSXMLHttpRequestUploadConstructor(ExecState* exec) - : DOMObject(JSXMLHttpRequestUploadConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSXMLHttpRequestUploadConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXMLHttpRequestUploadConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXMLHttpRequestUploadPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXMLHttpRequestUploadPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -134,8 +134,8 @@ static const HashTable* getJSXMLHttpRequestUploadTable(ExecState* exec) } const ClassInfo JSXMLHttpRequestUpload::s_info = { "XMLHttpRequestUpload", 0, 0, getJSXMLHttpRequestUploadTable }; -JSXMLHttpRequestUpload::JSXMLHttpRequestUpload(PassRefPtr<Structure> structure, PassRefPtr<XMLHttpRequestUpload> impl) - : DOMObject(structure) +JSXMLHttpRequestUpload::JSXMLHttpRequestUpload(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequestUpload> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -157,8 +157,9 @@ bool JSXMLHttpRequestUpload::getOwnPropertySlot(ExecState* exec, const Identifie JSValue jsXMLHttpRequestUploadOnabort(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestUpload* castedThis = static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(castedThis->impl()); if (EventListener* listener = imp->onabort()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -168,8 +169,9 @@ JSValue jsXMLHttpRequestUploadOnabort(ExecState* exec, const Identifier&, const JSValue jsXMLHttpRequestUploadOnerror(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestUpload* castedThis = static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(castedThis->impl()); if (EventListener* listener = imp->onerror()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -179,8 +181,9 @@ JSValue jsXMLHttpRequestUploadOnerror(ExecState* exec, const Identifier&, const JSValue jsXMLHttpRequestUploadOnload(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestUpload* castedThis = static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(castedThis->impl()); if (EventListener* listener = imp->onload()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -190,8 +193,9 @@ JSValue jsXMLHttpRequestUploadOnload(ExecState* exec, const Identifier&, const P JSValue jsXMLHttpRequestUploadOnloadstart(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestUpload* castedThis = static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(castedThis->impl()); if (EventListener* listener = imp->onloadstart()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -201,8 +205,9 @@ JSValue jsXMLHttpRequestUploadOnloadstart(ExecState* exec, const Identifier&, co JSValue jsXMLHttpRequestUploadOnprogress(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXMLHttpRequestUpload* castedThis = static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase()))->impl()); + XMLHttpRequestUpload* imp = static_cast<XMLHttpRequestUpload*>(castedThis->impl()); if (EventListener* listener = imp->onprogress()) { if (JSObject* jsFunction = listener->jsFunction()) return jsFunction; @@ -212,7 +217,8 @@ JSValue jsXMLHttpRequestUploadOnprogress(ExecState* exec, const Identifier&, con JSValue jsXMLHttpRequestUploadConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase()))->getConstructor(exec); + JSXMLHttpRequestUpload* domObject = static_cast<JSXMLHttpRequestUpload*>(asObject(slot.slotBase())); + return JSXMLHttpRequestUpload::getConstructor(exec, domObject->globalObject()); } void JSXMLHttpRequestUpload::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -269,9 +275,9 @@ void setJSXMLHttpRequestUploadOnprogress(ExecState* exec, JSObject* thisObject, imp->setOnprogress(globalObject->createJSAttributeEventListener(value)); } -JSValue JSXMLHttpRequestUpload::getConstructor(ExecState* exec) +JSValue JSXMLHttpRequestUpload::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSXMLHttpRequestUploadConstructor>(exec); + return getDOMConstructor<JSXMLHttpRequestUploadConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsXMLHttpRequestUploadPrototypeFunctionAddEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -308,9 +314,9 @@ JSValue JSC_HOST_CALL jsXMLHttpRequestUploadPrototypeFunctionDispatchEvent(ExecS return result; } -JSC::JSValue toJS(JSC::ExecState* exec, XMLHttpRequestUpload* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XMLHttpRequestUpload* object) { - return getDOMObjectWrapper<JSXMLHttpRequestUpload>(exec, object); + return getDOMObjectWrapper<JSXMLHttpRequestUpload>(exec, globalObject, object); } XMLHttpRequestUpload* toXMLHttpRequestUpload(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.h b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.h index ed0313e875..eca3e0e579 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.h @@ -21,6 +21,7 @@ #ifndef JSXMLHttpRequestUpload_h #define JSXMLHttpRequestUpload_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class XMLHttpRequestUpload; -class JSXMLHttpRequestUpload : public DOMObject { - typedef DOMObject Base; +class JSXMLHttpRequestUpload : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXMLHttpRequestUpload(PassRefPtr<JSC::Structure>, PassRefPtr<XMLHttpRequestUpload>); + JSXMLHttpRequestUpload(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XMLHttpRequestUpload>); virtual ~JSXMLHttpRequestUpload(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -47,7 +48,7 @@ public: virtual void mark(); - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); // Custom functions JSC::JSValue addEventListener(JSC::ExecState*, const JSC::ArgList&); @@ -58,7 +59,7 @@ private: RefPtr<XMLHttpRequestUpload> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XMLHttpRequestUpload*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XMLHttpRequestUpload*); XMLHttpRequestUpload* toXMLHttpRequestUpload(JSC::JSValue); class JSXMLHttpRequestUploadPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp index 8c803b5511..5816fd069f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp @@ -63,12 +63,12 @@ static JSC_CONST_HASHTABLE HashTable JSXMLSerializerConstructorTable = { 1, 0, JSXMLSerializerConstructorTableValues, 0 }; #endif -class JSXMLSerializerConstructor : public DOMObject { +class JSXMLSerializerConstructor : public DOMConstructorObject { public: - JSXMLSerializerConstructor(ExecState* exec) - : DOMObject(JSXMLSerializerConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSXMLSerializerConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXMLSerializerConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXMLSerializerPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXMLSerializerPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -78,13 +78,13 @@ public: { return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); } - static JSObject* construct(ExecState* exec, JSObject*, const ArgList&) + static JSObject* constructXMLSerializer(ExecState* exec, JSObject* constructor, const ArgList&) { - return asObject(toJS(exec, XMLSerializer::create())); + return asObject(toJS(exec, static_cast<JSXMLSerializerConstructor*>(constructor)->globalObject(), XMLSerializer::create())); } virtual ConstructType getConstructData(ConstructData& constructData) { - constructData.native.function = construct; + constructData.native.function = constructXMLSerializer; return ConstructTypeHost; } }; @@ -125,8 +125,8 @@ bool JSXMLSerializerPrototype::getOwnPropertySlot(ExecState* exec, const Identif const ClassInfo JSXMLSerializer::s_info = { "XMLSerializer", 0, &JSXMLSerializerTable, 0 }; -JSXMLSerializer::JSXMLSerializer(PassRefPtr<Structure> structure, PassRefPtr<XMLSerializer> impl) - : DOMObject(structure) +JSXMLSerializer::JSXMLSerializer(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLSerializer> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -148,11 +148,12 @@ bool JSXMLSerializer::getOwnPropertySlot(ExecState* exec, const Identifier& prop JSValue jsXMLSerializerConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXMLSerializer*>(asObject(slot.slotBase()))->getConstructor(exec); + JSXMLSerializer* domObject = static_cast<JSXMLSerializer*>(asObject(slot.slotBase())); + return JSXMLSerializer::getConstructor(exec, domObject->globalObject()); } -JSValue JSXMLSerializer::getConstructor(ExecState* exec) +JSValue JSXMLSerializer::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSXMLSerializerConstructor>(exec); + return getDOMConstructor<JSXMLSerializerConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsXMLSerializerPrototypeFunctionSerializeToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -171,9 +172,9 @@ JSValue JSC_HOST_CALL jsXMLSerializerPrototypeFunctionSerializeToString(ExecStat return result; } -JSC::JSValue toJS(JSC::ExecState* exec, XMLSerializer* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XMLSerializer* object) { - return getDOMObjectWrapper<JSXMLSerializer>(exec, object); + return getDOMObjectWrapper<JSXMLSerializer>(exec, globalObject, object); } XMLSerializer* toXMLSerializer(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.h b/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.h index c9734554e4..9f4fabc3d0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.h @@ -21,6 +21,7 @@ #ifndef JSXMLSerializer_h #define JSXMLSerializer_h +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -29,10 +30,10 @@ namespace WebCore { class XMLSerializer; -class JSXMLSerializer : public DOMObject { - typedef DOMObject Base; +class JSXMLSerializer : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXMLSerializer(PassRefPtr<JSC::Structure>, PassRefPtr<XMLSerializer>); + JSXMLSerializer(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XMLSerializer>); virtual ~JSXMLSerializer(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -44,14 +45,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); XMLSerializer* impl() const { return m_impl.get(); } private: RefPtr<XMLSerializer> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XMLSerializer*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XMLSerializer*); XMLSerializer* toXMLSerializer(JSC::JSValue); class JSXMLSerializerPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp index 7570bc49ad..be242bd677 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp @@ -72,12 +72,12 @@ static JSC_CONST_HASHTABLE HashTable JSXPathEvaluatorConstructorTable = { 1, 0, JSXPathEvaluatorConstructorTableValues, 0 }; #endif -class JSXPathEvaluatorConstructor : public DOMObject { +class JSXPathEvaluatorConstructor : public DOMConstructorObject { public: - JSXPathEvaluatorConstructor(ExecState* exec) - : DOMObject(JSXPathEvaluatorConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSXPathEvaluatorConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXPathEvaluatorConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXPathEvaluatorPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXPathEvaluatorPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -87,13 +87,13 @@ public: { return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); } - static JSObject* construct(ExecState* exec, JSObject*, const ArgList&) + static JSObject* constructXPathEvaluator(ExecState* exec, JSObject* constructor, const ArgList&) { - return asObject(toJS(exec, XPathEvaluator::create())); + return asObject(toJS(exec, static_cast<JSXPathEvaluatorConstructor*>(constructor)->globalObject(), XPathEvaluator::create())); } virtual ConstructType getConstructData(ConstructData& constructData) { - constructData.native.function = construct; + constructData.native.function = constructXPathEvaluator; return ConstructTypeHost; } }; @@ -136,8 +136,8 @@ bool JSXPathEvaluatorPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSXPathEvaluator::s_info = { "XPathEvaluator", 0, &JSXPathEvaluatorTable, 0 }; -JSXPathEvaluator::JSXPathEvaluator(PassRefPtr<Structure> structure, PassRefPtr<XPathEvaluator> impl) - : DOMObject(structure) +JSXPathEvaluator::JSXPathEvaluator(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XPathEvaluator> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -159,11 +159,12 @@ bool JSXPathEvaluator::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsXPathEvaluatorConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXPathEvaluator*>(asObject(slot.slotBase()))->getConstructor(exec); + JSXPathEvaluator* domObject = static_cast<JSXPathEvaluator*>(asObject(slot.slotBase())); + return JSXPathEvaluator::getConstructor(exec, domObject->globalObject()); } -JSValue JSXPathEvaluator::getConstructor(ExecState* exec) +JSValue JSXPathEvaluator::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSXPathEvaluatorConstructor>(exec); + return getDOMConstructor<JSXPathEvaluatorConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsXPathEvaluatorPrototypeFunctionCreateExpression(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -185,7 +186,7 @@ JSValue JSC_HOST_CALL jsXPathEvaluatorPrototypeFunctionCreateExpression(ExecStat } - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createExpression(expression, resolver, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createExpression(expression, resolver, ec))); setDOMException(exec, ec); return result; } @@ -200,7 +201,7 @@ JSValue JSC_HOST_CALL jsXPathEvaluatorPrototypeFunctionCreateNSResolver(ExecStat Node* nodeResolver = toNode(args.at(0)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->createNSResolver(nodeResolver))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createNSResolver(nodeResolver))); return result; } @@ -226,14 +227,14 @@ JSValue JSC_HOST_CALL jsXPathEvaluatorPrototypeFunctionEvaluate(ExecState* exec, XPathResult* inResult = toXPathResult(args.at(4)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->evaluate(expression, contextNode, resolver, type, inResult, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->evaluate(expression, contextNode, resolver, type, inResult, ec))); setDOMException(exec, ec); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, XPathEvaluator* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XPathEvaluator* object) { - return getDOMObjectWrapper<JSXPathEvaluator>(exec, object); + return getDOMObjectWrapper<JSXPathEvaluator>(exec, globalObject, object); } XPathEvaluator* toXPathEvaluator(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.h b/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.h index be11874b32..3a860dcb75 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.h @@ -23,6 +23,7 @@ #if ENABLE(XPATH) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class XPathEvaluator; -class JSXPathEvaluator : public DOMObject { - typedef DOMObject Base; +class JSXPathEvaluator : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXPathEvaluator(PassRefPtr<JSC::Structure>, PassRefPtr<XPathEvaluator>); + JSXPathEvaluator(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XPathEvaluator>); virtual ~JSXPathEvaluator(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); XPathEvaluator* impl() const { return m_impl.get(); } private: RefPtr<XPathEvaluator> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XPathEvaluator*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XPathEvaluator*); XPathEvaluator* toXPathEvaluator(JSC::JSValue); class JSXPathEvaluatorPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp index 8ac6eb3ee6..f4864f9432 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp @@ -71,12 +71,12 @@ static JSC_CONST_HASHTABLE HashTable JSXPathExceptionConstructorTable = { 4, 3, JSXPathExceptionConstructorTableValues, 0 }; #endif -class JSXPathExceptionConstructor : public DOMObject { +class JSXPathExceptionConstructor : public DOMConstructorObject { public: - JSXPathExceptionConstructor(ExecState* exec) - : DOMObject(JSXPathExceptionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSXPathExceptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXPathExceptionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXPathExceptionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXPathExceptionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -126,8 +126,8 @@ bool JSXPathExceptionPrototype::getOwnPropertySlot(ExecState* exec, const Identi const ClassInfo JSXPathException::s_info = { "XPathException", 0, &JSXPathExceptionTable, 0 }; -JSXPathException::JSXPathException(PassRefPtr<Structure> structure, PassRefPtr<XPathException> impl) - : DOMObject(structure) +JSXPathException::JSXPathException(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XPathException> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -149,32 +149,36 @@ bool JSXPathException::getOwnPropertySlot(ExecState* exec, const Identifier& pro JSValue jsXPathExceptionCode(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathException* castedThis = static_cast<JSXPathException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XPathException* imp = static_cast<XPathException*>(static_cast<JSXPathException*>(asObject(slot.slotBase()))->impl()); + XPathException* imp = static_cast<XPathException*>(castedThis->impl()); return jsNumber(exec, imp->code()); } JSValue jsXPathExceptionName(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathException* castedThis = static_cast<JSXPathException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XPathException* imp = static_cast<XPathException*>(static_cast<JSXPathException*>(asObject(slot.slotBase()))->impl()); + XPathException* imp = static_cast<XPathException*>(castedThis->impl()); return jsString(exec, imp->name()); } JSValue jsXPathExceptionMessage(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathException* castedThis = static_cast<JSXPathException*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XPathException* imp = static_cast<XPathException*>(static_cast<JSXPathException*>(asObject(slot.slotBase()))->impl()); + XPathException* imp = static_cast<XPathException*>(castedThis->impl()); return jsString(exec, imp->message()); } JSValue jsXPathExceptionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXPathException*>(asObject(slot.slotBase()))->getConstructor(exec); + JSXPathException* domObject = static_cast<JSXPathException*>(asObject(slot.slotBase())); + return JSXPathException::getConstructor(exec, domObject->globalObject()); } -JSValue JSXPathException::getConstructor(ExecState* exec) +JSValue JSXPathException::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSXPathExceptionConstructor>(exec); + return getDOMConstructor<JSXPathExceptionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsXPathExceptionPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -202,9 +206,9 @@ JSValue jsXPathExceptionTYPE_ERR(ExecState* exec, const Identifier&, const Prope return jsNumber(exec, static_cast<int>(52)); } -JSC::JSValue toJS(JSC::ExecState* exec, XPathException* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XPathException* object) { - return getDOMObjectWrapper<JSXPathException>(exec, object); + return getDOMObjectWrapper<JSXPathException>(exec, globalObject, object); } XPathException* toXPathException(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathException.h b/src/3rdparty/webkit/WebCore/generated/JSXPathException.h index 023e6a25d5..370ef36d5a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathException.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathException.h @@ -23,6 +23,7 @@ #if ENABLE(XPATH) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class XPathException; -class JSXPathException : public DOMObject { - typedef DOMObject Base; +class JSXPathException : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXPathException(PassRefPtr<JSC::Structure>, PassRefPtr<XPathException>); + JSXPathException(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XPathException>); virtual ~JSXPathException(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); XPathException* impl() const { return m_impl.get(); } private: RefPtr<XPathException> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XPathException*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XPathException*); XPathException* toXPathException(JSC::JSValue); class JSXPathExceptionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp index 2bfaae53fe..286b257d3f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp @@ -66,12 +66,12 @@ static JSC_CONST_HASHTABLE HashTable JSXPathExpressionConstructorTable = { 1, 0, JSXPathExpressionConstructorTableValues, 0 }; #endif -class JSXPathExpressionConstructor : public DOMObject { +class JSXPathExpressionConstructor : public DOMConstructorObject { public: - JSXPathExpressionConstructor(ExecState* exec) - : DOMObject(JSXPathExpressionConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSXPathExpressionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXPathExpressionConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXPathExpressionPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXPathExpressionPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -119,8 +119,8 @@ bool JSXPathExpressionPrototype::getOwnPropertySlot(ExecState* exec, const Ident const ClassInfo JSXPathExpression::s_info = { "XPathExpression", 0, &JSXPathExpressionTable, 0 }; -JSXPathExpression::JSXPathExpression(PassRefPtr<Structure> structure, PassRefPtr<XPathExpression> impl) - : DOMObject(structure) +JSXPathExpression::JSXPathExpression(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XPathExpression> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -142,11 +142,12 @@ bool JSXPathExpression::getOwnPropertySlot(ExecState* exec, const Identifier& pr JSValue jsXPathExpressionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXPathExpression*>(asObject(slot.slotBase()))->getConstructor(exec); + JSXPathExpression* domObject = static_cast<JSXPathExpression*>(asObject(slot.slotBase())); + return JSXPathExpression::getConstructor(exec, domObject->globalObject()); } -JSValue JSXPathExpression::getConstructor(ExecState* exec) +JSValue JSXPathExpression::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSXPathExpressionConstructor>(exec); + return getDOMConstructor<JSXPathExpressionConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsXPathExpressionPrototypeFunctionEvaluate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -162,14 +163,14 @@ JSValue JSC_HOST_CALL jsXPathExpressionPrototypeFunctionEvaluate(ExecState* exec XPathResult* inResult = toXPathResult(args.at(2)); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->evaluate(contextNode, type, inResult, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->evaluate(contextNode, type, inResult, ec))); setDOMException(exec, ec); return result; } -JSC::JSValue toJS(JSC::ExecState* exec, XPathExpression* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XPathExpression* object) { - return getDOMObjectWrapper<JSXPathExpression>(exec, object); + return getDOMObjectWrapper<JSXPathExpression>(exec, globalObject, object); } XPathExpression* toXPathExpression(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.h b/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.h index 9102894849..082560c66c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.h @@ -23,6 +23,7 @@ #if ENABLE(XPATH) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class XPathExpression; -class JSXPathExpression : public DOMObject { - typedef DOMObject Base; +class JSXPathExpression : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXPathExpression(PassRefPtr<JSC::Structure>, PassRefPtr<XPathExpression>); + JSXPathExpression(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XPathExpression>); virtual ~JSXPathExpression(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); XPathExpression* impl() const { return m_impl.get(); } private: RefPtr<XPathExpression> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XPathExpression*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XPathExpression*); XPathExpression* toXPathExpression(JSC::JSValue); class JSXPathExpressionPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp index 7136752e08..2943d17186 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp @@ -66,8 +66,8 @@ bool JSXPathNSResolverPrototype::getOwnPropertySlot(ExecState* exec, const Ident const ClassInfo JSXPathNSResolver::s_info = { "XPathNSResolver", 0, 0, 0 }; -JSXPathNSResolver::JSXPathNSResolver(PassRefPtr<Structure> structure, PassRefPtr<XPathNSResolver> impl) - : DOMObject(structure) +JSXPathNSResolver::JSXPathNSResolver(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XPathNSResolver> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -96,9 +96,9 @@ JSValue JSC_HOST_CALL jsXPathNSResolverPrototypeFunctionLookupNamespaceURI(ExecS return result; } -JSC::JSValue toJS(JSC::ExecState* exec, XPathNSResolver* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XPathNSResolver* object) { - return getDOMObjectWrapper<JSXPathNSResolver>(exec, object); + return getDOMObjectWrapper<JSXPathNSResolver>(exec, globalObject, object); } XPathNSResolver* toXPathNSResolver(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.h b/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.h index e829c711dc..f0bb95bc21 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.h @@ -23,6 +23,7 @@ #if ENABLE(XPATH) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class XPathNSResolver; -class JSXPathNSResolver : public DOMObject { - typedef DOMObject Base; +class JSXPathNSResolver : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXPathNSResolver(PassRefPtr<JSC::Structure>, PassRefPtr<XPathNSResolver>); + JSXPathNSResolver(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XPathNSResolver>); virtual ~JSXPathNSResolver(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } @@ -46,7 +47,7 @@ private: RefPtr<XPathNSResolver> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XPathNSResolver*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XPathNSResolver*); XPathNSResolver* toXPathNSResolver(JSC::JSValue); class JSXPathNSResolverPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp index 118325b25b..c969067f6b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp @@ -85,12 +85,12 @@ static JSC_CONST_HASHTABLE HashTable JSXPathResultConstructorTable = { 33, 31, JSXPathResultConstructorTableValues, 0 }; #endif -class JSXPathResultConstructor : public DOMObject { +class JSXPathResultConstructor : public DOMConstructorObject { public: - JSXPathResultConstructor(ExecState* exec) - : DOMObject(JSXPathResultConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + JSXPathResultConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSXPathResultConstructor::createStructure(globalObject->objectPrototype()), globalObject) { - putDirect(exec->propertyNames().prototype, JSXPathResultPrototype::self(exec, exec->lexicalGlobalObject()), None); + putDirect(exec->propertyNames().prototype, JSXPathResultPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } @@ -149,8 +149,8 @@ bool JSXPathResultPrototype::getOwnPropertySlot(ExecState* exec, const Identifie const ClassInfo JSXPathResult::s_info = { "XPathResult", 0, &JSXPathResultTable, 0 }; -JSXPathResult::JSXPathResult(PassRefPtr<Structure> structure, PassRefPtr<XPathResult> impl) - : DOMObject(structure) +JSXPathResult::JSXPathResult(PassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<XPathResult> impl) + : DOMObjectWithGlobalPointer(structure, globalObject) , m_impl(impl) { } @@ -172,15 +172,17 @@ bool JSXPathResult::getOwnPropertySlot(ExecState* exec, const Identifier& proper JSValue jsXPathResultResultType(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XPathResult* imp = static_cast<XPathResult*>(static_cast<JSXPathResult*>(asObject(slot.slotBase()))->impl()); + XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); return jsNumber(exec, imp->resultType()); } JSValue jsXPathResultNumberValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - XPathResult* imp = static_cast<XPathResult*>(static_cast<JSXPathResult*>(asObject(slot.slotBase()))->impl()); + XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); JSC::JSValue result = jsNumber(exec, imp->numberValue(ec)); setDOMException(exec, ec); return result; @@ -188,8 +190,9 @@ JSValue jsXPathResultNumberValue(ExecState* exec, const Identifier&, const Prope JSValue jsXPathResultStringValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - XPathResult* imp = static_cast<XPathResult*>(static_cast<JSXPathResult*>(asObject(slot.slotBase()))->impl()); + XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); JSC::JSValue result = jsString(exec, imp->stringValue(ec)); setDOMException(exec, ec); return result; @@ -197,8 +200,9 @@ JSValue jsXPathResultStringValue(ExecState* exec, const Identifier&, const Prope JSValue jsXPathResultBooleanValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - XPathResult* imp = static_cast<XPathResult*>(static_cast<JSXPathResult*>(asObject(slot.slotBase()))->impl()); + XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); JSC::JSValue result = jsBoolean(imp->booleanValue(ec)); setDOMException(exec, ec); return result; @@ -206,24 +210,27 @@ JSValue jsXPathResultBooleanValue(ExecState* exec, const Identifier&, const Prop JSValue jsXPathResultSingleNodeValue(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - XPathResult* imp = static_cast<XPathResult*>(static_cast<JSXPathResult*>(asObject(slot.slotBase()))->impl()); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->singleNodeValue(ec))); + XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); + JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->singleNodeValue(ec))); setDOMException(exec, ec); return result; } JSValue jsXPathResultInvalidIteratorState(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(slot.slotBase())); UNUSED_PARAM(exec); - XPathResult* imp = static_cast<XPathResult*>(static_cast<JSXPathResult*>(asObject(slot.slotBase()))->impl()); + XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); return jsBoolean(imp->invalidIteratorState()); } JSValue jsXPathResultSnapshotLength(ExecState* exec, const Identifier&, const PropertySlot& slot) { + JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(slot.slotBase())); ExceptionCode ec = 0; - XPathResult* imp = static_cast<XPathResult*>(static_cast<JSXPathResult*>(asObject(slot.slotBase()))->impl()); + XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); JSC::JSValue result = jsNumber(exec, imp->snapshotLength(ec)); setDOMException(exec, ec); return result; @@ -231,11 +238,12 @@ JSValue jsXPathResultSnapshotLength(ExecState* exec, const Identifier&, const Pr JSValue jsXPathResultConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { - return static_cast<JSXPathResult*>(asObject(slot.slotBase()))->getConstructor(exec); + JSXPathResult* domObject = static_cast<JSXPathResult*>(asObject(slot.slotBase())); + return JSXPathResult::getConstructor(exec, domObject->globalObject()); } -JSValue JSXPathResult::getConstructor(ExecState* exec) +JSValue JSXPathResult::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { - return getDOMConstructor<JSXPathResultConstructor>(exec); + return getDOMConstructor<JSXPathResultConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); } JSValue JSC_HOST_CALL jsXPathResultPrototypeFunctionIterateNext(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -248,7 +256,7 @@ JSValue JSC_HOST_CALL jsXPathResultPrototypeFunctionIterateNext(ExecState* exec, ExceptionCode ec = 0; - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->iterateNext(ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->iterateNext(ec))); setDOMException(exec, ec); return result; } @@ -264,7 +272,7 @@ JSValue JSC_HOST_CALL jsXPathResultPrototypeFunctionSnapshotItem(ExecState* exec unsigned index = args.at(0).toInt32(exec); - JSC::JSValue result = toJS(exec, WTF::getPtr(imp->snapshotItem(index, ec))); + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->snapshotItem(index, ec))); setDOMException(exec, ec); return result; } @@ -321,9 +329,9 @@ JSValue jsXPathResultFIRST_ORDERED_NODE_TYPE(ExecState* exec, const Identifier&, return jsNumber(exec, static_cast<int>(9)); } -JSC::JSValue toJS(JSC::ExecState* exec, XPathResult* object) +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, XPathResult* object) { - return getDOMObjectWrapper<JSXPathResult>(exec, object); + return getDOMObjectWrapper<JSXPathResult>(exec, globalObject, object); } XPathResult* toXPathResult(JSC::JSValue value) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathResult.h b/src/3rdparty/webkit/WebCore/generated/JSXPathResult.h index 0f07f80d3e..c63c32ff6e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathResult.h +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathResult.h @@ -23,6 +23,7 @@ #if ENABLE(XPATH) +#include "DOMObjectWithSVGContext.h" #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> @@ -31,10 +32,10 @@ namespace WebCore { class XPathResult; -class JSXPathResult : public DOMObject { - typedef DOMObject Base; +class JSXPathResult : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; public: - JSXPathResult(PassRefPtr<JSC::Structure>, PassRefPtr<XPathResult>); + JSXPathResult(PassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<XPathResult>); virtual ~JSXPathResult(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); @@ -46,14 +47,14 @@ public: return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } - static JSC::JSValue getConstructor(JSC::ExecState*); + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); XPathResult* impl() const { return m_impl.get(); } private: RefPtr<XPathResult> m_impl; }; -JSC::JSValue toJS(JSC::ExecState*, XPathResult*); +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, XPathResult*); XPathResult* toXPathResult(JSC::JSValue); class JSXPathResultPrototype : public JSC::JSObject { diff --git a/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h b/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h index 1ccfa4aa0f..dfc9f6d5d7 100644 --- a/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h +++ b/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h @@ -1,5 +1,5 @@ namespace WebCore { -extern const char htmlUserAgentStyleSheet[8502]; +extern const char htmlUserAgentStyleSheet[8548]; extern const char quirksUserAgentStyleSheet[359]; extern const char svgUserAgentStyleSheet[358]; extern const char sourceUserAgentStyleSheet[2004]; diff --git a/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp b/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp index a6915e6c1b..53f1f842d1 100644 --- a/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp +++ b/src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp @@ -1,5 +1,5 @@ namespace WebCore { -extern const char htmlUserAgentStyleSheet[8502] = { +extern const char htmlUserAgentStyleSheet[8548] = { 110, 97, 109, 101, 115, 112, 97, 99, 101, 32, 34, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 119, 51, 46, 111, 114, 103, 47, 49, 57, 57, 57, 47, 120, 104, 116, 109, 108, 34, 59, 32, 104, 116, 109, 108, 32, 123, @@ -256,282 +256,285 @@ extern const char htmlUserAgentStyleSheet[8502] = { 120, 45, 111, 114, 105, 101, 110, 116, 58, 32, 118, 101, 114, 116, 105, 99, 97, 108, 59, 32, 114, 101, 115, 105, 122, 101, 58, 32, 97, 117, 116, 111, 59, 32, 99, 117, 114, 115, 111, 114, 58, 32, 97, 117, 116, 111, 59, 32, - 112, 97, 100, 100, 105, 110, 103, 58, 32, 50, 112, 120, 59, 32, 125, 32, - 105, 110, 112, 117, 116, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 105, - 110, 112, 117, 116, 45, 112, 108, 97, 99, 101, 104, 111, 108, 100, 101, 114, - 44, 32, 105, 115, 105, 110, 100, 101, 120, 58, 58, 45, 119, 101, 98, 107, - 105, 116, 45, 105, 110, 112, 117, 116, 45, 112, 108, 97, 99, 101, 104, 111, - 108, 100, 101, 114, 32, 123, 32, 99, 111, 108, 111, 114, 58, 32, 100, 97, - 114, 107, 71, 114, 97, 121, 59, 32, 125, 32, 105, 110, 112, 117, 116, 91, - 116, 121, 112, 101, 61, 34, 112, 97, 115, 115, 119, 111, 114, 100, 34, 93, - 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 116, 101, 120, 116, 45, - 115, 101, 99, 117, 114, 105, 116, 121, 58, 32, 100, 105, 115, 99, 32, 33, - 105, 109, 112, 111, 114, 116, 97, 110, 116, 59, 32, 125, 32, 105, 110, 112, - 117, 116, 91, 116, 121, 112, 101, 61, 34, 104, 105, 100, 100, 101, 110, 34, - 93, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 105, - 109, 97, 103, 101, 34, 93, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, + 112, 97, 100, 100, 105, 110, 103, 58, 32, 50, 112, 120, 59, 32, 119, 104, + 105, 116, 101, 45, 115, 112, 97, 99, 101, 58, 32, 112, 114, 101, 45, 119, + 114, 97, 112, 59, 32, 119, 111, 114, 100, 45, 119, 114, 97, 112, 58, 32, + 98, 114, 101, 97, 107, 45, 119, 111, 114, 100, 59, 32, 125, 32, 105, 110, + 112, 117, 116, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 105, 110, 112, + 117, 116, 45, 112, 108, 97, 99, 101, 104, 111, 108, 100, 101, 114, 44, 32, + 105, 115, 105, 110, 100, 101, 120, 58, 58, 45, 119, 101, 98, 107, 105, 116, + 45, 105, 110, 112, 117, 116, 45, 112, 108, 97, 99, 101, 104, 111, 108, 100, + 101, 114, 32, 123, 32, 99, 111, 108, 111, 114, 58, 32, 100, 97, 114, 107, + 71, 114, 97, 121, 59, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, + 112, 101, 61, 34, 112, 97, 115, 115, 119, 111, 114, 100, 34, 93, 32, 123, + 32, 45, 119, 101, 98, 107, 105, 116, 45, 116, 101, 120, 116, 45, 115, 101, + 99, 117, 114, 105, 116, 121, 58, 32, 100, 105, 115, 99, 32, 33, 105, 109, + 112, 111, 114, 116, 97, 110, 116, 59, 32, 125, 32, 105, 110, 112, 117, 116, + 91, 116, 121, 112, 101, 61, 34, 104, 105, 100, 100, 101, 110, 34, 93, 44, + 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 105, 109, 97, + 103, 101, 34, 93, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, + 61, 34, 102, 105, 108, 101, 34, 93, 32, 123, 32, 45, 119, 101, 98, 107, + 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 105, + 110, 105, 116, 105, 97, 108, 59, 32, 112, 97, 100, 100, 105, 110, 103, 58, + 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 98, 97, 99, 107, 103, 114, + 111, 117, 110, 100, 45, 99, 111, 108, 111, 114, 58, 32, 105, 110, 105, 116, + 105, 97, 108, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 105, 110, 105, + 116, 105, 97, 108, 59, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, 32, 123, 32, 45, 119, 101, - 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, - 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 112, 97, 100, 100, 105, 110, + 98, 107, 105, 116, 45, 98, 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, + 98, 97, 115, 101, 108, 105, 110, 101, 59, 32, 116, 101, 120, 116, 45, 97, + 108, 105, 103, 110, 58, 32, 115, 116, 97, 114, 116, 32, 33, 105, 109, 112, + 111, 114, 116, 97, 110, 116, 59, 32, 125, 32, 105, 110, 112, 117, 116, 58, + 45, 119, 101, 98, 107, 105, 116, 45, 97, 117, 116, 111, 102, 105, 108, 108, + 32, 123, 32, 98, 97, 99, 107, 103, 114, 111, 117, 110, 100, 45, 99, 111, + 108, 111, 114, 58, 32, 98, 97, 99, 107, 103, 114, 111, 117, 110, 100, 45, + 105, 109, 97, 103, 101, 58, 110, 111, 110, 101, 32, 33, 105, 109, 112, 111, + 114, 116, 97, 110, 116, 59, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, + 121, 112, 101, 61, 34, 114, 97, 100, 105, 111, 34, 93, 44, 32, 105, 110, + 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 99, 104, 101, 99, 107, 98, + 111, 120, 34, 93, 32, 123, 32, 109, 97, 114, 103, 105, 110, 58, 32, 51, + 112, 120, 32, 48, 46, 53, 101, 120, 59, 32, 112, 97, 100, 100, 105, 110, 103, 58, 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 98, 97, 99, 107, 103, 114, 111, 117, 110, 100, 45, 99, 111, 108, 111, 114, 58, 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 125, 32, 105, 110, 112, 117, 116, 91, - 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, 32, 123, 32, 45, - 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 45, 97, 108, 105, 103, 110, - 58, 32, 98, 97, 115, 101, 108, 105, 110, 101, 59, 32, 116, 101, 120, 116, - 45, 97, 108, 105, 103, 110, 58, 32, 115, 116, 97, 114, 116, 32, 33, 105, - 109, 112, 111, 114, 116, 97, 110, 116, 59, 32, 125, 32, 105, 110, 112, 117, - 116, 58, 45, 119, 101, 98, 107, 105, 116, 45, 97, 117, 116, 111, 102, 105, - 108, 108, 32, 123, 32, 98, 97, 99, 107, 103, 114, 111, 117, 110, 100, 45, - 99, 111, 108, 111, 114, 58, 32, 98, 97, 99, 107, 103, 114, 111, 117, 110, - 100, 45, 105, 109, 97, 103, 101, 58, 110, 111, 110, 101, 32, 33, 105, 109, - 112, 111, 114, 116, 97, 110, 116, 59, 32, 125, 32, 105, 110, 112, 117, 116, - 91, 116, 121, 112, 101, 61, 34, 114, 97, 100, 105, 111, 34, 93, 44, 32, - 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 99, 104, 101, 99, - 107, 98, 111, 120, 34, 93, 32, 123, 32, 109, 97, 114, 103, 105, 110, 58, - 32, 51, 112, 120, 32, 48, 46, 53, 101, 120, 59, 32, 112, 97, 100, 100, - 105, 110, 103, 58, 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 98, 97, - 99, 107, 103, 114, 111, 117, 110, 100, 45, 99, 111, 108, 111, 114, 58, 32, - 105, 110, 105, 116, 105, 97, 108, 59, 32, 98, 111, 114, 100, 101, 114, 58, - 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 125, 32, 105, 110, 112, 117, - 116, 91, 116, 121, 112, 101, 61, 34, 98, 117, 116, 116, 111, 110, 34, 93, - 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 115, 117, - 98, 109, 105, 116, 34, 93, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, - 112, 101, 61, 34, 114, 101, 115, 101, 116, 34, 93, 44, 32, 105, 110, 112, - 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, 58, - 58, 45, 119, 101, 98, 107, 105, 116, 45, 102, 105, 108, 101, 45, 117, 112, - 108, 111, 97, 100, 45, 98, 117, 116, 116, 111, 110, 32, 123, 32, 45, 119, - 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, - 58, 32, 112, 117, 115, 104, 45, 98, 117, 116, 116, 111, 110, 59, 32, 119, - 104, 105, 116, 101, 45, 115, 112, 97, 99, 101, 58, 32, 112, 114, 101, 32, - 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 98, 117, - 116, 116, 111, 110, 34, 93, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, - 112, 101, 61, 34, 115, 117, 98, 109, 105, 116, 34, 93, 44, 32, 105, 110, - 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 101, 115, 101, 116, 34, - 93, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, - 105, 108, 101, 34, 93, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 102, - 105, 108, 101, 45, 117, 112, 108, 111, 97, 100, 45, 98, 117, 116, 116, 111, - 110, 44, 32, 98, 117, 116, 116, 111, 110, 32, 123, 32, 45, 119, 101, 98, - 107, 105, 116, 45, 98, 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, 99, - 101, 110, 116, 101, 114, 59, 32, 116, 101, 120, 116, 45, 97, 108, 105, 103, - 110, 58, 32, 99, 101, 110, 116, 101, 114, 59, 32, 99, 117, 114, 115, 111, - 114, 58, 32, 100, 101, 102, 97, 117, 108, 116, 59, 32, 99, 111, 108, 111, - 114, 58, 32, 66, 117, 116, 116, 111, 110, 84, 101, 120, 116, 59, 32, 112, - 97, 100, 100, 105, 110, 103, 58, 32, 50, 112, 120, 32, 54, 112, 120, 32, - 51, 112, 120, 32, 54, 112, 120, 59, 32, 98, 111, 114, 100, 101, 114, 58, - 32, 50, 112, 120, 32, 111, 117, 116, 115, 101, 116, 32, 66, 117, 116, 116, - 111, 110, 70, 97, 99, 101, 59, 32, 98, 97, 99, 107, 103, 114, 111, 117, - 110, 100, 45, 99, 111, 108, 111, 114, 58, 32, 66, 117, 116, 116, 111, 110, - 70, 97, 99, 101, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, - 120, 45, 115, 105, 122, 105, 110, 103, 58, 32, 98, 111, 114, 100, 101, 114, - 45, 98, 111, 120, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, - 101, 61, 34, 114, 97, 110, 103, 101, 34, 93, 32, 123, 32, 45, 119, 101, - 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, - 32, 115, 108, 105, 100, 101, 114, 45, 104, 111, 114, 105, 122, 111, 110, 116, - 97, 108, 59, 32, 112, 97, 100, 100, 105, 110, 103, 58, 32, 105, 110, 105, - 116, 105, 97, 108, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 105, 110, - 105, 116, 105, 97, 108, 59, 32, 109, 97, 114, 103, 105, 110, 58, 32, 50, - 112, 120, 59, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, - 61, 34, 114, 97, 110, 103, 101, 34, 93, 58, 58, 45, 119, 101, 98, 107, - 105, 116, 45, 115, 108, 105, 100, 101, 114, 45, 116, 104, 117, 109, 98, 32, - 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, - 97, 110, 99, 101, 58, 32, 115, 108, 105, 100, 101, 114, 116, 104, 117, 109, - 98, 45, 104, 111, 114, 105, 122, 111, 110, 116, 97, 108, 59, 32, 125, 32, + 116, 121, 112, 101, 61, 34, 98, 117, 116, 116, 111, 110, 34, 93, 44, 32, + 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 115, 117, 98, 109, + 105, 116, 34, 93, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, + 61, 34, 114, 101, 115, 101, 116, 34, 93, 44, 32, 105, 110, 112, 117, 116, + 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, 58, 58, 45, + 119, 101, 98, 107, 105, 116, 45, 102, 105, 108, 101, 45, 117, 112, 108, 111, + 97, 100, 45, 98, 117, 116, 116, 111, 110, 32, 123, 32, 45, 119, 101, 98, + 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, + 112, 117, 115, 104, 45, 98, 117, 116, 116, 111, 110, 59, 32, 119, 104, 105, + 116, 101, 45, 115, 112, 97, 99, 101, 58, 32, 112, 114, 101, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 98, 117, 116, 116, - 111, 110, 34, 93, 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 105, - 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 115, 117, 98, 109, 105, - 116, 34, 93, 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 105, 110, - 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 101, 115, 101, 116, 34, + 111, 110, 34, 93, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, + 61, 34, 115, 117, 98, 109, 105, 116, 34, 93, 44, 32, 105, 110, 112, 117, + 116, 91, 116, 121, 112, 101, 61, 34, 114, 101, 115, 101, 116, 34, 93, 44, + 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, + 101, 34, 93, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 102, 105, 108, + 101, 45, 117, 112, 108, 111, 97, 100, 45, 98, 117, 116, 116, 111, 110, 44, + 32, 98, 117, 116, 116, 111, 110, 32, 123, 32, 45, 119, 101, 98, 107, 105, + 116, 45, 98, 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, 99, 101, 110, + 116, 101, 114, 59, 32, 116, 101, 120, 116, 45, 97, 108, 105, 103, 110, 58, + 32, 99, 101, 110, 116, 101, 114, 59, 32, 99, 117, 114, 115, 111, 114, 58, + 32, 100, 101, 102, 97, 117, 108, 116, 59, 32, 99, 111, 108, 111, 114, 58, + 32, 66, 117, 116, 116, 111, 110, 84, 101, 120, 116, 59, 32, 112, 97, 100, + 100, 105, 110, 103, 58, 32, 50, 112, 120, 32, 54, 112, 120, 32, 51, 112, + 120, 32, 54, 112, 120, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 50, + 112, 120, 32, 111, 117, 116, 115, 101, 116, 32, 66, 117, 116, 116, 111, 110, + 70, 97, 99, 101, 59, 32, 98, 97, 99, 107, 103, 114, 111, 117, 110, 100, + 45, 99, 111, 108, 111, 114, 58, 32, 66, 117, 116, 116, 111, 110, 70, 97, + 99, 101, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 45, + 115, 105, 122, 105, 110, 103, 58, 32, 98, 111, 114, 100, 101, 114, 45, 98, + 111, 120, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, + 34, 114, 97, 110, 103, 101, 34, 93, 32, 123, 32, 45, 119, 101, 98, 107, + 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 115, + 108, 105, 100, 101, 114, 45, 104, 111, 114, 105, 122, 111, 110, 116, 97, 108, + 59, 32, 112, 97, 100, 100, 105, 110, 103, 58, 32, 105, 110, 105, 116, 105, + 97, 108, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 105, 110, 105, 116, + 105, 97, 108, 59, 32, 109, 97, 114, 103, 105, 110, 58, 32, 50, 112, 120, + 59, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, + 114, 97, 110, 103, 101, 34, 93, 58, 58, 45, 119, 101, 98, 107, 105, 116, + 45, 115, 108, 105, 100, 101, 114, 45, 116, 104, 117, 109, 98, 32, 123, 32, + 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, + 99, 101, 58, 32, 115, 108, 105, 100, 101, 114, 116, 104, 117, 109, 98, 45, + 104, 111, 114, 105, 122, 111, 110, 116, 97, 108, 59, 32, 125, 32, 105, 110, + 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 98, 117, 116, 116, 111, 110, + 34, 93, 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 105, 110, 112, + 117, 116, 91, 116, 121, 112, 101, 61, 34, 115, 117, 98, 109, 105, 116, 34, 93, 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 105, 110, 112, 117, - 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, 58, 100, - 105, 115, 97, 98, 108, 101, 100, 58, 58, 45, 119, 101, 98, 107, 105, 116, - 45, 102, 105, 108, 101, 45, 117, 112, 108, 111, 97, 100, 45, 98, 117, 116, - 116, 111, 110, 44, 32, 98, 117, 116, 116, 111, 110, 58, 100, 105, 115, 97, - 98, 108, 101, 100, 44, 32, 115, 101, 108, 101, 99, 116, 58, 100, 105, 115, - 97, 98, 108, 101, 100, 44, 32, 107, 101, 121, 103, 101, 110, 58, 100, 105, - 115, 97, 98, 108, 101, 100, 44, 32, 111, 112, 116, 103, 114, 111, 117, 112, - 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 111, 112, 116, 105, 111, - 110, 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 100, 97, 116, 97, - 103, 114, 105, 100, 58, 100, 105, 115, 97, 98, 108, 101, 100, 32, 123, 32, - 99, 111, 108, 111, 114, 58, 32, 71, 114, 97, 121, 84, 101, 120, 116, 32, - 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 98, 117, - 116, 116, 111, 110, 34, 93, 58, 97, 99, 116, 105, 118, 101, 44, 32, 105, - 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 115, 117, 98, 109, 105, - 116, 34, 93, 58, 97, 99, 116, 105, 118, 101, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 101, 115, 101, 116, 34, 93, 58, - 97, 99, 116, 105, 118, 101, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, - 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, 58, 97, 99, 116, 105, 118, - 101, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 102, 105, 108, 101, 45, - 117, 112, 108, 111, 97, 100, 45, 98, 117, 116, 116, 111, 110, 44, 32, 98, - 117, 116, 116, 111, 110, 58, 97, 99, 116, 105, 118, 101, 32, 123, 32, 98, - 111, 114, 100, 101, 114, 45, 115, 116, 121, 108, 101, 58, 32, 105, 110, 115, - 101, 116, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, - 34, 98, 117, 116, 116, 111, 110, 34, 93, 58, 97, 99, 116, 105, 118, 101, - 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 105, 110, 112, 117, 116, - 91, 116, 121, 112, 101, 61, 34, 115, 117, 98, 109, 105, 116, 34, 93, 58, - 97, 99, 116, 105, 118, 101, 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, - 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 101, 115, - 101, 116, 34, 93, 58, 97, 99, 116, 105, 118, 101, 58, 100, 105, 115, 97, - 98, 108, 101, 100, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, + 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 105, 110, 112, 117, 116, 91, + 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, 58, 100, 105, 115, + 97, 98, 108, 101, 100, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, 102, + 105, 108, 101, 45, 117, 112, 108, 111, 97, 100, 45, 98, 117, 116, 116, 111, + 110, 44, 32, 98, 117, 116, 116, 111, 110, 58, 100, 105, 115, 97, 98, 108, + 101, 100, 44, 32, 115, 101, 108, 101, 99, 116, 58, 100, 105, 115, 97, 98, + 108, 101, 100, 44, 32, 107, 101, 121, 103, 101, 110, 58, 100, 105, 115, 97, + 98, 108, 101, 100, 44, 32, 111, 112, 116, 103, 114, 111, 117, 112, 58, 100, + 105, 115, 97, 98, 108, 101, 100, 44, 32, 111, 112, 116, 105, 111, 110, 58, + 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 100, 97, 116, 97, 103, 114, + 105, 100, 58, 100, 105, 115, 97, 98, 108, 101, 100, 32, 123, 32, 99, 111, + 108, 111, 114, 58, 32, 71, 114, 97, 121, 84, 101, 120, 116, 32, 125, 32, + 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 98, 117, 116, 116, + 111, 110, 34, 93, 58, 97, 99, 116, 105, 118, 101, 44, 32, 105, 110, 112, + 117, 116, 91, 116, 121, 112, 101, 61, 34, 115, 117, 98, 109, 105, 116, 34, + 93, 58, 97, 99, 116, 105, 118, 101, 44, 32, 105, 110, 112, 117, 116, 91, + 116, 121, 112, 101, 61, 34, 114, 101, 115, 101, 116, 34, 93, 58, 97, 99, + 116, 105, 118, 101, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, 58, 97, 99, 116, 105, 118, 101, 58, - 100, 105, 115, 97, 98, 108, 101, 100, 58, 58, 45, 119, 101, 98, 107, 105, - 116, 45, 102, 105, 108, 101, 45, 117, 112, 108, 111, 97, 100, 45, 98, 117, - 116, 116, 111, 110, 44, 32, 98, 117, 116, 116, 111, 110, 58, 97, 99, 116, - 105, 118, 101, 58, 100, 105, 115, 97, 98, 108, 101, 100, 32, 123, 32, 98, - 111, 114, 100, 101, 114, 45, 115, 116, 121, 108, 101, 58, 32, 111, 117, 116, - 115, 101, 116, 32, 125, 32, 97, 114, 101, 97, 44, 32, 112, 97, 114, 97, - 109, 32, 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 110, 111, 110, - 101, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, - 99, 104, 101, 99, 107, 98, 111, 120, 34, 93, 32, 123, 32, 45, 119, 101, - 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, - 32, 99, 104, 101, 99, 107, 98, 111, 120, 59, 32, 45, 119, 101, 98, 107, - 105, 116, 45, 98, 111, 120, 45, 115, 105, 122, 105, 110, 103, 58, 32, 98, - 111, 114, 100, 101, 114, 45, 98, 111, 120, 59, 32, 125, 32, 105, 110, 112, - 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 97, 100, 105, 111, 34, 93, - 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, - 114, 97, 110, 99, 101, 58, 32, 114, 97, 100, 105, 111, 59, 32, 45, 119, - 101, 98, 107, 105, 116, 45, 98, 111, 120, 45, 115, 105, 122, 105, 110, 103, - 58, 32, 98, 111, 114, 100, 101, 114, 45, 98, 111, 120, 59, 32, 125, 32, - 107, 101, 121, 103, 101, 110, 44, 32, 115, 101, 108, 101, 99, 116, 32, 123, + 58, 45, 119, 101, 98, 107, 105, 116, 45, 102, 105, 108, 101, 45, 117, 112, + 108, 111, 97, 100, 45, 98, 117, 116, 116, 111, 110, 44, 32, 98, 117, 116, + 116, 111, 110, 58, 97, 99, 116, 105, 118, 101, 32, 123, 32, 98, 111, 114, + 100, 101, 114, 45, 115, 116, 121, 108, 101, 58, 32, 105, 110, 115, 101, 116, + 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 98, + 117, 116, 116, 111, 110, 34, 93, 58, 97, 99, 116, 105, 118, 101, 58, 100, + 105, 115, 97, 98, 108, 101, 100, 44, 32, 105, 110, 112, 117, 116, 91, 116, + 121, 112, 101, 61, 34, 115, 117, 98, 109, 105, 116, 34, 93, 58, 97, 99, + 116, 105, 118, 101, 58, 100, 105, 115, 97, 98, 108, 101, 100, 44, 32, 105, + 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 101, 115, 101, 116, + 34, 93, 58, 97, 99, 116, 105, 118, 101, 58, 100, 105, 115, 97, 98, 108, + 101, 100, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, + 102, 105, 108, 101, 34, 93, 58, 97, 99, 116, 105, 118, 101, 58, 100, 105, + 115, 97, 98, 108, 101, 100, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, + 102, 105, 108, 101, 45, 117, 112, 108, 111, 97, 100, 45, 98, 117, 116, 116, + 111, 110, 44, 32, 98, 117, 116, 116, 111, 110, 58, 97, 99, 116, 105, 118, + 101, 58, 100, 105, 115, 97, 98, 108, 101, 100, 32, 123, 32, 98, 111, 114, + 100, 101, 114, 45, 115, 116, 121, 108, 101, 58, 32, 111, 117, 116, 115, 101, + 116, 32, 125, 32, 97, 114, 101, 97, 44, 32, 112, 97, 114, 97, 109, 32, + 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 110, 111, 110, 101, 32, + 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 99, 104, + 101, 99, 107, 98, 111, 120, 34, 93, 32, 123, 32, 45, 119, 101, 98, 107, + 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 99, + 104, 101, 99, 107, 98, 111, 120, 59, 32, 45, 119, 101, 98, 107, 105, 116, + 45, 98, 111, 120, 45, 115, 105, 122, 105, 110, 103, 58, 32, 98, 111, 114, + 100, 101, 114, 45, 98, 111, 120, 59, 32, 125, 32, 105, 110, 112, 117, 116, + 91, 116, 121, 112, 101, 61, 34, 114, 97, 100, 105, 111, 34, 93, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, - 110, 99, 101, 58, 32, 109, 101, 110, 117, 108, 105, 115, 116, 59, 32, 45, - 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 45, 115, 105, 122, 105, 110, - 103, 58, 32, 98, 111, 114, 100, 101, 114, 45, 98, 111, 120, 59, 32, 45, - 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 45, 97, 108, 105, 103, 110, - 58, 32, 99, 101, 110, 116, 101, 114, 59, 32, 98, 111, 114, 100, 101, 114, - 58, 32, 49, 112, 120, 32, 115, 111, 108, 105, 100, 59, 32, 45, 119, 101, - 98, 107, 105, 116, 45, 98, 111, 114, 100, 101, 114, 45, 114, 97, 100, 105, - 117, 115, 58, 32, 53, 112, 120, 59, 32, 119, 104, 105, 116, 101, 45, 115, - 112, 97, 99, 101, 58, 32, 112, 114, 101, 59, 32, 45, 119, 101, 98, 107, - 105, 116, 45, 114, 116, 108, 45, 111, 114, 100, 101, 114, 105, 110, 103, 58, - 32, 108, 111, 103, 105, 99, 97, 108, 59, 32, 99, 111, 108, 111, 114, 58, - 32, 98, 108, 97, 99, 107, 59, 32, 98, 97, 99, 107, 103, 114, 111, 117, - 110, 100, 45, 99, 111, 108, 111, 114, 58, 32, 119, 104, 105, 116, 101, 59, - 32, 99, 117, 114, 115, 111, 114, 58, 32, 100, 101, 102, 97, 117, 108, 116, - 59, 32, 125, 32, 115, 101, 108, 101, 99, 116, 91, 115, 105, 122, 101, 93, - 44, 32, 115, 101, 108, 101, 99, 116, 91, 109, 117, 108, 116, 105, 112, 108, - 101, 93, 44, 32, 115, 101, 108, 101, 99, 116, 91, 115, 105, 122, 101, 93, - 91, 109, 117, 108, 116, 105, 112, 108, 101, 93, 32, 123, 32, 45, 119, 101, - 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, - 32, 108, 105, 115, 116, 98, 111, 120, 59, 32, 45, 119, 101, 98, 107, 105, - 116, 45, 98, 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, 115, 116, 97, - 114, 116, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 49, 112, 120, 32, - 105, 110, 115, 101, 116, 32, 103, 114, 97, 121, 59, 32, 45, 119, 101, 98, - 107, 105, 116, 45, 98, 111, 114, 100, 101, 114, 45, 114, 97, 100, 105, 117, - 115, 58, 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 119, 104, 105, 116, + 110, 99, 101, 58, 32, 114, 97, 100, 105, 111, 59, 32, 45, 119, 101, 98, + 107, 105, 116, 45, 98, 111, 120, 45, 115, 105, 122, 105, 110, 103, 58, 32, + 98, 111, 114, 100, 101, 114, 45, 98, 111, 120, 59, 32, 125, 32, 107, 101, + 121, 103, 101, 110, 44, 32, 115, 101, 108, 101, 99, 116, 32, 123, 32, 45, + 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, + 101, 58, 32, 109, 101, 110, 117, 108, 105, 115, 116, 59, 32, 45, 119, 101, + 98, 107, 105, 116, 45, 98, 111, 120, 45, 115, 105, 122, 105, 110, 103, 58, + 32, 98, 111, 114, 100, 101, 114, 45, 98, 111, 120, 59, 32, 45, 119, 101, + 98, 107, 105, 116, 45, 98, 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, + 99, 101, 110, 116, 101, 114, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, + 49, 112, 120, 32, 115, 111, 108, 105, 100, 59, 32, 45, 119, 101, 98, 107, + 105, 116, 45, 98, 111, 114, 100, 101, 114, 45, 114, 97, 100, 105, 117, 115, + 58, 32, 53, 112, 120, 59, 32, 119, 104, 105, 116, 101, 45, 115, 112, 97, + 99, 101, 58, 32, 112, 114, 101, 59, 32, 45, 119, 101, 98, 107, 105, 116, + 45, 114, 116, 108, 45, 111, 114, 100, 101, 114, 105, 110, 103, 58, 32, 108, + 111, 103, 105, 99, 97, 108, 59, 32, 99, 111, 108, 111, 114, 58, 32, 98, + 108, 97, 99, 107, 59, 32, 98, 97, 99, 107, 103, 114, 111, 117, 110, 100, + 45, 99, 111, 108, 111, 114, 58, 32, 119, 104, 105, 116, 101, 59, 32, 99, + 117, 114, 115, 111, 114, 58, 32, 100, 101, 102, 97, 117, 108, 116, 59, 32, + 125, 32, 115, 101, 108, 101, 99, 116, 91, 115, 105, 122, 101, 93, 44, 32, + 115, 101, 108, 101, 99, 116, 91, 109, 117, 108, 116, 105, 112, 108, 101, 93, + 44, 32, 115, 101, 108, 101, 99, 116, 91, 115, 105, 122, 101, 93, 91, 109, + 117, 108, 116, 105, 112, 108, 101, 93, 32, 123, 32, 45, 119, 101, 98, 107, + 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 108, + 105, 115, 116, 98, 111, 120, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, + 98, 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, 115, 116, 97, 114, 116, + 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 49, 112, 120, 32, 105, 110, + 115, 101, 116, 32, 103, 114, 97, 121, 59, 32, 45, 119, 101, 98, 107, 105, + 116, 45, 98, 111, 114, 100, 101, 114, 45, 114, 97, 100, 105, 117, 115, 58, + 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, 119, 104, 105, 116, 101, 45, + 115, 112, 97, 99, 101, 58, 32, 105, 110, 105, 116, 105, 97, 108, 59, 32, + 125, 32, 115, 101, 108, 101, 99, 116, 91, 115, 105, 122, 101, 61, 34, 48, + 34, 93, 44, 32, 115, 101, 108, 101, 99, 116, 91, 115, 105, 122, 101, 61, + 34, 49, 34, 93, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, + 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 109, 101, 110, 117, 108, + 105, 115, 116, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, + 45, 97, 108, 105, 103, 110, 58, 32, 99, 101, 110, 116, 101, 114, 59, 32, + 98, 111, 114, 100, 101, 114, 58, 32, 49, 112, 120, 32, 115, 111, 108, 105, + 100, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 114, 100, 101, + 114, 45, 114, 97, 100, 105, 117, 115, 58, 32, 53, 112, 120, 59, 32, 119, + 104, 105, 116, 101, 45, 115, 112, 97, 99, 101, 58, 32, 112, 114, 101, 59, + 32, 125, 32, 111, 112, 116, 103, 114, 111, 117, 112, 32, 123, 32, 102, 111, + 110, 116, 45, 119, 101, 105, 103, 104, 116, 58, 32, 98, 111, 108, 100, 101, + 114, 59, 32, 125, 32, 111, 112, 116, 105, 111, 110, 32, 123, 32, 102, 111, + 110, 116, 45, 119, 101, 105, 103, 104, 116, 58, 32, 110, 111, 114, 109, 97, + 108, 59, 32, 125, 32, 100, 97, 116, 97, 103, 114, 105, 100, 32, 123, 32, + 104, 101, 105, 103, 104, 116, 58, 32, 49, 53, 48, 112, 120, 59, 32, 45, + 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, + 101, 58, 32, 100, 97, 116, 97, 103, 114, 105, 100, 59, 32, 45, 119, 101, + 98, 107, 105, 116, 45, 98, 111, 120, 45, 115, 105, 122, 105, 110, 103, 58, + 32, 98, 111, 114, 100, 101, 114, 45, 98, 111, 120, 59, 32, 45, 119, 101, + 98, 107, 105, 116, 45, 114, 116, 108, 45, 111, 114, 100, 101, 114, 105, 110, + 103, 58, 32, 108, 111, 103, 105, 99, 97, 108, 59, 32, 99, 111, 108, 111, + 114, 58, 32, 98, 108, 97, 99, 107, 59, 32, 98, 97, 99, 107, 103, 114, + 111, 117, 110, 100, 45, 99, 111, 108, 111, 114, 58, 32, 119, 104, 105, 116, + 101, 59, 32, 99, 117, 114, 115, 111, 114, 58, 32, 100, 101, 102, 97, 117, + 108, 116, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 49, 112, 120, 32, + 105, 110, 115, 101, 116, 32, 103, 114, 97, 121, 59, 32, 119, 104, 105, 116, 101, 45, 115, 112, 97, 99, 101, 58, 32, 105, 110, 105, 116, 105, 97, 108, - 59, 32, 125, 32, 115, 101, 108, 101, 99, 116, 91, 115, 105, 122, 101, 61, - 34, 48, 34, 93, 44, 32, 115, 101, 108, 101, 99, 116, 91, 115, 105, 122, - 101, 61, 34, 49, 34, 93, 32, 123, 32, 45, 119, 101, 98, 107, 105, 116, - 45, 97, 112, 112, 101, 97, 114, 97, 110, 99, 101, 58, 32, 109, 101, 110, - 117, 108, 105, 115, 116, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, - 111, 120, 45, 97, 108, 105, 103, 110, 58, 32, 99, 101, 110, 116, 101, 114, - 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 49, 112, 120, 32, 115, 111, - 108, 105, 100, 59, 32, 45, 119, 101, 98, 107, 105, 116, 45, 98, 111, 114, - 100, 101, 114, 45, 114, 97, 100, 105, 117, 115, 58, 32, 53, 112, 120, 59, - 32, 119, 104, 105, 116, 101, 45, 115, 112, 97, 99, 101, 58, 32, 112, 114, - 101, 59, 32, 125, 32, 111, 112, 116, 103, 114, 111, 117, 112, 32, 123, 32, - 102, 111, 110, 116, 45, 119, 101, 105, 103, 104, 116, 58, 32, 98, 111, 108, - 100, 101, 114, 59, 32, 125, 32, 111, 112, 116, 105, 111, 110, 32, 123, 32, - 102, 111, 110, 116, 45, 119, 101, 105, 103, 104, 116, 58, 32, 110, 111, 114, - 109, 97, 108, 59, 32, 125, 32, 100, 97, 116, 97, 103, 114, 105, 100, 32, - 123, 32, 104, 101, 105, 103, 104, 116, 58, 32, 49, 53, 48, 112, 120, 59, - 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 112, 112, 101, 97, 114, 97, - 110, 99, 101, 58, 32, 100, 97, 116, 97, 103, 114, 105, 100, 59, 32, 45, - 119, 101, 98, 107, 105, 116, 45, 98, 111, 120, 45, 115, 105, 122, 105, 110, - 103, 58, 32, 98, 111, 114, 100, 101, 114, 45, 98, 111, 120, 59, 32, 45, - 119, 101, 98, 107, 105, 116, 45, 114, 116, 108, 45, 111, 114, 100, 101, 114, - 105, 110, 103, 58, 32, 108, 111, 103, 105, 99, 97, 108, 59, 32, 99, 111, - 108, 111, 114, 58, 32, 98, 108, 97, 99, 107, 59, 32, 98, 97, 99, 107, - 103, 114, 111, 117, 110, 100, 45, 99, 111, 108, 111, 114, 58, 32, 119, 104, - 105, 116, 101, 59, 32, 99, 117, 114, 115, 111, 114, 58, 32, 100, 101, 102, - 97, 117, 108, 116, 59, 32, 98, 111, 114, 100, 101, 114, 58, 32, 49, 112, - 120, 32, 105, 110, 115, 101, 116, 32, 103, 114, 97, 121, 59, 32, 119, 104, - 105, 116, 101, 45, 115, 112, 97, 99, 101, 58, 32, 105, 110, 105, 116, 105, - 97, 108, 59, 32, 125, 32, 117, 44, 32, 105, 110, 115, 32, 123, 32, 116, - 101, 120, 116, 45, 100, 101, 99, 111, 114, 97, 116, 105, 111, 110, 58, 32, - 117, 110, 100, 101, 114, 108, 105, 110, 101, 32, 125, 32, 115, 116, 114, 111, - 110, 103, 44, 32, 98, 32, 123, 32, 102, 111, 110, 116, 45, 119, 101, 105, - 103, 104, 116, 58, 32, 98, 111, 108, 100, 101, 114, 32, 125, 32, 105, 44, - 32, 99, 105, 116, 101, 44, 32, 101, 109, 44, 32, 118, 97, 114, 44, 32, - 97, 100, 100, 114, 101, 115, 115, 32, 123, 32, 102, 111, 110, 116, 45, 115, - 116, 121, 108, 101, 58, 32, 105, 116, 97, 108, 105, 99, 32, 125, 32, 116, - 116, 44, 32, 99, 111, 100, 101, 44, 32, 107, 98, 100, 44, 32, 115, 97, - 109, 112, 32, 123, 32, 102, 111, 110, 116, 45, 102, 97, 109, 105, 108, 121, - 58, 32, 109, 111, 110, 111, 115, 112, 97, 99, 101, 32, 125, 32, 112, 114, - 101, 44, 32, 120, 109, 112, 44, 32, 112, 108, 97, 105, 110, 116, 101, 120, - 116, 44, 32, 108, 105, 115, 116, 105, 110, 103, 32, 123, 32, 100, 105, 115, - 112, 108, 97, 121, 58, 32, 98, 108, 111, 99, 107, 59, 32, 102, 111, 110, - 116, 45, 102, 97, 109, 105, 108, 121, 58, 32, 109, 111, 110, 111, 115, 112, - 97, 99, 101, 59, 32, 119, 104, 105, 116, 101, 45, 115, 112, 97, 99, 101, - 58, 32, 112, 114, 101, 59, 32, 109, 97, 114, 103, 105, 110, 58, 32, 49, - 95, 95, 113, 101, 109, 32, 48, 32, 125, 32, 98, 105, 103, 32, 123, 32, - 102, 111, 110, 116, 45, 115, 105, 122, 101, 58, 32, 108, 97, 114, 103, 101, - 114, 32, 125, 32, 115, 109, 97, 108, 108, 32, 123, 32, 102, 111, 110, 116, - 45, 115, 105, 122, 101, 58, 32, 115, 109, 97, 108, 108, 101, 114, 32, 125, - 32, 115, 44, 32, 115, 116, 114, 105, 107, 101, 44, 32, 100, 101, 108, 32, - 123, 32, 116, 101, 120, 116, 45, 100, 101, 99, 111, 114, 97, 116, 105, 111, - 110, 58, 32, 108, 105, 110, 101, 45, 116, 104, 114, 111, 117, 103, 104, 32, - 125, 32, 115, 117, 98, 32, 123, 32, 118, 101, 114, 116, 105, 99, 97, 108, - 45, 97, 108, 105, 103, 110, 58, 32, 115, 117, 98, 59, 32, 102, 111, 110, + 59, 32, 125, 32, 117, 44, 32, 105, 110, 115, 32, 123, 32, 116, 101, 120, + 116, 45, 100, 101, 99, 111, 114, 97, 116, 105, 111, 110, 58, 32, 117, 110, + 100, 101, 114, 108, 105, 110, 101, 32, 125, 32, 115, 116, 114, 111, 110, 103, + 44, 32, 98, 32, 123, 32, 102, 111, 110, 116, 45, 119, 101, 105, 103, 104, + 116, 58, 32, 98, 111, 108, 100, 101, 114, 32, 125, 32, 105, 44, 32, 99, + 105, 116, 101, 44, 32, 101, 109, 44, 32, 118, 97, 114, 44, 32, 97, 100, + 100, 114, 101, 115, 115, 32, 123, 32, 102, 111, 110, 116, 45, 115, 116, 121, + 108, 101, 58, 32, 105, 116, 97, 108, 105, 99, 32, 125, 32, 116, 116, 44, + 32, 99, 111, 100, 101, 44, 32, 107, 98, 100, 44, 32, 115, 97, 109, 112, + 32, 123, 32, 102, 111, 110, 116, 45, 102, 97, 109, 105, 108, 121, 58, 32, + 109, 111, 110, 111, 115, 112, 97, 99, 101, 32, 125, 32, 112, 114, 101, 44, + 32, 120, 109, 112, 44, 32, 112, 108, 97, 105, 110, 116, 101, 120, 116, 44, + 32, 108, 105, 115, 116, 105, 110, 103, 32, 123, 32, 100, 105, 115, 112, 108, + 97, 121, 58, 32, 98, 108, 111, 99, 107, 59, 32, 102, 111, 110, 116, 45, + 102, 97, 109, 105, 108, 121, 58, 32, 109, 111, 110, 111, 115, 112, 97, 99, + 101, 59, 32, 119, 104, 105, 116, 101, 45, 115, 112, 97, 99, 101, 58, 32, + 112, 114, 101, 59, 32, 109, 97, 114, 103, 105, 110, 58, 32, 49, 95, 95, + 113, 101, 109, 32, 48, 32, 125, 32, 98, 105, 103, 32, 123, 32, 102, 111, + 110, 116, 45, 115, 105, 122, 101, 58, 32, 108, 97, 114, 103, 101, 114, 32, + 125, 32, 115, 109, 97, 108, 108, 32, 123, 32, 102, 111, 110, 116, 45, 115, + 105, 122, 101, 58, 32, 115, 109, 97, 108, 108, 101, 114, 32, 125, 32, 115, + 44, 32, 115, 116, 114, 105, 107, 101, 44, 32, 100, 101, 108, 32, 123, 32, + 116, 101, 120, 116, 45, 100, 101, 99, 111, 114, 97, 116, 105, 111, 110, 58, + 32, 108, 105, 110, 101, 45, 116, 104, 114, 111, 117, 103, 104, 32, 125, 32, + 115, 117, 98, 32, 123, 32, 118, 101, 114, 116, 105, 99, 97, 108, 45, 97, + 108, 105, 103, 110, 58, 32, 115, 117, 98, 59, 32, 102, 111, 110, 116, 45, + 115, 105, 122, 101, 58, 32, 115, 109, 97, 108, 108, 101, 114, 32, 125, 32, + 115, 117, 112, 32, 123, 32, 118, 101, 114, 116, 105, 99, 97, 108, 45, 97, + 108, 105, 103, 110, 58, 32, 115, 117, 112, 101, 114, 59, 32, 102, 111, 110, 116, 45, 115, 105, 122, 101, 58, 32, 115, 109, 97, 108, 108, 101, 114, 32, - 125, 32, 115, 117, 112, 32, 123, 32, 118, 101, 114, 116, 105, 99, 97, 108, - 45, 97, 108, 105, 103, 110, 58, 32, 115, 117, 112, 101, 114, 59, 32, 102, - 111, 110, 116, 45, 115, 105, 122, 101, 58, 32, 115, 109, 97, 108, 108, 101, - 114, 32, 125, 32, 110, 111, 98, 114, 32, 123, 32, 119, 104, 105, 116, 101, - 45, 115, 112, 97, 99, 101, 58, 32, 110, 111, 119, 114, 97, 112, 32, 125, - 32, 58, 102, 111, 99, 117, 115, 32, 123, 32, 111, 117, 116, 108, 105, 110, - 101, 58, 32, 97, 117, 116, 111, 32, 53, 112, 120, 32, 45, 119, 101, 98, - 107, 105, 116, 45, 102, 111, 99, 117, 115, 45, 114, 105, 110, 103, 45, 99, - 111, 108, 111, 114, 32, 125, 32, 104, 116, 109, 108, 58, 102, 111, 99, 117, - 115, 44, 32, 98, 111, 100, 121, 58, 102, 111, 99, 117, 115, 44, 32, 105, - 110, 112, 117, 116, 91, 114, 101, 97, 100, 111, 110, 108, 121, 93, 58, 102, - 111, 99, 117, 115, 32, 123, 32, 111, 117, 116, 108, 105, 110, 101, 58, 32, - 110, 111, 110, 101, 32, 125, 32, 105, 110, 112, 117, 116, 58, 102, 111, 99, - 117, 115, 44, 32, 116, 101, 120, 116, 97, 114, 101, 97, 58, 102, 111, 99, - 117, 115, 44, 32, 105, 115, 105, 110, 100, 101, 120, 58, 102, 111, 99, 117, - 115, 44, 32, 107, 101, 121, 103, 101, 110, 58, 102, 111, 99, 117, 115, 44, - 32, 115, 101, 108, 101, 99, 116, 58, 102, 111, 99, 117, 115, 32, 123, 32, - 111, 117, 116, 108, 105, 110, 101, 45, 111, 102, 102, 115, 101, 116, 58, 32, - 45, 50, 112, 120, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, - 101, 61, 34, 98, 117, 116, 116, 111, 110, 34, 93, 58, 102, 111, 99, 117, - 115, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 99, - 104, 101, 99, 107, 98, 111, 120, 34, 93, 58, 102, 111, 99, 117, 115, 44, - 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, - 101, 34, 93, 58, 102, 111, 99, 117, 115, 44, 32, 105, 110, 112, 117, 116, - 91, 116, 121, 112, 101, 61, 34, 104, 105, 100, 100, 101, 110, 34, 93, 58, - 102, 111, 99, 117, 115, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, - 101, 61, 34, 105, 109, 97, 103, 101, 34, 93, 58, 102, 111, 99, 117, 115, - 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 97, - 100, 105, 111, 34, 93, 58, 102, 111, 99, 117, 115, 44, 32, 105, 110, 112, - 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 101, 115, 101, 116, 34, 93, - 58, 102, 111, 99, 117, 115, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, - 112, 101, 61, 34, 115, 101, 97, 114, 99, 104, 34, 93, 58, 102, 111, 99, - 117, 115, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, - 115, 117, 98, 109, 105, 116, 34, 93, 58, 102, 111, 99, 117, 115, 44, 32, - 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, - 34, 93, 58, 102, 111, 99, 117, 115, 58, 58, 45, 119, 101, 98, 107, 105, - 116, 45, 102, 105, 108, 101, 45, 117, 112, 108, 111, 97, 100, 45, 98, 117, - 116, 116, 111, 110, 32, 123, 32, 111, 117, 116, 108, 105, 110, 101, 45, 111, - 102, 102, 115, 101, 116, 58, 32, 48, 32, 125, 32, 97, 58, 45, 119, 101, - 98, 107, 105, 116, 45, 97, 110, 121, 45, 108, 105, 110, 107, 32, 123, 32, - 99, 111, 108, 111, 114, 58, 32, 45, 119, 101, 98, 107, 105, 116, 45, 108, - 105, 110, 107, 59, 32, 116, 101, 120, 116, 45, 100, 101, 99, 111, 114, 97, - 116, 105, 111, 110, 58, 32, 117, 110, 100, 101, 114, 108, 105, 110, 101, 59, - 32, 99, 117, 114, 115, 111, 114, 58, 32, 97, 117, 116, 111, 59, 32, 125, - 32, 97, 58, 45, 119, 101, 98, 107, 105, 116, 45, 97, 110, 121, 45, 108, - 105, 110, 107, 58, 97, 99, 116, 105, 118, 101, 32, 123, 32, 99, 111, 108, - 111, 114, 58, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 99, 116, 105, - 118, 101, 108, 105, 110, 107, 32, 125, 32, 110, 111, 102, 114, 97, 109, 101, - 115, 32, 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 110, 111, 110, - 101, 32, 125, 32, 102, 114, 97, 109, 101, 115, 101, 116, 44, 32, 102, 114, - 97, 109, 101, 32, 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 98, - 108, 111, 99, 107, 32, 125, 32, 102, 114, 97, 109, 101, 115, 101, 116, 32, - 123, 32, 98, 111, 114, 100, 101, 114, 45, 99, 111, 108, 111, 114, 58, 32, - 105, 110, 104, 101, 114, 105, 116, 32, 125, 32, 105, 102, 114, 97, 109, 101, - 32, 123, 32, 98, 111, 114, 100, 101, 114, 58, 32, 50, 112, 120, 32, 105, - 110, 115, 101, 116, 32, 125 + 125, 32, 110, 111, 98, 114, 32, 123, 32, 119, 104, 105, 116, 101, 45, 115, + 112, 97, 99, 101, 58, 32, 110, 111, 119, 114, 97, 112, 32, 125, 32, 58, + 102, 111, 99, 117, 115, 32, 123, 32, 111, 117, 116, 108, 105, 110, 101, 58, + 32, 97, 117, 116, 111, 32, 53, 112, 120, 32, 45, 119, 101, 98, 107, 105, + 116, 45, 102, 111, 99, 117, 115, 45, 114, 105, 110, 103, 45, 99, 111, 108, + 111, 114, 32, 125, 32, 104, 116, 109, 108, 58, 102, 111, 99, 117, 115, 44, + 32, 98, 111, 100, 121, 58, 102, 111, 99, 117, 115, 44, 32, 105, 110, 112, + 117, 116, 91, 114, 101, 97, 100, 111, 110, 108, 121, 93, 58, 102, 111, 99, + 117, 115, 32, 123, 32, 111, 117, 116, 108, 105, 110, 101, 58, 32, 110, 111, + 110, 101, 32, 125, 32, 105, 110, 112, 117, 116, 58, 102, 111, 99, 117, 115, + 44, 32, 116, 101, 120, 116, 97, 114, 101, 97, 58, 102, 111, 99, 117, 115, + 44, 32, 105, 115, 105, 110, 100, 101, 120, 58, 102, 111, 99, 117, 115, 44, + 32, 107, 101, 121, 103, 101, 110, 58, 102, 111, 99, 117, 115, 44, 32, 115, + 101, 108, 101, 99, 116, 58, 102, 111, 99, 117, 115, 32, 123, 32, 111, 117, + 116, 108, 105, 110, 101, 45, 111, 102, 102, 115, 101, 116, 58, 32, 45, 50, + 112, 120, 32, 125, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, + 34, 98, 117, 116, 116, 111, 110, 34, 93, 58, 102, 111, 99, 117, 115, 44, + 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 99, 104, 101, + 99, 107, 98, 111, 120, 34, 93, 58, 102, 111, 99, 117, 115, 44, 32, 105, + 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, + 93, 58, 102, 111, 99, 117, 115, 44, 32, 105, 110, 112, 117, 116, 91, 116, + 121, 112, 101, 61, 34, 104, 105, 100, 100, 101, 110, 34, 93, 58, 102, 111, + 99, 117, 115, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, + 34, 105, 109, 97, 103, 101, 34, 93, 58, 102, 111, 99, 117, 115, 44, 32, + 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 114, 97, 100, 105, + 111, 34, 93, 58, 102, 111, 99, 117, 115, 44, 32, 105, 110, 112, 117, 116, + 91, 116, 121, 112, 101, 61, 34, 114, 101, 115, 101, 116, 34, 93, 58, 102, + 111, 99, 117, 115, 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, + 61, 34, 115, 101, 97, 114, 99, 104, 34, 93, 58, 102, 111, 99, 117, 115, + 44, 32, 105, 110, 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 115, 117, + 98, 109, 105, 116, 34, 93, 58, 102, 111, 99, 117, 115, 44, 32, 105, 110, + 112, 117, 116, 91, 116, 121, 112, 101, 61, 34, 102, 105, 108, 101, 34, 93, + 58, 102, 111, 99, 117, 115, 58, 58, 45, 119, 101, 98, 107, 105, 116, 45, + 102, 105, 108, 101, 45, 117, 112, 108, 111, 97, 100, 45, 98, 117, 116, 116, + 111, 110, 32, 123, 32, 111, 117, 116, 108, 105, 110, 101, 45, 111, 102, 102, + 115, 101, 116, 58, 32, 48, 32, 125, 32, 97, 58, 45, 119, 101, 98, 107, + 105, 116, 45, 97, 110, 121, 45, 108, 105, 110, 107, 32, 123, 32, 99, 111, + 108, 111, 114, 58, 32, 45, 119, 101, 98, 107, 105, 116, 45, 108, 105, 110, + 107, 59, 32, 116, 101, 120, 116, 45, 100, 101, 99, 111, 114, 97, 116, 105, + 111, 110, 58, 32, 117, 110, 100, 101, 114, 108, 105, 110, 101, 59, 32, 99, + 117, 114, 115, 111, 114, 58, 32, 97, 117, 116, 111, 59, 32, 125, 32, 97, + 58, 45, 119, 101, 98, 107, 105, 116, 45, 97, 110, 121, 45, 108, 105, 110, + 107, 58, 97, 99, 116, 105, 118, 101, 32, 123, 32, 99, 111, 108, 111, 114, + 58, 32, 45, 119, 101, 98, 107, 105, 116, 45, 97, 99, 116, 105, 118, 101, + 108, 105, 110, 107, 32, 125, 32, 110, 111, 102, 114, 97, 109, 101, 115, 32, + 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 110, 111, 110, 101, 32, + 125, 32, 102, 114, 97, 109, 101, 115, 101, 116, 44, 32, 102, 114, 97, 109, + 101, 32, 123, 32, 100, 105, 115, 112, 108, 97, 121, 58, 32, 98, 108, 111, + 99, 107, 32, 125, 32, 102, 114, 97, 109, 101, 115, 101, 116, 32, 123, 32, + 98, 111, 114, 100, 101, 114, 45, 99, 111, 108, 111, 114, 58, 32, 105, 110, + 104, 101, 114, 105, 116, 32, 125, 32, 105, 102, 114, 97, 109, 101, 32, 123, + 32, 98, 111, 114, 100, 101, 114, 58, 32, 50, 112, 120, 32, 105, 110, 115, + 101, 116, 32, 125 }; extern const char quirksUserAgentStyleSheet[359] = { 105, 109, 103, 91, 97, 108, 105, 103, 110, 61, 34, 108, 101, 102, 116, 34, diff --git a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp index 187298081c..5f34852a13 100644 --- a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp +++ b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp @@ -89,6 +89,10 @@ #include "XPathPath.h" #include "XPathPredicate.h" #include "XPathVariableReference.h" +#include <wtf/FastMalloc.h> + +#define YYMALLOC fastMalloc +#define YYFREE fastFree #define YYENABLE_NLS 0 #define YYLTYPE_IS_TRIVIAL 1 @@ -103,7 +107,7 @@ using namespace XPath; /* Line 189 of yacc.c */ -#line 107 "WebCore/tmp/../generated/XPathGrammar.tab.c" +#line 111 "WebCore/tmp/../generated/XPathGrammar.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -158,7 +162,7 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 56 "../xml/XPathGrammar.y" +#line 60 "../xml/XPathGrammar.y" Step::Axis axis; Step::NodeTest* nodeTest; @@ -174,7 +178,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 178 "WebCore/tmp/../generated/XPathGrammar.tab.c" +#line 182 "WebCore/tmp/../generated/XPathGrammar.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -185,7 +189,7 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ -#line 69 "../xml/XPathGrammar.y" +#line 73 "../xml/XPathGrammar.y" static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval); } @@ -194,7 +198,7 @@ static void xpathyyerror(const char*) { } /* Line 264 of yacc.c */ -#line 198 "WebCore/tmp/../generated/XPathGrammar.tab.c" +#line 202 "WebCore/tmp/../generated/XPathGrammar.tab.c" #ifdef short # undef short @@ -500,13 +504,13 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 117, 117, 124, 129, 136, 142, 147, 156, 164, - 170, 180, 191, 209, 220, 238, 242, 244, 251, 264, - 271, 282, 286, 290, 298, 306, 313, 321, 327, 335, - 342, 347, 354, 361, 365, 374, 386, 394, 402, 406, - 408, 420, 425, 427, 436, 449, 451, 461, 463, 473, - 475, 485, 487, 497, 499, 509, 511, 519, 529, 531, - 541, 543 + 0, 121, 121, 128, 133, 140, 146, 151, 160, 168, + 174, 184, 195, 213, 224, 242, 246, 248, 255, 268, + 275, 286, 290, 294, 302, 310, 317, 325, 331, 339, + 346, 351, 358, 365, 369, 378, 390, 398, 406, 410, + 412, 424, 429, 431, 440, 453, 455, 465, 467, 477, + 479, 489, 491, 501, 503, 513, 515, 523, 533, 535, + 545, 547 }; #endif @@ -1479,7 +1483,7 @@ yyreduce: case 2: /* Line 1455 of yacc.c */ -#line 118 "../xml/XPathGrammar.y" +#line 122 "../xml/XPathGrammar.y" { PARSER->m_topExpr = (yyvsp[(1) - (1)].expr); ;} @@ -1488,7 +1492,7 @@ yyreduce: case 3: /* Line 1455 of yacc.c */ -#line 125 "../xml/XPathGrammar.y" +#line 129 "../xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(false); ;} @@ -1497,7 +1501,7 @@ yyreduce: case 4: /* Line 1455 of yacc.c */ -#line 130 "../xml/XPathGrammar.y" +#line 134 "../xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(true); ;} @@ -1506,7 +1510,7 @@ yyreduce: case 5: /* Line 1455 of yacc.c */ -#line 137 "../xml/XPathGrammar.y" +#line 141 "../xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; PARSER->registerParseNode((yyval.locationPath)); @@ -1516,7 +1520,7 @@ yyreduce: case 6: /* Line 1455 of yacc.c */ -#line 143 "../xml/XPathGrammar.y" +#line 147 "../xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); ;} @@ -1525,7 +1529,7 @@ yyreduce: case 7: /* Line 1455 of yacc.c */ -#line 148 "../xml/XPathGrammar.y" +#line 152 "../xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); (yyval.locationPath)->insertFirstStep((yyvsp[(1) - (2)].step)); @@ -1536,7 +1540,7 @@ yyreduce: case 8: /* Line 1455 of yacc.c */ -#line 157 "../xml/XPathGrammar.y" +#line 161 "../xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; (yyval.locationPath)->appendStep((yyvsp[(1) - (1)].step)); @@ -1548,7 +1552,7 @@ yyreduce: case 9: /* Line 1455 of yacc.c */ -#line 165 "../xml/XPathGrammar.y" +#line 169 "../xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(3) - (3)].step)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].step)); @@ -1558,7 +1562,7 @@ yyreduce: case 10: /* Line 1455 of yacc.c */ -#line 171 "../xml/XPathGrammar.y" +#line 175 "../xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(2) - (3)].step)); (yyval.locationPath)->appendStep((yyvsp[(3) - (3)].step)); @@ -1570,7 +1574,7 @@ yyreduce: case 11: /* Line 1455 of yacc.c */ -#line 181 "../xml/XPathGrammar.y" +#line 185 "../xml/XPathGrammar.y" { if ((yyvsp[(2) - (2)].predList)) { (yyval.step) = new Step(Step::ChildAxis, *(yyvsp[(1) - (2)].nodeTest), *(yyvsp[(2) - (2)].predList)); @@ -1585,7 +1589,7 @@ yyreduce: case 12: /* Line 1455 of yacc.c */ -#line 192 "../xml/XPathGrammar.y" +#line 196 "../xml/XPathGrammar.y" { String localName; String namespaceURI; @@ -1607,7 +1611,7 @@ yyreduce: case 13: /* Line 1455 of yacc.c */ -#line 210 "../xml/XPathGrammar.y" +#line 214 "../xml/XPathGrammar.y" { if ((yyvsp[(3) - (3)].predList)) { (yyval.step) = new Step((yyvsp[(1) - (3)].axis), *(yyvsp[(2) - (3)].nodeTest), *(yyvsp[(3) - (3)].predList)); @@ -1622,7 +1626,7 @@ yyreduce: case 14: /* Line 1455 of yacc.c */ -#line 221 "../xml/XPathGrammar.y" +#line 225 "../xml/XPathGrammar.y" { String localName; String namespaceURI; @@ -1644,7 +1648,7 @@ yyreduce: case 17: /* Line 1455 of yacc.c */ -#line 245 "../xml/XPathGrammar.y" +#line 249 "../xml/XPathGrammar.y" { (yyval.axis) = Step::AttributeAxis; ;} @@ -1653,7 +1657,7 @@ yyreduce: case 18: /* Line 1455 of yacc.c */ -#line 252 "../xml/XPathGrammar.y" +#line 256 "../xml/XPathGrammar.y" { if (*(yyvsp[(1) - (3)].str) == "node") (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::AnyNodeTest); @@ -1670,7 +1674,7 @@ yyreduce: case 19: /* Line 1455 of yacc.c */ -#line 265 "../xml/XPathGrammar.y" +#line 269 "../xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest); PARSER->deleteString((yyvsp[(1) - (3)].str)); @@ -1681,7 +1685,7 @@ yyreduce: case 20: /* Line 1455 of yacc.c */ -#line 272 "../xml/XPathGrammar.y" +#line 276 "../xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, (yyvsp[(3) - (4)].str)->stripWhiteSpace()); PARSER->deleteString((yyvsp[(1) - (4)].str)); @@ -1693,7 +1697,7 @@ yyreduce: case 21: /* Line 1455 of yacc.c */ -#line 282 "../xml/XPathGrammar.y" +#line 286 "../xml/XPathGrammar.y" { (yyval.predList) = 0; ;} @@ -1702,7 +1706,7 @@ yyreduce: case 23: /* Line 1455 of yacc.c */ -#line 291 "../xml/XPathGrammar.y" +#line 295 "../xml/XPathGrammar.y" { (yyval.predList) = new Vector<Predicate*>; (yyval.predList)->append(new Predicate((yyvsp[(1) - (1)].expr))); @@ -1714,7 +1718,7 @@ yyreduce: case 24: /* Line 1455 of yacc.c */ -#line 299 "../xml/XPathGrammar.y" +#line 303 "../xml/XPathGrammar.y" { (yyval.predList)->append(new Predicate((yyvsp[(2) - (2)].expr))); PARSER->unregisterParseNode((yyvsp[(2) - (2)].expr)); @@ -1724,7 +1728,7 @@ yyreduce: case 25: /* Line 1455 of yacc.c */ -#line 307 "../xml/XPathGrammar.y" +#line 311 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} @@ -1733,7 +1737,7 @@ yyreduce: case 26: /* Line 1455 of yacc.c */ -#line 314 "../xml/XPathGrammar.y" +#line 318 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); PARSER->registerParseNode((yyval.step)); @@ -1743,7 +1747,7 @@ yyreduce: case 27: /* Line 1455 of yacc.c */ -#line 322 "../xml/XPathGrammar.y" +#line 326 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); PARSER->registerParseNode((yyval.step)); @@ -1753,7 +1757,7 @@ yyreduce: case 28: /* Line 1455 of yacc.c */ -#line 328 "../xml/XPathGrammar.y" +#line 332 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); PARSER->registerParseNode((yyval.step)); @@ -1763,7 +1767,7 @@ yyreduce: case 29: /* Line 1455 of yacc.c */ -#line 336 "../xml/XPathGrammar.y" +#line 340 "../xml/XPathGrammar.y" { (yyval.expr) = new VariableReference(*(yyvsp[(1) - (1)].str)); PARSER->deleteString((yyvsp[(1) - (1)].str)); @@ -1774,7 +1778,7 @@ yyreduce: case 30: /* Line 1455 of yacc.c */ -#line 343 "../xml/XPathGrammar.y" +#line 347 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} @@ -1783,7 +1787,7 @@ yyreduce: case 31: /* Line 1455 of yacc.c */ -#line 348 "../xml/XPathGrammar.y" +#line 352 "../xml/XPathGrammar.y" { (yyval.expr) = new StringExpression(*(yyvsp[(1) - (1)].str)); PARSER->deleteString((yyvsp[(1) - (1)].str)); @@ -1794,7 +1798,7 @@ yyreduce: case 32: /* Line 1455 of yacc.c */ -#line 355 "../xml/XPathGrammar.y" +#line 359 "../xml/XPathGrammar.y" { (yyval.expr) = new Number((yyvsp[(1) - (1)].str)->toDouble()); PARSER->deleteString((yyvsp[(1) - (1)].str)); @@ -1805,7 +1809,7 @@ yyreduce: case 34: /* Line 1455 of yacc.c */ -#line 366 "../xml/XPathGrammar.y" +#line 370 "../xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (3)].str)); if (!(yyval.expr)) @@ -1818,7 +1822,7 @@ yyreduce: case 35: /* Line 1455 of yacc.c */ -#line 375 "../xml/XPathGrammar.y" +#line 379 "../xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (4)].str), *(yyvsp[(3) - (4)].argList)); if (!(yyval.expr)) @@ -1832,7 +1836,7 @@ yyreduce: case 36: /* Line 1455 of yacc.c */ -#line 387 "../xml/XPathGrammar.y" +#line 391 "../xml/XPathGrammar.y" { (yyval.argList) = new Vector<Expression*>; (yyval.argList)->append((yyvsp[(1) - (1)].expr)); @@ -1844,7 +1848,7 @@ yyreduce: case 37: /* Line 1455 of yacc.c */ -#line 395 "../xml/XPathGrammar.y" +#line 399 "../xml/XPathGrammar.y" { (yyval.argList)->append((yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); @@ -1854,7 +1858,7 @@ yyreduce: case 40: /* Line 1455 of yacc.c */ -#line 409 "../xml/XPathGrammar.y" +#line 413 "../xml/XPathGrammar.y" { (yyval.expr) = new Union; (yyval.expr)->addSubExpression((yyvsp[(1) - (3)].expr)); @@ -1868,7 +1872,7 @@ yyreduce: case 41: /* Line 1455 of yacc.c */ -#line 421 "../xml/XPathGrammar.y" +#line 425 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(1) - (1)].locationPath); ;} @@ -1877,7 +1881,7 @@ yyreduce: case 43: /* Line 1455 of yacc.c */ -#line 428 "../xml/XPathGrammar.y" +#line 432 "../xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->setAbsolute(true); (yyval.expr) = new Path(static_cast<Filter*>((yyvsp[(1) - (3)].expr)), (yyvsp[(3) - (3)].locationPath)); @@ -1890,7 +1894,7 @@ yyreduce: case 44: /* Line 1455 of yacc.c */ -#line 437 "../xml/XPathGrammar.y" +#line 441 "../xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->insertFirstStep((yyvsp[(2) - (3)].step)); (yyvsp[(3) - (3)].locationPath)->setAbsolute(true); @@ -1905,7 +1909,7 @@ yyreduce: case 46: /* Line 1455 of yacc.c */ -#line 452 "../xml/XPathGrammar.y" +#line 456 "../xml/XPathGrammar.y" { (yyval.expr) = new Filter((yyvsp[(1) - (2)].expr), *(yyvsp[(2) - (2)].predList)); PARSER->unregisterParseNode((yyvsp[(1) - (2)].expr)); @@ -1917,7 +1921,7 @@ yyreduce: case 48: /* Line 1455 of yacc.c */ -#line 464 "../xml/XPathGrammar.y" +#line 468 "../xml/XPathGrammar.y" { (yyval.expr) = new LogicalOp(LogicalOp::OP_Or, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); @@ -1929,7 +1933,7 @@ yyreduce: case 50: /* Line 1455 of yacc.c */ -#line 476 "../xml/XPathGrammar.y" +#line 480 "../xml/XPathGrammar.y" { (yyval.expr) = new LogicalOp(LogicalOp::OP_And, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); @@ -1941,7 +1945,7 @@ yyreduce: case 52: /* Line 1455 of yacc.c */ -#line 488 "../xml/XPathGrammar.y" +#line 492 "../xml/XPathGrammar.y" { (yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); @@ -1953,7 +1957,7 @@ yyreduce: case 54: /* Line 1455 of yacc.c */ -#line 500 "../xml/XPathGrammar.y" +#line 504 "../xml/XPathGrammar.y" { (yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); @@ -1965,7 +1969,7 @@ yyreduce: case 56: /* Line 1455 of yacc.c */ -#line 512 "../xml/XPathGrammar.y" +#line 516 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp(NumericOp::OP_Add, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); @@ -1977,7 +1981,7 @@ yyreduce: case 57: /* Line 1455 of yacc.c */ -#line 520 "../xml/XPathGrammar.y" +#line 524 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp(NumericOp::OP_Sub, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); @@ -1989,7 +1993,7 @@ yyreduce: case 59: /* Line 1455 of yacc.c */ -#line 532 "../xml/XPathGrammar.y" +#line 536 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp((yyvsp[(2) - (3)].numop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); @@ -2001,7 +2005,7 @@ yyreduce: case 61: /* Line 1455 of yacc.c */ -#line 544 "../xml/XPathGrammar.y" +#line 548 "../xml/XPathGrammar.y" { (yyval.expr) = new Negative; (yyval.expr)->addSubExpression((yyvsp[(2) - (2)].expr)); @@ -2013,7 +2017,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 2017 "WebCore/tmp/../generated/XPathGrammar.tab.c" +#line 2021 "WebCore/tmp/../generated/XPathGrammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2225,7 +2229,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 552 "../xml/XPathGrammar.y" +#line 556 "../xml/XPathGrammar.y" #endif diff --git a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h index 5a974bb910..cdf2b32539 100644 --- a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h +++ b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h @@ -67,7 +67,7 @@ typedef union YYSTYPE { /* Line 1676 of yacc.c */ -#line 56 "../xml/XPathGrammar.y" +#line 60 "../xml/XPathGrammar.y" Step::Axis axis; Step::NodeTest* nodeTest; diff --git a/src/3rdparty/webkit/WebCore/generated/tokenizer.cpp b/src/3rdparty/webkit/WebCore/generated/tokenizer.cpp index 8462f5152c..1f1ff89b03 100644 --- a/src/3rdparty/webkit/WebCore/generated/tokenizer.cpp +++ b/src/3rdparty/webkit/WebCore/generated/tokenizer.cpp @@ -65,8 +65,8 @@ typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ -#define YY_NUM_RULES 68 -#define YY_END_OF_BUFFER 69 +#define YY_NUM_RULES 69 +#define YY_END_OF_BUFFER 70 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -74,60 +74,60 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[479] = +static yyconst flex_int16_t yy_accept[481] = { 0, - 0, 0, 0, 0, 0, 0, 69, 67, 2, 2, - 67, 67, 67, 67, 67, 67, 67, 67, 67, 56, - 67, 67, 15, 15, 15, 67, 67, 67, 67, 66, - 15, 15, 15, 65, 15, 2, 0, 0, 0, 14, + 0, 0, 0, 0, 0, 0, 70, 68, 2, 2, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 57, + 68, 68, 15, 15, 15, 68, 68, 68, 68, 67, + 15, 15, 15, 66, 15, 2, 0, 0, 0, 14, 0, 0, 0, 18, 18, 0, 8, 0, 0, 9, - 0, 0, 15, 15, 15, 0, 57, 0, 55, 0, - 0, 56, 54, 54, 54, 54, 54, 54, 54, 54, - 54, 16, 54, 54, 51, 54, 0, 54, 0, 0, - 35, 35, 35, 35, 35, 35, 35, 0, 62, 15, + 0, 0, 15, 15, 15, 0, 58, 0, 56, 0, + 0, 57, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 16, 55, 55, 52, 55, 0, 55, 0, 0, + 35, 35, 35, 35, 35, 35, 35, 0, 63, 15, 0, 0, 15, 15, 0, 15, 15, 15, 7, 6, 5, 15, 15, 15, 15, 0, 0, 0, 14, 0, 0, 0, 18, 18, 0, 18, 18, 0, 0, 14, - 0, 0, 4, 16, 15, 0, 0, 54, 0, 41, - 54, 37, 39, 54, 52, 43, 54, 42, 50, 54, - 45, 44, 40, 54, 54, 54, 54, 54, 0, 35, - 35, 0, 35, 35, 35, 35, 35, 35, 35, 35, - 15, 15, 16, 15, 15, 63, 63, 15, 15, 12, - 10, 15, 13, 0, 0, 0, 17, 17, 18, 18, - 18, 0, 0, 15, 0, 1, 54, 54, 46, 54, - 53, 16, 47, 54, 54, 54, 3, 35, 35, 35, - - 35, 35, 35, 35, 35, 35, 35, 15, 58, 0, - 63, 63, 63, 62, 15, 11, 0, 0, 0, 18, - 18, 18, 0, 15, 0, 0, 54, 48, 49, 54, - 54, 35, 35, 35, 35, 35, 35, 35, 20, 35, - 15, 64, 63, 63, 63, 63, 0, 0, 0, 0, - 60, 0, 15, 0, 0, 0, 18, 18, 18, 0, - 15, 54, 54, 38, 35, 35, 35, 35, 35, 21, - 35, 35, 15, 64, 63, 63, 63, 63, 63, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, - 0, 15, 0, 0, 17, 17, 18, 18, 0, 15, - - 54, 54, 35, 35, 35, 35, 19, 35, 35, 15, - 64, 63, 63, 63, 63, 63, 63, 0, 59, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 18, 18, 0, 15, 54, 54, 35, - 35, 23, 35, 35, 35, 15, 64, 63, 63, 63, - 63, 63, 63, 63, 0, 59, 0, 0, 0, 59, - 0, 0, 0, 0, 18, 15, 54, 35, 35, 35, - 35, 64, 0, 0, 0, 36, 15, 35, 35, 35, - 35, 35, 35, 22, 24, 64, 0, 0, 0, 15, - 35, 35, 35, 35, 35, 35, 0, 0, 0, 62, - - 35, 35, 35, 35, 35, 35, 35, 35, 0, 0, - 0, 0, 0, 0, 35, 35, 35, 35, 25, 35, - 35, 35, 0, 61, 0, 0, 0, 0, 26, 35, - 35, 35, 35, 27, 35, 0, 0, 0, 0, 31, - 35, 35, 35, 35, 0, 0, 0, 35, 35, 35, - 35, 0, 0, 35, 35, 29, 35, 0, 0, 35, - 33, 35, 30, 0, 0, 35, 28, 35, 0, 35, - 35, 35, 35, 34, 35, 35, 32, 0 + 0, 0, 4, 16, 15, 0, 0, 55, 0, 42, + 55, 37, 40, 55, 53, 44, 55, 43, 51, 55, + 46, 45, 41, 55, 55, 55, 55, 55, 55, 0, + 35, 35, 0, 35, 35, 35, 35, 35, 35, 35, + 35, 15, 15, 16, 15, 15, 64, 64, 15, 15, + 12, 10, 15, 13, 0, 0, 0, 17, 17, 18, + 18, 18, 0, 0, 15, 0, 1, 55, 55, 47, + 55, 54, 16, 48, 38, 55, 55, 55, 3, 35, + + 35, 35, 35, 35, 35, 35, 35, 35, 35, 15, + 59, 0, 64, 64, 64, 63, 15, 11, 0, 0, + 0, 18, 18, 18, 0, 15, 0, 0, 55, 49, + 50, 55, 55, 35, 35, 35, 35, 35, 35, 35, + 20, 35, 15, 65, 64, 64, 64, 64, 0, 0, + 0, 0, 61, 0, 15, 0, 0, 0, 18, 18, + 18, 0, 15, 55, 55, 39, 35, 35, 35, 35, + 35, 21, 35, 35, 15, 65, 64, 64, 64, 64, + 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 61, 0, 0, 15, 0, 0, 17, 17, 18, 18, + + 0, 15, 55, 55, 35, 35, 35, 35, 19, 35, + 35, 15, 65, 64, 64, 64, 64, 64, 64, 0, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 18, 18, 0, 15, 55, + 55, 35, 35, 23, 35, 35, 35, 15, 65, 64, + 64, 64, 64, 64, 64, 64, 0, 60, 0, 0, + 0, 60, 0, 0, 0, 0, 18, 15, 55, 35, + 35, 35, 35, 65, 0, 0, 0, 36, 15, 35, + 35, 35, 35, 35, 35, 22, 24, 65, 0, 0, + 0, 15, 35, 35, 35, 35, 35, 35, 0, 0, + + 0, 63, 35, 35, 35, 35, 35, 35, 35, 35, + 0, 0, 0, 0, 0, 0, 35, 35, 35, 35, + 25, 35, 35, 35, 0, 62, 0, 0, 0, 0, + 26, 35, 35, 35, 35, 27, 35, 0, 0, 0, + 0, 31, 35, 35, 35, 35, 0, 0, 0, 35, + 35, 35, 35, 0, 0, 35, 35, 29, 35, 0, + 0, 35, 33, 35, 30, 0, 0, 35, 28, 35, + 0, 35, 35, 35, 35, 34, 35, 35, 32, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -175,132 +175,134 @@ static yyconst flex_int32_t yy_meta[86] = 14, 6, 6, 6, 14 } ; -static yyconst flex_int16_t yy_base[550] = +static yyconst flex_int16_t yy_base[552] = { 0, - 0, 0, 64, 66, 54, 56, 1407, 6578, 93, 98, - 107, 83, 155, 1376, 77, 1350, 99, 1345, 1328, 207, - 1334, 275, 100, 108, 125, 326, 1315, 1313, 1312, 6578, + 0, 0, 64, 66, 54, 56, 1515, 6578, 93, 98, + 107, 83, 155, 1489, 77, 1480, 99, 1477, 1470, 207, + 1477, 275, 100, 108, 125, 326, 1442, 1441, 1438, 6578, 141, 110, 151, 6578, 105, 197, 295, 89, 107, 6578, - 387, 120, 0, 429, 1281, 471, 6578, 117, 532, 6578, - 1283, 269, 137, 176, 281, 574, 283, 1289, 1292, 1246, - 1257, 0, 1221, 249, 135, 282, 276, 153, 91, 169, - 299, 308, 318, 266, 1219, 320, 616, 102, 1246, 348, - 1209, 316, 127, 359, 346, 347, 375, 658, 6578, 208, - 700, 1241, 400, 409, 1220, 397, 327, 761, 6578, 6578, - - 6578, 411, 419, 414, 424, 248, 368, 355, 356, 822, - 883, 0, 1191, 925, 967, 1190, 1028, 381, 421, 464, - 1089, 1150, 6578, 214, 456, 1225, 312, 1151, 1192, 1142, - 442, 1139, 1134, 452, 1131, 1104, 458, 1082, 1060, 358, - 1046, 1028, 1027, 462, 453, 1000, 1253, 469, 1023, 463, - 986, 1295, 492, 486, 500, 484, 502, 513, 969, 1356, - 425, 1417, 1001, 545, 494, 193, 993, 543, 1459, 544, - 554, 558, 555, 508, 398, 1520, 0, 1562, 956, 1623, - 1684, 570, 1745, 563, 993, 6578, 948, 1806, 935, 520, - 921, 498, 914, 546, 1848, 564, 6578, 585, 913, 1909, - - 568, 576, 586, 606, 631, 640, 1951, 2012, 6578, 0, - 203, 924, 907, 694, 2054, 565, 543, 2115, 0, 2157, - 2218, 2279, 2340, 669, 912, 505, 2401, 856, 840, 2443, - 612, 615, 2504, 608, 557, 639, 682, 668, 839, 2546, - 2607, 0, 288, 863, 841, 819, 741, 794, 573, 418, - 6578, 2668, 2710, 620, 2771, 0, 2813, 2874, 2935, 2996, - 3057, 3131, 3173, 3234, 670, 3295, 718, 719, 729, 763, - 684, 3337, 3398, 0, 456, 782, 777, 760, 742, 829, - 649, 834, 3459, 572, 3520, 854, 894, 915, 920, 3581, - 3642, 3684, 593, 3745, 6578, 697, 3806, 3867, 3928, 3989, - - 4050, 4111, 730, 4172, 731, 683, 672, 759, 4214, 4275, - 0, 762, 682, 429, 417, 414, 411, 859, 6578, 650, - 838, 957, 4336, 4397, 607, 926, 988, 4458, 4519, 4580, - 1002, 672, 1010, 4622, 4664, 1042, 752, 4706, 4767, 756, - 4828, 376, 812, 847, 1069, 1033, 0, 387, 6578, 6578, - 6578, 6578, 6578, 6578, 1122, 924, 963, 4870, 1162, 1049, - 1050, 4912, 4973, 678, 1063, 850, 1074, 5005, 1103, 841, - 989, 0, 5062, 5104, 5146, 6578, 1066, 1080, 1081, 1084, - 1108, 1137, 877, 328, 273, 6578, 5188, 5230, 5272, 641, - 1140, 884, 916, 836, 1105, 1161, 5314, 5356, 1233, 1286, - - 1147, 1138, 919, 1206, 1165, 1186, 1141, 1207, 1291, 1263, - 1316, 1345, 1327, 5398, 1086, 1029, 1225, 1133, 258, 1247, - 1248, 1310, 1388, 6578, 1427, 5440, 1449, 5501, 242, 1311, - 1341, 1324, 1326, 173, 1317, 1454, 5562, 1480, 5604, 170, - 1061, 1328, 1355, 1372, 1552, 5646, 5688, 1351, 1374, 1389, - 1409, 5730, 5772, 1419, 1456, 154, 1453, 5814, 5856, 1457, - 112, 897, 793, 5898, 1557, 1418, 109, 1348, 1582, 1550, - 1477, 1481, 1485, 90, 1564, 1458, 39, 6578, 5959, 5964, - 5977, 5982, 5987, 5994, 6004, 6017, 296, 6022, 6032, 6045, - 6059, 651, 6064, 6074, 6079, 6089, 6099, 6103, 571, 6112, - - 6125, 6138, 6152, 6166, 6176, 6186, 6191, 6203, 657, 6217, - 758, 6222, 6234, 6247, 801, 6261, 859, 6266, 6278, 6291, - 6304, 6317, 6330, 1086, 6335, 6348, 1120, 6353, 6365, 6378, - 6391, 6404, 6417, 6430, 6435, 6448, 1216, 6453, 6465, 6478, - 6491, 6504, 6517, 1219, 1220, 6530, 6543, 6553, 6563 + 387, 120, 0, 429, 1371, 471, 6578, 117, 532, 6578, + 1380, 269, 137, 176, 281, 574, 283, 1383, 1367, 1297, + 1329, 0, 1294, 249, 135, 282, 276, 153, 91, 169, + 299, 308, 318, 342, 1293, 328, 616, 102, 1326, 273, + 1288, 346, 127, 326, 369, 370, 374, 658, 6578, 208, + 700, 1320, 357, 418, 1314, 399, 314, 761, 6578, 6578, + + 6578, 420, 421, 400, 398, 336, 461, 355, 367, 822, + 883, 0, 1284, 925, 967, 1283, 1028, 351, 423, 460, + 1089, 1150, 6578, 214, 465, 1320, 409, 1281, 1192, 1250, + 278, 1240, 1225, 427, 1222, 1221, 444, 1218, 1217, 416, + 1208, 1188, 1176, 451, 470, 467, 1173, 1253, 441, 1200, + 485, 1140, 1295, 490, 500, 505, 489, 502, 517, 1115, + 1356, 462, 1417, 1147, 554, 512, 193, 1133, 513, 1459, + 543, 544, 558, 559, 436, 501, 1520, 0, 1562, 1062, + 1623, 1684, 571, 1745, 563, 1092, 6578, 1053, 1806, 1000, + 568, 996, 529, 989, 988, 546, 1848, 589, 6578, 597, + + 955, 1909, 566, 534, 588, 587, 608, 631, 1951, 2012, + 6578, 0, 203, 963, 947, 691, 2054, 564, 551, 2115, + 0, 2157, 2218, 2279, 2340, 646, 935, 637, 2401, 896, + 884, 2443, 616, 660, 2504, 681, 388, 668, 626, 694, + 878, 2546, 2607, 0, 288, 884, 876, 869, 793, 854, + 611, 614, 6578, 2668, 2710, 634, 2771, 0, 2813, 2874, + 2935, 2996, 3057, 3131, 3173, 3234, 669, 3295, 692, 716, + 696, 823, 729, 3337, 3398, 0, 641, 842, 781, 753, + 730, 829, 653, 834, 3459, 658, 3520, 894, 915, 920, + 957, 3581, 3642, 3684, 557, 3745, 6578, 684, 3806, 3867, + + 3928, 3989, 4050, 4111, 727, 4172, 730, 682, 654, 697, + 4214, 4275, 0, 646, 590, 556, 553, 526, 496, 962, + 6578, 693, 734, 999, 4336, 4397, 690, 926, 1060, 4458, + 4519, 4580, 988, 711, 1013, 4622, 4664, 1042, 768, 4706, + 4767, 648, 4828, 454, 755, 757, 1074, 1033, 0, 489, + 6578, 6578, 6578, 6578, 6578, 6578, 1121, 838, 898, 4870, + 1182, 968, 1102, 4912, 4973, 729, 868, 785, 1066, 5005, + 1135, 873, 1020, 0, 5062, 5104, 5146, 6578, 830, 1050, + 1052, 1103, 1055, 1112, 836, 402, 386, 6578, 5188, 5230, + 5272, 755, 1137, 809, 916, 1091, 1123, 1161, 5314, 5356, + + 1263, 1242, 1162, 1047, 874, 1138, 1144, 1209, 1185, 1178, + 1285, 1295, 1316, 1327, 1388, 5398, 966, 1223, 1088, 921, + 379, 1172, 1241, 1252, 1361, 6578, 1428, 5440, 1449, 5501, + 368, 1314, 1315, 969, 1118, 173, 1342, 1454, 5562, 1491, + 5604, 170, 1343, 1325, 824, 1341, 1531, 5646, 5688, 1374, + 1375, 1427, 1407, 5730, 5772, 1453, 1456, 154, 1328, 5814, + 5856, 1457, 112, 1080, 811, 5898, 1552, 1350, 109, 1413, + 1557, 1370, 1409, 1451, 1455, 90, 1373, 1522, 39, 6578, + 5959, 5964, 5977, 5982, 5987, 5994, 6004, 6017, 283, 6022, + 6032, 6045, 6059, 306, 6064, 6074, 6079, 6089, 6099, 6103, + + 296, 6112, 6125, 6138, 6152, 6166, 6176, 6186, 6191, 6203, + 799, 6217, 920, 6222, 6234, 6247, 997, 6261, 1086, 6266, + 6278, 6291, 6304, 6317, 6330, 1087, 6335, 6348, 1206, 6353, + 6365, 6378, 6391, 6404, 6417, 6430, 6435, 6448, 1224, 6453, + 6465, 6478, 6491, 6504, 6517, 1227, 1292, 6530, 6543, 6553, + 6563 } ; -static yyconst flex_int16_t yy_def[550] = +static yyconst flex_int16_t yy_def[552] = { 0, - 478, 1, 1, 1, 1, 1, 478, 478, 478, 478, - 478, 479, 480, 478, 481, 478, 482, 478, 478, 478, - 478, 483, 484, 484, 484, 485, 478, 478, 478, 478, - 484, 484, 484, 478, 484, 478, 478, 478, 479, 478, - 486, 480, 487, 488, 488, 489, 478, 481, 490, 478, - 478, 478, 484, 484, 484, 485, 20, 491, 478, 492, - 478, 20, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 494, 493, 478, 483, - 495, 495, 495, 495, 495, 495, 495, 496, 478, 484, - 497, 478, 484, 484, 498, 484, 484, 484, 478, 478, - - 478, 484, 484, 484, 484, 478, 479, 479, 479, 479, - 486, 499, 488, 488, 500, 488, 114, 501, 501, 501, - 501, 502, 478, 478, 484, 503, 504, 493, 505, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 478, 495, - 495, 506, 495, 495, 495, 495, 495, 495, 495, 495, - 484, 98, 478, 484, 484, 507, 478, 484, 98, 484, - 484, 484, 484, 478, 508, 508, 509, 114, 488, 114, - 114, 501, 501, 484, 510, 478, 493, 147, 493, 493, - 493, 493, 493, 493, 147, 493, 478, 495, 495, 160, - - 495, 495, 495, 495, 495, 495, 160, 98, 478, 511, - 512, 478, 478, 513, 98, 484, 478, 514, 515, 114, - 114, 114, 501, 484, 510, 516, 147, 493, 493, 147, - 493, 495, 160, 495, 495, 495, 495, 495, 495, 160, - 98, 517, 518, 478, 478, 478, 519, 519, 520, 521, - 478, 522, 98, 478, 523, 524, 525, 525, 258, 526, - 98, 147, 147, 147, 495, 160, 495, 495, 495, 495, - 495, 160, 98, 527, 528, 478, 478, 478, 478, 478, - 520, 478, 529, 530, 531, 532, 532, 532, 532, 532, - 533, 98, 478, 534, 478, 535, 535, 297, 536, 98, - - 147, 301, 495, 160, 495, 495, 495, 495, 160, 98, - 537, 538, 478, 478, 478, 478, 478, 478, 478, 539, - 539, 539, 539, 540, 541, 541, 541, 541, 542, 543, - 300, 478, 534, 297, 298, 536, 300, 301, 301, 495, - 160, 495, 495, 495, 495, 300, 544, 478, 478, 478, - 478, 478, 478, 478, 539, 539, 539, 323, 541, 541, - 541, 328, 543, 478, 335, 300, 339, 495, 495, 495, - 495, 545, 323, 328, 363, 478, 300, 495, 495, 495, - 495, 495, 495, 495, 495, 478, 323, 328, 363, 300, - 495, 495, 495, 495, 495, 495, 323, 328, 543, 546, - - 495, 495, 495, 495, 495, 495, 495, 495, 539, 541, - 546, 546, 547, 548, 495, 495, 495, 495, 495, 495, - 495, 495, 478, 478, 547, 549, 547, 547, 495, 495, - 495, 495, 495, 495, 495, 547, 428, 547, 428, 495, - 495, 495, 495, 495, 547, 437, 428, 495, 495, 495, - 495, 437, 428, 495, 495, 495, 495, 437, 428, 495, - 495, 495, 495, 437, 547, 495, 495, 495, 547, 495, - 495, 495, 495, 495, 495, 495, 495, 0, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478 + 480, 1, 1, 1, 1, 1, 480, 480, 480, 480, + 480, 481, 482, 480, 483, 480, 484, 480, 480, 480, + 480, 485, 486, 486, 486, 487, 480, 480, 480, 480, + 486, 486, 486, 480, 486, 480, 480, 480, 481, 480, + 488, 482, 489, 490, 490, 491, 480, 483, 492, 480, + 480, 480, 486, 486, 486, 487, 20, 493, 480, 494, + 480, 20, 495, 495, 495, 495, 495, 495, 495, 495, + 495, 495, 495, 495, 495, 495, 496, 495, 480, 485, + 497, 497, 497, 497, 497, 497, 497, 498, 480, 486, + 499, 480, 486, 486, 500, 486, 486, 486, 480, 480, + + 480, 486, 486, 486, 486, 480, 481, 481, 481, 481, + 488, 501, 490, 490, 502, 490, 114, 503, 503, 503, + 503, 504, 480, 480, 486, 505, 506, 495, 507, 495, + 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, + 495, 495, 495, 495, 495, 495, 495, 495, 495, 480, + 497, 497, 508, 497, 497, 497, 497, 497, 497, 497, + 497, 486, 98, 480, 486, 486, 509, 480, 486, 98, + 486, 486, 486, 486, 480, 510, 510, 511, 114, 490, + 114, 114, 503, 503, 486, 512, 480, 495, 148, 495, + 495, 495, 495, 495, 495, 495, 148, 495, 480, 497, + + 497, 161, 497, 497, 497, 497, 497, 497, 161, 98, + 480, 513, 514, 480, 480, 515, 98, 486, 480, 516, + 517, 114, 114, 114, 503, 486, 512, 518, 148, 495, + 495, 148, 495, 497, 161, 497, 497, 497, 497, 497, + 497, 161, 98, 519, 520, 480, 480, 480, 521, 521, + 522, 523, 480, 524, 98, 480, 525, 526, 527, 527, + 260, 528, 98, 148, 148, 148, 497, 161, 497, 497, + 497, 497, 497, 161, 98, 529, 530, 480, 480, 480, + 480, 480, 522, 480, 531, 532, 533, 534, 534, 534, + 534, 534, 535, 98, 480, 536, 480, 537, 537, 299, + + 538, 98, 148, 303, 497, 161, 497, 497, 497, 497, + 161, 98, 539, 540, 480, 480, 480, 480, 480, 480, + 480, 541, 541, 541, 541, 542, 543, 543, 543, 543, + 544, 545, 302, 480, 536, 299, 300, 538, 302, 303, + 303, 497, 161, 497, 497, 497, 497, 302, 546, 480, + 480, 480, 480, 480, 480, 480, 541, 541, 541, 325, + 543, 543, 543, 330, 545, 480, 337, 302, 341, 497, + 497, 497, 497, 547, 325, 330, 365, 480, 302, 497, + 497, 497, 497, 497, 497, 497, 497, 480, 325, 330, + 365, 302, 497, 497, 497, 497, 497, 497, 325, 330, + + 545, 548, 497, 497, 497, 497, 497, 497, 497, 497, + 541, 543, 548, 548, 549, 550, 497, 497, 497, 497, + 497, 497, 497, 497, 480, 480, 549, 551, 549, 549, + 497, 497, 497, 497, 497, 497, 497, 549, 430, 549, + 430, 497, 497, 497, 497, 497, 549, 439, 430, 497, + 497, 497, 497, 439, 430, 497, 497, 497, 497, 439, + 430, 497, 497, 497, 497, 439, 549, 497, 497, 497, + 549, 497, 497, 497, 497, 497, 497, 497, 497, 0, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480 } ; static yyconst flex_int16_t yy_nxt[6664] = @@ -314,730 +316,730 @@ static yyconst flex_int16_t yy_nxt[6664] = 23, 23, 23, 23, 23, 23, 23, 23, 24, 23, 23, 23, 23, 23, 23, 25, 23, 23, 23, 23, 23, 8, 28, 29, 23, 30, 35, 30, 35, 40, - 40, 31, 152, 31, 36, 36, 36, 36, 36, 36, + 40, 31, 153, 31, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 32, 33, 32, 33, 37, 37, 37, 37, 37, 89, 40, 35, 51, 35, 89, 52, 31, 89, 31, 89, 92, 93, 92, 93, 106, 40, - 49, 136, 32, 33, 32, 33, 41, 478, 89, 54, - 478, 95, 38, 152, 129, 34, 105, 34, 55, 94, - 89, 103, 56, 91, 89, 129, 106, 148, 91, 136, - 41, 91, 152, 91, 89, 152, 131, 54, 154, 96, + 49, 136, 32, 33, 32, 33, 41, 480, 89, 54, + 480, 95, 38, 153, 129, 34, 105, 34, 55, 94, + 89, 103, 56, 91, 89, 129, 106, 149, 91, 136, + 41, 91, 153, 91, 89, 153, 131, 54, 155, 96, 49, 38, 42, 46, 105, 43, 55, 94, 91, 103, - 152, 102, 44, 44, 44, 44, 44, 44, 129, 89, - 91, 104, 92, 93, 91, 131, 154, 96, 36, 36, + 153, 102, 44, 44, 44, 44, 44, 44, 129, 89, + 91, 104, 92, 93, 91, 131, 155, 96, 36, 36, - 36, 36, 36, 137, 91, 135, 129, 152, 46, 102, - 210, 44, 44, 44, 44, 44, 44, 59, 212, 104, - 210, 89, 129, 152, 60, 61, 152, 62, 244, 91, + 36, 36, 36, 137, 91, 135, 129, 153, 46, 102, + 212, 44, 44, 44, 44, 44, 44, 59, 214, 104, + 212, 89, 129, 153, 60, 61, 153, 62, 246, 91, 92, 92, 137, 135, 63, 63, 64, 65, 66, 63, 67, 68, 69, 63, 70, 63, 71, 72, 63, 73, 63, 74, 75, 76, 63, 63, 63, 63, 63, 63, 77, 91, 78, 63, 63, 64, 65, 66, 63, 67, 68, 69, 70, 63, 71, 72, 63, 73, 63, 74, 75, 76, 63, 63, 63, 63, 63, 63, 130, 52, - 174, 63, 80, 144, 89, 152, 37, 37, 37, 37, - - 37, 478, 129, 57, 82, 210, 112, 83, 112, 124, - 84, 152, 125, 276, 85, 86, 130, 87, 174, 129, - 134, 132, 144, 63, 92, 140, 152, 127, 88, 129, - 38, 186, 133, 82, 91, 129, 83, 124, 138, 84, - 89, 125, 85, 86, 139, 87, 98, 141, 134, 132, - 153, 63, 129, 98, 98, 98, 98, 98, 98, 38, - 133, 129, 40, 40, 142, 478, 138, 145, 143, 152, - 39, 129, 139, 129, 157, 40, 141, 156, 192, 153, - 91, 152, 98, 98, 98, 98, 98, 98, 39, 39, - 39, 107, 142, 40, 109, 145, 143, 150, 155, 152, - - 152, 88, 158, 157, 210, 40, 156, 110, 41, 41, - 89, 129, 152, 89, 110, 110, 110, 110, 110, 110, - 164, 41, 89, 478, 89, 150, 155, 89, 152, 152, - 282, 158, 89, 40, 49, 168, 354, 89, 89, 353, - 111, 170, 352, 110, 110, 110, 110, 110, 110, 114, - 91, 41, 172, 91, 351, 165, 114, 114, 114, 114, - 114, 114, 91, 168, 91, 171, 478, 91, 173, 89, - 170, 285, 91, 210, 49, 189, 40, 91, 91, 190, - 172, 313, 115, 165, 184, 114, 114, 114, 114, 114, - 114, 117, 193, 171, 198, 129, 173, 194, 117, 117, - - 117, 117, 117, 117, 189, 129, 129, 209, 190, 91, - 191, 129, 196, 184, 204, 129, 152, 49, 192, 201, - 226, 193, 129, 198, 186, 194, 202, 117, 117, 117, - 117, 117, 117, 48, 48, 48, 118, 152, 191, 152, - 196, 205, 203, 204, 120, 152, 206, 91, 201, 217, - 228, 129, 121, 152, 202, 152, 214, 89, 89, 121, - 121, 121, 121, 121, 121, 164, 152, 209, 89, 205, - 203, 89, 478, 129, 268, 206, 89, 217, 89, 228, - 282, 177, 40, 177, 282, 122, 229, 254, 121, 121, - 121, 121, 121, 121, 98, 231, 91, 91, 91, 129, - - 224, 98, 98, 98, 98, 98, 98, 91, 91, 216, - 152, 91, 234, 232, 229, 254, 91, 129, 91, 282, - 332, 152, 235, 49, 231, 285, 283, 236, 224, 152, - 98, 98, 98, 98, 98, 98, 147, 216, 152, 152, - 234, 237, 232, 147, 147, 147, 147, 147, 147, 332, - 235, 264, 265, 267, 400, 236, 282, 282, 90, 152, - 285, 152, 238, 63, 63, 129, 293, 219, 152, 219, - 237, 239, 147, 147, 147, 147, 147, 147, 160, 264, - 265, 267, 89, 269, 152, 160, 160, 160, 160, 160, - 160, 238, 152, 152, 293, 247, 247, 247, 247, 247, - - 239, 249, 283, 283, 261, 303, 250, 350, 251, 270, - 343, 269, 364, 271, 160, 160, 160, 160, 160, 160, - 162, 152, 91, 152, 376, 152, 308, 162, 162, 162, - 162, 162, 162, 261, 303, 152, 152, 152, 270, 343, - 364, 271, 247, 247, 247, 247, 247, 252, 249, 305, - 115, 306, 376, 250, 308, 251, 162, 162, 162, 162, - 162, 162, 97, 97, 97, 97, 97, 317, 242, 90, - 242, 152, 152, 368, 89, 307, 340, 342, 305, 210, - 306, 169, 152, 152, 152, 316, 344, 349, 169, 169, - 169, 169, 169, 169, 252, 280, 280, 280, 280, 280, - - 366, 478, 315, 307, 340, 342, 478, 314, 251, 152, - 468, 256, 152, 256, 91, 344, 152, 169, 169, 169, - 169, 169, 169, 108, 175, 175, 175, 108, 366, 40, - 280, 280, 280, 280, 280, 318, 318, 318, 318, 318, - 478, 370, 176, 251, 279, 282, 152, 252, 319, 176, - 176, 176, 176, 176, 176, 280, 280, 280, 280, 280, - 318, 318, 318, 318, 318, 152, 278, 90, 251, 274, - 370, 274, 384, 319, 405, 41, 371, 377, 176, 176, - 176, 176, 176, 176, 39, 39, 39, 107, 277, 152, - 109, 283, 152, 129, 152, 280, 280, 280, 280, 280, - - 152, 384, 405, 110, 396, 371, 377, 252, 251, 129, - 110, 110, 110, 110, 110, 110, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 478, 226, 478, 251, - 152, 282, 246, 396, 251, 403, 111, 152, 282, 110, - 110, 110, 110, 110, 110, 178, 404, 252, 467, 245, - 152, 417, 178, 178, 178, 178, 178, 178, 355, 318, - 318, 318, 355, 403, 282, 478, 152, 129, 252, 152, - 282, 356, 152, 252, 129, 404, 467, 283, 115, 285, - 417, 178, 178, 178, 178, 178, 178, 180, 129, 359, - 318, 318, 318, 359, 180, 180, 180, 180, 180, 180, - - 282, 129, 360, 97, 97, 97, 97, 97, 226, 115, - 283, 108, 175, 175, 175, 108, 283, 40, 213, 90, - 385, 163, 152, 180, 180, 180, 180, 180, 180, 116, - 116, 116, 116, 116, 161, 161, 161, 161, 161, 152, - 197, 285, 152, 119, 182, 182, 182, 119, 181, 385, - 90, 478, 478, 129, 40, 181, 181, 181, 181, 181, - 181, 282, 282, 41, 179, 179, 179, 179, 179, 430, - 159, 159, 159, 159, 159, 187, 187, 187, 187, 187, - 129, 129, 152, 90, 181, 181, 181, 181, 181, 181, - 119, 182, 182, 182, 119, 49, 295, 430, 295, 129, - - 448, 40, 285, 285, 199, 199, 199, 199, 199, 183, - 390, 391, 392, 129, 152, 393, 183, 183, 183, 183, - 183, 183, 152, 355, 318, 318, 318, 355, 448, 282, - 311, 429, 311, 152, 152, 129, 356, 152, 390, 152, - 391, 392, 49, 406, 393, 183, 183, 183, 183, 183, - 183, 48, 48, 48, 118, 394, 152, 129, 152, 429, - 432, 152, 120, 359, 318, 318, 318, 359, 395, 401, - 121, 406, 402, 416, 282, 283, 360, 121, 121, 121, - 121, 121, 121, 394, 129, 415, 152, 129, 421, 432, - 152, 152, 129, 152, 152, 129, 419, 395, 401, 407, - - 152, 402, 416, 122, 129, 408, 121, 121, 121, 121, - 121, 121, 188, 415, 152, 285, 421, 420, 152, 188, - 188, 188, 188, 188, 188, 419, 347, 407, 347, 372, - 386, 372, 386, 408, 286, 286, 286, 286, 286, 152, - 127, 418, 422, 115, 115, 167, 420, 251, 188, 188, - 188, 188, 188, 188, 146, 146, 146, 146, 146, 152, - 152, 163, 152, 149, 326, 361, 361, 361, 326, 431, - 418, 422, 129, 195, 129, 282, 433, 57, 152, 434, - 195, 195, 195, 195, 195, 195, 252, 411, 411, 411, - 411, 411, 321, 357, 357, 357, 321, 431, 282, 77, - - 152, 152, 59, 412, 127, 433, 129, 123, 434, 195, - 195, 195, 195, 195, 195, 200, 285, 411, 411, 411, - 411, 411, 200, 200, 200, 200, 200, 200, 423, 423, - 423, 423, 423, 412, 115, 101, 100, 435, 99, 414, - 79, 424, 440, 58, 283, 444, 478, 478, 478, 478, - 478, 200, 200, 200, 200, 200, 200, 159, 159, 159, - 159, 159, 478, 152, 152, 57, 435, 442, 441, 414, - 152, 440, 443, 50, 444, 449, 207, 152, 471, 152, - 426, 152, 454, 207, 207, 207, 207, 207, 207, 423, - 423, 423, 423, 423, 152, 442, 450, 441, 414, 47, - - 443, 152, 424, 449, 152, 455, 478, 471, 152, 152, - 451, 454, 207, 207, 207, 207, 207, 207, 161, 161, - 161, 161, 161, 478, 450, 152, 478, 152, 423, 423, - 423, 423, 423, 456, 455, 478, 460, 208, 451, 478, - 457, 424, 152, 478, 208, 208, 208, 208, 208, 208, - 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, - 478, 456, 152, 424, 461, 470, 478, 478, 424, 457, - 478, 152, 152, 208, 208, 208, 208, 208, 208, 215, - 426, 423, 423, 423, 423, 423, 215, 215, 215, 215, - 215, 215, 461, 470, 424, 478, 478, 478, 463, 478, - - 462, 466, 426, 477, 478, 478, 152, 426, 473, 152, - 152, 152, 474, 478, 475, 215, 215, 215, 215, 215, - 215, 108, 175, 175, 175, 108, 463, 40, 462, 466, - 152, 477, 478, 426, 152, 478, 478, 473, 152, 478, - 218, 474, 478, 475, 478, 478, 478, 218, 218, 218, - 218, 218, 218, 423, 423, 423, 423, 423, 438, 438, - 438, 438, 438, 478, 478, 478, 424, 478, 478, 478, - 478, 424, 478, 41, 478, 478, 218, 218, 218, 218, - 218, 218, 220, 445, 445, 445, 445, 445, 472, 220, - 220, 220, 220, 220, 220, 478, 424, 478, 478, 478, - - 478, 478, 476, 152, 478, 426, 478, 478, 478, 478, - 426, 478, 478, 478, 478, 478, 472, 152, 220, 220, - 220, 220, 220, 220, 179, 179, 179, 179, 179, 478, - 476, 478, 478, 478, 478, 426, 478, 478, 478, 478, - 478, 478, 478, 221, 478, 478, 478, 478, 478, 478, - 221, 221, 221, 221, 221, 221, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 221, - 221, 221, 221, 221, 221, 116, 116, 116, 116, 116, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 222, 478, 478, 478, 478, 478, - 478, 222, 222, 222, 222, 222, 222, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 222, 222, 222, 222, 222, 222, 119, 182, 182, 182, - 119, 478, 478, 478, 478, 478, 478, 40, 478, 478, - 478, 478, 478, 478, 478, 223, 478, 478, 478, 478, - 478, 478, 223, 223, 223, 223, 223, 223, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 49, 478, - - 478, 223, 223, 223, 223, 223, 223, 187, 187, 187, - 187, 187, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 227, 478, 478, 478, - 478, 478, 478, 227, 227, 227, 227, 227, 227, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 227, 227, 227, 227, 227, 227, 230, 478, - 478, 478, 478, 478, 478, 230, 230, 230, 230, 230, - 230, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 230, 230, 230, 230, 230, 230, - 199, 199, 199, 199, 199, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 233, - 478, 478, 478, 478, 478, 478, 233, 233, 233, 233, - 233, 233, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 233, 233, 233, 233, 233, - 233, 240, 478, 478, 478, 478, 478, 478, 240, 240, - 240, 240, 240, 240, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 240, 240, 240, - 240, 240, 240, 161, 161, 161, 161, 161, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 241, 478, 478, 478, 478, 478, 478, 241, - 241, 241, 241, 241, 241, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 241, 241, - 241, 241, 241, 241, 253, 478, 478, 478, 478, 478, - 478, 253, 253, 253, 253, 253, 253, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 253, 253, 253, 253, 253, 253, 108, 175, 175, 175, - 108, 478, 40, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 255, 478, 478, 478, 478, - 478, 478, 255, 255, 255, 255, 255, 255, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 41, 478, - 478, 255, 255, 255, 255, 255, 255, 257, 478, 478, - 478, 478, 478, 478, 257, 257, 257, 257, 257, 257, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 257, 257, 257, 257, 257, 257, 179, - 179, 179, 179, 179, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 258, 478, - 478, 478, 478, 478, 478, 258, 258, 258, 258, 258, - 258, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 258, 258, 258, 258, 258, 258, - 116, 116, 116, 116, 116, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 259, - - 478, 478, 478, 478, 478, 478, 259, 259, 259, 259, - 259, 259, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 259, 259, 259, 259, 259, - 259, 119, 182, 182, 182, 119, 478, 478, 478, 478, - 478, 478, 40, 478, 478, 478, 478, 478, 478, 478, - 260, 478, 478, 478, 478, 478, 478, 260, 260, 260, - 260, 260, 260, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 49, 478, 478, 260, 260, 260, 260, - - 260, 260, 187, 187, 187, 187, 187, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 262, 478, 478, 478, 478, 478, 478, 262, 262, - 262, 262, 262, 262, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 262, 262, 262, - 262, 262, 262, 263, 478, 478, 478, 478, 478, 478, - 263, 263, 263, 263, 263, 263, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 263, - - 263, 263, 263, 263, 263, 199, 199, 199, 199, 199, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 266, 478, 478, 478, 478, 478, - 478, 266, 266, 266, 266, 266, 266, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 266, 266, 266, 266, 266, 266, 272, 478, 478, 478, - 478, 478, 478, 272, 272, 272, 272, 272, 272, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 272, 272, 272, 272, 272, 272, 161, 161, - 161, 161, 161, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 273, 478, 478, - 478, 478, 478, 478, 273, 273, 273, 273, 273, 273, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 273, 273, 273, 273, 273, 273, 280, - 280, 280, 280, 286, 478, 288, 478, 478, 478, 478, - 288, 288, 289, 478, 478, 478, 478, 478, 290, 478, - 478, 478, 478, 478, 478, 290, 290, 290, 290, 290, - - 290, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 291, 478, 478, 290, 290, 290, 290, 290, 290, - 292, 478, 478, 478, 478, 478, 478, 292, 292, 292, - 292, 292, 292, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 292, 292, 292, 292, - 292, 292, 108, 175, 175, 175, 108, 478, 40, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 294, 478, 478, 478, 478, 478, 478, 294, 294, - - 294, 294, 294, 294, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 41, 478, 478, 294, 294, 294, - 294, 294, 294, 296, 478, 478, 478, 478, 478, 478, - 296, 296, 296, 296, 296, 296, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 115, 478, 478, 296, - 296, 296, 296, 296, 296, 179, 179, 179, 179, 179, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 297, 478, 478, 478, 478, 478, - - 478, 297, 297, 297, 297, 297, 297, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 115, 478, 478, - 297, 297, 297, 297, 297, 297, 116, 116, 116, 116, - 116, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 298, 478, 478, 478, 478, - 478, 478, 298, 298, 298, 298, 298, 298, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 298, 298, 298, 298, 298, 298, 119, 182, 182, - - 182, 119, 478, 478, 478, 478, 478, 478, 40, 478, - 478, 478, 478, 478, 478, 478, 299, 478, 478, 478, - 478, 478, 478, 299, 299, 299, 299, 299, 299, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 49, - 478, 478, 299, 299, 299, 299, 299, 299, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 90, 478, 478, - 478, 478, 478, 478, 90, 90, 90, 90, 90, 90, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 300, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 90, 90, 90, 90, 90, 90, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 300, 187, 187, 187, 187, 187, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 301, 478, 478, 478, 478, 478, 478, 301, 301, - 301, 301, 301, 301, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 301, 301, 301, - 301, 301, 301, 302, 478, 478, 478, 478, 478, 478, - - 302, 302, 302, 302, 302, 302, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 302, - 302, 302, 302, 302, 302, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 128, 478, 478, 478, 478, 478, - 478, 128, 128, 128, 128, 128, 128, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 128, 128, 128, 128, 128, 128, 199, 199, 199, 199, - - 199, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 304, 478, 478, 478, 478, - 478, 478, 304, 304, 304, 304, 304, 304, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 304, 304, 304, 304, 304, 304, 309, 478, 478, - 478, 478, 478, 478, 309, 309, 309, 309, 309, 309, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 309, 309, 309, 309, 309, 309, 161, - - 161, 161, 161, 161, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 310, 478, - 478, 478, 478, 478, 478, 310, 310, 310, 310, 310, - 310, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 310, 310, 310, 310, 310, 310, - 281, 281, 281, 320, 478, 478, 322, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 323, - 478, 478, 478, 478, 478, 478, 323, 323, 323, 323, - 323, 323, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 324, 478, 478, 323, 323, 323, 323, 323, - 323, 284, 284, 284, 325, 478, 478, 478, 478, 478, - 478, 478, 327, 478, 478, 478, 478, 478, 478, 478, - 328, 478, 478, 478, 478, 478, 478, 328, 328, 328, - 328, 328, 328, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 329, 478, 478, 328, 328, 328, 328, - 328, 328, 286, 286, 286, 286, 286, 478, 478, 478, - 478, 478, 478, 478, 478, 251, 478, 478, 478, 478, - - 478, 330, 478, 478, 478, 478, 478, 478, 330, 330, - 330, 330, 330, 330, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 252, 478, 478, 330, 330, 330, - 330, 330, 330, 280, 280, 280, 280, 286, 478, 288, - 478, 478, 478, 478, 288, 288, 289, 478, 478, 478, - 478, 478, 290, 478, 478, 478, 478, 478, 478, 290, - 290, 290, 290, 290, 290, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 291, 478, 478, 290, 290, - - 290, 290, 290, 290, 331, 478, 478, 478, 478, 478, - 478, 331, 331, 331, 331, 331, 331, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 331, 331, 331, 331, 331, 331, 108, 175, 175, 175, - 108, 478, 40, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 333, 478, 478, 478, 478, - 478, 478, 333, 333, 333, 333, 333, 333, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 41, 478, - - 478, 333, 333, 333, 333, 333, 333, 179, 179, 179, - 179, 179, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 334, 478, 478, 478, - 478, 478, 478, 334, 334, 334, 334, 334, 334, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 115, - 478, 478, 334, 334, 334, 334, 334, 334, 116, 116, - 116, 116, 116, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 335, 478, 478, - 478, 478, 478, 478, 335, 335, 335, 335, 335, 335, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 335, 335, 335, 335, 335, 335, 119, - 182, 182, 182, 119, 478, 478, 478, 478, 478, 478, - 40, 478, 478, 478, 478, 478, 478, 478, 336, 478, - 478, 478, 478, 478, 478, 336, 336, 336, 336, 336, - 336, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 49, 478, 478, 336, 336, 336, 336, 336, 336, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 337, 478, 478, 90, - 478, 478, 478, 478, 478, 478, 90, 90, 90, 90, - 90, 90, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 90, 90, 90, 90, 90, - 90, 187, 187, 187, 187, 187, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 338, 478, 478, 478, 478, 478, 478, 338, 338, 338, - 338, 338, 338, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 338, 338, 338, 338, - 338, 338, 146, 146, 146, 146, 146, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 339, 478, 478, 478, 478, 478, 478, 339, 339, - 339, 339, 339, 339, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 339, 339, 339, - 339, 339, 339, 199, 199, 199, 199, 199, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 341, 478, 478, 478, 478, 478, 478, 341, - - 341, 341, 341, 341, 341, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 341, 341, - 341, 341, 341, 341, 345, 478, 478, 478, 478, 478, - 478, 345, 345, 345, 345, 345, 345, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 345, 345, 345, 345, 345, 345, 161, 161, 161, 161, - 161, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 346, 478, 478, 478, 478, - - 478, 478, 346, 346, 346, 346, 346, 346, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 346, 346, 346, 346, 346, 346, 321, 357, 357, - 357, 321, 478, 282, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 358, 478, 478, 478, - 478, 478, 478, 358, 358, 358, 358, 358, 358, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 283, - 478, 478, 358, 358, 358, 358, 358, 358, 281, 281, - - 281, 320, 478, 478, 322, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 323, 478, 478, - 478, 478, 478, 478, 323, 323, 323, 323, 323, 323, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 324, 478, 478, 323, 323, 323, 323, 323, 323, 326, - 361, 361, 361, 326, 478, 478, 478, 478, 478, 478, - 282, 478, 478, 478, 478, 478, 478, 478, 362, 478, - 478, 478, 478, 478, 478, 362, 362, 362, 362, 362, - 362, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 285, 478, 478, 362, 362, 362, 362, 362, 362, - 284, 284, 284, 325, 478, 478, 478, 478, 478, 478, - 478, 327, 478, 478, 478, 478, 478, 478, 478, 328, - 478, 478, 478, 478, 478, 478, 328, 328, 328, 328, - 328, 328, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 329, 478, 478, 328, 328, 328, 328, 328, - 328, 286, 286, 286, 286, 286, 478, 478, 478, 478, - 478, 478, 478, 478, 251, 478, 478, 478, 478, 478, - - 363, 478, 478, 478, 478, 478, 478, 363, 363, 363, - 363, 363, 363, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 252, 478, 478, 363, 363, 363, 363, - 363, 363, 365, 478, 478, 478, 478, 478, 478, 365, - 365, 365, 365, 365, 365, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 365, 365, - 365, 365, 365, 365, 113, 478, 478, 478, 478, 478, - 478, 113, 113, 113, 113, 113, 113, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 113, 113, 113, 113, 113, 113, 367, 478, 478, 478, - 478, 478, 478, 367, 367, 367, 367, 367, 367, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 367, 367, 367, 367, 367, 367, 146, 146, - 146, 146, 146, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 128, 478, 478, - 478, 478, 478, 478, 128, 128, 128, 128, 128, 128, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 128, 128, 128, 128, 128, 128, 199, - 199, 199, 199, 199, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 369, 478, - 478, 478, 478, 478, 478, 369, 369, 369, 369, 369, - 369, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 369, 369, 369, 369, 369, 369, - 373, 478, 478, 478, 478, 478, 478, 373, 373, 373, - - 373, 373, 373, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 373, 373, 373, 373, - 373, 373, 374, 478, 478, 478, 478, 478, 478, 374, - 374, 374, 374, 374, 374, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 374, 374, - 374, 374, 374, 374, 286, 286, 286, 286, 286, 478, - 478, 478, 478, 478, 478, 478, 478, 251, 478, 478, - 478, 478, 478, 375, 478, 478, 478, 478, 478, 478, - - 375, 375, 375, 375, 375, 375, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 252, 478, 478, 375, - 375, 375, 375, 375, 375, 378, 478, 478, 478, 478, - 478, 478, 379, 478, 380, 478, 478, 478, 478, 381, - 382, 478, 478, 383, 478, 478, 478, 478, 152, 478, - 478, 478, 478, 478, 378, 478, 478, 478, 478, 478, - 379, 478, 380, 478, 478, 478, 478, 381, 382, 478, - 478, 383, 387, 478, 478, 478, 478, 478, 478, 387, - 387, 387, 387, 387, 387, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 387, 387, - 387, 387, 387, 387, 388, 478, 478, 478, 478, 478, - 478, 388, 388, 388, 388, 388, 388, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 388, 388, 388, 388, 388, 388, 389, 478, 478, 478, - 478, 478, 478, 389, 389, 389, 389, 389, 389, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 389, 389, 389, 389, 389, 389, 397, 478, - 478, 478, 478, 478, 478, 397, 397, 397, 397, 397, - 397, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 397, 397, 397, 397, 397, 397, - 398, 478, 478, 478, 478, 478, 478, 398, 398, 398, - 398, 398, 398, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 398, 398, 398, 398, - 398, 398, 399, 478, 478, 478, 478, 478, 478, 399, - - 399, 399, 399, 399, 399, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 399, 399, - 399, 399, 399, 399, 409, 478, 478, 478, 478, 478, - 478, 409, 409, 409, 409, 409, 409, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 409, 409, 409, 409, 409, 409, 410, 478, 478, 478, - 478, 478, 478, 410, 410, 410, 410, 410, 410, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 410, 410, 410, 410, 410, 410, 428, 478, - 478, 478, 478, 478, 478, 428, 428, 428, 428, 428, - 428, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 428, 428, 428, 428, 428, 428, - 437, 478, 478, 478, 478, 478, 478, 437, 437, 437, - 437, 437, 437, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 437, 437, 437, 437, - - 437, 437, 438, 438, 438, 438, 438, 478, 478, 478, - 478, 478, 478, 478, 478, 424, 478, 478, 478, 478, - 478, 439, 478, 478, 478, 478, 478, 478, 439, 439, - 439, 439, 439, 439, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 426, 478, 478, 439, 439, 439, - 439, 439, 439, 445, 445, 445, 445, 445, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 446, 478, 478, 478, 478, 478, 478, 446, - 446, 446, 446, 446, 446, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 446, 446, - 446, 446, 446, 446, 447, 478, 478, 478, 478, 478, - 478, 447, 447, 447, 447, 447, 447, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 447, 447, 447, 447, 447, 447, 452, 478, 478, 478, - 478, 478, 478, 452, 452, 452, 452, 452, 452, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 452, 452, 452, 452, 452, 452, 453, 478, - 478, 478, 478, 478, 478, 453, 453, 453, 453, 453, - 453, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 453, 453, 453, 453, 453, 453, - 458, 478, 478, 478, 478, 478, 478, 458, 458, 458, - 458, 458, 458, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 458, 458, 458, 458, - 458, 458, 459, 478, 478, 478, 478, 478, 478, 459, - - 459, 459, 459, 459, 459, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 459, 459, - 459, 459, 459, 459, 464, 478, 478, 478, 478, 478, - 478, 464, 464, 464, 464, 464, 464, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 464, 464, 464, 464, 464, 464, 465, 478, 478, 478, - 478, 478, 478, 465, 465, 465, 465, 465, 465, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 465, 465, 465, 465, 465, 465, 469, 478, - 478, 478, 478, 478, 478, 469, 469, 469, 469, 469, - 469, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 469, 469, 469, 469, 469, 469, - 39, 478, 478, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 45, 45, 478, 45, 45, 48, 478, - 478, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 53, 53, 478, 53, 53, 81, 478, 478, 81, - - 81, 90, 478, 90, 90, 478, 90, 90, 97, 97, + 480, 63, 80, 112, 89, 112, 37, 37, 37, 37, + + 37, 480, 129, 57, 82, 212, 178, 83, 178, 124, + 84, 190, 125, 278, 85, 86, 130, 87, 63, 63, + 134, 132, 151, 63, 92, 140, 88, 89, 88, 129, + 38, 129, 133, 82, 91, 129, 83, 124, 138, 84, + 190, 125, 85, 86, 139, 87, 98, 141, 134, 132, + 151, 63, 129, 98, 98, 98, 98, 98, 98, 38, + 133, 129, 40, 40, 142, 156, 138, 91, 143, 144, + 89, 129, 139, 145, 40, 146, 141, 165, 175, 153, + 154, 129, 98, 98, 98, 98, 98, 98, 39, 39, + 39, 107, 142, 156, 109, 129, 143, 158, 144, 153, + + 157, 159, 145, 146, 49, 270, 175, 110, 41, 154, + 91, 89, 89, 89, 110, 110, 110, 110, 110, 110, + 41, 153, 153, 153, 127, 480, 158, 153, 187, 157, + 159, 89, 153, 89, 89, 40, 193, 169, 173, 153, + 111, 153, 174, 110, 110, 110, 110, 110, 110, 114, + 171, 91, 91, 91, 191, 153, 114, 114, 114, 114, + 114, 114, 480, 39, 166, 169, 173, 172, 40, 129, + 174, 91, 40, 91, 91, 89, 49, 219, 89, 171, + 129, 194, 115, 191, 198, 114, 114, 114, 114, 114, + 114, 117, 166, 185, 129, 172, 192, 129, 117, 117, + + 117, 117, 117, 117, 129, 219, 212, 153, 40, 195, + 194, 196, 198, 49, 41, 91, 200, 203, 91, 206, + 129, 356, 185, 129, 192, 211, 216, 117, 117, 117, + 117, 117, 117, 48, 48, 48, 118, 195, 153, 196, + 204, 207, 153, 153, 120, 200, 203, 205, 206, 193, + 208, 355, 121, 153, 41, 153, 89, 211, 153, 121, + 121, 121, 121, 121, 121, 91, 91, 89, 204, 207, + 153, 89, 89, 480, 165, 205, 89, 89, 354, 208, + 237, 353, 129, 40, 334, 122, 231, 153, 121, 121, + 121, 121, 121, 121, 98, 256, 91, 91, 230, 129, + + 226, 98, 98, 98, 98, 98, 98, 91, 237, 218, + 236, 91, 91, 334, 231, 352, 91, 91, 284, 153, + 233, 129, 239, 256, 49, 234, 284, 230, 226, 238, + 98, 98, 98, 98, 98, 98, 148, 218, 236, 240, + 153, 153, 129, 148, 148, 148, 148, 148, 148, 233, + 153, 239, 228, 272, 234, 266, 187, 238, 212, 89, + 284, 153, 241, 212, 285, 370, 315, 287, 240, 129, + 284, 351, 148, 148, 148, 148, 148, 148, 161, 153, + 295, 263, 272, 266, 153, 161, 161, 161, 161, 161, + 161, 241, 249, 249, 249, 249, 249, 267, 251, 91, + + 284, 153, 284, 252, 305, 253, 285, 153, 295, 345, + 263, 287, 271, 153, 161, 161, 161, 161, 161, 161, + 163, 153, 153, 307, 346, 267, 269, 163, 163, 163, + 163, 163, 163, 305, 153, 153, 480, 115, 345, 273, + 271, 284, 309, 287, 254, 153, 285, 153, 308, 153, + 153, 366, 307, 346, 269, 319, 163, 163, 163, 163, + 163, 163, 97, 97, 97, 97, 97, 273, 402, 153, + 309, 310, 90, 342, 89, 378, 344, 308, 318, 366, + 153, 170, 153, 153, 372, 90, 373, 285, 170, 170, + 170, 170, 170, 170, 249, 249, 249, 249, 249, 310, + + 251, 342, 90, 378, 344, 252, 317, 253, 153, 221, + 153, 221, 379, 372, 91, 373, 368, 170, 170, 170, + 170, 170, 170, 108, 176, 176, 176, 108, 470, 40, + 282, 282, 282, 282, 282, 320, 320, 320, 320, 320, + 480, 379, 177, 253, 368, 284, 254, 90, 321, 177, + 177, 177, 177, 177, 177, 282, 282, 282, 282, 282, + 405, 480, 153, 398, 153, 452, 480, 316, 253, 180, + 180, 180, 180, 180, 392, 41, 153, 153, 177, 177, + 177, 177, 177, 177, 39, 39, 39, 107, 405, 153, + 109, 285, 398, 452, 281, 282, 282, 282, 282, 282, + + 480, 280, 392, 110, 386, 284, 419, 254, 253, 279, + 110, 110, 110, 110, 110, 110, 282, 282, 282, 282, + 282, 282, 282, 282, 282, 282, 153, 153, 480, 253, + 244, 153, 244, 386, 253, 419, 111, 129, 284, 110, + 110, 110, 110, 110, 110, 179, 406, 254, 434, 129, + 228, 285, 179, 179, 179, 179, 179, 179, 282, 282, + 282, 282, 282, 320, 320, 320, 320, 320, 254, 153, + 480, 253, 248, 254, 153, 406, 321, 434, 115, 287, + 284, 179, 179, 179, 179, 179, 179, 181, 247, 97, + 97, 97, 97, 97, 181, 181, 181, 181, 181, 181, + + 357, 320, 320, 320, 357, 90, 284, 258, 153, 258, + 254, 431, 444, 358, 108, 176, 176, 176, 108, 153, + 40, 287, 153, 181, 181, 181, 181, 181, 181, 116, + 116, 116, 116, 116, 162, 162, 162, 162, 162, 431, + 444, 129, 129, 119, 183, 183, 183, 119, 182, 129, + 90, 387, 285, 129, 40, 182, 182, 182, 182, 182, + 182, 361, 320, 320, 320, 361, 41, 188, 188, 188, + 188, 188, 284, 153, 362, 160, 160, 160, 160, 160, + 387, 393, 418, 394, 182, 182, 182, 182, 182, 182, + 119, 183, 183, 183, 119, 49, 276, 297, 276, 297, + + 153, 40, 396, 153, 480, 153, 129, 228, 153, 184, + 393, 418, 394, 287, 284, 115, 184, 184, 184, 184, + 184, 184, 357, 320, 320, 320, 357, 153, 284, 407, + 396, 469, 433, 153, 395, 358, 201, 201, 201, 201, + 201, 153, 49, 397, 153, 184, 184, 184, 184, 184, + 184, 48, 48, 48, 118, 287, 153, 407, 215, 469, + 433, 408, 120, 395, 445, 153, 403, 164, 153, 404, + 121, 153, 397, 420, 285, 421, 153, 121, 121, 121, + 121, 121, 121, 361, 320, 320, 320, 361, 153, 408, + 153, 153, 445, 153, 284, 403, 362, 153, 404, 409, + + 417, 435, 420, 122, 421, 410, 121, 121, 121, 121, + 121, 121, 189, 424, 153, 153, 313, 199, 313, 189, + 189, 189, 189, 189, 189, 153, 129, 409, 417, 129, + 435, 153, 423, 410, 349, 287, 349, 374, 153, 374, + 422, 129, 424, 413, 413, 413, 413, 413, 189, 189, + 189, 189, 189, 189, 147, 147, 147, 147, 147, 414, + 423, 129, 153, 432, 288, 288, 288, 288, 288, 422, + 129, 129, 436, 197, 129, 129, 153, 253, 129, 437, + 197, 197, 197, 197, 197, 197, 323, 359, 359, 359, + 323, 432, 284, 129, 153, 416, 328, 363, 363, 363, + + 328, 436, 388, 129, 388, 153, 129, 284, 437, 197, + 197, 197, 197, 197, 197, 202, 254, 413, 413, 413, + 413, 413, 202, 202, 202, 202, 202, 202, 480, 480, + 480, 480, 480, 414, 129, 127, 115, 115, 285, 168, + 164, 153, 443, 150, 480, 442, 129, 129, 287, 57, + 77, 202, 202, 202, 202, 202, 202, 160, 160, 160, + 160, 160, 425, 425, 425, 425, 425, 153, 153, 416, + 446, 443, 451, 465, 442, 426, 209, 59, 153, 453, + 416, 153, 450, 209, 209, 209, 209, 209, 209, 425, + 425, 425, 425, 425, 153, 153, 153, 472, 127, 446, + + 451, 465, 426, 153, 123, 456, 457, 453, 474, 153, + 450, 478, 209, 209, 209, 209, 209, 209, 162, 162, + 162, 162, 162, 153, 115, 472, 153, 153, 153, 425, + 425, 425, 425, 425, 456, 457, 474, 210, 459, 478, + 475, 428, 426, 473, 210, 210, 210, 210, 210, 210, + 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, + 153, 101, 153, 426, 100, 99, 153, 459, 426, 475, + 462, 458, 473, 210, 210, 210, 210, 210, 210, 217, + 153, 428, 476, 79, 477, 58, 217, 217, 217, 217, + 217, 217, 425, 425, 425, 425, 425, 57, 463, 458, + + 464, 468, 428, 50, 153, 426, 153, 428, 153, 153, + 153, 476, 47, 477, 480, 217, 217, 217, 217, 217, + 217, 108, 176, 176, 176, 108, 463, 40, 464, 468, + 480, 480, 425, 425, 425, 425, 425, 480, 480, 480, + 220, 480, 480, 480, 428, 426, 480, 220, 220, 220, + 220, 220, 220, 440, 440, 440, 440, 440, 447, 447, + 447, 447, 447, 480, 480, 480, 426, 479, 480, 480, + 480, 426, 480, 41, 480, 153, 220, 220, 220, 220, + 220, 220, 222, 480, 428, 480, 480, 480, 480, 222, + 222, 222, 222, 222, 222, 479, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 428, 480, 480, 480, 480, + 428, 480, 480, 480, 480, 480, 480, 480, 222, 222, + 222, 222, 222, 222, 180, 180, 180, 180, 180, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 223, 480, 480, 480, 480, 480, 480, + 223, 223, 223, 223, 223, 223, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 223, + 223, 223, 223, 223, 223, 116, 116, 116, 116, 116, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 224, 480, 480, 480, 480, 480, + 480, 224, 224, 224, 224, 224, 224, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 224, 224, 224, 224, 224, 224, 119, 183, 183, 183, + 119, 480, 480, 480, 480, 480, 480, 40, 480, 480, + 480, 480, 480, 480, 480, 225, 480, 480, 480, 480, + 480, 480, 225, 225, 225, 225, 225, 225, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 49, 480, + + 480, 225, 225, 225, 225, 225, 225, 188, 188, 188, + 188, 188, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 229, 480, 480, 480, + 480, 480, 480, 229, 229, 229, 229, 229, 229, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 229, 229, 229, 229, 229, 229, 232, 480, + 480, 480, 480, 480, 480, 232, 232, 232, 232, 232, + 232, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 232, 232, 232, 232, 232, 232, + 201, 201, 201, 201, 201, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 235, + 480, 480, 480, 480, 480, 480, 235, 235, 235, 235, + 235, 235, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 235, 235, 235, 235, 235, + 235, 242, 480, 480, 480, 480, 480, 480, 242, 242, + 242, 242, 242, 242, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 242, 242, 242, + 242, 242, 242, 162, 162, 162, 162, 162, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 243, 480, 480, 480, 480, 480, 480, 243, + 243, 243, 243, 243, 243, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 243, 243, + 243, 243, 243, 243, 255, 480, 480, 480, 480, 480, + 480, 255, 255, 255, 255, 255, 255, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 255, 255, 255, 255, 255, 255, 108, 176, 176, 176, + 108, 480, 40, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 257, 480, 480, 480, 480, + 480, 480, 257, 257, 257, 257, 257, 257, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 41, 480, + 480, 257, 257, 257, 257, 257, 257, 259, 480, 480, + 480, 480, 480, 480, 259, 259, 259, 259, 259, 259, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 259, 259, 259, 259, 259, 259, 180, + 180, 180, 180, 180, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 260, 480, + 480, 480, 480, 480, 480, 260, 260, 260, 260, 260, + 260, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 260, 260, 260, 260, 260, 260, + 116, 116, 116, 116, 116, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 261, + + 480, 480, 480, 480, 480, 480, 261, 261, 261, 261, + 261, 261, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 261, 261, 261, 261, 261, + 261, 119, 183, 183, 183, 119, 480, 480, 480, 480, + 480, 480, 40, 480, 480, 480, 480, 480, 480, 480, + 262, 480, 480, 480, 480, 480, 480, 262, 262, 262, + 262, 262, 262, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 49, 480, 480, 262, 262, 262, 262, + + 262, 262, 188, 188, 188, 188, 188, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 264, 480, 480, 480, 480, 480, 480, 264, 264, + 264, 264, 264, 264, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 264, 264, 264, + 264, 264, 264, 265, 480, 480, 480, 480, 480, 480, + 265, 265, 265, 265, 265, 265, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 265, + + 265, 265, 265, 265, 265, 201, 201, 201, 201, 201, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 268, 480, 480, 480, 480, 480, + 480, 268, 268, 268, 268, 268, 268, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 268, 268, 268, 268, 268, 268, 274, 480, 480, 480, + 480, 480, 480, 274, 274, 274, 274, 274, 274, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 274, 274, 274, 274, 274, 274, 162, 162, + 162, 162, 162, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 275, 480, 480, + 480, 480, 480, 480, 275, 275, 275, 275, 275, 275, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 275, 275, 275, 275, 275, 275, 282, + 282, 282, 282, 288, 480, 290, 480, 480, 480, 480, + 290, 290, 291, 480, 480, 480, 480, 480, 292, 480, + 480, 480, 480, 480, 480, 292, 292, 292, 292, 292, + + 292, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 293, 480, 480, 292, 292, 292, 292, 292, 292, + 294, 480, 480, 480, 480, 480, 480, 294, 294, 294, + 294, 294, 294, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 294, 294, 294, 294, + 294, 294, 108, 176, 176, 176, 108, 480, 40, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 296, 480, 480, 480, 480, 480, 480, 296, 296, + + 296, 296, 296, 296, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 41, 480, 480, 296, 296, 296, + 296, 296, 296, 298, 480, 480, 480, 480, 480, 480, + 298, 298, 298, 298, 298, 298, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 115, 480, 480, 298, + 298, 298, 298, 298, 298, 180, 180, 180, 180, 180, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 299, 480, 480, 480, 480, 480, + + 480, 299, 299, 299, 299, 299, 299, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 115, 480, 480, + 299, 299, 299, 299, 299, 299, 116, 116, 116, 116, + 116, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 300, 480, 480, 480, 480, + 480, 480, 300, 300, 300, 300, 300, 300, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 300, 300, 300, 300, 300, 300, 119, 183, 183, + + 183, 119, 480, 480, 480, 480, 480, 480, 40, 480, + 480, 480, 480, 480, 480, 480, 301, 480, 480, 480, + 480, 480, 480, 301, 301, 301, 301, 301, 301, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 49, + 480, 480, 301, 301, 301, 301, 301, 301, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 90, 480, 480, + 480, 480, 480, 480, 90, 90, 90, 90, 90, 90, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 302, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 90, 90, 90, 90, 90, 90, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 302, 188, 188, 188, 188, 188, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 303, 480, 480, 480, 480, 480, 480, 303, 303, + 303, 303, 303, 303, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 303, 303, 303, + 303, 303, 303, 304, 480, 480, 480, 480, 480, 480, + + 304, 304, 304, 304, 304, 304, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 304, + 304, 304, 304, 304, 304, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 128, 480, 480, 480, 480, 480, + 480, 128, 128, 128, 128, 128, 128, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 128, 128, 128, 128, 128, 128, 201, 201, 201, 201, + + 201, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 306, 480, 480, 480, 480, + 480, 480, 306, 306, 306, 306, 306, 306, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 306, 306, 306, 306, 306, 306, 311, 480, 480, + 480, 480, 480, 480, 311, 311, 311, 311, 311, 311, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 311, 311, 311, 311, 311, 311, 162, + + 162, 162, 162, 162, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 312, 480, + 480, 480, 480, 480, 480, 312, 312, 312, 312, 312, + 312, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 312, 312, 312, 312, 312, 312, + 283, 283, 283, 322, 480, 480, 324, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 325, + 480, 480, 480, 480, 480, 480, 325, 325, 325, 325, + 325, 325, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 326, 480, 480, 325, 325, 325, 325, 325, + 325, 286, 286, 286, 327, 480, 480, 480, 480, 480, + 480, 480, 329, 480, 480, 480, 480, 480, 480, 480, + 330, 480, 480, 480, 480, 480, 480, 330, 330, 330, + 330, 330, 330, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 331, 480, 480, 330, 330, 330, 330, + 330, 330, 288, 288, 288, 288, 288, 480, 480, 480, + 480, 480, 480, 480, 480, 253, 480, 480, 480, 480, + + 480, 332, 480, 480, 480, 480, 480, 480, 332, 332, + 332, 332, 332, 332, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 254, 480, 480, 332, 332, 332, + 332, 332, 332, 282, 282, 282, 282, 288, 480, 290, + 480, 480, 480, 480, 290, 290, 291, 480, 480, 480, + 480, 480, 292, 480, 480, 480, 480, 480, 480, 292, + 292, 292, 292, 292, 292, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 293, 480, 480, 292, 292, + + 292, 292, 292, 292, 333, 480, 480, 480, 480, 480, + 480, 333, 333, 333, 333, 333, 333, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 333, 333, 333, 333, 333, 333, 108, 176, 176, 176, + 108, 480, 40, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 335, 480, 480, 480, 480, + 480, 480, 335, 335, 335, 335, 335, 335, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 41, 480, + + 480, 335, 335, 335, 335, 335, 335, 180, 180, 180, + 180, 180, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 336, 480, 480, 480, + 480, 480, 480, 336, 336, 336, 336, 336, 336, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 115, + 480, 480, 336, 336, 336, 336, 336, 336, 116, 116, + 116, 116, 116, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 337, 480, 480, + 480, 480, 480, 480, 337, 337, 337, 337, 337, 337, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 337, 337, 337, 337, 337, 337, 119, + 183, 183, 183, 119, 480, 480, 480, 480, 480, 480, + 40, 480, 480, 480, 480, 480, 480, 480, 338, 480, + 480, 480, 480, 480, 480, 338, 338, 338, 338, 338, + 338, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 49, 480, 480, 338, 338, 338, 338, 338, 338, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 339, 480, 480, 90, + 480, 480, 480, 480, 480, 480, 90, 90, 90, 90, + 90, 90, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 90, 90, 90, 90, 90, + 90, 188, 188, 188, 188, 188, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 340, 480, 480, 480, 480, 480, 480, 340, 340, 340, + 340, 340, 340, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 340, 340, 340, 340, + 340, 340, 147, 147, 147, 147, 147, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 341, 480, 480, 480, 480, 480, 480, 341, 341, + 341, 341, 341, 341, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 341, 341, 341, + 341, 341, 341, 201, 201, 201, 201, 201, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 343, 480, 480, 480, 480, 480, 480, 343, + + 343, 343, 343, 343, 343, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 343, 343, + 343, 343, 343, 343, 347, 480, 480, 480, 480, 480, + 480, 347, 347, 347, 347, 347, 347, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 347, 347, 347, 347, 347, 347, 162, 162, 162, 162, + 162, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 348, 480, 480, 480, 480, + + 480, 480, 348, 348, 348, 348, 348, 348, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 348, 348, 348, 348, 348, 348, 323, 359, 359, + 359, 323, 480, 284, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 360, 480, 480, 480, + 480, 480, 480, 360, 360, 360, 360, 360, 360, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 285, + 480, 480, 360, 360, 360, 360, 360, 360, 283, 283, + + 283, 322, 480, 480, 324, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 325, 480, 480, + 480, 480, 480, 480, 325, 325, 325, 325, 325, 325, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 326, 480, 480, 325, 325, 325, 325, 325, 325, 328, + 363, 363, 363, 328, 480, 480, 480, 480, 480, 480, + 284, 480, 480, 480, 480, 480, 480, 480, 364, 480, + 480, 480, 480, 480, 480, 364, 364, 364, 364, 364, + 364, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 287, 480, 480, 364, 364, 364, 364, 364, 364, + 286, 286, 286, 327, 480, 480, 480, 480, 480, 480, + 480, 329, 480, 480, 480, 480, 480, 480, 480, 330, + 480, 480, 480, 480, 480, 480, 330, 330, 330, 330, + 330, 330, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 331, 480, 480, 330, 330, 330, 330, 330, + 330, 288, 288, 288, 288, 288, 480, 480, 480, 480, + 480, 480, 480, 480, 253, 480, 480, 480, 480, 480, + + 365, 480, 480, 480, 480, 480, 480, 365, 365, 365, + 365, 365, 365, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 254, 480, 480, 365, 365, 365, 365, + 365, 365, 367, 480, 480, 480, 480, 480, 480, 367, + 367, 367, 367, 367, 367, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 367, 367, + 367, 367, 367, 367, 113, 480, 480, 480, 480, 480, + 480, 113, 113, 113, 113, 113, 113, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 113, 113, 113, 113, 113, 113, 369, 480, 480, 480, + 480, 480, 480, 369, 369, 369, 369, 369, 369, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 369, 369, 369, 369, 369, 369, 147, 147, + 147, 147, 147, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 128, 480, 480, + 480, 480, 480, 480, 128, 128, 128, 128, 128, 128, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 128, 128, 128, 128, 128, 128, 201, + 201, 201, 201, 201, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 371, 480, + 480, 480, 480, 480, 480, 371, 371, 371, 371, 371, + 371, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 371, 371, 371, 371, 371, 371, + 375, 480, 480, 480, 480, 480, 480, 375, 375, 375, + + 375, 375, 375, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 375, 375, 375, 375, + 375, 375, 376, 480, 480, 480, 480, 480, 480, 376, + 376, 376, 376, 376, 376, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 376, 376, + 376, 376, 376, 376, 288, 288, 288, 288, 288, 480, + 480, 480, 480, 480, 480, 480, 480, 253, 480, 480, + 480, 480, 480, 377, 480, 480, 480, 480, 480, 480, + + 377, 377, 377, 377, 377, 377, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 254, 480, 480, 377, + 377, 377, 377, 377, 377, 380, 480, 480, 480, 480, + 480, 480, 381, 480, 382, 480, 480, 480, 480, 383, + 384, 480, 480, 385, 480, 480, 480, 480, 153, 480, + 480, 480, 480, 480, 380, 480, 480, 480, 480, 480, + 381, 480, 382, 480, 480, 480, 480, 383, 384, 480, + 480, 385, 389, 480, 480, 480, 480, 480, 480, 389, + 389, 389, 389, 389, 389, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 389, 389, + 389, 389, 389, 389, 390, 480, 480, 480, 480, 480, + 480, 390, 390, 390, 390, 390, 390, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 390, 390, 390, 390, 390, 390, 391, 480, 480, 480, + 480, 480, 480, 391, 391, 391, 391, 391, 391, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 391, 391, 391, 391, 391, 391, 399, 480, + 480, 480, 480, 480, 480, 399, 399, 399, 399, 399, + 399, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 399, 399, 399, 399, 399, 399, + 400, 480, 480, 480, 480, 480, 480, 400, 400, 400, + 400, 400, 400, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 400, 400, 400, 400, + 400, 400, 401, 480, 480, 480, 480, 480, 480, 401, + + 401, 401, 401, 401, 401, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 401, 401, + 401, 401, 401, 401, 411, 480, 480, 480, 480, 480, + 480, 411, 411, 411, 411, 411, 411, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 411, 411, 411, 411, 411, 411, 412, 480, 480, 480, + 480, 480, 480, 412, 412, 412, 412, 412, 412, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 412, 412, 412, 412, 412, 412, 430, 480, + 480, 480, 480, 480, 480, 430, 430, 430, 430, 430, + 430, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 430, 430, 430, 430, 430, 430, + 439, 480, 480, 480, 480, 480, 480, 439, 439, 439, + 439, 439, 439, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 439, 439, 439, 439, + + 439, 439, 440, 440, 440, 440, 440, 480, 480, 480, + 480, 480, 480, 480, 480, 426, 480, 480, 480, 480, + 480, 441, 480, 480, 480, 480, 480, 480, 441, 441, + 441, 441, 441, 441, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 428, 480, 480, 441, 441, 441, + 441, 441, 441, 447, 447, 447, 447, 447, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 448, 480, 480, 480, 480, 480, 480, 448, + 448, 448, 448, 448, 448, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 448, 448, + 448, 448, 448, 448, 449, 480, 480, 480, 480, 480, + 480, 449, 449, 449, 449, 449, 449, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 449, 449, 449, 449, 449, 449, 454, 480, 480, 480, + 480, 480, 480, 454, 454, 454, 454, 454, 454, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 454, 454, 454, 454, 454, 454, 455, 480, + 480, 480, 480, 480, 480, 455, 455, 455, 455, 455, + 455, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 455, 455, 455, 455, 455, 455, + 460, 480, 480, 480, 480, 480, 480, 460, 460, 460, + 460, 460, 460, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 460, 460, 460, 460, + 460, 460, 461, 480, 480, 480, 480, 480, 480, 461, + + 461, 461, 461, 461, 461, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 461, 461, + 461, 461, 461, 461, 466, 480, 480, 480, 480, 480, + 480, 466, 466, 466, 466, 466, 466, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 466, 466, 466, 466, 466, 466, 467, 480, 480, 480, + 480, 480, 480, 467, 467, 467, 467, 467, 467, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 467, 467, 467, 467, 467, 467, 471, 480, + 480, 480, 480, 480, 480, 471, 471, 471, 471, 471, + 471, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 471, 471, 471, 471, 471, 471, + 39, 480, 480, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 45, 45, 480, 45, 45, 48, 480, + 480, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 53, 53, 480, 53, 53, 81, 480, 480, 81, + + 81, 90, 480, 90, 90, 480, 90, 90, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 113, 113, 478, 113, 113, 116, 116, 116, 116, + 108, 113, 113, 480, 113, 113, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 128, 128, 478, 128, 128, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 151, 151, - 478, 151, 151, 159, 159, 159, 159, 159, 159, 159, + 126, 126, 126, 128, 128, 480, 128, 128, 147, 147, + 147, 147, 147, 147, 147, 147, 147, 147, 152, 152, + 480, 152, 152, 160, 160, 160, 160, 160, 160, 160, - 159, 159, 159, 161, 161, 161, 161, 161, 161, 161, - 161, 161, 161, 166, 166, 166, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 48, 48, 478, 48, + 160, 160, 160, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 167, 167, 167, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 48, 48, 480, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - - 211, 211, 211, 211, 39, 478, 478, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 243, 243, 243, 243, 248, 248, 248, 248, 248, - 248, 478, 248, 248, 248, 248, 248, 248, 39, 39, + 126, 126, 126, 126, 126, 126, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + + 213, 213, 213, 213, 39, 480, 480, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 245, 245, 245, 245, 250, 250, 250, 250, 250, + 250, 480, 250, 250, 250, 250, 250, 250, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 275, 275, 275, 275, 248, - 248, 248, 248, 248, 248, 478, 248, 248, 248, 248, - 248, 248, 281, 478, 478, 281, 281, 281, 281, 281, - - 281, 281, 281, 281, 281, 284, 478, 478, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 287, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 113, 113, 478, 113, 113, 48, + 39, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 277, 277, 277, 277, 250, + 250, 250, 250, 250, 250, 480, 250, 250, 250, 250, + 250, 250, 283, 480, 480, 283, 283, 283, 283, 283, + + 283, 283, 283, 283, 283, 286, 480, 480, 286, 286, + 286, 286, 286, 286, 286, 286, 286, 286, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 113, 113, 480, 113, 113, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 312, 312, 312, 312, 321, 321, 321, 321, - 321, 321, 321, 321, 321, 321, 321, 321, 321, 284, - 478, 478, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 326, 326, 326, 326, 326, 326, 326, 326, - - 326, 326, 326, 326, 326, 248, 248, 248, 248, 248, - 478, 478, 248, 248, 248, 248, 248, 248, 287, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 113, 113, 478, 113, 113, 48, + 48, 48, 314, 314, 314, 314, 323, 323, 323, 323, + 323, 323, 323, 323, 323, 323, 323, 323, 323, 286, + 480, 480, 286, 286, 286, 286, 286, 286, 286, 286, + 286, 286, 328, 328, 328, 328, 328, 328, 328, 328, + + 328, 328, 328, 328, 328, 250, 250, 250, 250, 250, + 480, 480, 250, 250, 250, 250, 250, 250, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 113, 113, 480, 113, 113, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 348, 348, 348, 348, 281, 281, 478, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 321, - 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, - 321, 321, 284, 284, 478, 284, 284, 284, 284, 284, - - 284, 284, 284, 284, 284, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 248, 248, - 248, 248, 248, 478, 478, 248, 248, 248, 248, 248, - 248, 413, 413, 413, 413, 478, 478, 478, 478, 413, - 478, 478, 413, 413, 425, 425, 425, 425, 478, 478, - 478, 425, 425, 425, 478, 425, 425, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 436, 436, 436, - 436, 436, 436, 436, 436, 436, 436, 7, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478 + 48, 48, 350, 350, 350, 350, 283, 283, 480, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 323, + 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, + 323, 323, 286, 286, 480, 286, 286, 286, 286, 286, + + 286, 286, 286, 286, 286, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 250, 250, + 250, 250, 250, 480, 480, 250, 250, 250, 250, 250, + 250, 415, 415, 415, 415, 480, 480, 480, 480, 415, + 480, 480, 415, 415, 427, 427, 427, 427, 480, 480, + 480, 427, 427, 427, 480, 427, 427, 429, 429, 429, + 429, 429, 429, 429, 429, 429, 429, 438, 438, 438, + 438, 438, 438, 438, 438, 438, 438, 7, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480 } ; static yyconst flex_int16_t yy_chk[6664] = @@ -1051,730 +1053,730 @@ static yyconst flex_int16_t yy_chk[6664] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 4, 6, 15, - 12, 3, 477, 4, 9, 9, 9, 9, 9, 10, + 12, 3, 479, 4, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 3, 3, 4, 4, 11, 11, 11, 11, 11, 23, 39, 5, 17, 6, 35, 17, 3, 24, 4, 32, 24, 24, 32, 32, 38, 48, 15, 69, 3, 3, 4, 4, 12, 42, 25, 17, - 42, 25, 11, 474, 69, 3, 35, 4, 17, 24, + 42, 25, 11, 476, 69, 3, 35, 4, 17, 24, 53, 32, 17, 23, 31, 78, 38, 78, 35, 69, - 39, 24, 467, 32, 33, 461, 65, 17, 83, 25, + 39, 24, 469, 32, 33, 463, 65, 17, 83, 25, 48, 11, 13, 42, 35, 13, 17, 24, 25, 32, 83, 31, 13, 13, 13, 13, 13, 13, 65, 54, 53, 33, 54, 54, 31, 65, 83, 25, 36, 36, - 36, 36, 36, 70, 33, 68, 68, 456, 13, 31, - 166, 13, 13, 13, 13, 13, 13, 20, 166, 33, - 211, 90, 70, 440, 20, 20, 434, 20, 211, 54, + 36, 36, 36, 70, 33, 68, 68, 458, 13, 31, + 167, 13, 13, 13, 13, 13, 13, 20, 167, 33, + 213, 90, 70, 442, 20, 20, 436, 20, 213, 54, 124, 124, 70, 68, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 90, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 64, 52, - 106, 20, 22, 74, 55, 429, 37, 37, 37, 37, - - 37, 57, 64, 57, 22, 243, 487, 22, 487, 52, - 22, 419, 55, 243, 22, 22, 64, 22, 106, 74, - 67, 66, 74, 57, 72, 72, 385, 127, 22, 67, - 37, 127, 66, 22, 55, 66, 22, 52, 71, 22, - 97, 55, 22, 22, 71, 22, 26, 73, 67, 66, - 82, 57, 71, 26, 26, 26, 26, 26, 26, 37, - 66, 72, 108, 109, 73, 80, 71, 76, 73, 82, - 107, 73, 71, 76, 86, 107, 73, 85, 140, 82, - 97, 384, 26, 26, 26, 26, 26, 26, 41, 41, - 41, 41, 73, 118, 41, 76, 73, 80, 84, 85, - - 86, 80, 87, 86, 348, 175, 85, 41, 108, 109, - 96, 140, 84, 93, 41, 41, 41, 41, 41, 41, - 93, 107, 94, 119, 102, 80, 84, 104, 87, 342, - 250, 87, 103, 119, 118, 96, 317, 105, 161, 316, - 41, 102, 315, 41, 41, 41, 41, 41, 41, 44, - 96, 175, 104, 93, 314, 94, 44, 44, 44, 44, - 44, 44, 94, 96, 102, 103, 120, 104, 105, 125, - 102, 250, 103, 275, 119, 131, 120, 105, 161, 134, - 104, 275, 44, 94, 125, 44, 44, 44, 44, 44, - 44, 46, 144, 103, 150, 131, 105, 145, 46, 46, - - 46, 46, 46, 46, 131, 134, 145, 165, 134, 125, - 137, 137, 148, 125, 156, 144, 150, 120, 192, 153, - 226, 144, 148, 150, 226, 145, 154, 46, 46, 46, - 46, 46, 46, 49, 49, 49, 49, 156, 137, 154, - 148, 157, 155, 156, 49, 153, 158, 165, 153, 174, - 190, 192, 49, 155, 154, 157, 168, 170, 164, 49, - 49, 49, 49, 49, 49, 164, 158, 171, 173, 157, - 155, 172, 182, 190, 235, 158, 184, 174, 216, 190, - 249, 499, 182, 499, 284, 49, 194, 217, 49, 49, - 49, 49, 49, 49, 56, 196, 168, 170, 164, 194, - - 184, 56, 56, 56, 56, 56, 56, 171, 173, 172, - 235, 172, 201, 198, 194, 217, 184, 196, 216, 325, - 293, 201, 202, 182, 196, 284, 249, 203, 184, 202, - 56, 56, 56, 56, 56, 56, 77, 172, 198, 203, - 201, 204, 198, 77, 77, 77, 77, 77, 77, 293, - 202, 231, 232, 234, 390, 203, 281, 320, 390, 204, - 325, 234, 205, 492, 492, 231, 254, 509, 232, 509, - 204, 206, 77, 77, 77, 77, 77, 77, 88, 231, - 232, 234, 224, 236, 205, 88, 88, 88, 88, 88, - 88, 205, 236, 206, 254, 214, 214, 214, 214, 214, - - 206, 214, 281, 320, 224, 265, 214, 313, 214, 237, - 306, 236, 332, 238, 88, 88, 88, 88, 88, 88, - 91, 238, 224, 265, 364, 307, 271, 91, 91, 91, - 91, 91, 91, 224, 265, 237, 306, 271, 237, 306, - 332, 238, 247, 247, 247, 247, 247, 214, 247, 267, - 296, 268, 364, 247, 271, 247, 91, 91, 91, 91, - 91, 91, 98, 98, 98, 98, 98, 279, 511, 337, - 511, 267, 268, 340, 98, 269, 303, 305, 267, 312, - 268, 98, 269, 303, 305, 278, 308, 312, 98, 98, - 98, 98, 98, 98, 247, 248, 248, 248, 248, 248, - - 337, 248, 277, 269, 303, 305, 248, 276, 248, 340, - 463, 515, 308, 515, 98, 308, 270, 98, 98, 98, - 98, 98, 98, 110, 110, 110, 110, 110, 337, 110, - 280, 280, 280, 280, 280, 282, 282, 282, 282, 282, - 321, 343, 110, 280, 246, 321, 463, 248, 282, 110, - 110, 110, 110, 110, 110, 286, 286, 286, 286, 286, - 318, 318, 318, 318, 318, 343, 245, 366, 286, 517, - 343, 517, 370, 318, 394, 110, 344, 366, 110, 110, - 110, 110, 110, 110, 111, 111, 111, 111, 244, 394, - 111, 321, 239, 229, 370, 287, 287, 287, 287, 287, - - 344, 370, 394, 111, 383, 344, 366, 286, 287, 228, - 111, 111, 111, 111, 111, 111, 288, 288, 288, 288, - 288, 289, 289, 289, 289, 289, 356, 225, 326, 288, - 383, 356, 213, 383, 289, 392, 111, 392, 326, 111, - 111, 111, 111, 111, 111, 114, 393, 287, 462, 212, - 462, 403, 114, 114, 114, 114, 114, 114, 322, 322, - 322, 322, 322, 392, 322, 357, 199, 193, 288, 393, - 357, 322, 403, 289, 191, 393, 462, 356, 114, 326, - 403, 114, 114, 114, 114, 114, 114, 115, 189, 327, - 327, 327, 327, 327, 115, 115, 115, 115, 115, 115, - - 327, 187, 327, 331, 331, 331, 331, 331, 185, 179, - 322, 333, 333, 333, 333, 333, 357, 333, 167, 331, - 371, 163, 159, 115, 115, 115, 115, 115, 115, 117, - 117, 117, 117, 117, 346, 346, 346, 346, 346, 151, - 149, 327, 371, 336, 336, 336, 336, 336, 117, 371, - 346, 360, 361, 146, 336, 117, 117, 117, 117, 117, - 117, 360, 361, 333, 365, 365, 365, 365, 365, 416, - 345, 345, 345, 345, 345, 367, 367, 367, 367, 367, - 143, 142, 416, 377, 117, 117, 117, 117, 117, 117, - 121, 121, 121, 121, 121, 336, 524, 416, 524, 141, - - 441, 121, 360, 361, 369, 369, 369, 369, 369, 121, - 377, 378, 379, 139, 441, 380, 121, 121, 121, 121, - 121, 121, 345, 355, 355, 355, 355, 355, 441, 355, - 527, 415, 527, 378, 379, 138, 355, 380, 377, 415, - 378, 379, 121, 395, 380, 121, 121, 121, 121, 121, - 121, 122, 122, 122, 122, 381, 369, 136, 395, 415, - 418, 381, 122, 359, 359, 359, 359, 359, 382, 391, - 122, 395, 391, 402, 359, 355, 359, 122, 122, 122, - 122, 122, 122, 381, 135, 401, 418, 133, 407, 418, - 382, 402, 132, 391, 407, 130, 405, 382, 391, 396, - - 401, 391, 402, 122, 128, 396, 122, 122, 122, 122, - 122, 122, 129, 401, 396, 359, 407, 406, 405, 129, - 129, 129, 129, 129, 129, 405, 537, 396, 537, 544, - 545, 544, 545, 396, 399, 399, 399, 399, 399, 406, - 126, 404, 408, 116, 113, 95, 406, 399, 129, 129, - 129, 129, 129, 129, 147, 147, 147, 147, 147, 404, - 408, 92, 81, 79, 410, 410, 410, 410, 410, 417, - 404, 408, 75, 147, 63, 410, 420, 61, 417, 421, - 147, 147, 147, 147, 147, 147, 399, 400, 400, 400, - 400, 400, 409, 409, 409, 409, 409, 417, 409, 60, - - 420, 421, 59, 400, 58, 420, 147, 51, 421, 147, - 147, 147, 147, 147, 147, 152, 410, 411, 411, 411, - 411, 411, 152, 152, 152, 152, 152, 152, 413, 413, - 413, 413, 413, 411, 45, 29, 28, 422, 27, 400, - 21, 413, 430, 19, 409, 435, 412, 412, 412, 412, - 412, 152, 152, 152, 152, 152, 152, 160, 160, 160, - 160, 160, 412, 422, 430, 18, 422, 432, 431, 411, - 435, 430, 433, 16, 435, 442, 160, 432, 468, 433, - 413, 442, 448, 160, 160, 160, 160, 160, 160, 423, - 423, 423, 423, 423, 431, 432, 443, 431, 412, 14, - - 433, 468, 423, 442, 448, 449, 7, 468, 443, 160, - 444, 448, 160, 160, 160, 160, 160, 160, 162, 162, - 162, 162, 162, 0, 443, 444, 0, 449, 425, 425, - 425, 425, 425, 450, 449, 0, 454, 162, 444, 0, - 451, 425, 450, 0, 162, 162, 162, 162, 162, 162, - 427, 427, 427, 427, 427, 436, 436, 436, 436, 436, - 0, 450, 451, 427, 454, 466, 0, 0, 436, 451, - 0, 466, 454, 162, 162, 162, 162, 162, 162, 169, - 425, 438, 438, 438, 438, 438, 169, 169, 169, 169, - 169, 169, 454, 466, 438, 0, 0, 0, 457, 0, - - 455, 460, 427, 476, 0, 0, 457, 436, 471, 455, - 460, 476, 472, 0, 473, 169, 169, 169, 169, 169, - 169, 176, 176, 176, 176, 176, 457, 176, 455, 460, - 471, 476, 0, 438, 472, 0, 0, 471, 473, 0, - 176, 472, 0, 473, 0, 0, 0, 176, 176, 176, - 176, 176, 176, 445, 445, 445, 445, 445, 465, 465, - 465, 465, 465, 0, 0, 0, 445, 0, 0, 0, - 0, 465, 0, 176, 0, 0, 176, 176, 176, 176, - 176, 176, 178, 469, 469, 469, 469, 469, 470, 178, - 178, 178, 178, 178, 178, 0, 469, 0, 0, 0, - - 0, 0, 475, 470, 0, 445, 0, 0, 0, 0, - 465, 0, 0, 0, 0, 0, 470, 475, 178, 178, - 178, 178, 178, 178, 180, 180, 180, 180, 180, 0, - 475, 0, 0, 0, 0, 469, 0, 0, 0, 0, - 0, 0, 0, 180, 0, 0, 0, 0, 0, 0, - 180, 180, 180, 180, 180, 180, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, - 180, 180, 180, 180, 180, 181, 181, 181, 181, 181, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 181, 0, 0, 0, 0, 0, - 0, 181, 181, 181, 181, 181, 181, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 181, 181, 181, 181, 181, 181, 183, 183, 183, 183, - 183, 0, 0, 0, 0, 0, 0, 183, 0, 0, - 0, 0, 0, 0, 0, 183, 0, 0, 0, 0, - 0, 0, 183, 183, 183, 183, 183, 183, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 183, 0, - - 0, 183, 183, 183, 183, 183, 183, 188, 188, 188, - 188, 188, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 188, 0, 0, 0, - 0, 0, 0, 188, 188, 188, 188, 188, 188, 0, + 80, 20, 22, 489, 55, 489, 37, 37, 37, 37, + + 37, 57, 64, 57, 22, 245, 501, 22, 501, 52, + 22, 131, 55, 245, 22, 22, 64, 22, 494, 494, + 67, 66, 80, 57, 72, 72, 80, 97, 22, 67, + 37, 131, 66, 22, 55, 66, 22, 52, 71, 22, + 131, 55, 22, 22, 71, 22, 26, 73, 67, 66, + 80, 57, 71, 26, 26, 26, 26, 26, 26, 37, + 66, 72, 108, 118, 73, 84, 71, 97, 73, 74, + 93, 73, 71, 74, 109, 76, 73, 93, 106, 84, + 82, 76, 26, 26, 26, 26, 26, 26, 41, 41, + 41, 41, 73, 84, 41, 74, 73, 86, 74, 82, + + 85, 87, 74, 76, 118, 237, 106, 41, 108, 82, + 93, 105, 96, 104, 41, 41, 41, 41, 41, 41, + 109, 431, 85, 86, 127, 119, 86, 87, 127, 85, + 87, 94, 421, 102, 103, 119, 140, 96, 104, 387, + 41, 237, 105, 41, 41, 41, 41, 41, 41, 44, + 102, 105, 96, 104, 134, 386, 44, 44, 44, 44, + 44, 44, 120, 107, 94, 96, 104, 103, 107, 140, + 105, 94, 120, 102, 103, 162, 119, 175, 125, 102, + 134, 144, 44, 134, 149, 44, 44, 44, 44, 44, + 44, 46, 94, 125, 149, 103, 137, 137, 46, 46, + + 46, 46, 46, 46, 144, 175, 350, 344, 176, 145, + 144, 146, 149, 120, 107, 162, 151, 154, 125, 157, + 146, 319, 125, 145, 137, 166, 169, 46, 46, 46, + 46, 46, 46, 49, 49, 49, 49, 145, 151, 146, + 155, 158, 157, 154, 49, 151, 154, 156, 157, 193, + 159, 318, 49, 155, 176, 158, 171, 172, 156, 49, + 49, 49, 49, 49, 49, 166, 169, 165, 155, 158, + 159, 173, 174, 183, 165, 156, 185, 218, 317, 159, + 204, 316, 193, 183, 295, 49, 196, 204, 49, 49, + 49, 49, 49, 49, 56, 219, 171, 172, 191, 196, + + 185, 56, 56, 56, 56, 56, 56, 165, 204, 173, + 203, 173, 174, 295, 196, 315, 185, 218, 251, 203, + 198, 191, 206, 219, 183, 200, 252, 191, 185, 205, + 56, 56, 56, 56, 56, 56, 77, 173, 203, 207, + 206, 205, 198, 77, 77, 77, 77, 77, 77, 198, + 200, 206, 228, 239, 200, 233, 228, 205, 277, 226, + 283, 207, 208, 314, 251, 342, 277, 252, 207, 233, + 286, 314, 77, 77, 77, 77, 77, 77, 88, 239, + 256, 226, 239, 233, 208, 88, 88, 88, 88, 88, + 88, 208, 216, 216, 216, 216, 216, 234, 216, 226, + + 322, 342, 327, 216, 267, 216, 283, 309, 256, 308, + 226, 286, 238, 234, 88, 88, 88, 88, 88, 88, + 91, 238, 267, 269, 310, 234, 236, 91, 91, 91, + 91, 91, 91, 267, 236, 308, 323, 298, 308, 240, + 238, 323, 271, 327, 216, 269, 322, 240, 270, 271, + 310, 334, 269, 310, 236, 281, 91, 91, 91, 91, + 91, 91, 98, 98, 98, 98, 98, 240, 392, 270, + 271, 273, 392, 305, 98, 366, 307, 270, 280, 334, + 305, 98, 273, 307, 345, 339, 346, 323, 98, 98, + 98, 98, 98, 98, 249, 249, 249, 249, 249, 273, + + 249, 305, 368, 366, 307, 249, 279, 249, 345, 511, + 346, 511, 368, 345, 98, 346, 339, 98, 98, 98, + 98, 98, 98, 110, 110, 110, 110, 110, 465, 110, + 282, 282, 282, 282, 282, 284, 284, 284, 284, 284, + 358, 368, 110, 282, 339, 358, 249, 379, 284, 110, + 110, 110, 110, 110, 110, 250, 250, 250, 250, 250, + 394, 250, 394, 385, 465, 445, 250, 278, 250, 367, + 367, 367, 367, 367, 379, 110, 272, 445, 110, 110, + 110, 110, 110, 110, 111, 111, 111, 111, 394, 385, + 111, 358, 385, 445, 248, 288, 288, 288, 288, 288, + + 359, 247, 379, 111, 372, 359, 405, 250, 288, 246, + 111, 111, 111, 111, 111, 111, 289, 289, 289, 289, + 289, 290, 290, 290, 290, 290, 372, 405, 328, 289, + 513, 241, 513, 372, 290, 405, 111, 231, 328, 111, + 111, 111, 111, 111, 111, 114, 395, 288, 420, 230, + 227, 359, 114, 114, 114, 114, 114, 114, 291, 291, + 291, 291, 291, 320, 320, 320, 320, 320, 289, 395, + 362, 291, 215, 290, 420, 395, 320, 420, 114, 328, + 362, 114, 114, 114, 114, 114, 114, 115, 214, 333, + 333, 333, 333, 333, 115, 115, 115, 115, 115, 115, + + 324, 324, 324, 324, 324, 333, 324, 517, 201, 517, + 291, 417, 434, 324, 335, 335, 335, 335, 335, 417, + 335, 362, 434, 115, 115, 115, 115, 115, 115, 117, + 117, 117, 117, 117, 348, 348, 348, 348, 348, 417, + 434, 195, 194, 338, 338, 338, 338, 338, 117, 192, + 348, 373, 324, 190, 338, 117, 117, 117, 117, 117, + 117, 329, 329, 329, 329, 329, 335, 369, 369, 369, + 369, 369, 329, 373, 329, 347, 347, 347, 347, 347, + 373, 380, 404, 381, 117, 117, 117, 117, 117, 117, + 121, 121, 121, 121, 121, 338, 519, 526, 519, 526, + + 404, 121, 383, 380, 363, 381, 188, 186, 383, 121, + 380, 404, 381, 329, 363, 180, 121, 121, 121, 121, + 121, 121, 357, 357, 357, 357, 357, 347, 357, 396, + 383, 464, 419, 464, 382, 357, 371, 371, 371, 371, + 371, 419, 121, 384, 396, 121, 121, 121, 121, 121, + 121, 122, 122, 122, 122, 363, 382, 396, 168, 464, + 419, 397, 122, 382, 435, 384, 393, 164, 160, 393, + 122, 435, 384, 406, 357, 407, 397, 122, 122, 122, + 122, 122, 122, 361, 361, 361, 361, 361, 371, 397, + 393, 406, 435, 152, 361, 393, 361, 407, 393, 398, + + 403, 422, 406, 122, 407, 398, 122, 122, 122, 122, + 122, 122, 129, 410, 398, 403, 529, 150, 529, 129, + 129, 129, 129, 129, 129, 422, 147, 398, 403, 143, + 422, 410, 409, 398, 539, 361, 539, 546, 409, 546, + 408, 142, 410, 402, 402, 402, 402, 402, 129, 129, + 129, 129, 129, 129, 148, 148, 148, 148, 148, 402, + 409, 141, 408, 418, 401, 401, 401, 401, 401, 408, + 139, 138, 423, 148, 136, 135, 418, 401, 133, 424, + 148, 148, 148, 148, 148, 148, 411, 411, 411, 411, + 411, 418, 411, 132, 423, 402, 412, 412, 412, 412, + + 412, 423, 547, 130, 547, 424, 148, 412, 424, 148, + 148, 148, 148, 148, 148, 153, 401, 413, 413, 413, + 413, 413, 153, 153, 153, 153, 153, 153, 414, 414, + 414, 414, 414, 413, 128, 126, 116, 113, 411, 95, + 92, 81, 433, 79, 414, 432, 75, 63, 412, 61, + 60, 153, 153, 153, 153, 153, 153, 161, 161, 161, + 161, 161, 425, 425, 425, 425, 425, 432, 433, 413, + 437, 433, 444, 459, 432, 425, 161, 59, 444, 446, + 414, 459, 443, 161, 161, 161, 161, 161, 161, 415, + 415, 415, 415, 415, 446, 437, 443, 468, 58, 437, + + 444, 459, 415, 468, 51, 450, 451, 446, 472, 161, + 443, 477, 161, 161, 161, 161, 161, 161, 163, 163, + 163, 163, 163, 472, 45, 468, 477, 450, 451, 427, + 427, 427, 427, 427, 450, 451, 472, 163, 453, 477, + 473, 415, 427, 470, 163, 163, 163, 163, 163, 163, + 429, 429, 429, 429, 429, 438, 438, 438, 438, 438, + 453, 29, 473, 429, 28, 27, 470, 453, 438, 473, + 456, 452, 470, 163, 163, 163, 163, 163, 163, 170, + 452, 427, 474, 21, 475, 19, 170, 170, 170, 170, + 170, 170, 440, 440, 440, 440, 440, 18, 456, 452, + + 457, 462, 429, 16, 474, 440, 456, 438, 475, 457, + 462, 474, 14, 475, 7, 170, 170, 170, 170, 170, + 170, 177, 177, 177, 177, 177, 456, 177, 457, 462, + 0, 0, 447, 447, 447, 447, 447, 0, 0, 0, + 177, 0, 0, 0, 440, 447, 0, 177, 177, 177, + 177, 177, 177, 467, 467, 467, 467, 467, 471, 471, + 471, 471, 471, 0, 0, 0, 467, 478, 0, 0, + 0, 471, 0, 177, 0, 478, 177, 177, 177, 177, + 177, 177, 179, 0, 447, 0, 0, 0, 0, 179, + 179, 179, 179, 179, 179, 478, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 467, 0, 0, 0, 0, + 471, 0, 0, 0, 0, 0, 0, 0, 179, 179, + 179, 179, 179, 179, 181, 181, 181, 181, 181, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 181, 0, 0, 0, 0, 0, 0, + 181, 181, 181, 181, 181, 181, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, + 181, 181, 181, 181, 181, 182, 182, 182, 182, 182, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 182, 0, 0, 0, 0, 0, + 0, 182, 182, 182, 182, 182, 182, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 182, 182, 182, 182, 182, 182, 184, 184, 184, 184, + 184, 0, 0, 0, 0, 0, 0, 184, 0, 0, + 0, 0, 0, 0, 0, 184, 0, 0, 0, 0, + 0, 0, 184, 184, 184, 184, 184, 184, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, + + 0, 184, 184, 184, 184, 184, 184, 189, 189, 189, + 189, 189, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 189, 0, 0, 0, + 0, 0, 0, 189, 189, 189, 189, 189, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 188, 188, 188, 188, 188, 188, 195, 0, - 0, 0, 0, 0, 0, 195, 195, 195, 195, 195, - 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 189, 189, 189, 189, 189, 189, 197, 0, + 0, 0, 0, 0, 0, 197, 197, 197, 197, 197, + 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 195, 195, 195, 195, 195, 195, - 200, 200, 200, 200, 200, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, - 0, 0, 0, 0, 0, 0, 200, 200, 200, 200, - 200, 200, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 197, 197, 197, 197, 197, 197, + 202, 202, 202, 202, 202, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, + 0, 0, 0, 0, 0, 0, 202, 202, 202, 202, + 202, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 200, 200, 200, 200, 200, - 200, 207, 0, 0, 0, 0, 0, 0, 207, 207, - 207, 207, 207, 207, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 202, 202, 202, 202, 202, + 202, 209, 0, 0, 0, 0, 0, 0, 209, 209, + 209, 209, 209, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 207, 207, 207, - 207, 207, 207, 208, 208, 208, 208, 208, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 209, 209, 209, + 209, 209, 209, 210, 210, 210, 210, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 208, 0, 0, 0, 0, 0, 0, 208, - 208, 208, 208, 208, 208, 0, 0, 0, 0, 0, + 0, 0, 210, 0, 0, 0, 0, 0, 0, 210, + 210, 210, 210, 210, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 208, 208, - 208, 208, 208, 208, 215, 0, 0, 0, 0, 0, - 0, 215, 215, 215, 215, 215, 215, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 210, 210, + 210, 210, 210, 210, 217, 0, 0, 0, 0, 0, + 0, 217, 217, 217, 217, 217, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 215, 215, 215, 215, 215, 215, 218, 218, 218, 218, - 218, 0, 218, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 218, 0, 0, 0, 0, - 0, 0, 218, 218, 218, 218, 218, 218, 0, 0, + 217, 217, 217, 217, 217, 217, 220, 220, 220, 220, + 220, 0, 220, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, + 0, 0, 220, 220, 220, 220, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 218, 0, - 0, 218, 218, 218, 218, 218, 218, 220, 0, 0, - 0, 0, 0, 0, 220, 220, 220, 220, 220, 220, + 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, + 0, 220, 220, 220, 220, 220, 220, 222, 0, 0, + 0, 0, 0, 0, 222, 222, 222, 222, 222, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 220, 220, 220, 220, 220, 220, 221, - 221, 221, 221, 221, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 221, 0, - 0, 0, 0, 0, 0, 221, 221, 221, 221, 221, - 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 222, 222, 222, 222, 222, 222, 223, + 223, 223, 223, 223, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 223, 0, + 0, 0, 0, 0, 0, 223, 223, 223, 223, 223, + 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 221, 221, 221, 221, 221, 221, - 222, 222, 222, 222, 222, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, + 0, 0, 0, 0, 223, 223, 223, 223, 223, 223, + 224, 224, 224, 224, 224, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, - 0, 0, 0, 0, 0, 0, 222, 222, 222, 222, - 222, 222, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 224, 224, 224, 224, + 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 222, 222, 222, 222, 222, - 222, 223, 223, 223, 223, 223, 0, 0, 0, 0, - 0, 0, 223, 0, 0, 0, 0, 0, 0, 0, - 223, 0, 0, 0, 0, 0, 0, 223, 223, 223, - 223, 223, 223, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 224, 224, 224, 224, 224, + 224, 225, 225, 225, 225, 225, 0, 0, 0, 0, + 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, + 225, 0, 0, 0, 0, 0, 0, 225, 225, 225, + 225, 225, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 223, 0, 0, 223, 223, 223, 223, + 0, 0, 0, 225, 0, 0, 225, 225, 225, 225, - 223, 223, 227, 227, 227, 227, 227, 0, 0, 0, + 225, 225, 229, 229, 229, 229, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 227, 0, 0, 0, 0, 0, 0, 227, 227, - 227, 227, 227, 227, 0, 0, 0, 0, 0, 0, + 0, 229, 0, 0, 0, 0, 0, 0, 229, 229, + 229, 229, 229, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 227, 227, 227, - 227, 227, 227, 230, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 229, 229, 229, + 229, 229, 229, 232, 0, 0, 0, 0, 0, 0, + 232, 232, 232, 232, 232, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, - 230, 230, 230, 230, 230, 233, 233, 233, 233, 233, + 232, 232, 232, 232, 232, 235, 235, 235, 235, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 233, 0, 0, 0, 0, 0, - 0, 233, 233, 233, 233, 233, 233, 0, 0, 0, + 0, 0, 0, 0, 235, 0, 0, 0, 0, 0, + 0, 235, 235, 235, 235, 235, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 233, 233, 233, 233, 233, 233, 240, 0, 0, 0, - 0, 0, 0, 240, 240, 240, 240, 240, 240, 0, + 235, 235, 235, 235, 235, 235, 242, 0, 0, 0, + 0, 0, 0, 242, 242, 242, 242, 242, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 240, 240, 240, 240, 240, 240, 241, 241, - 241, 241, 241, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 241, 0, 0, - 0, 0, 0, 0, 241, 241, 241, 241, 241, 241, + 0, 0, 242, 242, 242, 242, 242, 242, 243, 243, + 243, 243, 243, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 243, 0, 0, + 0, 0, 0, 0, 243, 243, 243, 243, 243, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 241, 241, 241, 241, 241, 241, 252, - 252, 252, 252, 252, 0, 252, 0, 0, 0, 0, - 252, 252, 252, 0, 0, 0, 0, 0, 252, 0, - 0, 0, 0, 0, 0, 252, 252, 252, 252, 252, + 0, 0, 0, 243, 243, 243, 243, 243, 243, 254, + 254, 254, 254, 254, 0, 254, 0, 0, 0, 0, + 254, 254, 254, 0, 0, 0, 0, 0, 254, 0, + 0, 0, 0, 0, 0, 254, 254, 254, 254, 254, - 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 252, 0, 0, 252, 252, 252, 252, 252, 252, - 253, 0, 0, 0, 0, 0, 0, 253, 253, 253, - 253, 253, 253, 0, 0, 0, 0, 0, 0, 0, + 0, 254, 0, 0, 254, 254, 254, 254, 254, 254, + 255, 0, 0, 0, 0, 0, 0, 255, 255, 255, + 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 253, 253, 253, 253, - 253, 253, 255, 255, 255, 255, 255, 0, 255, 0, + 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, + 255, 255, 257, 257, 257, 257, 257, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 0, 0, 0, 0, 0, 0, 255, 255, + 0, 257, 0, 0, 0, 0, 0, 0, 257, 257, - 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, + 257, 257, 257, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 255, 0, 0, 255, 255, 255, - 255, 255, 255, 257, 0, 0, 0, 0, 0, 0, - 257, 257, 257, 257, 257, 257, 0, 0, 0, 0, + 0, 0, 0, 0, 257, 0, 0, 257, 257, 257, + 257, 257, 257, 259, 0, 0, 0, 0, 0, 0, + 259, 259, 259, 259, 259, 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 257, 0, 0, 257, - 257, 257, 257, 257, 257, 258, 258, 258, 258, 258, + 0, 0, 0, 0, 0, 0, 259, 0, 0, 259, + 259, 259, 259, 259, 259, 260, 260, 260, 260, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 258, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 260, 0, 0, 0, 0, 0, - 0, 258, 258, 258, 258, 258, 258, 0, 0, 0, + 0, 260, 260, 260, 260, 260, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 258, 0, 0, - 258, 258, 258, 258, 258, 258, 259, 259, 259, 259, - 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 259, 0, 0, 0, 0, - 0, 0, 259, 259, 259, 259, 259, 259, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 260, 0, 0, + 260, 260, 260, 260, 260, 260, 261, 261, 261, 261, + 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 261, 0, 0, 0, 0, + 0, 0, 261, 261, 261, 261, 261, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 259, 259, 259, 259, 259, 259, 260, 260, 260, + 0, 261, 261, 261, 261, 261, 261, 262, 262, 262, - 260, 260, 0, 0, 0, 0, 0, 0, 260, 0, - 0, 0, 0, 0, 0, 0, 260, 0, 0, 0, - 0, 0, 0, 260, 260, 260, 260, 260, 260, 0, + 262, 262, 0, 0, 0, 0, 0, 0, 262, 0, + 0, 0, 0, 0, 0, 0, 262, 0, 0, 0, + 0, 0, 0, 262, 262, 262, 262, 262, 262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, - 0, 0, 260, 260, 260, 260, 260, 260, 261, 261, - 261, 261, 261, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 261, 0, 0, - 0, 0, 0, 0, 261, 261, 261, 261, 261, 261, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 262, + 0, 0, 262, 262, 262, 262, 262, 262, 263, 263, + 263, 263, 263, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, + 0, 0, 0, 0, 263, 263, 263, 263, 263, 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 261, 261, 261, 261, 261, 261, 0, + 0, 0, 0, 263, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 263, 263, 263, 263, 263, 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 261, 262, 262, 262, 262, 262, 0, 0, 0, + 0, 263, 264, 264, 264, 264, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 262, 0, 0, 0, 0, 0, 0, 262, 262, - 262, 262, 262, 262, 0, 0, 0, 0, 0, 0, + 0, 264, 0, 0, 0, 0, 0, 0, 264, 264, + 264, 264, 264, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 262, 262, 262, - 262, 262, 262, 263, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 264, 264, 264, + 264, 264, 264, 265, 0, 0, 0, 0, 0, 0, - 263, 263, 263, 263, 263, 263, 0, 0, 0, 0, + 265, 265, 265, 265, 265, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 263, - 263, 263, 263, 263, 263, 264, 264, 264, 264, 264, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 265, + 265, 265, 265, 265, 265, 266, 266, 266, 266, 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 264, 0, 0, 0, 0, 0, - 0, 264, 264, 264, 264, 264, 264, 0, 0, 0, + 0, 0, 0, 0, 266, 0, 0, 0, 0, 0, + 0, 266, 266, 266, 266, 266, 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 264, 264, 264, 264, 264, 264, 266, 266, 266, 266, + 266, 266, 266, 266, 266, 266, 268, 268, 268, 268, - 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 266, 0, 0, 0, 0, - 0, 0, 266, 266, 266, 266, 266, 266, 0, 0, + 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 268, 0, 0, 0, 0, + 0, 0, 268, 268, 268, 268, 268, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 266, 266, 266, 266, 266, 266, 272, 0, 0, - 0, 0, 0, 0, 272, 272, 272, 272, 272, 272, + 0, 268, 268, 268, 268, 268, 268, 274, 0, 0, + 0, 0, 0, 0, 274, 274, 274, 274, 274, 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 272, 272, 272, 272, 272, 272, 273, + 0, 0, 0, 274, 274, 274, 274, 274, 274, 275, - 273, 273, 273, 273, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 273, 0, - 0, 0, 0, 0, 0, 273, 273, 273, 273, 273, - 273, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 275, 275, 275, 275, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, + 0, 0, 0, 0, 0, 275, 275, 275, 275, 275, + 275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 273, 273, 273, 273, 273, 273, - 283, 283, 283, 283, 0, 0, 283, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 283, - 0, 0, 0, 0, 0, 0, 283, 283, 283, 283, - 283, 283, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 275, 275, 275, 275, 275, 275, + 285, 285, 285, 285, 0, 0, 285, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 285, + 0, 0, 0, 0, 0, 0, 285, 285, 285, 285, + 285, 285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 283, 0, 0, 283, 283, 283, 283, 283, - 283, 285, 285, 285, 285, 0, 0, 0, 0, 0, - 0, 0, 285, 0, 0, 0, 0, 0, 0, 0, - 285, 0, 0, 0, 0, 0, 0, 285, 285, 285, - 285, 285, 285, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 285, 0, 0, 285, 285, 285, 285, 285, + 285, 287, 287, 287, 287, 0, 0, 0, 0, 0, + 0, 0, 287, 0, 0, 0, 0, 0, 0, 0, + 287, 0, 0, 0, 0, 0, 0, 287, 287, 287, + 287, 287, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 285, 0, 0, 285, 285, 285, 285, - 285, 285, 290, 290, 290, 290, 290, 0, 0, 0, - 0, 0, 0, 0, 0, 290, 0, 0, 0, 0, + 0, 0, 0, 287, 0, 0, 287, 287, 287, 287, + 287, 287, 292, 292, 292, 292, 292, 0, 0, 0, + 0, 0, 0, 0, 0, 292, 0, 0, 0, 0, - 0, 290, 0, 0, 0, 0, 0, 0, 290, 290, - 290, 290, 290, 290, 0, 0, 0, 0, 0, 0, + 0, 292, 0, 0, 0, 0, 0, 0, 292, 292, + 292, 292, 292, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 290, 0, 0, 290, 290, 290, - 290, 290, 290, 291, 291, 291, 291, 291, 0, 291, - 0, 0, 0, 0, 291, 291, 291, 0, 0, 0, - 0, 0, 291, 0, 0, 0, 0, 0, 0, 291, - 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 292, 0, 0, 292, 292, 292, + 292, 292, 292, 293, 293, 293, 293, 293, 0, 293, + 0, 0, 0, 0, 293, 293, 293, 0, 0, 0, + 0, 0, 293, 0, 0, 0, 0, 0, 0, 293, + 293, 293, 293, 293, 293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 291, 0, 0, 291, 291, + 0, 0, 0, 0, 0, 293, 0, 0, 293, 293, - 291, 291, 291, 291, 292, 0, 0, 0, 0, 0, - 0, 292, 292, 292, 292, 292, 292, 0, 0, 0, + 293, 293, 293, 293, 294, 0, 0, 0, 0, 0, + 0, 294, 294, 294, 294, 294, 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 292, 292, 292, 292, 292, 292, 294, 294, 294, 294, - 294, 0, 294, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 294, 0, 0, 0, 0, - 0, 0, 294, 294, 294, 294, 294, 294, 0, 0, + 294, 294, 294, 294, 294, 294, 296, 296, 296, 296, + 296, 0, 296, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 296, 0, 0, 0, 0, + 0, 0, 296, 296, 296, 296, 296, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 294, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 296, 0, - 0, 294, 294, 294, 294, 294, 294, 297, 297, 297, - 297, 297, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 297, 0, 0, 0, - 0, 0, 0, 297, 297, 297, 297, 297, 297, 0, + 0, 296, 296, 296, 296, 296, 296, 299, 299, 299, + 299, 299, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 299, 0, 0, 0, + 0, 0, 0, 299, 299, 299, 299, 299, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 297, - 0, 0, 297, 297, 297, 297, 297, 297, 298, 298, - 298, 298, 298, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 298, 0, 0, - 0, 0, 0, 0, 298, 298, 298, 298, 298, 298, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 299, + 0, 0, 299, 299, 299, 299, 299, 299, 300, 300, + 300, 300, 300, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 300, 0, 0, + 0, 0, 0, 0, 300, 300, 300, 300, 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 298, 298, 298, 298, 298, 298, 299, - 299, 299, 299, 299, 0, 0, 0, 0, 0, 0, - 299, 0, 0, 0, 0, 0, 0, 0, 299, 0, - 0, 0, 0, 0, 0, 299, 299, 299, 299, 299, - 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 300, 300, 300, 300, 300, 300, 301, + 301, 301, 301, 301, 0, 0, 0, 0, 0, 0, + 301, 0, 0, 0, 0, 0, 0, 0, 301, 0, + 0, 0, 0, 0, 0, 301, 301, 301, 301, 301, + 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 299, 0, 0, 299, 299, 299, 299, 299, 299, - 300, 300, 300, 300, 300, 0, 0, 0, 0, 0, + 0, 301, 0, 0, 301, 301, 301, 301, 301, 301, + 302, 302, 302, 302, 302, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 300, 0, 0, 300, - 0, 0, 0, 0, 0, 0, 300, 300, 300, 300, - 300, 300, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 302, 0, 0, 302, + 0, 0, 0, 0, 0, 0, 302, 302, 302, 302, + 302, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 300, 300, 300, 300, 300, - 300, 301, 301, 301, 301, 301, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 302, 302, 302, 302, 302, + 302, 303, 303, 303, 303, 303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 301, 0, 0, 0, 0, 0, 0, 301, 301, 301, - 301, 301, 301, 0, 0, 0, 0, 0, 0, 0, + 303, 0, 0, 0, 0, 0, 0, 303, 303, 303, + 303, 303, 303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 301, 301, 301, 301, - 301, 301, 302, 302, 302, 302, 302, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 303, 303, 303, 303, + 303, 303, 304, 304, 304, 304, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 302, 0, 0, 0, 0, 0, 0, 302, 302, - 302, 302, 302, 302, 0, 0, 0, 0, 0, 0, + 0, 304, 0, 0, 0, 0, 0, 0, 304, 304, + 304, 304, 304, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 302, 302, 302, - 302, 302, 302, 304, 304, 304, 304, 304, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 304, 304, 304, + 304, 304, 304, 306, 306, 306, 306, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 304, 0, 0, 0, 0, 0, 0, 304, + 0, 0, 306, 0, 0, 0, 0, 0, 0, 306, - 304, 304, 304, 304, 304, 0, 0, 0, 0, 0, + 306, 306, 306, 306, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 304, 304, - 304, 304, 304, 304, 309, 0, 0, 0, 0, 0, - 0, 309, 309, 309, 309, 309, 309, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 306, 306, + 306, 306, 306, 306, 311, 0, 0, 0, 0, 0, + 0, 311, 311, 311, 311, 311, 311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 309, 309, 309, 309, 309, 309, 310, 310, 310, 310, - 310, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 310, 0, 0, 0, 0, + 311, 311, 311, 311, 311, 311, 312, 312, 312, 312, + 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 312, 0, 0, 0, 0, - 0, 0, 310, 310, 310, 310, 310, 310, 0, 0, + 0, 0, 312, 312, 312, 312, 312, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 310, 310, 310, 310, 310, 310, 323, 323, 323, - 323, 323, 0, 323, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 323, 0, 0, 0, - 0, 0, 0, 323, 323, 323, 323, 323, 323, 0, + 0, 312, 312, 312, 312, 312, 312, 325, 325, 325, + 325, 325, 0, 325, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 325, 0, 0, 0, + 0, 0, 0, 325, 325, 325, 325, 325, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 323, - 0, 0, 323, 323, 323, 323, 323, 323, 324, 324, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 325, + 0, 0, 325, 325, 325, 325, 325, 325, 326, 326, - 324, 324, 0, 0, 324, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 324, 0, 0, - 0, 0, 0, 0, 324, 324, 324, 324, 324, 324, + 326, 326, 0, 0, 326, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 326, 0, 0, + 0, 0, 0, 0, 326, 326, 326, 326, 326, 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 324, 0, 0, 324, 324, 324, 324, 324, 324, 328, - 328, 328, 328, 328, 0, 0, 0, 0, 0, 0, - 328, 0, 0, 0, 0, 0, 0, 0, 328, 0, - 0, 0, 0, 0, 0, 328, 328, 328, 328, 328, - 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 326, 0, 0, 326, 326, 326, 326, 326, 326, 330, + 330, 330, 330, 330, 0, 0, 0, 0, 0, 0, + 330, 0, 0, 0, 0, 0, 0, 0, 330, 0, + 0, 0, 0, 0, 0, 330, 330, 330, 330, 330, + 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 328, 0, 0, 328, 328, 328, 328, 328, 328, - 329, 329, 329, 329, 0, 0, 0, 0, 0, 0, - 0, 329, 0, 0, 0, 0, 0, 0, 0, 329, - 0, 0, 0, 0, 0, 0, 329, 329, 329, 329, - 329, 329, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 330, 0, 0, 330, 330, 330, 330, 330, 330, + 331, 331, 331, 331, 0, 0, 0, 0, 0, 0, + 0, 331, 0, 0, 0, 0, 0, 0, 0, 331, + 0, 0, 0, 0, 0, 0, 331, 331, 331, 331, + 331, 331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 329, 0, 0, 329, 329, 329, 329, 329, - 329, 330, 330, 330, 330, 330, 0, 0, 0, 0, - 0, 0, 0, 0, 330, 0, 0, 0, 0, 0, + 0, 0, 331, 0, 0, 331, 331, 331, 331, 331, + 331, 332, 332, 332, 332, 332, 0, 0, 0, 0, + 0, 0, 0, 0, 332, 0, 0, 0, 0, 0, - 330, 0, 0, 0, 0, 0, 0, 330, 330, 330, - 330, 330, 330, 0, 0, 0, 0, 0, 0, 0, + 332, 0, 0, 0, 0, 0, 0, 332, 332, 332, + 332, 332, 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 330, 0, 0, 330, 330, 330, 330, - 330, 330, 334, 0, 0, 0, 0, 0, 0, 334, - 334, 334, 334, 334, 334, 0, 0, 0, 0, 0, + 0, 0, 0, 332, 0, 0, 332, 332, 332, 332, + 332, 332, 336, 0, 0, 0, 0, 0, 0, 336, + 336, 336, 336, 336, 336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 334, 334, - 334, 334, 334, 334, 335, 0, 0, 0, 0, 0, - 0, 335, 335, 335, 335, 335, 335, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 336, 336, + 336, 336, 336, 336, 337, 0, 0, 0, 0, 0, + 0, 337, 337, 337, 337, 337, 337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 335, 335, 335, 335, 335, 335, 338, 0, 0, 0, - 0, 0, 0, 338, 338, 338, 338, 338, 338, 0, + 337, 337, 337, 337, 337, 337, 340, 0, 0, 0, + 0, 0, 0, 340, 340, 340, 340, 340, 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 338, 338, 338, 338, 338, 338, 339, 339, - 339, 339, 339, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 339, 0, 0, - 0, 0, 0, 0, 339, 339, 339, 339, 339, 339, + 0, 0, 340, 340, 340, 340, 340, 340, 341, 341, + 341, 341, 341, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 341, 0, 0, + 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 339, 339, 339, 339, 339, 339, 341, - 341, 341, 341, 341, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, - 0, 0, 0, 0, 0, 341, 341, 341, 341, 341, - 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 341, 341, 341, 341, 341, 341, 343, + 343, 343, 343, 343, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 343, 0, + 0, 0, 0, 0, 0, 343, 343, 343, 343, 343, + 343, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 341, 341, 341, 341, 341, 341, - 358, 0, 0, 0, 0, 0, 0, 358, 358, 358, + 0, 0, 0, 0, 343, 343, 343, 343, 343, 343, + 360, 0, 0, 0, 0, 0, 0, 360, 360, 360, - 358, 358, 358, 0, 0, 0, 0, 0, 0, 0, + 360, 360, 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 358, 358, 358, 358, - 358, 358, 362, 0, 0, 0, 0, 0, 0, 362, - 362, 362, 362, 362, 362, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 360, 360, 360, 360, + 360, 360, 364, 0, 0, 0, 0, 0, 0, 364, + 364, 364, 364, 364, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, - 362, 362, 362, 362, 363, 363, 363, 363, 363, 0, - 0, 0, 0, 0, 0, 0, 0, 363, 0, 0, - 0, 0, 0, 363, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 364, 364, + 364, 364, 364, 364, 365, 365, 365, 365, 365, 0, + 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, + 0, 0, 0, 365, 0, 0, 0, 0, 0, 0, - 363, 363, 363, 363, 363, 363, 0, 0, 0, 0, + 365, 365, 365, 365, 365, 365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 363, 0, 0, 363, - 363, 363, 363, 363, 363, 368, 0, 0, 0, 0, - 0, 0, 368, 0, 368, 0, 0, 0, 0, 368, - 368, 0, 0, 368, 0, 0, 0, 0, 368, 0, - 0, 0, 0, 0, 368, 0, 0, 0, 0, 0, - 368, 0, 368, 0, 0, 0, 0, 368, 368, 0, - 0, 368, 373, 0, 0, 0, 0, 0, 0, 373, - 373, 373, 373, 373, 373, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 0, 0, 365, + 365, 365, 365, 365, 365, 370, 0, 0, 0, 0, + 0, 0, 370, 0, 370, 0, 0, 0, 0, 370, + 370, 0, 0, 370, 0, 0, 0, 0, 370, 0, + 0, 0, 0, 0, 370, 0, 0, 0, 0, 0, + 370, 0, 370, 0, 0, 0, 0, 370, 370, 0, + 0, 370, 375, 0, 0, 0, 0, 0, 0, 375, + 375, 375, 375, 375, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 373, 373, - 373, 373, 373, 373, 374, 0, 0, 0, 0, 0, - 0, 374, 374, 374, 374, 374, 374, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 375, 375, + 375, 375, 375, 375, 376, 0, 0, 0, 0, 0, + 0, 376, 376, 376, 376, 376, 376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 374, 374, 374, 374, 374, 374, 375, 0, 0, 0, - 0, 0, 0, 375, 375, 375, 375, 375, 375, 0, + 376, 376, 376, 376, 376, 376, 377, 0, 0, 0, + 0, 0, 0, 377, 377, 377, 377, 377, 377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 375, 375, 375, 375, 375, 375, 387, 0, - 0, 0, 0, 0, 0, 387, 387, 387, 387, 387, - 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 377, 377, 377, 377, 377, 377, 389, 0, + 0, 0, 0, 0, 0, 389, 389, 389, 389, 389, + 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 387, 387, 387, 387, 387, 387, - 388, 0, 0, 0, 0, 0, 0, 388, 388, 388, - 388, 388, 388, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 389, 389, 389, 389, 389, 389, + 390, 0, 0, 0, 0, 0, 0, 390, 390, 390, + 390, 390, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 388, 388, 388, 388, - 388, 388, 389, 0, 0, 0, 0, 0, 0, 389, + 0, 0, 0, 0, 0, 0, 390, 390, 390, 390, + 390, 390, 391, 0, 0, 0, 0, 0, 0, 391, - 389, 389, 389, 389, 389, 0, 0, 0, 0, 0, + 391, 391, 391, 391, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 389, 389, - 389, 389, 389, 389, 397, 0, 0, 0, 0, 0, - 0, 397, 397, 397, 397, 397, 397, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 391, 391, + 391, 391, 391, 391, 399, 0, 0, 0, 0, 0, + 0, 399, 399, 399, 399, 399, 399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 397, 397, 397, 397, 397, 397, 398, 0, 0, 0, - 0, 0, 0, 398, 398, 398, 398, 398, 398, 0, + 399, 399, 399, 399, 399, 399, 400, 0, 0, 0, + 0, 0, 0, 400, 400, 400, 400, 400, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 398, 398, 398, 398, 398, 398, 414, 0, - 0, 0, 0, 0, 0, 414, 414, 414, 414, 414, - 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 400, 400, 400, 400, 400, 400, 416, 0, + 0, 0, 0, 0, 0, 416, 416, 416, 416, 416, + 416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 414, 414, 414, 414, 414, 414, - 426, 0, 0, 0, 0, 0, 0, 426, 426, 426, - 426, 426, 426, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 416, 416, 416, 416, 416, 416, + 428, 0, 0, 0, 0, 0, 0, 428, 428, 428, + 428, 428, 428, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 426, 426, 426, 426, + 0, 0, 0, 0, 0, 0, 428, 428, 428, 428, - 426, 426, 428, 428, 428, 428, 428, 0, 0, 0, - 0, 0, 0, 0, 0, 428, 0, 0, 0, 0, - 0, 428, 0, 0, 0, 0, 0, 0, 428, 428, - 428, 428, 428, 428, 0, 0, 0, 0, 0, 0, + 428, 428, 430, 430, 430, 430, 430, 0, 0, 0, + 0, 0, 0, 0, 0, 430, 0, 0, 0, 0, + 0, 430, 0, 0, 0, 0, 0, 0, 430, 430, + 430, 430, 430, 430, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 428, 0, 0, 428, 428, 428, - 428, 428, 428, 437, 437, 437, 437, 437, 0, 0, + 0, 0, 0, 0, 430, 0, 0, 430, 430, 430, + 430, 430, 430, 439, 439, 439, 439, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 437, 0, 0, 0, 0, 0, 0, 437, - 437, 437, 437, 437, 437, 0, 0, 0, 0, 0, + 0, 0, 439, 0, 0, 0, 0, 0, 0, 439, + 439, 439, 439, 439, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 437, 437, - 437, 437, 437, 437, 439, 0, 0, 0, 0, 0, - 0, 439, 439, 439, 439, 439, 439, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 439, 439, + 439, 439, 439, 439, 441, 0, 0, 0, 0, 0, + 0, 441, 441, 441, 441, 441, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 439, 439, 439, 439, 439, 439, 446, 0, 0, 0, - 0, 0, 0, 446, 446, 446, 446, 446, 446, 0, + 441, 441, 441, 441, 441, 441, 448, 0, 0, 0, + 0, 0, 0, 448, 448, 448, 448, 448, 448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 446, 446, 446, 446, 446, 446, 447, 0, - 0, 0, 0, 0, 0, 447, 447, 447, 447, 447, - 447, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 448, 448, 448, 448, 448, 448, 449, 0, + 0, 0, 0, 0, 0, 449, 449, 449, 449, 449, + 449, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 447, 447, 447, 447, 447, 447, - 452, 0, 0, 0, 0, 0, 0, 452, 452, 452, - 452, 452, 452, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 449, 449, 449, 449, 449, 449, + 454, 0, 0, 0, 0, 0, 0, 454, 454, 454, + 454, 454, 454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 452, 452, 452, 452, - 452, 452, 453, 0, 0, 0, 0, 0, 0, 453, + 0, 0, 0, 0, 0, 0, 454, 454, 454, 454, + 454, 454, 455, 0, 0, 0, 0, 0, 0, 455, - 453, 453, 453, 453, 453, 0, 0, 0, 0, 0, + 455, 455, 455, 455, 455, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 453, 453, - 453, 453, 453, 453, 458, 0, 0, 0, 0, 0, - 0, 458, 458, 458, 458, 458, 458, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 455, 455, + 455, 455, 455, 455, 460, 0, 0, 0, 0, 0, + 0, 460, 460, 460, 460, 460, 460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 458, 458, 458, 458, 458, 458, 459, 0, 0, 0, - 0, 0, 0, 459, 459, 459, 459, 459, 459, 0, + 460, 460, 460, 460, 460, 460, 461, 0, 0, 0, + 0, 0, 0, 461, 461, 461, 461, 461, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 459, 459, 459, 459, 459, 459, 464, 0, - 0, 0, 0, 0, 0, 464, 464, 464, 464, 464, - 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 461, 461, 461, 461, 461, 461, 466, 0, + 0, 0, 0, 0, 0, 466, 466, 466, 466, 466, + 466, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 464, 464, 464, 464, 464, 464, - 479, 0, 0, 479, 479, 479, 479, 479, 479, 479, - 479, 479, 479, 480, 480, 0, 480, 480, 481, 0, - 0, 481, 481, 481, 481, 481, 481, 481, 481, 481, - 481, 482, 482, 0, 482, 482, 483, 0, 0, 483, - - 483, 484, 0, 484, 484, 0, 484, 484, 485, 485, - 485, 485, 485, 485, 485, 485, 485, 485, 486, 486, - 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, - 486, 488, 488, 0, 488, 488, 489, 489, 489, 489, - 489, 489, 489, 489, 489, 489, 490, 490, 490, 490, - 490, 490, 490, 490, 490, 490, 490, 490, 490, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 493, 493, 0, 493, 493, 494, 494, - 494, 494, 494, 494, 494, 494, 494, 494, 495, 495, - 0, 495, 495, 496, 496, 496, 496, 496, 496, 496, + 0, 0, 0, 0, 466, 466, 466, 466, 466, 466, + 481, 0, 0, 481, 481, 481, 481, 481, 481, 481, + 481, 481, 481, 482, 482, 0, 482, 482, 483, 0, + 0, 483, 483, 483, 483, 483, 483, 483, 483, 483, + 483, 484, 484, 0, 484, 484, 485, 0, 0, 485, - 496, 496, 496, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 498, 498, 498, 500, 500, 500, 500, - 500, 500, 500, 500, 500, 500, 501, 501, 0, 501, - 501, 501, 501, 501, 501, 501, 501, 501, 501, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 503, 503, 503, 503, 503, 503, 503, 503, - 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, + 485, 486, 0, 486, 486, 0, 486, 486, 487, 487, + 487, 487, 487, 487, 487, 487, 487, 487, 488, 488, + 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, + 488, 490, 490, 0, 490, 490, 491, 491, 491, 491, + 491, 491, 491, 491, 491, 491, 492, 492, 492, 492, + 492, 492, 492, 492, 492, 492, 492, 492, 492, 493, + 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + 493, 493, 493, 495, 495, 0, 495, 495, 496, 496, + 496, 496, 496, 496, 496, 496, 496, 496, 497, 497, + 0, 497, 497, 498, 498, 498, 498, 498, 498, 498, + + 498, 498, 498, 499, 499, 499, 499, 499, 499, 499, + 499, 499, 499, 500, 500, 500, 502, 502, 502, 502, + 502, 502, 502, 502, 502, 502, 503, 503, 0, 503, + 503, 503, 503, 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 504, 504, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, - - 507, 507, 507, 507, 508, 0, 0, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - 510, 512, 512, 512, 512, 513, 513, 513, 513, 513, - 513, 0, 513, 513, 513, 513, 513, 513, 514, 514, - 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, - 514, 516, 516, 516, 516, 516, 516, 516, 516, 516, - 516, 516, 516, 516, 516, 518, 518, 518, 518, 519, - 519, 519, 519, 519, 519, 0, 519, 519, 519, 519, - 519, 519, 520, 0, 0, 520, 520, 520, 520, 520, - - 520, 520, 520, 520, 520, 521, 0, 0, 521, 521, - 521, 521, 521, 521, 521, 521, 521, 521, 522, 522, - 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, - 522, 523, 523, 523, 523, 523, 523, 523, 523, 523, - 523, 523, 523, 523, 525, 525, 0, 525, 525, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 528, 528, 528, 528, 529, 529, 529, 529, - 529, 529, 529, 529, 529, 529, 529, 529, 529, 530, - 0, 0, 530, 530, 530, 530, 530, 530, 530, 530, - 530, 530, 531, 531, 531, 531, 531, 531, 531, 531, - - 531, 531, 531, 531, 531, 532, 532, 532, 532, 532, - 0, 0, 532, 532, 532, 532, 532, 532, 533, 533, - 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, - 533, 534, 534, 534, 534, 534, 534, 534, 534, 534, - 534, 534, 534, 534, 535, 535, 0, 535, 535, 536, - 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, - 536, 536, 538, 538, 538, 538, 539, 539, 0, 539, - 539, 539, 539, 539, 539, 539, 539, 539, 539, 540, - 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, - 540, 540, 541, 541, 0, 541, 541, 541, 541, 541, - - 541, 541, 541, 541, 541, 542, 542, 542, 542, 542, - 542, 542, 542, 542, 542, 542, 542, 542, 543, 543, - 543, 543, 543, 0, 0, 543, 543, 543, 543, 543, - 543, 546, 546, 546, 546, 0, 0, 0, 0, 546, - 0, 0, 546, 546, 547, 547, 547, 547, 0, 0, - 0, 547, 547, 547, 0, 547, 547, 548, 548, 548, - 548, 548, 548, 548, 548, 548, 548, 549, 549, 549, - 549, 549, 549, 549, 549, 549, 549, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 478, 478, 478 + 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + + 509, 509, 509, 509, 510, 0, 0, 510, 510, 510, + 510, 510, 510, 510, 510, 510, 510, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 514, 514, 514, 514, 515, 515, 515, 515, 515, + 515, 0, 515, 515, 515, 515, 515, 515, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 520, 520, 520, 520, 521, + 521, 521, 521, 521, 521, 0, 521, 521, 521, 521, + 521, 521, 522, 0, 0, 522, 522, 522, 522, 522, + + 522, 522, 522, 522, 522, 523, 0, 0, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 525, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 525, 525, 527, 527, 0, 527, 527, 528, + 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 530, 530, 530, 530, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 532, + 0, 0, 532, 532, 532, 532, 532, 532, 532, 532, + 532, 532, 533, 533, 533, 533, 533, 533, 533, 533, + + 533, 533, 533, 533, 533, 534, 534, 534, 534, 534, + 0, 0, 534, 534, 534, 534, 534, 534, 535, 535, + 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, + 535, 536, 536, 536, 536, 536, 536, 536, 536, 536, + 536, 536, 536, 536, 537, 537, 0, 537, 537, 538, + 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 540, 540, 540, 540, 541, 541, 0, 541, + 541, 541, 541, 541, 541, 541, 541, 541, 541, 542, + 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, + 542, 542, 543, 543, 0, 543, 543, 543, 543, 543, + + 543, 543, 543, 543, 543, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 545, 545, + 545, 545, 545, 0, 0, 545, 545, 545, 545, 545, + 545, 548, 548, 548, 548, 0, 0, 0, 0, 548, + 0, 0, 548, 548, 549, 549, 549, 549, 0, 0, + 0, 549, 549, 549, 0, 549, 549, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 551, 551, 551, + 551, 551, 551, 551, 551, 551, 551, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480 } ; #line 1 "<stdin>" @@ -1807,7 +1809,7 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 479 ) + if ( yy_current_state >= 481 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2031,114 +2033,113 @@ YY_RULE_SETUP case 38: YY_RULE_SETUP #line 76 "<stdin>" -{yyTok = QEMS; return yyTok;} /* quirky ems */ +{yyTok = REMS; return yyTok;} YY_BREAK case 39: YY_RULE_SETUP #line 77 "<stdin>" -{yyTok = EXS; return yyTok;} +{yyTok = QEMS; return yyTok;} /* quirky ems */ YY_BREAK case 40: YY_RULE_SETUP #line 78 "<stdin>" -{yyTok = PXS; return yyTok;} +{yyTok = EXS; return yyTok;} YY_BREAK case 41: YY_RULE_SETUP #line 79 "<stdin>" -{yyTok = CMS; return yyTok;} +{yyTok = PXS; return yyTok;} YY_BREAK case 42: YY_RULE_SETUP #line 80 "<stdin>" -{yyTok = MMS; return yyTok;} +{yyTok = CMS; return yyTok;} YY_BREAK case 43: YY_RULE_SETUP #line 81 "<stdin>" -{yyTok = INS; return yyTok;} +{yyTok = MMS; return yyTok;} YY_BREAK case 44: YY_RULE_SETUP #line 82 "<stdin>" -{yyTok = PTS; return yyTok;} +{yyTok = INS; return yyTok;} YY_BREAK case 45: YY_RULE_SETUP #line 83 "<stdin>" -{yyTok = PCS; return yyTok;} +{yyTok = PTS; return yyTok;} YY_BREAK case 46: YY_RULE_SETUP #line 84 "<stdin>" -{yyTok = DEGS; return yyTok;} +{yyTok = PCS; return yyTok;} YY_BREAK case 47: YY_RULE_SETUP #line 85 "<stdin>" -{yyTok = RADS; return yyTok;} +{yyTok = DEGS; return yyTok;} YY_BREAK case 48: YY_RULE_SETUP #line 86 "<stdin>" -{yyTok = GRADS; return yyTok;} +{yyTok = RADS; return yyTok;} YY_BREAK case 49: YY_RULE_SETUP #line 87 "<stdin>" -{yyTok = TURNS; return yyTok;} +{yyTok = GRADS; return yyTok;} YY_BREAK case 50: YY_RULE_SETUP #line 88 "<stdin>" -{yyTok = MSECS; return yyTok;} +{yyTok = TURNS; return yyTok;} YY_BREAK case 51: YY_RULE_SETUP #line 89 "<stdin>" -{yyTok = SECS; return yyTok;} +{yyTok = MSECS; return yyTok;} YY_BREAK case 52: YY_RULE_SETUP #line 90 "<stdin>" -{yyTok = HERZ; return yyTok;} +{yyTok = SECS; return yyTok;} YY_BREAK case 53: YY_RULE_SETUP #line 91 "<stdin>" -{yyTok = KHERZ; return yyTok;} +{yyTok = HERZ; return yyTok;} YY_BREAK case 54: -/* rule 54 can match eol */ YY_RULE_SETUP #line 92 "<stdin>" -{yyTok = DIMEN; return yyTok;} +{yyTok = KHERZ; return yyTok;} YY_BREAK case 55: +/* rule 55 can match eol */ YY_RULE_SETUP #line 93 "<stdin>" -{yyTok = PERCENTAGE; return yyTok;} +{yyTok = DIMEN; return yyTok;} YY_BREAK case 56: YY_RULE_SETUP #line 94 "<stdin>" -{yyTok = INTEGER; return yyTok;} +{yyTok = PERCENTAGE; return yyTok;} YY_BREAK case 57: YY_RULE_SETUP #line 95 "<stdin>" -{yyTok = FLOATTOKEN; return yyTok;} +{yyTok = INTEGER; return yyTok;} YY_BREAK case 58: YY_RULE_SETUP -#line 97 "<stdin>" -{yyTok = NOTFUNCTION; return yyTok;} +#line 96 "<stdin>" +{yyTok = FLOATTOKEN; return yyTok;} YY_BREAK case 59: -/* rule 59 can match eol */ YY_RULE_SETUP #line 98 "<stdin>" -{yyTok = URI; return yyTok;} +{yyTok = NOTFUNCTION; return yyTok;} YY_BREAK case 60: /* rule 60 can match eol */ @@ -2150,18 +2151,19 @@ case 61: /* rule 61 can match eol */ YY_RULE_SETUP #line 100 "<stdin>" -{ yyTok = VARCALL; return yyTok; } +{yyTok = URI; return yyTok;} YY_BREAK case 62: /* rule 62 can match eol */ YY_RULE_SETUP #line 101 "<stdin>" -{yyTok = FUNCTION; return yyTok;} +{ yyTok = VARCALL; return yyTok; } YY_BREAK case 63: +/* rule 63 can match eol */ YY_RULE_SETUP -#line 103 "<stdin>" -{yyTok = UNICODERANGE; return yyTok;} +#line 102 "<stdin>" +{yyTok = FUNCTION; return yyTok;} YY_BREAK case 64: YY_RULE_SETUP @@ -2169,23 +2171,28 @@ YY_RULE_SETUP {yyTok = UNICODERANGE; return yyTok;} YY_BREAK case 65: -#line 107 "<stdin>" -case 66: YY_RULE_SETUP -#line 107 "<stdin>" -{BEGIN(INITIAL); yyTok = *yytext; return yyTok; } +#line 105 "<stdin>" +{yyTok = UNICODERANGE; return yyTok;} YY_BREAK +case 66: +#line 108 "<stdin>" case 67: YY_RULE_SETUP #line 108 "<stdin>" -{yyTok = *yytext; return yyTok;} +{BEGIN(INITIAL); yyTok = *yytext; return yyTok; } YY_BREAK case 68: YY_RULE_SETUP -#line 110 "<stdin>" +#line 109 "<stdin>" +{yyTok = *yytext; return yyTok;} + YY_BREAK +case 69: +YY_RULE_SETUP +#line 111 "<stdin>" ECHO; YY_BREAK -#line 2738 "<stdout>" +#line 2745 "<stdout>" case YY_STATE_EOF(INITIAL): case YY_END_OF_BUFFER: case YY_STATE_EOF(mediaquery): diff --git a/src/3rdparty/webkit/WebCore/history/BackForwardList.cpp b/src/3rdparty/webkit/WebCore/history/BackForwardList.cpp index 1b7c80e85f..a0636b5e49 100644 --- a/src/3rdparty/webkit/WebCore/history/BackForwardList.cpp +++ b/src/3rdparty/webkit/WebCore/history/BackForwardList.cpp @@ -266,11 +266,10 @@ bool BackForwardList::containsItem(HistoryItem* entry) } #if ENABLE(WML) -void BackForwardList::clearWmlPageHistory() +void BackForwardList::clearWMLPageHistory() { - PassRefPtr<HistoryItem> cur = currentItem(); - - for (unsigned i = 0; i < m_entries.size(); ++i) + int size = m_entries.size(); + for (int i = 0; i < size; ++i) pageCache()->remove(m_entries[i].get()); m_entries.clear(); diff --git a/src/3rdparty/webkit/WebCore/history/BackForwardList.h b/src/3rdparty/webkit/WebCore/history/BackForwardList.h index a99d387c85..fdc3360f2b 100644 --- a/src/3rdparty/webkit/WebCore/history/BackForwardList.h +++ b/src/3rdparty/webkit/WebCore/history/BackForwardList.h @@ -97,7 +97,7 @@ public: HistoryItemVector& entries(); #if ENABLE(WML) - void clearWmlPageHistory(); + void clearWMLPageHistory(); #endif private: diff --git a/src/3rdparty/webkit/WebCore/history/CachedFrame.cpp b/src/3rdparty/webkit/WebCore/history/CachedFrame.cpp index 9a43b9dd6b..5f4e746edc 100644 --- a/src/3rdparty/webkit/WebCore/history/CachedFrame.cpp +++ b/src/3rdparty/webkit/WebCore/history/CachedFrame.cpp @@ -155,4 +155,13 @@ CachedFramePlatformData* CachedFrame::cachedFramePlatformData() return m_cachedFramePlatformData.get(); } +int CachedFrame::descendantFrameCount() const +{ + int count = m_childFrames.size(); + for (size_t i = 0; i < m_childFrames.size(); ++i) + count += m_childFrames[i]->descendantFrameCount(); + + return count; +} + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/history/CachedFrame.h b/src/3rdparty/webkit/WebCore/history/CachedFrame.h index 83c3c3c60c..03024444b5 100644 --- a/src/3rdparty/webkit/WebCore/history/CachedFrame.h +++ b/src/3rdparty/webkit/WebCore/history/CachedFrame.h @@ -60,6 +60,8 @@ public: void setCachedFramePlatformData(CachedFramePlatformData*); CachedFramePlatformData* cachedFramePlatformData(); + + int descendantFrameCount() const; private: CachedFrame(Frame*); diff --git a/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp b/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp index e199337284..d2b83cf20c 100644 --- a/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp +++ b/src/3rdparty/webkit/WebCore/history/HistoryItem.cpp @@ -480,7 +480,7 @@ FormData* HistoryItem::formData() bool HistoryItem::isCurrentDocument(Document* doc) const { // FIXME: We should find a better way to check if this is the current document. - return urlString() == doc->url(); + return equalIgnoringRef(url(), doc->url()); } void HistoryItem::mergeAutoCompleteHints(HistoryItem* otherItem) diff --git a/src/3rdparty/webkit/WebCore/history/PageCache.cpp b/src/3rdparty/webkit/WebCore/history/PageCache.cpp index 7c25701c94..8d04f6f9bf 100644 --- a/src/3rdparty/webkit/WebCore/history/PageCache.cpp +++ b/src/3rdparty/webkit/WebCore/history/PageCache.cpp @@ -63,6 +63,23 @@ void PageCache::setCapacity(int capacity) prune(); } +int PageCache::frameCount() const +{ + int frameCount = 0; + for (HistoryItem* current = m_head; current; current = current->m_next) { + ++frameCount; + ASSERT(current->m_cachedPage); + frameCount += current->m_cachedPage ? current->m_cachedPage->cachedMainFrame()->descendantFrameCount() : 0; + } + + return frameCount; +} + +int PageCache::autoreleasedPageCount() const +{ + return m_autoreleaseSet.size(); +} + void PageCache::add(PassRefPtr<HistoryItem> prpItem, PassRefPtr<CachedPage> cachedPage) { ASSERT(prpItem); diff --git a/src/3rdparty/webkit/WebCore/history/PageCache.h b/src/3rdparty/webkit/WebCore/history/PageCache.h index ad15ab6221..607a87d825 100644 --- a/src/3rdparty/webkit/WebCore/history/PageCache.h +++ b/src/3rdparty/webkit/WebCore/history/PageCache.h @@ -37,7 +37,7 @@ namespace WebCore { class CachedPage; class HistoryItem; - class PageCache : Noncopyable { + class PageCache : public Noncopyable { public: friend PageCache* pageCache(); @@ -49,6 +49,10 @@ namespace WebCore { CachedPage* get(HistoryItem* item) { return item ? item->m_cachedPage.get() : 0; } void releaseAutoreleasedPagesNow(); + + int pageCount() const { return m_size; } + int frameCount() const; + int autoreleasedPageCount() const; private: typedef HashSet<RefPtr<CachedPage> > CachedPageSet; diff --git a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp index 7a255d8ab7..68781291b0 100644 --- a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp +++ b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp @@ -546,9 +546,10 @@ void CanvasRenderingContext2D::lineTo(float x, float y) return; if (!state().m_invertibleCTM) return; - if (m_path.isEmpty()) + if (!m_path.hasCurrentPoint()) m_path.moveTo(FloatPoint(x, y)); - m_path.addLineTo(FloatPoint(x, y)); + else + m_path.addLineTo(FloatPoint(x, y)); } void CanvasRenderingContext2D::quadraticCurveTo(float cpx, float cpy, float x, float y) @@ -557,9 +558,10 @@ void CanvasRenderingContext2D::quadraticCurveTo(float cpx, float cpy, float x, f return; if (!state().m_invertibleCTM) return; - if (m_path.isEmpty()) - m_path.moveTo(FloatPoint(cpx, cpy)); - m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y)); + if (!m_path.hasCurrentPoint()) + m_path.moveTo(FloatPoint(x, y)); + else + m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y)); } void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y) @@ -568,9 +570,10 @@ void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x, return; if (!state().m_invertibleCTM) return; - if (m_path.isEmpty()) - m_path.moveTo(FloatPoint(cp1x, cp1y)); - m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y)); + if (!m_path.hasCurrentPoint()) + m_path.moveTo(FloatPoint(x, y)); + else + m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y)); } void CanvasRenderingContext2D::arcTo(float x0, float y0, float x1, float y1, float r, ExceptionCode& ec) diff --git a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h index f6baa7039e..9648ffc7e9 100644 --- a/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h +++ b/src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h @@ -54,7 +54,7 @@ namespace WebCore { typedef int ExceptionCode; - class CanvasRenderingContext2D : Noncopyable { + class CanvasRenderingContext2D : public Noncopyable { public: CanvasRenderingContext2D(HTMLCanvasElement*); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp index 09362cd164..1757a7593c 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp @@ -2,7 +2,7 @@ * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Simon Hausmann <hausmann@kde.org> - * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. * (C) 2006 Graham Dennis (graham.dennis@gmail.com) * * This library is free software; you can redistribute it and/or @@ -24,51 +24,36 @@ #include "config.h" #include "HTMLAnchorElement.h" -#include "CSSHelper.h" #include "DNS.h" -#include "Document.h" -#include "Event.h" -#include "EventHandler.h" #include "EventNames.h" #include "Frame.h" -#include "FrameLoader.h" -#include "FrameLoaderClient.h" #include "HTMLImageElement.h" #include "HTMLNames.h" #include "KeyboardEvent.h" #include "MappedAttribute.h" #include "MouseEvent.h" -#include "MutationEvent.h" #include "Page.h" -#include "RenderBox.h" #include "RenderImage.h" -#include "ResourceRequest.h" -#include "SelectionController.h" #include "Settings.h" -#include "UIEvent.h" namespace WebCore { using namespace HTMLNames; -HTMLAnchorElement::HTMLAnchorElement(Document* doc) - : HTMLElement(aTag, doc) +HTMLAnchorElement::HTMLAnchorElement(Document* document) + : HTMLElement(aTag, document) , m_rootEditableElementForSelectionOnMouseDown(0) , m_wasShiftKeyDownOnMouseDown(false) { } -HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tagName, Document* doc) - : HTMLElement(tagName, doc) +HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tagName, Document* document) + : HTMLElement(tagName, document) , m_rootEditableElementForSelectionOnMouseDown(0) , m_wasShiftKeyDownOnMouseDown(false) { } -HTMLAnchorElement::~HTMLAnchorElement() -{ -} - bool HTMLAnchorElement::supportsFocus() const { if (isContentEditable()) @@ -194,7 +179,7 @@ void HTMLAnchorElement::defaultEventHandler(Event* evt) return; } - String url = parseURL(getAttribute(hrefAttr)); + String url = deprecatedParseURL(getAttribute(hrefAttr)); ASSERT(evt->target()); ASSERT(evt->target()->toNode()); @@ -283,7 +268,7 @@ void HTMLAnchorElement::parseMappedAttribute(MappedAttribute *attr) if (wasLink != isLink()) setNeedsStyleRecalc(); if (isLink()) { - String parsedURL = parseURL(attr->value()); + String parsedURL = deprecatedParseURL(attr->value()); if (document()->isDNSPrefetchEnabled()) { if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "https") || parsedURL.startsWith("//")) prefetchDNS(document()->completeURL(parsedURL).host()); @@ -320,34 +305,15 @@ bool HTMLAnchorElement::canStartSelection() const return isContentEditable(); } -const AtomicString& HTMLAnchorElement::accessKey() const -{ - return getAttribute(accesskeyAttr); -} - -void HTMLAnchorElement::setAccessKey(const AtomicString& value) -{ - setAttribute(accesskeyAttr, value); -} - -const AtomicString& HTMLAnchorElement::charset() const -{ - return getAttribute(charsetAttr); -} - -void HTMLAnchorElement::setCharset(const AtomicString& value) -{ - setAttribute(charsetAttr, value); -} - -const AtomicString& HTMLAnchorElement::coords() const -{ - return getAttribute(coordsAttr); -} - -void HTMLAnchorElement::setCoords(const AtomicString& value) +bool HTMLAnchorElement::draggable() const { - setAttribute(coordsAttr, value); + // Should be draggable if we have an href attribute. + const AtomicString& value = getAttribute(draggableAttr); + if (equalIgnoringCase(value, "true")) + return true; + if (equalIgnoringCase(value, "false")) + return false; + return hasAttribute(hrefAttr); } KURL HTMLAnchorElement::href() const @@ -360,56 +326,11 @@ void HTMLAnchorElement::setHref(const AtomicString& value) setAttribute(hrefAttr, value); } -const AtomicString& HTMLAnchorElement::hreflang() const -{ - return getAttribute(hreflangAttr); -} - -void HTMLAnchorElement::setHreflang(const AtomicString& value) -{ - setAttribute(hreflangAttr, value); -} - const AtomicString& HTMLAnchorElement::name() const { return getAttribute(nameAttr); } -void HTMLAnchorElement::setName(const AtomicString& value) -{ - setAttribute(nameAttr, value); -} - -const AtomicString& HTMLAnchorElement::rel() const -{ - return getAttribute(relAttr); -} - -void HTMLAnchorElement::setRel(const AtomicString& value) -{ - setAttribute(relAttr, value); -} - -const AtomicString& HTMLAnchorElement::rev() const -{ - return getAttribute(revAttr); -} - -void HTMLAnchorElement::setRev(const AtomicString& value) -{ - setAttribute(revAttr, value); -} - -const AtomicString& HTMLAnchorElement::shape() const -{ - return getAttribute(shapeAttr); -} - -void HTMLAnchorElement::setShape(const AtomicString& value) -{ - setAttribute(shapeAttr, value); -} - short HTMLAnchorElement::tabIndex() const { // Skip the supportsFocus check in HTMLElement. @@ -421,21 +342,6 @@ String HTMLAnchorElement::target() const return getAttribute(targetAttr); } -void HTMLAnchorElement::setTarget(const AtomicString& value) -{ - setAttribute(targetAttr, value); -} - -const AtomicString& HTMLAnchorElement::type() const -{ - return getAttribute(typeAttr); -} - -void HTMLAnchorElement::setType(const AtomicString& value) -{ - setAttribute(typeAttr, value); -} - String HTMLAnchorElement::hash() const { String ref = href().ref(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.h b/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.h index dd4b6f9386..3c731183f2 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.h @@ -2,7 +2,7 @@ * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Simon Hausmann <hausmann@kde.org> - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008, 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 @@ -32,57 +32,11 @@ class HTMLAnchorElement : public HTMLElement { public: HTMLAnchorElement(Document*); HTMLAnchorElement(const QualifiedName&, Document*); - ~HTMLAnchorElement(); - - virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; } - virtual int tagPriority() const { return 1; } - - virtual bool supportsFocus() const; - virtual bool isMouseFocusable() const; - virtual bool isKeyboardFocusable(KeyboardEvent*) const; - virtual bool isFocusable() const; - virtual void parseMappedAttribute(MappedAttribute*); - virtual void defaultEventHandler(Event*); - virtual void setActive(bool active = true, bool pause = false); - virtual void accessKeyAction(bool fullAction); - virtual bool isURLAttribute(Attribute*) const; - - virtual bool canStartSelection() const; - - const AtomicString& accessKey() const; - void setAccessKey(const AtomicString&); - - const AtomicString& charset() const; - void setCharset(const AtomicString&); - - const AtomicString& coords() const; - void setCoords(const AtomicString&); KURL href() const; void setHref(const AtomicString&); - const AtomicString& hreflang() const; - void setHreflang(const AtomicString&); - const AtomicString& name() const; - void setName(const AtomicString&); - - const AtomicString& rel() const; - void setRel(const AtomicString&); - - const AtomicString& rev() const; - void setRev(const AtomicString&); - - const AtomicString& shape() const; - void setShape(const AtomicString&); - - virtual short tabIndex() const; - - virtual String target() const; - void setTarget(const AtomicString&); - - const AtomicString& type() const; - void setType(const AtomicString&); String hash() const; String host() const; @@ -92,12 +46,30 @@ public: String protocol() const; String search() const; String text() const; - + String toString() const; bool isLiveLink() const; +protected: + virtual void parseMappedAttribute(MappedAttribute*); + private: + virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; } + virtual int tagPriority() const { return 1; } + virtual bool supportsFocus() const; + virtual bool isMouseFocusable() const; + virtual bool isKeyboardFocusable(KeyboardEvent*) const; + virtual bool isFocusable() const; + virtual void defaultEventHandler(Event*); + virtual void setActive(bool active = true, bool pause = false); + virtual void accessKeyAction(bool fullAction); + virtual bool isURLAttribute(Attribute*) const; + virtual bool canStartSelection() const; + virtual String target() const; + virtual short tabIndex() const; + virtual bool draggable() const; + Element* m_rootEditableElementForSelectionOnMouseDown; bool m_wasShiftKeyDownOnMouseDown; }; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.idl index c2dda3d022..057358efef 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. + * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> * * This library is free software; you can redistribute it and/or @@ -25,17 +25,17 @@ module html { InterfaceUUID=0c74cef8-b1f7-4b44-83a9-8deeb376a257, ImplementationUUID=30f797d5-d145-498e-a126-d8e9ddeedea3 ] HTMLAnchorElement : HTMLElement { - attribute [ConvertNullToNullString] DOMString accessKey; - attribute [ConvertNullToNullString] DOMString charset; - attribute [ConvertNullToNullString] DOMString coords; - attribute [ConvertNullToNullString] DOMString href; - attribute [ConvertNullToNullString] DOMString hreflang; - attribute [ConvertNullToNullString] DOMString name; - attribute [ConvertNullToNullString] DOMString rel; - attribute [ConvertNullToNullString] DOMString rev; - attribute [ConvertNullToNullString] DOMString shape; - attribute [ConvertNullToNullString] DOMString target; - attribute [ConvertNullToNullString] DOMString type; + attribute [ConvertNullToNullString, Reflect=accesskey] DOMString accessKey; + attribute [ConvertNullToNullString, Reflect] DOMString charset; + attribute [ConvertNullToNullString, Reflect] DOMString coords; + attribute [ConvertNullToNullString, ReflectURL] DOMString href; + attribute [ConvertNullToNullString, Reflect] DOMString hreflang; + attribute [ConvertNullToNullString, Reflect] DOMString name; + attribute [ConvertNullToNullString, Reflect] DOMString rel; + attribute [ConvertNullToNullString, Reflect] DOMString rev; + attribute [ConvertNullToNullString, Reflect] DOMString shape; + attribute [ConvertNullToNullString, Reflect] DOMString target; + attribute [ConvertNullToNullString, Reflect] DOMString type; // IE Extensions readonly attribute DOMString hash; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.cpp index 13dd911727..32dfb71342 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.cpp @@ -2,7 +2,7 @@ * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Stefan Schimanski (1Stein@gmx.de) - * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) * * This library is free software; you can redistribute it and/or @@ -24,14 +24,11 @@ #include "config.h" #include "HTMLAppletElement.h" -#include "Frame.h" #include "HTMLDocument.h" #include "HTMLNames.h" #include "MappedAttribute.h" #include "RenderApplet.h" -#include "RenderInline.h" #include "Settings.h" -#include "ScriptController.h" namespace WebCore { @@ -43,10 +40,6 @@ HTMLAppletElement::HTMLAppletElement(const QualifiedName& tagName, Document* doc ASSERT(hasTagName(appletTag)); } -HTMLAppletElement::~HTMLAppletElement() -{ -} - void HTMLAppletElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == altAttr || @@ -163,46 +156,6 @@ void HTMLAppletElement::finishParsingChildren() renderer()->setNeedsLayout(true); // This will cause it to create its widget & the Java applet } -String HTMLAppletElement::alt() const -{ - return getAttribute(altAttr); -} - -void HTMLAppletElement::setAlt(const String &value) -{ - setAttribute(altAttr, value); -} - -String HTMLAppletElement::archive() const -{ - return getAttribute(archiveAttr); -} - -void HTMLAppletElement::setArchive(const String &value) -{ - setAttribute(archiveAttr, value); -} - -String HTMLAppletElement::code() const -{ - return getAttribute(codeAttr); -} - -void HTMLAppletElement::setCode(const String &value) -{ - setAttribute(codeAttr, value); -} - -String HTMLAppletElement::codeBase() const -{ - return getAttribute(codebaseAttr); -} - -void HTMLAppletElement::setCodeBase(const String &value) -{ - setAttribute(codebaseAttr, value); -} - String HTMLAppletElement::hspace() const { return getAttribute(hspaceAttr); @@ -213,16 +166,6 @@ void HTMLAppletElement::setHspace(const String &value) setAttribute(hspaceAttr, value); } -String HTMLAppletElement::object() const -{ - return getAttribute(objectAttr); -} - -void HTMLAppletElement::setObject(const String &value) -{ - setAttribute(objectAttr, value); -} - String HTMLAppletElement::vspace() const { return getAttribute(vspaceAttr); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h index e271965377..c616bb4322 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2006, 2008, 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 @@ -33,8 +33,14 @@ class HTMLImageLoader; class HTMLAppletElement : public HTMLPlugInElement { public: HTMLAppletElement(const QualifiedName&, Document*); - ~HTMLAppletElement(); + String hspace() const; + void setHspace(const String&); + + String vspace() const; + void setVspace(const String&); + +private: virtual int tagPriority() const { return 1; } virtual void parseMappedAttribute(MappedAttribute*); @@ -45,33 +51,11 @@ public: virtual RenderWidget* renderWidgetForJSBindings() const; - String alt() const; - void setAlt(const String&); - - String archive() const; - void setArchive(const String&); - - String code() const; - void setCode(const String&); - - String codeBase() const; - void setCodeBase(const String&); - - String hspace() const; - void setHspace(const String&); - - String object() const; - void setObject(const String&); - - String vspace() const; - void setVspace(const String&); - void setupApplet() const; virtual void insertedIntoDocument(); virtual void removedFromDocument(); -private: AtomicString m_id; }; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl index da7a33ae29..cc923caa1e 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> * * This library is free software; you can redistribute it and/or @@ -29,25 +29,25 @@ module html { InterfaceUUID=9b5cb4a8-c156-4b55-afdb-c60938a4d1b1, ImplementationUUID=56544372-675e-40dd-ba39-fa708a4c7678 ] HTMLAppletElement : HTMLElement { - attribute [ConvertNullToNullString] DOMString align; - attribute [ConvertNullToNullString] DOMString alt; - attribute [ConvertNullToNullString] DOMString archive; - attribute [ConvertNullToNullString] DOMString code; - attribute [ConvertNullToNullString] DOMString codeBase; - attribute [ConvertNullToNullString] DOMString height; + attribute [ConvertNullToNullString, Reflect] DOMString align; + attribute [ConvertNullToNullString, Reflect] DOMString alt; + attribute [ConvertNullToNullString, Reflect] DOMString archive; + attribute [ConvertNullToNullString, Reflect] DOMString code; + attribute [ConvertNullToNullString, Reflect=codebase] DOMString codeBase; + attribute [ConvertNullToNullString, Reflect] DOMString height; #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT - attribute [ConvertNullToNullString] DOMString hspace; + attribute [ConvertNullToNullString, Reflect] DOMString hspace; #else attribute [ConvertFromString] long hspace; #endif - attribute [ConvertNullToNullString] DOMString name; - attribute [ConvertNullToNullString] DOMString object; + attribute [ConvertNullToNullString, Reflect] DOMString name; + attribute [ConvertNullToNullString, Reflect] DOMString object; #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT - attribute [ConvertNullToNullString] DOMString vspace; + attribute [ConvertNullToNullString, Reflect] DOMString vspace; #else attribute [ConvertFromString] long vspace; #endif - attribute [ConvertNullToNullString] DOMString width; + attribute [ConvertNullToNullString, Reflect] DOMString width; }; } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.cpp index 2f7c1a5378..b878a1a51d 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.cpp @@ -22,11 +22,8 @@ #include "config.h" #include "HTMLAreaElement.h" -#include "Document.h" -#include "FloatRect.h" #include "HTMLNames.h" #include "HitTestResult.h" -#include "Length.h" #include "MappedAttribute.h" #include "Path.h" #include "RenderObject.h" @@ -52,7 +49,7 @@ HTMLAreaElement::~HTMLAreaElement() delete [] m_coords; } -void HTMLAreaElement::parseMappedAttribute(MappedAttribute *attr) +void HTMLAreaElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == shapeAttr) { if (equalIgnoringCase(attr->value(), "default")) @@ -152,46 +149,11 @@ Path HTMLAreaElement::getRegion(const IntSize& size) const return path; } -const AtomicString& HTMLAreaElement::accessKey() const -{ - return getAttribute(accesskeyAttr); -} - -void HTMLAreaElement::setAccessKey(const AtomicString& value) -{ - setAttribute(accesskeyAttr, value); -} - -const AtomicString& HTMLAreaElement::alt() const -{ - return getAttribute(altAttr); -} - -void HTMLAreaElement::setAlt(const AtomicString& value) -{ - setAttribute(altAttr, value); -} - -const AtomicString& HTMLAreaElement::coords() const -{ - return getAttribute(coordsAttr); -} - -void HTMLAreaElement::setCoords(const AtomicString& value) -{ - setAttribute(coordsAttr, value); -} - KURL HTMLAreaElement::href() const { return document()->completeURL(getAttribute(hrefAttr)); } -void HTMLAreaElement::setHref(const AtomicString& value) -{ - setAttribute(hrefAttr, value); -} - bool HTMLAreaElement::noHref() const { return !getAttribute(nohrefAttr).isNull(); @@ -202,16 +164,6 @@ void HTMLAreaElement::setNoHref(bool noHref) setAttribute(nohrefAttr, noHref ? "" : 0); } -const AtomicString& HTMLAreaElement::shape() const -{ - return getAttribute(shapeAttr); -} - -void HTMLAreaElement::setShape(const AtomicString& value) -{ - setAttribute(shapeAttr, value); -} - bool HTMLAreaElement::isFocusable() const { return HTMLElement::isFocusable(); @@ -222,9 +174,4 @@ String HTMLAreaElement::target() const return getAttribute(targetAttr); } -void HTMLAreaElement::setTarget(const AtomicString& value) -{ - setAttribute(targetAttr, value); -} - } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.h b/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.h index 19533b1d3c..fffd45ed54 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.h @@ -34,43 +34,26 @@ class Path; class HTMLAreaElement : public HTMLAnchorElement { public: HTMLAreaElement(const QualifiedName&, Document*); - ~HTMLAreaElement(); - - virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; } - virtual int tagPriority() const { return 0; } - - virtual void parseMappedAttribute(MappedAttribute*); + virtual ~HTMLAreaElement(); bool isDefault() const { return m_shape == Default; } bool mapMouseEvent(int x, int y, const IntSize&, HitTestResult&); - virtual IntRect getRect(RenderObject*) const; - - const AtomicString& accessKey() const; - void setAccessKey(const AtomicString&); - - const AtomicString& alt() const; - void setAlt(const AtomicString&); - - const AtomicString& coords() const; - void setCoords(const AtomicString&); + IntRect getRect(RenderObject*) const; KURL href() const; - void setHref(const AtomicString&); bool noHref() const; void setNoHref(bool); - const AtomicString& shape() const; - void setShape(const AtomicString&); - +private: + virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; } + virtual int tagPriority() const { return 0; } + virtual void parseMappedAttribute(MappedAttribute*); virtual bool isFocusable() const; - virtual String target() const; - void setTarget(const AtomicString&); -private: enum Shape { Default, Poly, Rect, Circle, Unknown }; Path getRegion(const IntSize&) const; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.idl index d80ebeda2b..53239c65fd 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLAreaElement.idl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Apple Computer, Inc. + * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> * * This library is free software; you can redistribute it and/or @@ -25,13 +25,13 @@ module html { InterfaceUUID=aac98729-47d3-4623-8c5b-004783af5bd6, ImplementationUUID=f0631a41-5f55-40e5-a879-c09e663c26ba ] HTMLAreaElement : HTMLElement { - attribute [ConvertNullToNullString] DOMString accessKey; - attribute [ConvertNullToNullString] DOMString alt; - attribute [ConvertNullToNullString] DOMString coords; - attribute [ConvertNullToNullString] DOMString href; + attribute [ConvertNullToNullString, Reflect=accesskey] DOMString accessKey; + attribute [ConvertNullToNullString, Reflect] DOMString alt; + attribute [ConvertNullToNullString, Reflect] DOMString coords; + attribute [ConvertNullToNullString, ReflectURL] DOMString href; attribute boolean noHref; - attribute [ConvertNullToNullString] DOMString shape; - attribute [ConvertNullToNullString] DOMString target; + attribute [ConvertNullToNullString, Reflect] DOMString shape; + attribute [ConvertNullToNullString, Reflect] DOMString target; // IE Extensions readonly attribute DOMString hash; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in b/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in index 0fc45d7105..15db3e9f98 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in +++ b/src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in @@ -69,6 +69,7 @@ defer dir direction disabled +draggable enctype end expanded @@ -184,6 +185,7 @@ onwebkitanimationstart onwebkitanimationiteration onwebkitanimationend onwebkittransitionend +pattern placeholder pluginurl poster @@ -194,6 +196,7 @@ progress prompt readonly rel +required results rev role diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBRElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLBRElement.cpp index 6f86e6a42f..dbd8eba352 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBRElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLBRElement.cpp @@ -1,8 +1,8 @@ -/** +/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Simon Hausmann <hausmann@kde.org> - * Copyright (C) 2003, 2006 Apple Computer, Inc. + * Copyright (C) 2003, 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 @@ -38,10 +38,6 @@ HTMLBRElement::HTMLBRElement(const QualifiedName& tagName, Document *doc) ASSERT(hasTagName(brTag)); } -HTMLBRElement::~HTMLBRElement() -{ -} - bool HTMLBRElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const { if (attrName == clearAttr) { @@ -52,7 +48,7 @@ bool HTMLBRElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEnt return HTMLElement::mapToEntry(attrName, result); } -void HTMLBRElement::parseMappedAttribute(MappedAttribute *attr) +void HTMLBRElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == clearAttr) { // If the string is empty, then don't add the clear property. @@ -76,14 +72,4 @@ RenderObject* HTMLBRElement::createRenderer(RenderArena* arena, RenderStyle* sty return new (arena) RenderBR(this); } -String HTMLBRElement::clear() const -{ - return getAttribute(clearAttr); -} - -void HTMLBRElement::setClear(const String &value) -{ - setAttribute(clearAttr, value); -} - } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBRElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBRElement.h index 56004631bd..6b20b37a9a 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBRElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLBRElement.h @@ -2,6 +2,7 @@ * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Simon Hausmann <hausmann@kde.org> + * Copyright (C) 2003, 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 @@ -19,6 +20,7 @@ * Boston, MA 02110-1301, USA. * */ + #ifndef HTMLBRElement_h #define HTMLBRElement_h @@ -31,18 +33,15 @@ class String; class HTMLBRElement : public HTMLElement { public: HTMLBRElement(const QualifiedName&, Document*); - ~HTMLBRElement(); - + +private: virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; } virtual int tagPriority() const { return 0; } virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const; - virtual void parseMappedAttribute(MappedAttribute *attr); + virtual void parseMappedAttribute(MappedAttribute*); - virtual RenderObject *createRenderer(RenderArena*, RenderStyle*); - - String clear() const; - void setClear(const String&); + virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); }; } //namespace diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBRElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLBRElement.idl index 79e05edde9..6d626ff565 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBRElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLBRElement.idl @@ -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 @@ -24,7 +24,7 @@ module html { InterfaceUUID=e84b14bc-b0aa-431f-83c4-fcc297e354b0, ImplementationUUID=c10d45a4-b042-45d0-b170-6ac7173ee823 ] HTMLBRElement : HTMLElement { - attribute [ConvertNullToNullString] DOMString clear; + attribute [ConvertNullToNullString, Reflect] DOMString clear; }; } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp index 84e359cec2..613a0f78f1 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp @@ -2,7 +2,7 @@ * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2001 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2003, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2008, 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 @@ -26,9 +26,7 @@ #include "CSSHelper.h" #include "Document.h" #include "Frame.h" -#include "FrameLoader.h" #include "HTMLNames.h" -#include "KURL.h" #include "MappedAttribute.h" #include "XSSAuditor.h" @@ -36,21 +34,17 @@ namespace WebCore { using namespace HTMLNames; -HTMLBaseElement::HTMLBaseElement(const QualifiedName& qName, Document* doc) - : HTMLElement(qName, doc) +HTMLBaseElement::HTMLBaseElement(const QualifiedName& qName, Document* document) + : HTMLElement(qName, document) { ASSERT(hasTagName(baseTag)); } -HTMLBaseElement::~HTMLBaseElement() -{ -} - void HTMLBaseElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == hrefAttr) { m_hrefAttrValue = attr->value(); - m_href = parseURL(attr->value()); + m_href = deprecatedParseURL(attr->value()); process(); } else if (attr->name() == targetAttr) { m_target = attr->value(); @@ -69,8 +63,8 @@ void HTMLBaseElement::removedFromDocument() { HTMLElement::removedFromDocument(); - // Since the document doesn't have a base element... - // (This will break in the case of multiple base elements, but that's not valid anyway (?)) + // Since the document doesn't have a base element, clear the base URL and target. + // FIXME: This does not handle the case of multiple base elements correctly. document()->setBaseElementURL(KURL()); document()->setBaseElementTarget(String()); } @@ -86,17 +80,7 @@ void HTMLBaseElement::process() if (!m_target.isEmpty()) document()->setBaseElementTarget(m_target); - // ### should changing a document's base URL dynamically automatically update all images, stylesheets etc? -} - -void HTMLBaseElement::setHref(const String &value) -{ - setAttribute(hrefAttr, value); -} - -void HTMLBaseElement::setTarget(const String &value) -{ - setAttribute(targetAttr, value); + // FIXME: Changing a document's base URL should probably automatically update the resolved relative URLs of all images, stylesheets, etc. } } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h index bb980e999a..d413bece27 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2003 Apple Computer, Inc. + * Copyright (C) 2003, 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 @@ -19,6 +19,7 @@ * Boston, MA 02110-1301, USA. * */ + #ifndef HTMLBaseElement_h #define HTMLBaseElement_h @@ -29,12 +30,11 @@ namespace WebCore { class HTMLBaseElement : public HTMLElement { public: HTMLBaseElement(const QualifiedName&, Document*); - ~HTMLBaseElement(); +private: virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; } virtual int tagPriority() const { return 0; } - String href() const { return m_href; } virtual String target() const { return m_target; } virtual void parseMappedAttribute(MappedAttribute*); @@ -46,7 +46,6 @@ public: void setHref(const String&); void setTarget(const String&); -protected: String m_hrefAttrValue; String m_href; String m_target; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.idl index 76025faf27..b7385ecf53 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseElement.idl @@ -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 @@ -24,8 +24,8 @@ module html { InterfaceUUID=e4112bea-13de-40f6-93d0-41e285ae1491, ImplementationUUID=23cec074-660f-490a-996d-167d66c164d5 ] HTMLBaseElement : HTMLElement { - attribute [ConvertNullToNullString] DOMString href; - attribute [ConvertNullToNullString] DOMString target; + attribute [ConvertNullToNullString, Reflect] DOMString href; + attribute [ConvertNullToNullString, Reflect] DOMString target; }; } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.cpp index ef08822ce9..9acbf7393d 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.cpp @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. + * Copyright (C) 2003, 2004, 2005, 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 @@ -19,40 +19,22 @@ * Boston, MA 02110-1301, USA. * */ + #include "config.h" #include "HTMLBaseFontElement.h" + #include "HTMLNames.h" namespace WebCore { using namespace HTMLNames; -HTMLBaseFontElement::HTMLBaseFontElement(const QualifiedName& tagName, Document* doc) - : HTMLElement(tagName, doc) +HTMLBaseFontElement::HTMLBaseFontElement(const QualifiedName& tagName, Document* document) + : HTMLElement(tagName, document) { ASSERT(hasTagName(basefontTag)); } -String HTMLBaseFontElement::color() const -{ - return getAttribute(colorAttr); -} - -void HTMLBaseFontElement::setColor(const String &value) -{ - setAttribute(colorAttr, value); -} - -String HTMLBaseFontElement::face() const -{ - return getAttribute(faceAttr); -} - -void HTMLBaseFontElement::setFace(const String &value) -{ - setAttribute(faceAttr, value); -} - int HTMLBaseFontElement::size() const { return getAttribute(sizeAttr).toInt(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h index c15a36e4c3..e76d07f18e 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. + * Copyright (C) 2003, 2004, 2005, 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 @@ -19,6 +19,7 @@ * Boston, MA 02110-1301, USA. * */ + #ifndef HTMLBaseFontElement_h #define HTMLBaseFontElement_h @@ -28,21 +29,16 @@ namespace WebCore { class HTMLBaseFontElement : public HTMLElement { public: - HTMLBaseFontElement(const QualifiedName&, Document* doc); - - virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; } - virtual int tagPriority() const { return 0; } - - String color() const; - void setColor(const String &); - - String face() const; - void setFace(const String &); + HTMLBaseFontElement(const QualifiedName&, Document*); int size() const; void setSize(int); + +private: + virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; } + virtual int tagPriority() const { return 0; } }; -} //namespace +} // namespace #endif diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.idl index f09c9d7d51..665f124606 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.idl @@ -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 @@ -24,8 +24,8 @@ module html { InterfaceUUID=434b1be5-408e-45b5-be83-c70e11e9bb37, ImplementationUUID=1dc8508e-53c4-4e7e-93c0-16772372b2dc ] HTMLBaseFontElement : HTMLElement { - attribute [ConvertNullToNullString] DOMString color; - attribute [ConvertNullToNullString] DOMString face; + attribute [ConvertNullToNullString, Reflect] DOMString color; + attribute [ConvertNullToNullString, Reflect] DOMString face; #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C attribute [ConvertToString] DOMString size; // this changed to a long, but our existing API is a string #else diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.cpp index 682063c959..c064ad38e6 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.cpp @@ -1,7 +1,7 @@ -/** +/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2003 Apple Computer, Inc. + * Copyright (C) 2003, 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 @@ -19,6 +19,7 @@ * Boston, MA 02110-1301, USA. * */ + #include "config.h" #include "HTMLBlockquoteElement.h" @@ -28,24 +29,10 @@ namespace WebCore { using namespace HTMLNames; -HTMLBlockquoteElement::HTMLBlockquoteElement(const QualifiedName& tagName, Document* doc) - : HTMLElement(tagName, doc) +HTMLBlockquoteElement::HTMLBlockquoteElement(const QualifiedName& tagName, Document* document) + : HTMLElement(tagName, document) { ASSERT(hasTagName(blockquoteTag)); } -HTMLBlockquoteElement::~HTMLBlockquoteElement() -{ -} - -String HTMLBlockquoteElement::cite() const -{ - return getAttribute(citeAttr); -} - -void HTMLBlockquoteElement::setCite(const String &value) -{ - setAttribute(citeAttr, value); -} - } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.h index 7b5ee216de..f27d258214 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.h @@ -1,6 +1,7 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) + * Copyright (C) 2009 Apple Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -29,13 +30,10 @@ namespace WebCore { class HTMLBlockquoteElement : public HTMLElement { public: HTMLBlockquoteElement(const QualifiedName&, Document*); - ~HTMLBlockquoteElement(); +private: virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; } virtual int tagPriority() const { return 5; } - - String cite() const; - void setCite(const String&); }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.idl index d135fcda7a..f6463ddfe7 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.idl @@ -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 @@ -24,7 +24,7 @@ module html { InterfaceUUID=902d9011-c6d6-4363-b6fe-bd2d28ef553b, ImplementationUUID=345db946-ba9c-44b9-87fd-06083aa472e4 ] HTMLBlockquoteElement : HTMLElement { - attribute [ConvertNullToNullString] DOMString cite; + attribute [ConvertNullToNullString, Reflect] DOMString cite; }; } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp index 74c7c9ebb5..269e005b86 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp @@ -3,7 +3,7 @@ * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Simon Hausmann (hausmann@kde.org) * (C) 2001 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2006, 2007, 2008, 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 @@ -24,13 +24,9 @@ #include "config.h" #include "HTMLBodyElement.h" -#include "CSSHelper.h" -#include "CSSMutableStyleDeclaration.h" -#include "CSSPropertyNames.h" #include "CSSStyleSelector.h" #include "CSSStyleSheet.h" #include "CSSValueKeywords.h" -#include "Document.h" #include "EventNames.h" #include "Frame.h" #include "FrameView.h" @@ -43,8 +39,8 @@ namespace WebCore { using namespace HTMLNames; -HTMLBodyElement::HTMLBodyElement(const QualifiedName& tagName, Document* doc) - : HTMLElement(tagName, doc) +HTMLBodyElement::HTMLBodyElement(const QualifiedName& tagName, Document* document) + : HTMLElement(tagName, document) { ASSERT(hasTagName(bodyTag)); } @@ -89,7 +85,7 @@ bool HTMLBodyElement::mapToEntry(const QualifiedName& attrName, MappedAttributeE void HTMLBodyElement::parseMappedAttribute(MappedAttribute *attr) { if (attr->name() == backgroundAttr) { - String url = parseURL(attr->value()); + String url = deprecatedParseURL(attr->value()); if (!url.isEmpty()) addCSSImageProperty(attr, CSSPropertyBackgroundImage, document()->completeURL(url).string()); } else if (attr->name() == marginwidthAttr || attr->name() == leftmarginAttr) { @@ -194,16 +190,6 @@ void HTMLBodyElement::setALink(const String& value) setAttribute(alinkAttr, value); } -String HTMLBodyElement::background() const -{ - return getAttribute(backgroundAttr); -} - -void HTMLBodyElement::setBackground(const String& value) -{ - setAttribute(backgroundAttr, value); -} - String HTMLBodyElement::bgColor() const { return getAttribute(bgcolorAttr); @@ -315,7 +301,7 @@ void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const { HTMLElement::addSubresourceAttributeURLs(urls); - addSubresourceURL(urls, document()->completeURL(background())); + addSubresourceURL(urls, document()->completeURL(getAttribute(backgroundAttr))); } void HTMLBodyElement::didMoveToNewOwnerDocument() diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h index 274a675c09..575d562f03 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h @@ -1,10 +1,8 @@ /* - * This file is part of the DOM implementation for KDE. - * * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2000 Simon Hausmann <hausmann@kde.org> - * Copyright (C) 2004, 2006 Apple Computer, Inc. + * Copyright (C) 2004, 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 @@ -33,24 +31,10 @@ namespace WebCore { class HTMLBodyElement : public HTMLElement { public: HTMLBodyElement(const QualifiedName&, Document*); - ~HTMLBodyElement(); - - virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; } - virtual int tagPriority() const { return 10; } - - virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const; - virtual void parseMappedAttribute(MappedAttribute*); - - virtual void insertedIntoDocument(); - - void createLinkDecl(); - - virtual bool isURLAttribute(Attribute*) const; + virtual ~HTMLBodyElement(); String aLink() const; void setALink(const String&); - String background() const; - void setBackground(const String&); String bgColor() const; void setBgColor(const String&); String link() const; @@ -60,7 +44,6 @@ public: String vLink() const; void setVLink(const String&); - // Event handler attributes virtual EventListener* onblur() const; virtual void setOnblur(PassRefPtr<EventListener>); virtual EventListener* onerror() const; @@ -85,6 +68,19 @@ public: EventListener* onunload() const; void setOnunload(PassRefPtr<EventListener>); +private: + virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; } + virtual int tagPriority() const { return 10; } + + virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const; + virtual void parseMappedAttribute(MappedAttribute*); + + virtual void insertedIntoDocument(); + + void createLinkDecl(); + + virtual bool isURLAttribute(Attribute*) const; + virtual int scrollLeft() const; virtual void setScrollLeft(int scrollLeft); @@ -96,11 +92,9 @@ public: virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; -protected: - RefPtr<CSSMutableStyleDeclaration> m_linkDecl; - -private: virtual void didMoveToNewOwnerDocument(); + + RefPtr<CSSMutableStyleDeclaration> m_linkDecl; }; } //namespace diff --git a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl index fa3fef9913..097b4ac4bf 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl @@ -25,12 +25,12 @@ module html { InterfaceUUID=4789afc6-2d9e-4f3b-8c27-12abc9d4a014, ImplementationUUID=d2e16911-2f7e-4d58-a92c-94700d445b38 ] HTMLBodyElement : HTMLElement { - attribute [ConvertNullToNullString] DOMString aLink; - attribute [ConvertNullToNullString] DOMString background; - attribute [ConvertNullToNullString] DOMString bgColor; - attribute [ConvertNullToNullString] DOMString link; - attribute [ConvertNullToNullString] DOMString text; - attribute [ConvertNullToNullString] DOMString vLink; + attribute [ConvertNullToNullString, Reflect=alink] DOMString aLink; + attribute [ConvertNullToNullString, Reflect] DOMString background; + attribute [ConvertNullToNullString, Reflect=bgcolor] DOMString bgColor; + attribute [ConvertNullToNullString, Reflect] DOMString link; + attribute [ConvertNullToNullString, Reflect] DOMString text; + attribute [ConvertNullToNullString, Reflect=vlink] DOMString vLink; #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C #if !defined(LANGUAGE_COM) || !LANGUAGE_COM @@ -43,12 +43,6 @@ module html { attribute [DontEnum] EventListener onstorage; attribute [DontEnum] EventListener onunload; - // Overrides of Element attributes. - // attribute [DontEnum] EventListener onblur; - // attribute [DontEnum] EventListener onerror; - // attribute [DontEnum] EventListener onfocus; - // attribute [DontEnum] EventListener onload; - // Not implemented yet. // attribute [DontEnum] EventListener onafterprint; // attribute [DontEnum] EventListener onbeforeprint; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLButtonElement.h b/src/3rdparty/webkit/WebCore/html/HTMLButtonElement.h index b1d744c269..f5b9b628f7 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLButtonElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLButtonElement.h @@ -61,6 +61,7 @@ public: private: enum Type { SUBMIT, RESET, BUTTON }; + virtual bool isOptionalFormControl() const { return true; } Type m_type; bool m_activeSubmit; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDocument.cpp b/src/3rdparty/webkit/WebCore/html/HTMLDocument.cpp index 5867f0eed4..96ae9e41b4 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLDocument.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLDocument.cpp @@ -151,9 +151,12 @@ Element* HTMLDocument::activeElement() bool HTMLDocument::hasFocus() { - if (!page()->focusController()->isActive()) + Page* page = this->page(); + if (!page) return false; - if (Frame* focusedFrame = page()->focusController()->focusedFrame()) { + if (!page->focusController()->isActive()) + return false; + if (Frame* focusedFrame = page->focusController()->focusedFrame()) { if (focusedFrame->tree()->isDescendantOf(frame())) return true; } @@ -281,9 +284,8 @@ void HTMLDocument::releaseEvents() Tokenizer *HTMLDocument::createTokenizer() { bool reportErrors = false; - if (frame()) - if (Page* page = frame()->page()) - reportErrors = page->inspectorController()->windowVisible(); + if (Page* page = this->page()) + reportErrors = page->inspectorController()->windowVisible(); return new HTMLTokenizer(this, reportErrors); } @@ -307,34 +309,18 @@ PassRefPtr<Element> HTMLDocument::createElement(const AtomicString& name, Except return HTMLElementFactory::createHTMLElement(QualifiedName(nullAtom, lowerName, xhtmlNamespaceURI), this, 0, false); } -static void addItemToMap(HTMLDocument::NameCountMap& map, const AtomicString& name) +static void addItemToMap(HashCountedSet<AtomicStringImpl*>& map, const AtomicString& name) { if (name.isEmpty()) return; - - HTMLDocument::NameCountMap::iterator it = map.find(name.impl()); - if (it == map.end()) - map.set(name.impl(), 1); - else - ++(it->second); + map.add(name.impl()); } -static void removeItemFromMap(HTMLDocument::NameCountMap& map, const AtomicString& name) +static void removeItemFromMap(HashCountedSet<AtomicStringImpl*>& map, const AtomicString& name) { if (name.isEmpty()) return; - - HTMLDocument::NameCountMap::iterator it = map.find(name.impl()); - if (it == map.end()) - return; - - int oldVal = it->second; - ASSERT(oldVal != 0); - int newVal = oldVal - 1; - if (newVal == 0) - map.remove(it); - else - it->second = newVal; + map.remove(name.impl()); } void HTMLDocument::addNamedItem(const AtomicString& name) @@ -342,7 +328,7 @@ void HTMLDocument::addNamedItem(const AtomicString& name) addItemToMap(m_namedItemCounts, name); } -void HTMLDocument::removeNamedItem(const AtomicString &name) +void HTMLDocument::removeNamedItem(const AtomicString& name) { removeItemFromMap(m_namedItemCounts, name); } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDocument.h b/src/3rdparty/webkit/WebCore/html/HTMLDocument.h index ab5da50a5f..eda759328e 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLDocument.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLDocument.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2006, 2007, 2008, 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 @@ -23,8 +23,10 @@ #ifndef HTMLDocument_h #define HTMLDocument_h +#include "AtomicStringHash.h" #include "CachedResourceClient.h" #include "Document.h" +#include <wtf/HashCountedSet.h> namespace WebCore { @@ -81,8 +83,6 @@ public: void removeExtraNamedItem(const AtomicString& name); bool hasExtraNamedItem(AtomicStringImpl* name); - typedef HashMap<AtomicStringImpl*, int> NameCountMap; - protected: HTMLDocument(Frame*); @@ -92,8 +92,8 @@ private: virtual Tokenizer* createTokenizer(); virtual void determineParseMode(); - NameCountMap m_namedItemCounts; - NameCountMap m_extraNamedItemCounts; + HashCountedSet<AtomicStringImpl*> m_namedItemCounts; + HashCountedSet<AtomicStringImpl*> m_extraNamedItemCounts; }; inline bool HTMLDocument::hasNamedItem(AtomicStringImpl* name) @@ -108,6 +108,6 @@ inline bool HTMLDocument::hasExtraNamedItem(AtomicStringImpl* name) return m_extraNamedItemCounts.contains(name); } -} // namespace +} // namespace WebCore -#endif +#endif // HTMLDocument_h diff --git a/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp index 8acc6bd26d..d201482361 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp @@ -143,6 +143,13 @@ void HTMLElement::parseMappedAttribute(MappedAttribute *attr) } else if (attr->name() == dirAttr) { addCSSProperty(attr, CSSPropertyDirection, attr->value()); addCSSProperty(attr, CSSPropertyUnicodeBidi, hasLocalName(bdoTag) ? CSSValueBidiOverride : CSSValueEmbed); + } else if (attr->name() == draggableAttr) { + const AtomicString& value = attr->value(); + if (equalIgnoringCase(value, "true")) { + addCSSProperty(attr, CSSPropertyWebkitUserDrag, CSSValueElement); + addCSSProperty(attr, CSSPropertyWebkitUserSelect, CSSValueNone); + } else if (equalIgnoringCase(value, "false")) + addCSSProperty(attr, CSSPropertyWebkitUserDrag, CSSValueNone); } // standard events else if (attr->name() == onclickAttr) { @@ -692,6 +699,16 @@ void HTMLElement::setContentEditable(const String &enabled) setAttribute(contenteditableAttr, enabled.isEmpty() ? "true" : enabled); } +bool HTMLElement::draggable() const +{ + return equalIgnoringCase(getAttribute(draggableAttr), "true"); +} + +void HTMLElement::setDraggable(bool value) +{ + setAttribute(draggableAttr, value ? "true" : "false"); +} + void HTMLElement::click() { dispatchSimulatedClick(0, false, false); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLElement.h b/src/3rdparty/webkit/WebCore/html/HTMLElement.h index 60152cd3e7..21b3bb5ebd 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLElement.h @@ -79,6 +79,9 @@ public: virtual void setContentEditable(MappedAttribute*); virtual void setContentEditable(const String&); + virtual bool draggable() const; + void setDraggable(bool); + void click(); virtual void accessKeyAction(bool sendToAnyElement); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLElement.idl index 38f960a237..6b9e1d0f0d 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLElement.idl @@ -36,6 +36,7 @@ module html { attribute [ConvertNullToNullString, Reflect=class] DOMString className; attribute long tabIndex; + attribute boolean draggable; // Extensions attribute [ConvertNullToNullString] DOMString innerHTML diff --git a/src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.cpp index 2500dd6f6c..1bcbe56011 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.cpp @@ -98,9 +98,9 @@ void HTMLEmbedElement::parseMappedAttribute(MappedAttribute* attr) if (!isImageType() && m_imageLoader) m_imageLoader.clear(); } else if (attr->name() == codeAttr) - m_url = parseURL(value.string()); + m_url = deprecatedParseURL(value.string()); else if (attr->name() == srcAttr) { - m_url = parseURL(value.string()); + m_url = deprecatedParseURL(value.string()); if (renderer() && isImageType()) { if (!m_imageLoader) m_imageLoader.set(new HTMLImageLoader(this)); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp index 87938ac452..e90a6e0b86 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp @@ -204,6 +204,16 @@ void HTMLFormControlElement::setAutofocus(bool b) setAttribute(autofocusAttr, b ? "autofocus" : 0); } +bool HTMLFormControlElement::required() const +{ + return hasAttribute(requiredAttr); +} + +void HTMLFormControlElement::setRequired(bool b) +{ + setAttribute(requiredAttr, b ? "required" : 0); +} + void HTMLFormControlElement::recalcStyle(StyleChange change) { HTMLElement::recalcStyle(change); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h index a03eb1ae7d..d3dd60f9fc 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h @@ -74,6 +74,11 @@ public: virtual bool autofocus() const; void setAutofocus(bool); + bool required() const; + void setRequired(bool); + + virtual bool valueMissing() const { return false; } + virtual void recalcStyle(StyleChange); virtual const AtomicString& formControlName() const; @@ -100,6 +105,8 @@ public: virtual bool willValidate() const; + virtual bool patternMismatch() const { return false; } + void formDestroyed() { m_form = 0; } virtual void dispatchFocusEvent(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp index f2012e171d..54986b0cab 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp @@ -429,7 +429,7 @@ void HTMLFormElement::reset() void HTMLFormElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == actionAttr) - m_url = parseURL(attr->value()); + m_url = deprecatedParseURL(attr->value()); else if (attr->name() == targetAttr) m_target = attr->value(); else if (attr->name() == methodAttr) diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp index 1e09595452..7ae8f596ee 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp @@ -111,7 +111,7 @@ void HTMLFrameElementBase::openURL() void HTMLFrameElementBase::parseMappedAttribute(MappedAttribute *attr) { if (attr->name() == srcAttr) - setLocation(parseURL(attr->value())); + setLocation(deprecatedParseURL(attr->value())); else if (attr->name() == idAttr) { // Important to call through to base for the id attribute so the hasID bit gets set. HTMLFrameOwnerElement::parseMappedAttribute(attr); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp index c4bf5dc1dd..5173964180 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp @@ -110,7 +110,7 @@ void HTMLImageElement::parseMappedAttribute(MappedAttribute* attr) if (attr->value().string()[0] == '#') usemap = attr->value(); else - usemap = document()->completeURL(parseURL(attr->value())).string(); + usemap = document()->completeURL(deprecatedParseURL(attr->value())).string(); setIsLink(!attr->isNull()); } else if (attrName == ismapAttr) ismap = true; @@ -319,6 +319,12 @@ void HTMLImageElement::setBorder(const String& value) setAttribute(borderAttr, value); } +bool HTMLImageElement::draggable() const +{ + // Image elements are draggable by default. + return !equalIgnoringCase(getAttribute(draggableAttr), "false"); +} + void HTMLImageElement::setHeight(int value) { setAttribute(heightAttr, String::number(value)); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h index ae2ce3874b..5e8218655f 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h @@ -81,6 +81,8 @@ public: String border() const; void setBorder(const String&); + virtual bool draggable() const; + void setHeight(int); int hspace() const; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLImageLoader.cpp b/src/3rdparty/webkit/WebCore/html/HTMLImageLoader.cpp index ea53d7e30f..2b9f09ca1a 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLImageLoader.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLImageLoader.cpp @@ -50,7 +50,7 @@ void HTMLImageLoader::dispatchLoadEvent() String HTMLImageLoader::sourceURI(const AtomicString& attr) const { - return parseURL(attr); + return deprecatedParseURL(attr); } void HTMLImageLoader::notifyFinished(CachedResource*) diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp index 8b2aa0eaa6..f35292f610 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp @@ -47,6 +47,7 @@ #include "MappedAttribute.h" #include "MouseEvent.h" #include "Page.h" +#include "RegularExpression.h" #include "RenderButton.h" #include "RenderFileUploadControl.h" #include "RenderImage.h" @@ -114,6 +115,79 @@ bool HTMLInputElement::autoComplete() const return true; } +bool HTMLInputElement::valueMissing() const +{ + if (!isRequiredFormControl() || readOnly() || disabled()) + return false; + + switch (inputType()) { + case TEXT: + case SEARCH: + case URL: + case TELEPHONE: + case EMAIL: + case PASSWORD: + case NUMBER: + case FILE: + return value().isEmpty(); + case CHECKBOX: + return !checked(); + case RADIO: + return !document()->checkedRadioButtons().checkedButtonForGroup(name()); + case HIDDEN: + case RANGE: + case SUBMIT: + case IMAGE: + case RESET: + case BUTTON: + case ISINDEX: + break; + } + + ASSERT_NOT_REACHED(); + return false; +} + +bool HTMLInputElement::patternMismatch() const +{ + switch (inputType()) { + case ISINDEX: + case CHECKBOX: + case RADIO: + case SUBMIT: + case RESET: + case FILE: + case HIDDEN: + case IMAGE: + case BUTTON: + case RANGE: + case NUMBER: + return false; + case TEXT: + case SEARCH: + case URL: + case TELEPHONE: + case EMAIL: + case PASSWORD: + const AtomicString& pattern = getAttribute(patternAttr); + String value = this->value(); + + // Empty values can't be mismatched + if (pattern.isEmpty() || value.isEmpty()) + return false; + + RegularExpression patternRegExp(pattern, TextCaseSensitive); + int matchLength = 0; + int valueLength = value.length(); + int matchOffset = patternRegExp.match(value, 0, &matchLength); + + return matchOffset != 0 || matchLength != valueLength; + } + + ASSERT_NOT_REACHED(); + return false; +} + static inline CheckedRadioButtons& checkedRadioButtons(const HTMLInputElement *element) { if (HTMLFormElement* form = element->form()) @@ -478,31 +552,34 @@ int HTMLInputElement::selectionEnd() const return toRenderTextControl(renderer())->selectionEnd(); } +static bool isTextFieldWithRenderer(HTMLInputElement* element) +{ + if (!element->isTextField()) + return false; + + element->document()->updateLayoutIgnorePendingStylesheets(); + if (!element->renderer()) + return false; + + return true; +} + void HTMLInputElement::setSelectionStart(int start) { - if (!isTextField()) - return; - if (!renderer()) - return; - toRenderTextControl(renderer())->setSelectionStart(start); + if (isTextFieldWithRenderer(this)) + toRenderTextControl(renderer())->setSelectionStart(start); } void HTMLInputElement::setSelectionEnd(int end) { - if (!isTextField()) - return; - if (!renderer()) - return; - toRenderTextControl(renderer())->setSelectionEnd(end); + if (isTextFieldWithRenderer(this)) + toRenderTextControl(renderer())->setSelectionEnd(end); } void HTMLInputElement::select() { - if (!isTextField()) - return; - if (!renderer()) - return; - toRenderTextControl(renderer())->select(); + if (isTextFieldWithRenderer(this)) + toRenderTextControl(renderer())->select(); } void HTMLInputElement::setSelectionRange(int start, int end) @@ -838,13 +915,25 @@ bool HTMLInputElement::appendFormData(FormDataList& encoding, bool multipart) break; case FILE: { - // Can't submit file on GET. - if (!multipart) - return false; + unsigned numFiles = m_fileList->length(); + if (!multipart) { + // Send only the basenames. + // 4.10.16.4 and 4.10.16.6 sections in HTML5. + + // Unlike the multipart case, we have no special + // handling for the empty fileList because Netscape + // doesn't support for non-multipart submission of + // file inputs, and Firefox doesn't add "name=" query + // parameter. + + for (unsigned i = 0; i < numFiles; ++i) { + encoding.appendData(name(), m_fileList->item(i)->fileName()); + } + return true; + } // If no filename at all is entered, return successful but empty. // Null would be more logical, but Netscape posts an empty file. Argh. - unsigned numFiles = m_fileList->length(); if (!numFiles) { encoding.appendFile(name(), File::create("")); return true; @@ -1567,6 +1656,37 @@ void HTMLInputElement::unregisterForActivationCallbackIfNeeded() document()->unregisterForDocumentActivationCallbacks(this); } +bool HTMLInputElement::isRequiredFormControl() const +{ + if (!required()) + return false; + + switch (inputType()) { + case TEXT: + case SEARCH: + case URL: + case TELEPHONE: + case EMAIL: + case PASSWORD: + case NUMBER: + case CHECKBOX: + case RADIO: + case FILE: + return true; + case HIDDEN: + case RANGE: + case SUBMIT: + case IMAGE: + case RESET: + case BUTTON: + case ISINDEX: + return false; + } + + ASSERT_NOT_REACHED(); + return false; +} + void HTMLInputElement::cacheSelection(int start, int end) { m_data.setCachedSelectionStart(start); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h index be2b4f4f10..4d887f3793 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h @@ -90,6 +90,9 @@ public: virtual bool isTextFormControl() const { return isTextField(); } + virtual bool valueMissing() const; + virtual bool patternMismatch() const; + bool isTextButton() const { return m_type == SUBMIT || m_type == RESET || m_type == BUTTON; } virtual bool isRadioButton() const { return m_type == RADIO; } virtual bool isTextField() const { return m_type == TEXT || m_type == PASSWORD || m_type == SEARCH || m_type == ISINDEX || m_type == EMAIL || m_type == NUMBER || m_type == TELEPHONE || m_type == URL; } @@ -237,6 +240,9 @@ private: void registerForActivationCallbackIfNeeded(); void unregisterForActivationCallbackIfNeeded(); + virtual bool isOptionalFormControl() const { return !isRequiredFormControl(); } + virtual bool isRequiredFormControl() const; + InputElementData m_data; int m_xPos; int m_yPos; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl index 7cd91b0565..e19b30ecf6 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl @@ -41,8 +41,10 @@ module html { attribute long maxLength; attribute boolean multiple; attribute [ConvertNullToNullString] DOMString name; + attribute [Reflect] DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; + attribute boolean required; #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string #else diff --git a/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp index 986544ab2e..8705521c3b 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp @@ -116,7 +116,7 @@ void HTMLLinkElement::parseMappedAttribute(MappedAttribute *attr) tokenizeRelAttribute(attr->value(), m_isStyleSheet, m_alternate, m_isIcon, m_isDNSPrefetch); process(); } else if (attr->name() == hrefAttr) { - m_url = document()->completeURL(parseURL(attr->value())); + m_url = document()->completeURL(deprecatedParseURL(attr->value())); process(); } else if (attr->name() == typeAttr) { m_type = attr->value(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp index 716a59264d..7cda3fb7ab 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp @@ -848,6 +848,11 @@ void HTMLMediaElement::returnToRealtime() ExceptionCode e; setCurrentTime(maxTimeSeekable(), e); } + +bool HTMLMediaElement::supportsSave() const +{ + return m_player ? m_player->supportsSave() : false; +} void HTMLMediaElement::seek(float time, ExceptionCode& ec) { diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h index 486574bf69..27b48eaa76 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h @@ -68,8 +68,10 @@ public: void rewind(float timeDelta); void returnToRealtime(); - - virtual bool supportsFullscreen() const { return false; } + + // Eventually overloaded in HTMLVideoElement + virtual bool supportsFullscreen() const { return false; }; + virtual bool supportsSave() const; void scheduleLoad(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLObjectElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLObjectElement.cpp index 6be41c9e7e..16e9a84565 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLObjectElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLObjectElement.cpp @@ -82,7 +82,7 @@ void HTMLObjectElement::parseMappedAttribute(MappedAttribute *attr) if (!isImageType() && m_imageLoader) m_imageLoader.clear(); } else if (attr->name() == dataAttr) { - m_url = parseURL(val); + m_url = deprecatedParseURL(val); if (renderer()) m_needWidgetUpdate = true; if (renderer() && isImageType()) { diff --git a/src/3rdparty/webkit/WebCore/html/HTMLParser.h b/src/3rdparty/webkit/WebCore/html/HTMLParser.h index bd12049fc1..094582635e 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLParser.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLParser.h @@ -49,7 +49,7 @@ struct Token; * The parser for HTML. It receives a stream of tokens from the HTMLTokenizer, and * builds up the Document structure from it. */ -class HTMLParser : Noncopyable { +class HTMLParser : public Noncopyable { public: HTMLParser(HTMLDocument*, bool reportErrors); HTMLParser(DocumentFragment*); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLParserQuirks.h b/src/3rdparty/webkit/WebCore/html/HTMLParserQuirks.h index b5972a6f07..176bbfbca7 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLParserQuirks.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLParserQuirks.h @@ -33,7 +33,7 @@ namespace WebCore { class AtomicString; class Node; -class HTMLParserQuirks : Noncopyable { +class HTMLParserQuirks : public Noncopyable { public: HTMLParserQuirks() { } virtual ~HTMLParserQuirks() { } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h index e523641ed5..8f575d237a 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h @@ -130,6 +130,8 @@ private: virtual void insertedIntoTree(bool); + virtual bool isOptionalFormControl() const { return true; } + SelectElementData m_data; CollectionCache m_collectionInfo; }; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTableElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTableElement.cpp index e37c171f8d..af35740edc 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLTableElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLTableElement.cpp @@ -351,7 +351,7 @@ void HTMLTableElement::parseMappedAttribute(MappedAttribute* attr) m_borderColorAttr = true; } } else if (attr->name() == backgroundAttr) { - String url = parseURL(attr->value()); + String url = deprecatedParseURL(attr->value()); if (!url.isEmpty()) addCSSImageProperty(attr, CSSPropertyBackgroundImage, document()->completeURL(url).string()); } else if (attr->name() == frameAttr) { diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTablePartElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTablePartElement.cpp index 19babf6fc0..0f9a3e8935 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLTablePartElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLTablePartElement.cpp @@ -66,7 +66,7 @@ void HTMLTablePartElement::parseMappedAttribute(MappedAttribute *attr) if (attr->name() == bgcolorAttr) addCSSColor(attr, CSSPropertyBackgroundColor, attr->value()); else if (attr->name() == backgroundAttr) { - String url = parseURL(attr->value()); + String url = deprecatedParseURL(attr->value()); if (!url.isEmpty()) addCSSImageProperty(attr, CSSPropertyBackgroundImage, document()->completeURL(url).string()); } else if (attr->name() == bordercolorAttr) { diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp index e19ac0af89..6a1dcf87dc 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp @@ -27,6 +27,7 @@ #include "HTMLTextAreaElement.h" #include "ChromeClient.h" +#include "CSSValueKeywords.h" #include "Document.h" #include "Event.h" #include "EventNames.h" @@ -106,32 +107,34 @@ int HTMLTextAreaElement::selectionEnd() return toRenderTextControl(renderer())->selectionEnd(); } +static RenderTextControl* rendererAfterUpdateLayout(HTMLTextAreaElement* element) +{ + element->document()->updateLayoutIgnorePendingStylesheets(); + return toRenderTextControl(element->renderer()); +} + void HTMLTextAreaElement::setSelectionStart(int start) { - if (!renderer()) - return; - toRenderTextControl(renderer())->setSelectionStart(start); + if (RenderTextControl* renderer = rendererAfterUpdateLayout(this)) + renderer->setSelectionStart(start); } void HTMLTextAreaElement::setSelectionEnd(int end) { - if (!renderer()) - return; - toRenderTextControl(renderer())->setSelectionEnd(end); + if (RenderTextControl* renderer = rendererAfterUpdateLayout(this)) + renderer->setSelectionEnd(end); } void HTMLTextAreaElement::select() { - if (!renderer()) - return; - toRenderTextControl(renderer())->select(); + if (RenderTextControl* renderer = rendererAfterUpdateLayout(this)) + renderer->select(); } void HTMLTextAreaElement::setSelectionRange(int start, int end) { - if (!renderer()) - return; - toRenderTextControl(renderer())->setSelectionRange(start, end); + if (RenderTextControl* renderer = rendererAfterUpdateLayout(this)) + renderer->setSelectionRange(start, end); } void HTMLTextAreaElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) @@ -172,6 +175,15 @@ void HTMLTextAreaElement::parseMappedAttribute(MappedAttribute* attr) wrap = SoftWrap; if (wrap != m_wrap) { m_wrap = wrap; + + if (shouldWrapText()) { + addCSSProperty(attr, CSSPropertyWhiteSpace, CSSValuePreWrap); + addCSSProperty(attr, CSSPropertyWordWrap, CSSValueBreakWord); + } else { + addCSSProperty(attr, CSSPropertyWhiteSpace, CSSValuePre); + addCSSProperty(attr, CSSPropertyWordWrap, CSSValueNormal); + } + if (renderer()) renderer()->setNeedsLayoutAndPrefWidthsRecalc(); } @@ -229,7 +241,8 @@ bool HTMLTextAreaElement::isMouseFocusable() const void HTMLTextAreaElement::updateFocusAppearance(bool restorePreviousSelection) { ASSERT(renderer()); - + ASSERT(!document()->childNeedsAndNotInStyleRecalc()); + if (!restorePreviousSelection || m_cachedSelectionStart < 0) { #if ENABLE(ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL) // Devices with trackballs or d-pads may focus on a textarea in route diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h index e22b5d5241..5ef8e55d11 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h @@ -52,6 +52,8 @@ public: virtual bool isTextFormControl() const { return true; } + virtual bool valueMissing() const { return isRequiredFormControl() && !disabled() && !readOnly() && value().isEmpty(); } + int selectionStart(); int selectionEnd(); @@ -96,6 +98,9 @@ private: void updateValue() const; + virtual bool isOptionalFormControl() const { return !isRequiredFormControl(); } + virtual bool isRequiredFormControl() const { return required(); } + int m_rows; int m_cols; WrapMethod m_wrap; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl index f6ac05a27d..ba8a0620b1 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl @@ -36,6 +36,7 @@ module html { attribute boolean autofocus; attribute [ConvertNullToNullString] DOMString name; attribute boolean readOnly; + attribute boolean required; attribute long rows; readonly attribute DOMString type; attribute [ConvertNullToNullString] DOMString value; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp index 5788eb659b..e4e46c5e7c 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp @@ -1494,7 +1494,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString& src, State state) if (m_currentToken.attrs && !m_fragment) { if (m_doc->frame() && m_doc->frame()->script()->isEnabled()) { if ((a = m_currentToken.attrs->getAttributeItem(srcAttr))) - m_scriptTagSrcAttrValue = m_doc->completeURL(parseURL(a->value())).string(); + m_scriptTagSrcAttrValue = m_doc->completeURL(deprecatedParseURL(a->value())).string(); } } } diff --git a/src/3rdparty/webkit/WebCore/html/PreloadScanner.cpp b/src/3rdparty/webkit/WebCore/html/PreloadScanner.cpp index 1c1d28a1b5..60e538ea50 100644 --- a/src/3rdparty/webkit/WebCore/html/PreloadScanner.cpp +++ b/src/3rdparty/webkit/WebCore/html/PreloadScanner.cpp @@ -696,12 +696,12 @@ void PreloadScanner::processAttribute() String value(m_attributeValue.data(), m_attributeValue.size()); if (tag == scriptTag || tag == imgTag) { if (attribute == srcAttr && m_urlToLoad.isEmpty()) - m_urlToLoad = parseURL(value); + m_urlToLoad = deprecatedParseURL(value); else if (attribute == charsetAttr) m_charset = value; } else if (tag == linkTag) { if (attribute == hrefAttr && m_urlToLoad.isEmpty()) - m_urlToLoad = parseURL(value); + m_urlToLoad = deprecatedParseURL(value); else if (attribute == relAttr) { bool styleSheet = false; bool alternate = false; @@ -848,7 +848,7 @@ void PreloadScanner::emitCSSRule() String rule(m_cssRule.data(), m_cssRule.size()); if (equalIgnoringCase(rule, "import") && !m_cssRuleValue.isEmpty()) { String value(m_cssRuleValue.data(), m_cssRuleValue.size()); - String url = parseURL(value); + String url = deprecatedParseURL(value); if (!url.isEmpty()) m_document->docLoader()->preload(CachedResource::CSSStyleSheet, url, String(), scanningBody()); } diff --git a/src/3rdparty/webkit/WebCore/html/PreloadScanner.h b/src/3rdparty/webkit/WebCore/html/PreloadScanner.h index f1d2cf813b..6022ee7861 100644 --- a/src/3rdparty/webkit/WebCore/html/PreloadScanner.h +++ b/src/3rdparty/webkit/WebCore/html/PreloadScanner.h @@ -37,7 +37,7 @@ namespace WebCore { class CachedResourceClient; class Document; - class PreloadScanner : Noncopyable { + class PreloadScanner : public Noncopyable { public: PreloadScanner(Document*); ~PreloadScanner(); diff --git a/src/3rdparty/webkit/WebCore/html/ValidityState.cpp b/src/3rdparty/webkit/WebCore/html/ValidityState.cpp index 8ff629c503..86227d41b1 100644 --- a/src/3rdparty/webkit/WebCore/html/ValidityState.cpp +++ b/src/3rdparty/webkit/WebCore/html/ValidityState.cpp @@ -22,7 +22,6 @@ #include "config.h" #include "ValidityState.h" -#include "HTMLFormControlElement.h" namespace WebCore { diff --git a/src/3rdparty/webkit/WebCore/html/ValidityState.h b/src/3rdparty/webkit/WebCore/html/ValidityState.h index a011f7a2b9..4b2f0228eb 100644 --- a/src/3rdparty/webkit/WebCore/html/ValidityState.h +++ b/src/3rdparty/webkit/WebCore/html/ValidityState.h @@ -23,13 +23,12 @@ #ifndef ValidityState_h #define ValidityState_h +#include "HTMLFormControlElement.h" #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> namespace WebCore { - class HTMLFormControlElement; - class ValidityState : public RefCounted<ValidityState> { public: static PassRefPtr<ValidityState> create(HTMLFormControlElement* owner) @@ -39,9 +38,9 @@ namespace WebCore { HTMLFormControlElement* control() const { return m_control; } - bool valueMissing() { return false; } + bool valueMissing() { return control()->valueMissing(); } bool typeMismatch() { return false; } - bool patternMismatch() { return false; } + bool patternMismatch() { return control()->patternMismatch(); } bool tooLong() { return false; } bool rangeUnderflow() { return false; } bool rangeOverflow() { return false; } diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp new file mode 100644 index 0000000000..d50efd3e87 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp @@ -0,0 +1,363 @@ +/* + * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "InspectorBackend.h" + +#include "Element.h" +#include "Frame.h" +#include "FrameLoader.h" +#include "HTMLFrameOwnerElement.h" +#include "InspectorClient.h" +#include "InspectorController.h" +#include "InspectorResource.h" + +#if ENABLE(JAVASCRIPT_DEBUGGER) +#include "JavaScriptCallFrame.h" +#include "JavaScriptDebugServer.h" +using namespace JSC; +#endif + +#include <wtf/RefPtr.h> +#include <wtf/StdLibExtras.h> + +using namespace std; + +namespace WebCore { + +InspectorBackend::InspectorBackend(InspectorController* inspectorController, InspectorClient* client) + : m_inspectorController(inspectorController) + , m_client(client) +{ +} + +InspectorBackend::~InspectorBackend() +{ +} + +void InspectorBackend::hideDOMNodeHighlight() +{ + if (m_inspectorController) + m_inspectorController->hideHighlight(); +} + +String InspectorBackend::localizedStringsURL() +{ + return m_client->localizedStringsURL(); +} + +String InspectorBackend::hiddenPanels() +{ + return m_client->hiddenPanels(); +} + +void InspectorBackend::windowUnloading() +{ + if (m_inspectorController) + m_inspectorController->close(); +} + +bool InspectorBackend::isWindowVisible() +{ + if (m_inspectorController) + return m_inspectorController->windowVisible(); + return false; +} + +void InspectorBackend::addResourceSourceToFrame(long identifier, Node* frame) +{ + if (!m_inspectorController) + return; + RefPtr<InspectorResource> resource = m_inspectorController->resources().get(identifier); + if (resource) { + String sourceString = resource->sourceString(); + if (!sourceString.isEmpty()) + addSourceToFrame(resource->mimeType(), sourceString, frame); + } +} + +bool InspectorBackend::addSourceToFrame(const String& mimeType, const String& source, Node* frameNode) +{ + ASSERT_ARG(frameNode, frameNode); + + if (!frameNode) + return false; + + if (!frameNode->attached()) { + ASSERT_NOT_REACHED(); + return false; + } + + ASSERT(frameNode->isElementNode()); + if (!frameNode->isElementNode()) + return false; + + Element* element = static_cast<Element*>(frameNode); + ASSERT(element->isFrameOwnerElement()); + if (!element->isFrameOwnerElement()) + return false; + + HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(element); + ASSERT(frameOwner->contentFrame()); + if (!frameOwner->contentFrame()) + return false; + + FrameLoader* loader = frameOwner->contentFrame()->loader(); + + loader->setResponseMIMEType(mimeType); + loader->begin(); + loader->write(source); + loader->end(); + + return true; +} + +void InspectorBackend::clearMessages() +{ + if (m_inspectorController) + m_inspectorController->clearConsoleMessages(); +} + +void InspectorBackend::toggleNodeSearch() +{ + if (m_inspectorController) + m_inspectorController->toggleSearchForNodeInPage(); +} + +void InspectorBackend::attach() +{ + if (m_inspectorController) + m_inspectorController->attachWindow(); +} + +void InspectorBackend::detach() +{ + if (m_inspectorController) + m_inspectorController->detachWindow(); +} + +void InspectorBackend::setAttachedWindowHeight(unsigned height) +{ + if (m_inspectorController) + m_inspectorController->setAttachedWindowHeight(height); +} + +void InspectorBackend::storeLastActivePanel(const String& panelName) +{ + if (m_inspectorController) + m_inspectorController->storeLastActivePanel(panelName); +} + +bool InspectorBackend::searchingForNode() +{ + if (m_inspectorController) + return m_inspectorController->searchingForNodeInPage(); + return false; +} + +void InspectorBackend::loaded() +{ + if (m_inspectorController) + m_inspectorController->scriptObjectReady(); +} + +void InspectorBackend::enableResourceTracking(bool always) +{ + if (m_inspectorController) + m_inspectorController->enableResourceTracking(always); +} + +void InspectorBackend::disableResourceTracking(bool always) +{ + if (m_inspectorController) + m_inspectorController->disableResourceTracking(always); +} + +bool InspectorBackend::resourceTrackingEnabled() const +{ + if (m_inspectorController) + return m_inspectorController->resourceTrackingEnabled(); + return false; +} + +void InspectorBackend::moveWindowBy(float x, float y) const +{ + if (m_inspectorController) + m_inspectorController->moveWindowBy(x, y); +} + +void InspectorBackend::closeWindow() +{ + if (m_inspectorController) + m_inspectorController->closeWindow(); +} + +const String& InspectorBackend::platform() const +{ +#if PLATFORM(MAC) +#ifdef BUILDING_ON_TIGER + DEFINE_STATIC_LOCAL(const String, platform, ("mac-tiger")); +#else + DEFINE_STATIC_LOCAL(const String, platform, ("mac-leopard")); +#endif +#elif PLATFORM(WIN_OS) + DEFINE_STATIC_LOCAL(const String, platform, ("windows")); +#elif PLATFORM(QT) + DEFINE_STATIC_LOCAL(const String, platform, ("qt")); +#elif PLATFORM(GTK) + DEFINE_STATIC_LOCAL(const String, platform, ("gtk")); +#elif PLATFORM(WX) + DEFINE_STATIC_LOCAL(const String, platform, ("wx")); +#else + DEFINE_STATIC_LOCAL(const String, platform, ("unknown")); +#endif + + return platform; +} + +#if ENABLE(JAVASCRIPT_DEBUGGER) +const ProfilesArray& InspectorBackend::profiles() const +{ + if (m_inspectorController) + return m_inspectorController->profiles(); + return m_emptyProfiles; +} + +void InspectorBackend::startProfiling() +{ + if (m_inspectorController) + m_inspectorController->startUserInitiatedProfiling(); +} + +void InspectorBackend::stopProfiling() +{ + if (m_inspectorController) + m_inspectorController->stopUserInitiatedProfiling(); +} + +void InspectorBackend::enableProfiler(bool always) +{ + if (m_inspectorController) + m_inspectorController->enableProfiler(always); +} + +void InspectorBackend::disableProfiler(bool always) +{ + if (m_inspectorController) + m_inspectorController->disableProfiler(always); +} + +bool InspectorBackend::profilerEnabled() +{ + if (m_inspectorController) + return m_inspectorController->profilerEnabled(); + return false; +} + +void InspectorBackend::enableDebugger(bool always) +{ + if (m_inspectorController) + m_inspectorController->enableDebuggerFromFrontend(always); +} + +void InspectorBackend::disableDebugger(bool always) +{ + if (m_inspectorController) + m_inspectorController->disableDebugger(always); +} + +bool InspectorBackend::debuggerEnabled() const +{ + if (m_inspectorController) + return m_inspectorController->debuggerEnabled(); + return false; +} + +JavaScriptCallFrame* InspectorBackend::currentCallFrame() const +{ + return JavaScriptDebugServer::shared().currentCallFrame(); +} + +void InspectorBackend::addBreakpoint(const String& sourceID, unsigned lineNumber) +{ + intptr_t sourceIDValue = sourceID.toIntPtr(); + JavaScriptDebugServer::shared().addBreakpoint(sourceIDValue, lineNumber); +} + +void InspectorBackend::removeBreakpoint(const String& sourceID, unsigned lineNumber) +{ + intptr_t sourceIDValue = sourceID.toIntPtr(); + JavaScriptDebugServer::shared().removeBreakpoint(sourceIDValue, lineNumber); +} + +bool InspectorBackend::pauseOnExceptions() +{ + return JavaScriptDebugServer::shared().pauseOnExceptions(); +} + +void InspectorBackend::setPauseOnExceptions(bool pause) +{ + JavaScriptDebugServer::shared().setPauseOnExceptions(pause); +} + +void InspectorBackend::pauseInDebugger() +{ + JavaScriptDebugServer::shared().pauseProgram(); +} + +void InspectorBackend::resumeDebugger() +{ + if (m_inspectorController) + m_inspectorController->resumeDebugger(); +} + +void InspectorBackend::stepOverStatementInDebugger() +{ + JavaScriptDebugServer::shared().stepOverStatement(); +} + +void InspectorBackend::stepIntoStatementInDebugger() +{ + JavaScriptDebugServer::shared().stepIntoStatement(); +} + +void InspectorBackend::stepOutOfFunctionInDebugger() +{ + JavaScriptDebugServer::shared().stepOutOfFunction(); +} + +#endif + +void InspectorBackend::highlight(Node* node) +{ + if (m_inspectorController) + m_inspectorController->highlight(node); +} + +} // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h new file mode 100644 index 0000000000..bb891c2a28 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef InspectorBackend_h +#define InspectorBackend_h + +#include "Console.h" +#include "InspectorController.h" +#include "PlatformString.h" + +#include <wtf/RefCounted.h> + +namespace WebCore { + +class CachedResource; +class InspectorClient; +class JavaScriptCallFrame; +class Node; + +class InspectorBackend : public RefCounted<InspectorBackend> +{ +public: + static PassRefPtr<InspectorBackend> create(InspectorController* inspectorController, InspectorClient* client) + { + return adoptRef(new InspectorBackend(inspectorController, client)); + } + + ~InspectorBackend(); + + InspectorController* inspectorController() { return m_inspectorController; } + + void disconnectController() { m_inspectorController = 0; } + + void hideDOMNodeHighlight(); + + String localizedStringsURL(); + String hiddenPanels(); + + void windowUnloading(); + + bool isWindowVisible(); + + void addResourceSourceToFrame(long identifier, Node* frame); + bool addSourceToFrame(const String& mimeType, const String& source, Node* frame); + + void clearMessages(); + + void toggleNodeSearch(); + + void attach(); + void detach(); + + void setAttachedWindowHeight(unsigned height); + + void storeLastActivePanel(const String& panelName); + + bool searchingForNode(); + + void loaded(); + + void enableResourceTracking(bool always); + void disableResourceTracking(bool always); + bool resourceTrackingEnabled() const; + + void moveWindowBy(float x, float y) const; + void closeWindow(); + + const String& platform() const; + +#if ENABLE(JAVASCRIPT_DEBUGGER) + const ProfilesArray& profiles() const; + + void startProfiling(); + void stopProfiling(); + + void enableProfiler(bool always); + void disableProfiler(bool always); + bool profilerEnabled(); + + void enableDebugger(bool always); + void disableDebugger(bool always); + bool debuggerEnabled() const; + + JavaScriptCallFrame* currentCallFrame() const; + + void addBreakpoint(const String& sourceID, unsigned lineNumber); + void removeBreakpoint(const String& sourceID, unsigned lineNumber); + + bool pauseOnExceptions(); + void setPauseOnExceptions(bool pause); + + void pauseInDebugger(); + void resumeDebugger(); + + void stepOverStatementInDebugger(); + void stepIntoStatementInDebugger(); + void stepOutOfFunctionInDebugger(); +#endif + + // Generic code called from custom implementations. + void highlight(Node* node); + +private: + InspectorBackend(InspectorController* inspectorController, InspectorClient* client); + + InspectorController* m_inspectorController; + InspectorClient* m_client; +#if ENABLE(JAVASCRIPT_DEBUGGER) + ProfilesArray m_emptyProfiles; +#endif +}; + +} // namespace WebCore + +#endif // !defined(InspectorBackend_h) diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorController.idl b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl index c6263051a2..21e6d99bc4 100644 --- a/src/3rdparty/webkit/WebCore/inspector/InspectorController.idl +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl @@ -33,24 +33,23 @@ module core { interface [ GenerateConstructor - ] InspectorController { - [ImplementationFunction=hideHighlight] void hideDOMNodeHighlight(); + ] InspectorBackend { + void hideDOMNodeHighlight(); [Custom] void highlightDOMNode(in Node node); - [ImplementationFunction=scriptObjectReady] void loaded(); - [ImplementationFunction=close] void windowUnloading(); - [ImplementationFunction=attachWindow] void attach(); - [ImplementationFunction=detachWindow] void detach(); + void loaded(); + void windowUnloading(); + void attach(); + void detach(); void closeWindow(); - [ImplementationFunction=clearConsoleMessages] void clearMessages(); - [ImplementationFunction=toggleSearchForNodeInPage] void toggleNodeSearch(); + void clearMessages(); + void toggleNodeSearch(); - [ImplementationFunction=windowVisible] boolean isWindowVisible(); - [ImplementationFunction=searchingForNodeInPage] boolean searchingForNode(); + boolean isWindowVisible(); + boolean searchingForNode(); void addResourceSourceToFrame(in long identifier, in Node frame); boolean addSourceToFrame(in DOMString mimeType, in DOMString sourceValue, in Node frame); - [Custom] Node getResourceDocumentNode(in long long identifier); [Custom] void search(in Node node, in DOMString query); #if defined(ENABLE_DATABASE) && ENABLE_DATABASE [Custom] DOMObject databaseTableNames(in Database database); @@ -67,26 +66,34 @@ module core { boolean resourceTrackingEnabled(); void enableResourceTracking(in boolean always); void disableResourceTracking(in boolean always); + void storeLastActivePanel(in DOMString panelName); #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER - void enableDebuggerFromFrontend(in boolean always); + boolean debuggerEnabled(); + void enableDebugger(in boolean always); void disableDebugger(in boolean always); + + void addBreakpoint(in DOMString sourceID, in unsigned long lineNumber); + void removeBreakpoint(in DOMString sourceID, in unsigned long lineNumber); + void pauseInDebugger(); void resumeDebugger(); + void stepOverStatementInDebugger(); void stepIntoStatementInDebugger(); void stepOutOfFunctionInDebugger(); - boolean debuggerEnabled(); + + [Custom] DOMObject currentCallFrame(); + boolean pauseOnExceptions(); + void setPauseOnExceptions(in boolean pauseOnExceptions); + boolean profilerEnabled(); - [ImplementationFunction=startUserInitiatedProfiling] void startProfiling(); - [ImplementationFunction=stopUserInitiatedProfiling] void stopProfiling(); void enableProfiler(in boolean always); void disableProfiler(in boolean always); - [Custom] DOMObject currentCallFrame(); - void setPauseOnExceptions(in boolean pauseOnExceptions); - void addBreakpoint(in DOMString sourceID, in unsigned long lineNumber); - void removeBreakpoint(in DOMString sourceID, in unsigned long lineNumber); + + void startProfiling(); + void stopProfiling(); [Custom] Array profiles(); #endif diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp index 4b2dd59f72..2c7e5887d1 100644 --- a/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp @@ -47,6 +47,7 @@ #include "GraphicsContext.h" #include "HTMLFrameOwnerElement.h" #include "HitTestResult.h" +#include "InspectorBackend.h" #include "InspectorClient.h" #include "InspectorFrontend.h" #include "InspectorDatabaseResource.h" @@ -99,65 +100,12 @@ static const char* const UserInitiatedProfileName = "org.webkit.profiles.user-in static const char* const resourceTrackingEnabledSettingName = "resourceTrackingEnabled"; static const char* const debuggerEnabledSettingName = "debuggerEnabled"; static const char* const profilerEnabledSettingName = "profilerEnabled"; +static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight"; +static const char* const lastActivePanelSettingName = "lastActivePanel"; -bool InspectorController::addSourceToFrame(const String& mimeType, const String& source, Node* frameNode) -{ - ASSERT_ARG(frameNode, frameNode); - - if (!frameNode) - return false; - - if (!frameNode->attached()) { - ASSERT_NOT_REACHED(); - return false; - } - - ASSERT(frameNode->isElementNode()); - if (!frameNode->isElementNode()) - return false; - - Element* element = static_cast<Element*>(frameNode); - ASSERT(element->isFrameOwnerElement()); - if (!element->isFrameOwnerElement()) - return false; - - HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(element); - ASSERT(frameOwner->contentFrame()); - if (!frameOwner->contentFrame()) - return false; - - FrameLoader* loader = frameOwner->contentFrame()->loader(); - - loader->setResponseMIMEType(mimeType); - loader->begin(); - loader->write(source); - loader->end(); - - return true; -} - -const String& InspectorController::platform() const -{ -#if PLATFORM(MAC) -#ifdef BUILDING_ON_TIGER - DEFINE_STATIC_LOCAL(const String, platform, ("mac-tiger")); -#else - DEFINE_STATIC_LOCAL(const String, platform, ("mac-leopard")); -#endif -#elif PLATFORM(WIN_OS) - DEFINE_STATIC_LOCAL(const String, platform, ("windows")); -#elif PLATFORM(QT) - DEFINE_STATIC_LOCAL(const String, platform, ("qt")); -#elif PLATFORM(GTK) - DEFINE_STATIC_LOCAL(const String, platform, ("gtk")); -#elif PLATFORM(WX) - DEFINE_STATIC_LOCAL(const String, platform, ("wx")); -#else - DEFINE_STATIC_LOCAL(const String, platform, ("unknown")); -#endif - - return platform; -} +static const unsigned defaultAttachedHeight = 300; +static const float minimumAttachedHeight = 250.0f; +static const float maximumAttachedHeightRatio = 0.75f; static unsigned s_inspectorControllerCount; static HashMap<String, InspectorController::Setting*>* s_settingCache; @@ -168,13 +116,14 @@ InspectorController::InspectorController(Page* page, InspectorClient* client) , m_page(0) , m_scriptState(0) , m_windowVisible(false) - , m_showAfterVisible(ElementsPanel) + , m_showAfterVisible(CurrentPanel) , m_nextIdentifier(-2) , m_groupLevel(0) , m_searchingForNode(false) , m_previousMessage(0) , m_resourceTrackingEnabled(false) , m_resourceTrackingSettingsLoaded(false) + , m_inspectorBackend(InspectorBackend::create(this, client)) #if ENABLE(JAVASCRIPT_DEBUGGER) , m_debuggerEnabled(false) , m_attachDebuggerWhenShown(false) @@ -209,6 +158,8 @@ InspectorController::~InspectorController() delete s_settingCache; s_settingCache = 0; } + + m_inspectorBackend->disconnectController(); } void InspectorController::inspectedPageDestroyed() @@ -279,20 +230,6 @@ void InspectorController::setSetting(const String& key, const Setting& setting) m_client->storeSetting(key, setting); } -String InspectorController::localizedStringsURL() -{ - if (!enabled()) - return String(); - return m_client->localizedStringsURL(); -} - -String InspectorController::hiddenPanels() -{ - if (!enabled()) - return String(); - return m_client->hiddenPanels(); -} - // Trying to inspect something in a frame with JavaScript disabled would later lead to // crashes trying to create JavaScript wrappers. Some day we could fix this issue, but // for now prevent crashes here by never targeting a node in such a frame. @@ -371,14 +308,27 @@ void InspectorController::setWindowVisible(bool visible, bool attached) if (m_windowVisible) { setAttachedWindow(attached); populateScriptObjects(); + + // Console panel is implemented as a 'fast view', so there should be + // real panel opened along with it. + bool showConsole = m_showAfterVisible == ConsolePanel; + if (m_showAfterVisible == CurrentPanel || showConsole) { + Setting lastActivePanelSetting = setting(lastActivePanelSettingName); + if (lastActivePanelSetting.type() == Setting::StringType) + m_showAfterVisible = specialPanelForJSName(lastActivePanelSetting.string()); + else + m_showAfterVisible = ElementsPanel; + } + if (m_nodeToFocus) focusNode(); #if ENABLE(JAVASCRIPT_DEBUGGER) if (m_attachDebuggerWhenShown) enableDebugger(); #endif - if (m_showAfterVisible != CurrentPanel) - showPanel(m_showAfterVisible); + showPanel(m_showAfterVisible); + if (showConsole) + showPanel(ConsolePanel); } else { #if ENABLE(JAVASCRIPT_DEBUGGER) // If the window is being closed with the debugger enabled, @@ -391,7 +341,6 @@ void InspectorController::setWindowVisible(bool visible, bool attached) #endif resetScriptObjects(); } - m_showAfterVisible = CurrentPanel; } @@ -453,11 +402,26 @@ void InspectorController::endGroup(MessageSource source, unsigned lineNumber, co addConsoleMessage(0, new ConsoleMessage(source, EndGroupMessageType, LogMessageLevel, String(), lineNumber, sourceURL, m_groupLevel)); } +static unsigned constrainedAttachedWindowHeight(unsigned preferredHeight, unsigned totalWindowHeight) +{ + return roundf(max(minimumAttachedHeight, min<float>(preferredHeight, totalWindowHeight * maximumAttachedHeightRatio))); +} + void InspectorController::attachWindow() { if (!enabled()) return; + + unsigned inspectedPageHeight = m_inspectedPage->mainFrame()->view()->visibleHeight(); + m_client->attachWindow(); + + Setting attachedHeight = setting(inspectorAttachedHeightName); + unsigned preferredHeight = attachedHeight.type() == Setting::IntegerType ? attachedHeight.integerValue() : defaultAttachedHeight; + + // We need to constrain the window height here in case the user has resized the inspected page's window so that + // the user's preferred height would be too big to display. + m_client->setAttachedWindowHeight(constrainedAttachedWindowHeight(preferredHeight, inspectedPageHeight)); } void InspectorController::detachWindow() @@ -479,7 +443,18 @@ void InspectorController::setAttachedWindowHeight(unsigned height) { if (!enabled()) return; - m_client->setAttachedWindowHeight(height); + + unsigned totalHeight = m_page->mainFrame()->view()->visibleHeight() + m_inspectedPage->mainFrame()->view()->visibleHeight(); + unsigned attachedHeight = constrainedAttachedWindowHeight(height, totalHeight); + + setSetting(inspectorAttachedHeightName, Setting(attachedHeight)); + + m_client->setAttachedWindowHeight(attachedHeight); +} + +void InspectorController::storeLastActivePanel(const String& panelName) +{ + setSetting(lastActivePanelSettingName, Setting(panelName)); } void InspectorController::toggleSearchForNodeInPage() @@ -492,19 +467,6 @@ void InspectorController::toggleSearchForNodeInPage() hideHighlight(); } -void InspectorController::addResourceSourceToFrame(long identifier, Node* frame) -{ - if (!enabled() || !m_frontend) - return; - - RefPtr<InspectorResource> resource = resources().get(identifier); - if (resource) { - String sourceString = resource->sourceString(); - if (!sourceString.isEmpty()) - addSourceToFrame(resource->mimeType(), sourceString, frame); - } -} - void InspectorController::mouseDidMoveOverElement(const HitTestResult& result, unsigned) { if (!enabled() || !m_searchingForNode) @@ -546,7 +508,7 @@ void InspectorController::windowScriptObjectAvailable() m_page->mainFrame()->document()->securityOrigin()->grantUniversalAccess(); m_scriptState = scriptStateFromPage(m_page); - ScriptGlobalObject::set(m_scriptState, "InspectorController", this); + ScriptGlobalObject::set(m_scriptState, "InspectorController", m_inspectorBackend.get()); } void InspectorController::scriptObjectReady() @@ -635,7 +597,18 @@ void InspectorController::close() void InspectorController::showWindow() { ASSERT(enabled()); + + unsigned inspectedPageHeight = m_inspectedPage->mainFrame()->view()->visibleHeight(); + m_client->showWindow(); + + Setting attachedHeight = setting(inspectorAttachedHeightName); + unsigned preferredHeight = attachedHeight.type() == Setting::IntegerType ? attachedHeight.integerValue() : defaultAttachedHeight; + + // This call might not go through (if the window starts out detached), but if the window is initially created attached, + // InspectorController::attachWindow is never called, so we need to make sure to set the attachedWindowHeight. + // FIXME: Clean up code so we only have to call setAttachedWindowHeight in InspectorController::attachWindow + m_client->setAttachedWindowHeight(constrainedAttachedWindowHeight(preferredHeight, inspectedPageHeight)); } void InspectorController::closeWindow() @@ -790,7 +763,9 @@ void InspectorController::addResource(InspectorResource* resource) void InspectorController::removeResource(InspectorResource* resource) { m_resources.remove(resource->identifier()); - m_knownResources.remove(resource->requestURL()); + String requestURL = resource->requestURL(); + if (!requestURL.isNull()) + m_knownResources.remove(requestURL); Frame* frame = resource->frame(); ResourcesMap* resourceMap = m_frameResources.get(frame); @@ -1116,7 +1091,7 @@ void InspectorController::addScriptProfile(Profile* profile) if (!m_frontend) return; - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); m_frontend->addProfile(toJS(m_scriptState, profile)); } @@ -1265,28 +1240,6 @@ void InspectorController::disableDebugger(bool always) m_frontend->debuggerWasDisabled(); } -JavaScriptCallFrame* InspectorController::currentCallFrame() const -{ - return JavaScriptDebugServer::shared().currentCallFrame(); -} - -bool InspectorController::pauseOnExceptions() -{ - return JavaScriptDebugServer::shared().pauseOnExceptions(); -} - -void InspectorController::setPauseOnExceptions(bool pause) -{ - JavaScriptDebugServer::shared().setPauseOnExceptions(pause); -} - -void InspectorController::pauseInDebugger() -{ - if (!m_debuggerEnabled) - return; - JavaScriptDebugServer::shared().pauseProgram(); -} - void InspectorController::resumeDebugger() { if (!m_debuggerEnabled) @@ -1294,39 +1247,6 @@ void InspectorController::resumeDebugger() JavaScriptDebugServer::shared().continueProgram(); } -void InspectorController::stepOverStatementInDebugger() -{ - if (!m_debuggerEnabled) - return; - JavaScriptDebugServer::shared().stepOverStatement(); -} - -void InspectorController::stepIntoStatementInDebugger() -{ - if (!m_debuggerEnabled) - return; - JavaScriptDebugServer::shared().stepIntoStatement(); -} - -void InspectorController::stepOutOfFunctionInDebugger() -{ - if (!m_debuggerEnabled) - return; - JavaScriptDebugServer::shared().stepOutOfFunction(); -} - -void InspectorController::addBreakpoint(const String& sourceID, unsigned lineNumber) -{ - intptr_t sourceIDValue = sourceID.toIntPtr(); - JavaScriptDebugServer::shared().addBreakpoint(sourceIDValue, lineNumber); -} - -void InspectorController::removeBreakpoint(const String& sourceID, unsigned lineNumber) -{ - intptr_t sourceIDValue = sourceID.toIntPtr(); - JavaScriptDebugServer::shared().removeBreakpoint(sourceIDValue, lineNumber); -} - // JavaScriptDebugListener functions void InspectorController::didParseSource(ExecState*, const SourceCode& source) @@ -1529,4 +1449,20 @@ bool InspectorController::stopTiming(const String& title, double& elapsed) return true; } +InspectorController::SpecialPanels InspectorController::specialPanelForJSName(const String& panelName) +{ + if (panelName == "elements") + return ElementsPanel; + else if (panelName == "resources") + return ResourcesPanel; + else if (panelName == "scripts") + return ScriptsPanel; + else if (panelName == "profiles") + return ProfilesPanel; + else if (panelName == "databases") + return DatabasesPanel; + else + return ElementsPanel; +} + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorController.h b/src/3rdparty/webkit/WebCore/inspector/InspectorController.h index 4c90bc560b..771f74154e 100644 --- a/src/3rdparty/webkit/WebCore/inspector/InspectorController.h +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorController.h @@ -56,6 +56,7 @@ class Database; class DocumentLoader; class GraphicsContext; class HitTestResult; +class InspectorBackend; class InspectorClient; class InspectorFrontend; class JavaScriptCallFrame; @@ -76,9 +77,9 @@ class InspectorDatabaseResource; class InspectorDOMStorageResource; class InspectorResource; -class InspectorController : public RefCounted<InspectorController> +class InspectorController #if ENABLE(JAVASCRIPT_DEBUGGER) - , JavaScriptDebugListener + : JavaScriptDebugListener #endif { public: @@ -113,6 +114,18 @@ public: m_simpleContent.m_boolean = value; } + explicit Setting(unsigned value) + : m_type(IntegerType) + { + m_simpleContent.m_integer = value; + } + + explicit Setting(const String& value) + : m_type(StringType) + { + m_string = value; + } + Type type() const { return m_type; } String string() const { ASSERT(m_type == StringType); return m_string; } @@ -139,14 +152,11 @@ public: bool m_boolean; } m_simpleContent; }; - - static PassRefPtr<InspectorController> create(Page* page, InspectorClient* inspectorClient) - { - return adoptRef(new InspectorController(page, inspectorClient)); - } - + InspectorController(Page*, InspectorClient*); ~InspectorController(); + InspectorBackend* inspectorBackend() { return m_inspectorBackend.get(); } + void inspectedPageDestroyed(); void pageDestroyed() { m_page = 0; } @@ -157,9 +167,6 @@ public: const Setting& setting(const String& key) const; void setSetting(const String& key, const Setting&); - String localizedStringsURL(); - String hiddenPanels(); - void inspect(Node*); void highlight(Node*); void hideHighlight(); @@ -171,8 +178,6 @@ public: bool windowVisible(); void setWindowVisible(bool visible = true, bool attached = false); - void addResourceSourceToFrame(long identifier, Node* frame); - bool addSourceToFrame(const String& mimeType, const String& source, Node*); void addMessageToConsole(MessageSource, MessageType, MessageLevel, ScriptCallStack*); void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID); void clearConsoleMessages(); @@ -180,9 +185,6 @@ public: void attachWindow(); void detachWindow(); - void setAttachedWindow(bool); - void setAttachedWindowHeight(unsigned height); - void toggleSearchForNodeInPage(); bool searchingForNodeInPage() { return m_searchingForNode; }; void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); @@ -191,7 +193,6 @@ public: void inspectedWindowScriptObjectCleared(Frame*); void windowScriptObjectAvailable(); - void scriptObjectReady(); void setFrontendProxyObject(ScriptState* state, ScriptObject object); void populateScriptObjects(); @@ -225,9 +226,6 @@ public: const ResourcesMap& resources() const { return m_resources; } - void moveWindowBy(float x, float y) const; - void closeWindow(); - void drawNodeHighlight(GraphicsContext&) const; void count(const String& title, unsigned lineNumber, const String& sourceID); @@ -238,8 +236,6 @@ public: void startGroup(MessageSource source, ScriptCallStack* callFrame); void endGroup(MessageSource source, unsigned lineNumber, const String& sourceURL); - const String& platform() const; - #if ENABLE(JAVASCRIPT_DEBUGGER) void addProfile(PassRefPtr<JSC::Profile>, unsigned lineNumber, const JSC::UString& sourceURL); void addProfileFinishedMessageToConsole(PassRefPtr<JSC::Profile>, unsigned lineNumber, const JSC::UString& sourceURL); @@ -250,35 +246,19 @@ public: bool isRecordingUserInitiatedProfile() const { return m_recordingUserInitiatedProfile; } JSC::UString getCurrentUserInitiatedProfileName(bool incrementProfileNumber); - void startUserInitiatedProfilingSoon(); void startUserInitiatedProfiling(Timer<InspectorController>* = 0); void stopUserInitiatedProfiling(); - void toggleRecordButton(bool); void enableProfiler(bool always = false, bool skipRecompile = false); void disableProfiler(bool always = false); bool profilerEnabled() const { return enabled() && m_profilerEnabled; } - void enableDebuggerFromFrontend(bool always); void enableDebugger(); void disableDebugger(bool always = false); bool debuggerEnabled() const { return m_debuggerEnabled; } - JavaScriptCallFrame* currentCallFrame() const; - - void addBreakpoint(const String& sourceID, unsigned lineNumber); - void removeBreakpoint(const String& sourceID, unsigned lineNumber); - - bool pauseOnExceptions(); - void setPauseOnExceptions(bool pause); - - void pauseInDebugger(); void resumeDebugger(); - void stepOverStatementInDebugger(); - void stepIntoStatementInDebugger(); - void stepOutOfFunctionInDebugger(); - virtual void didParseSource(JSC::ExecState*, const JSC::SourceCode&); virtual void failedToParseSource(JSC::ExecState*, const JSC::SourceCode&, int errorLine, const JSC::UString& errorMessage); virtual void didPause(); @@ -286,7 +266,20 @@ public: #endif private: - InspectorController(Page*, InspectorClient*); + friend class InspectorBackend; + + // Following are used from InspectorBackend and internally. + void scriptObjectReady(); + void moveWindowBy(float x, float y) const; + void setAttachedWindow(bool); + void setAttachedWindowHeight(unsigned height); + void storeLastActivePanel(const String& panelName); + void closeWindow(); +#if ENABLE(JAVASCRIPT_DEBUGGER) + void startUserInitiatedProfilingSoon(); + void toggleRecordButton(bool); + void enableDebuggerFromFrontend(bool always); +#endif void focusNode(); @@ -303,6 +296,8 @@ private: bool isMainResourceLoader(DocumentLoader* loader, const KURL& requestUrl); + SpecialPanels specialPanelForJSName(const String& panelName); + Page* m_inspectedPage; InspectorClient* m_client; OwnPtr<InspectorFrontend> m_frontend; @@ -331,6 +326,7 @@ private: ConsoleMessage* m_previousMessage; bool m_resourceTrackingEnabled; bool m_resourceTrackingSettingsLoaded; + RefPtr<InspectorBackend> m_inspectorBackend; #if ENABLE(JAVASCRIPT_DEBUGGER) bool m_debuggerEnabled; bool m_attachDebuggerWhenShown; diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp b/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp index 1ce0defcc2..9225a03921 100644 --- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp +++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp @@ -104,7 +104,7 @@ JSValue JavaScriptCallFrame::evaluate(const UString& script, JSValue& exception) if (!m_isValid) return jsNull(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return m_debuggerCallFrame.evaluate(script, exception); } diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp index 84bc2f6803..10eff26a1d 100644 --- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp +++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp @@ -554,7 +554,7 @@ void JavaScriptDebugServer::recompileAllJSFunctionsSoon() void JavaScriptDebugServer::recompileAllJSFunctions(Timer<JavaScriptDebugServer>*) { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); JSGlobalData* globalData = JSDOMWindow::commonJSGlobalData(); // If JavaScript is running, it's not safe to recompile, since we'll end diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptProfileNode.cpp b/src/3rdparty/webkit/WebCore/inspector/JavaScriptProfileNode.cpp index 5b5c340b01..3c3e279783 100644 --- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptProfileNode.cpp +++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptProfileNode.cpp @@ -84,7 +84,7 @@ static JSValueRef getLineNumber(JSContextRef ctx, JSObjectRef thisObject, JSStri static JSValueRef getTotalTime(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -95,7 +95,7 @@ static JSValueRef getTotalTime(JSContextRef ctx, JSObjectRef thisObject, JSStrin static JSValueRef getSelfTime(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -106,7 +106,7 @@ static JSValueRef getSelfTime(JSContextRef ctx, JSObjectRef thisObject, JSString static JSValueRef getTotalPercent(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -117,7 +117,7 @@ static JSValueRef getTotalPercent(JSContextRef ctx, JSObjectRef thisObject, JSSt static JSValueRef getSelfPercent(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -128,7 +128,7 @@ static JSValueRef getSelfPercent(JSContextRef ctx, JSObjectRef thisObject, JSStr static JSValueRef getNumberOfCalls(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -139,7 +139,7 @@ static JSValueRef getNumberOfCalls(JSContextRef ctx, JSObjectRef thisObject, JSS static JSValueRef getChildren(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef* exception) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -186,7 +186,7 @@ static JSValueRef getChildren(JSContextRef ctx, JSObjectRef thisObject, JSString static JSValueRef getParent(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -198,7 +198,7 @@ static JSValueRef getParent(JSContextRef ctx, JSObjectRef thisObject, JSStringRe static JSValueRef getHead(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -210,7 +210,7 @@ static JSValueRef getHead(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, static JSValueRef getVisible(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -221,7 +221,7 @@ static JSValueRef getVisible(JSContextRef ctx, JSObjectRef thisObject, JSStringR static JSValueRef getCallUID(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { - JSC::JSLock lock(false); + JSC::JSLock lock(SilenceAssertionsOnly); if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/Breakpoint.js b/src/3rdparty/webkit/WebCore/inspector/front-end/Breakpoint.js index 8611cf5e27..347df6084f 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/Breakpoint.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/Breakpoint.js @@ -29,6 +29,7 @@ WebInspector.Breakpoint = function(url, line, sourceID) this.line = line; this.sourceID = sourceID; this._enabled = true; + this._sourceText = ""; } WebInspector.Breakpoint.prototype = { @@ -48,6 +49,28 @@ WebInspector.Breakpoint.prototype = { this.dispatchEventToListeners("enabled"); else this.dispatchEventToListeners("disabled"); + }, + + get sourceText() + { + return this._sourceText; + }, + + set sourceText(text) + { + this._sourceText = text; + this.dispatchEventToListeners("text-changed"); + }, + + get label() + { + var displayName = (this.url ? WebInspector.displayNameForURL(this.url) : WebInspector.UIString("(program)")); + return displayName + ":" + this.line; + }, + + get id() + { + return this.sourceID + ":" + this.line; } } diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/src/3rdparty/webkit/WebCore/inspector/front-end/BreakpointsSidebarPane.js index 2b8f3cdedd..14f8c06c48 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/BreakpointsSidebarPane.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/BreakpointsSidebarPane.js @@ -27,7 +27,10 @@ WebInspector.BreakpointsSidebarPane = function() { WebInspector.SidebarPane.call(this, WebInspector.UIString("Breakpoints")); - this.breakpoints = []; + this.breakpoints = {}; + + this.listElement = document.createElement("ol"); + this.listElement.className = "breakpoint-list"; this.emptyElement = document.createElement("div"); this.emptyElement.className = "info"; @@ -39,11 +42,21 @@ WebInspector.BreakpointsSidebarPane = function() WebInspector.BreakpointsSidebarPane.prototype = { addBreakpoint: function(breakpoint) { - this.breakpoints.push(breakpoint); + if (this.breakpoints[breakpoint.id]) + return; + + this.breakpoints[breakpoint.id] = breakpoint; + breakpoint.addEventListener("enabled", this._breakpointEnableChanged, this); breakpoint.addEventListener("disabled", this._breakpointEnableChanged, this); + breakpoint.addEventListener("text-changed", this._breakpointTextChanged, this); - // FIXME: add to the breakpoints UI. + this._appendBreakpointElement(breakpoint); + + if (this.emptyElement.parentElement) { + this.bodyElement.removeChild(this.emptyElement); + this.bodyElement.appendChild(this.listElement); + } if (!InspectorController.debuggerEnabled() || !breakpoint.sourceID) return; @@ -52,13 +65,73 @@ WebInspector.BreakpointsSidebarPane.prototype = { InspectorController.addBreakpoint(breakpoint.sourceID, breakpoint.line); }, + _appendBreakpointElement: function(breakpoint) + { + function checkboxClicked() + { + breakpoint.enabled = !breakpoint.enabled; + } + + function labelClicked() + { + var script = WebInspector.panels.scripts.scriptOrResourceForID(breakpoint.sourceID); + if (script) + WebInspector.panels.scripts.showScript(script, breakpoint.line); + } + + var breakpointElement = document.createElement("li"); + breakpoint._breakpointListElement = breakpointElement; + breakpointElement._breakpointObject = breakpoint; + + var checkboxElement = document.createElement("input"); + checkboxElement.className = "checkbox-elem"; + checkboxElement.type = "checkbox"; + checkboxElement.checked = breakpoint.enabled; + checkboxElement.addEventListener("click", checkboxClicked, false); + breakpointElement.appendChild(checkboxElement); + + var labelElement = document.createElement("a"); + labelElement.textContent = breakpoint.label; + labelElement.addEventListener("click", labelClicked, false); + breakpointElement.appendChild(labelElement); + + var sourceTextElement = document.createElement("div"); + sourceTextElement.textContent = breakpoint.sourceText; + sourceTextElement.className = "source-text"; + breakpointElement.appendChild(sourceTextElement); + + var currentElement = this.listElement.firstChild; + while (currentElement) { + var currentBreak = currentElement._breakpointObject; + if (currentBreak.url > breakpoint.url) { + this.listElement.insertBefore(breakpointElement, currentElement); + return; + } else if (currentBreak.url == breakpoint.url && currentBreak.line > breakpoint.line) { + this.listElement.insertBefore(breakpointElement, currentElement); + return; + } + currentElement = currentElement.nextSibling; + } + this.listElement.appendChild(breakpointElement); + }, + removeBreakpoint: function(breakpoint) { - this.breakpoints.remove(breakpoint); + if (!this.breakpoints[breakpoint.id]) + return; + delete this.breakpoints[breakpoint.id]; + breakpoint.removeEventListener("enabled", null, this); breakpoint.removeEventListener("disabled", null, this); + breakpoint.removeEventListener("text-changed", null, this); - // FIXME: remove from the breakpoints UI. + var element = breakpoint._breakpointListElement; + element.parentElement.removeChild(element); + + if (!this.listElement.firstChild) { + this.bodyElement.removeChild(this.listElement); + this.bodyElement.appendChild(this.emptyElement); + } if (!InspectorController.debuggerEnabled() || !breakpoint.sourceID) return; @@ -70,7 +143,8 @@ WebInspector.BreakpointsSidebarPane.prototype = { { var breakpoint = event.target; - // FIXME: change the breakpoint checkbox state in the UI. + var checkbox = breakpoint._breakpointListElement.firstChild; + checkbox.checked = breakpoint.enabled; if (!InspectorController.debuggerEnabled() || !breakpoint.sourceID) return; @@ -79,6 +153,14 @@ WebInspector.BreakpointsSidebarPane.prototype = { InspectorController.addBreakpoint(breakpoint.sourceID, breakpoint.line); else InspectorController.removeBreakpoint(breakpoint.sourceID, breakpoint.line); + }, + + _breakpointTextChanged: function(event) + { + var breakpoint = event.target; + + var sourceTextElement = breakpoint._breakpointListElement.firstChild.nextSibling.nextSibling; + sourceTextElement.textContent = breakpoint.sourceText; } } diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js b/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js index ca9ac0057f..520e213a24 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/Console.js @@ -409,16 +409,35 @@ WebInspector.Console.prototype = { }, \ dir: function() { return console.dir.apply(console, arguments) }, \ dirxml: function() { return console.dirxml.apply(console, arguments) }, \ - keys: function(o) { var a = []; for (k in o) a.push(k); return a; }, \ - values: function(o) { var a = []; for (k in o) a.push(o[k]); return a; }, \ + keys: function(o) { var a = []; for (var k in o) a.push(k); return a; }, \ + values: function(o) { var a = []; for (var k in o) a.push(o[k]); return a; }, \ profile: function() { return console.profile.apply(console, arguments) }, \ - profileEnd: function() { return console.profileEnd.apply(console, arguments) } \ + profileEnd: function() { return console.profileEnd.apply(console, arguments) }, \ + _inspectedNodes: [], \ + _addInspectedNode: function(node) { \ + var inspectedNodes = _inspectorCommandLineAPI._inspectedNodes; \ + inspectedNodes.unshift(node); \ + if (inspectedNodes.length >= 5) \ + inspectedNodes.pop(); \ + }, \ + get $0() { return _inspectorCommandLineAPI._inspectedNodes[0] }, \ + get $1() { return _inspectorCommandLineAPI._inspectedNodes[1] }, \ + get $2() { return _inspectorCommandLineAPI._inspectedNodes[2] }, \ + get $3() { return _inspectorCommandLineAPI._inspectedNodes[3] }, \ + get $4() { return _inspectorCommandLineAPI._inspectedNodes[4] } \ };"); inspectedWindow._inspectorCommandLineAPI.clear = InspectorController.wrapCallback(this.clearMessages.bind(this)); } }, - + + addInspectedNode: function(node) + { + var inspectedWindow = InspectorController.inspectedWindow(); + this._ensureCommandLineAPIInstalled(inspectedWindow); + inspectedWindow._inspectorCommandLineAPI._addInspectedNode(node); + }, + doEvalInWindow: function(expression, callback) { if (!expression) { diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/DatabasesPanel.js b/src/3rdparty/webkit/WebCore/inspector/front-end/DatabasesPanel.js index 4644b3b22e..b1d815f9c9 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/DatabasesPanel.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/DatabasesPanel.js @@ -332,7 +332,7 @@ WebInspector.DatabasesPanel.prototype = { var nodes = []; var length = domStorage.length; - for (index = 0; index < domStorage.length; index++) { + for (var index = 0; index < domStorage.length; index++) { var data = {}; var key = String(domStorage.key(index)); diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js index 3c9be545be..76d97469ec 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js @@ -60,6 +60,8 @@ WebInspector.ElementsPanel = function() InspectorController.toggleNodeSearch(); this.panel.nodeSearchButton.removeStyleClass("toggled-on"); } + + WebInspector.console.addInspectedNode(this._focusedDOMNode); }; this.contentElement.appendChild(this.treeOutline.element); diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsTreeOutline.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsTreeOutline.js index 2da2f104b7..ef53209156 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsTreeOutline.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsTreeOutline.js @@ -1,6 +1,7 @@ /* * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> + * Copyright (C) 2009 Joseph Pecoraro * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -255,6 +256,9 @@ WebInspector.ElementsTreeElement = function(node) // The title will be updated in onattach. TreeElement.call(this, "", node, titleInfo.hasChildren); + + if (this.representedObject.nodeType == Node.ELEMENT_NODE) + this._canAddAttributes = true; } WebInspector.ElementsTreeElement.prototype = { @@ -296,9 +300,36 @@ WebInspector.ElementsTreeElement.prototype = { this.listItemElement.addStyleClass("hovered"); } else this.listItemElement.removeStyleClass("hovered"); + if (this._canAddAttributes) + this.toggleNewAttributeButton(); } }, + toggleNewAttributeButton: function() + { + function removeWhenEditing(event) + { + if (this._addAttributeElement && this._addAttributeElement.parentNode) + this._addAttributeElement.parentNode.removeChild(this._addAttributeElement); + delete this._addAttributeElement; + } + + if (!this._addAttributeElement && this._hovered && !this._editing) { + var span = document.createElement("span"); + span.className = "add-attribute"; + span.textContent = "\u2026"; + span.addEventListener("dblclick", removeWhenEditing.bind(this), false); + this._addAttributeElement = span; + + var tag = this.listItemElement.getElementsByClassName("webkit-html-tag")[0]; + this._insertInLastAttributePosition(tag, span); + } else if (!this._hovered && this._addAttributeElement) { + if (this._addAttributeElement.parentNode) + this._addAttributeElement.parentNode.removeChild(this._addAttributeElement); + delete this._addAttributeElement; + } + }, + updateSelection: function() { var listItemElement = this.listItemElement; @@ -483,7 +514,7 @@ WebInspector.ElementsTreeElement.prototype = { if (this._editing) return; - if (this._startEditing(event)) + if (this._startEditing(event, treeElement)) return; if (this.treeOutline.panel) { @@ -495,7 +526,20 @@ WebInspector.ElementsTreeElement.prototype = { this.expand(); }, - _startEditing: function(event) + _insertInLastAttributePosition: function(tag, node) + { + if (tag.getElementsByClassName("webkit-html-attribute").length > 0) + tag.insertBefore(node, tag.lastChild); + else { + var nodeName = tag.textContent.match(/^<(.*?)>$/)[1]; + tag.textContent = ''; + tag.appendChild(document.createTextNode('<'+nodeName)); + tag.appendChild(node); + tag.appendChild(document.createTextNode('>')); + } + }, + + _startEditing: function(event, treeElement) { if (this.treeOutline.focusedDOMNode != this.representedObject) return; @@ -509,12 +553,51 @@ WebInspector.ElementsTreeElement.prototype = { var attribute = event.target.enclosingNodeOrSelfWithClass("webkit-html-attribute"); if (attribute) - return this._startEditingAttribute(attribute, event); + return this._startEditingAttribute(attribute, event.target); + + var newAttribute = event.target.enclosingNodeOrSelfWithClass("add-attribute"); + if (newAttribute) + return this._addNewAttribute(treeElement.listItemElement); return false; }, - _startEditingAttribute: function(attribute, event) + _addNewAttribute: function(listItemElement) + { + var attr = document.createElement("span"); + attr.className = "webkit-html-attribute"; + attr.style.marginLeft = "2px"; // overrides the .editing margin rule + attr.style.marginRight = "2px"; // overrides the .editing margin rule + var name = document.createElement("span"); + name.className = "webkit-html-attribute-name new-attribute"; + name.textContent = " "; + var value = document.createElement("span"); + value.className = "webkit-html-attribute-value"; + attr.appendChild(name); + attr.appendChild(value); + + var tag = listItemElement.getElementsByClassName("webkit-html-tag")[0]; + this._insertInLastAttributePosition(tag, attr); + return this._startEditingAttribute(attr, attr); + }, + + _triggerEditAttribute: function(attributeName) + { + var attributeElements = this.listItemElement.getElementsByClassName("webkit-html-attribute-name"); + for (var i = 0, len = attributeElements.length; i < len; ++i) { + if (attributeElements[i].textContent === attributeName) { + for (var elem = attributeElements[i].nextSibling; elem; elem = elem.nextSibling) { + if (elem.nodeType !== Node.ELEMENT_NODE) + continue; + + if (elem.hasStyleClass("webkit-html-attribute-value")) + return this._startEditingAttribute(attributeElements[i].parentNode, elem); + } + } + } + }, + + _startEditingAttribute: function(attribute, elementForSelection) { if (WebInspector.isBeingEdited(attribute)) return true; @@ -545,7 +628,7 @@ WebInspector.ElementsTreeElement.prototype = { this._editing = true; WebInspector.startEditing(attribute, this._attributeEditingCommitted.bind(this), this._editingCancelled.bind(this), attributeName); - window.getSelection().setBaseAndExtent(event.target, 0, event.target, 1); + window.getSelection().setBaseAndExtent(elementForSelection, 0, elementForSelection, 1); return true; }, @@ -563,15 +646,56 @@ WebInspector.ElementsTreeElement.prototype = { return true; }, - _attributeEditingCommitted: function(element, newText, oldText, attributeName) + _attributeEditingCommitted: function(element, newText, oldText, attributeName, moveDirection) { delete this._editing; + // Before we do anything, determine where we should move + // next based on the current element's settings + var moveToAttribute; + var newAttribute; + if (moveDirection) { + var found = false; + var attributes = this.representedObject.attributes; + for (var i = 0, len = attributes.length; i < len; ++i) { + if (attributes[i].name === attributeName) { + found = true; + if (moveDirection === "backward" && i > 0) + moveToAttribute = attributes[i - 1].name; + else if (moveDirection === "forward" && i < attributes.length - 1) + moveToAttribute = attributes[i + 1].name; + else if (moveDirection === "forward" && i === attributes.length - 1) + newAttribute = true; + } + } + + if (!found && moveDirection === "backward") + moveToAttribute = attributes[attributes.length - 1].name; + else if (!found && moveDirection === "forward" && !/^\s*$/.test(newText)) + newAttribute = true; + } + + function moveToNextAttributeIfNeeded() { + if (moveToAttribute) + this._triggerEditAttribute(moveToAttribute); + else if (newAttribute) + this._addNewAttribute(this.listItemElement); + } + var parseContainerElement = document.createElement("span"); parseContainerElement.innerHTML = "<span " + newText + "></span>"; var parseElement = parseContainerElement.firstChild; - if (!parseElement || !parseElement.hasAttributes()) { - this._editingCancelled(element, context); + + if (!parseElement) { + this._editingCancelled(element, attributeName); + moveToNextAttributeIfNeeded.call(this); + return; + } + + if (!parseElement.hasAttributes()) { + InspectorController.inspectedWindow().Element.prototype.removeAttribute.call(this.representedObject, attributeName); + this._updateTitle(); + moveToNextAttributeIfNeeded.call(this); return; } @@ -579,7 +703,9 @@ WebInspector.ElementsTreeElement.prototype = { for (var i = 0; i < parseElement.attributes.length; ++i) { var attr = parseElement.attributes[i]; foundOriginalAttribute = foundOriginalAttribute || attr.name === attributeName; - InspectorController.inspectedWindow().Element.prototype.setAttribute.call(this.representedObject, attr.name, attr.value); + try { + InspectorController.inspectedWindow().Element.prototype.setAttribute.call(this.representedObject, attr.name, attr.value); + } catch(e) {} // ignore invalid attribute (innerHTML doesn't throw errors, but this can) } if (!foundOriginalAttribute) @@ -588,6 +714,8 @@ WebInspector.ElementsTreeElement.prototype = { this._updateTitle(); this.treeOutline.focusedNodeChanged(true); + + moveToNextAttributeIfNeeded.call(this); }, _textNodeEditingCommitted: function(element, newText) diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ObjectPropertiesSection.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ObjectPropertiesSection.js index 59e73747ab..d8c34d7fbb 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/ObjectPropertiesSection.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ObjectPropertiesSection.js @@ -1,5 +1,6 @@ /* * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2009 Joseph Pecoraro * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -58,7 +59,7 @@ WebInspector.ObjectPropertiesSection.prototype = { if (this.extraProperties) for (var prop in this.extraProperties) properties.push(prop); - properties.sort(); + properties.sort(this._displaySort); this.propertiesTreeOutline.removeChildren(); @@ -79,6 +80,44 @@ WebInspector.ObjectPropertiesSection.prototype = { var infoElement = new TreeElement(title, null, false); this.propertiesTreeOutline.appendChild(infoElement); } + }, + + _displaySort: function(a,b) { + + // if used elsewhere make sure to + // - convert a and b to strings (not needed here, properties are all strings) + // - check if a == b (not needed here, no two properties can be the same) + + var diff = 0; + var chunk = /^\d+|^\D+/; + var chunka, chunkb, anum, bnum; + while (diff === 0) { + if (!a && b) + return -1; + if (!b && a) + return 1; + chunka = a.match(chunk)[0]; + chunkb = b.match(chunk)[0]; + anum = !isNaN(chunka); + bnum = !isNaN(chunkb); + if (anum && !bnum) + return -1; + if (bnum && !anum) + return 1; + if (anum && bnum) { + diff = chunka - chunkb; + if (diff === 0 && chunka.length !== chunkb.length) { + if (!+chunka && !+chunkb) // chunks are strings of all 0s (special case) + return chunka.length - chunkb.length; + else + return chunkb.length - chunka.length; + } + } else if (chunka !== chunkb) + return (chunka < chunkb) ? -1 : 1; + a = a.substring(chunka.length); + b = b.substring(chunkb.length); + } + return diff; } } @@ -109,7 +148,7 @@ WebInspector.ObjectPropertyTreeElement.prototype = { this.removeChildren(); var childObject = this.safePropertyValue(this.parentObject, this.propertyName); - var properties = Object.sortedProperties(childObject); + var properties = Object.sortedProperties(childObject, WebInspector.ObjectPropertiesSection.prototype._displaySort); for (var i = 0; i < properties.length; ++i) { var propertyName = properties[i]; if (propertyName === "__treeElementIdentifier") @@ -156,7 +195,7 @@ WebInspector.ObjectPropertyTreeElement.prototype = { var hasSubProperties = false; var type = typeof childObject; if (childObject && (type === "object" || type === "function")) { - for (subPropertyName in childObject) { + for (var subPropertyName in childObject) { if (subPropertyName === "__treeElementIdentifier") continue; hasSubProperties = true; diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js b/src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js index 85d5cd2a0a..bcb7b2a8e1 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js @@ -341,12 +341,6 @@ WebInspector.Resource.prototype = { } }, - get documentNode() { - if ("identifier" in this) - return InspectorController.getResourceDocumentNode(this.identifier); - return null; - }, - get requestHeaders() { if (this._requestHeaders === undefined) diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js index c4ea83f420..3804b5b6ff 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js @@ -1453,6 +1453,12 @@ WebInspector.ResourceSidebarTreeElement.prototype = { { WebInspector.SidebarTreeElement.prototype.onattach.call(this); + var link = document.createElement("a"); + link.href = this.resource.url; + link.className = "invisible"; + while (this._listItemNode.firstChild) + link.appendChild(this._listItemNode.firstChild); + this._listItemNode.appendChild(link); this._listItemNode.addStyleClass("resources-category-" + this.resource.category.name); }, @@ -1460,6 +1466,11 @@ WebInspector.ResourceSidebarTreeElement.prototype = { { WebInspector.panels.resources.showResource(this.resource); }, + + ondblclick: function(treeElement, event) + { + InspectorController.inspectedWindow().open(this.resource.url); + }, get mainTitle() { diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js index 68013c9a16..6fcf42f865 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js @@ -56,6 +56,7 @@ WebInspector.ScriptsPanel = function() this.filesSelectElement.className = "status-bar-item"; this.filesSelectElement.id = "scripts-files"; this.filesSelectElement.addEventListener("change", this._changeVisibleFile.bind(this), false); + this.filesSelectElement.handleKeyEvent = this.handleKeyEvent.bind(this); this.topStatusBar.appendChild(this.filesSelectElement); this.functionsSelectElement = document.createElement("select"); @@ -132,13 +133,11 @@ WebInspector.ScriptsPanel = function() for (var pane in this.sidebarPanes) this.sidebarElement.appendChild(this.sidebarPanes[pane].element); - // FIXME: remove the following line of code when the Breakpoints pane has content. - this.sidebarElement.removeChild(this.sidebarPanes.breakpoints.element); - this.sidebarPanes.callstack.expanded = true; this.sidebarPanes.callstack.addEventListener("call frame selected", this._callFrameSelected, this); this.sidebarPanes.scopechain.expanded = true; + this.sidebarPanes.breakpoints.expanded = true; var panelEnablerHeading = WebInspector.UIString("You need to enable debugging before you can use the Scripts panel."); var panelEnablerDisclaimer = WebInspector.UIString("Enabling debugging will make scripts run slower."); @@ -239,7 +238,7 @@ WebInspector.ScriptsPanel.prototype = { view.visible = false; } if (this._attachDebuggerWhenShown) { - InspectorController.enableDebuggerFromFrontend(false); + InspectorController.enableDebugger(false); delete this._attachDebuggerWhenShown; } }, @@ -298,6 +297,11 @@ WebInspector.ScriptsPanel.prototype = { this._addScriptToFilesMenu(script); }, + scriptOrResourceForID: function(id) + { + return this._sourceIDMap[id]; + }, + addBreakpoint: function(breakpoint) { this.sidebarPanes.breakpoints.addBreakpoint(breakpoint); @@ -359,12 +363,12 @@ WebInspector.ScriptsPanel.prototype = { updateInterface = true; var self = this; - function updatingCallbackWrapper(result) + function updatingCallbackWrapper(result, exception) { - callback(result); + callback(result, exception); if (updateInterface) self.sidebarPanes.scopechain.update(selectedCallFrame); - } + } this.doEvalInCallFrame(selectedCallFrame, code, updatingCallbackWrapper); }, @@ -428,7 +432,7 @@ WebInspector.ScriptsPanel.prototype = { attachDebuggerWhenShown: function() { if (this.element.parentElement) { - InspectorController.enableDebuggerFromFrontend(false); + InspectorController.enableDebugger(false); } else { this._attachDebuggerWhenShown = true; } @@ -862,7 +866,7 @@ WebInspector.ScriptsPanel.prototype = { if (InspectorController.debuggerEnabled()) InspectorController.disableDebugger(true); else - InspectorController.enableDebuggerFromFrontend(!!optionalAlways); + InspectorController.enableDebugger(!!optionalAlways); }, _togglePauseOnExceptions: function() diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/SourceFrame.js b/src/3rdparty/webkit/WebCore/inspector/front-end/SourceFrame.js index 18d9073d07..930eb162bc 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/SourceFrame.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/SourceFrame.js @@ -27,6 +27,7 @@ WebInspector.SourceFrame = function(element, addBreakpointDelegate) { this.messages = []; this.breakpoints = []; + this._shortcuts = {}; this.addBreakpointDelegate = addBreakpointDelegate; @@ -199,8 +200,16 @@ WebInspector.SourceFrame.prototype = { { WebInspector.addMainEventListeners(this.element.contentDocument); this.element.contentDocument.addEventListener("mousedown", this._documentMouseDown.bind(this), true); + this.element.contentDocument.addEventListener("keydown", this._documentKeyDown.bind(this), true); + this.element.contentDocument.addEventListener("keyup", WebInspector.documentKeyUp.bind(WebInspector), true); this.element.contentDocument.addEventListener("webkitAnimationEnd", this._highlightLineEnds.bind(this), false); + // Register 'eval' shortcut. + var isMac = InspectorController.platform().indexOf("mac-") === 0; + var platformSpecificModifier = isMac ? WebInspector.KeyboardShortcut.Modifiers.Meta : WebInspector.KeyboardShortcut.Modifiers.Ctrl; + var shortcut = WebInspector.KeyboardShortcut.makeKey(69 /* 'E' */, platformSpecificModifier | WebInspector.KeyboardShortcut.Modifiers.Shift); + this._shortcuts[shortcut] = this._evalSelectionInCallFrame.bind(this); + var headElement = this.element.contentDocument.getElementsByTagName("head")[0]; if (!headElement) { headElement = this.element.contentDocument.createElement("head"); @@ -286,6 +295,36 @@ WebInspector.SourceFrame.prototype = { this.addBreakpointDelegate(this.lineNumberForSourceRow(sourceRow)); }, + _documentKeyDown: function(event) + { + var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event); + var handler = this._shortcuts[shortcut]; + if (handler) { + handler(event); + event.preventDefault(); + } else { + WebInspector.documentKeyDown(event); + } + }, + + _evalSelectionInCallFrame: function(event) + { + if (!WebInspector.panels.scripts || !WebInspector.panels.scripts.paused) + return; + + var selection = this.element.contentWindow.getSelection(); + if (!selection.rangeCount) + return; + + var expression = selection.getRangeAt(0).toString().trimWhitespace(); + WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, function(result, exception) { + WebInspector.showConsole(); + var commandMessage = new WebInspector.ConsoleCommand(expression); + WebInspector.console.addMessage(commandMessage); + WebInspector.console.addMessage(new WebInspector.ConsoleCommandResult(result, exception, commandMessage)); + }); + }, + _breakpointEnableChanged: function(event) { var breakpoint = event.target; @@ -332,6 +371,8 @@ WebInspector.SourceFrame.prototype = { if (!sourceRow) return; + breakpoint.sourceText = sourceRow.getElementsByClassName('webkit-line-content')[0].textContent; + this._drawBreakpointImagesIfNeeded(); sourceRow._breakpointObject = breakpoint; diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/SourceView.js b/src/3rdparty/webkit/WebCore/inspector/front-end/SourceView.js index 7510c8cad9..97a5bd5d2c 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/SourceView.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/SourceView.js @@ -104,8 +104,11 @@ WebInspector.SourceView.prototype = { { delete this._frameNeedsSetup; this.sourceFrame.removeEventListener("content loaded", this._contentLoaded, this); - - if (this.resource.type === WebInspector.Resource.Type.Script) { + + if (this.resource.type === WebInspector.Resource.Type.Script + || this.resource.mimeType === 'application/json' + || this.resource.mimeType === 'application/javascript' + || /\.js(on)?$/.test(this.resource.lastPathComponent) ) { this.sourceFrame.addEventListener("syntax highlighting complete", this._syntaxHighlightingComplete, this); this.sourceFrame.syntaxHighlightJavascript(); } else diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/StylesSidebarPane.js b/src/3rdparty/webkit/WebCore/inspector/front-end/StylesSidebarPane.js index c30444ba08..1785d7781f 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/StylesSidebarPane.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/StylesSidebarPane.js @@ -1,5 +1,6 @@ /* * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2009 Joseph Pecoraro * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -387,6 +388,11 @@ WebInspector.StylePropertiesSection.prototype = { child = child.traverseNextTreeElement(false, null, true); } } + + if (this._afterUpdate) { + this._afterUpdate(this); + delete this._afterUpdate; + } }, onpopulate: function() @@ -425,6 +431,26 @@ WebInspector.StylePropertiesSection.prototype = { var item = new WebInspector.StylePropertyTreeElement(style, name, isShorthand, inherited, overloaded, disabled); this.propertiesTreeOutline.appendChild(item); } + }, + + findTreeElementWithName: function(name) + { + var treeElement = this.propertiesTreeOutline.children[0]; + while (treeElement) { + if (treeElement.name === name) + return treeElement; + treeElement = treeElement.traverseNextTreeElement(true, null, true); + } + return null; + }, + + addNewBlankProperty: function() + { + var item = new WebInspector.StylePropertyTreeElement(this.styleRule.style, "", false, false, false, false); + this.propertiesTreeOutline.appendChild(item); + item.listItemElement.textContent = ""; + item._newProperty = true; + return item; } } @@ -558,10 +584,12 @@ WebInspector.StylePropertyTreeElement.prototype = { var nameElement = document.createElement("span"); nameElement.className = "name"; nameElement.textContent = this.name; + this.nameElement = nameElement; var valueElement = document.createElement("span"); valueElement.className = "value"; valueElement.innerHTML = htmlValue; + this.valueElement = valueElement; if (priority) { var priorityElement = document.createElement("span"); @@ -843,14 +871,56 @@ WebInspector.StylePropertyTreeElement.prototype = { this.editingEnded(context); }, - editingCommitted: function(element, userInput, previousContent, context) + editingCommitted: function(element, userInput, previousContent, context, moveDirection) { this.editingEnded(context); - if (userInput === previousContent) - return; // nothing changed, so do nothing else + // Determine where to move to before making changes + var newProperty = false; + var moveToPropertyName; + var moveTo = (moveDirection === "forward" ? this.nextSibling : this.previousSibling); + if (moveTo) + moveToPropertyName = moveTo.name; + else if (moveDirection === "forward") + newProperty = true; + + // Make the Changes and trigger the moveToNextCallback after updating + var blankInput = /^\s*$/.test(userInput); + if (userInput !== previousContent || (this._newProperty && blankInput)) { // only if something changed, or adding a new style and it was blank + this.treeOutline.section._afterUpdate = moveToNextCallback.bind(this, this._newProperty, !blankInput); + this.applyStyleText(userInput, true); + } else + moveToNextCallback(this._newProperty, false, this.treeOutline.section, false); + + // The Callback to start editing the next property + function moveToNextCallback(alreadyNew, valueChanged, section) { + if (!moveDirection) + return; + + // User just tabbed through without changes + if (moveTo && moveTo.parent) { + moveTo.startEditing(moveTo.valueElement); + return; + } + + // User has made a change then tabbed, wiping all the original treeElements, + // recalculate the new treeElement for the same property we were going to edit next + if (moveTo && !moveTo.parent) { + var treeElement = section.findTreeElementWithName(moveToPropertyName); + if (treeElement) + treeElement.startEditing(treeElement.valueElement); + return; + } + + // Create a new attribute in this section + if (newProperty) { + if (alreadyNew && !valueChanged) + return; - this.applyStyleText(userInput, true); + var item = section.addNewBlankProperty(); + item.startEditing(); + } + } }, applyStyleText: function(styleText, updateInterface) @@ -876,7 +946,9 @@ WebInspector.StylePropertyTreeElement.prototype = { if (!styleTextLength) { if (updateInterface) { - // The user deleted the everything, so remove the tree element and update. + // The user deleted everything, so remove the tree element and update. + if (!this._newProperty) + delete this.treeOutline.section._afterUpdate; if (this.treeOutline.section && this.treeOutline.section.pane) this.treeOutline.section.pane.update(); this.parent.removeChild(this); @@ -886,7 +958,12 @@ WebInspector.StylePropertyTreeElement.prototype = { if (!tempStyle.length) { // The user typed something, but it didn't parse. Just abort and restore - // the original title for this property. + // the original title for this property. If this was a new attribute and + // we couldn't parse, then just remove it. + if (this._newProperty) { + this.parent.removeChild(this); + return; + } if (updateInterface) this.updateTitle(); return; diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css index 929caa23d4..dabadc25b0 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css @@ -644,6 +644,10 @@ body.console-visible #console { margin-right: -6px; } +.console-group-messages .add-attribute { + display: none; +} + .console-formatted-object, .console-formatted-node { position: relative; display: inline-block; @@ -768,6 +772,11 @@ body.console-visible #console { vertical-align: top; } +.invisible { + color: inherit; + text-decoration: none; +} + .webkit-line-gutter-backdrop { /* Keep this in sync with view-source.css (.webkit-line-gutter-backdrop) */ width: 31px; @@ -1090,6 +1099,11 @@ body.console-visible #console { text-decoration: underline; } +.add-attribute { + margin-left: 1px; + margin-right: 1px; +} + .placard { position: relative; margin-top: 1px; @@ -3102,3 +3116,41 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches { border-left: 1px solid rgb(184, 184, 184); margin-left: -1px; } + +ol.breakpoint-list { + -webkit-padding-start: 2px; + list-style: none; + margin: 0; +} + +.breakpoint-list li { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + margin: 4px 0; +} + +.breakpoint-list .checkbox-elem { + font-size: 10px; + margin: 0 4px; + vertical-align: top; + position: relative; + z-index: 1; +} + +.breakpoint-list .source-text { + font-family: monospace; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + margin: 2px 0 0px 20px; +} + +.breakpoint-list a { + color: rgb(33%, 33%, 33%); + cursor: pointer; +} + +.breakpoint-list a:hover { + color: rgb(15%, 15%, 15%); +} diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html index f211fb7bfc..762074eec6 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html @@ -87,11 +87,11 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <div class="toolbar-item"><input id="search" type="search" incremental results="0"><div id="search-toolbar-label" class="toolbar-label"></div></div> </div> <div id="main"> - <div id="main-panels" tabindex="0"></div> + <div id="main-panels" tabindex="0" spellcheck="false"></div> <div id="main-status-bar" class="status-bar"><div id="anchored-status-bar-items"><button id="dock-status-bar-item" class="status-bar-item toggled"></button><button id="console-status-bar-item" class="status-bar-item"></button><div id="error-warning-count" class="hidden"></div></div></div> </div> <div id="console"> - <div id="console-messages"><div id="console-prompt"><br></div></div> + <div id="console-messages"><div id="console-prompt" spellcheck="false"><br></div></div> <div id="console-status-bar" class="status-bar"><div id="other-console-status-bar-items"><button id="clear-console-status-bar-item" class="status-bar-item"></button></div></div> </div> </body> diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js index 91f2659e89..7e236925d7 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js @@ -117,6 +117,26 @@ var WebInspector = { } } } + + for (var panelName in WebInspector.panels) { + if (WebInspector.panels[panelName] == x) + InspectorController.storeLastActivePanel(panelName); + } + }, + + _createPanels: function() + { + var hiddenPanels = (InspectorController.hiddenPanels() || "").split(','); + if (hiddenPanels.indexOf("elements") === -1) + this.panels.elements = new WebInspector.ElementsPanel(); + if (hiddenPanels.indexOf("resources") === -1) + this.panels.resources = new WebInspector.ResourcesPanel(); + if (hiddenPanels.indexOf("scripts") === -1) + this.panels.scripts = new WebInspector.ScriptsPanel(); + if (hiddenPanels.indexOf("profiles") === -1) + this.panels.profiles = new WebInspector.ProfilesPanel(); + if (hiddenPanels.indexOf("databases") === -1) + this.panels.databases = new WebInspector.DatabasesPanel(); }, get attached() @@ -281,24 +301,16 @@ WebInspector.loaded = function() this.console = new WebInspector.Console(); this.panels = {}; - var hiddenPanels = (InspectorController.hiddenPanels() || "").split(','); - if (hiddenPanels.indexOf("elements") === -1) - this.panels.elements = new WebInspector.ElementsPanel(); - if (hiddenPanels.indexOf("resources") === -1) - this.panels.resources = new WebInspector.ResourcesPanel(); - if (hiddenPanels.indexOf("scripts") === -1) - this.panels.scripts = new WebInspector.ScriptsPanel(); - if (hiddenPanels.indexOf("profiles") === -1) - this.panels.profiles = new WebInspector.ProfilesPanel(); - if (hiddenPanels.indexOf("databases") === -1) - this.panels.databases = new WebInspector.DatabasesPanel(); + this._createPanels(); var toolbarElement = document.getElementById("toolbar"); var previousToolbarItem = toolbarElement.children[0]; + this.panelOrder = []; for (var panelName in this.panels) { var panel = this.panels[panelName]; var panelToolbarItem = panel.toolbarItem; + this.panelOrder.push(panel); panelToolbarItem.addEventListener("click", this._toolbarItemClicked.bind(this)); if (previousToolbarItem) toolbarElement.insertBefore(panelToolbarItem, previousToolbarItem.nextSibling); @@ -307,8 +319,6 @@ WebInspector.loaded = function() previousToolbarItem = panelToolbarItem; } - this.currentPanel = this.panels.elements; - this.resourceCategories = { documents: new WebInspector.ResourceCategory(WebInspector.UIString("Documents"), "documents"), stylesheets: new WebInspector.ResourceCategory(WebInspector.UIString("Stylesheets"), "stylesheets"), @@ -523,6 +533,36 @@ WebInspector.documentKeyDown = function(event) } break; + + case "U+005B": // [ key + if (isMac) + var isRotateLeft = event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey; + else + var isRotateLeft = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey; + + if (isRotateLeft) { + var index = this.panelOrder.indexOf(this.currentPanel); + index = (index === 0) ? this.panelOrder.length - 1 : index - 1; + this.panelOrder[index].toolbarItem.click(); + event.preventDefault(); + } + + break; + + case "U+005D": // ] key + if (isMac) + var isRotateRight = event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey; + else + var isRotateRight = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey; + + if (isRotateRight) { + var index = this.panelOrder.indexOf(this.currentPanel); + index = (index + 1) % this.panelOrder.length; + this.panelOrder[index].toolbarItem.click(); + event.preventDefault(); + } + + break; } } } @@ -588,6 +628,7 @@ WebInspector.animateStyle = function(animations, duration, callback, complete) var start = null; var current = null; var end = null; + var key = null; for (key in animation) { if (key === "element") element = animation[key]; @@ -1278,6 +1319,7 @@ WebInspector.startEditing = function(element, committedCallback, cancelledCallba var oldText = element.textContent; var oldHandleKeyEvent = element.handleKeyEvent; + var moveDirection = ""; element.addStyleClass("editing"); @@ -1315,7 +1357,7 @@ WebInspector.startEditing = function(element, committedCallback, cancelledCallba function editingCommitted() { cleanUpAfterEditing.call(this); - committedCallback(this, this.textContent, oldText, context); + committedCallback(this, this.textContent, oldText, context, moveDirection); } element.handleKeyEvent = function(event) { @@ -1331,7 +1373,8 @@ WebInspector.startEditing = function(element, committedCallback, cancelledCallba editingCancelled.call(element); event.preventDefault(); event.handled = true; - } + } else if (event.keyIdentifier === "U+0009") // Tab key + moveDirection = (event.shiftKey ? "backward" : "forward"); } element.addEventListener("blur", blurEventListener, false); diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js b/src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js index 8fb50e202e..4285785ed1 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js @@ -38,7 +38,7 @@ Object.type = function(obj, win) win = win || window; if (obj instanceof win.Node) - return "node"; + return (obj.nodeType === undefined ? type : "node"); if (obj instanceof win.String) return "string"; if (obj instanceof win.Array) @@ -94,12 +94,12 @@ Object.describe = function(obj, abbreviated) } } -Object.sortedProperties = function(obj) +Object.sortedProperties = function(obj, sortFunc) { var properties = []; for (var prop in obj) properties.push(prop); - properties.sort(); + properties.sort(sortFunc); return properties; } diff --git a/src/3rdparty/webkit/WebCore/loader/Cache.h b/src/3rdparty/webkit/WebCore/loader/Cache.h index 86a6ceb4f2..a0023dad3c 100644 --- a/src/3rdparty/webkit/WebCore/loader/Cache.h +++ b/src/3rdparty/webkit/WebCore/loader/Cache.h @@ -55,7 +55,7 @@ class KURL; // -------|-----+++++++++++++++| // -------|-----+++++++++++++++|+++++ -class Cache : Noncopyable { +class Cache : public Noncopyable { public: friend Cache* cache(); diff --git a/src/3rdparty/webkit/WebCore/loader/CrossOriginPreflightResultCache.h b/src/3rdparty/webkit/WebCore/loader/CrossOriginPreflightResultCache.h index 39c3cd1eb4..f71d1c8949 100644 --- a/src/3rdparty/webkit/WebCore/loader/CrossOriginPreflightResultCache.h +++ b/src/3rdparty/webkit/WebCore/loader/CrossOriginPreflightResultCache.h @@ -32,7 +32,7 @@ namespace WebCore { class HTTPHeaderMap; class ResourceResponse; - class CrossOriginPreflightResultCacheItem : Noncopyable { + class CrossOriginPreflightResultCacheItem : public Noncopyable { public: CrossOriginPreflightResultCacheItem(bool credentials) : m_absoluteExpiryTime(0) @@ -57,7 +57,7 @@ namespace WebCore { HeadersSet m_headers; }; - class CrossOriginPreflightResultCache : Noncopyable { + class CrossOriginPreflightResultCache : public Noncopyable { public: static CrossOriginPreflightResultCache& shared(); diff --git a/src/3rdparty/webkit/WebCore/loader/DocumentThreadableLoader.cpp b/src/3rdparty/webkit/WebCore/loader/DocumentThreadableLoader.cpp index ae6702b4f8..dd5ca7675f 100644 --- a/src/3rdparty/webkit/WebCore/loader/DocumentThreadableLoader.cpp +++ b/src/3rdparty/webkit/WebCore/loader/DocumentThreadableLoader.cpp @@ -164,7 +164,8 @@ void DocumentThreadableLoader::didFinishLoading(SubresourceLoader* loader) void DocumentThreadableLoader::didFail(SubresourceLoader* loader, const ResourceError& error) { ASSERT(m_client); - ASSERT_UNUSED(loader, loader == m_loader); + // m_loader may be null if we arrive here via SubresourceLoader::create in the ctor + ASSERT_UNUSED(loader, loader == m_loader || !m_loader); m_client->didFail(error); } diff --git a/src/3rdparty/webkit/WebCore/loader/EmptyClients.h b/src/3rdparty/webkit/WebCore/loader/EmptyClients.h index f1c4c5dd9b..6d873421c5 100644 --- a/src/3rdparty/webkit/WebCore/loader/EmptyClients.h +++ b/src/3rdparty/webkit/WebCore/loader/EmptyClients.h @@ -125,7 +125,7 @@ public: virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned) { } - virtual void setToolTip(const String&) { } + virtual void setToolTip(const String&, TextDirection) { } virtual void print(Frame*) { } @@ -133,6 +133,10 @@ public: virtual void exceededDatabaseQuota(Frame*, const String&) { } #endif +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + virtual void reachedMaxAppCacheSize(int64_t) { } +#endif + virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { } virtual void formStateDidChange(const Node*) { } @@ -287,8 +291,9 @@ public: virtual void registerForIconNotification(bool) { } #if USE(V8) - virtual void didCreateScriptContext() { } - virtual void didDestroyScriptContext() { } + virtual void didCreateScriptContextForFrame() { } + virtual void didDestroyScriptContextForFrame() { } + virtual void didCreateIsolatedScriptContext() { } #endif #if PLATFORM(MAC) diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp index 1e51583ff6..7fc7936e2f 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp @@ -54,7 +54,6 @@ #include "FrameLoaderClient.h" #include "FrameTree.h" #include "FrameView.h" -#include "HTMLAnchorElement.h" #include "HTMLAppletElement.h" #include "HTMLFormElement.h" #include "HTMLFrameElement.h" @@ -71,6 +70,7 @@ #include "Page.h" #include "PageCache.h" #include "PageGroup.h" +#include "PlaceholderDocument.h" #include "PluginData.h" #include "PluginDocument.h" #include "ProgressTracker.h" @@ -271,9 +271,6 @@ FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client) #ifndef NDEBUG , m_didDispatchDidCommitLoad(false) #endif -#if ENABLE(WML) - , m_forceReloadWmlDeck(false) -#endif { } @@ -728,15 +725,16 @@ bool FrameLoader::executeIfJavaScriptURL(const KURL& url, bool userGesture, bool if (m_frame->page() && !m_frame->page()->javaScriptURLsAreAllowed()) return true; - String script = decodeURLEscapeSequences(url.string().substring(strlen("javascript:"))); + const int javascriptSchemeLength = sizeof("javascript:") - 1; + + String script = decodeURLEscapeSequences(url.string().substring(javascriptSchemeLength)); ScriptValue result = executeScript(script, userGesture); String scriptResult; if (!result.getString(scriptResult)) return true; - SecurityOrigin* currentSecurityOrigin = 0; - currentSecurityOrigin = m_frame->document()->securityOrigin(); + SecurityOrigin* currentSecurityOrigin = m_frame->document()->securityOrigin(); // FIXME: We should always replace the document, but doing so // synchronously can cause crashes: @@ -897,6 +895,8 @@ void FrameLoader::begin(const KURL& url, bool dispatch, SecurityOrigin* origin) // Create a new document before clearing the frame, because it may need to inherit an aliased security context. if (!m_isDisplayingInitialEmptyDocument && m_client->shouldUsePluginDocument(m_responseMIMEType)) document = PluginDocument::create(m_frame); + else if (!m_client->hasHTMLView()) + document = PlaceholderDocument::create(m_frame); else document = DOMImplementation::createDocument(m_responseMIMEType, m_frame, m_frame->inViewSourceMode()); @@ -953,7 +953,7 @@ void FrameLoader::begin(const KURL& url, bool dispatch, SecurityOrigin* origin) document->implicitOpen(); - if (m_frame->view()) + if (m_frame->view() && m_client->hasHTMLView()) m_frame->view()->setContentsSize(IntSize()); } @@ -1780,6 +1780,17 @@ void FrameLoader::addData(const char* bytes, int length) write(bytes, length); } +#if ENABLE(WML) +static inline bool frameContainsWMLContent(Frame* frame) +{ + Document* document = frame ? frame->document() : 0; + if (!document) + return false; + + return document->containsWMLContent() || document->isWMLDocument(); +} +#endif + bool FrameLoader::canCachePageContainingThisFrame() { return m_documentLoader @@ -1808,6 +1819,9 @@ bool FrameLoader::canCachePageContainingThisFrame() && !m_documentLoader->applicationCache() && !m_documentLoader->candidateApplicationCacheGroup() #endif +#if ENABLE(WML) + && !frameContainsWMLContent(m_frame) +#endif && m_client->canCachePage() ; } @@ -2920,10 +2934,12 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage) m_committedFirstRealDocumentLoad = true; - // For non-cached HTML pages, these methods are called in FrameLoader::begin. - if (cachedPage || !m_client->hasHTMLView()) { - dispatchDidCommitLoad(); - + if (!m_client->hasHTMLView()) + receivedFirstData(); + else if (cachedPage) { + // For non-cached HTML pages, these methods are called in receivedFirstData(). + dispatchDidCommitLoad(); + // If we have a title let the WebView know about it. if (!ptitle.isNull()) m_client->dispatchDidReceiveTitle(ptitle); @@ -2958,18 +2974,11 @@ void FrameLoader::clientRedirected(const KURL& url, double seconds, double fireD m_quickRedirectComing = lockBackForwardList && m_documentLoader && !m_isExecutingJavaScriptFormAction; } -#if ENABLE(WML) -void FrameLoader::setForceReloadWmlDeck(bool reload) -{ - m_forceReloadWmlDeck = reload; -} -#endif - bool FrameLoader::shouldReload(const KURL& currentURL, const KURL& destinationURL) { #if ENABLE(WML) - // As for WML deck, sometimes it's supposed to be reloaded even if the same URL with fragment - if (m_forceReloadWmlDeck) + // All WML decks are supposed to be reloaded, even within the same URL fragment + if (frameContainsWMLContent(m_frame)) return true; #endif @@ -4424,7 +4433,8 @@ void FrameLoader::loadItem(HistoryItem* item, FrameLoadType loadType) bool shouldScroll = !formData && !(m_currentHistoryItem && m_currentHistoryItem->formData()) && urlsMatchItem(item); #if ENABLE(WML) - if (m_frame->document()->isWMLDocument()) + // All WML decks should go through the real load mechanism, not the scroll-to-anchor code + if (frameContainsWMLContent(m_frame)) shouldScroll = false; #endif @@ -5089,8 +5099,7 @@ void FrameLoader::didChangeTitle(DocumentLoader* loader) { m_client->didChangeTitle(loader); - // The title doesn't get communicated to the WebView until we are committed. - if (loader->isCommitted()) { + if (loader == m_documentLoader) { // Must update the entries in the back-forward list too. if (m_currentHistoryItem) m_currentHistoryItem->setTitle(loader->title()); diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h index b80a87cdce..58bf2c0484 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. - * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) + * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -111,7 +111,7 @@ namespace WebCore { void* m_argument; }; - class FrameLoader : Noncopyable { + class FrameLoader : public Noncopyable { public: FrameLoader(Frame*, FrameLoaderClient*); ~FrameLoader(); @@ -236,10 +236,6 @@ namespace WebCore { void didFirstVisuallyNonEmptyLayout(); -#if ENABLE(WML) - void setForceReloadWmlDeck(bool); -#endif - void loadedResourceFromMemoryCache(const CachedResource*); void tellClientAboutPastMemoryCacheLoads(); @@ -625,10 +621,6 @@ namespace WebCore { #ifndef NDEBUG bool m_didDispatchDidCommitLoad; #endif - -#if ENABLE(WML) - bool m_forceReloadWmlDeck; -#endif }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h b/src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h index aa36b501bb..1e6899194c 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h @@ -213,8 +213,9 @@ namespace WebCore { virtual void didPerformFirstNavigation() const = 0; // "Navigation" here means a transition from one page to another that ends up in the back/forward list. #if USE(V8) - virtual void didCreateScriptContext() = 0; - virtual void didDestroyScriptContext() = 0; + virtual void didCreateScriptContextForFrame() = 0; + virtual void didDestroyScriptContextForFrame() = 0; + virtual void didCreateIsolatedScriptContext() = 0; #endif virtual void registerForIconNotification(bool listen = true) = 0; diff --git a/src/3rdparty/webkit/WebCore/loader/PlaceholderDocument.cpp b/src/3rdparty/webkit/WebCore/loader/PlaceholderDocument.cpp new file mode 100644 index 0000000000..e071aa870d --- /dev/null +++ b/src/3rdparty/webkit/WebCore/loader/PlaceholderDocument.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "PlaceholderDocument.h" + +#include "CSSStyleSelector.h" +#include "StyleSheetList.h" + +namespace WebCore { + +void PlaceholderDocument::attach() +{ + ASSERT(!attached()); + + if (!styleSelector()) { + RefPtr<StyleSheetList> styleSheetList = StyleSheetList::create(this); + setStyleSelector(new CSSStyleSelector(this, userStyleSheet(), styleSheetList.get(), 0, true, false)); + } + + // Skipping Document::attach(). + ContainerNode::attach(); +} + +} // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/loader/PlaceholderDocument.h b/src/3rdparty/webkit/WebCore/loader/PlaceholderDocument.h new file mode 100644 index 0000000000..c54237041c --- /dev/null +++ b/src/3rdparty/webkit/WebCore/loader/PlaceholderDocument.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef PlaceholderDocument_h +#define PlaceholderDocument_h + +#include "Document.h" + +namespace WebCore { + +class PlaceholderDocument : public Document { +public: + static PassRefPtr<PlaceholderDocument> create(Frame* frame) + { + return new PlaceholderDocument(frame); + } + + virtual void attach(); + +private: + PlaceholderDocument(Frame* frame) : Document(frame, false) { } +}; + +} // namespace WebCore + +#endif // PlaceholderDocument_h diff --git a/src/3rdparty/webkit/WebCore/loader/ProgressTracker.h b/src/3rdparty/webkit/WebCore/loader/ProgressTracker.h index b8d4532b67..744e101752 100644 --- a/src/3rdparty/webkit/WebCore/loader/ProgressTracker.h +++ b/src/3rdparty/webkit/WebCore/loader/ProgressTracker.h @@ -36,7 +36,7 @@ class Frame; class ResourceResponse; struct ProgressItem; -class ProgressTracker : Noncopyable { +class ProgressTracker : public Noncopyable { public: ProgressTracker(); ~ProgressTracker(); diff --git a/src/3rdparty/webkit/WebCore/loader/ThreadableLoader.h b/src/3rdparty/webkit/WebCore/loader/ThreadableLoader.h index 87ae229c9d..1ac12cb346 100644 --- a/src/3rdparty/webkit/WebCore/loader/ThreadableLoader.h +++ b/src/3rdparty/webkit/WebCore/loader/ThreadableLoader.h @@ -65,7 +65,7 @@ namespace WebCore { // Useful for doing loader operations from any thread (not threadsafe, // just able to run on threads other than the main thread). - class ThreadableLoader : Noncopyable { + class ThreadableLoader : public Noncopyable { public: static void loadResourceSynchronously(ScriptExecutionContext*, const ResourceRequest&, ThreadableLoaderClient&, StoredCredentials); static PassRefPtr<ThreadableLoader> create(ScriptExecutionContext*, ThreadableLoaderClient*, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, CrossOriginRedirectPolicy); diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp index 3033718a36..d221bdb195 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp @@ -39,6 +39,7 @@ namespace WebCore { ApplicationCache::ApplicationCache() : m_group(0) , m_manifest(0) + , m_estimatedSizeInStorage(0) , m_storageID(0) { } @@ -86,7 +87,9 @@ void ApplicationCache::addResource(PassRefPtr<ApplicationCacheResource> resource // Add the resource to the storage. cacheStorage().store(resource.get(), this); } - + + m_estimatedSizeInStorage += resource->estimatedSizeInStorage(); + m_resources.set(url, resource); } @@ -100,12 +103,15 @@ unsigned ApplicationCache::removeResource(const String& url) unsigned type = it->second->type(); m_resources.remove(it); - + + m_estimatedSizeInStorage -= it->second->estimatedSizeInStorage(); + return type; } ApplicationCacheResource* ApplicationCache::resourceForURL(const String& url) { + ASSERT(!KURL(url).hasRef()); return m_resources.get(url).get(); } @@ -125,8 +131,12 @@ ApplicationCacheResource* ApplicationCache::resourceForRequest(const ResourceReq // We only care about HTTP/HTTPS GET requests. if (!requestIsHTTPOrHTTPSGet(request)) return false; - - return resourceForURL(request.url()); + + KURL url(request.url()); + if (url.hasRef()) + url.removeRef(); + + return resourceForURL(url); } void ApplicationCache::setOnlineWhitelist(const Vector<KURL>& onlineWhitelist) diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h index 9609f8d248..b1753be146 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h @@ -87,6 +87,8 @@ public: static bool requestIsHTTPOrHTTPSGet(const ResourceRequest&); + int64_t estimatedSizeInStorage() const { return m_estimatedSizeInStorage; } + private: ApplicationCache(); @@ -97,6 +99,11 @@ private: Vector<KURL> m_onlineWhitelist; FallbackURLVector m_fallbackURLs; + // The total size of the resources belonging to this Application Cache instance. + // This is an estimation of the size this Application Cache occupies in the + // database file. + int64_t m_estimatedSizeInStorage; + unsigned m_storageID; }; diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp index 642ec6150f..dc7335353a 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp @@ -31,6 +31,7 @@ #include "ApplicationCache.h" #include "ApplicationCacheResource.h" #include "ApplicationCacheStorage.h" +#include "ChromeClient.h" #include "DocumentLoader.h" #include "DOMApplicationCache.h" #include "DOMWindow.h" @@ -53,6 +54,7 @@ ApplicationCacheGroup::ApplicationCacheGroup(const KURL& manifestURL, bool isCop , m_isObsolete(false) , m_completionType(None) , m_isCopy(isCopy) + , m_calledReachedMaxAppCacheSize(false) { } @@ -83,7 +85,11 @@ ApplicationCache* ApplicationCacheGroup::cacheForMainRequest(const ResourceReque if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request)) return 0; - if (ApplicationCacheGroup* group = cacheStorage().cacheGroupForURL(request.url())) { + KURL url(request.url()); + if (url.hasRef()) + url.removeRef(); + + if (ApplicationCacheGroup* group = cacheStorage().cacheGroupForURL(url)) { ASSERT(group->newestCache()); ASSERT(!group->isObsolete()); @@ -98,7 +104,11 @@ ApplicationCache* ApplicationCacheGroup::fallbackCacheForMainRequest(const Resou if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request)) return 0; - if (ApplicationCacheGroup* group = cacheStorage().fallbackCacheGroupForURL(request.url())) { + KURL url(request.url()); + if (url.hasRef()) + url.removeRef(); + + if (ApplicationCacheGroup* group = cacheStorage().fallbackCacheGroupForURL(url)) { ASSERT(group->newestCache()); ASSERT(!group->isObsolete()); @@ -108,7 +118,7 @@ ApplicationCache* ApplicationCacheGroup::fallbackCacheForMainRequest(const Resou return 0; } -void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& manifestURL) +void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& passedManifestURL) { ASSERT(frame && frame->page()); @@ -118,11 +128,15 @@ void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& manifestURL) DocumentLoader* documentLoader = frame->loader()->documentLoader(); ASSERT(!documentLoader->applicationCache()); - if (manifestURL.isNull()) { + if (passedManifestURL.isNull()) { selectCacheWithoutManifestURL(frame); return; } - + + KURL manifestURL(passedManifestURL); + if (manifestURL.hasRef()) + manifestURL.removeRef(); + ApplicationCache* mainResourceCache = documentLoader->mainResourceApplicationCache(); if (mainResourceCache) { @@ -131,7 +145,10 @@ void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& manifestURL) mainResourceCache->group()->update(frame, ApplicationCacheUpdateWithBrowsingContext); } else { // The main resource was loaded from cache, so the cache must have an entry for it. Mark it as foreign. - ApplicationCacheResource* resource = mainResourceCache->resourceForURL(documentLoader->url()); + KURL documentURL(documentLoader->url()); + if (documentURL.hasRef()) + documentURL.removeRef(); + ApplicationCacheResource* resource = mainResourceCache->resourceForURL(documentURL); bool inStorage = resource->storageID(); resource->addType(ApplicationCacheResource::Foreign); if (inStorage) @@ -193,7 +210,9 @@ void ApplicationCacheGroup::finishedLoadingMainResource(DocumentLoader* loader) { ASSERT(m_pendingMasterResourceLoaders.contains(loader)); ASSERT(m_completionType == None || m_pendingEntries.isEmpty()); - const KURL& url = loader->url(); + KURL url = loader->url(); + if (url.hasRef()) + url.removeRef(); switch (m_completionType) { case None: @@ -434,7 +453,9 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res ASSERT(handle == m_currentHandle); - const KURL& url = handle->request().url(); + KURL url(handle->request().url()); + if (url.hasRef()) + url.removeRef(); ASSERT(!m_currentResource); ASSERT(m_pendingEntries.contains(url)); @@ -446,12 +467,12 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res ASSERT(!(type & ApplicationCacheResource::Master)); if (m_newestCache && response.httpStatusCode() == 304) { // Not modified. - ApplicationCacheResource* newestCachedResource = m_newestCache->resourceForURL(handle->request().url()); + ApplicationCacheResource* newestCachedResource = m_newestCache->resourceForURL(url); if (newestCachedResource) { m_cacheBeingUpdated->addResource(ApplicationCacheResource::create(url, newestCachedResource->response(), type, newestCachedResource->data())); + m_pendingEntries.remove(m_currentHandle->request().url()); m_currentHandle->cancel(); m_currentHandle = 0; - m_pendingEntries.remove(handle->request().url()); // Load the next resource, if any. startLoadingEntry(); return; @@ -467,7 +488,7 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res // Skip this resource. It is dropped from the cache. m_currentHandle->cancel(); m_currentHandle = 0; - m_pendingEntries.remove(handle->request().url()); + m_pendingEntries.remove(url); // Load the next resource, if any. startLoadingEntry(); } else { @@ -477,9 +498,9 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res ApplicationCacheResource* newestCachedResource = m_newestCache->resourceForURL(handle->request().url()); ASSERT(newestCachedResource); m_cacheBeingUpdated->addResource(ApplicationCacheResource::create(url, newestCachedResource->response(), type, newestCachedResource->data())); + m_pendingEntries.remove(m_currentHandle->request().url()); m_currentHandle->cancel(); m_currentHandle = 0; - m_pendingEntries.remove(handle->request().url()); // Load the next resource, if any. startLoadingEntry(); } @@ -531,7 +552,9 @@ void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError& } unsigned type = m_currentResource ? m_currentResource->type() : m_pendingEntries.get(handle->request().url()); - const KURL& url = handle->request().url(); + KURL url(handle->request().url()); + if (url.hasRef()) + url.removeRef(); ASSERT(!m_currentResource || !m_pendingEntries.contains(url)); m_currentResource = 0; @@ -652,6 +675,15 @@ void ApplicationCacheGroup::didFinishLoadingManifest() startLoadingEntry(); } +void ApplicationCacheGroup::didReachMaxAppCacheSize() +{ + ASSERT(m_frame); + ASSERT(m_cacheBeingUpdated); + m_frame->page()->chrome()->client()->reachedMaxAppCacheSize(cacheStorage().spaceNeeded(m_cacheBeingUpdated->estimatedSizeInStorage())); + m_calledReachedMaxAppCacheSize = true; + checkIfLoadIsComplete(); +} + void ApplicationCacheGroup::cacheUpdateFailed() { stopLoading(); @@ -730,7 +762,15 @@ void ApplicationCacheGroup::checkIfLoadIsComplete() // FIXME: Fetch the resource from manifest URL again, and check whether it is identical to the one used for update (in case the application was upgraded server-side in the meanwhile). (<rdar://problem/6467625>) ASSERT(m_cacheBeingUpdated); - m_cacheBeingUpdated->setManifestResource(m_manifestResource.release()); + if (m_manifestResource) + m_cacheBeingUpdated->setManifestResource(m_manifestResource.release()); + else { + // We can get here as a result of retrying the Complete step, following + // a failure of the cache storage to save the newest cache due to hitting + // the maximum size. In such a case, m_manifestResource may be 0, as + // the manifest was already set on the newest cache object. + ASSERT(cacheStorage().isMaximumSizeReached() && m_calledReachedMaxAppCacheSize); + } RefPtr<ApplicationCache> oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? 0 : m_newestCache; @@ -742,28 +782,44 @@ void ApplicationCacheGroup::checkIfLoadIsComplete() // Fire the success events. postListenerTask(isUpgradeAttempt ? &DOMApplicationCache::callUpdateReadyListener : &DOMApplicationCache::callCachedListener, m_associatedDocumentLoaders); } else { - // Run the "cache failure steps" - // Fire the error events to all pending master entries, as well any other cache hosts - // currently associated with a cache in this group. - postListenerTask(&DOMApplicationCache::callErrorListener, m_associatedDocumentLoaders); - // Disassociate the pending master entries from the failed new cache. Note that - // all other loaders in the m_associatedDocumentLoaders are still associated with - // some other cache in this group. They are not associated with the failed new cache. - - // Need to copy loaders, because the cache group may be destroyed at the end of iteration. - Vector<DocumentLoader*> loaders; - copyToVector(m_pendingMasterResourceLoaders, loaders); - size_t count = loaders.size(); - for (size_t i = 0; i != count; ++i) - disassociateDocumentLoader(loaders[i]); // This can delete this group. - - // Reinstate the oldNewestCache, if there was one. - if (oldNewestCache) { - // This will discard the failed new cache. - setNewestCache(oldNewestCache.release()); - } else { - // We must have been deleted by the last call to disassociateDocumentLoader(). + if (cacheStorage().isMaximumSizeReached() && !m_calledReachedMaxAppCacheSize) { + // We ran out of space. All the changes in the cache storage have + // been rolled back. We roll back to the previous state in here, + // as well, call the chrome client asynchronously and retry to + // save the new cache. + + // Save a reference to the new cache. + m_cacheBeingUpdated = m_newestCache.release(); + if (oldNewestCache) { + // Reinstate the oldNewestCache. + setNewestCache(oldNewestCache.release()); + } + scheduleReachedMaxAppCacheSizeCallback(); return; + } else { + // Run the "cache failure steps" + // Fire the error events to all pending master entries, as well any other cache hosts + // currently associated with a cache in this group. + postListenerTask(&DOMApplicationCache::callErrorListener, m_associatedDocumentLoaders); + // Disassociate the pending master entries from the failed new cache. Note that + // all other loaders in the m_associatedDocumentLoaders are still associated with + // some other cache in this group. They are not associated with the failed new cache. + + // Need to copy loaders, because the cache group may be destroyed at the end of iteration. + Vector<DocumentLoader*> loaders; + copyToVector(m_pendingMasterResourceLoaders, loaders); + size_t count = loaders.size(); + for (size_t i = 0; i != count; ++i) + disassociateDocumentLoader(loaders[i]); // This can delete this group. + + // Reinstate the oldNewestCache, if there was one. + if (oldNewestCache) { + // This will discard the failed new cache. + setNewestCache(oldNewestCache.release()); + } else { + // We must have been deleted by the last call to disassociateDocumentLoader(). + return; + } } } break; @@ -775,6 +831,7 @@ void ApplicationCacheGroup::checkIfLoadIsComplete() m_completionType = None; m_updateStatus = Idle; m_frame = 0; + m_calledReachedMaxAppCacheSize = false; } void ApplicationCacheGroup::startLoadingEntry() @@ -820,6 +877,7 @@ void ApplicationCacheGroup::deliverDelayedMainResources() void ApplicationCacheGroup::addEntry(const String& url, unsigned type) { ASSERT(m_cacheBeingUpdated); + ASSERT(!KURL(url).hasRef()); // Don't add the URL if we already have an master resource in the cache // (i.e., the main resource finished loading before the manifest). @@ -857,7 +915,34 @@ void ApplicationCacheGroup::associateDocumentLoaderWithCache(DocumentLoader* loa ASSERT(!m_associatedDocumentLoaders.contains(loader)); m_associatedDocumentLoaders.add(loader); } - + +class ChromeClientCallbackTimer: public TimerBase { +public: + ChromeClientCallbackTimer(ApplicationCacheGroup* cacheGroup) + : m_cacheGroup(cacheGroup) + { + } + +private: + virtual void fired() + { + m_cacheGroup->didReachMaxAppCacheSize(); + delete this; + } + // Note that there is no need to use a RefPtr here. The ApplicationCacheGroup instance is guaranteed + // to be alive when the timer fires since invoking the ChromeClient callback is part of its normal + // update machinery and nothing can yet cause it to get deleted. + ApplicationCacheGroup* m_cacheGroup; +}; + +void ApplicationCacheGroup::scheduleReachedMaxAppCacheSizeCallback() +{ + ASSERT(isMainThread()); + ChromeClientCallbackTimer* timer = new ChromeClientCallbackTimer(this); + timer->startOneShot(0); + // The timer will delete itself once it fires. +} + class CallCacheListenerTask : public ScriptExecutionContext::Task { typedef void (DOMApplicationCache::*ListenerFunction)(); public: @@ -910,7 +995,7 @@ void ApplicationCacheGroup::clearStorageID() for (HashSet<ApplicationCache*>::const_iterator it = m_caches.begin(); it != end; ++it) (*it)->clearStorageID(); } - + } diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.h b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.h index 063fb3b781..375bd178b4 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.h +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.h @@ -52,7 +52,7 @@ enum ApplicationCacheUpdateOption { ApplicationCacheUpdateWithoutBrowsingContext }; -class ApplicationCacheGroup : Noncopyable, ResourceHandleClient { +class ApplicationCacheGroup : public Noncopyable, ResourceHandleClient { public: ApplicationCacheGroup(const KURL& manifestURL, bool isCopy = false); ~ApplicationCacheGroup(); @@ -95,6 +95,7 @@ private: static void postListenerTask(ListenerFunction, const HashSet<DocumentLoader*>&); static void postListenerTask(ListenerFunction, const Vector<RefPtr<DocumentLoader> >& loaders); static void postListenerTask(ListenerFunction, DocumentLoader*); + void scheduleReachedMaxAppCacheSizeCallback(); PassRefPtr<ResourceHandle> createResourceHandle(const KURL&, ApplicationCacheResource* newestCachedResource); @@ -106,6 +107,7 @@ private: void didReceiveManifestResponse(const ResourceResponse&); void didReceiveManifestData(const char*, int); void didFinishLoadingManifest(); + void didReachMaxAppCacheSize(); void startLoadingEntry(); void deliverDelayedMainResources(); @@ -163,12 +165,19 @@ private: // Whether this cache group is a copy that's only used for transferring the cache to another file. bool m_isCopy; + + // This flag is set immediately after the ChromeClient::reachedMaxAppCacheSize() callback is invoked as a result of the storage layer failing to save a cache + // due to reaching the maximum size of the application cache database file. This flag is used by ApplicationCacheGroup::checkIfLoadIsComplete() to decide + // the course of action in case of this failure (i.e. call the ChromeClient callback or run the failure steps). + bool m_calledReachedMaxAppCacheSize; RefPtr<ResourceHandle> m_currentHandle; RefPtr<ApplicationCacheResource> m_currentResource; RefPtr<ApplicationCacheResource> m_manifestResource; RefPtr<ResourceHandle> m_manifestHandle; + + friend class ChromeClientCallbackTimer; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp index 4beb76a938..03c5c83594 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp @@ -35,6 +35,7 @@ ApplicationCacheResource::ApplicationCacheResource(const KURL& url, const Resour : SubstituteResource(url, response, data) , m_type(type) , m_storageID(0) + , m_estimatedSizeInStorage(0) { } @@ -44,6 +45,28 @@ void ApplicationCacheResource::addType(unsigned type) m_type |= type; } +int64_t ApplicationCacheResource::estimatedSizeInStorage() +{ + if (m_estimatedSizeInStorage) + return m_estimatedSizeInStorage; + + if (data()) + m_estimatedSizeInStorage = data()->size(); + + HTTPHeaderMap::const_iterator end = response().httpHeaderFields().end(); + for (HTTPHeaderMap::const_iterator it = response().httpHeaderFields().begin(); it != end; ++it) + m_estimatedSizeInStorage += (it->first.length() + it->second.length() + 2) * sizeof(UChar); + + m_estimatedSizeInStorage += url().string().length() * sizeof(UChar); + m_estimatedSizeInStorage += sizeof(int); // response().m_httpStatusCode + m_estimatedSizeInStorage += response().url().string().length() * sizeof(UChar); + m_estimatedSizeInStorage += sizeof(unsigned); // dataId + m_estimatedSizeInStorage += response().mimeType().length() * sizeof(UChar); + m_estimatedSizeInStorage += response().textEncodingName().length() * sizeof(UChar); + + return m_estimatedSizeInStorage; +} + #ifndef NDEBUG void ApplicationCacheResource::dumpType(unsigned type) { diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h index 0a8d6c22ff..cffc51bf30 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h @@ -44,6 +44,7 @@ public: static PassRefPtr<ApplicationCacheResource> create(const KURL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> buffer = SharedBuffer::create()) { + ASSERT(!url.hasRef()); return adoptRef(new ApplicationCacheResource(url, response, type, buffer)); } @@ -53,6 +54,7 @@ public: void setStorageID(unsigned storageID) { m_storageID = storageID; } unsigned storageID() const { return m_storageID; } void clearStorageID() { m_storageID = 0; } + int64_t estimatedSizeInStorage(); #ifndef NDEBUG static void dumpType(unsigned type); @@ -63,6 +65,7 @@ private: unsigned m_type; unsigned m_storageID; + int64_t m_estimatedSizeInStorage; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp index 7e611cd6e5..18a0ed4d93 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp @@ -43,16 +43,17 @@ using namespace std; namespace WebCore { -class ResourceStorageIDJournal { +template <class T> +class StorageIDJournal { public: - ~ResourceStorageIDJournal() + ~StorageIDJournal() { size_t size = m_records.size(); for (size_t i = 0; i < size; ++i) m_records[i].restore(); } - void add(ApplicationCacheResource* resource, unsigned storageID) + void add(T* resource, unsigned storageID) { m_records.append(Record(resource, storageID)); } @@ -66,7 +67,7 @@ private: class Record { public: Record() : m_resource(0), m_storageID(0) { } - Record(ApplicationCacheResource* resource, unsigned storageID) : m_resource(resource), m_storageID(storageID) { } + Record(T* resource, unsigned storageID) : m_resource(resource), m_storageID(storageID) { } void restore() { @@ -74,7 +75,7 @@ private: } private: - ApplicationCacheResource* m_resource; + T* m_resource; unsigned m_storageID; }; @@ -126,11 +127,12 @@ ApplicationCacheGroup* ApplicationCacheStorage::loadCacheGroup(const KURL& manif ApplicationCacheGroup* ApplicationCacheStorage::findOrCreateCacheGroup(const KURL& manifestURL) { + ASSERT(!manifestURL.hasRef()); + std::pair<CacheGroupMap::iterator, bool> result = m_cachesInMemory.add(manifestURL, 0); if (!result.second) { ASSERT(result.first->second); - return result.first->second; } @@ -175,6 +177,8 @@ void ApplicationCacheStorage::loadManifestHostHashes() ApplicationCacheGroup* ApplicationCacheStorage::cacheGroupForURL(const KURL& url) { + ASSERT(!url.hasRef()); + loadManifestHostHashes(); // Hash the host name and see if there's a manifest with the same host. @@ -223,6 +227,8 @@ ApplicationCacheGroup* ApplicationCacheStorage::cacheGroupForURL(const KURL& url // a matching URL. unsigned newestCacheID = static_cast<unsigned>(statement.getColumnInt64(2)); RefPtr<ApplicationCache> cache = loadCache(newestCacheID); + if (!cache) + continue; ApplicationCacheResource* resource = cache->resourceForURL(url); if (!resource) @@ -248,6 +254,8 @@ ApplicationCacheGroup* ApplicationCacheStorage::cacheGroupForURL(const KURL& url ApplicationCacheGroup* ApplicationCacheStorage::fallbackCacheGroupForURL(const KURL& url) { + ASSERT(!url.hasRef()); + // Check if an appropriate cache already exists in memory. CacheGroupMap::const_iterator end = m_cachesInMemory.end(); for (CacheGroupMap::const_iterator it = m_cachesInMemory.begin(); it != end; ++it) { @@ -353,6 +361,58 @@ const String& ApplicationCacheStorage::cacheDirectory() const return m_cacheDirectory; } +void ApplicationCacheStorage::setMaximumSize(int64_t size) +{ + m_maximumSize = size; +} + +int64_t ApplicationCacheStorage::maximumSize() const +{ + return m_maximumSize; +} + +bool ApplicationCacheStorage::isMaximumSizeReached() const +{ + return m_isMaximumSizeReached; +} + +int64_t ApplicationCacheStorage::spaceNeeded(int64_t cacheToSave) +{ + int64_t spaceNeeded = 0; + long long fileSize = 0; + if (!getFileSize(m_cacheFile, fileSize)) + return 0; + + int64_t currentSize = fileSize; + + // Determine the amount of free space we have available. + int64_t totalAvailableSize = 0; + if (m_maximumSize < currentSize) { + // The max size is smaller than the actual size of the app cache file. + // This can happen if the client previously imposed a larger max size + // value and the app cache file has already grown beyond the current + // max size value. + // The amount of free space is just the amount of free space inside + // the database file. Note that this is always 0 if SQLite is compiled + // with AUTO_VACUUM = 1. + totalAvailableSize = m_database.freeSpaceSize(); + } else { + // The max size is the same or larger than the current size. + // The amount of free space available is the amount of free space + // inside the database file plus the amount we can grow until we hit + // the max size. + totalAvailableSize = (m_maximumSize - currentSize) + m_database.freeSpaceSize(); + } + + // The space needed to be freed in order to accomodate the failed cache is + // the size of the failed cache minus any already available free space. + spaceNeeded = cacheToSave - totalAvailableSize; + // The space needed value must be positive (or else the total already + // available free space would be larger than the size of the failed cache and + // saving of the cache should have never failed). + ASSERT(spaceNeeded); + return spaceNeeded; +} bool ApplicationCacheStorage::executeSQLCommand(const String& sql) { @@ -366,7 +426,7 @@ bool ApplicationCacheStorage::executeSQLCommand(const String& sql) return result; } -static const int schemaVersion = 3; +static const int schemaVersion = 4; void ApplicationCacheStorage::verifySchemaVersion() { @@ -400,13 +460,13 @@ void ApplicationCacheStorage::openDatabase(bool createIfDoesNotExist) // The cache directory should never be null, but if it for some weird reason is we bail out. if (m_cacheDirectory.isNull()) return; - - String applicationCachePath = pathByAppendingComponent(m_cacheDirectory, "ApplicationCache.db"); - if (!createIfDoesNotExist && !fileExists(applicationCachePath)) + + m_cacheFile = pathByAppendingComponent(m_cacheDirectory, "ApplicationCache.db"); + if (!createIfDoesNotExist && !fileExists(m_cacheFile)) return; makeAllDirectories(m_cacheDirectory); - m_database.open(applicationCachePath); + m_database.open(m_cacheFile); if (!m_database.isOpen()) return; @@ -416,7 +476,7 @@ void ApplicationCacheStorage::openDatabase(bool createIfDoesNotExist) // Create tables executeSQLCommand("CREATE TABLE IF NOT EXISTS CacheGroups (id INTEGER PRIMARY KEY AUTOINCREMENT, " "manifestHostHash INTEGER NOT NULL ON CONFLICT FAIL, manifestURL TEXT UNIQUE ON CONFLICT FAIL, newestCache INTEGER)"); - executeSQLCommand("CREATE TABLE IF NOT EXISTS Caches (id INTEGER PRIMARY KEY AUTOINCREMENT, cacheGroup INTEGER)"); + executeSQLCommand("CREATE TABLE IF NOT EXISTS Caches (id INTEGER PRIMARY KEY AUTOINCREMENT, cacheGroup INTEGER, size INTEGER)"); executeSQLCommand("CREATE TABLE IF NOT EXISTS CacheWhitelistURLs (url TEXT NOT NULL ON CONFLICT FAIL, cache INTEGER NOT NULL ON CONFLICT FAIL)"); executeSQLCommand("CREATE TABLE IF NOT EXISTS FallbackURLs (namespace TEXT NOT NULL ON CONFLICT FAIL, fallbackURL TEXT NOT NULL ON CONFLICT FAIL, " "cache INTEGER NOT NULL ON CONFLICT FAIL)"); @@ -456,9 +516,10 @@ bool ApplicationCacheStorage::executeStatement(SQLiteStatement& statement) return result; } -bool ApplicationCacheStorage::store(ApplicationCacheGroup* group) +bool ApplicationCacheStorage::store(ApplicationCacheGroup* group, GroupStorageIDJournal* journal) { ASSERT(group->storageID() == 0); + ASSERT(journal); SQLiteStatement statement(m_database, "INSERT INTO CacheGroups (manifestHostHash, manifestURL) VALUES (?, ?)"); if (statement.prepare() != SQLResultOk) @@ -471,6 +532,7 @@ bool ApplicationCacheStorage::store(ApplicationCacheGroup* group) return false; group->setStorageID(static_cast<unsigned>(m_database.lastInsertRowID())); + journal->add(group, 0); return true; } @@ -480,11 +542,12 @@ bool ApplicationCacheStorage::store(ApplicationCache* cache, ResourceStorageIDJo ASSERT(cache->group()->storageID() != 0); ASSERT(storageIDJournal); - SQLiteStatement statement(m_database, "INSERT INTO Caches (cacheGroup) VALUES (?)"); + SQLiteStatement statement(m_database, "INSERT INTO Caches (cacheGroup, size) VALUES (?, ?)"); if (statement.prepare() != SQLResultOk) return false; statement.bindInt64(1, cache->group()->storageID()); + statement.bindInt64(2, cache->estimatedSizeInStorage()); if (!executeStatement(statement)) return false; @@ -581,6 +644,9 @@ bool ApplicationCacheStorage::store(ApplicationCacheResource* resource, unsigned if (resourceStatement.prepare() != SQLResultOk) return false; + // The same ApplicationCacheResource are used in ApplicationCacheResource::size() + // to calculate the approximate size of an ApplicationCacheResource object. If + // you change the code below, please also change ApplicationCacheResource::size(). resourceStatement.bindText(1, resource->url()); resourceStatement.bindInt64(2, resource->response().httpStatusCode()); resourceStatement.bindText(3, resource->response().url()); @@ -626,33 +692,56 @@ bool ApplicationCacheStorage::storeUpdatedType(ApplicationCacheResource* resourc return executeStatement(entryStatement); } -void ApplicationCacheStorage::store(ApplicationCacheResource* resource, ApplicationCache* cache) +bool ApplicationCacheStorage::store(ApplicationCacheResource* resource, ApplicationCache* cache) { ASSERT(cache->storageID()); openDatabase(true); + m_isMaximumSizeReached = false; + m_database.setMaximumSize(m_maximumSize); + SQLiteTransaction storeResourceTransaction(m_database); storeResourceTransaction.begin(); - if (!store(resource, cache->storageID())) - return; + if (!store(resource, cache->storageID())) { + checkForMaxSizeReached(); + return false; + } + + // A resource was added to the cache. Update the total data size for the cache. + SQLiteStatement sizeUpdateStatement(m_database, "UPDATE Caches SET size=size+? WHERE id=?"); + if (sizeUpdateStatement.prepare() != SQLResultOk) + return false; + + sizeUpdateStatement.bindInt64(1, resource->estimatedSizeInStorage()); + sizeUpdateStatement.bindInt64(2, cache->storageID()); + + if (!executeStatement(sizeUpdateStatement)) + return false; storeResourceTransaction.commit(); + return true; } bool ApplicationCacheStorage::storeNewestCache(ApplicationCacheGroup* group) { openDatabase(true); - + + m_isMaximumSizeReached = false; + m_database.setMaximumSize(m_maximumSize); + SQLiteTransaction storeCacheTransaction(m_database); storeCacheTransaction.begin(); - + + GroupStorageIDJournal groupStorageIDJournal; if (!group->storageID()) { // Store the group - if (!store(group)) + if (!store(group, &groupStorageIDJournal)) { + checkForMaxSizeReached(); return false; + } } ASSERT(group->newestCache()); @@ -662,11 +751,13 @@ bool ApplicationCacheStorage::storeNewestCache(ApplicationCacheGroup* group) // Log the storageID changes to the in-memory resource objects. The journal // object will roll them back automatically in case a database operation // fails and this method returns early. - ResourceStorageIDJournal storageIDJournal; + ResourceStorageIDJournal resourceStorageIDJournal; // Store the newest cache - if (!store(group->newestCache(), &storageIDJournal)) + if (!store(group->newestCache(), &resourceStorageIDJournal)) { + checkForMaxSizeReached(); return false; + } // Update the newest cache in the group. @@ -680,7 +771,8 @@ bool ApplicationCacheStorage::storeNewestCache(ApplicationCacheGroup* group) if (!executeStatement(statement)) return false; - storageIDJournal.commit(); + groupStorageIDJournal.commit(); + resourceStorageIDJournal.commit(); storeCacheTransaction.commit(); return true; } @@ -876,7 +968,116 @@ bool ApplicationCacheStorage::storeCopyOfCache(const String& cacheDirectory, App return copyStorage.storeNewestCache(groupCopy.get()); } - + +bool ApplicationCacheStorage::manifestURLs(Vector<KURL>* urls) +{ + ASSERT(urls); + openDatabase(false); + if (!m_database.isOpen()) + return false; + + SQLiteStatement selectURLs(m_database, "SELECT manifestURL FROM CacheGroups"); + + if (selectURLs.prepare() != SQLResultOk) + return false; + + while (selectURLs.step() == SQLResultRow) + urls->append(selectURLs.getColumnText(0)); + + return true; +} + +bool ApplicationCacheStorage::cacheGroupSize(const String& manifestURL, int64_t* size) +{ + ASSERT(size); + openDatabase(false); + if (!m_database.isOpen()) + return false; + + SQLiteStatement statement(m_database, "SELECT sum(Caches.size) FROM Caches INNER JOIN CacheGroups ON Caches.cacheGroup=CacheGroups.id WHERE CacheGroups.manifestURL=?"); + if (statement.prepare() != SQLResultOk) + return false; + + statement.bindText(1, manifestURL); + + int result = statement.step(); + if (result == SQLResultDone) + return false; + + if (result != SQLResultRow) { + LOG_ERROR("Could not get the size of the cache group, error \"%s\"", m_database.lastErrorMsg()); + return false; + } + + *size = statement.getColumnInt64(0); + return true; +} + +bool ApplicationCacheStorage::deleteCacheGroup(const String& manifestURL) +{ + SQLiteTransaction deleteTransaction(m_database); + // Check to see if the group is in memory. + ApplicationCacheGroup* group = m_cachesInMemory.get(manifestURL); + if (group) + cacheGroupMadeObsolete(group); + else { + // The cache group is not in memory, so remove it from the disk. + openDatabase(false); + if (!m_database.isOpen()) + return false; + + SQLiteStatement idStatement(m_database, "SELECT id FROM CacheGroups WHERE manifestURL=?"); + if (idStatement.prepare() != SQLResultOk) + return false; + + idStatement.bindText(1, manifestURL); + + int result = idStatement.step(); + if (result == SQLResultDone) + return false; + + if (result != SQLResultRow) { + LOG_ERROR("Could not load cache group id, error \"%s\"", m_database.lastErrorMsg()); + return false; + } + + int64_t groupId = idStatement.getColumnInt64(0); + + SQLiteStatement cacheStatement(m_database, "DELETE FROM Caches WHERE cacheGroup=?"); + if (cacheStatement.prepare() != SQLResultOk) + return false; + + SQLiteStatement groupStatement(m_database, "DELETE FROM CacheGroups WHERE id=?"); + if (groupStatement.prepare() != SQLResultOk) + return false; + + cacheStatement.bindInt64(1, groupId); + executeStatement(cacheStatement); + groupStatement.bindInt64(1, groupId); + executeStatement(groupStatement); + } + + deleteTransaction.commit(); + return true; +} + +void ApplicationCacheStorage::vacuumDatabaseFile() +{ + m_database.runVacuumCommand(); +} + +void ApplicationCacheStorage::checkForMaxSizeReached() +{ + if (m_database.lastError() == SQLResultFull) + m_isMaximumSizeReached = true; +} + +ApplicationCacheStorage::ApplicationCacheStorage() + : m_maximumSize(INT_MAX) + , m_isMaximumSizeReached(false) +{ +} + ApplicationCacheStorage& cacheStorage() { DEFINE_STATIC_LOCAL(ApplicationCacheStorage, storage, ()); diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.h b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.h index b13b5966a9..c6d687ef73 100644 --- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.h +++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.h @@ -40,13 +40,19 @@ class ApplicationCache; class ApplicationCacheGroup; class ApplicationCacheResource; class KURL; -class ResourceStorageIDJournal; - +template <class T> +class StorageIDJournal; + class ApplicationCacheStorage { public: void setCacheDirectory(const String&); const String& cacheDirectory() const; + void setMaximumSize(int64_t size); + int64_t maximumSize() const; + bool isMaximumSizeReached() const; + int64_t spaceNeeded(int64_t cacheToSave); + ApplicationCacheGroup* cacheGroupForURL(const KURL&); // Cache to load a main resource from. ApplicationCacheGroup* fallbackCacheGroupForURL(const KURL&); // Cache that has a fallback entry to load a main resource from if normal loading fails. @@ -55,7 +61,7 @@ public: void cacheGroupMadeObsolete(ApplicationCacheGroup*); bool storeNewestCache(ApplicationCacheGroup*); // Updates the cache group, but doesn't remove old cache. - void store(ApplicationCacheResource*, ApplicationCache*); + bool store(ApplicationCacheResource*, ApplicationCache*); bool storeUpdatedType(ApplicationCacheResource*, ApplicationCache*); // Removes the group if the cache to be removed is the newest one (so, storeNewestCache() needs to be called beforehand when updating). @@ -65,11 +71,19 @@ public: static bool storeCopyOfCache(const String& cacheDirectory, ApplicationCache*); + bool manifestURLs(Vector<KURL>* urls); + bool cacheGroupSize(const String& manifestURL, int64_t* size); + bool deleteCacheGroup(const String& manifestURL); + void vacuumDatabaseFile(); private: + ApplicationCacheStorage(); PassRefPtr<ApplicationCache> loadCache(unsigned storageID); ApplicationCacheGroup* loadCacheGroup(const KURL& manifestURL); - bool store(ApplicationCacheGroup*); + typedef StorageIDJournal<ApplicationCacheResource> ResourceStorageIDJournal; + typedef StorageIDJournal<ApplicationCacheGroup> GroupStorageIDJournal; + + bool store(ApplicationCacheGroup*, GroupStorageIDJournal*); bool store(ApplicationCache*, ResourceStorageIDJournal*); bool store(ApplicationCacheResource*, unsigned cacheStorageID); @@ -81,8 +95,14 @@ private: bool executeStatement(SQLiteStatement&); bool executeSQLCommand(const String&); + + void checkForMaxSizeReached(); String m_cacheDirectory; + String m_cacheFile; + + int64_t m_maximumSize; + bool m_isMaximumSizeReached; SQLiteDatabase m_database; @@ -92,6 +112,8 @@ private: typedef HashMap<String, ApplicationCacheGroup*> CacheGroupMap; CacheGroupMap m_cachesInMemory; // Excludes obsolete cache groups. + + friend ApplicationCacheStorage& cacheStorage(); }; ApplicationCacheStorage& cacheStorage(); diff --git a/src/3rdparty/webkit/WebCore/loader/archive/ArchiveResourceCollection.h b/src/3rdparty/webkit/WebCore/loader/archive/ArchiveResourceCollection.h index f898a8d382..9d630d1b28 100644 --- a/src/3rdparty/webkit/WebCore/loader/archive/ArchiveResourceCollection.h +++ b/src/3rdparty/webkit/WebCore/loader/archive/ArchiveResourceCollection.h @@ -39,7 +39,7 @@ namespace WebCore { -class ArchiveResourceCollection : Noncopyable { +class ArchiveResourceCollection : public Noncopyable { public: ArchiveResourceCollection(); diff --git a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h index 675e6c861f..44ef22adbe 100644 --- a/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h +++ b/src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h @@ -62,7 +62,7 @@ enum IconLoadDecision { IconLoadUnknown }; -class IconDatabase : Noncopyable { +class IconDatabase : public Noncopyable { // *** Main Thread Only *** public: diff --git a/src/3rdparty/webkit/WebCore/loader/icon/IconLoader.h b/src/3rdparty/webkit/WebCore/loader/icon/IconLoader.h index a7194d8d70..7b96ed8e1c 100644 --- a/src/3rdparty/webkit/WebCore/loader/icon/IconLoader.h +++ b/src/3rdparty/webkit/WebCore/loader/icon/IconLoader.h @@ -38,7 +38,7 @@ class Frame; class KURL; class SharedBuffer; -class IconLoader : private SubresourceLoaderClient, Noncopyable { +class IconLoader : private SubresourceLoaderClient, public Noncopyable { public: static std::auto_ptr<IconLoader> create(Frame*); ~IconLoader(); diff --git a/src/3rdparty/webkit/WebCore/loader/icon/PageURLRecord.h b/src/3rdparty/webkit/WebCore/loader/icon/PageURLRecord.h index bc52f5b589..f7ccb8fd05 100644 --- a/src/3rdparty/webkit/WebCore/loader/icon/PageURLRecord.h +++ b/src/3rdparty/webkit/WebCore/loader/icon/PageURLRecord.h @@ -51,7 +51,7 @@ public: String iconURL; }; -class PageURLRecord : Noncopyable { +class PageURLRecord : public Noncopyable { public: PageURLRecord(const String& pageURL); ~PageURLRecord(); diff --git a/src/3rdparty/webkit/WebCore/loader/loader.cpp b/src/3rdparty/webkit/WebCore/loader/loader.cpp index 881e200fe2..7ca45a5780 100644 --- a/src/3rdparty/webkit/WebCore/loader/loader.cpp +++ b/src/3rdparty/webkit/WebCore/loader/loader.cpp @@ -287,11 +287,8 @@ void Loader::Host::servePendingRequests(RequestQueue& requestsPending, bool& ser Request* request = requestsPending.first(); DocLoader* docLoader = request->docLoader(); bool resourceIsCacheValidator = request->cachedResource()->isCacheValidator(); - // If the document is fully parsed and there are no pending stylesheets there won't be any more - // resources that we would want to push to the front of the queue. Just hand off the remaining resources - // to the networking layer. - bool parsedAndStylesheetsKnown = !docLoader->doc()->parsing() && docLoader->doc()->haveStylesheetsLoaded(); - if (!parsedAndStylesheetsKnown && !resourceIsCacheValidator && m_requestsLoading.size() + m_nonCachedRequestsInFlight >= m_maxRequestsInFlight) { + + if (m_requestsLoading.size() + m_nonCachedRequestsInFlight >= m_maxRequestsInFlight) { serveLowerPriority = false; return; } diff --git a/src/3rdparty/webkit/WebCore/loader/loader.h b/src/3rdparty/webkit/WebCore/loader/loader.h index 3cced3d6cd..d0a526f960 100644 --- a/src/3rdparty/webkit/WebCore/loader/loader.h +++ b/src/3rdparty/webkit/WebCore/loader/loader.h @@ -38,7 +38,7 @@ namespace WebCore { class KURL; class Request; - class Loader : Noncopyable { + class Loader : public Noncopyable { public: Loader(); ~Loader(); diff --git a/src/3rdparty/webkit/WebCore/page/BarInfo.cpp b/src/3rdparty/webkit/WebCore/page/BarInfo.cpp index f6a12106bf..0f6cad5b56 100644 --- a/src/3rdparty/webkit/WebCore/page/BarInfo.cpp +++ b/src/3rdparty/webkit/WebCore/page/BarInfo.cpp @@ -62,20 +62,20 @@ bool BarInfo::visible() const return false; switch (m_type) { - case Locationbar: - return m_frame->page()->chrome()->toolbarsVisible(); - case Toolbar: - return m_frame->page()->chrome()->toolbarsVisible(); - case Personalbar: - return m_frame->page()->chrome()->toolbarsVisible(); - case Menubar: - return m_frame->page()->chrome()->menubarVisible(); - case Scrollbars: - return m_frame->page()->chrome()->scrollbarsVisible(); - case Statusbar: - return m_frame->page()->chrome()->statusbarVisible(); - default: - return false; + case Locationbar: + return m_frame->page()->chrome()->toolbarsVisible(); + case Toolbar: + return m_frame->page()->chrome()->toolbarsVisible(); + case Personalbar: + return m_frame->page()->chrome()->toolbarsVisible(); + case Menubar: + return m_frame->page()->chrome()->menubarVisible(); + case Scrollbars: + return m_frame->page()->chrome()->scrollbarsVisible(); + case Statusbar: + return m_frame->page()->chrome()->statusbarVisible(); + default: + return false; } } diff --git a/src/3rdparty/webkit/WebCore/page/Chrome.cpp b/src/3rdparty/webkit/WebCore/page/Chrome.cpp index 2170723dda..5a5670ee73 100644 --- a/src/3rdparty/webkit/WebCore/page/Chrome.cpp +++ b/src/3rdparty/webkit/WebCore/page/Chrome.cpp @@ -36,6 +36,7 @@ #include "InspectorController.h" #include "Page.h" #include "PageGroupLoadDeferrer.h" +#include "RenderObject.h" #include "ResourceHandle.h" #include "ScriptController.h" #include "SecurityOrigin.h" @@ -115,12 +116,12 @@ FloatRect Chrome::pageRect() const { return m_client->pageRect(); } - + float Chrome::scaleFactor() { return m_client->scaleFactor(); } - + void Chrome::focus() const { m_client->focus(); @@ -140,7 +141,7 @@ void Chrome::takeFocus(FocusDirection direction) const { m_client->takeFocus(direction); } - + Page* Chrome::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features) const { Page* newPage = m_client->createWindow(frame, request, features); @@ -234,7 +235,7 @@ bool Chrome::canRunBeforeUnloadConfirmPanel() bool Chrome::runBeforeUnloadConfirmPanel(const String& message, Frame* frame) { - // Defer loads in case the client method runs a new event loop that would + // Defer loads in case the client method runs a new event loop that would // otherwise cause the load to continue while we're in the middle of executing JavaScript. PageGroupLoadDeferrer deferrer(m_page, true); @@ -248,7 +249,7 @@ void Chrome::closeWindowSoon() void Chrome::runJavaScriptAlert(Frame* frame, const String& message) { - // Defer loads in case the client method runs a new event loop that would + // Defer loads in case the client method runs a new event loop that would // otherwise cause the load to continue while we're in the middle of executing JavaScript. PageGroupLoadDeferrer deferrer(m_page, true); @@ -258,7 +259,7 @@ void Chrome::runJavaScriptAlert(Frame* frame, const String& message) bool Chrome::runJavaScriptConfirm(Frame* frame, const String& message) { - // Defer loads in case the client method runs a new event loop that would + // Defer loads in case the client method runs a new event loop that would // otherwise cause the load to continue while we're in the middle of executing JavaScript. PageGroupLoadDeferrer deferrer(m_page, true); @@ -268,16 +269,16 @@ bool Chrome::runJavaScriptConfirm(Frame* frame, const String& message) bool Chrome::runJavaScriptPrompt(Frame* frame, const String& prompt, const String& defaultValue, String& result) { - // Defer loads in case the client method runs a new event loop that would + // Defer loads in case the client method runs a new event loop that would // otherwise cause the load to continue while we're in the middle of executing JavaScript. PageGroupLoadDeferrer deferrer(m_page, true); ASSERT(frame); bool ok = m_client->runJavaScriptPrompt(frame, frame->displayStringModifiedByEncoding(prompt), frame->displayStringModifiedByEncoding(defaultValue), result); - + if (ok) result = frame->displayStringModifiedByEncoding(result); - + return ok; } @@ -289,7 +290,7 @@ void Chrome::setStatusbarText(Frame* frame, const String& status) bool Chrome::shouldInterruptJavaScript() { - // Defer loads in case the client method runs a new event loop that would + // Defer loads in case the client method runs a new event loop that would // otherwise cause the load to continue while we're in the middle of executing JavaScript. PageGroupLoadDeferrer deferrer(m_page, true); @@ -317,7 +318,8 @@ void Chrome::mouseDidMoveOverElement(const HitTestResult& result, unsigned modif void Chrome::setToolTip(const HitTestResult& result) { // First priority is a potential toolTip representing a spelling or grammar error - String toolTip = result.spellingToolTip(); + TextDirection toolTipDirection; + String toolTip = result.spellingToolTip(toolTipDirection); // Next priority is a toolTip from a URL beneath the mouse (if preference is set to show those). if (toolTip.isEmpty() && m_page->settings()->showsURLsInToolTips()) { @@ -326,20 +328,28 @@ void Chrome::setToolTip(const HitTestResult& result) if (node->hasTagName(inputTag)) { HTMLInputElement* input = static_cast<HTMLInputElement*>(node); if (input->inputType() == HTMLInputElement::SUBMIT) - if (HTMLFormElement* form = input->form()) + if (HTMLFormElement* form = input->form()) { toolTip = form->action(); + if (form->renderer()) + toolTipDirection = form->renderer()->style()->direction(); + else + toolTipDirection = LTR; + } } } // Get tooltip representing link's URL - if (toolTip.isEmpty()) + if (toolTip.isEmpty()) { // FIXME: Need to pass this URL through userVisibleString once that's in WebCore toolTip = result.absoluteLinkURL().string(); + // URL always display as LTR. + toolTipDirection = LTR; + } } // Next we'll consider a tooltip for element with "title" attribute if (toolTip.isEmpty()) - toolTip = result.title(); + toolTip = result.title(toolTipDirection); // Lastly, for <input type="file"> that allow multiple files, we'll consider a tooltip for the selected filenames if (toolTip.isEmpty()) { @@ -357,13 +367,15 @@ void Chrome::setToolTip(const HitTestResult& result) names.append('\n'); } toolTip = String::adopt(names); + // filename always display as LTR. + toolTipDirection = LTR; } } } } } - - m_client->setToolTip(toolTip); + + m_client->setToolTip(toolTip, toolTipDirection); } void Chrome::print(Frame* frame) @@ -373,7 +385,7 @@ void Chrome::print(Frame* frame) void Chrome::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation) { - // Defer loads in case the client method runs a new event loop that would + // Defer loads in case the client method runs a new event loop that would // otherwise cause the load to continue while we're in the middle of executing JavaScript. PageGroupLoadDeferrer deferrer(m_page, true); @@ -420,10 +432,10 @@ bool ChromeClient::shouldReplaceWithGeneratedFileForUpload(const String&, String String ChromeClient::generateReplacementFile(const String&) { ASSERT_NOT_REACHED(); - return String(); + return String(); } -bool ChromeClient::paintCustomScrollbar(GraphicsContext*, const FloatRect&, ScrollbarControlSize, +bool ChromeClient::paintCustomScrollbar(GraphicsContext*, const FloatRect&, ScrollbarControlSize, ScrollbarControlState, ScrollbarPart, bool, float, float, ScrollbarControlPartMask) { diff --git a/src/3rdparty/webkit/WebCore/page/ChromeClient.h b/src/3rdparty/webkit/WebCore/page/ChromeClient.h index 78efa45209..2a90611464 100644 --- a/src/3rdparty/webkit/WebCore/page/ChromeClient.h +++ b/src/3rdparty/webkit/WebCore/page/ChromeClient.h @@ -131,7 +131,7 @@ namespace WebCore { virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags) = 0; - virtual void setToolTip(const String&) = 0; + virtual void setToolTip(const String&, TextDirection) = 0; virtual void print(Frame*) = 0; @@ -139,6 +139,15 @@ namespace WebCore { virtual void exceededDatabaseQuota(Frame*, const String& databaseName) = 0; #endif +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + // Callback invoked when the application cache fails to save a cache object + // because storing it would grow the database file past its defined maximum + // size or past the amount of free space on the device. + // The chrome client would need to take some action such as evicting some + // old caches. + virtual void reachedMaxAppCacheSize(int64_t spaceNeeded) = 0; +#endif + #if ENABLE(DASHBOARD_SUPPORT) virtual void dashboardRegionsChanged(); #endif diff --git a/src/3rdparty/webkit/WebCore/page/Console.cpp b/src/3rdparty/webkit/WebCore/page/Console.cpp index 45ff059dfc..de7bc720ed 100644 --- a/src/3rdparty/webkit/WebCore/page/Console.cpp +++ b/src/3rdparty/webkit/WebCore/page/Console.cpp @@ -29,8 +29,8 @@ #include "config.h" #include "Console.h" -#include "ChromeClient.h" #include "CString.h" +#include "ChromeClient.h" #include "Frame.h" #include "FrameLoader.h" #include "FrameTree.h" @@ -90,48 +90,48 @@ static void printMessageSourceAndLevelPrefix(MessageSource source, MessageLevel { const char* sourceString; switch (source) { - case HTMLMessageSource: - sourceString = "HTML"; - break; - case WMLMessageSource: - sourceString = "WML"; - break; - case XMLMessageSource: - sourceString = "XML"; - break; - case JSMessageSource: - sourceString = "JS"; - break; - case CSSMessageSource: - sourceString = "CSS"; - break; - case OtherMessageSource: - sourceString = "OTHER"; - break; - default: - ASSERT_NOT_REACHED(); - sourceString = "UNKNOWN"; - break; + case HTMLMessageSource: + sourceString = "HTML"; + break; + case WMLMessageSource: + sourceString = "WML"; + break; + case XMLMessageSource: + sourceString = "XML"; + break; + case JSMessageSource: + sourceString = "JS"; + break; + case CSSMessageSource: + sourceString = "CSS"; + break; + case OtherMessageSource: + sourceString = "OTHER"; + break; + default: + ASSERT_NOT_REACHED(); + sourceString = "UNKNOWN"; + break; } const char* levelString; switch (level) { - case TipMessageLevel: - levelString = "TIP"; - break; - case LogMessageLevel: - levelString = "LOG"; - break; - case WarningMessageLevel: - levelString = "WARN"; - break; - case ErrorMessageLevel: - levelString = "ERROR"; - break; - default: - ASSERT_NOT_REACHED(); - levelString = "UNKNOWN"; - break; + case TipMessageLevel: + levelString = "TIP"; + break; + case LogMessageLevel: + levelString = "LOG"; + break; + case WarningMessageLevel: + levelString = "WARN"; + break; + case ErrorMessageLevel: + levelString = "ERROR"; + break; + default: + ASSERT_NOT_REACHED(); + levelString = "UNKNOWN"; + break; } printf("%s %s:", sourceString, levelString); @@ -267,7 +267,7 @@ void Console::profile(const JSC::UString& title, ScriptCallStack* callStack) return; InspectorController* controller = page->inspectorController(); - // FIXME: log a console message when profiling is disabled. + // FIXME: log a console message when profiling is disabled. if (!controller->profilerEnabled()) return; @@ -305,7 +305,7 @@ void Console::profileEnd(const JSC::UString& title, ScriptCallStack* callStack) } #endif - + void Console::time(const String& title) { Page* page = this->page(); @@ -316,7 +316,7 @@ void Console::time(const String& title) // undefined for timing functions if (title.isNull()) return; - + page->inspectorController()->startTiming(title); } diff --git a/src/3rdparty/webkit/WebCore/page/ContextMenuController.h b/src/3rdparty/webkit/WebCore/page/ContextMenuController.h index cb7e6eec4d..38095f6d1b 100644 --- a/src/3rdparty/webkit/WebCore/page/ContextMenuController.h +++ b/src/3rdparty/webkit/WebCore/page/ContextMenuController.h @@ -37,7 +37,7 @@ namespace WebCore { class Event; class Page; - class ContextMenuController : Noncopyable { + class ContextMenuController : public Noncopyable { public: ContextMenuController(Page*, ContextMenuClient*); ~ContextMenuController(); diff --git a/src/3rdparty/webkit/WebCore/page/Coordinates.cpp b/src/3rdparty/webkit/WebCore/page/Coordinates.cpp index 637a8c2efd..728882aec9 100644 --- a/src/3rdparty/webkit/WebCore/page/Coordinates.cpp +++ b/src/3rdparty/webkit/WebCore/page/Coordinates.cpp @@ -31,7 +31,7 @@ namespace WebCore { String Coordinates::toString() const { return String::format("coordinate(%.6lg, %.6lg, %.6lg, %.6lg, %.6lg, %.6lg, %.6lg)", - m_latitude, m_longitude, m_altitude, m_accuracy, + m_latitude, m_longitude, m_altitude, m_accuracy, m_altitudeAccuracy, m_heading, m_speed); } diff --git a/src/3rdparty/webkit/WebCore/page/DOMSelection.cpp b/src/3rdparty/webkit/WebCore/page/DOMSelection.cpp index 3b54f02b8a..23c695e4da 100644 --- a/src/3rdparty/webkit/WebCore/page/DOMSelection.cpp +++ b/src/3rdparty/webkit/WebCore/page/DOMSelection.cpp @@ -32,12 +32,12 @@ #include "ExceptionCode.h" #include "Frame.h" -#include "htmlediting.h" #include "Node.h" #include "PlatformString.h" #include "Range.h" #include "SelectionController.h" #include "TextIterator.h" +#include "htmlediting.h" namespace WebCore { @@ -220,7 +220,7 @@ void DOMSelection::setBaseAndExtent(Node* baseNode, int baseOffset, Node* extent } VisiblePosition visibleBase = VisiblePosition(baseNode, baseOffset, DOWNSTREAM); VisiblePosition visibleExtent = VisiblePosition(extentNode, extentOffset, DOWNSTREAM); - + m_frame->selection()->moveTo(visibleBase, visibleExtent); } @@ -245,9 +245,9 @@ void DOMSelection::modify(const String& alterString, const String& directionStri alter = SelectionController::EXTEND; else if (equalIgnoringCase(alterString, "move")) alter = SelectionController::MOVE; - else + else return; - + SelectionController::EDirection direction; if (equalIgnoringCase(directionString, "forward")) direction = SelectionController::FORWARD; @@ -259,7 +259,7 @@ void DOMSelection::modify(const String& alterString, const String& directionStri direction = SelectionController::RIGHT; else return; - + TextGranularity granularity; if (equalIgnoringCase(granularityString, "character")) granularity = CharacterGranularity; @@ -336,7 +336,7 @@ void DOMSelection::addRange(Range* r) return; SelectionController* selection = m_frame->selection(); - + if (selection->isNone()) { selection->setSelection(VisibleSelection(r)); return; @@ -385,7 +385,7 @@ void DOMSelection::deleteFromDocument() ExceptionCode ec = 0; selectedRange->deleteContents(ec); ASSERT(!ec); - + setBaseAndExtent(selectedRange->startContainer(ec), selectedRange->startOffset(ec), selectedRange->startContainer(ec), selectedRange->startOffset(ec), ec); ASSERT(!ec); } diff --git a/src/3rdparty/webkit/WebCore/page/DOMSelection.h b/src/3rdparty/webkit/WebCore/page/DOMSelection.h index 6a914d6a6d..e0fe1e3180 100644 --- a/src/3rdparty/webkit/WebCore/page/DOMSelection.h +++ b/src/3rdparty/webkit/WebCore/page/DOMSelection.h @@ -30,9 +30,9 @@ #ifndef DOMSelection_h #define DOMSelection_h -#include <wtf/RefCounted.h> #include <wtf/Forward.h> #include <wtf/PassRefPtr.h> +#include <wtf/RefCounted.h> namespace WebCore { diff --git a/src/3rdparty/webkit/WebCore/page/DOMTimer.cpp b/src/3rdparty/webkit/WebCore/page/DOMTimer.cpp index 1cc77304c9..c42a0dce6c 100644 --- a/src/3rdparty/webkit/WebCore/page/DOMTimer.cpp +++ b/src/3rdparty/webkit/WebCore/page/DOMTimer.cpp @@ -54,7 +54,7 @@ DOMTimer::DOMTimer(ScriptExecutionContext* context, ScheduledAction* action, int if (lastUsedTimeoutId <= 0) lastUsedTimeoutId = 1; m_timeoutId = lastUsedTimeoutId; - + m_nestingLevel = timerNestingLevel + 1; scriptExecutionContext()->addTimeout(m_timeoutId, this); @@ -74,11 +74,10 @@ DOMTimer::DOMTimer(ScriptExecutionContext* context, ScheduledAction* action, int DOMTimer::~DOMTimer() { - if (scriptExecutionContext()) { + if (scriptExecutionContext()) scriptExecutionContext()->removeTimeout(m_timeoutId); - } } - + int DOMTimer::install(ScriptExecutionContext* context, ScheduledAction* action, int timeout, bool singleShot) { // DOMTimer constructor links the new timer into a list of ActiveDOMObjects held by the 'context'. @@ -110,7 +109,7 @@ void DOMTimer::fired() if (m_nestingLevel >= maxTimerNestingLevel) augmentRepeatInterval(s_minTimerInterval - repeatInterval()); } - + // No access to member variables after this point, it can delete the timer. m_action->execute(context); return; @@ -121,7 +120,7 @@ void DOMTimer::fired() // No access to member variables after this point. delete this; - + action->execute(context); delete action; timerNestingLevel = 0; @@ -147,24 +146,24 @@ void DOMTimer::stop() m_action.clear(); } -void DOMTimer::suspend() -{ - ASSERT(m_nextFireInterval == 0 && m_repeatInterval == 0); +void DOMTimer::suspend() +{ + ASSERT(!m_nextFireInterval && !m_repeatInterval); m_nextFireInterval = nextFireInterval(); m_repeatInterval = repeatInterval(); TimerBase::stop(); -} - -void DOMTimer::resume() -{ +} + +void DOMTimer::resume() +{ start(m_nextFireInterval, m_repeatInterval); m_nextFireInterval = 0; m_repeatInterval = 0; -} - - -bool DOMTimer::canSuspend() const -{ +} + + +bool DOMTimer::canSuspend() const +{ return true; } diff --git a/src/3rdparty/webkit/WebCore/page/DOMTimer.h b/src/3rdparty/webkit/WebCore/page/DOMTimer.h index f6343fcce0..6d6271fdbb 100644 --- a/src/3rdparty/webkit/WebCore/page/DOMTimer.h +++ b/src/3rdparty/webkit/WebCore/page/DOMTimer.h @@ -33,41 +33,41 @@ namespace WebCore { -class ScheduledAction; + class ScheduledAction; -class DOMTimer : public TimerBase, public ActiveDOMObject { -public: - virtual ~DOMTimer(); - // Creates a new timer owned by specified ScriptExecutionContext, starts it - // and returns its Id. - static int install(ScriptExecutionContext*, ScheduledAction*, int timeout, bool singleShot); - static void removeById(ScriptExecutionContext*, int timeoutId); + class DOMTimer : public TimerBase, public ActiveDOMObject { + public: + virtual ~DOMTimer(); + // Creates a new timer owned by specified ScriptExecutionContext, starts it + // and returns its Id. + static int install(ScriptExecutionContext*, ScheduledAction*, int timeout, bool singleShot); + static void removeById(ScriptExecutionContext*, int timeoutId); - // ActiveDOMObject - virtual bool hasPendingActivity() const; - virtual void contextDestroyed(); - virtual void stop(); - virtual bool canSuspend() const; - virtual void suspend(); - virtual void resume(); + // ActiveDOMObject + virtual bool hasPendingActivity() const; + virtual void contextDestroyed(); + virtual void stop(); + virtual bool canSuspend() const; + virtual void suspend(); + virtual void resume(); - // The lowest allowable timer setting (in seconds, 0.001 == 1 ms). - // Default is 10ms. - // Chromium uses a non-default timeout. - static double minTimerInterval() { return s_minTimerInterval; } - static void setMinTimerInterval(double value) { s_minTimerInterval = value; } + // The lowest allowable timer setting (in seconds, 0.001 == 1 ms). + // Default is 10ms. + // Chromium uses a non-default timeout. + static double minTimerInterval() { return s_minTimerInterval; } + static void setMinTimerInterval(double value) { s_minTimerInterval = value; } -private: - DOMTimer(ScriptExecutionContext*, ScheduledAction*, int timeout, bool singleShot); - virtual void fired(); + private: + DOMTimer(ScriptExecutionContext*, ScheduledAction*, int timeout, bool singleShot); + virtual void fired(); - int m_timeoutId; - int m_nestingLevel; - OwnPtr<ScheduledAction> m_action; - double m_nextFireInterval; - double m_repeatInterval; - static double s_minTimerInterval; -}; + int m_timeoutId; + int m_nestingLevel; + OwnPtr<ScheduledAction> m_action; + double m_nextFireInterval; + double m_repeatInterval; + static double s_minTimerInterval; + }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp index 8e64fe3ff0..e8f9004c4b 100644 --- a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp +++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp @@ -546,12 +546,17 @@ Storage* DOMWindow::sessionStorage() const { if (m_sessionStorage) return m_sessionStorage.get(); - - Page* page = m_frame->page(); + + Document* document = this->document(); + if (!document) + return 0; + + Page* page = document->page(); if (!page) return 0; - Document* document = m_frame->document(); + if (!page->settings()->sessionStorageEnabled()) + return 0; RefPtr<StorageArea> storageArea = page->sessionStorage()->storageArea(document->securityOrigin()); page->inspectorController()->didUseDOMStorage(storageArea.get(), false, m_frame); @@ -573,8 +578,7 @@ Storage* DOMWindow::localStorage() const if (!page) return 0; - Settings* settings = document->settings(); - if (!settings || !settings->localStorageEnabled()) + if (!page->settings()->localStorageEnabled()) return 0; StorageNamespace* localStorage = page->group().localStorage(); diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl index bfdebd4a39..e1c9ff0716 100644 --- a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl +++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl @@ -304,6 +304,7 @@ module window { attribute CounterConstructor Counter; attribute CSSRuleListConstructor CSSRuleList; attribute RectConstructor Rect; + attribute RGBColorConstructor RGBColor; attribute StyleSheetListConstructor StyleSheetList; // FIXME: Implement the commented-out global constructors for interfaces listed in DOM Level 3 Core specification. diff --git a/src/3rdparty/webkit/WebCore/page/DragController.cpp b/src/3rdparty/webkit/WebCore/page/DragController.cpp index 2fe5d975eb..64cb2127b5 100644 --- a/src/3rdparty/webkit/WebCore/page/DragController.cpp +++ b/src/3rdparty/webkit/WebCore/page/DragController.cpp @@ -72,7 +72,7 @@ static PlatformMouseEvent createMouseEvent(DragData* dragData) LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime()); } - + DragController::DragController(Page* page, DragClient* client) : m_page(page) , m_client(client) @@ -85,12 +85,12 @@ DragController::DragController(Page* page, DragClient* client) , m_sourceDragOperation(DragOperationNone) { } - + DragController::~DragController() -{ +{ m_client->dragControllerDestroyed(); } - + static PassRefPtr<DocumentFragment> documentFragmentFromDragData(DragData* dragData, RefPtr<Range> context, bool allowPlainText, bool& chosePlainText) { @@ -122,7 +122,7 @@ static PassRefPtr<DocumentFragment> documentFragmentFromDragData(DragData* dragD chosePlainText = true; return createFragmentFromText(context.get(), dragData->asPlainText()).get(); } - + return 0; } @@ -140,20 +140,20 @@ void DragController::cancelDrag() void DragController::dragEnded() { m_dragInitiator = 0; - m_didInitiateDrag = false; - m_page->dragCaretController()->clear(); -} + m_didInitiateDrag = false; + m_page->dragCaretController()->clear(); +} -DragOperation DragController::dragEntered(DragData* dragData) +DragOperation DragController::dragEntered(DragData* dragData) { return dragEnteredOrUpdated(dragData); } - -void DragController::dragExited(DragData* dragData) -{ + +void DragController::dragExited(DragData* dragData) +{ ASSERT(dragData); Frame* mainFrame = m_page->mainFrame(); - + if (RefPtr<FrameView> v = mainFrame->view()) { ClipboardAccessPolicy policy = (!m_documentUnderMouse || m_documentUnderMouse->securityOrigin()->isLocal()) ? ClipboardReadable : ClipboardTypesReadable; RefPtr<Clipboard> clipboard = dragData->createClipboard(policy); @@ -164,14 +164,13 @@ void DragController::dragExited(DragData* dragData) mouseMovedIntoDocument(0); } - -DragOperation DragController::dragUpdated(DragData* dragData) +DragOperation DragController::dragUpdated(DragData* dragData) { return dragEnteredOrUpdated(dragData); } - + bool DragController::performDrag(DragData* dragData) -{ +{ ASSERT(dragData); m_documentUnderMouse = m_page->mainFrame()->documentAtPoint(dragData->clientPosition()); if (m_isHandlingDrag) { @@ -187,13 +186,13 @@ bool DragController::performDrag(DragData* dragData) } m_documentUnderMouse = 0; return true; - } - + } + if ((m_dragDestinationAction & DragDestinationActionEdit) && concludeEditDrag(dragData)) { m_documentUnderMouse = 0; return true; } - + m_documentUnderMouse = 0; if (operationForLoad(dragData) == DragOperationNone) @@ -237,30 +236,30 @@ DragOperation DragController::dragEnteredOrUpdated(DragData* dragData) static HTMLInputElement* asFileInput(Node* node) { ASSERT(node); - + // The button for a FILE input is a sub element with no set input type // In order to get around this problem we assume any non-FILE input element // is this internal button, and try querying the shadow parent node. if (node->hasTagName(HTMLNames::inputTag) && node->isShadowNode() && static_cast<HTMLInputElement*>(node)->inputType() != HTMLInputElement::FILE) node = node->shadowParentNode(); - + if (!node || !node->hasTagName(HTMLNames::inputTag)) return 0; - + HTMLInputElement* inputElem = static_cast<HTMLInputElement*>(node); if (inputElem->inputType() == HTMLInputElement::FILE) return inputElem; - + return 0; } - + bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction actionMask, DragOperation& operation) { ASSERT(dragData); - + if (!m_documentUnderMouse) return false; - + m_isHandlingDrag = false; if (actionMask & DragDestinationActionDHTML) { m_isHandlingDrag = tryDHTMLDrag(dragData, operation); @@ -289,7 +288,7 @@ bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction a operation = DragOperationGeneric; return true; } - + IntPoint dragPos = dragData->clientPosition(); IntPoint point = frameView->windowToContents(dragPos); Element* element = m_documentUnderMouse->elementFromPoint(point.x(), point.y()); @@ -307,11 +306,11 @@ bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction a } DragSourceAction DragController::delegateDragSourceAction(const IntPoint& windowPoint) -{ +{ m_dragSourceAction = m_client->dragSourceActionMaskForPoint(windowPoint); return m_dragSourceAction; } - + DragOperation DragController::operationForLoad(DragData* dragData) { ASSERT(dragData); @@ -336,15 +335,15 @@ bool DragController::concludeEditDrag(DragData* dragData) { ASSERT(dragData); ASSERT(!m_isHandlingDrag); - + if (!m_documentUnderMouse) return false; - + IntPoint point = m_documentUnderMouse->view()->windowToContents(dragData->clientPosition()); Element* element = m_documentUnderMouse->elementFromPoint(point.x(), point.y()); ASSERT(element); Frame* innerFrame = element->ownerDocument()->frame(); - ASSERT(innerFrame); + ASSERT(innerFrame); if (dragData->containsColor()) { Color color = dragData->asColor(); @@ -362,32 +361,32 @@ bool DragController::concludeEditDrag(DragData* dragData) innerFrame->editor()->applyStyle(style.get(), EditActionSetColor); return true; } - + if (!m_page->dragController()->canProcessDrag(dragData)) { m_page->dragCaretController()->clear(); return false; } - + if (HTMLInputElement* fileInput = asFileInput(element)) { if (!fileInput->isEnabledFormControl()) return false; - + if (!dragData->containsFiles()) return false; - + Vector<String> filenames; dragData->asFilenames(filenames); if (filenames.isEmpty()) return false; - - // Ugly. For security none of the API's available to us to set the input value + + // Ugly. For security none of the API's available to us to set the input value // on file inputs. Even forcing a change in HTMLInputElement doesn't work as // RenderFileUploadControl clears the file when doing updateFromElement() RenderFileUploadControl* renderer = static_cast<RenderFileUploadControl*>(fileInput->renderer()); - + if (!renderer) return false; - + renderer->receiveDroppedFiles(filenames); return true; } @@ -395,71 +394,70 @@ bool DragController::concludeEditDrag(DragData* dragData) VisibleSelection dragCaret(m_page->dragCaretController()->selection()); m_page->dragCaretController()->clear(); RefPtr<Range> range = dragCaret.toNormalizedRange(); - + // For range to be null a WebKit client must have done something bad while // manually controlling drag behaviour - if (!range) + if (!range) return false; DocLoader* loader = range->ownerDocument()->docLoader(); loader->setAllowStaleResources(true); - if (dragIsMove(innerFrame->selection()) || dragCaret.isContentRichlyEditable()) { + if (dragIsMove(innerFrame->selection()) || dragCaret.isContentRichlyEditable()) { bool chosePlainText = false; RefPtr<DocumentFragment> fragment = documentFragmentFromDragData(dragData, range, true, chosePlainText); if (!fragment || !innerFrame->editor()->shouldInsertFragment(fragment, range, EditorInsertActionDropped)) { loader->setAllowStaleResources(false); return false; } - + m_client->willPerformDragDestinationAction(DragDestinationActionEdit, dragData); if (dragIsMove(innerFrame->selection())) { - bool smartMove = innerFrame->selectionGranularity() == WordGranularity - && innerFrame->editor()->smartInsertDeleteEnabled() + bool smartMove = innerFrame->selectionGranularity() == WordGranularity + && innerFrame->editor()->smartInsertDeleteEnabled() && dragData->canSmartReplace(); applyCommand(MoveSelectionCommand::create(fragment, dragCaret.base(), smartMove)); } else { if (setSelectionToDragCaret(innerFrame, dragCaret, range, point)) - applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse, fragment, true, dragData->canSmartReplace(), chosePlainText)); - } + applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse, fragment, true, dragData->canSmartReplace(), chosePlainText)); + } } else { String text = dragData->asPlainText(); if (text.isEmpty() || !innerFrame->editor()->shouldInsertText(text, range.get(), EditorInsertActionDropped)) { loader->setAllowStaleResources(false); return false; } - + m_client->willPerformDragDestinationAction(DragDestinationActionEdit, dragData); if (setSelectionToDragCaret(innerFrame, dragCaret, range, point)) - applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse, createFragmentFromText(range.get(), text), true, false, true)); + applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse, createFragmentFromText(range.get(), text), true, false, true)); } loader->setAllowStaleResources(false); return true; } - - -bool DragController::canProcessDrag(DragData* dragData) + +bool DragController::canProcessDrag(DragData* dragData) { ASSERT(dragData); if (!dragData->containsCompatibleContent()) return false; - + IntPoint point = m_page->mainFrame()->view()->windowToContents(dragData->clientPosition()); HitTestResult result = HitTestResult(point); if (!m_page->mainFrame()->contentRenderer()) return false; result = m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(point, true); - - if (!result.innerNonSharedNode()) + + if (!result.innerNonSharedNode()) return false; - + if (dragData->containsFiles() && asFileInput(result.innerNonSharedNode())) return true; - + if (!result.innerNonSharedNode()->isContentEditable()) return false; - + if (m_didInitiateDrag && m_documentUnderMouse == m_dragInitiator && result.isSelected()) return false; @@ -482,7 +480,7 @@ static DragOperation defaultOperationForDrag(DragOperation srcOpMask) } bool DragController::tryDHTMLDrag(DragData* dragData, DragOperation& operation) -{ +{ ASSERT(dragData); ASSERT(m_documentUnderMouse); RefPtr<Frame> mainFrame = m_page->mainFrame(); @@ -525,7 +523,7 @@ bool DragController::mayStartDragAtEventLocation(const Frame* frame, const IntPo mouseDownTarget = frame->eventHandler()->hitTestResultAtPoint(framePos, true); - if (mouseDownTarget.image() + if (mouseDownTarget.image() && !mouseDownTarget.absoluteImageURL().isEmpty() && frame->settings()->loadsImagesAutomatically() && m_dragSourceAction & DragSourceActionImage) @@ -543,56 +541,56 @@ bool DragController::mayStartDragAtEventLocation(const Frame* frame, const IntPo return false; } - + static CachedImage* getCachedImage(Element* element) { ASSERT(element); RenderObject* renderer = element->renderer(); - if (!renderer || !renderer->isImage()) + if (!renderer || !renderer->isImage()) return 0; RenderImage* image = toRenderImage(renderer); return image->cachedImage(); } - + static Image* getImage(Element* element) { ASSERT(element); RenderObject* renderer = element->renderer(); - if (!renderer || !renderer->isImage()) + if (!renderer || !renderer->isImage()) return 0; - + RenderImage* image = toRenderImage(renderer); if (image->cachedImage() && !image->cachedImage()->errorOccurred()) return image->cachedImage()->image(); return 0; } - + static void prepareClipboardForImageDrag(Frame* src, Clipboard* clipboard, Element* node, const KURL& linkURL, const KURL& imageURL, const String& label) { RefPtr<Range> range = src->document()->createRange(); ExceptionCode ec = 0; range->selectNode(node, ec); - ASSERT(ec == 0); - src->selection()->setSelection(VisibleSelection(range.get(), DOWNSTREAM)); + ASSERT(!ec); + src->selection()->setSelection(VisibleSelection(range.get(), DOWNSTREAM)); clipboard->declareAndWriteDragImage(node, !linkURL.isEmpty() ? linkURL : imageURL, label, src); } - + static IntPoint dragLocForDHTMLDrag(const IntPoint& mouseDraggedPoint, const IntPoint& dragOrigin, const IntPoint& dragImageOffset, bool isLinkImage) { // dragImageOffset is the cursor position relative to the lower-left corner of the image. -#if PLATFORM(MAC) - // We add in the Y dimension because we are a flipped view, so adding moves the image down. +#if PLATFORM(MAC) + // We add in the Y dimension because we are a flipped view, so adding moves the image down. const int yOffset = dragImageOffset.y(); #else const int yOffset = -dragImageOffset.y(); #endif - + if (isLinkImage) return IntPoint(mouseDraggedPoint.x() - dragImageOffset.x(), mouseDraggedPoint.y() + yOffset); - + return IntPoint(dragOrigin.x() - dragImageOffset.x(), dragOrigin.y() + yOffset); } - + static IntPoint dragLocForSelectionDrag(Frame* src) { IntRect draggingRect = enclosingIntRect(src->selectionBounds()); @@ -607,63 +605,63 @@ static IntPoint dragLocForSelectionDrag(Frame* src) #endif return IntPoint(xpos, ypos); } - + bool DragController::startDrag(Frame* src, Clipboard* clipboard, DragOperation srcOp, const PlatformMouseEvent& dragEvent, const IntPoint& dragOrigin, bool isDHTMLDrag) -{ +{ ASSERT(src); ASSERT(clipboard); - + if (!src->view() || !src->contentRenderer()) return false; - + HitTestResult dragSource = HitTestResult(dragOrigin); dragSource = src->eventHandler()->hitTestResultAtPoint(dragOrigin, true); KURL linkURL = dragSource.absoluteLinkURL(); KURL imageURL = dragSource.absoluteImageURL(); bool isSelected = dragSource.isSelected(); - + IntPoint mouseDraggedPoint = src->view()->windowToContents(dragEvent.pos()); - + m_draggingImageURL = KURL(); m_sourceDragOperation = srcOp; - + DragImageRef dragImage = 0; IntPoint dragLoc(0, 0); IntPoint dragImageOffset(0, 0); - - if (isDHTMLDrag) + + if (isDHTMLDrag) dragImage = clipboard->createDragImage(dragImageOffset); - + // We allow DHTML/JS to set the drag image, even if its a link, image or text we're dragging. // This is in the spirit of the IE API, which allows overriding of pasteboard data and DragOp. if (dragImage) { dragLoc = dragLocForDHTMLDrag(mouseDraggedPoint, dragOrigin, dragImageOffset, !linkURL.isEmpty()); m_dragOffset = dragImageOffset; } - + bool startedDrag = true; // optimism - we almost always manage to start the drag - + Node* node = dragSource.innerNonSharedNode(); - + Image* image = getImage(static_cast<Element*>(node)); if (!imageURL.isEmpty() && node && node->isElementNode() && image && (m_dragSourceAction & DragSourceActionImage)) { - // We shouldn't be starting a drag for an image that can't provide an extension. + // We shouldn't be starting a drag for an image that can't provide an extension. // This is an early detection for problems encountered later upon drop. ASSERT(!image->filenameExtension().isEmpty()); Element* element = static_cast<Element*>(node); if (!clipboard->hasData()) { - m_draggingImageURL = imageURL; + m_draggingImageURL = imageURL; prepareClipboardForImageDrag(src, clipboard, element, linkURL, imageURL, dragSource.altDisplayString()); } - + m_client->willPerformDragSourceAction(DragSourceActionImage, dragOrigin, clipboard); - + if (!dragImage) { IntRect imageRect = dragSource.imageRect(); imageRect.setLocation(m_page->mainFrame()->view()->windowToContents(src->view()->contentsToWindow(imageRect.location()))); doImageDrag(element, dragOrigin, dragSource.imageRect(), clipboard, src, m_dragOffset); - } else + } else // DHTML defined drag image doSystemDrag(dragImage, dragLoc, dragOrigin, clipboard, src, false); @@ -689,12 +687,12 @@ bool DragController::startDrag(Frame* src, Clipboard* clipboard, DragOperation s IntSize size = dragImageSize(dragImage); m_dragOffset = IntPoint(-size.width() / 2, -LinkDragBorderInset); dragLoc = IntPoint(mouseDraggedPoint.x() + m_dragOffset.x(), mouseDraggedPoint.y() + m_dragOffset.y()); - } + } doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, clipboard, src, true); } else if (isSelected && (m_dragSourceAction & DragSourceActionSelection)) { RefPtr<Range> selectionRange = src->selection()->toNormalizedRange(); ASSERT(selectionRange); - if (!clipboard->hasData()) + if (!clipboard->hasData()) clipboard->writeRange(selectionRange.get(), src); m_client->willPerformDragSourceAction(DragSourceActionSelection, dragOrigin, clipboard); if (!dragImage) { @@ -712,7 +710,7 @@ bool DragController::startDrag(Frame* src, Clipboard* clipboard, DragOperation s // under the mousedown point, so linkURL, imageURL and isSelected are all false/empty. startedDrag = false; } - + if (dragImage) deleteDragImage(dragImage); return startedDrag; @@ -723,17 +721,17 @@ void DragController::doImageDrag(Element* element, const IntPoint& dragOrigin, c IntPoint mouseDownPoint = dragOrigin; DragImageRef dragImage; IntPoint origin; - + Image* image = getImage(element); if (image && image->size().height() * image->size().width() <= MaxOriginalImageArea && (dragImage = createDragImageFromImage(image))) { IntSize originalSize = rect.size(); origin = rect.location(); - + dragImage = fitDragImageToMaxSize(dragImage, rect.size(), maxDragImageSize()); dragImage = dissolveDragImageToFraction(dragImage, DragImageAlpha); IntSize newSize = dragImageSize(dragImage); - + // Properly orient the drag image and orient it differently if it's smaller than the original float scale = newSize.width() / (float)originalSize.width(); float dx = origin.x() - mouseDownPoint.x(); @@ -751,14 +749,14 @@ void DragController::doImageDrag(Element* element, const IntPoint& dragOrigin, c if (dragImage) origin = IntPoint(DragIconRightInset - dragImageSize(dragImage).width(), DragIconBottomInset); } - + dragImageOffset.setX(mouseDownPoint.x() + origin.x()); dragImageOffset.setY(mouseDownPoint.y() + origin.y()); doSystemDrag(dragImage, dragImageOffset, dragOrigin, clipboard, frame, false); - + deleteDragImage(dragImage); } - + void DragController::doSystemDrag(DragImageRef image, const IntPoint& dragLoc, const IntPoint& eventPos, Clipboard* clipboard, Frame* frame, bool forLink) { m_didInitiateDrag = true; @@ -768,10 +766,10 @@ void DragController::doSystemDrag(DragImageRef image, const IntPoint& dragLoc, c RefPtr<FrameView> viewProtector = frameProtector->view(); m_client->startDrag(image, viewProtector->windowToContents(frame->view()->contentsToWindow(dragLoc)), viewProtector->windowToContents(frame->view()->contentsToWindow(eventPos)), clipboard, frameProtector.get(), forLink); - + cleanupAfterSystemDrag(); } - + // Manual drag caret manipulation void DragController::placeDragCaret(const IntPoint& windowPoint) { @@ -783,8 +781,8 @@ void DragController::placeDragCaret(const IntPoint& windowPoint) if (!frameView) return; IntPoint framePoint = frameView->windowToContents(windowPoint); - VisibleSelection dragCaret(frame->visiblePositionForPoint(framePoint)); + VisibleSelection dragCaret(frame->visiblePositionForPoint(framePoint)); m_page->dragCaretController()->setSelection(dragCaret); } - + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp index 3f0296ec14..547485c291 100644 --- a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp +++ b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp @@ -141,6 +141,8 @@ EventHandler::EventHandler(Frame* frame) , m_mouseDownWasSingleClickInSelection(false) , m_beganSelectingText(false) , m_panScrollInProgress(false) + , m_panScrollButtonPressed(false) + , m_springLoadedPanScrollInProgress(false) , m_hoverTimer(this, &EventHandler::hoverTimerFired) , m_autoscrollTimer(this, &EventHandler::autoscrollTimerFired) , m_autoscrollRenderer(0) @@ -346,6 +348,11 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve // Reset drag state. dragState().m_dragSrc = 0; + if (ScrollView* scrollView = m_frame->view()) { + if (scrollView->isPointInScrollbarCorner(event.event().pos())) + return false; + } + bool singleClick = event.event().clickCount() <= 1; // If we got the event back, that must mean it wasn't prevented, @@ -650,7 +657,7 @@ void EventHandler::autoscrollTimerFired(Timer<EventHandler>*) } } #if ENABLE(PAN_SCROLLING) - setPanScrollCursor(); + updatePanScrollState(); toRenderBox(r)->panScroll(m_panScrollStartPos); #endif } @@ -658,7 +665,7 @@ void EventHandler::autoscrollTimerFired(Timer<EventHandler>*) #if ENABLE(PAN_SCROLLING) -void EventHandler::setPanScrollCursor() +void EventHandler::updatePanScrollState() { FrameView* view = m_frame->view(); if (!view) @@ -671,6 +678,9 @@ void EventHandler::setPanScrollCursor() bool north = m_panScrollStartPos.y() > (m_currentMousePosition.y() + ScrollView::noPanScrollRadius); bool south = m_panScrollStartPos.y() < (m_currentMousePosition.y() - ScrollView::noPanScrollRadius); + if ((east || west || north || south) && m_panScrollButtonPressed) + m_springLoadedPanScrollInProgress = true; + if (north) { if (east) view->setCursor(northEastPanningCursor()); @@ -831,6 +841,7 @@ void EventHandler::stopAutoscrollTimer(bool rendererIsBeingDestroyed) m_autoscrollTimer.stop(); m_panScrollInProgress = false; + m_springLoadedPanScrollInProgress = false; // If we're not in the top frame we notify it that we are not doing a panScroll any more. if (Page* page = m_frame->page()) { @@ -1158,6 +1169,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent) if (renderer) { m_panScrollInProgress = true; + m_panScrollButtonPressed = true; handleAutoscroll(renderer); invalidateClick(); return true; @@ -1195,8 +1207,12 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent) if (swallowEvent) { // scrollbars should get events anyway, even disabled controls might be scrollable - if (mev.scrollbar()) - passMousePressEventToScrollbar(mev, mev.scrollbar()); + Scrollbar* scrollbar = mev.scrollbar(); + + updateLastScrollbarUnderMouse(scrollbar, true); + + if (scrollbar) + passMousePressEventToScrollbar(mev, scrollbar); } else { // Refetch the event target node if it currently is the shadow node inside an <input> element. // If a mouse event handler changes the input element type to one that has a widget associated, @@ -1211,6 +1227,9 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent) Scrollbar* scrollbar = view ? view->scrollbarAtPoint(mouseEvent.pos()) : 0; if (!scrollbar) scrollbar = mev.scrollbar(); + + updateLastScrollbarUnderMouse(scrollbar, true); + if (scrollbar && passMousePressEventToScrollbar(mev, scrollbar)) swallowEvent = true; else @@ -1327,12 +1346,7 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi if (!scrollbar) scrollbar = mev.scrollbar(); - if (m_lastScrollbarUnderMouse != scrollbar) { - // Send mouse exited to the old scrollbar. - if (m_lastScrollbarUnderMouse) - m_lastScrollbarUnderMouse->mouseExited(); - m_lastScrollbarUnderMouse = m_mousePressed ? 0 : scrollbar; - } + updateLastScrollbarUnderMouse(scrollbar, !m_mousePressed); } bool swallowEvent = false; @@ -1383,6 +1397,13 @@ bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent) { RefPtr<FrameView> protector(m_frame->view()); +#if ENABLE(PAN_SCROLLING) + if (mouseEvent.button() == MiddleButton) + m_panScrollButtonPressed = false; + if (m_springLoadedPanScrollInProgress) + stopAutoscrollTimer(); +#endif + m_mousePressed = false; m_currentMousePosition = mouseEvent.pos(); @@ -2422,4 +2443,16 @@ bool EventHandler::passMousePressEventToScrollbar(MouseEventWithHitTestResults& return scrollbar->mouseDown(mev.event()); } +// If scrollbar (under mouse) is different from last, send a mouse exited. Set +// last to scrollbar if setLast is true; else set last to 0. +void EventHandler::updateLastScrollbarUnderMouse(Scrollbar* scrollbar, bool setLast) +{ + if (m_lastScrollbarUnderMouse != scrollbar) { + // Send mouse exited to the old scrollbar. + if (m_lastScrollbarUnderMouse) + m_lastScrollbarUnderMouse->mouseExited(); + m_lastScrollbarUnderMouse = setLast ? scrollbar : 0; + } +} + } diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.h b/src/3rdparty/webkit/WebCore/page/EventHandler.h index d5c0b972f8..409913a906 100644 --- a/src/3rdparty/webkit/WebCore/page/EventHandler.h +++ b/src/3rdparty/webkit/WebCore/page/EventHandler.h @@ -69,7 +69,7 @@ extern const int GeneralDragHysteresis; enum HitTestScrollbars { ShouldHitTestScrollbars, DontHitTestScrollbars }; -class EventHandler : Noncopyable { +class EventHandler : public Noncopyable { public: EventHandler(Frame*); ~EventHandler(); @@ -207,7 +207,7 @@ private: Cursor selectCursor(const MouseEventWithHitTestResults&, Scrollbar*); #if ENABLE(PAN_SCROLLING) - void setPanScrollCursor(); + void updatePanScrollState(); #endif void hoverTimerFired(Timer<EventHandler>*); @@ -271,6 +271,8 @@ private: void updateSelectionForMouseDrag(Node* targetNode, const IntPoint& localPoint); + void updateLastScrollbarUnderMouse(Scrollbar*, bool); + bool capturesDragging() const { return m_capturesDragging; } #if PLATFORM(MAC) && defined(__OBJC__) @@ -295,6 +297,9 @@ private: IntPoint m_panScrollStartPos; bool m_panScrollInProgress; + bool m_panScrollButtonPressed; + bool m_springLoadedPanScrollInProgress; + Timer<EventHandler> m_hoverTimer; Timer<EventHandler> m_autoscrollTimer; diff --git a/src/3rdparty/webkit/WebCore/page/Frame.cpp b/src/3rdparty/webkit/WebCore/page/Frame.cpp index 870bd2ae49..2d6a7950ea 100644 --- a/src/3rdparty/webkit/WebCore/page/Frame.cpp +++ b/src/3rdparty/webkit/WebCore/page/Frame.cpp @@ -42,21 +42,20 @@ #include "EditingText.h" #include "EditorClient.h" #include "EventNames.h" -#include "FocusController.h" #include "FloatQuad.h" +#include "FocusController.h" #include "FrameLoader.h" #include "FrameLoaderClient.h" #include "FrameView.h" #include "GraphicsContext.h" #include "HTMLDocument.h" +#include "HTMLFormControlElement.h" #include "HTMLFormElement.h" #include "HTMLFrameElementBase.h" -#include "HTMLFormControlElement.h" #include "HTMLNames.h" #include "HTMLTableCellElement.h" #include "HitTestResult.h" #include "Logging.h" -#include "markup.h" #include "MediaFeatureNames.h" #include "Navigator.h" #include "NodeList.h" @@ -67,12 +66,13 @@ #include "RenderTextControl.h" #include "RenderTheme.h" #include "RenderView.h" +#include "ScriptController.h" #include "Settings.h" #include "TextIterator.h" #include "TextResourceDecoder.h" #include "XMLNames.h" -#include "ScriptController.h" #include "htmlediting.h" +#include "markup.h" #include "npruntime_impl.h" #include "visible_units.h" #include <wtf/RefCountedLeakCounter.h> @@ -104,7 +104,7 @@ namespace WebCore { using namespace HTMLNames; -#ifndef NDEBUG +#ifndef NDEBUG static WTF::RefCountedLeakCounter frameCounter("Frame"); #endif @@ -115,7 +115,7 @@ static inline Frame* parentFromOwnerElement(HTMLFrameOwnerElement* ownerElement) return ownerElement->document()->frame(); } -Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* frameLoaderClient) +Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* frameLoaderClient) : m_page(page) , m_treeNode(this, parentFromOwnerElement(ownerElement)) , m_loader(this, frameLoaderClient) @@ -163,7 +163,7 @@ Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* else { page->incrementFrameCount(); // Make sure we will not end up with two frames referencing the same owner element. - ASSERT((!(ownerElement->m_contentFrame)) || (ownerElement->m_contentFrame->ownerElement() != ownerElement)); + ASSERT((!(ownerElement->m_contentFrame)) || (ownerElement->m_contentFrame->ownerElement() != ownerElement)); ownerElement->m_contentFrame = this; } @@ -176,7 +176,7 @@ Frame::~Frame() { setView(0); loader()->cancelAndClear(); - + // FIXME: We should not be doing all this work inside the destructor ASSERT(!m_lifeSupportTimer.isActive()); @@ -186,14 +186,14 @@ Frame::~Frame() #endif disconnectOwnerElement(); - + if (m_domWindow) m_domWindow->disconnectFrame(); HashSet<DOMWindow*>::iterator end = m_liveFormerWindows.end(); for (HashSet<DOMWindow*>::iterator it = m_liveFormerWindows.begin(); it != end; ++it) (*it)->disconnectFrame(); - + if (m_view) { m_view->hide(); m_view->clearFrame(); @@ -262,7 +262,7 @@ void Frame::setDocument(PassRefPtr<Document> newDoc) m_doc = newDoc; if (m_doc && selection()->isFocusedAndActive()) setUseSecureKeyboardEntry(m_doc->useSecureKeyboardEntryWhenActive()); - + if (m_doc && !m_doc->attached()) m_doc->attach(); @@ -307,14 +307,14 @@ IntRect Frame::firstRectForRange(Range* range) const if (startCaretRect.y() == endCaretRect.y()) { // start and end are on the same line - return IntRect(min(startCaretRect.x(), endCaretRect.x()), - startCaretRect.y(), + return IntRect(min(startCaretRect.x(), endCaretRect.x()), + startCaretRect.y(), abs(endCaretRect.x() - startCaretRect.x()), max(startCaretRect.height(), endCaretRect.height())); } - + // start and end aren't on the same line, so go from start to the end of its line - return IntRect(startCaretRect.x(), + return IntRect(startCaretRect.x(), startCaretRect.y(), startCaretRect.width() + extraWidthToEndOfLine, startCaretRect.height()); @@ -365,23 +365,21 @@ static RegularExpression* createRegExpForLabels(const Vector<String>& labels) bool startsWithWordChar = false; bool endsWithWordChar = false; - if (label.length() != 0) { + if (label.length()) { startsWithWordChar = wordRegExp.match(label.substring(0, 1)) >= 0; endsWithWordChar = wordRegExp.match(label.substring(label.length() - 1, 1)) >= 0; } - - if (i != 0) + + if (i) pattern.append("|"); // Search for word boundaries only if label starts/ends with "word characters". // If we always searched for word boundaries, this wouldn't work for languages // such as Japanese. - if (startsWithWordChar) { + if (startsWithWordChar) pattern.append("\\b"); - } pattern.append(label); - if (endsWithWordChar) { + if (endsWithWordChar) pattern.append("\\b"); - } } pattern.append(")"); return new RegularExpression(pattern, TextCaseInsensitive); @@ -462,9 +460,8 @@ String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element // If we started in a cell, but bailed because we found the start of the form or the // previous element, we still might need to search the row above us for a label. - if (startingTableCell && !searchedCellAbove) { + if (startingTableCell && !searchedCellAbove) return searchForLabelsAboveCell(regExp.get(), startingTableCell); - } return String(); } @@ -477,7 +474,7 @@ String Frame::matchLabelsAgainstElement(const Vector<String>& labels, Element* e // Make numbers and _'s in field names behave like word boundaries, e.g., "address2" replace(name, RegularExpression("\\d", TextCaseSensitive), " "); name.replace('_', ' '); - + OwnPtr<RegularExpression> regExp(createRegExpForLabels(labels)); // Use the largest match we can find in the whole name string int pos; @@ -640,7 +637,7 @@ void Frame::selectionLayoutChanged() return; VisibleSelection selection = this->selection()->selection(); - + if (!selection.isRange()) view->clearSelection(); else { @@ -654,7 +651,7 @@ void Frame::selectionLayoutChanged() Position endPos = selection.end(); if (endPos.upstream().isCandidate()) endPos = endPos.upstream(); - + // We can get into a state where the selection endpoints map to the same VisiblePosition when a selection is deleted // because we don't yet notify the SelectionController of text removal. if (startPos.isNotNull() && endPos.isNotNull() && selection.visibleStart() != selection.visibleEnd()) { @@ -729,12 +726,12 @@ bool Frame::shouldApplyPageZoom() const } void Frame::setZoomFactor(float percent, bool isTextOnly) -{ +{ if (m_zoomFactor == percent && isZoomFactorTextOnly() == isTextOnly) return; #if ENABLE(SVG) - // SVG doesn't care if the zoom factor is text only. It will always apply a + // SVG doesn't care if the zoom factor is text only. It will always apply a // zoom to the whole SVG. if (m_doc->isSVGDocument()) { if (!static_cast<SVGDocument*>(m_doc.get())->zoomAndPanEnabled()) @@ -827,7 +824,7 @@ void Frame::reapplyStyles() // FIXME: This call doesn't really make sense in a function called reapplyStyles. // We should probably eventually move it into its own function. m_doc->docLoader()->setAutoLoadImages(m_page && m_page->settings()->loadsImagesAutomatically()); - + #if FRAME_LOADS_USER_STYLESHEET const KURL userStyleSheetLocation = m_page ? m_page->settings()->userStyleSheetLocation() : KURL(); if (!userStyleSheetLocation.isEmpty()) @@ -859,7 +856,7 @@ bool Frame::shouldDeleteSelection(const VisibleSelection& selection) const return editor()->client()->shouldDeleteRange(selection.toNormalizedRange().get()); } -bool Frame::isContentEditable() const +bool Frame::isContentEditable() const { if (m_editor.clientIsEditable()) return true; @@ -897,7 +894,7 @@ void Frame::clearTypingStyle() void Frame::computeAndSetTypingStyle(CSSStyleDeclaration *style, EditAction editingAction) { - if (!style || style->length() == 0) { + if (!style || !style->length()) { clearTypingStyle(); return; } @@ -933,7 +930,7 @@ void Frame::computeAndSetTypingStyle(CSSStyleDeclaration *style, EditAction edit blockStyle->diff(mutableStyle.get()); if (blockStyle->length() > 0) applyCommand(ApplyStyleCommand::create(document(), blockStyle.get(), editingAction)); - + // Set the remaining style as the typing style. m_typingStyle = mutableStyle.release(); } @@ -950,7 +947,7 @@ String Frame::selectionStartStylePropertyValue(int stylePropertyID) const if (nodeToRemove) { ExceptionCode ec = 0; nodeToRemove->remove(ec); - ASSERT(ec == 0); + ASSERT(!ec); } return value; @@ -969,7 +966,7 @@ PassRefPtr<CSSComputedStyleDeclaration> Frame::selectionComputedStyle(Node*& nod Element *elem = pos.element(); if (!elem) return 0; - + RefPtr<Element> styleElement = elem; ExceptionCode ec = 0; @@ -977,10 +974,10 @@ PassRefPtr<CSSComputedStyleDeclaration> Frame::selectionComputedStyle(Node*& nod styleElement = document()->createElement(spanTag, false); styleElement->setAttribute(styleAttr, m_typingStyle->cssText().impl(), ec); - ASSERT(ec == 0); - + ASSERT(!ec); + styleElement->appendChild(document()->createEditingTextNode(""), ec); - ASSERT(ec == 0); + ASSERT(!ec); if (elem->renderer() && elem->renderer()->canHaveChildren()) { elem->appendChild(styleElement, ec); @@ -988,13 +985,12 @@ PassRefPtr<CSSComputedStyleDeclaration> Frame::selectionComputedStyle(Node*& nod Node *parent = elem->parent(); Node *next = elem->nextSibling(); - if (next) { + if (next) parent->insertBefore(styleElement, next, ec); - } else { + else parent->appendChild(styleElement, ec); - } } - ASSERT(ec == 0); + ASSERT(!ec); nodeToRemove = styleElement.get(); } @@ -1044,18 +1040,16 @@ void Frame::applyEditingStyleToBodyElement() const { RefPtr<NodeList> list = m_doc->getElementsByTagName("body"); unsigned len = list->length(); - for (unsigned i = 0; i < len; i++) { - applyEditingStyleToElement(static_cast<Element*>(list->item(i))); - } + for (unsigned i = 0; i < len; i++) + applyEditingStyleToElement(static_cast<Element*>(list->item(i))); } void Frame::removeEditingStyleFromBodyElement() const { RefPtr<NodeList> list = m_doc->getElementsByTagName("body"); unsigned len = list->length(); - for (unsigned i = 0; i < len; i++) { - removeEditingStyleFromElement(static_cast<Element*>(list->item(i))); - } + for (unsigned i = 0; i < len; i++) + removeEditingStyleFromElement(static_cast<Element*>(list->item(i))); } void Frame::applyEditingStyleToElement(Element* element) const @@ -1068,11 +1062,11 @@ void Frame::applyEditingStyleToElement(Element* element) const ExceptionCode ec = 0; style->setProperty(CSSPropertyWordWrap, "break-word", false, ec); - ASSERT(ec == 0); + ASSERT(!ec); style->setProperty(CSSPropertyWebkitNbspMode, "space", false, ec); - ASSERT(ec == 0); + ASSERT(!ec); style->setProperty(CSSPropertyWebkitLineBreak, "after-white-space", false, ec); - ASSERT(ec == 0); + ASSERT(!ec); } void Frame::removeEditingStyleFromElement(Element*) const @@ -1189,7 +1183,7 @@ FloatRect Frame::selectionBounds(bool clipToVisibleContent) const FrameView* view = m_view.get(); if (!root || !view) return IntRect(); - + IntRect selectionRect = root->selectionBounds(clipToVisibleContent); return clipToVisibleContent ? intersection(selectionRect, view->visibleContentRect()) : selectionRect; } @@ -1240,7 +1234,7 @@ HTMLFormElement *Frame::currentForm() const Node *start = m_doc ? m_doc->focusedNode() : 0; if (!start) start = selection()->start().node(); - + // try walking up the node tree to find a form element Node *n; for (n = start; n; n = n->parentNode()) { @@ -1249,7 +1243,7 @@ HTMLFormElement *Frame::currentForm() const else if (n->isHTMLElement() && static_cast<Element*>(n)->isFormControlElement()) return static_cast<HTMLFormControlElement*>(n)->form(); } - + // try walking forward in the node tree to find a form element return start ? scanForForm(start) : 0; } @@ -1259,21 +1253,21 @@ void Frame::revealSelection(const ScrollAlignment& alignment, bool revealExtent) IntRect rect; switch (selection()->selectionType()) { - case VisibleSelection::NoSelection: - return; - case VisibleSelection::CaretSelection: - rect = selection()->absoluteCaretBounds(); - break; - case VisibleSelection::RangeSelection: - rect = revealExtent ? VisiblePosition(selection()->extent()).absoluteCaretBounds() : enclosingIntRect(selectionBounds(false)); - break; + case VisibleSelection::NoSelection: + return; + case VisibleSelection::CaretSelection: + rect = selection()->absoluteCaretBounds(); + break; + case VisibleSelection::RangeSelection: + rect = revealExtent ? VisiblePosition(selection()->extent()).absoluteCaretBounds() : enclosingIntRect(selectionBounds(false)); + break; } Position start = selection()->start(); ASSERT(start.node()); if (start.node() && start.node()->renderer()) { // FIXME: This code only handles scrolling the startContainer's layer, but - // the selection rect could intersect more than just that. + // the selection rect could intersect more than just that. // See <rdar://problem/4799899>. if (RenderLayer* layer = start.node()->renderer()->enclosingLayer()) layer->scrollRectToVisible(rect, false, alignment, alignment); @@ -1313,46 +1307,46 @@ void Frame::clearTimers() RenderStyle *Frame::styleForSelectionStart(Node *&nodeToRemove) const { nodeToRemove = 0; - + if (selection()->isNone()) return 0; - + Position pos = selection()->selection().visibleStart().deepEquivalent(); if (!pos.isCandidate()) return 0; Node *node = pos.node(); if (!node) return 0; - + if (!m_typingStyle) return node->renderer()->style(); - + RefPtr<Element> styleElement = document()->createElement(spanTag, false); - + ExceptionCode ec = 0; String styleText = m_typingStyle->cssText() + " display: inline"; styleElement->setAttribute(styleAttr, styleText.impl(), ec); - ASSERT(ec == 0); - + ASSERT(!ec); + styleElement->appendChild(document()->createEditingTextNode(""), ec); - ASSERT(ec == 0); - + ASSERT(!ec); + node->parentNode()->appendChild(styleElement, ec); - ASSERT(ec == 0); - - nodeToRemove = styleElement.get(); + ASSERT(!ec); + + nodeToRemove = styleElement.get(); return styleElement->renderer() ? styleElement->renderer()->style() : 0; } void Frame::setSelectionFromNone() { - // Put a caret inside the body if the entire frame is editable (either the + // Put a caret inside the body if the entire frame is editable (either the // entire WebView is editable or designMode is on for this document). Document *doc = document(); bool caretBrowsing = settings() && settings()->caretBrowsingEnabled(); if (!selection()->isNone() || !(isContentEditable() || caretBrowsing)) return; - + Node* node = doc->documentElement(); while (node && !node->hasTagName(bodyTag)) node = node->traverseNextNode(); @@ -1375,10 +1369,10 @@ bool Frame::findString(const String& target, bool forward, bool caseFlag, bool w { if (target.isEmpty()) return false; - + if (excludeFromTextSearch()) return false; - + // Start from an edge of the selection, if there's a selection that's not in shadow content. Which edge // is used depends on whether we're searching forward or backward, and whether startInSelection is set. RefPtr<Range> searchRange(rangeOfContents(document())); @@ -1419,7 +1413,7 @@ bool Frame::findString(const String& target, bool forward, bool caseFlag, bool w resultRange = findPlainText(searchRange.get(), target, forward, caseFlag); } - + ExceptionCode exception = 0; // If nothing was found in the shadow tree, search in main content following the shadow tree. @@ -1432,7 +1426,7 @@ bool Frame::findString(const String& target, bool forward, bool caseFlag, bool w resultRange = findPlainText(searchRange.get(), target, forward, caseFlag); } - + if (!editor()->insideVisibleArea(resultRange.get())) { resultRange = editor()->nextVisibleRange(resultRange.get(), target, forward, caseFlag, wrapFlag); if (!resultRange) @@ -1461,9 +1455,9 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig { if (target.isEmpty()) return 0; - + RefPtr<Range> searchRange(rangeOfContents(document())); - + ExceptionCode exception = 0; unsigned matchCount = 0; do { @@ -1476,7 +1470,7 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig searchRange->setStartAfter(resultRange->startContainer()->shadowAncestorNode(), exception); continue; } - + // A non-collapsed result range can in some funky whitespace cases still not // advance the range's start position (4509328). Break to avoid infinite loop. VisiblePosition newStart = endVisiblePosition(resultRange.get(), DOWNSTREAM); @@ -1488,18 +1482,18 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig ++matchCount; document()->addMarker(resultRange.get(), DocumentMarker::TextMatch); } - + // Stop looking if we hit the specified limit. A limit of 0 means no limit. if (limit > 0 && matchCount >= limit) break; - + setStart(searchRange.get(), newStart); Node* shadowTreeRoot = searchRange->shadowTreeRootNode(); if (searchRange->collapsed(exception) && shadowTreeRoot) searchRange->setEnd(shadowTreeRoot, shadowTreeRoot->childNodeCount(), exception); } while (true); - - // Do a "fake" paint in order to execute the code that computes the rendered rect for + + // Do a "fake" paint in order to execute the code that computes the rendered rect for // each text match. Document* doc = document(); if (m_view && contentRenderer()) { @@ -1511,7 +1505,7 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig m_view->paintContents(&context, visibleRect); } } - + return matchCount; } @@ -1524,7 +1518,7 @@ void Frame::setMarkedTextMatchesAreHighlighted(bool flag) { if (flag == m_highlightTextMatches) return; - + m_highlightTextMatches = flag; document()->repaintMarkers(DocumentMarker::TextMatch); } @@ -1553,7 +1547,7 @@ DOMWindow* Frame::domWindow() const void Frame::clearFormerDOMWindow(DOMWindow* window) { - m_liveFormerWindows.remove(window); + m_liveFormerWindows.remove(window); } Page* Frame::page() const @@ -1619,7 +1613,7 @@ void Frame::unfocusWindow() { if (!page()) return; - + // If we're a top level window, deactivate the window. if (!tree()->parent()) page()->chrome()->unfocus(); @@ -1680,14 +1674,13 @@ void Frame::respondToChangedSelection(const VisibleSelection& oldSelection, bool // oldSelection may no longer be in the document. if (closeTyping && oldSelection.isContentEditable() && oldSelection.start().node() && oldSelection.start().node()->inDocument()) { VisiblePosition oldStart(oldSelection.visibleStart()); - VisibleSelection oldAdjacentWords = VisibleSelection(startOfWord(oldStart, LeftWordIfOnBoundary), endOfWord(oldStart, RightWordIfOnBoundary)); + VisibleSelection oldAdjacentWords = VisibleSelection(startOfWord(oldStart, LeftWordIfOnBoundary), endOfWord(oldStart, RightWordIfOnBoundary)); if (oldAdjacentWords != newAdjacentWords) { if (isContinuousGrammarCheckingEnabled) { VisibleSelection oldSelectedSentence = VisibleSelection(startOfSentence(oldStart), endOfSentence(oldStart)); editor()->markMisspellingsAndBadGrammar(oldAdjacentWords, oldSelectedSentence != newSelectedSentence, oldSelectedSentence); - } else { + } else editor()->markMisspellingsAndBadGrammar(oldAdjacentWords, false, oldAdjacentWords); - } } } @@ -1722,15 +1715,15 @@ VisiblePosition Frame::visiblePositionForPoint(const IntPoint& framePoint) visiblePos = VisiblePosition(Position(node, 0)); return visiblePos; } - + Document* Frame::documentAtPoint(const IntPoint& point) -{ - if (!view()) +{ + if (!view()) return 0; - + IntPoint pt = view()->windowToContents(point); HitTestResult result = HitTestResult(pt); - + if (contentRenderer()) result = eventHandler()->hitTestResultAtPoint(pt, false); return result.innerNode() ? result.innerNode()->document() : 0; diff --git a/src/3rdparty/webkit/WebCore/page/Frame.h b/src/3rdparty/webkit/WebCore/page/Frame.h index 0a44a6d155..652269a18c 100644 --- a/src/3rdparty/webkit/WebCore/page/Frame.h +++ b/src/3rdparty/webkit/WebCore/page/Frame.h @@ -37,8 +37,8 @@ #include "FrameLoader.h" #include "FrameTree.h" #include "Range.h" -#include "ScrollBehavior.h" #include "ScriptController.h" +#include "ScrollBehavior.h" #include "SelectionController.h" #include "TextGranularity.h" @@ -62,315 +62,315 @@ typedef struct HBITMAP__* HBITMAP; namespace WebCore { -class CSSMutableStyleDeclaration; -class Editor; -class EventHandler; -class FrameLoader; -class FrameLoaderClient; -class FrameTree; -class FrameView; -class HTMLFrameOwnerElement; -class HTMLTableCellElement; -class RegularExpression; -class RenderPart; -class ScriptController; -class SelectionController; -class Settings; -class VisibleSelection; -class Widget; + class CSSMutableStyleDeclaration; + class Editor; + class EventHandler; + class FrameLoader; + class FrameLoaderClient; + class FrameTree; + class FrameView; + class HTMLFrameOwnerElement; + class HTMLTableCellElement; + class RegularExpression; + class RenderPart; + class ScriptController; + class SelectionController; + class Settings; + class VisibleSelection; + class Widget; #if FRAME_LOADS_USER_STYLESHEET class UserStyleSheetLoader; #endif -template <typename T> class Timer; + template <typename T> class Timer; -class Frame : public RefCounted<Frame> { -public: - static PassRefPtr<Frame> create(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* client) - { - return adoptRef(new Frame(page, ownerElement, client)); - } - void setView(PassRefPtr<FrameView>); - ~Frame(); - - void init(); + class Frame : public RefCounted<Frame> { + public: + static PassRefPtr<Frame> create(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* client) + { + return adoptRef(new Frame(page, ownerElement, client)); + } + void setView(PassRefPtr<FrameView>); + ~Frame(); - Page* page() const; - HTMLFrameOwnerElement* ownerElement() const; + void init(); - void pageDestroyed(); - void disconnectOwnerElement(); + Page* page() const; + HTMLFrameOwnerElement* ownerElement() const; - Document* document() const; - FrameView* view() const; + void pageDestroyed(); + void disconnectOwnerElement(); - void setDOMWindow(DOMWindow*); - DOMWindow* domWindow() const; - void clearFormerDOMWindow(DOMWindow*); + Document* document() const; + FrameView* view() const; - Editor* editor() const; - EventHandler* eventHandler() const; - FrameLoader* loader() const; - SelectionController* selection() const; - FrameTree* tree() const; - AnimationController* animation() const; - ScriptController* script(); + void setDOMWindow(DOMWindow*); + DOMWindow* domWindow() const; + void clearFormerDOMWindow(DOMWindow*); - RenderView* contentRenderer() const; // root renderer for the document contained in this frame - RenderPart* ownerRenderer() const; // renderer for the element that contains this frame - - bool isDisconnected() const; - void setIsDisconnected(bool); - bool excludeFromTextSearch() const; - void setExcludeFromTextSearch(bool); + Editor* editor() const; + EventHandler* eventHandler() const; + FrameLoader* loader() const; + SelectionController* selection() const; + FrameTree* tree() const; + AnimationController* animation() const; + ScriptController* script(); - void createView(const IntSize&, const Color&, bool, const IntSize &, bool, - ScrollbarMode = ScrollbarAuto, ScrollbarMode = ScrollbarAuto); + RenderView* contentRenderer() const; // root renderer for the document contained in this frame + RenderPart* ownerRenderer() const; // renderer for the element that contains this frame + bool isDisconnected() const; + void setIsDisconnected(bool); + bool excludeFromTextSearch() const; + void setExcludeFromTextSearch(bool); -private: - Frame(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*); - -// === undecided, would like to consider moving to another class + void createView(const IntSize&, const Color&, bool, const IntSize &, bool, + ScrollbarMode = ScrollbarAuto, ScrollbarMode = ScrollbarAuto); -public: - static Frame* frameForWidget(const Widget*); - Settings* settings() const; // can be NULL + private: + Frame(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*); -#if FRAME_LOADS_USER_STYLESHEET - void setUserStyleSheetLocation(const KURL&); - void setUserStyleSheet(const String& styleSheetData); -#endif + // === undecided, would like to consider moving to another class - void setPrinting(bool printing, float minPageWidth, float maxPageWidth, bool adjustViewSize); + public: + static Frame* frameForWidget(const Widget*); - bool inViewSourceMode() const; - void setInViewSourceMode(bool = true); + Settings* settings() const; // can be NULL - void keepAlive(); // Used to keep the frame alive when running a script that might destroy it. -#ifndef NDEBUG - static void cancelAllKeepAlive(); -#endif + #if FRAME_LOADS_USER_STYLESHEET + void setUserStyleSheetLocation(const KURL&); + void setUserStyleSheet(const String& styleSheetData); + #endif - void setDocument(PassRefPtr<Document>); + void setPrinting(bool printing, float minPageWidth, float maxPageWidth, bool adjustViewSize); - void clearTimers(); - static void clearTimers(FrameView*, Document*); + bool inViewSourceMode() const; + void setInViewSourceMode(bool = true); - void setNeedsReapplyStyles(); - bool needsReapplyStyles() const; - void reapplyStyles(); + void keepAlive(); // Used to keep the frame alive when running a script that might destroy it. + #ifndef NDEBUG + static void cancelAllKeepAlive(); + #endif - String documentTypeString() const; + void setDocument(PassRefPtr<Document>); - // This method -- and the corresponding list of former DOM windows -- - // should move onto ScriptController - void clearDOMWindow(); + void clearTimers(); + static void clearTimers(FrameView*, Document*); - String displayStringModifiedByEncoding(const String& str) const - { - return document() ? document()->displayStringModifiedByEncoding(str) : str; - } + void setNeedsReapplyStyles(); + bool needsReapplyStyles() const; + void reapplyStyles(); -private: - void lifeSupportTimerFired(Timer<Frame>*); + String documentTypeString() const; -// === to be moved into FrameView + // This method -- and the corresponding list of former DOM windows -- + // should move onto ScriptController + void clearDOMWindow(); -public: - void setZoomFactor(float scale, bool isTextOnly); - float zoomFactor() const; - bool isZoomFactorTextOnly() const; - bool shouldApplyTextZoom() const; - bool shouldApplyPageZoom() const; - float pageZoomFactor() const { return shouldApplyPageZoom() ? zoomFactor() : 1.0f; } - float textZoomFactor() const { return shouldApplyTextZoom() ? zoomFactor() : 1.0f; } + String displayStringModifiedByEncoding(const String& str) const + { + return document() ? document()->displayStringModifiedByEncoding(str) : str; + } -// === to be moved into Chrome + private: + void lifeSupportTimerFired(Timer<Frame>*); -public: - void focusWindow(); - void unfocusWindow(); - bool shouldClose(RegisteredEventListenerVector* alternateEventListeners = 0); - void scheduleClose(); + // === to be moved into FrameView - void setJSStatusBarText(const String&); - void setJSDefaultStatusBarText(const String&); - String jsStatusBarText() const; - String jsDefaultStatusBarText() const; + public: + void setZoomFactor(float scale, bool isTextOnly); + float zoomFactor() const; + bool isZoomFactorTextOnly() const; + bool shouldApplyTextZoom() const; + bool shouldApplyPageZoom() const; + float pageZoomFactor() const { return shouldApplyPageZoom() ? zoomFactor() : 1.0f; } + float textZoomFactor() const { return shouldApplyTextZoom() ? zoomFactor() : 1.0f; } -// === to be moved into Editor + // === to be moved into Chrome -public: - String selectedText() const; - bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, bool startInSelection); + public: + void focusWindow(); + void unfocusWindow(); + bool shouldClose(RegisteredEventListenerVector* alternateEventListeners = 0); + void scheduleClose(); - const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. - void setMark(const VisibleSelection&); + void setJSStatusBarText(const String&); + void setJSDefaultStatusBarText(const String&); + String jsStatusBarText() const; + String jsDefaultStatusBarText() const; - void computeAndSetTypingStyle(CSSStyleDeclaration* , EditAction = EditActionUnspecified); - String selectionStartStylePropertyValue(int stylePropertyID) const; - void applyEditingStyleToBodyElement() const; - void removeEditingStyleFromBodyElement() const; - void applyEditingStyleToElement(Element*) const; - void removeEditingStyleFromElement(Element*) const; + // === to be moved into Editor - IntRect firstRectForRange(Range*) const; - - void respondToChangedSelection(const VisibleSelection& oldSelection, bool closeTyping); - bool shouldChangeSelection(const VisibleSelection& oldSelection, const VisibleSelection& newSelection, EAffinity, bool stillSelecting) const; + public: + String selectedText() const; + bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, bool startInSelection); - RenderStyle* styleForSelectionStart(Node*& nodeToRemove) const; + const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. + void setMark(const VisibleSelection&); - unsigned markAllMatchesForText(const String&, bool caseFlag, unsigned limit); - bool markedTextMatchesAreHighlighted() const; - void setMarkedTextMatchesAreHighlighted(bool flag); + void computeAndSetTypingStyle(CSSStyleDeclaration* , EditAction = EditActionUnspecified); + String selectionStartStylePropertyValue(int stylePropertyID) const; + void applyEditingStyleToBodyElement() const; + void removeEditingStyleFromBodyElement() const; + void applyEditingStyleToElement(Element*) const; + void removeEditingStyleFromElement(Element*) const; - PassRefPtr<CSSComputedStyleDeclaration> selectionComputedStyle(Node*& nodeToRemove) const; + IntRect firstRectForRange(Range*) const; - void textFieldDidBeginEditing(Element*); - void textFieldDidEndEditing(Element*); - void textDidChangeInTextField(Element*); - bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*); - void textWillBeDeletedInTextField(Element* input); - void textDidChangeInTextArea(Element*); + void respondToChangedSelection(const VisibleSelection& oldSelection, bool closeTyping); + bool shouldChangeSelection(const VisibleSelection& oldSelection, const VisibleSelection& newSelection, EAffinity, bool stillSelecting) const; - DragImageRef dragImageForSelection(); - -// === to be moved into SelectionController + RenderStyle* styleForSelectionStart(Node*& nodeToRemove) const; -public: - TextGranularity selectionGranularity() const; - void setSelectionGranularity(TextGranularity); + unsigned markAllMatchesForText(const String&, bool caseFlag, unsigned limit); + bool markedTextMatchesAreHighlighted() const; + void setMarkedTextMatchesAreHighlighted(bool flag); - bool shouldChangeSelection(const VisibleSelection&) const; - bool shouldDeleteSelection(const VisibleSelection&) const; - void clearCaretRectIfNeeded(); - void setFocusedNodeIfNeeded(); - void selectionLayoutChanged(); - void notifyRendererOfSelectionChange(bool userTriggered); + PassRefPtr<CSSComputedStyleDeclaration> selectionComputedStyle(Node*& nodeToRemove) const; - void invalidateSelection(); + void textFieldDidBeginEditing(Element*); + void textFieldDidEndEditing(Element*); + void textDidChangeInTextField(Element*); + bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*); + void textWillBeDeletedInTextField(Element* input); + void textDidChangeInTextArea(Element*); - void setCaretVisible(bool = true); - void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const; - void paintDragCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const; + DragImageRef dragImageForSelection(); - bool isContentEditable() const; // if true, everything in frame is editable + // === to be moved into SelectionController - void updateSecureKeyboardEntryIfActive(); + public: + TextGranularity selectionGranularity() const; + void setSelectionGranularity(TextGranularity); - CSSMutableStyleDeclaration* typingStyle() const; - void setTypingStyle(CSSMutableStyleDeclaration*); - void clearTypingStyle(); + bool shouldChangeSelection(const VisibleSelection&) const; + bool shouldDeleteSelection(const VisibleSelection&) const; + void clearCaretRectIfNeeded(); + void setFocusedNodeIfNeeded(); + void selectionLayoutChanged(); + void notifyRendererOfSelectionChange(bool userTriggered); - FloatRect selectionBounds(bool clipToVisibleContent = true) const; - void selectionTextRects(Vector<FloatRect>&, bool clipToVisibleContent = true) const; + void invalidateSelection(); - HTMLFormElement* currentForm() const; + void setCaretVisible(bool = true); + void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const; + void paintDragCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const; - void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, bool revealExtent = false); - void setSelectionFromNone(); + bool isContentEditable() const; // if true, everything in frame is editable - void setUseSecureKeyboardEntry(bool); + void updateSecureKeyboardEntryIfActive(); -private: - void caretBlinkTimerFired(Timer<Frame>*); + CSSMutableStyleDeclaration* typingStyle() const; + void setTypingStyle(CSSMutableStyleDeclaration*); + void clearTypingStyle(); -public: - SelectionController* dragCaretController() const; + FloatRect selectionBounds(bool clipToVisibleContent = true) const; + void selectionTextRects(Vector<FloatRect>&, bool clipToVisibleContent = true) const; - String searchForLabelsAboveCell(RegularExpression*, HTMLTableCellElement*); - String searchForLabelsBeforeElement(const Vector<String>& labels, Element*); - String matchLabelsAgainstElement(const Vector<String>& labels, Element*); - - VisiblePosition visiblePositionForPoint(const IntPoint& framePoint); - Document* documentAtPoint(const IntPoint& windowPoint); + HTMLFormElement* currentForm() const; -#if PLATFORM(MAC) + void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, bool revealExtent = false); + void setSelectionFromNone(); -// === undecided, would like to consider moving to another class + void setUseSecureKeyboardEntry(bool); -public: - NSString* searchForNSLabelsAboveCell(RegularExpression*, HTMLTableCellElement*); - NSString* searchForLabelsBeforeElement(NSArray* labels, Element*); - NSString* matchLabelsAgainstElement(NSArray* labels, Element*); + private: + void caretBlinkTimerFired(Timer<Frame>*); -#if ENABLE(DASHBOARD_SUPPORT) - NSMutableDictionary* dashboardRegionsDictionary(); -#endif + public: + SelectionController* dragCaretController() const; - NSImage* selectionImage(bool forceBlackText = false) const; - NSImage* snapshotDragImage(Node*, NSRect* imageRect, NSRect* elementRect) const; - NSImage* nodeImage(Node*) const; + String searchForLabelsAboveCell(RegularExpression*, HTMLTableCellElement*); + String searchForLabelsBeforeElement(const Vector<String>& labels, Element*); + String matchLabelsAgainstElement(const Vector<String>& labels, Element*); -private: - NSImage* imageFromRect(NSRect) const; + VisiblePosition visiblePositionForPoint(const IntPoint& framePoint); + Document* documentAtPoint(const IntPoint& windowPoint); -// === to be moved into Editor + #if PLATFORM(MAC) -public: - NSDictionary* fontAttributesForSelectionStart() const; - NSWritingDirection baseWritingDirectionForSelectionStart() const; + // === undecided, would like to consider moving to another class -#endif + public: + NSString* searchForNSLabelsAboveCell(RegularExpression*, HTMLTableCellElement*); + NSString* searchForLabelsBeforeElement(NSArray* labels, Element*); + NSString* matchLabelsAgainstElement(NSArray* labels, Element*); -#if PLATFORM(WIN) + #if ENABLE(DASHBOARD_SUPPORT) + NSMutableDictionary* dashboardRegionsDictionary(); + #endif -public: - // FIXME - We should have a single version of nodeImage instead of using platform types. - HBITMAP nodeImage(Node*) const; + NSImage* selectionImage(bool forceBlackText = false) const; + NSImage* snapshotDragImage(Node*, NSRect* imageRect, NSRect* elementRect) const; + NSImage* nodeImage(Node*) const; -#endif + private: + NSImage* imageFromRect(NSRect) const; -private: - Page* m_page; - mutable FrameTree m_treeNode; - mutable FrameLoader m_loader; + // === to be moved into Editor - mutable RefPtr<DOMWindow> m_domWindow; - HashSet<DOMWindow*> m_liveFormerWindows; + public: + NSDictionary* fontAttributesForSelectionStart() const; + NSWritingDirection baseWritingDirectionForSelectionStart() const; - HTMLFrameOwnerElement* m_ownerElement; - RefPtr<FrameView> m_view; - RefPtr<Document> m_doc; + #endif - ScriptController m_script; + #if PLATFORM(WIN) - String m_kjsStatusBarText; - String m_kjsDefaultStatusBarText; + public: + // FIXME - We should have a single version of nodeImage instead of using platform types. + HBITMAP nodeImage(Node*) const; - float m_zoomFactor; + #endif - TextGranularity m_selectionGranularity; + private: + Page* m_page; + mutable FrameTree m_treeNode; + mutable FrameLoader m_loader; - mutable SelectionController m_selectionController; - mutable VisibleSelection m_mark; - Timer<Frame> m_caretBlinkTimer; - mutable Editor m_editor; - mutable EventHandler m_eventHandler; - mutable AnimationController m_animationController; + mutable RefPtr<DOMWindow> m_domWindow; + HashSet<DOMWindow*> m_liveFormerWindows; - RefPtr<CSSMutableStyleDeclaration> m_typingStyle; + HTMLFrameOwnerElement* m_ownerElement; + RefPtr<FrameView> m_view; + RefPtr<Document> m_doc; - Timer<Frame> m_lifeSupportTimer; + ScriptController m_script; - bool m_caretVisible; - bool m_caretPaint; - - bool m_highlightTextMatches; - bool m_inViewSourceMode; - bool m_needsReapplyStyles; - bool m_isDisconnected; - bool m_excludeFromTextSearch; + String m_kjsStatusBarText; + String m_kjsDefaultStatusBarText; -#if FRAME_LOADS_USER_STYLESHEET - UserStyleSheetLoader* m_userStyleSheetLoader; -#endif + float m_zoomFactor; + + TextGranularity m_selectionGranularity; + + mutable SelectionController m_selectionController; + mutable VisibleSelection m_mark; + Timer<Frame> m_caretBlinkTimer; + mutable Editor m_editor; + mutable EventHandler m_eventHandler; + mutable AnimationController m_animationController; + + RefPtr<CSSMutableStyleDeclaration> m_typingStyle; + + Timer<Frame> m_lifeSupportTimer; + + bool m_caretVisible; + bool m_caretPaint; + + bool m_highlightTextMatches; + bool m_inViewSourceMode; + bool m_needsReapplyStyles; + bool m_isDisconnected; + bool m_excludeFromTextSearch; + + #if FRAME_LOADS_USER_STYLESHEET + UserStyleSheetLoader* m_userStyleSheetLoader; + #endif -}; + }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/page/FrameTree.h b/src/3rdparty/webkit/WebCore/page/FrameTree.h index d4c8c43c0d..9ab999fd77 100644 --- a/src/3rdparty/webkit/WebCore/page/FrameTree.h +++ b/src/3rdparty/webkit/WebCore/page/FrameTree.h @@ -26,7 +26,7 @@ namespace WebCore { class Frame; - class FrameTree : Noncopyable { + class FrameTree : public Noncopyable { public: FrameTree(Frame* thisFrame, Frame* parentFrame) : m_thisFrame(thisFrame) diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.cpp b/src/3rdparty/webkit/WebCore/page/FrameView.cpp index d57e845eae..9160c89fd0 100644 --- a/src/3rdparty/webkit/WebCore/page/FrameView.cpp +++ b/src/3rdparty/webkit/WebCore/page/FrameView.cpp @@ -825,6 +825,19 @@ void FrameView::repaintContentRectangle(const IntRect& r, bool immediate) ScrollView::repaintContentRectangle(r, immediate); } +void FrameView::visibleContentsResized() +{ + // We check to make sure the view is attached to a frame() as this method can + // be triggered before the view is attached by Frame::createView(...) setting + // various values such as setScrollBarModes(...) for example. An ASSERT is + // triggered when a view is layout before being attached to a frame(). + if (!frame()->view()) + return; + + if (needsLayout()) + layout(); +} + void FrameView::beginDeferredRepaints() { Page* page = m_frame->page(); diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.h b/src/3rdparty/webkit/WebCore/page/FrameView.h index 8eee5b8211..83e2c1ebce 100644 --- a/src/3rdparty/webkit/WebCore/page/FrameView.h +++ b/src/3rdparty/webkit/WebCore/page/FrameView.h @@ -207,11 +207,7 @@ private: virtual void repaintContentRectangle(const IntRect&, bool immediate); virtual void contentsResized() { setNeedsLayout(); } - virtual void visibleContentsResized() - { - if (needsLayout()) - layout(); - } + virtual void visibleContentsResized(); // Override ScrollView methods to do point conversion via renderers, in order to // take transforms into account. diff --git a/src/3rdparty/webkit/WebCore/page/NavigatorBase.cpp b/src/3rdparty/webkit/WebCore/page/NavigatorBase.cpp index 5138b0fb5d..5b0c5d42e0 100644 --- a/src/3rdparty/webkit/WebCore/page/NavigatorBase.cpp +++ b/src/3rdparty/webkit/WebCore/page/NavigatorBase.cpp @@ -29,6 +29,10 @@ #include "NetworkStateNotifier.h" #include "PlatformString.h" +#if PLATFORM(LINUX) +#include "sys/utsname.h" +#include <wtf/StdLibExtras.h> +#endif #ifndef WEBCORE_NAVIGATOR_PLATFORM #if PLATFORM(MAC) && (PLATFORM(PPC) || PLATFORM(PPC64)) @@ -37,6 +41,8 @@ #define WEBCORE_NAVIGATOR_PLATFORM "MacIntel" #elif PLATFORM(WIN_OS) #define WEBCORE_NAVIGATOR_PLATFORM "Win32" +#elif PLATFORM(SYMBIAN) +#define WEBCORE_NAVIGATOR_PLATFORM "Symbian" #else #define WEBCORE_NAVIGATOR_PLATFORM "" #endif @@ -79,7 +85,15 @@ String NavigatorBase::appVersion() const String NavigatorBase::platform() const { +#if PLATFORM(LINUX) + if (String("") != WEBCORE_NAVIGATOR_PLATFORM) + return WEBCORE_NAVIGATOR_PLATFORM; + struct utsname osname; + DEFINE_STATIC_LOCAL(String, platformName, (uname(&osname) >= 0 ? String(osname.sysname) + String(" ") + String(osname.machine) : "")); + return platformName; +#else return WEBCORE_NAVIGATOR_PLATFORM; +#endif } String NavigatorBase::appCodeName() const diff --git a/src/3rdparty/webkit/WebCore/page/Page.cpp b/src/3rdparty/webkit/WebCore/page/Page.cpp index 6494707803..32c60c6a3b 100644 --- a/src/3rdparty/webkit/WebCore/page/Page.cpp +++ b/src/3rdparty/webkit/WebCore/page/Page.cpp @@ -100,7 +100,7 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi , m_dragController(new DragController(this, dragClient)) , m_focusController(new FocusController(this)) , m_contextMenuController(new ContextMenuController(this, contextMenuClient)) - , m_inspectorController(InspectorController::create(this, inspectorClient)) + , m_inspectorController(new InspectorController(this, inspectorClient)) , m_settings(new Settings(this)) , m_progress(new ProgressTracker) , m_backForwardList(BackForwardList::create(this)) diff --git a/src/3rdparty/webkit/WebCore/page/Page.h b/src/3rdparty/webkit/WebCore/page/Page.h index b5d6f4bee4..cc3d25d174 100644 --- a/src/3rdparty/webkit/WebCore/page/Page.h +++ b/src/3rdparty/webkit/WebCore/page/Page.h @@ -73,7 +73,7 @@ namespace WebCore { enum FindDirection { FindDirectionForward, FindDirectionBackward }; - class Page : Noncopyable { + class Page : public Noncopyable { public: static void setNeedsReapplyStyles(); @@ -209,7 +209,7 @@ namespace WebCore { OwnPtr<DragController> m_dragController; OwnPtr<FocusController> m_focusController; OwnPtr<ContextMenuController> m_contextMenuController; - RefPtr<InspectorController> m_inspectorController; + OwnPtr<InspectorController> m_inspectorController; OwnPtr<Settings> m_settings; OwnPtr<ProgressTracker> m_progress; diff --git a/src/3rdparty/webkit/WebCore/page/PageGroup.h b/src/3rdparty/webkit/WebCore/page/PageGroup.h index cbde1c323d..f92c2e6141 100644 --- a/src/3rdparty/webkit/WebCore/page/PageGroup.h +++ b/src/3rdparty/webkit/WebCore/page/PageGroup.h @@ -37,7 +37,7 @@ namespace WebCore { class Page; class StorageNamespace; - class PageGroup : Noncopyable { + class PageGroup : public Noncopyable { public: PageGroup(const String& name); PageGroup(Page*); diff --git a/src/3rdparty/webkit/WebCore/page/PageGroupLoadDeferrer.h b/src/3rdparty/webkit/WebCore/page/PageGroupLoadDeferrer.h index 1bdb45c8e7..d443ebdd5f 100644 --- a/src/3rdparty/webkit/WebCore/page/PageGroupLoadDeferrer.h +++ b/src/3rdparty/webkit/WebCore/page/PageGroupLoadDeferrer.h @@ -28,7 +28,7 @@ namespace WebCore { class Frame; class Page; - class PageGroupLoadDeferrer : Noncopyable { + class PageGroupLoadDeferrer : public Noncopyable { public: PageGroupLoadDeferrer(Page*, bool deferSelf); ~PageGroupLoadDeferrer(); diff --git a/src/3rdparty/webkit/WebCore/page/Settings.cpp b/src/3rdparty/webkit/WebCore/page/Settings.cpp index 6f8b7c7f6c..133dd9ac51 100644 --- a/src/3rdparty/webkit/WebCore/page/Settings.cpp +++ b/src/3rdparty/webkit/WebCore/page/Settings.cpp @@ -64,6 +64,7 @@ Settings::Settings(Page* page) , m_arePluginsEnabled(false) , m_databasesEnabled(false) , m_localStorageEnabled(false) + , m_sessionStorageEnabled(true) , m_isJavaScriptEnabled(false) , m_isWebSecurityEnabled(true) , m_allowUniversalAccessFromFileURLs(true) @@ -244,6 +245,11 @@ void Settings::setLocalStorageEnabled(bool localStorageEnabled) m_localStorageEnabled = localStorageEnabled; } +void Settings::setSessionStorageEnabled(bool sessionStorageEnabled) +{ + m_sessionStorageEnabled = sessionStorageEnabled; +} + void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled) { m_privateBrowsingEnabled = privateBrowsingEnabled; diff --git a/src/3rdparty/webkit/WebCore/page/Settings.h b/src/3rdparty/webkit/WebCore/page/Settings.h index 962af1845d..544d0d5584 100644 --- a/src/3rdparty/webkit/WebCore/page/Settings.h +++ b/src/3rdparty/webkit/WebCore/page/Settings.h @@ -125,6 +125,9 @@ namespace WebCore { void setLocalStorageEnabled(bool); bool localStorageEnabled() const { return m_localStorageEnabled; } + void setSessionStorageEnabled(bool); + bool sessionStorageEnabled() const { return m_sessionStorageEnabled; } + void setPrivateBrowsingEnabled(bool); bool privateBrowsingEnabled() const { return m_privateBrowsingEnabled; } @@ -277,6 +280,7 @@ namespace WebCore { bool m_arePluginsEnabled : 1; bool m_databasesEnabled : 1; bool m_localStorageEnabled : 1; + bool m_sessionStorageEnabled : 1; bool m_isJavaScriptEnabled : 1; bool m_isWebSecurityEnabled : 1; bool m_allowUniversalAccessFromFileURLs: 1; diff --git a/src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp b/src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp index 5dfc963133..70b691b0d1 100644 --- a/src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp +++ b/src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp @@ -46,9 +46,14 @@ using namespace WTF; namespace WebCore { -static bool isNonNullControlCharacter(UChar c) +static bool isNonCanonicalCharacter(UChar c) { - return (c > '\0' && c < ' ') || c == 127; + // Note, we don't remove backslashes like PHP stripslashes(), which among other things converts "\\0" to the \0 character. + // Instead, we remove backslashes and zeros (since the string "\\0" =(remove backslashes)=> "0"). However, this has the + // adverse effect that we remove any legitimate zeros from a string. + // + // For instance: new String("http://localhost:8000") => new String("http://localhost:8"). + return (c == '\\' || c == '0' || c < ' ' || c == 127); } XSSAuditor::XSSAuditor(Frame* frame) @@ -66,12 +71,12 @@ bool XSSAuditor::isEnabled() const return (settings && settings->xssAuditorEnabled()); } -bool XSSAuditor::canEvaluate(const String& sourceCode) const +bool XSSAuditor::canEvaluate(const String& code) const { if (!isEnabled()) return true; - if (findInRequest(sourceCode, false, true, false)) { + if (findInRequest(code, false)) { DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n")); m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String()); return false; @@ -84,7 +89,7 @@ bool XSSAuditor::canEvaluateJavaScriptURL(const String& code) const if (!isEnabled()) return true; - if (findInRequest(code, false, false, true, true)) { + if (findInRequest(code)) { DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n")); m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String()); return false; @@ -123,7 +128,7 @@ bool XSSAuditor::canLoadObject(const String& url) const if (!isEnabled()) return true; - if (findInRequest(url, false, false)) { + if (findInRequest(url)) { DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request")); m_frame->domWindow()->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, consoleMessage, 1, String()); return false; @@ -145,11 +150,16 @@ bool XSSAuditor::canSetBaseElementURL(const String& url) const return true; } -String XSSAuditor::decodeURL(const String& str, const TextEncoding& encoding, bool allowNullCharacters, - bool allowNonNullControlCharacters, bool decodeHTMLentities, bool leaveUndecodableHTMLEntitiesUntouched) +String XSSAuditor::canonicalize(const String& string) +{ + String result = decodeHTMLEntities(string); + return result.removeCharacters(&isNonCanonicalCharacter); +} + +String XSSAuditor::decodeURL(const String& string, const TextEncoding& encoding, bool decodeHTMLentities) { String result; - String url = str; + String url = string; url.replace('+', ' '); result = decodeURLEscapeSequences(url); @@ -157,20 +167,13 @@ String XSSAuditor::decodeURL(const String& str, const TextEncoding& encoding, bo if (!decodedResult.isEmpty()) result = decodedResult; if (decodeHTMLentities) - result = decodeHTMLEntities(result, leaveUndecodableHTMLEntitiesUntouched); - if (!allowNullCharacters) - result = StringImpl::createStrippingNullCharacters(result.characters(), result.length()); - if (!allowNonNullControlCharacters) { - decodedResult = result.removeCharacters(&isNonNullControlCharacter); - if (!decodedResult.isEmpty()) - result = decodedResult; - } + result = decodeHTMLEntities(result); return result; } -String XSSAuditor::decodeHTMLEntities(const String& str, bool leaveUndecodableHTMLEntitiesUntouched) +String XSSAuditor::decodeHTMLEntities(const String& string, bool leaveUndecodableHTMLEntitiesUntouched) { - SegmentedString source(str); + SegmentedString source(string); SegmentedString sourceShadow; Vector<UChar> result; @@ -193,7 +196,7 @@ String XSSAuditor::decodeHTMLEntities(const String& str, bool leaveUndecodableHT if (entity > 0xFFFF) { result.append(U16_LEAD(entity)); result.append(U16_TRAIL(entity)); - } else if (!leaveUndecodableHTMLEntitiesUntouched || entity != 0xFFFD){ + } else if (entity && (!leaveUndecodableHTMLEntitiesUntouched || entity != 0xFFFD)){ result.append(entity); } else { result.append('&'); @@ -205,22 +208,18 @@ String XSSAuditor::decodeHTMLEntities(const String& str, bool leaveUndecodableHT return String::adopt(result); } -bool XSSAuditor::findInRequest(const String& string, bool matchNullCharacters, bool matchNonNullControlCharacters, - bool decodeHTMLentities, bool leaveUndecodableHTMLEntitiesUntouched) const +bool XSSAuditor::findInRequest(const String& string, bool decodeHTMLentities) const { bool result = false; Frame* parentFrame = m_frame->tree()->parent(); if (parentFrame && m_frame->document()->url() == blankURL()) - result = findInRequest(parentFrame, string, matchNullCharacters, matchNonNullControlCharacters, - decodeHTMLentities, leaveUndecodableHTMLEntitiesUntouched); + result = findInRequest(parentFrame, string, decodeHTMLentities); if (!result) - result = findInRequest(m_frame, string, matchNullCharacters, matchNonNullControlCharacters, - decodeHTMLentities, leaveUndecodableHTMLEntitiesUntouched); + result = findInRequest(m_frame, string, decodeHTMLentities); return result; } -bool XSSAuditor::findInRequest(Frame* frame, const String& string, bool matchNullCharacters, bool matchNonNullControlCharacters, - bool decodeHTMLentities, bool leaveUndecodableHTMLEntitiesUntouched) const +bool XSSAuditor::findInRequest(Frame* frame, const String& string, bool decodeHTMLentities) const { ASSERT(frame->document()); String pageURL = frame->document()->url().string(); @@ -236,11 +235,14 @@ bool XSSAuditor::findInRequest(Frame* frame, const String& string, bool matchNul if (string.isEmpty()) return false; + String canonicalizedString = canonicalize(string); + if (canonicalizedString.isEmpty()) + return false; + if (string.length() < pageURL.length()) { // The string can actually fit inside the pageURL. - String decodedPageURL = decodeURL(pageURL, frame->document()->decoder()->encoding(), matchNullCharacters, - matchNonNullControlCharacters, decodeHTMLentities, leaveUndecodableHTMLEntitiesUntouched); - if (decodedPageURL.find(string, 0, false) != -1) + String decodedPageURL = canonicalize(decodeURL(pageURL, frame->document()->decoder()->encoding(), decodeHTMLentities)); + if (decodedPageURL.find(canonicalizedString, 0, false) != -1) return true; // We've found the smoking gun. } @@ -252,9 +254,8 @@ bool XSSAuditor::findInRequest(Frame* frame, const String& string, bool matchNul // the url-encoded POST data because the length of the url-decoded // code is less than or equal to the length of the url-encoded // string. - String decodedFormData = decodeURL(formData, frame->document()->decoder()->encoding(), matchNullCharacters, - matchNonNullControlCharacters, decodeHTMLentities, leaveUndecodableHTMLEntitiesUntouched); - if (decodedFormData.find(string, 0, false) != -1) + String decodedFormData = canonicalize(decodeURL(formData, frame->document()->decoder()->encoding(), decodeHTMLentities)); + if (decodedFormData.find(canonicalizedString, 0, false) != -1) return true; // We found the string in the POST data. } } diff --git a/src/3rdparty/webkit/WebCore/page/XSSAuditor.h b/src/3rdparty/webkit/WebCore/page/XSSAuditor.h index 6c6a56c2b6..26f10ab76d 100644 --- a/src/3rdparty/webkit/WebCore/page/XSSAuditor.h +++ b/src/3rdparty/webkit/WebCore/page/XSSAuditor.h @@ -72,7 +72,7 @@ namespace WebCore { // Determines whether the script should be allowed or denied execution // based on the content of any user-submitted data. - bool canEvaluate(const String& sourceCode) const; + bool canEvaluate(const String& code) const; // Determines whether the JavaScript URL should be allowed or denied execution // based on the content of any user-submitted data. @@ -99,17 +99,15 @@ namespace WebCore { bool canSetBaseElementURL(const String& url) const; private: - static String decodeURL(const String& url, const TextEncoding& encoding = UTF8Encoding(), bool allowNullCharacters = false, - bool allowNonNullControlCharacters = true, bool decodeHTMLentities = true, - bool leaveUndecodableHTMLEntitiesUntouched = false); + static String canonicalize(const String&); - static String decodeHTMLEntities(const String&, bool leaveUndecodableHTMLEntitiesUntouched = false); + static String decodeURL(const String& url, const TextEncoding& encoding = UTF8Encoding(), bool decodeHTMLentities = true); + + static String decodeHTMLEntities(const String&, bool leaveUndecodableHTMLEntitiesUntouched = true); - bool findInRequest(const String&, bool matchNullCharacters = true, bool matchNonNullControlCharacters = true, - bool decodeHTMLentities = true, bool leaveUndecodableHTMLEntitiesUntouched = false) const; + bool findInRequest(const String&, bool decodeHTMLentities = true) const; - bool findInRequest(Frame*, const String&, bool matchNullCharacters = true, bool matchNonNullControlCharacters = true, - bool decodeHTMLentities = true, bool leaveUndecodableHTMLEntitiesUntouched = false) const; + bool findInRequest(Frame*, const String&, bool decodeHTMLentities = true) const; // The frame to audit. Frame* m_frame; diff --git a/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp b/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp index a4916e90b6..dad763c9fe 100644 --- a/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp +++ b/src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -113,11 +113,23 @@ static inline IntSize blendFunc(const AnimationBase* anim, const IntSize& from, blendFunc(anim, from.height(), to.height(), progress)); } +static inline ShadowStyle blendFunc(const AnimationBase* anim, ShadowStyle from, ShadowStyle to, double progress) +{ + if (from == to) + return to; + + double fromVal = from == Normal ? 1 : 0; + double toVal = to == Normal ? 1 : 0; + double result = blendFunc(anim, fromVal, toVal, progress); + return result > 0 ? Normal : Inset; +} + static inline ShadowData* blendFunc(const AnimationBase* anim, const ShadowData* from, const ShadowData* to, double progress) { ASSERT(from && to); return new ShadowData(blendFunc(anim, from->x, to->x, progress), blendFunc(anim, from->y, to->y, progress), - blendFunc(anim, from->blur, to->blur, progress), blendFunc(anim, from->color, to->color, progress)); + blendFunc(anim, from->blur, to->blur, progress), blendFunc(anim, from->spread, to->spread, progress), + blendFunc(anim, from->style, to->style, progress), blendFunc(anim, from->color, to->color, progress)); } static inline TransformOperations blendFunc(const AnimationBase* anim, const TransformOperations& from, const TransformOperations& to, double progress) @@ -300,7 +312,7 @@ public: { ShadowData* shadowA = (a->*m_getter)(); ShadowData* shadowB = (b->*m_getter)(); - ShadowData defaultShadowData(0, 0, 0, Color::transparent); + ShadowData defaultShadowData(0, 0, 0, 0, Normal, Color::transparent); if (!shadowA) shadowA = &defaultShadowData; @@ -473,7 +485,7 @@ static void ensurePropertyMap() gPropertyWrappers->append(new PropertyWrapperMaybeInvalidColor(CSSPropertyOutlineColor, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor)); // These are for shadows - gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyWebkitBoxShadow, &RenderStyle::boxShadow, &RenderStyle::setBoxShadow)); + gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyBoxShadow, &RenderStyle::boxShadow, &RenderStyle::setBoxShadow)); gPropertyWrappers->append(new PropertyWrapperShadow(CSSPropertyTextShadow, &RenderStyle::textShadow, &RenderStyle::setTextShadow)); #if ENABLE(SVG) diff --git a/src/3rdparty/webkit/WebCore/platform/AutodrainedPool.h b/src/3rdparty/webkit/WebCore/platform/AutodrainedPool.h index 1cbbec6036..d44ee1eaa7 100644 --- a/src/3rdparty/webkit/WebCore/platform/AutodrainedPool.h +++ b/src/3rdparty/webkit/WebCore/platform/AutodrainedPool.h @@ -39,7 +39,7 @@ class NSAutoreleasePool; namespace WebCore { -class AutodrainedPool : Noncopyable { +class AutodrainedPool : public Noncopyable { public: AutodrainedPool(int iterationLimit = 1); ~AutodrainedPool(); diff --git a/src/3rdparty/webkit/WebCore/platform/ContextMenu.h b/src/3rdparty/webkit/WebCore/platform/ContextMenu.h index 75899ba39b..dc484b2b9f 100644 --- a/src/3rdparty/webkit/WebCore/platform/ContextMenu.h +++ b/src/3rdparty/webkit/WebCore/platform/ContextMenu.h @@ -42,7 +42,7 @@ namespace WebCore { class ContextMenuController; - class ContextMenu : Noncopyable + class ContextMenu : public Noncopyable { public: ContextMenu(const HitTestResult&); diff --git a/src/3rdparty/webkit/WebCore/platform/EventLoop.h b/src/3rdparty/webkit/WebCore/platform/EventLoop.h index 6687c2319d..b0507f7293 100644 --- a/src/3rdparty/webkit/WebCore/platform/EventLoop.h +++ b/src/3rdparty/webkit/WebCore/platform/EventLoop.h @@ -30,7 +30,7 @@ namespace WebCore { - class EventLoop : Noncopyable { + class EventLoop : public Noncopyable { public: EventLoop() : m_ended(false) diff --git a/src/3rdparty/webkit/WebCore/platform/HostWindow.h b/src/3rdparty/webkit/WebCore/platform/HostWindow.h index 3e982e1166..3a024deccd 100644 --- a/src/3rdparty/webkit/WebCore/platform/HostWindow.h +++ b/src/3rdparty/webkit/WebCore/platform/HostWindow.h @@ -31,7 +31,7 @@ namespace WebCore { -class HostWindow : Noncopyable { +class HostWindow : public Noncopyable { public: virtual ~HostWindow() { } diff --git a/src/3rdparty/webkit/WebCore/platform/Logging.cpp b/src/3rdparty/webkit/WebCore/platform/Logging.cpp index e369356018..f3c6f1ca3b 100644 --- a/src/3rdparty/webkit/WebCore/platform/Logging.cpp +++ b/src/3rdparty/webkit/WebCore/platform/Logging.cpp @@ -65,26 +65,65 @@ WTFLogChannel* getChannelFromName(const String& channelName) if (!(channelName.length() >= 2)) return 0; - if (channelName == String("BackForward")) return &LogBackForward; - if (channelName == String("Editing")) return &LogEditing; - if (channelName == String("Events")) return &LogEvents; - if (channelName == String("Frames")) return &LogFrames; - if (channelName == String("FTP")) return &LogFTP; - if (channelName == String("History")) return &LogHistory; - if (channelName == String("IconDatabase")) return &LogIconDatabase; - if (channelName == String("Loading")) return &LogLoading; - if (channelName == String("Media")) return &LogMedia; - if (channelName == String("Network")) return &LogNetwork; - if (channelName == String("NotYetImplemented")) return &LogNotYetImplemented; - if (channelName == String("PageCache")) return &LogPageCache; - if (channelName == String("PlatformLeaks")) return &LogPlatformLeaks; - if (channelName == String("Plugins")) return &LogPlugins; - if (channelName == String("PopupBlocking")) return &LogPopupBlocking; - if (channelName == String("SpellingAndGrammar")) return &LogSpellingAndGrammar; - if (channelName == String("SQLDatabase")) return &LogSQLDatabase; - if (channelName == String("StorageAPI")) return &LogStorageAPI; - if (channelName == String("TextConversion")) return &LogTextConversion; - if (channelName == String("Threading")) return &LogThreading; + if (equalIgnoringCase(channelName, String("BackForward"))) + return &LogBackForward; + + if (equalIgnoringCase(channelName, String("Editing"))) + return &LogEditing; + + if (equalIgnoringCase(channelName, String("Events"))) + return &LogEvents; + + if (equalIgnoringCase(channelName, String("Frames"))) + return &LogFrames; + + if (equalIgnoringCase(channelName, String("FTP"))) + return &LogFTP; + + if (equalIgnoringCase(channelName, String("History"))) + return &LogHistory; + + if (equalIgnoringCase(channelName, String("IconDatabase"))) + return &LogIconDatabase; + + if (equalIgnoringCase(channelName, String("Loading"))) + return &LogLoading; + + if (equalIgnoringCase(channelName, String("Media"))) + return &LogMedia; + + if (equalIgnoringCase(channelName, String("Network"))) + return &LogNetwork; + + if (equalIgnoringCase(channelName, String("NotYetImplemented"))) + return &LogNotYetImplemented; + + if (equalIgnoringCase(channelName, String("PageCache"))) + return &LogPageCache; + + if (equalIgnoringCase(channelName, String("PlatformLeaks"))) + return &LogPlatformLeaks; + + if (equalIgnoringCase(channelName, String("Plugins"))) + return &LogPlugins; + + if (equalIgnoringCase(channelName, String("PopupBlocking"))) + return &LogPopupBlocking; + + if (equalIgnoringCase(channelName, String("SpellingAndGrammar"))) + return &LogSpellingAndGrammar; + + if (equalIgnoringCase(channelName, String("SQLDatabase"))) + return &LogSQLDatabase; + + if (equalIgnoringCase(channelName, String("StorageAPI"))) + return &LogStorageAPI; + + if (equalIgnoringCase(channelName, String("TextConversion"))) + return &LogTextConversion; + + if (equalIgnoringCase(channelName, String("Threading"))) + return &LogThreading; return 0; } diff --git a/src/3rdparty/webkit/WebCore/platform/Pasteboard.h b/src/3rdparty/webkit/WebCore/platform/Pasteboard.h index f98683f97d..883364ab7a 100644 --- a/src/3rdparty/webkit/WebCore/platform/Pasteboard.h +++ b/src/3rdparty/webkit/WebCore/platform/Pasteboard.h @@ -76,7 +76,7 @@ class Node; class Range; class String; -class Pasteboard : Noncopyable { +class Pasteboard : public Noncopyable { public: #if PLATFORM(MAC) //Helper functions to allow Clipboard to share code diff --git a/src/3rdparty/webkit/WebCore/platform/PurgeableBuffer.h b/src/3rdparty/webkit/WebCore/platform/PurgeableBuffer.h index 9c8e3cb6fc..c487eb994b 100644 --- a/src/3rdparty/webkit/WebCore/platform/PurgeableBuffer.h +++ b/src/3rdparty/webkit/WebCore/platform/PurgeableBuffer.h @@ -31,7 +31,7 @@ namespace WebCore { - class PurgeableBuffer : Noncopyable { + class PurgeableBuffer : public Noncopyable { public: static PurgeableBuffer* create(const char* data, size_t); static PurgeableBuffer* create(const Vector<char>& v) { return create(v.data(), v.size()); } diff --git a/src/3rdparty/webkit/WebCore/platform/RunLoopTimer.h b/src/3rdparty/webkit/WebCore/platform/RunLoopTimer.h index 96eb8d82f9..65f253e7d2 100644 --- a/src/3rdparty/webkit/WebCore/platform/RunLoopTimer.h +++ b/src/3rdparty/webkit/WebCore/platform/RunLoopTimer.h @@ -37,7 +37,7 @@ namespace WebCore { // Time intervals are all in seconds. -class RunLoopTimerBase : Noncopyable { +class RunLoopTimerBase : public Noncopyable { public: virtual ~RunLoopTimerBase(); diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp index ba6b61c1c8..b1cff4f057 100644 --- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp +++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp @@ -797,6 +797,28 @@ void ScrollView::paint(GraphicsContext* context, const IntRect& rect) } } +bool ScrollView::isPointInScrollbarCorner(const IntPoint& windowPoint) +{ + if (!scrollbarCornerPresent()) + return false; + + IntPoint viewPoint = convertFromContainingWindow(windowPoint); + + if (m_horizontalScrollbar) { + int horizontalScrollbarYMin = m_horizontalScrollbar->frameRect().y(); + int horizontalScrollbarYMax = m_horizontalScrollbar->frameRect().y() + m_horizontalScrollbar->frameRect().height(); + int horizontalScrollbarXMin = m_horizontalScrollbar->frameRect().x() + m_horizontalScrollbar->frameRect().width(); + + return viewPoint.y() > horizontalScrollbarYMin && viewPoint.y() < horizontalScrollbarYMax && viewPoint.x() > horizontalScrollbarXMin; + } + + int verticalScrollbarXMin = m_verticalScrollbar->frameRect().x(); + int verticalScrollbarXMax = m_verticalScrollbar->frameRect().x() + m_verticalScrollbar->frameRect().width(); + int verticalScrollbarYMin = m_verticalScrollbar->frameRect().y() + m_verticalScrollbar->frameRect().height(); + + return viewPoint.x() > verticalScrollbarXMin && viewPoint.x() < verticalScrollbarXMax && viewPoint.y() > verticalScrollbarYMin; +} + bool ScrollView::scrollbarCornerPresent() const { return (m_horizontalScrollbar && width() - m_horizontalScrollbar->width() > 0) || diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h index b950327662..4678ad09b0 100644 --- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h +++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h @@ -218,6 +218,7 @@ public: void addPanScrollIcon(const IntPoint&); void removePanScrollIcon(); + virtual bool isPointInScrollbarCorner(const IntPoint&); virtual bool scrollbarCornerPresent() const; virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const; diff --git a/src/3rdparty/webkit/WebCore/platform/ThreadGlobalData.h b/src/3rdparty/webkit/WebCore/platform/ThreadGlobalData.h index e0aa092081..68f5ec04a5 100644 --- a/src/3rdparty/webkit/WebCore/platform/ThreadGlobalData.h +++ b/src/3rdparty/webkit/WebCore/platform/ThreadGlobalData.h @@ -38,7 +38,7 @@ namespace WebCore { struct TECConverterWrapper; class ThreadTimers; - class ThreadGlobalData : Noncopyable { + class ThreadGlobalData : public Noncopyable { public: ThreadGlobalData(); ~ThreadGlobalData(); diff --git a/src/3rdparty/webkit/WebCore/platform/ThreadTimers.h b/src/3rdparty/webkit/WebCore/platform/ThreadTimers.h index 366c32073e..ea0a366f47 100644 --- a/src/3rdparty/webkit/WebCore/platform/ThreadTimers.h +++ b/src/3rdparty/webkit/WebCore/platform/ThreadTimers.h @@ -37,7 +37,7 @@ namespace WebCore { class TimerBase; // A collection of timers per thread. Kept in ThreadGlobalData. - class ThreadTimers : Noncopyable { + class ThreadTimers : public Noncopyable { public: ThreadTimers(); diff --git a/src/3rdparty/webkit/WebCore/platform/Timer.h b/src/3rdparty/webkit/WebCore/platform/Timer.h index 87235155bf..9221df07d5 100644 --- a/src/3rdparty/webkit/WebCore/platform/Timer.h +++ b/src/3rdparty/webkit/WebCore/platform/Timer.h @@ -35,7 +35,7 @@ namespace WebCore { class TimerHeapElement; -class TimerBase : Noncopyable { +class TimerBase : public Noncopyable { public: TimerBase(); virtual ~TimerBase(); diff --git a/src/3rdparty/webkit/WebCore/platform/TreeShared.h b/src/3rdparty/webkit/WebCore/platform/TreeShared.h index aaa26aa544..1ac1b3379c 100644 --- a/src/3rdparty/webkit/WebCore/platform/TreeShared.h +++ b/src/3rdparty/webkit/WebCore/platform/TreeShared.h @@ -26,7 +26,7 @@ namespace WebCore { -template<class T> class TreeShared : Noncopyable { +template<class T> class TreeShared : public Noncopyable { public: TreeShared() : m_refCount(0) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/FontData.h b/src/3rdparty/webkit/WebCore/platform/graphics/FontData.h index cb799197e1..76927f5a5c 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/FontData.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/FontData.h @@ -32,8 +32,9 @@ namespace WebCore { class SimpleFontData; +class String; -class FontData : Noncopyable { +class FontData : public Noncopyable { public: FontData() : m_maxGlyphPageTreeLevel(0) @@ -51,6 +52,10 @@ public: void setMaxGlyphPageTreeLevel(unsigned level) const { m_maxGlyphPageTreeLevel = level; } unsigned maxGlyphPageTreeLevel() const { return m_maxGlyphPageTreeLevel; } +#ifndef NDEBUG + virtual String description() const = 0; +#endif + private: mutable unsigned m_maxGlyphPageTreeLevel; }; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp index a34a1921ef..6419e0c4e7 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp @@ -29,6 +29,7 @@ #include "config.h" #include "GlyphPageTreeNode.h" +#include "CString.h" #include "CharacterNames.h" #include "SegmentedFontData.h" #include "SimpleFontData.h" @@ -377,4 +378,41 @@ void GlyphPageTreeNode::pruneFontData(const SimpleFontData* fontData, unsigned l it->second->pruneFontData(fontData, level); } +#ifndef NDEBUG + void GlyphPageTreeNode::showSubtree() + { + Vector<char> indent(level()); + indent.fill('\t', level()); + indent.append(0); + + HashMap<const FontData*, GlyphPageTreeNode*>::iterator end = m_children.end(); + for (HashMap<const FontData*, GlyphPageTreeNode*>::iterator it = m_children.begin(); it != end; ++it) { + printf("%s\t%p %s\n", indent.data(), it->first, it->first->description().utf8().data()); + it->second->showSubtree(); + } + if (m_systemFallbackChild) { + printf("%s\t* fallback\n", indent.data()); + m_systemFallbackChild->showSubtree(); + } + } +#endif + } + +#ifndef NDEBUG +void showGlyphPageTrees() +{ + printf("Page 0:\n"); + showGlyphPageTree(0); + HashMap<int, WebCore::GlyphPageTreeNode*>::iterator end = WebCore::GlyphPageTreeNode::roots->end(); + for (HashMap<int, WebCore::GlyphPageTreeNode*>::iterator it = WebCore::GlyphPageTreeNode::roots->begin(); it != end; ++it) { + printf("\nPage %d:\n", it->first); + showGlyphPageTree(it->first); + } +} + +void showGlyphPageTree(unsigned pageNumber) +{ + WebCore::GlyphPageTreeNode::getRoot(pageNumber)->showSubtree(); +} +#endif diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.h b/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.h index 80e87aa66b..7918ac5f32 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.h @@ -35,6 +35,11 @@ #include <wtf/RefCounted.h> #include <wtf/unicode/Unicode.h> +#ifndef NDEBUG +void showGlyphPageTrees(); +void showGlyphPageTree(unsigned pageNumber); +#endif + namespace WebCore { class FontData; @@ -210,6 +215,10 @@ private: static GlyphPageTreeNode* getRoot(unsigned pageNumber); void initializePage(const FontData*, unsigned pageNumber); +#ifndef NDEBUG + void showSubtree(); +#endif + GlyphPageTreeNode* m_parent; RefPtr<GlyphPage> m_page; unsigned m_level; @@ -220,6 +229,8 @@ private: #ifndef NDEBUG unsigned m_pageNumber; + + friend void ::showGlyphPageTree(unsigned pageNumber); #endif }; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GlyphWidthMap.h b/src/3rdparty/webkit/WebCore/platform/graphics/GlyphWidthMap.h index e194ecf3bf..66dea1fb2d 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/GlyphWidthMap.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/GlyphWidthMap.h @@ -39,7 +39,7 @@ typedef unsigned short Glyph; const float cGlyphWidthUnknown = -1; -class GlyphWidthMap : Noncopyable { +class GlyphWidthMap : public Noncopyable { public: GlyphWidthMap() : m_filledPrimaryPage(false) { } ~GlyphWidthMap() { if (m_pages) { deleteAllValues(*m_pages); } } diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Gradient.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/Gradient.cpp index 51c7162741..77a0d21a63 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/Gradient.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/Gradient.cpp @@ -155,4 +155,17 @@ void Gradient::setSpreadMethod(GradientSpreadMethod spreadMethod) m_spreadMethod = spreadMethod; } +void Gradient::setGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation) +{ + m_gradientSpaceTransformation = gradientSpaceTransformation; + setPlatformGradientSpaceTransform(gradientSpaceTransformation); +} + +#if !PLATFORM(SKIA) +void Gradient::setPlatformGradientSpaceTransform(const TransformationMatrix&) +{ +} +#endif + + } //namespace diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Gradient.h b/src/3rdparty/webkit/WebCore/platform/graphics/Gradient.h index efcf0408fe..a74b1ef566 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/Gradient.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/Gradient.h @@ -90,11 +90,12 @@ namespace WebCore { void setSpreadMethod(GradientSpreadMethod); GradientSpreadMethod spreadMethod() { return m_spreadMethod; } - void setGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation) { m_gradientSpaceTransformation = gradientSpaceTransformation; } + void setGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation); // Qt and CG transform the gradient at draw time TransformationMatrix gradientSpaceTransform() { return m_gradientSpaceTransformation; } virtual void fill(GraphicsContext*, const FloatRect&); + void setPlatformGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation); private: Gradient(const FloatPoint& p0, const FloatPoint& p1); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.cpp index 4dae3d276e..3e36f7316c 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.cpp @@ -214,6 +214,7 @@ void GraphicsContext::setStrokePattern(PassRefPtr<Pattern> pattern) } m_common->state.strokeColorSpace = PatternColorSpace; m_common->state.strokePattern = pattern; + setPlatformStrokePattern(m_common->state.strokePattern.get()); } void GraphicsContext::setFillPattern(PassRefPtr<Pattern> pattern) @@ -225,6 +226,7 @@ void GraphicsContext::setFillPattern(PassRefPtr<Pattern> pattern) } m_common->state.fillColorSpace = PatternColorSpace; m_common->state.fillPattern = pattern; + setPlatformFillPattern(m_common->state.fillPattern.get()); } void GraphicsContext::setStrokeGradient(PassRefPtr<Gradient> gradient) @@ -236,6 +238,7 @@ void GraphicsContext::setStrokeGradient(PassRefPtr<Gradient> gradient) } m_common->state.strokeColorSpace = GradientColorSpace; m_common->state.strokeGradient = gradient; + setPlatformStrokeGradient(m_common->state.strokeGradient.get()); } void GraphicsContext::setFillGradient(PassRefPtr<Gradient> gradient) @@ -247,6 +250,7 @@ void GraphicsContext::setFillGradient(PassRefPtr<Gradient> gradient) } m_common->state.fillColorSpace = GradientColorSpace; m_common->state.fillGradient = gradient; + setPlatformFillGradient(m_common->state.fillGradient.get()); } Gradient* GraphicsContext::fillGradient() const @@ -508,6 +512,24 @@ void GraphicsContext::fillRect(const FloatRect& rect, Generator& generator) generator.fill(this, rect); } +#if !PLATFORM(SKIA) +void GraphicsContext::setPlatformFillGradient(Gradient*) +{ +} + +void GraphicsContext::setPlatformFillPattern(Pattern*) +{ +} + +void GraphicsContext::setPlatformStrokeGradient(Gradient*) +{ +} + +void GraphicsContext::setPlatformStrokePattern(Pattern*) +{ +} +#endif + #if !PLATFORM(CG) && !PLATFORM(SKIA) // Implement this if you want to go ahead and push the drawing mode into your native context // immediately. diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.h b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.h index 01e2fe6347..0237abf789 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.h @@ -137,7 +137,7 @@ namespace WebCore { InterpolationHigh }; - class GraphicsContext : Noncopyable { + class GraphicsContext : public Noncopyable { public: GraphicsContext(PlatformGraphicsContext*); ~GraphicsContext(); @@ -364,8 +364,12 @@ namespace WebCore { void setPlatformStrokeColor(const Color&); void setPlatformStrokeStyle(const StrokeStyle&); void setPlatformStrokeThickness(float); + void setPlatformStrokeGradient(Gradient*); + void setPlatformStrokePattern(Pattern*); void setPlatformFillColor(const Color&); + void setPlatformFillGradient(Gradient*); + void setPlatformFillPattern(Pattern*); void setPlatformShouldAntialias(bool b); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp index 2b85bfa30d..b1825481e5 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.cpp @@ -449,6 +449,31 @@ void GraphicsLayer::setZPosition(float position) } #endif +float GraphicsLayer::accumulatedOpacity() const +{ + if (!preserves3D()) + return 1; + + return m_opacity * (parent() ? parent()->accumulatedOpacity() : 1); +} + +void GraphicsLayer::distributeOpacity(float accumulatedOpacity) +{ + // If this is a transform layer we need to distribute our opacity to all our children + + // Incoming accumulatedOpacity is the contribution from our parent(s). We mutiply this by our own + // opacity to get the total contribution + accumulatedOpacity *= m_opacity; + + setOpacityInternal(accumulatedOpacity); + + if (preserves3D()) { + size_t numChildren = children().size(); + for (size_t i = 0; i < numChildren; ++i) + children()[i]->distributeOpacity(accumulatedOpacity); + } +} + static void writeIndent(TextStream& ts, int indent) { for (int i = 0; i != indent; ++i) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h index 9407563ea9..3cc11286b5 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsLayer.h @@ -316,7 +316,12 @@ public: static String propertyIdToString(AnimatedPropertyID); + virtual void distributeOpacity(float); + virtual float accumulatedOpacity() const; + protected: + virtual void setOpacityInternal(float) { } + GraphicsLayer(GraphicsLayerClient*); void dumpProperties(TextStream&, int indent) const; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Image.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/Image.cpp index 08d96b450b..80b54575d7 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/Image.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/Image.cpp @@ -119,7 +119,6 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const Fl FloatSize scale(scaledTileSize.width() / intrinsicTileSize.width(), scaledTileSize.height() / intrinsicTileSize.height()); - TransformationMatrix patternTransform = TransformationMatrix().scaleNonUniform(scale.width(), scale.height()); FloatRect oneTileRect; oneTileRect.setX(destRect.x() + fmodf(fmodf(-srcPoint.x(), scaledTileSize.width()) - scaledTileSize.width(), scaledTileSize.width())); @@ -137,6 +136,7 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const Fl return; } + TransformationMatrix patternTransform = TransformationMatrix().scaleNonUniform(scale.width(), scale.height()); FloatRect tileRect(FloatPoint(), intrinsicTileSize); drawPattern(ctxt, tileRect, patternTransform, oneTileRect.location(), op, destRect); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/ImageBuffer.h b/src/3rdparty/webkit/WebCore/platform/graphics/ImageBuffer.h index 573e274a54..841a8914de 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/ImageBuffer.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/ImageBuffer.h @@ -43,7 +43,7 @@ namespace WebCore { class IntRect; class String; - class ImageBuffer : Noncopyable { + class ImageBuffer : public Noncopyable { public: // Will return a null pointer on allocation failure. static PassOwnPtr<ImageBuffer> create(const IntSize& size, bool grayScale) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h b/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h index e9f066e5ef..acb64de849 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h @@ -83,7 +83,7 @@ typedef NativeImageSkia* NativeImagePtr; const int cAnimationLoopOnce = -1; const int cAnimationNone = -2; -class ImageSource : Noncopyable { +class ImageSource : public Noncopyable { public: ImageSource(); ~ImageSource(); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp index 21ce22d92d..d4fab52355 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp @@ -229,7 +229,7 @@ void MediaPlayer::load(const String& url, const ContentType& contentType) engine = chooseBestEngineForTypeAndCodecs(type, codecs); // if we didn't find an engine that claims the MIME type, just use the first engine - if (!engine) + if (!engine && !installedMediaEngines().isEmpty()) engine = installedMediaEngines()[0]; // don't delete and recreate the player unless it comes from a different engine @@ -306,6 +306,11 @@ bool MediaPlayer::supportsFullscreen() const return m_private->supportsFullscreen(); } +bool MediaPlayer::supportsSave() const +{ + return m_private->supportsSave(); +} + IntSize MediaPlayer::naturalSize() { return m_private->naturalSize(); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h index 9d9370b7d3..7f5f2a04b1 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h @@ -96,7 +96,7 @@ public: #endif }; -class MediaPlayer : Noncopyable { +class MediaPlayer : public Noncopyable { public: MediaPlayer(MediaPlayerClient*); virtual ~MediaPlayer(); @@ -108,6 +108,7 @@ public: static bool isAvailable(); bool supportsFullscreen() const; + bool supportsSave() const; IntSize naturalSize(); bool hasVideo(); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h index 753ccd2e56..6d1359b350 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h @@ -46,7 +46,8 @@ public: virtual void play() = 0; virtual void pause() = 0; - virtual bool supportsFullscreen() const { return false; }; + virtual bool supportsFullscreen() const { return false; } + virtual bool supportsSave() const { return false; } virtual IntSize naturalSize() const = 0; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Path.h b/src/3rdparty/webkit/WebCore/platform/graphics/Path.h index 9e2163bb30..04717246d8 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/Path.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/Path.h @@ -103,6 +103,9 @@ namespace WebCore { void clear(); bool isEmpty() const; + // Gets the current point of the current path, which is conceptually the final point reached by the path so far. + // Note the Path can be empty (isEmpty() == true) and still have a current point. + bool hasCurrentPoint() const; void moveTo(const FloatPoint&); void addLineTo(const FloatPoint&); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.cpp index 1731d16a74..7e10040725 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "SegmentedFontData.h" +#include "PlatformString.h" #include "SimpleFontData.h" #include <wtf/Assertions.h> @@ -87,4 +88,11 @@ bool SegmentedFontData::isSegmented() const return true; } +#ifndef NDEBUG +String SegmentedFontData::description() const +{ + return "[segmented font]"; +} +#endif + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.h b/src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.h index 0a78321783..645dc0d5f0 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.h @@ -59,6 +59,10 @@ public: unsigned numRanges() const { return m_ranges.size(); } const FontDataRange& rangeAt(unsigned i) const { return m_ranges[i]; } +#ifndef NDEBUG + virtual String description() const; +#endif + private: virtual const SimpleFontData* fontDataForCharacter(UChar32) const; virtual bool containsCharacters(const UChar*, int length) const; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.cpp index bab7d993d9..c879228a76 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.cpp @@ -190,4 +190,16 @@ bool SimpleFontData::isSegmented() const return false; } +#ifndef NDEBUG +String SimpleFontData::description() const +{ + if (isSVGFont()) + return "[SVG font]"; + if (isCustomFont()) + return "[custom font]"; + + return platformData().description(); +} +#endif + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.h b/src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.h index aab6429484..cb472b0730 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.h @@ -105,6 +105,10 @@ public: const GlyphData& missingGlyphData() const { return m_missingGlyphData; } +#ifndef NDEBUG + virtual String description() const; +#endif + #if PLATFORM(MAC) NSFont* getNSFont() const { return m_platformData.font(); } #endif diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp index 668912ece0..5d29389c98 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp @@ -1,6 +1,8 @@ /* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) Copyright (C) 2008 Holger Hans Peter Freyther + Copyright (C) 2006, 2008 Apple Inc. All rights reserved. + Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -26,10 +28,13 @@ #include "FontDescription.h" #include "FontPlatformData.h" #include "Font.h" +#include "PlatformString.h" #include "StringHash.h" +#include <utility> +#include <wtf/ListHashSet.h> #include <wtf/StdLibExtras.h> -#include <QHash> +using namespace WTF; namespace WebCore { @@ -47,36 +52,173 @@ void FontCache::getTraitsInFamily(const AtomicString& familyName, Vector<unsigne { } -typedef QHash<FontDescription, FontPlatformData*> FontPlatformDataCache; +// This type must be consistent with FontPlatformData's ctor - the one which +// gets FontDescription as it's parameter. +class FontPlatformDataCacheKey { +public: + FontPlatformDataCacheKey(const FontDescription& description) + : m_familyName() + , m_bold(false) + , m_size(description.computedPixelSize()) + , m_italic(description.italic()) + , m_smallCaps(description.smallCaps()) + , m_hash(0) + { + // FIXME: Map all FontWeight values to QFont weights in FontPlatformData's ctor and follow it here + if (FontPlatformData::toQFontWeight(description.weight()) > QFont::Normal) + m_bold = true; -// using Q_GLOBAL_STATIC leads to crash. TODO investigate the way to fix this. -static FontPlatformDataCache* gFontPlatformDataCache; + const FontFamily* family = &description.family(); + while (family) { + m_familyName.append(family->family()); + family = family->next(); + if (family) + m_familyName.append(','); + } -uint qHash(const FontDescription& key) -{ - uint value = CaseFoldingHash::hash(key.family().family()); - value ^= key.computedPixelSize(); - value ^= static_cast<int>(key.weight()); - return value; -} + computeHash(); + } + + FontPlatformDataCacheKey(const FontPlatformData& fontData) + : m_familyName(static_cast<String>(fontData.family())) + , m_size(fontData.pixelSize()) + , m_bold(fontData.bold()) + , m_italic(fontData.italic()) + , m_smallCaps(fontData.smallCaps()) + , m_hash(0) + { + computeHash(); + } + + FontPlatformDataCacheKey(HashTableDeletedValueType) : m_size(hashTableDeletedSize()) { } + bool isHashTableDeletedValue() const { return m_size == hashTableDeletedSize(); } + + enum HashTableEmptyValueType { HashTableEmptyValue }; + + FontPlatformDataCacheKey(HashTableEmptyValueType) + : m_familyName() + , m_size(0) + , m_bold(false) + , m_italic(false) + , m_smallCaps(false) + , m_hash(0) + { + } + + bool operator==(const FontPlatformDataCacheKey& other) const + { + if (m_hash != other.m_hash) + return false; + + return equalIgnoringCase(m_familyName, other.m_familyName) && m_size == other.m_size && + m_bold == other.m_bold && m_italic == other.m_italic && m_smallCaps == other.m_smallCaps; + } + + unsigned hash() const + { + return m_hash; + } + + void computeHash() + { + unsigned hashCodes[] = { + CaseFoldingHash::hash(m_familyName), + m_size | static_cast<unsigned>(m_bold << sizeof(unsigned) * 8 - 1) + | static_cast<unsigned>(m_italic) << sizeof(unsigned) *8 - 2 + | static_cast<unsigned>(m_smallCaps) << sizeof(unsigned) * 8 - 3 + }; + m_hash = StringImpl::computeHash(reinterpret_cast<UChar*>(hashCodes), sizeof(hashCodes) / sizeof(UChar)); + } + +private: + String m_familyName; + int m_size; + bool m_bold; + bool m_italic; + bool m_smallCaps; + unsigned m_hash; + + static unsigned hashTableDeletedSize() { return 0xFFFFFFFFU; } +}; + +struct FontPlatformDataCacheKeyHash { + static unsigned hash(const FontPlatformDataCacheKey& key) + { + return key.hash(); + } + + static bool equal(const FontPlatformDataCacheKey& a, const FontPlatformDataCacheKey& b) + { + return a == b; + } + + static const bool safeToCompareToEmptyOrDeleted = true; +}; + +struct FontPlatformDataCacheKeyTraits : WTF::GenericHashTraits<FontPlatformDataCacheKey> { + static const bool needsDestruction = true; + static const FontPlatformDataCacheKey& emptyValue() + { + DEFINE_STATIC_LOCAL(FontPlatformDataCacheKey, key, (FontPlatformDataCacheKey::HashTableEmptyValue)); + return key; + } + static void constructDeletedValue(FontPlatformDataCacheKey& slot) + { + new (&slot) FontPlatformDataCacheKey(HashTableDeletedValue); + } + static bool isDeletedValue(const FontPlatformDataCacheKey& value) + { + return value.isHashTableDeletedValue(); + } +}; + +typedef HashMap<FontPlatformDataCacheKey, FontPlatformData*, FontPlatformDataCacheKeyHash, FontPlatformDataCacheKeyTraits> FontPlatformDataCache; + +// using Q_GLOBAL_STATIC leads to crash. TODO investigate the way to fix this. +static FontPlatformDataCache* gFontPlatformDataCache = 0; FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString& family, bool checkingAlternateName) { if (!gFontPlatformDataCache) gFontPlatformDataCache = new FontPlatformDataCache; - FontPlatformData* fontData = gFontPlatformDataCache->value(description, 0); - if (!fontData) { - fontData = new FontPlatformData(description); - gFontPlatformDataCache->insert(description, fontData); + FontPlatformDataCacheKey key(description); + FontPlatformData* platformData = gFontPlatformDataCache->get(key); + if (!platformData) { + platformData = new FontPlatformData(description); + gFontPlatformDataCache->add(key, platformData); } - - return fontData; + return platformData; } -SimpleFontData* FontCache::getCachedFontData(const FontPlatformData*) +typedef HashMap<FontPlatformDataCacheKey, std::pair<SimpleFontData*, unsigned>, FontPlatformDataCacheKeyHash, FontPlatformDataCacheKeyTraits> FontDataCache; + +static FontDataCache* gFontDataCache = 0; + +static const int cMaxInactiveFontData = 40; +static const int cTargetInactiveFontData = 32; + +static ListHashSet<const SimpleFontData*>* gInactiveFontDataSet = 0; + +SimpleFontData* FontCache::getCachedFontData(const FontPlatformData* fontPlatformData) { - return 0; + if (!gFontDataCache) { + gFontDataCache = new FontDataCache; + gInactiveFontDataSet = new ListHashSet<const SimpleFontData*>; + } + + FontPlatformDataCacheKey key(*fontPlatformData); + FontDataCache::iterator it = gFontDataCache->find(key); + if (it == gFontDataCache->end()) { + SimpleFontData* fontData = new SimpleFontData(*fontPlatformData); + gFontDataCache->add(key, std::pair<SimpleFontData*, unsigned>(fontData, 1)); + return fontData; + } + if (!it->second.second++) { + ASSERT(gInactiveFontDataSet->contains(it->second.first)); + gInactiveFontDataSet->remove(it->second.first); + } + return it->second.first; } FontPlatformData* FontCache::getLastResortFallbackFont(const FontDescription&) @@ -84,8 +226,52 @@ FontPlatformData* FontCache::getLastResortFallbackFont(const FontDescription&) return 0; } -void FontCache::releaseFontData(const WebCore::SimpleFontData*) +void FontCache::releaseFontData(const WebCore::SimpleFontData* fontData) { + ASSERT(gFontDataCache); + ASSERT(!fontData->isCustomFont()); + + FontPlatformDataCacheKey key(fontData->platformData()); + FontDataCache::iterator it = gFontDataCache->find(key); + ASSERT(it != gFontDataCache->end()); + if (!--it->second.second) { + gInactiveFontDataSet->add(it->second.first); + if (gInactiveFontDataSet->size() > cMaxInactiveFontData) + purgeInactiveFontData(gInactiveFontDataSet->size() - cTargetInactiveFontData); + } +} + +void FontCache::purgeInactiveFontData(int count) +{ + static bool isPurging; // Guard against reentry when e.g. a deleted FontData releases its small caps FontData. + if (isPurging) + return; + + isPurging = true; + + ListHashSet<const SimpleFontData*>::iterator it = gInactiveFontDataSet->begin(); + ListHashSet<const SimpleFontData*>::iterator end = gInactiveFontDataSet->end(); + for (int i = 0; i < count && it != end; ++i, ++it) { + FontPlatformDataCacheKey key = (*it)->platformData(); + pair<SimpleFontData*, unsigned> fontDataPair = gFontDataCache->take(key); + ASSERT(fontDataPair.first != 0); + ASSERT(!fontDataPair.second); + delete fontDataPair.first; + + FontPlatformData* platformData = gFontPlatformDataCache->take(key); + if (platformData) + delete platformData; + } + + if (it == end) { + // Removed everything + gInactiveFontDataSet->clear(); + } else { + for (int i = 0; i < count; ++i) + gInactiveFontDataSet->remove(gInactiveFontDataSet->begin()); + } + + isPurging = false; } void FontCache::addClient(FontSelector*) @@ -98,10 +284,10 @@ void FontCache::removeClient(FontSelector*) void FontCache::invalidate() { - if (!gFontPlatformDataCache) + if (!gFontPlatformDataCache || !gFontDataCache) return; - gFontPlatformDataCache->clear(); + purgeInactiveFontData(); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp index 29e77189f9..c29fd56f31 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp @@ -25,6 +25,7 @@ #include "FontFallbackList.h" #include "Font.h" +#include "FontCache.h" #include "SegmentedFontData.h" #include <QDebug> @@ -58,9 +59,15 @@ void FontFallbackList::invalidate(WTF::PassRefPtr<WebCore::FontSelector> fontSel void FontFallbackList::releaseFontData() { - if (m_fontList.size()) - delete m_fontList[0].first; - m_fontList.clear(); + unsigned numFonts = m_fontList.size(); + for (unsigned i = 0; i < numFonts; ++i) { + if (m_fontList[i].second) + delete m_fontList[i].first; + else { + ASSERT(!m_fontList[i].first->isSegmented()); + fontCache()->releaseFontData(static_cast<const SimpleFontData*>(m_fontList[i].first)); + } + } } void FontFallbackList::determinePitch(const WebCore::Font* font) const @@ -83,6 +90,14 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne if (index != 0) return 0; + // Search for the WebCore font that is already in the list + for (int i = m_fontList.size() - 1; i >= 0; --i) { + pair<const FontData*, bool> item = m_fontList[i]; + // item.second means that the item was created locally or not + if (!item.second) + return item.first; + } + // Use the FontSelector to get a WebCore font and then fallback to Qt const FontDescription& description = _font->fontDescription(); const FontFamily* family = &description.family(); @@ -92,6 +107,10 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne if (data) { if (data->isLoading()) m_loadingCustomFonts = true; + if (!data->isCustomFont()) { + // Custom fonts can be freed anytime so we must not hold them + m_fontList.append(pair<const FontData*, bool>(data, false)); + } return data; } } @@ -101,8 +120,8 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne if (m_fontList.size()) return m_fontList[0].first; - const FontData* result = new SimpleFontData(FontPlatformData(description), _font->wordSpacing(), _font->letterSpacing()); - m_fontList.append(pair<const FontData*, bool>(result, result->isCustomFont())); + const FontData* result = new SimpleFontData(FontPlatformData(description, _font->wordSpacing(), _font->letterSpacing()), true); + m_fontList.append(pair<const FontData*, bool>(result, true)); return result; } diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformData.h b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformData.h index 5e97678b8d..92219fde68 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformData.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformData.h @@ -1,6 +1,7 @@ /* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) Copyright (C) 2008 Holger Hans Peter Freyther + Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -24,11 +25,12 @@ #define FontPlatformData_h #include "FontDescription.h" - #include <QFont> namespace WebCore { +class String; + class FontPlatformData { public: @@ -39,8 +41,38 @@ public: FontPlatformData(const FontDescription&, int wordSpacing = 0, int letterSpacing = 0); FontPlatformData(const QFont&, bool bold); + static inline QFont::Weight toQFontWeight(FontWeight fontWeight) + { + switch (fontWeight) { + case FontWeight100: + case FontWeight200: + return QFont::Light; // QFont::Light == Weight of 25 + case FontWeight600: + return QFont::DemiBold; // QFont::DemiBold == Weight of 63 + case FontWeight700: + case FontWeight800: + return QFont::Bold; // QFont::Bold == Weight of 75 + case FontWeight900: + return QFont::Black; // QFont::Black == Weight of 87 + case FontWeight300: + case FontWeight400: + case FontWeight500: + default: + return QFont::Normal; // QFont::Normal == Weight of 50 + } + } + QFont font() const { return m_font; } float size() const { return m_size; } + QString family() const { return m_font.family(); } + bool bold() const { return m_bold; } + bool italic() const { return m_font.italic(); } + bool smallCaps() const { return m_font.capitalization() == QFont::SmallCaps; } + int pixelSize() const { return m_font.pixelSize(); } + +#ifndef NDEBUG + String description() const; +#endif float m_size; bool m_bold; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp index f0dd3ea4a8..7709be6b4e 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp @@ -1,5 +1,6 @@ /* Copyright (C) 2008 Holger Hans Peter Freyther + Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -21,6 +22,8 @@ #include "config.h" #include "FontPlatformData.h" +#include "PlatformString.h" + namespace WebCore { FontPlatformData::FontPlatformData(const FontDescription& description, int wordSpacing, int letterSpacing) @@ -40,11 +43,9 @@ FontPlatformData::FontPlatformData(const FontDescription& description, int wordS m_font.setFamily(familyName); m_font.setPixelSize(qRound(description.computedSize())); m_font.setItalic(description.italic()); - // FIXME: Map all FontWeight values to QFont weights. - if (description.weight() >= FontWeight600) - m_font.setWeight(QFont::Bold); - else - m_font.setWeight(QFont::Normal); + + m_font.setWeight(toQFontWeight(description.weight())); + m_bold = m_font.bold(); bool smallCaps = description.smallCaps(); m_font.setCapitalization(smallCaps ? QFont::SmallCaps : QFont::MixedCase); @@ -77,4 +78,11 @@ FontPlatformData::FontPlatformData() { } +#ifndef NDEBUG +String FontPlatformData::description() const +{ + return String(); +} +#endif + } diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp index 5a4b7b2541..f89ff9f94d 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp @@ -47,8 +47,8 @@ namespace WebCore { static const QString qstring(const TextRun& run) { - //We don't detach - return QString::fromRawData((const QChar *)run.characters(), run.length()); + // We don't detach + return QString::fromRawData(reinterpret_cast<const QChar*>(run.characters()), run.length()); } static const QString fixSpacing(const QString &string) @@ -57,11 +57,10 @@ static const QString fixSpacing(const QString &string) QString possiblyDetached = string; for (int i = 0; i < string.length(); ++i) { const QChar c = string.at(i); - if (c.unicode() != 0x20 && Font::treatAsSpace(c.unicode())) { - possiblyDetached[i] = 0x20; //detach - } else if (c.unicode() != 0x200c && Font::treatAsZeroWidthSpace(c.unicode())) { - possiblyDetached[i] = 0x200c; //detach - } + if (c.unicode() != 0x20 && Font::treatAsSpace(c.unicode())) + possiblyDetached[i] = 0x20; // detach + else if (c.unicode() != 0x200c && Font::treatAsZeroWidthSpace(c.unicode())) + possiblyDetached[i] = 0x200c; // detach } return possiblyDetached; } diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt43.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt43.cpp index 137b7c97a4..45bf05d49a 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt43.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt43.cpp @@ -105,9 +105,9 @@ static int generateComponents(Vector<TextRunComponent, 1024>* components, const offset += add + letterSpacing + components->last().width; start = 1; // qDebug() << "space at 0" << offset; - } else if (smallCaps) { + } else if (smallCaps) f = (QChar::category(run[0]) == QChar::Letter_Lowercase ? &font.scFont() : &font.font()); - } + for (int i = 1; i < run.length(); ++i) { uint ch = run[i]; if (QChar(ch).isHighSurrogate() && QChar(run[i-1]).isLowSurrogate()) @@ -263,7 +263,7 @@ int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool if (!l.isValid()) return offset; - l.setLineWidth(INT_MAX/256); + l.setLineWidth(INT_MAX / 256); layout.endLayout(); if (position - xs >= l.width()) @@ -272,9 +272,8 @@ int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool if (cursor > 1) --cursor; return offset + cursor; - } else { + } else offset += components.at(i).string.length() - 1; - } } } else { for (int i = 0; i < components.size(); ++i) { @@ -287,7 +286,7 @@ int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool if (!l.isValid()) return offset; - l.setLineWidth(INT_MAX/256); + l.setLineWidth(INT_MAX / 256); layout.endLayout(); if (position - xs >= l.width()) @@ -296,9 +295,8 @@ int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool if (cursor > 1) --cursor; return offset + cursor; - } else { + } else offset += components.at(i).string.length() - 1; - } } } return run.length(); @@ -321,7 +319,7 @@ static float cursorToX(const Vector<TextRunComponent, 1024>& components, int wid if (!l.isValid()) return 0; - l.setLineWidth(INT_MAX/256); + l.setLineWidth(INT_MAX / 256); layout.endLayout(); return xs + l.cursorToX(cursor - start + 1); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp index 1e71f5860b..9b9acc28b7 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp @@ -67,7 +67,7 @@ QGradient* Gradient::platformGradient() ++stopIterator; } - switch(m_spreadMethod) { + switch (m_spreadMethod) { case SpreadMethodPad: m_gradient->setSpread(QGradient::PadSpread); break; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index 8503fb521c..a35c5ac26b 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -155,7 +155,7 @@ static Qt::PenStyle toQPenStyle(StrokeStyle style) static inline Qt::FillRule toQtFillRule(WindRule rule) { - switch(rule) { + switch (rule) { case RULE_EVENODD: return Qt::OddEvenFill; case RULE_NONZERO: @@ -165,8 +165,7 @@ static inline Qt::FillRule toQtFillRule(WindRule rule) return Qt::OddEvenFill; } -struct TransparencyLayer -{ +struct TransparencyLayer { TransparencyLayer(const QPainter* p, const QRect &rect) : pixmap(rect.width(), rect.height()) { @@ -198,8 +197,7 @@ private: TransparencyLayer & operator=(const TransparencyLayer &) { return *this; } }; -class GraphicsContextPlatformPrivate -{ +class GraphicsContextPlatformPrivate { public: GraphicsContextPlatformPrivate(QPainter* painter); ~GraphicsContextPlatformPrivate(); @@ -217,7 +215,7 @@ public: bool antiAliasingForRectsAndLines; - QStack<TransparencyLayer *> layers; + QStack<TransparencyLayer*> layers; QPainter* redirect; QBrush solidColor; @@ -242,9 +240,8 @@ GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(QPainter* p) antiAliasingForRectsAndLines = painter->testRenderHint(QPainter::Antialiasing); // FIXME: Maybe only enable in SVG mode? painter->setRenderHint(QPainter::Antialiasing, true); - } else { + } else antiAliasingForRectsAndLines = false; - } } GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate() @@ -265,7 +262,7 @@ GraphicsContext::GraphicsContext(PlatformGraphicsContext* context) GraphicsContext::~GraphicsContext() { - while(!m_data->layers.isEmpty()) + while (!m_data->layers.isEmpty()) endTransparencyLayer(); destroyGraphicsContextPrivate(m_common); @@ -280,7 +277,7 @@ PlatformGraphicsContext* GraphicsContext::platformContext() const TransformationMatrix GraphicsContext::getCTM() const { QTransform matrix(platformContext()->combinedTransform()); - return TransformationMatrix(matrix.m11(), matrix.m12(), 0, matrix.m13(), + return TransformationMatrix(matrix.m11(), matrix.m12(), 0, matrix.m13(), matrix.m21(), matrix.m22(), 0, matrix.m23(), 0, 0, 1, 0, matrix.m31(), matrix.m32(), 0, matrix.m33()); @@ -1126,8 +1123,9 @@ void GraphicsContext::concatCTM(const TransformationMatrix& transform) m_data->p()->setWorldTransform(transform, true); - // Transformations to the context shouldn't transform the currentPath. - // We have to undo every change made to the context from the currentPath to avoid wrong drawings. + // Transformations to the context shouldn't transform the currentPath. + // We have to undo every change made to the context from the currentPath + // to avoid wrong drawings. if (!m_data->currentPath.isEmpty() && transform.isInvertible()) { QTransform matrix = transform.inverse(); m_data->currentPath = m_data->currentPath * matrix; @@ -1210,7 +1208,7 @@ HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlpha bitmapInfo.bmiHeader.biClrImportant = 0; void* pixels = 0; - HBITMAP bitmap = ::CreateDIBSection(NULL, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0); + HBITMAP bitmap = ::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0); if (!bitmap) return 0; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp index c9f3ced7eb..34c3c472aa 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp @@ -39,7 +39,7 @@ Icon::Icon() Icon::~Icon() { } - + PassRefPtr<Icon> Icon::createIconForFile(const String& filename) { RefPtr<Icon> i = adoptRef(new Icon); @@ -57,9 +57,8 @@ void Icon::paint(GraphicsContext* ctx, const IntRect& rect) { QPixmap px = m_icon.pixmap(rect.size()); QPainter *p = static_cast<QPainter*>(ctx->platformContext()); - if (p && !px.isNull()) { + if (p && !px.isNull()) p->drawPixmap(rect.x(), rect.y(), px); - } } } diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp index 9a7fd75edf..669be1c0d4 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp @@ -118,7 +118,7 @@ ImageDecoderQt::ReadContext::ReadResult // Attempt to construct an empty image of the matching size and format // for efficient reading QImage newImage = m_dataFormat != QImage::Format_Invalid ? - QImage(m_size,m_dataFormat) : QImage(); + QImage(m_size, m_dataFormat) : QImage(); m_target.push_back(ImageData(newImage)); } @@ -137,8 +137,8 @@ ImageDecoderQt::ReadContext::ReadResult const bool supportsAnimation = m_reader.supportsAnimation(); if (debugImageDecoderQt) - qDebug() << "readImage(): #" << m_target.size() << " complete, " << m_size << " format " << m_dataFormat - << " supportsAnimation=" << supportsAnimation ; + qDebug() << "readImage(): #" << m_target.size() << " complete, " << m_size + << " format " << m_dataFormat << " supportsAnimation=" << supportsAnimation; // No point in readinfg further if (!supportsAnimation) return ReadComplete; @@ -158,7 +158,7 @@ ImageDecoderQt::ReadContext::IncrementalReadResult // set state to reflect complete header, etc. // For now, we read the whole image. - const qint64 startPos = m_buffer.pos (); + const qint64 startPos = m_buffer.pos(); // Oops, failed. Rewind. if (!m_reader.read(&imageData.m_image)) { m_buffer.seek(startPos); @@ -236,7 +236,7 @@ void ImageDecoderQt::setData(const IncomingData &data, bool allDataReceived) if (debugImageDecoderQt) qDebug() << " read returns " << readResult; - switch ( readResult) { + switch (readResult) { case ReadContext::ReadFailed: m_failed = true; break; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageQt.cpp index a2e96f3403..5d40e26adf 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageQt.cpp @@ -83,7 +83,6 @@ bool FrameData::clear(bool clearMetadata) } - // ================================================ // Image Class // ================================================ @@ -93,7 +92,6 @@ PassRefPtr<Image> Image::loadPlatformResource(const char* name) return StillImage::create(loadResourcePixmap(name)); } - void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const TransformationMatrix& patternTransform, const FloatPoint& phase, CompositeOperator op, const FloatRect& destRect) { @@ -103,9 +101,8 @@ void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const QPixmap pixmap = *framePixmap; QRect tr = QRectF(tileRect).toRect(); - if (tr.x() || tr.y() || tr.width() != pixmap.width() || tr.height() != pixmap.height()) { + if (tr.x() || tr.y() || tr.width() != pixmap.width() || tr.height() != pixmap.height()) pixmap = pixmap.copy(tr); - } QBrush b(pixmap); b.setTransform(patternTransform); @@ -129,7 +126,7 @@ void BitmapImage::initPlatformData() void BitmapImage::invalidatePlatformData() { } - + // Drawing Routines void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst, const FloatRect& src, CompositeOperator op) @@ -139,7 +136,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst, QPixmap* image = nativeImageForCurrentFrame(); if (!image) return; - + if (mayFillWithSolidColor()) { fillWithSolidColor(ctxt, dst, solidColor(), op); return; @@ -158,7 +155,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst, painter->setCompositionMode(QPainter::CompositionMode_Source); // Test using example site at - // http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html + // http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html painter->drawPixmap(dst, *image, src); ctxt->restore(); diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageSourceQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageSourceQt.cpp index 621728e72e..1ffc1eb374 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageSourceQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageSourceQt.cpp @@ -124,7 +124,7 @@ float ImageSource::frameDurationAtIndex(size_t index) { if (!m_decoder) return 0; - + // Many annoying ads specify a 0 duration to make an image flash as quickly // as possible. We follow WinIE's behavior and use a duration of 100 ms // for any frames that specify a duration of <= 50 ms. See @@ -138,17 +138,17 @@ bool ImageSource::frameHasAlphaAtIndex(size_t index) { if (!m_decoder || !m_decoder->supportsAlpha()) return false; - - const QPixmap* source = m_decoder->imageAtIndex( index); + + const QPixmap* source = m_decoder->imageAtIndex(index); if (!source) return false; - + return source->hasAlphaChannel(); } bool ImageSource::frameIsCompleteAtIndex(size_t index) { - return (m_decoder && m_decoder->imageAtIndex(index) != 0); + return (m_decoder && m_decoder->imageAtIndex(index)); } void ImageSource::clear(bool destroyAll, size_t clearBeforeFrame, SharedBuffer* data, bool allDataReceived) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp index 896e3b8fcf..76b14943a1 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp @@ -43,7 +43,7 @@ using namespace Phonon; -#define LOG_MEDIAOBJECT() (LOG(Media,"%s", debugMediaObject(this, *m_mediaObject).constData())) +#define LOG_MEDIAOBJECT() (LOG(Media, "%s", debugMediaObject(this, *m_mediaObject).constData())) static QByteArray debugMediaObject(WebCore::MediaPlayerPrivate* mediaPlayer, const MediaObject& mediaObject) { @@ -97,9 +97,8 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player) // Make sure we get updates for each frame m_videoWidget->installEventFilter(this); - foreach(QWidget* widget, qFindChildren<QWidget*>(m_videoWidget)) { + foreach (QWidget* widget, qFindChildren<QWidget*>(m_videoWidget)) widget->installEventFilter(this); - } connect(m_mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), this, SLOT(stateChanged(Phonon::State, Phonon::State))); @@ -114,8 +113,8 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player) connect(m_mediaObject, SIGNAL(totalTimeChanged(qint64)), this, SLOT(totalTimeChanged(qint64))); } -MediaPlayerPrivateInterface* MediaPlayerPrivate::create(MediaPlayer* player) -{ +MediaPlayerPrivateInterface* MediaPlayerPrivate::create(MediaPlayer* player) +{ return new MediaPlayerPrivate(player); } @@ -266,7 +265,7 @@ float MediaPlayerPrivate::maxTimeSeekable() const } unsigned MediaPlayerPrivate::bytesLoaded() const -{ +{ notImplemented(); return 0; } @@ -346,9 +345,8 @@ void MediaPlayerPrivate::updateStates() m_networkState = MediaPlayer::NetworkError; m_readyState = MediaPlayer::HaveNothing; cancelLoad(); - } else { + } else m_mediaObject->pause(); - } } if (seeking()) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp index fde6ea30b2..39e243ecb4 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp @@ -170,8 +170,8 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius) return; } - FloatPoint p1p0((p0.x() - p1.x()),(p0.y() - p1.y())); - FloatPoint p1p2((p2.x() - p1.x()),(p2.y() - p1.y())); + FloatPoint p1p0((p0.x() - p1.x()), (p0.y() - p1.y())); + FloatPoint p1p2((p2.x() - p1.x()), (p2.y() - p1.y())); float p1p0_length = sqrtf(p1p0.x() * p1p0.x() + p1p0.y() * p1p0.y()); float p1p2_length = sqrtf(p1p2.x() * p1p2.x() + p1p2.y() * p1p2.y()); @@ -216,7 +216,7 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius) float factor_p1p2 = tangent / p1p2_length; FloatPoint t_p1p2((p1.x() + factor_p1p2 * p1p2.x()), (p1.y() + factor_p1p2 * p1p2.y())); - FloatPoint orth_p1p2((t_p1p2.x() - p.x()),(t_p1p2.y() - p.y())); + FloatPoint orth_p1p2((t_p1p2.x() - p.x()), (t_p1p2.y() - p.y())); float orth_p1p2_length = sqrtf(orth_p1p2.x() * orth_p1p2.x() + orth_p1p2.y() * orth_p1p2.y()); float ea = acos(orth_p1p2.x() / orth_p1p2_length); if (orth_p1p2.y() < 0) @@ -300,7 +300,12 @@ bool Path::isEmpty() const { // Don't use QPainterPath::isEmpty(), as that also returns true if there's only // one initial MoveTo element in the path. - return m_path->elementCount() == 0; + return !m_path->elementCount(); +} + +bool Path::hasCurrentPoint() const +{ + return !isEmpty(); } String Path::debugString() const diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/TransformationMatrixQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/TransformationMatrixQt.cpp index 15f0cc5394..37b86f30f5 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/TransformationMatrixQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/TransformationMatrixQt.cpp @@ -32,7 +32,7 @@ namespace WebCore { TransformationMatrix::operator QTransform() const -{ +{ return QTransform(m11(), m12(), m14(), m21(), m22(), m24(), m41(), m42(), m44()); } diff --git a/src/3rdparty/webkit/WebCore/platform/mac/LocalCurrentGraphicsContext.h b/src/3rdparty/webkit/WebCore/platform/mac/LocalCurrentGraphicsContext.h index 1c5cae7f43..90beb401f3 100644 --- a/src/3rdparty/webkit/WebCore/platform/mac/LocalCurrentGraphicsContext.h +++ b/src/3rdparty/webkit/WebCore/platform/mac/LocalCurrentGraphicsContext.h @@ -31,7 +31,7 @@ class GraphicsContext; // This class automatically saves and restores the current NSGraphicsContext for // functions which call out into AppKit and rely on the currentContext being set -class LocalCurrentGraphicsContext : Noncopyable { +class LocalCurrentGraphicsContext : public Noncopyable { public: LocalCurrentGraphicsContext(GraphicsContext* graphicsContext); ~LocalCurrentGraphicsContext(); diff --git a/src/3rdparty/webkit/WebCore/platform/mac/RuntimeApplicationChecks.h b/src/3rdparty/webkit/WebCore/platform/mac/RuntimeApplicationChecks.h index 44eedfad54..f9c7079ed6 100644 --- a/src/3rdparty/webkit/WebCore/platform/mac/RuntimeApplicationChecks.h +++ b/src/3rdparty/webkit/WebCore/platform/mac/RuntimeApplicationChecks.h @@ -30,6 +30,7 @@ namespace WebCore { bool applicationIsAppleMail(); bool applicationIsSafari(); +bool applicationIsMicrosoftMessenger(); } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/platform/mac/RuntimeApplicationChecks.mm b/src/3rdparty/webkit/WebCore/platform/mac/RuntimeApplicationChecks.mm index 16701853fe..a3c4aa5eec 100644 --- a/src/3rdparty/webkit/WebCore/platform/mac/RuntimeApplicationChecks.mm +++ b/src/3rdparty/webkit/WebCore/platform/mac/RuntimeApplicationChecks.mm @@ -41,4 +41,10 @@ bool applicationIsSafari() return isSafari; } +bool applicationIsMicrosoftMessenger() +{ + static bool isMicrosoftMessenger = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.microsoft.Messenger"]; + return isMicrosoftMessenger; +} + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/platform/network/FormDataBuilder.h b/src/3rdparty/webkit/WebCore/platform/network/FormDataBuilder.h index 666f0c18e7..286f59f545 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/FormDataBuilder.h +++ b/src/3rdparty/webkit/WebCore/platform/network/FormDataBuilder.h @@ -30,7 +30,7 @@ class CString; class Document; class TextEncoding; -class FormDataBuilder : Noncopyable { +class FormDataBuilder : public Noncopyable { public: FormDataBuilder(); ~FormDataBuilder(); diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandle.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandle.h index f0e1e944f5..4cb3561b8f 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandle.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandle.h @@ -191,12 +191,6 @@ public: void fireFailure(Timer<ResourceHandle>*); private: -#if USE(SOUP) - bool startData(String urlString); - bool startHttp(String urlString); - bool startGio(KURL url); -#endif - void scheduleFailure(FailureType); bool start(Frame*); diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h index 676129a428..091a26b0d4 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h @@ -75,7 +75,7 @@ class NSURLConnection; namespace WebCore { class ResourceHandleClient; - class ResourceHandleInternal : Noncopyable { + class ResourceHandleInternal : public Noncopyable { public: ResourceHandleInternal(ResourceHandle* loader, const ResourceRequest& request, ResourceHandleClient* c, bool defersLoading, bool shouldContentSniff, bool mightDownloadFromHandle) : m_client(c) diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp index fddda0146f..82b12a8cd5 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp @@ -61,9 +61,9 @@ ClipboardQt::ClipboardQt(ClipboardAccessPolicy policy, const QMimeData* readable : Clipboard(policy, true) , m_readableData(readableClipboard) , m_writableData(0) -{ +{ Q_ASSERT(policy == ClipboardReadable || policy == ClipboardTypesReadable); -} +} ClipboardQt::ClipboardQt(ClipboardAccessPolicy policy, bool forDragging) : Clipboard(policy, forDragging) @@ -76,7 +76,7 @@ ClipboardQt::ClipboardQt(ClipboardAccessPolicy policy, bool forDragging) if (policy != ClipboardWritable) { Q_ASSERT(!forDragging); m_readableData = QApplication::clipboard()->mimeData(); - } + } #endif } @@ -104,7 +104,7 @@ void ClipboardQt::clearData(const String& type) if (format != toClearType) formats[format] = m_writableData->data(format); } - + m_writableData->clear(); QMap<QString, QByteArray>::const_iterator it, end = formats.constEnd(); for (it = formats.begin(); it != end; ++it) @@ -122,11 +122,11 @@ void ClipboardQt::clearData(const String& type) #endif } -void ClipboardQt::clearAllData() +void ClipboardQt::clearAllData() { if (policy() != ClipboardWritable) return; - + #ifndef QT_NO_CLIPBOARD if (!isForDragging()) QApplication::clipboard()->setMimeData(0); @@ -136,21 +136,21 @@ void ClipboardQt::clearAllData() m_writableData = 0; } -String ClipboardQt::getData(const String& type, bool& success) const +String ClipboardQt::getData(const String& type, bool& success) const { if (policy() != ClipboardReadable) { success = false; return String(); } - + ASSERT(m_readableData); QByteArray data = m_readableData->data(QString(type)); success = !data.isEmpty(); return String(data.data(), data.size()); } -bool ClipboardQt::setData(const String& type, const String& data) +bool ClipboardQt::setData(const String& type, const String& data) { if (policy() != ClipboardWritable) return false; @@ -187,7 +187,7 @@ PassRefPtr<FileList> ClipboardQt::files() const return 0; } -void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point) +void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point) { setDragImage(image, 0, point); } @@ -207,7 +207,7 @@ void ClipboardQt::setDragImage(CachedImage* image, Node *node, const IntPoint &l m_dragImage = image; if (m_dragImage) m_dragImage->addClient(this); - + m_dragLoc = loc; m_dragImageElement = node; } @@ -226,9 +226,9 @@ static CachedImage* getCachedImage(Element* element) // Attempt to pull CachedImage from element ASSERT(element); RenderObject* renderer = element->renderer(); - if (!renderer || !renderer->isImage()) + if (!renderer || !renderer->isImage()) return 0; - + RenderImage* image = static_cast<RenderImage*>(renderer); if (image->cachedImage() && !image->cachedImage()->errorOccurred()) return image->cachedImage(); @@ -236,7 +236,7 @@ static CachedImage* getCachedImage(Element* element) return 0; } -void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, const String& title, Frame* frame) +void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, const String& title, Frame* frame) { ASSERT(frame); Q_UNUSED(url); @@ -254,11 +254,11 @@ void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, co m_writableData->setImageData(*pixmap); AtomicString imageURL = element->getAttribute(HTMLNames::srcAttr); - if (imageURL.isEmpty()) + if (imageURL.isEmpty()) return; - KURL fullURL = frame->document()->completeURL(parseURL(imageURL)); - if (fullURL.isEmpty()) + KURL fullURL = frame->document()->completeURL(deprecatedParseURL(imageURL)); + if (fullURL.isEmpty()) return; QList<QUrl> urls; @@ -274,7 +274,7 @@ void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, co void ClipboardQt::writeURL(const KURL& url, const String& title, Frame* frame) { ASSERT(frame); - + QList<QUrl> urls; urls.append(frame->document()->completeURL(url.string())); if (!m_writableData) @@ -287,11 +287,11 @@ void ClipboardQt::writeURL(const KURL& url, const String& title, Frame* frame) #endif } -void ClipboardQt::writeRange(Range* range, Frame* frame) +void ClipboardQt::writeRange(Range* range, Frame* frame) { ASSERT(range); ASSERT(frame); - + if (!m_writableData) m_writableData = new QMimeData; QString text = frame->selectedText(); @@ -304,7 +304,7 @@ void ClipboardQt::writeRange(Range* range, Frame* frame) #endif } -bool ClipboardQt::hasData() +bool ClipboardQt::hasData() { const QMimeData *data = m_readableData ? m_readableData : m_writableData; if (!data) diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h b/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h index 44324f2f8b..9a918ed96d 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h @@ -49,12 +49,12 @@ namespace WebCore { return adoptRef(new ClipboardQt(policy, forDragging)); } virtual ~ClipboardQt(); - + void clearData(const String& type); void clearAllData(); String getData(const String& type, bool& success) const; bool setData(const String& type, const String& data); - + // extensions beyond IE's API virtual HashSet<String> types() const; virtual PassRefPtr<FileList> files() const; @@ -68,10 +68,10 @@ namespace WebCore { virtual void writeRange(Range*, Frame*); virtual bool hasData(); - + QMimeData* clipboardData() const { return m_writableData; } void invalidateWritableData() { m_writableData = 0; } - + private: ClipboardQt(ClipboardAccessPolicy, const QMimeData* readableClipboard); @@ -79,10 +79,10 @@ namespace WebCore { ClipboardQt(ClipboardAccessPolicy, bool forDragging); void setDragImage(CachedImage*, Node*, const IntPoint& loc); - + const QMimeData* m_readableData; QMimeData* m_writableData; }; -} +} #endif // ClipboardQt_h diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp index c71eacd85a..cf23587363 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp @@ -68,7 +68,7 @@ void ContextMenuItem::setType(ContextMenuItemType type) } ContextMenuAction ContextMenuItem::action() const -{ +{ return m_platformDescription.action; } @@ -77,7 +77,7 @@ void ContextMenuItem::setAction(ContextMenuAction action) m_platformDescription.action = action; } -String ContextMenuItem::title() const +String ContextMenuItem::title() const { return m_platformDescription.title; } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp index 0d7e100983..aad84be12f 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp @@ -254,7 +254,7 @@ const Cursor& rowResizeCursor() { return Cursors::self()->SplitVCursor; } - + const Cursor& middlePanningCursor() { return moveCursor(); @@ -298,7 +298,7 @@ const Cursor& southWestPanningCursor() const Cursor& westPanningCursor() { return westResizeCursor(); -} +} const Cursor& verticalTextCursor() { @@ -342,7 +342,7 @@ const Cursor& noneCursor() const Cursor& notAllowedCursor() { - return Cursors::self()->NoDropCursor; + return Cursors::self()->NoDropCursor; } const Cursor& zoomInCursor() diff --git a/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp index bc5cce12f8..7b1eff8ce3 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp @@ -42,7 +42,7 @@ bool DragData::canSmartReplace() const { return false; } - + bool DragData::containsColor() const { if (!m_platformDragData) @@ -55,11 +55,11 @@ bool DragData::containsFiles() const if (!m_platformDragData) return false; QList<QUrl> urls = m_platformDragData->urls(); - foreach(const QUrl &url, urls) { + foreach (const QUrl &url, urls) { if (!url.toLocalFile().isEmpty()) return true; } - return false; + return false; } void DragData::asFilenames(Vector<String>& result) const @@ -67,7 +67,7 @@ void DragData::asFilenames(Vector<String>& result) const if (!m_platformDragData) return; QList<QUrl> urls = m_platformDragData->urls(); - foreach(const QUrl &url, urls) { + foreach (const QUrl &url, urls) { QString file = url.toLocalFile(); if (!file.isEmpty()) result.append(file); @@ -88,12 +88,11 @@ String DragData::asPlainText() const String text = m_platformDragData->text(); if (!text.isEmpty()) return text; - + // FIXME: Should handle rich text here - return asURL(0); } - + Color DragData::asColor() const { if (!m_platformDragData) @@ -105,21 +104,21 @@ PassRefPtr<Clipboard> DragData::createClipboard(ClipboardAccessPolicy policy) co { return ClipboardQt::create(policy, m_platformDragData); } - + bool DragData::containsCompatibleContent() const { if (!m_platformDragData) return false; return containsColor() || containsURL() || m_platformDragData->hasHtml() || m_platformDragData->hasText(); } - + bool DragData::containsURL() const { if (!m_platformDragData) return false; return m_platformDragData->hasUrls(); } - + String DragData::asURL(String* title) const { if (!m_platformDragData) @@ -131,15 +130,14 @@ String DragData::asURL(String* title) const return urls.first().toString(); } - - + PassRefPtr<DocumentFragment> DragData::asFragment(Document* doc) const { if (m_platformDragData && m_platformDragData->hasHtml()) return createFragmentFromMarkup(doc, m_platformDragData->html(), ""); - + return 0; } - + } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp index c9cdd8dd81..3a077e1c01 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp @@ -44,20 +44,20 @@ DragImageRef scaleDragImage(DragImageRef image, FloatSize) { return image; } - + DragImageRef dissolveDragImageToFraction(DragImageRef image, float) { return image; } - + DragImageRef createDragImageFromImage(Image*) { return 0; } - + DragImageRef createDragImageIconForCachedImage(CachedImage*) { - return 0; + return 0; } - + } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp index bc9d2f4f30..28d3ca7b46 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp @@ -64,7 +64,7 @@ bool getFileSize(const String& path, long long& result) { QFileInfo info(path); result = info.size(); - return info.exists(); + return info.exists(); } bool getFileModificationTime(const String& path, time_t& result) @@ -156,7 +156,7 @@ bool unloadModule(PlatformModule module) delete module; return true; } - + return false; #endif } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp b/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp index 57a5e99db8..d1853fc5e2 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp @@ -60,7 +60,7 @@ String searchableIndexIntroduction() { return QCoreApplication::translate("QWebPage", "This is a searchable index. Enter search keywords: ", "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'"); } - + String fileButtonChooseFileLabel() { return QCoreApplication::translate("QWebPage", "Choose File", "title for file button used in HTML forms"); @@ -183,7 +183,7 @@ String contextMenuItemTagSpellingMenu() String contextMenuItemTagShowSpellingPanel(bool show) { - return show ? QCoreApplication::translate("QWebPage", "Show Spelling and Grammar", "menu item title") : + return show ? QCoreApplication::translate("QWebPage", "Show Spelling and Grammar", "menu item title") : QCoreApplication::translate("QWebPage", "Hide Spelling and Grammar", "menu item title"); } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp index 2b5968a3d0..22cee6f76b 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp @@ -36,7 +36,7 @@ struct ExtensionMap { const char* mimeType; }; -static const ExtensionMap extensionMap [] = { +static const ExtensionMap extensionMap[] = { { "bmp", "image/bmp" }, { "css", "text/css" }, { "gif", "image/gif" }, diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp index b535a74e3c..8a377ad704 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp @@ -44,8 +44,8 @@ #define methodDebug() qDebug() << "PasteboardQt: " << __FUNCTION__; namespace WebCore { - -Pasteboard::Pasteboard() + +Pasteboard::Pasteboard() : m_selectionMode(false) { } @@ -71,7 +71,7 @@ void Pasteboard::writeSelection(Range* selectedRange, bool, Frame* frame) md->setHtml(html); #ifndef QT_NO_CLIPBOARD - QApplication::clipboard()->setMimeData(md, m_selectionMode ? + QApplication::clipboard()->setMimeData(md, m_selectionMode ? QClipboard::Selection : QClipboard::Clipboard); #endif } @@ -84,7 +84,7 @@ bool Pasteboard::canSmartReplace() String Pasteboard::plainText(Frame*) { #ifndef QT_NO_CLIPBOARD - return QApplication::clipboard()->text(m_selectionMode ? + return QApplication::clipboard()->text(m_selectionMode ? QClipboard::Selection : QClipboard::Clipboard); #else return String(); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp index 955da9bd59..43a294ba1f 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp @@ -493,7 +493,7 @@ PlatformKeyboardEvent::PlatformKeyboardEvent(QKeyEvent* event) m_autoRepeat = event->isAutoRepeat(); m_ctrlKey = (state & Qt::ControlModifier) != 0; m_altKey = (state & Qt::AltModifier) != 0; - m_metaKey = (state & Qt::MetaModifier) != 0; + m_metaKey = (state & Qt::MetaModifier) != 0; m_windowsVirtualKeyCode = windowsKeyCodeForKeyEvent(event->key()); m_nativeVirtualKeyCode = event->nativeVirtualKey(); m_isKeypad = (state & Qt::KeypadModifier) != 0; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp index ba7a4ad80b..6c1d82d458 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp @@ -38,9 +38,9 @@ PlatformMouseEvent::PlatformMouseEvent(QInputEvent* event, int clickCount) { m_timestamp = WTF::currentTime(); - QMouseEvent *me = 0; + QMouseEvent* me = 0; - switch(event->type()) { + switch (event->type()) { case QEvent::MouseMove: m_eventType = MouseEventMoved; me = static_cast<QMouseEvent *>(event); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp index a7d6643420..867e4ea4b6 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp @@ -68,8 +68,7 @@ void PopupMenu::populate(const IntRect& r) if (client()->itemIsSeparator(i)) { //FIXME: better seperator item m_popup->insertItem(i, QString::fromLatin1("---")); - } - else { + } else { //PopupMenuStyle style = client()->itemStyle(i); m_popup->insertItem(i, client()->itemText(i)); #if 0 diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp index 0b42e5c624..5f64219c5b 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp @@ -143,10 +143,10 @@ RenderThemeQt::~RenderThemeQt() // for some widget painting, we need to fallback to Windows style QStyle* RenderThemeQt::fallbackStyle() { - if(!m_fallbackStyle) + if (!m_fallbackStyle) m_fallbackStyle = QStyleFactory::create(QLatin1String("windows")); - if(!m_fallbackStyle) + if (!m_fallbackStyle) m_fallbackStyle = QApplication::style(); return m_fallbackStyle; @@ -227,9 +227,8 @@ static QRect inflateButtonRect(const QRect& originalRect, QStyle* style) int paddingBottom = originalRect.bottom() - layoutRect.bottom(); return originalRect.adjusted(-paddingLeft, -paddingTop, paddingRight, paddingBottom); - } else { + } else return originalRect; - } } void RenderThemeQt::adjustRepaintRect(const RenderObject* o, IntRect& rect) @@ -252,18 +251,6 @@ void RenderThemeQt::adjustRepaintRect(const RenderObject* o, IntRect& rect) } } -bool RenderThemeQt::isControlStyled(const RenderStyle* style, const BorderData& border, - const FillLayer& background, const Color& backgroundColor) const -{ - if (style->appearance() == TextFieldPart - || style->appearance() == TextAreaPart - || style->appearance() == ListboxPart) { - return style->border() != border; - } - - return RenderTheme::isControlStyled(style, border, background, backgroundColor); -} - Color RenderThemeQt::platformActiveSelectionBackgroundColor() const { QPalette pal = QApplication::palette(); @@ -337,11 +324,10 @@ void RenderThemeQt::computeSizeBasedOnStyle(RenderStyle* renderStyle) const // If the style supports layout rects we use that, and compensate accordingly // in paintButton() below. - if (!layoutRect.isNull()) { + if (!layoutRect.isNull()) size.setHeight(layoutRect.height()); - } else { + else size.setHeight(pushButtonSize.height()); - } break; } @@ -492,14 +478,13 @@ bool RenderThemeQt::paintButton(RenderObject* o, const RenderObject::PaintInfo& option.state |= QStyle::State_Small; ControlPart appearance = applyTheme(option, o); - if(appearance == PushButtonPart || appearance == ButtonPart) { + if (appearance == PushButtonPart || appearance == ButtonPart) { option.rect = inflateButtonRect(option.rect, qStyle()); p.drawControl(QStyle::CE_PushButton, option); - } else if(appearance == RadioPart) { + } else if (appearance == RadioPart) p.drawControl(QStyle::CE_RadioButton, option); - } else if(appearance == CheckboxPart) { + else if (appearance == CheckboxPart) p.drawControl(QStyle::CE_CheckBox, option); - } return false; } @@ -597,7 +582,7 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo const QPoint topLeft = r.topLeft(); p.painter->translate(topLeft); - opt.rect.moveTo(QPoint(0,0)); + opt.rect.moveTo(QPoint(0, 0)); opt.rect.setSize(r.size()); p.drawComplexControl(QStyle::CC_ComboBox, opt); @@ -777,7 +762,7 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con } } - if(result == RadioPart || result == CheckboxPart) + if (result == RadioPart || result == CheckboxPart) option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off); // If the webview has a custom palette, use it @@ -805,10 +790,10 @@ String RenderThemeQt::extraMediaControlsStyleSheet() } // Helper class to transform the painter's world matrix to the object's content area, scaled to 0,0,100,100 -class WorldMatrixTransformer -{ +class WorldMatrixTransformer { public: - WorldMatrixTransformer(QPainter* painter, RenderObject* renderObject, const IntRect& r) : m_painter(painter) { + WorldMatrixTransformer(QPainter* painter, RenderObject* renderObject, const IntRect& r) : m_painter(painter) + { RenderStyle* style = renderObject->style(); m_originalTransform = m_painter->transform(); m_painter->translate(r.x() + style->paddingLeft().value(), r.y() + style->paddingTop().value()); @@ -836,7 +821,7 @@ HTMLMediaElement* RenderThemeQt::getMediaElementFromRenderObject(RenderObject* o void RenderThemeQt::paintMediaBackground(QPainter* painter, const IntRect& r) const { painter->setPen(Qt::NoPen); - static QColor transparentBlack(0,0,0,100); + static QColor transparentBlack(0, 0, 0, 100); painter->setBrush(transparentBlack); painter->drawRoundedRect(r.x(), r.y(), r.width(), r.height(), 5.0, 5.0); } @@ -851,7 +836,7 @@ QColor RenderThemeQt::getMediaControlForegroundColor(RenderObject* o) const bool RenderThemeQt::paintMediaFullscreenButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) { - return RenderTheme::paintMediaFullscreenButton(o, paintInfo, r); + return RenderTheme::paintMediaFullscreenButton(o, paintInfo, r); } bool RenderThemeQt::paintMediaMuteButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h index 19d2d33437..617c875942 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h @@ -36,8 +36,7 @@ namespace WebCore { class RenderStyle; class HTMLMediaElement; -class RenderThemeQt : public RenderTheme -{ +class RenderThemeQt : public RenderTheme { private: RenderThemeQt(Page* page); virtual ~RenderThemeQt(); @@ -58,9 +57,6 @@ public: virtual void adjustRepaintRect(const RenderObject* o, IntRect& r); - virtual bool isControlStyled(const RenderStyle*, const BorderData&, - const FillLayer&, const Color&) const; - // The platform selection color. virtual Color platformActiveSelectionBackgroundColor() const; virtual Color platformInactiveSelectionBackgroundColor() const; @@ -154,8 +150,7 @@ private: QStyle* m_fallbackStyle; }; -class StylePainter -{ +class StylePainter { public: explicit StylePainter(const RenderObject::PaintInfo& paintInfo); explicit StylePainter(GraphicsContext* context); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp index eda14463c6..def1995122 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp @@ -51,14 +51,14 @@ static QWidget* qwidgetForPage(const Page* page) return frameView->qwidget(); } - + FloatRect screenRect(const Page* page) { QWidget* qw = qwidgetForPage(page); if (!qw) return FloatRect(); - // Taken from KGlobalSettings::desktopGeometry + // Taken from KGlobalSettings::desktopGeometry QDesktopWidget* dw = QApplication::desktop(); if (!dw) return FloatRect(); @@ -81,7 +81,7 @@ FloatRect usableScreenRect(const Page* page) if (!qw) return FloatRect(); - // Taken from KGlobalSettings::desktopGeometry + // Taken from KGlobalSettings::desktopGeometry QDesktopWidget* dw = QApplication::desktop(); if (!dw) return FloatRect(); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp index 29a999784a..8eac15f9f2 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp @@ -72,8 +72,8 @@ bool Scrollbar::contextMenu(const PlatformMouseEvent& event) const QPoint globalPos = QPoint(event.globalX(), event.globalY()); QAction* actionSelected = menu.exec(globalPos); - if (actionSelected == 0) - /* Do nothing */ ; + if (!actionSelected) + { /* Do nothing */ } else if (actionSelected == actScrollHere) { const QPoint pos = convertFromContainingWindow(event.pos()); moveThumb(horizontal ? pos.x() : pos.y()); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp index 3851dfe311..561e55f818 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp @@ -71,29 +71,29 @@ static QStyle::SubControl scPart(const ScrollbarPart& part) case ForwardButtonEndPart: return QStyle::SC_ScrollBarAddLine; } - + return QStyle::SC_None; } -static ScrollbarPart scrollbarPart(const QStyle::SubControl& sc) -{ - switch (sc) { - case QStyle::SC_None: - return NoPart; - case QStyle::SC_ScrollBarSubLine: - return BackButtonStartPart; - case QStyle::SC_ScrollBarSubPage: - return BackTrackPart; - case QStyle::SC_ScrollBarSlider: - return ThumbPart; - case QStyle::SC_ScrollBarAddPage: - return ForwardTrackPart; - case QStyle::SC_ScrollBarAddLine: - return ForwardButtonStartPart; +static ScrollbarPart scrollbarPart(const QStyle::SubControl& sc) +{ + switch (sc) { + case QStyle::SC_None: + return NoPart; + case QStyle::SC_ScrollBarSubLine: + return BackButtonStartPart; + case QStyle::SC_ScrollBarSubPage: + return BackTrackPart; + case QStyle::SC_ScrollBarSlider: + return ThumbPart; + case QStyle::SC_ScrollBarAddPage: + return ForwardTrackPart; + case QStyle::SC_ScrollBarAddLine: + return ForwardButtonStartPart; } - return NoPart; + return NoPart; } - + static QStyleOptionSlider* styleOptionSlider(Scrollbar* scrollbar, QWidget* widget = 0) { static QStyleOptionSlider opt; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h index 787b15add8..6ca44eada2 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h @@ -40,7 +40,7 @@ public: virtual ScrollbarPart hitTest(Scrollbar*, const PlatformMouseEvent&); virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&); - + virtual void invalidatePart(Scrollbar*, ScrollbarPart); virtual int thumbPosition(Scrollbar*); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp index 38ba6d10e2..8d62226fd2 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp @@ -31,7 +31,7 @@ namespace WebCore { PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& fileName) -{ +{ if (fileName.isEmpty()) return 0; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp index f76eb43dd5..8ef598fa28 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp @@ -75,22 +75,49 @@ using namespace WebCore; #if defined(Q_OS_WINCE) -Vector<String> PluginDatabase::defaultPluginDirectories() { notImplemented(); return Vector<String>(); } -void PluginDatabase::getPluginPathsInDirectories(HashSet<String>& paths) const { notImplemented(); } -bool PluginDatabase::isPreferredPluginDirectory(const String& directory) { notImplemented(); return false; } +Vector<String> PluginDatabase::defaultPluginDirectories() +{ + notImplemented(); + return Vector<String>(); +} + +void PluginDatabase::getPluginPathsInDirectories(HashSet<String>& paths) const +{ + notImplemented(); +} + +bool PluginDatabase::isPreferredPluginDirectory(const String& directory) +{ + notImplemented(); + return false; +} #endif namespace WebCore { -void getSupportedKeySizes(Vector<String>&) { notImplemented(); } -String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url) { return String(); } +void getSupportedKeySizes(Vector<String>&) +{ + notImplemented(); +} + +String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url) +{ + return String(); +} #if !defined(Q_OS_WIN) // defined in win/SystemTimeWin.cpp, which is compiled for the Qt/Windows port -float userIdleTime() { notImplemented(); return FLT_MAX; } // return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed +float userIdleTime() +{ + notImplemented(); + return FLT_MAX; // return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed +} #endif -void prefetchDNS(const String& hostname) { notImplemented(); } +void prefetchDNS(const String& hostname) +{ + notImplemented(); +} } diff --git a/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp index d9b57b2a6e..9a4e32a36e 100644 --- a/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp +++ b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp @@ -150,6 +150,18 @@ int SQLiteDatabase::pageSize() return m_pageSize; } +int64_t SQLiteDatabase::freeSpaceSize() +{ + MutexLocker locker(m_authorizerLock); + enableAuthorizer(false); + // Note: freelist_count was added in SQLite 3.4.1. + SQLiteStatement statement(*this, "PRAGMA freelist_count"); + int64_t size = statement.getColumnInt64(0) * pageSize(); + + enableAuthorizer(true); + return size; +} + void SQLiteDatabase::setSynchronous(SynchronousPragma sync) { executeCommand(String::format("PRAGMA synchronous = %i", sync)); diff --git a/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.h b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.h index 76700dc0c5..d313435818 100644 --- a/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.h +++ b/src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.h @@ -83,6 +83,9 @@ public: int64_t maximumSize(); void setMaximumSize(int64_t); + // Gets the number of unused bytes in the database file. + int64_t freeSpaceSize(); + // The SQLite SYNCHRONOUS pragma can be either FULL, NORMAL, or OFF // FULL - Any writing calls to the DB block until the data is actually on the disk surface // NORMAL - SQLite pauses at some critical moments when writing, but much less than FULL diff --git a/src/3rdparty/webkit/WebCore/platform/text/CharacterNames.h b/src/3rdparty/webkit/WebCore/platform/text/CharacterNames.h index 5b1a33780a..cd09447392 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/CharacterNames.h +++ b/src/3rdparty/webkit/WebCore/platform/text/CharacterNames.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -37,22 +37,26 @@ namespace WebCore { const UChar blackSquare = 0x25A0; const UChar bullet = 0x2022; + const UChar hebrewPunctuationGeresh = 0x05F3; const UChar hebrewPunctuationGershayim = 0x05F4; const UChar horizontalEllipsis = 0x2026; - const UChar ideographicSpace = 0x3000; const UChar ideographicComma = 0x3001; const UChar ideographicFullStop = 0x3002; - const UChar leftToRightMark = 0x200E; + const UChar ideographicSpace = 0x3000; + const UChar leftDoubleQuotationMark = 0x201C; + const UChar leftSingleQuotationMark = 0x2018; const UChar leftToRightEmbed = 0x202A; + const UChar leftToRightMark = 0x200E; const UChar leftToRightOverride = 0x202D; const UChar newlineCharacter = 0x000A; const UChar noBreakSpace = 0x00A0; const UChar objectReplacementCharacter = 0xFFFC; const UChar popDirectionalFormatting = 0x202C; const UChar replacementCharacter = 0xFFFD; + const UChar rightDoubleQuotationMark = 0x201D; const UChar rightSingleQuotationMark = 0x2019; - const UChar rightToLeftMark = 0x200F; const UChar rightToLeftEmbed = 0x202B; + const UChar rightToLeftMark = 0x200F; const UChar rightToLeftOverride = 0x202E; const UChar softHyphen = 0x00AD; const UChar whiteBullet = 0x25E6; diff --git a/src/3rdparty/webkit/WebCore/platform/text/StringBuffer.h b/src/3rdparty/webkit/WebCore/platform/text/StringBuffer.h index 28d4e897ba..353a44a0c3 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/StringBuffer.h +++ b/src/3rdparty/webkit/WebCore/platform/text/StringBuffer.h @@ -35,7 +35,7 @@ namespace WebCore { -class StringBuffer : Noncopyable { +class StringBuffer : public Noncopyable { public: explicit StringBuffer(unsigned length) : m_length(length) diff --git a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.cpp b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.cpp index cd8fdbd002..8cbcc0d95c 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.cpp @@ -205,24 +205,26 @@ bool StringImpl::containsOnlyWhitespace() return true; } -PassRefPtr<StringImpl> StringImpl::substring(unsigned pos, unsigned len) +PassRefPtr<StringImpl> StringImpl::substring(unsigned start, unsigned length) { - if (pos >= m_length) + if (start >= m_length) return empty(); - if (len > m_length - pos) - len = m_length - pos; - return create(m_data + pos, len); + unsigned maxLength = m_length - start; + if (length >= maxLength) { + if (!start) + return this; + length = maxLength; + } + return create(m_data + start, length); } -PassRefPtr<StringImpl> StringImpl::substringCopy(unsigned pos, unsigned len) +PassRefPtr<StringImpl> StringImpl::substringCopy(unsigned start, unsigned length) { - if (pos >= m_length) - pos = m_length; - if (len > m_length - pos) - len = m_length - pos; - if (!len) + start = min(start, m_length); + length = min(length, m_length - start); + if (!length) return adoptRef(new StringImpl); - return substring(pos, len); + return create(m_data + start, length); } UChar32 StringImpl::characterStartingAt(unsigned i) diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorICU.cpp b/src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorICU.cpp index c4fc1b0ee7..c922fbc842 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorICU.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorICU.cpp @@ -160,7 +160,7 @@ TextBreakIterator* cursorMovementIterator(const UChar* string, int length) "$LF = [\\p{Grapheme_Cluster_Break = LF}];" "$Control = [\\p{Grapheme_Cluster_Break = Control}];" "$VoiceMarks = [\\uFF9E\\uFF9F];" // Japanese half-width katakana voiced marks - "$Extend = [\\p{Grapheme_Cluster_Break = Extend} $VoiceMarks];" + "$Extend = [\\p{Grapheme_Cluster_Break = Extend} $VoiceMarks - [\\u0E30 \\u0E32 \\u0E45 \\u0EB0 \\u0EB2]];" "$SpacingMark = [[\\p{General_Category = Spacing Mark}] - $Extend];" "$L = [\\p{Grapheme_Cluster_Break = L}];" "$V = [\\p{Grapheme_Cluster_Break = V}];" diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h b/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h index df42582947..3c74165d38 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h +++ b/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h @@ -56,7 +56,7 @@ namespace WebCore { typedef char UnencodableReplacementArray[32]; - class TextCodec : Noncopyable { + class TextCodec : public Noncopyable { public: virtual ~TextCodec(); diff --git a/src/3rdparty/webkit/WebCore/platform/text/qt/StringQt.cpp b/src/3rdparty/webkit/WebCore/platform/text/qt/StringQt.cpp index 97bbf40b11..62aa9794ed 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/qt/StringQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/qt/StringQt.cpp @@ -41,7 +41,7 @@ String::String(const QString& qstr) String::String(const QStringRef& ref) { - if (!ref.string()) + if (!ref.string()) return; m_impl = StringImpl::create(reinterpret_cast<const UChar*>(ref.unicode()), ref.length()); } diff --git a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBoundaries.cpp b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBoundaries.cpp index bdc851b930..ffc4c44bd3 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBoundaries.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBoundaries.cpp @@ -39,8 +39,7 @@ #if QT_VERSION >= 0x040400 #include <qtextboundaryfinder.h> -namespace WebCore -{ +namespace WebCore { int findNextWordFromIndex(UChar const* buffer, int len, int position, bool forward) { @@ -78,9 +77,8 @@ void findWordBoundary(UChar const* buffer, int len, int position, int* start, in } #else -namespace WebCore -{ - +namespace WebCore { + int findNextWordFromIndex(UChar const* buffer, int len, int position, bool forward) { QString str(reinterpret_cast<QChar const*>(buffer), len); diff --git a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp index 06e8f37416..d80e270b78 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp @@ -36,8 +36,7 @@ namespace WebCore { - class TextBreakIterator : public QTextBoundaryFinder - { + class TextBreakIterator : public QTextBoundaryFinder { }; static QTextBoundaryFinder* iterator = 0; static unsigned char buffer[1024]; @@ -138,17 +137,18 @@ namespace WebCore { namespace WebCore { - class TextBreakIterator - { + class TextBreakIterator { public: virtual int first() = 0; virtual int next() = 0; virtual int previous() = 0; - inline int following(int pos) { + inline int following(int pos) + { currentPos = pos; return next(); } - inline int preceding(int pos) { + inline int preceding(int pos) + { currentPos = pos; return previous(); } @@ -157,16 +157,14 @@ namespace WebCore { int length; }; - class WordBreakIteratorQt : public TextBreakIterator - { + class WordBreakIteratorQt : public TextBreakIterator { public: virtual int first(); virtual int next(); virtual int previous(); }; - class CharBreakIteratorQt : public TextBreakIterator - { + class CharBreakIteratorQt : public TextBreakIterator { public: virtual int first(); virtual int next(); @@ -174,12 +172,14 @@ namespace WebCore { QTextLayout layout; }; - int WordBreakIteratorQt::first() { + int WordBreakIteratorQt::first() + { currentPos = 0; return currentPos; } - int WordBreakIteratorQt::next() { + int WordBreakIteratorQt::next() + { if (currentPos >= length) { currentPos = -1; return currentPos; @@ -194,7 +194,9 @@ namespace WebCore { } return currentPos; } - int WordBreakIteratorQt::previous() { + + int WordBreakIteratorQt::previous() + { if (currentPos <= 0) { currentPos = -1; return currentPos; @@ -210,18 +212,22 @@ namespace WebCore { return currentPos; } - int CharBreakIteratorQt::first() { + int CharBreakIteratorQt::first() + { currentPos = 0; return currentPos; } - int CharBreakIteratorQt::next() { + int CharBreakIteratorQt::next() + { if (currentPos >= length) return -1; currentPos = layout.nextCursorPosition(currentPos); return currentPos; } - int CharBreakIteratorQt::previous() { + + int CharBreakIteratorQt::previous() + { if (currentPos <= 0) return -1; currentPos = layout.previousCursorPosition(currentPos); @@ -252,7 +258,7 @@ TextBreakIterator* characterBreakIterator(const UChar* string, int length) iterator->length = length; iterator->currentPos = 0; iterator->layout.setText(QString(reinterpret_cast<const QChar*>(string), length)); - + return iterator; } diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp index 8626277aa6..de1c298e0e 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp @@ -34,14 +34,17 @@ namespace WebCore { -PluginDatabase* PluginDatabase::installedPlugins() +PluginDatabase* PluginDatabase::installedPlugins(bool populate) { static PluginDatabase* plugins = 0; - + if (!plugins) { plugins = new PluginDatabase; - plugins->setPluginDirectories(PluginDatabase::defaultPluginDirectories()); - plugins->refresh(); + + if (populate) { + plugins->setPluginDirectories(PluginDatabase::defaultPluginDirectories()); + plugins->refresh(); + } } return plugins; @@ -64,7 +67,7 @@ void PluginDatabase::addExtraPluginDirectory(const String& directory) } bool PluginDatabase::refresh() -{ +{ bool pluginSetChanged = false; if (!m_plugins.isEmpty()) { @@ -264,6 +267,14 @@ void PluginDatabase::remove(PluginPackage* package) m_pluginsByPath.remove(package->path()); } +void PluginDatabase::clear() +{ + m_plugins.clear(); + m_pluginsByPath.clear(); + m_pluginPathsWithTimes.clear(); + m_registeredMIMETypes.clear(); +} + #if !PLATFORM(WIN_OS) || PLATFORM(WX) // For Safari/Win the following three methods are implemented // in PluginDatabaseWin.cpp, but if we can use WebCore constructs diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h b/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h index 58839a295d..b8d2bfe5a0 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h +++ b/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora, Ltd. All rights reserved. + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -42,12 +43,18 @@ namespace WebCore { class PluginPackage; typedef HashSet<RefPtr<PluginPackage>, PluginPackageHash> PluginSet; - + class PluginDatabase { public: - static PluginDatabase* installedPlugins(); + // The first call to installedPlugins creates the plugin database + // and by default populates it with the plugins installed on the system. + // For testing purposes, it is possible to not populate the database + // automatically, as the plugins might affect the DRT results by + // writing to a.o. stderr. + static PluginDatabase* installedPlugins(bool populate = true); bool refresh(); + void clear(); Vector<PluginPackage*> plugins() const; bool isMIMETypeRegistered(const String& mimeType); void addExtraPluginDirectory(const String&); @@ -57,9 +64,13 @@ namespace WebCore { PluginPackage* findPlugin(const KURL&, String& mimeType); - private: - void setPluginDirectories(const Vector<String>& directories) { m_pluginDirectories = directories; } + void setPluginDirectories(const Vector<String>& directories) + { + clear(); + m_pluginDirectories = directories; + } + private: void getPluginPathsInDirectories(HashSet<String>&) const; void getDeletedPlugins(PluginSet&) const; diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginDebug.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginDebug.cpp new file mode 100644 index 0000000000..ace8b21a6c --- /dev/null +++ b/src/3rdparty/webkit/WebCore/plugins/PluginDebug.cpp @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "PluginDebug.h" +#include "PlatformString.h" + +#if !LOG_DISABLED + +namespace WebCore { + +static const char* const errorStrings[] = { + "No errors occurred.", /* NPERR_NO_ERROR */ + "Error with no specific error code occurred.", /* NPERR_GENERIC_ERROR */ + "Invalid instance passed to the plug-in.", /* NPERR_INVALID_INSTANCE_ERROR */ + "Function table invalid.", /* NPERR_INVALID_FUNCTABLE_ERROR */ + "Loading of plug-in failed.", /* NPERR_MODULE_LOAD_FAILED_ERROR */ + "Memory allocation failed.", /* NPERR_OUT_OF_MEMORY_ERROR */ + "Plug-in missing or invalid.", /* NPERR_INVALID_PLUGIN_ERROR */ + "Plug-in directory missing or invalid.", /* NPERR_INVALID_PLUGIN_DIR_ERROR */ + "Versions of plug-in and Communicator do not match.", /* NPERR_INCOMPATIBLE_VERSION_ERROR */ + "Parameter missing or invalid.", /* NPERR_INVALID_PARAM */ + "URL missing or invalid.", /* NPERR_INVALID_URL */ + "File missing or invalid.", /* NPERR_FILE_NOT_FOUND */ + "Stream contains no data.", /* NPERR_NO_DATA */ + "Seekable stream expected.", /* NPERR_STREAM_NOT_SEEKABLE */ + "Unknown error code" +}; + +#ifdef XP_MACOSX +static const char* const drawingModels[] = { + "NPDrawingModelQuickDraw", + "NPDrawingModelCoreGraphics", + "NPDrawingModelOpenGL", + "NPDrawingModelCoreAnimation" +}; + +static const char* const eventModels[] = { + "NPEventModelCarbon", + "NPEventModelCocoa" +}; +#endif //XP_MACOSX + +const char* prettyNameForNPError(NPError error) +{ + return errorStrings[error]; +} + +#ifdef XP_MACOSX +const char* prettyNameForDrawingModel(NPDrawingModel drawingModel) +{ + return drawingModels[drawingModel]; +} + +const char* prettyNameForEventModel(NPEventModel eventModel) +{ + return eventModels[eventModel]; +} +#endif //XP_MACOSX + +CString prettyNameForNPNVariable(NPNVariable variable) +{ + switch (variable) { + case NPNVxDisplay: return "NPNVxDisplay"; + case NPNVxtAppContext: return "NPNVxtAppContext"; + case NPNVnetscapeWindow: return "NPNVnetscapeWindow"; + case NPNVjavascriptEnabledBool: return "NPNVjavascriptEnabledBool"; + case NPNVasdEnabledBool: return "NPNVasdEnabledBool"; + case NPNVisOfflineBool: return "NPNVisOfflineBool"; + + case NPNVserviceManager: return "NPNVserviceManager (not supported)"; + case NPNVDOMElement: return "NPNVDOMElement (not supported)"; + case NPNVDOMWindow: return "NPNVDOMWindow (not supported)"; + case NPNVToolkit: return "NPNVToolkit (not supported)"; + case NPNVSupportsXEmbedBool: return "NPNVSupportsXEmbedBool (not supported)"; + + case NPNVWindowNPObject: return "NPNVWindowNPObject"; + case NPNVPluginElementNPObject: return "NPNVPluginElementNPObject"; + case NPNVSupportsWindowless: return "NPNVSupportsWindowless"; + case NPNVprivateModeBool: return "NPNVprivateModeBool"; + +#ifdef XP_MACOSX + case NPNVpluginDrawingModel: return "NPNVpluginDrawingModel"; +#ifndef NP_NO_QUICKDRAW + case NPNVsupportsQuickDrawBool: return "NPNVsupportsQuickDrawBool"; +#endif + case NPNVsupportsCoreGraphicsBool: return "NPNVsupportsCoreGraphicsBool"; + case NPNVsupportsOpenGLBool: return "NPNVsupportsOpenGLBool"; + case NPNVsupportsCoreAnimationBool: return "NPNVsupportsCoreAnimationBool"; +#ifndef NP_NO_CARBON + case NPNVsupportsCarbonBool: return "NPNVsupportsCarbonBool"; +#endif + case NPNVsupportsCocoaBool: return "NPNVsupportsCocoaBool"; +#endif + + default: return "Unknown variable"; + } +} + +CString prettyNameForNPPVariable(NPPVariable variable, void* value) +{ + switch (variable) { + case NPPVpluginNameString: return "NPPVpluginNameString"; + case NPPVpluginDescriptionString: return "NPPVpluginDescriptionString"; + case NPPVpluginWindowBool: return "NPPVpluginWindowBool"; + case NPPVpluginTransparentBool: return "NPPVpluginTransparentBool"; + + case NPPVjavaClass: return "NPPVjavaClass (not supported)"; + case NPPVpluginWindowSize: return "NPPVpluginWindowSize (not supported)"; + case NPPVpluginTimerInterval: return "NPPVpluginTimerInterval (not supported)"; + case NPPVpluginScriptableInstance: return "NPPVpluginScriptableInstance (not supported)"; + case NPPVpluginScriptableIID: return "NPPVpluginScriptableIID (not supported)"; + case NPPVjavascriptPushCallerBool: return "NPPVjavascriptPushCallerBool (not supported)"; + case NPPVpluginKeepLibraryInMemory: return "NPPVpluginKeepLibraryInMemory (not supported)"; + case NPPVpluginNeedsXEmbed: return "NPPVpluginNeedsXEmbed (not supported)"; + + case NPPVpluginScriptableNPObject: return "NPPVpluginScriptableNPObject"; + + case NPPVformValue: return "NPPVformValue (not supported)"; + case NPPVpluginUrlRequestsDisplayedBool: return "NPPVpluginUrlRequestsDisplayedBool (not supported)"; + + case NPPVpluginWantsAllNetworkStreams: return "NPPVpluginWantsAllNetworkStreams"; + case NPPVpluginCancelSrcStream: return "NPPVpluginCancelSrcStream"; + +#ifdef XP_MACOSX + case NPPVpluginDrawingModel: { + String result("NPPVpluginDrawingModel, "); + result.append(prettyNameForDrawingModel(NPDrawingModel(uintptr_t(value)))); + return result.latin1(); + } + case NPPVpluginEventModel: { + String result("NPPVpluginEventModel, "); + result.append(prettyNameForEventModel(NPEventModel(uintptr_t(value)))); + return result.latin1(); + } + case NPPVpluginCoreAnimationLayer: return "NPPVpluginCoreAnimationLayer"; +#endif + + default: return "Unknown variable"; + } +} + +} // namespace WebCore + +#endif // !LOG_DISABLED diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginDebug.h b/src/3rdparty/webkit/WebCore/plugins/PluginDebug.h index 54a49f6499..5b84393ad1 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginDebug.h +++ b/src/3rdparty/webkit/WebCore/plugins/PluginDebug.h @@ -28,30 +28,27 @@ #include "Logging.h" #include "npruntime_internal.h" +#include "CString.h" + +#define LOG_NPERROR(err) if (err != NPERR_NO_ERROR) LOG_VERBOSE(Plugins, "%s\n", prettyNameForNPError(err)) +#define LOG_PLUGIN_NET_ERROR() LOG_VERBOSE(Plugins, "Stream failed due to problems with network, disk I/O, lack of memory, or other problems.\n") #if !LOG_DISABLED -static const char* const errorStrings[] = { - "No errors occurred.", /* NPERR_NO_ERROR */ - "Error with no specific error code occurred.", /* NPERR_GENERIC_ERROR */ - "Invalid instance passed to the plug-in.", /* NPERR_INVALID_INSTANCE_ERROR */ - "Function table invalid.", /* NPERR_INVALID_FUNCTABLE_ERROR */ - "Loading of plug-in failed.", /* NPERR_MODULE_LOAD_FAILED_ERROR */ - "Memory allocation failed.", /* NPERR_OUT_OF_MEMORY_ERROR */ - "Plug-in missing or invalid.", /* NPERR_INVALID_PLUGIN_ERROR */ - "Plug-in directory missing or invalid.", /* NPERR_INVALID_PLUGIN_DIR_ERROR */ - "Versions of plug-in and Communicator do not match.", /* NPERR_INCOMPATIBLE_VERSION_ERROR */ - "Parameter missing or invalid.", /* NPERR_INVALID_PARAM */ - "URL missing or invalid.", /* NPERR_INVALID_URL */ - "File missing or invalid.", /* NPERR_FILE_NOT_FOUND */ - "Stream contains no data.", /* NPERR_NO_DATA */ - "Seekable stream expected.", /* NPERR_STREAM_NOT_SEEKABLE */ - "Unknown error code" -}; +namespace WebCore { -#endif +const char* prettyNameForNPError(NPError error); -#define LOG_NPERROR(err) if (err != NPERR_NO_ERROR) LOG_VERBOSE(Plugins, "%s\n", errorStrings[err]) -#define LOG_PLUGIN_NET_ERROR() LOG_VERBOSE(Plugins, "Stream failed due to problems with network, disk I/O, lack of memory, or other problems.\n") +CString prettyNameForNPNVariable(NPNVariable variable); +CString prettyNameForNPPVariable(NPPVariable variable, void* value); +#ifdef XP_MACOSX +const char* prettyNameForDrawingModel(NPDrawingModel drawingModel); +const char* prettyNameForEventModel(NPEventModel eventModel); #endif + +} // namespace WebCore + +#endif // !LOG_DISABLED + +#endif // PluginDebug_h diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp index 8737572a01..2cecdc4e77 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp @@ -162,7 +162,7 @@ bool PluginView::start() NPError npErr; { PluginView::setCurrentPluginView(this); - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); npErr = m_plugin->pluginFuncs()->newp((NPMIMEType)m_mimeType.data(), m_instance, m_mode, m_paramCount, m_paramNames, m_paramValues, NULL); setCallingPlugin(false); @@ -209,7 +209,7 @@ static bool getString(ScriptController* proxy, JSValue result, String& string) { if (!proxy || !result || result.isUndefined()) return false; - JSLock lock(false); + JSLock lock(JSC::SilenceAssertionsOnly); ExecState* exec = proxy->globalObject()->globalExec(); UString ustring = result.toString(exec); @@ -248,7 +248,7 @@ void PluginView::performRequest(PluginRequest* request) // FIXME: <rdar://problem/4807469> This should be sent when the document has finished loading if (request->sendNotification()) { PluginView::setCurrentPluginView(this); - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); m_plugin->pluginFuncs()->urlnotify(m_instance, requestURL.string().utf8().data(), NPRES_DONE, request->notifyData()); setCallingPlugin(false); @@ -418,6 +418,8 @@ void PluginView::status(const char* message) NPError PluginView::setValue(NPPVariable variable, void* value) { + LOG(Plugins, "PluginView::setValue(%s): ", prettyNameForNPPVariable(variable, value).data()); + switch (variable) { case NPPVpluginWindowBool: m_isWindowed = value; @@ -426,11 +428,49 @@ NPError PluginView::setValue(NPPVariable variable, void* value) m_isTransparent = value; return NPERR_NO_ERROR; #if defined(XP_MACOSX) - case NPPVpluginDrawingModel: - return NPERR_NO_ERROR; - case NPPVpluginEventModel: - return NPERR_NO_ERROR; + case NPPVpluginDrawingModel: { + // Can only set drawing model inside NPP_New() + if (this != currentPluginView()) + return NPERR_GENERIC_ERROR; + + NPDrawingModel newDrawingModel = NPDrawingModel(uintptr_t(value)); + switch (newDrawingModel) { + case NPDrawingModelCoreGraphics: + m_drawingModel = newDrawingModel; + return NPERR_NO_ERROR; +#ifndef NP_NO_QUICKDRAW + case NPDrawingModelQuickDraw: +#endif + case NPDrawingModelCoreAnimation: + default: + LOG(Plugins, "Plugin asked for unsupported drawing model: %s", + prettyNameForDrawingModel(newDrawingModel)); + return NPERR_GENERIC_ERROR; + } + } + + case NPPVpluginEventModel: { + // Can only set event model inside NPP_New() + if (this != currentPluginView()) + return NPERR_GENERIC_ERROR; + + NPEventModel newEventModel = NPEventModel(uintptr_t(value)); + switch (newEventModel) { +#ifndef NP_NO_CARBON + case NPEventModelCarbon: #endif + case NPEventModelCocoa: + m_eventModel = newEventModel; + return NPERR_NO_ERROR; + + default: + LOG(Plugins, "Plugin asked for unsupported event model: %s", + prettyNameForEventModel(newEventModel)); + return NPERR_GENERIC_ERROR; + } + } +#endif // defined(XP_MACOSX) + default: notImplemented(); return NPERR_GENERIC_ERROR; @@ -493,7 +533,7 @@ PassRefPtr<JSC::Bindings::Instance> PluginView::bindingInstance() NPError npErr; { PluginView::setCurrentPluginView(this); - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); npErr = m_plugin->pluginFuncs()->getvalue(m_instance, NPPVpluginScriptableNPObject, &object); setCallingPlugin(false); @@ -584,6 +624,10 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p #if (PLATFORM(QT) && PLATFORM(WIN_OS)) || defined(XP_MACOSX) , m_window(0) #endif +#if defined(XP_MACOSX) + , m_drawingModel(NPDrawingModel(-1)) + , m_eventModel(NPEventModel(-1)) +#endif , m_loadManually(loadManually) , m_manualStream(0) , m_isJavaScriptPaused(false) @@ -601,8 +645,9 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p setParameters(paramNames, paramValues); -#ifdef XP_UNIX - m_npWindow.ws_info = 0; + memset(&m_npWindow, 0, sizeof(m_npWindow)); +#if defined(XP_MACOSX) + memset(&m_npCgContext, 0, sizeof(m_npCgContext)); #endif m_mode = m_loadManually ? NP_FULL : NP_EMBED; diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.h b/src/3rdparty/webkit/WebCore/plugins/PluginView.h index 3ed6756dc0..95d73db5e4 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginView.h +++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.h @@ -293,6 +293,8 @@ private: #elif defined(XP_MACOSX) NP_CGContext m_npCgContext; OwnPtr<Timer<PluginView> > m_nullEventTimer; + NPDrawingModel m_drawingModel; + NPEventModel m_eventModel; void setNPWindowIfNeeded(); void nullEventTimerFired(Timer<PluginView>*); diff --git a/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp b/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp index ce0f859d1c..721ec29099 100644 --- a/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp @@ -127,6 +127,8 @@ static inline IntPoint topLevelOffsetFor(PlatformWidget widget) void PluginView::init() { + LOG(Plugins, "PluginView::init(): Initializing plug-in '%s'", m_plugin->name().utf8().data()); + if (m_haveInitialized) return; m_haveInitialized = true; @@ -144,23 +146,54 @@ void PluginView::init() if (!start()) { m_status = PluginStatusCanNotLoadPlugin; + stop(); // Make sure we unregister the plugin return; } - setPlatformPluginWidget(m_parentFrame->view()->hostWindow()->platformWindow()); + if (m_drawingModel == NPDrawingModel(-1)) { + // We default to QuickDraw, even though we don't support it, + // since that's what Safari does, and some plugins expect this + // behavior and never set the drawing model explicitly. +#ifndef NP_NO_QUICKDRAW + m_drawingModel = NPDrawingModelQuickDraw; +#else + // QuickDraw not available, so we have to default to CoreGraphics + m_drawingModel = NPDrawingModelCoreGraphics; +#endif + } - m_npCgContext.window = 0; - m_npCgContext.context = 0; - m_npWindow.window = (void*)&m_npCgContext; - m_npWindow.type = NPWindowTypeWindow; - m_npWindow.x = 0; - m_npWindow.y = 0; - m_npWindow.width = 0; - m_npWindow.height = 0; - m_npWindow.clipRect.left = 0; - m_npWindow.clipRect.top = 0; - m_npWindow.clipRect.right = 0; - m_npWindow.clipRect.bottom = 0; + if (m_eventModel == NPEventModel(-1)) { + // If the plug-in did not specify an event model + // we default to Carbon, when it is available. +#ifndef NP_NO_CARBON + m_eventModel = NPEventModelCarbon; +#else + m_eventModel = NPEventModelCocoa; +#endif + } + + // Gracefully handle unsupported drawing or event models. We can do this + // now since the drawing and event model can only be set during NPP_New. + NPBool eventModelSupported, drawingModelSupported; + if (getValueStatic(NPNVariable(NPNVsupportsCarbonBool + m_eventModel), &eventModelSupported) != NPERR_NO_ERROR + || !eventModelSupported) { + m_status = PluginStatusCanNotLoadPlugin; + LOG(Plugins, "Plug-in '%s' uses unsupported event model %s", + m_plugin->name().utf8().data(), prettyNameForEventModel(m_eventModel)); + stop(); + return; + } + + if (getValueStatic(NPNVariable(NPNVsupportsQuickDrawBool + m_drawingModel), &drawingModelSupported) != NPERR_NO_ERROR + || !drawingModelSupported) { + m_status = PluginStatusCanNotLoadPlugin; + LOG(Plugins, "Plug-in '%s' uses unsupported drawing model %s", + m_plugin->name().utf8().data(), prettyNameForDrawingModel(m_drawingModel)); + stop(); + return; + } + + setPlatformPluginWidget(m_parentFrame->view()->hostWindow()->platformWindow()); show(); @@ -173,6 +206,8 @@ void PluginView::init() PluginView::~PluginView() { + LOG(Plugins, "PluginView::~PluginView()"); + stop(); deleteAllValues(m_requests); @@ -193,6 +228,8 @@ void PluginView::stop() if (!m_isStarted) return; + LOG(Plugins, "PluginView::stop(): Stopping plug-in '%s'", m_plugin->name().utf8().data()); + HashSet<RefPtr<PluginStream> > streams = m_streams; HashSet<RefPtr<PluginStream> >::iterator end = streams.end(); for (HashSet<RefPtr<PluginStream> >::iterator it = streams.begin(); it != end; ++it) { @@ -204,7 +241,7 @@ void PluginView::stop() m_isStarted = false; - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); PluginMainThreadScheduler::scheduler().unregisterPlugin(m_instance); @@ -218,9 +255,11 @@ void PluginView::stop() m_instance->pdata = 0; } +// Used before the plugin view has been initialized properly, and as a +// fallback for variables that do not require a view to resolve. NPError PluginView::getValueStatic(NPNVariable variable, void* value) { - LOG(Plugins, "PluginView::getValueStatic(%d)", variable); + LOG(Plugins, "PluginView::getValueStatic(%s)", prettyNameForNPNVariable(variable).data()); switch (variable) { case NPNVToolkit: @@ -231,14 +270,39 @@ NPError PluginView::getValueStatic(NPNVariable variable, void* value) *static_cast<NPBool*>(value) = true; return NPERR_NO_ERROR; +#ifndef NP_NO_CARBON + case NPNVsupportsCarbonBool: + *static_cast<NPBool*>(value) = true; + return NPERR_NO_ERROR; + +#endif + case NPNVsupportsCocoaBool: + *static_cast<NPBool*>(value) = false; + return NPERR_NO_ERROR; + + // CoreGraphics is the only drawing model we support + case NPNVsupportsCoreGraphicsBool: + *static_cast<NPBool*>(value) = true; + return NPERR_NO_ERROR; + +#ifndef NP_NO_QUICKDRAW + // QuickDraw is deprecated in 10.5 and not supported on 64-bit + case NPNVsupportsQuickDrawBool: +#endif + case NPNVsupportsOpenGLBool: + case NPNVsupportsCoreAnimationBool: + *static_cast<NPBool*>(value) = false; + return NPERR_NO_ERROR; + default: return NPERR_GENERIC_ERROR; } } +// Used only for variables that need a view to resolve NPError PluginView::getValue(NPNVariable variable, void* value) { - LOG(Plugins, "PluginView::getValue(%d)", variable); + LOG(Plugins, "PluginView::getValue(%s)", prettyNameForNPNVariable(variable).data()); switch (variable) { case NPNVWindowNPObject: { @@ -278,10 +342,6 @@ NPError PluginView::getValue(NPNVariable variable, void* value) return NPERR_NO_ERROR; } - case NPNVsupportsCoreGraphicsBool: - *static_cast<NPBool*>(value) = true; - return NPERR_NO_ERROR; - default: return getValueStatic(variable, value); } @@ -289,6 +349,8 @@ NPError PluginView::getValue(NPNVariable variable, void* value) } void PluginView::setParent(ScrollView* parent) { + LOG(Plugins, "PluginView::setParent(%p)", parent); + Widget::setParent(parent); if (parent) @@ -363,6 +425,7 @@ void PluginView::setNPWindowIfNeeded() if (!newWindowRef) return; + m_npWindow.type = NPWindowTypeWindow; m_npWindow.window = (void*)&m_npCgContext; m_npCgContext.window = newWindowRef; m_npCgContext.context = newContextRef; @@ -378,8 +441,13 @@ void PluginView::setNPWindowIfNeeded() m_npWindow.clipRect.right = m_windowRect.x() + m_windowRect.width(); m_npWindow.clipRect.bottom = m_windowRect.y() + m_windowRect.height(); + LOG(Plugins, "PluginView::setNPWindowIfNeeded(): window=%p, context=%p," + " window.x:%d window.y:%d window.width:%d window.height:%d window.clipRect size:%dx%d", + newWindowRef, newContextRef, m_npWindow.x, m_npWindow.y, m_npWindow.width, m_npWindow.height, + m_npWindow.clipRect.right - m_npWindow.clipRect.left, m_npWindow.clipRect.bottom - m_npWindow.clipRect.top); + PluginView::setCurrentPluginView(this); - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow); setCallingPlugin(false); @@ -410,7 +478,7 @@ void PluginView::updatePluginWidget() void PluginView::paint(GraphicsContext* context, const IntRect& rect) { - if (!m_isStarted) { + if (!m_isStarted || m_status != PluginStatusLoadedSuccessfully) { paintMissingPluginIcon(context, rect); return; } @@ -467,6 +535,9 @@ void PluginView::forceRedraw() void PluginView::handleMouseEvent(MouseEvent* event) { + if (!m_isStarted) + return; + EventRecord record; if (event->type() == eventNames().mousemoveEvent) { @@ -510,6 +581,9 @@ void PluginView::handleMouseEvent(MouseEvent* event) void PluginView::handleKeyboardEvent(KeyboardEvent* event) { + if (!m_isStarted) + return; + LOG(Plugins, "PluginView::handleKeyboardEvent() ----------------- "); LOG(Plugins, "PV::hKE(): KE.keyCode: 0x%02X, KE.charCode: %d", @@ -638,7 +712,7 @@ Point PluginView::globalMousePosForPlugin() const bool PluginView::dispatchNPEvent(NPEvent& event) { PluginView::setCurrentPluginView(this); - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); bool accepted = m_plugin->pluginFuncs()->event(m_instance, &event); diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp index 4140d898b6..b9c1656b93 100644 --- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp @@ -44,19 +44,19 @@ bool PluginPackage::fetchInfo() typedef char *(*NPP_GetMIMEDescriptionProcPtr)(); NPP_GetMIMEDescriptionProcPtr gm = (NPP_GetMIMEDescriptionProcPtr)m_module->resolve("NP_GetMIMEDescription"); - if (!gm || !gv) { + if (!gm || !gv) return false; - } + char *buf = 0; - NPError err = gv(0, NPPVpluginNameString, (void *)&buf); - if (err != NPERR_NO_ERROR) { + NPError err = gv(0, NPPVpluginNameString, (void*) &buf); + if (err != NPERR_NO_ERROR) return false; - } + m_name = buf; - err = gv(0, NPPVpluginDescriptionString, (void *)&buf); - if (err != NPERR_NO_ERROR) { + err = gv(0, NPPVpluginDescriptionString, (void*) &buf); + if (err != NPERR_NO_ERROR) return false; - } + m_description = buf; determineModuleVersionFromDescription(); @@ -65,7 +65,7 @@ bool PluginPackage::fetchInfo() s.split(UChar(';'), false, types); for (int i = 0; i < types.size(); ++i) { Vector<String> mime; - types[i].split(UChar(':'), true, mime); + types[i].split(UChar(':'), true, mime); if (mime.size() > 0) { Vector<String> exts; if (mime.size() > 1) diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp index 25d61f9891..883c9aa97f 100644 --- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp @@ -209,7 +209,7 @@ void PluginView::setNPWindowIfNeeded() m_npWindow.clipRect.bottom = m_clipRect.height(); PluginView::setCurrentPluginView(this); - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow); setCallingPlugin(false); @@ -243,7 +243,7 @@ void PluginView::stop() m_isStarted = false; - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); PluginMainThreadScheduler::scheduler().unregisterPlugin(m_instance); @@ -287,7 +287,7 @@ const char* PluginView::userAgent() const char* PluginView::userAgentStatic() { - //FIXME - Just say we are Mozilla + // FIXME - Just say we are Mozilla return MozillaUserAgent; } @@ -301,10 +301,10 @@ NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len, const c if (!fileExists(filename)) return NPERR_FILE_NOT_FOUND; - //FIXME - read the file data into buffer + // FIXME - read the file data into buffer FILE* fileHandle = fopen((filename.utf8()).data(), "r"); - if (fileHandle == 0) + if (!fileHandle) return NPERR_FILE_NOT_FOUND; //buffer.resize(); @@ -321,6 +321,8 @@ NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len, const c NPError PluginView::getValueStatic(NPNVariable variable, void* value) { + LOG(Plugins, "PluginView::getValueStatic(%s)", prettyNameForNPNVariable(variable).data()); + switch (variable) { case NPNVToolkit: *static_cast<uint32*>(value) = 0; @@ -341,6 +343,8 @@ NPError PluginView::getValueStatic(NPNVariable variable, void* value) NPError PluginView::getValue(NPNVariable variable, void* value) { + LOG(Plugins, "PluginView::getValue(%s)", prettyNameForNPNVariable(variable).data()); + switch (variable) { case NPNVxDisplay: if (platformPluginWidget()) @@ -474,7 +478,7 @@ void PluginView::init() if (m_plugin->pluginFuncs()->getvalue) { PluginView::setCurrentPluginView(this); - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); m_plugin->pluginFuncs()->getvalue(m_instance, NPPVpluginNeedsXEmbed, &m_needsXEmbed); setCallingPlugin(false); @@ -488,7 +492,7 @@ void PluginView::init() m_status = PluginStatusCanNotLoadPlugin; return; } - show (); + show(); NPSetWindowCallbackStruct *wsi = new NPSetWindowCallbackStruct(); diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginDatabaseWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginDatabaseWin.cpp index c59f133e5f..634b2a1136 100644 --- a/src/3rdparty/webkit/WebCore/plugins/win/PluginDatabaseWin.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginDatabaseWin.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora, Ltd. All rights reserved. + * Copyright (C) 2008-2009 Torch Mobile, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -37,6 +38,47 @@ #define _countof(x) (sizeof(x)/sizeof(x[0])) #endif +#if PLATFORM(WINCE) +// WINCE doesn't support Registry Key Access Rights. The parameter should always be 0 +#define KEY_ENUMERATE_SUB_KEYS 0 + +DWORD SHGetValue(HKEY hkey, LPCWSTR pszSubKey, LPCWSTR pszValue, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData) +{ + HKEY key; + if (RegOpenKeyEx(hkey, pszSubKey, 0, 0, &key) == ERROR_SUCCESS) { + DWORD result = RegQueryValueEx(key, pszValue, 0, pdwType, (LPBYTE)pvData, pcbData); + RegCloseKey(key); + return result; + } + return ERROR_INVALID_NAME; +} + +BOOL PathRemoveFileSpec(LPWSTR moduleFileNameStr) +{ + if (!*moduleFileNameStr) + return FALSE; + + LPWSTR lastPos = 0; + LPWSTR curPos = moduleFileNameStr; + do { + if (*curPos == L'/' || *curPos == L'\\') + lastPos = curPos; + } while (*++curPos); + + if (lastPos == curPos - 1) + return FALSE; + + if (lastPos) + *lastPos = 0; + else { + moduleFileNameStr[0] = L'\\'; + moduleFileNameStr[1] = 0; + } + + return TRUE; +} +#endif + namespace WebCore { static inline void addPluginPathsFromRegistry(HKEY rootKey, HashSet<String>& paths) @@ -210,12 +252,14 @@ static inline void addMozillaPluginDirectories(Vector<String>& directories) static inline void addWindowsMediaPlayerPluginDirectory(Vector<String>& directories) { +#if !PLATFORM(WINCE) // The new WMP Firefox plugin is installed in \PFiles\Plugins if it can't find any Firefox installs WCHAR pluginDirectoryStr[_MAX_PATH + 1]; DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(TEXT("%SYSTEMDRIVE%\\PFiles\\Plugins"), pluginDirectoryStr, _countof(pluginDirectoryStr)); if (pluginDirectorySize > 0 && pluginDirectorySize <= _countof(pluginDirectoryStr)) directories.append(String(pluginDirectoryStr, pluginDirectorySize - 1)); +#endif DWORD type; WCHAR installationDirectoryStr[_MAX_PATH]; @@ -311,6 +355,7 @@ exit: static inline void addMacromediaPluginDirectories(Vector<String>& directories) { +#if !PLATFORM(WINCE) WCHAR systemDirectoryStr[MAX_PATH]; if (GetSystemDirectory(systemDirectoryStr, _countof(systemDirectoryStr)) == 0) @@ -323,6 +368,7 @@ static inline void addMacromediaPluginDirectories(Vector<String>& directories) PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Shockwave 10")); directories.append(macromediaDirectoryStr); +#endif } Vector<String> PluginDatabase::defaultPluginDirectories() diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp index 40d9b2a976..9e38925c80 100644 --- a/src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora, Ltd. All rights reserved. + * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -244,6 +245,7 @@ bool PluginPackage::load() m_loadCount++; return true; } else { +#if !PLATFORM(WINCE) WCHAR currentPath[MAX_PATH]; if (!::GetCurrentDirectoryW(MAX_PATH, currentPath)) @@ -253,15 +255,18 @@ bool PluginPackage::load() if (!::SetCurrentDirectoryW(path.charactersWithNullTermination())) return false; +#endif // Load the library m_module = ::LoadLibraryExW(m_path.charactersWithNullTermination(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); +#if !PLATFORM(WINCE) if (!::SetCurrentDirectoryW(currentPath)) { if (m_module) ::FreeLibrary(m_module); return false; } +#endif } if (!m_module) @@ -273,13 +278,19 @@ bool PluginPackage::load() NP_InitializeFuncPtr NP_Initialize = 0; NPError npErr; +#if PLATFORM(WINCE) + NP_Initialize = (NP_InitializeFuncPtr)GetProcAddress(m_module, L"NP_Initialize"); + NP_GetEntryPoints = (NP_GetEntryPointsFuncPtr)GetProcAddress(m_module, L"NP_GetEntryPoints"); + m_NPP_Shutdown = (NPP_ShutdownProcPtr)GetProcAddress(m_module, L"NP_Shutdown"); +#else NP_Initialize = (NP_InitializeFuncPtr)GetProcAddress(m_module, "NP_Initialize"); NP_GetEntryPoints = (NP_GetEntryPointsFuncPtr)GetProcAddress(m_module, "NP_GetEntryPoints"); m_NPP_Shutdown = (NPP_ShutdownProcPtr)GetProcAddress(m_module, "NP_Shutdown"); +#endif if (!NP_Initialize || !NP_GetEntryPoints || !m_NPP_Shutdown) goto abort; - + memset(&m_pluginFuncs, 0, sizeof(m_pluginFuncs)); m_pluginFuncs.size = sizeof(m_pluginFuncs); diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp index 272a540ae2..c97984dda9 100644 --- a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora Ltd. All rights reserved. + * Copyright (C) 2008-2009 Torch Mobile, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -65,6 +66,13 @@ #include <runtime/JSValue.h> #include <wtf/ASCIICType.h> +#if PLATFORM(WINCE) +#undef LOG_NPERROR +#define LOG_NPERROR(x) +#undef LOG_PLUGIN_NET_ERROR +#define LOG_PLUGIN_NET_ERROR() +#endif + #if PLATFORM(QT) #include <QWidget.h> #endif @@ -98,6 +106,7 @@ const LPCWSTR kWebPluginViewProperty = L"WebPluginViewProperty"; static const char* MozillaUserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0"; +#if !PLATFORM(WINCE) // The code used to hook BeginPaint/EndPaint originally came from // <http://www.fengyuan.com/article/wmprint.html>. // Copyright (C) 2000 by Feng Yuan (www.fengyuan.com). @@ -154,7 +163,7 @@ BOOL WINAPI PluginView::hookedEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint) "push %3\n" "call *%4\n" : "=a" (result) - : "a" (endPaintSysCall), "g" (lpPaint), "g" (hWnd), "g" (*endPaint) + : "a" (endPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (*endPaint) ); return result; #else @@ -207,6 +216,7 @@ static void setUpOffscreenPaintingHooks(HDC (WINAPI*hookedBeginPaint)(HWND, PAIN hook("user32.dll", "EndPaint", endPaintSysCall, endPaint, reinterpret_cast<const void *>(reinterpret_cast<ptrdiff_t>(hookedEndPaint))); } +#endif static bool registerPluginView() { @@ -222,11 +232,18 @@ static bool registerPluginView() ASSERT(Page::instanceHandle()); +#if PLATFORM(WINCE) + WNDCLASS wcex = { 0 }; +#else WNDCLASSEX wcex; - wcex.cbSize = sizeof(WNDCLASSEX); + wcex.hIconSm = 0; +#endif wcex.style = CS_DBLCLKS; +#if PLATFORM(WINCE) + wcex.style |= CS_PARENTDC; +#endif wcex.lpfnWndProc = DefWindowProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; @@ -236,9 +253,12 @@ static bool registerPluginView() wcex.hbrBackground = (HBRUSH)COLOR_WINDOW; wcex.lpszMenuName = 0; wcex.lpszClassName = kWebPluginViewdowClassName; - wcex.hIconSm = 0; +#if PLATFORM(WINCE) + return !!RegisterClass(&wcex); +#else return !!RegisterClassEx(&wcex); +#endif } LRESULT CALLBACK PluginView::PluginViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -310,6 +330,7 @@ PluginView::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) m_popPopupsStateTimer.startOneShot(0); } +#if !PLATFORM(WINCE) if (message == WM_PRINTCLIENT) { // Most (all?) windowed plugins don't respond to WM_PRINTCLIENT, so we // change the message to WM_PAINT and rely on our hooked versions of @@ -317,6 +338,7 @@ PluginView::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) message = WM_PAINT; m_wmPrintHDC = reinterpret_cast<HDC>(wParam); } +#endif // Call the plug-in's window proc. LRESULT result = ::CallWindowProc(m_pluginWndProc, hWnd, message, wParam, lParam); @@ -339,7 +361,11 @@ void PluginView::updatePluginWidget() IntRect oldWindowRect = m_windowRect; IntRect oldClipRect = m_clipRect; +#if PLATFORM(WINCE) + m_windowRect = frameView->contentsToWindow(frameRect()); +#else m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size()); +#endif m_clipRect = windowClipRect(); m_clipRect.move(-m_windowRect.x(), -m_windowRect.y()); @@ -413,7 +439,7 @@ bool PluginView::dispatchNPEvent(NPEvent& npEvent) shouldPop = true; } - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); bool result = m_plugin->pluginFuncs()->event(m_instance, &npEvent); setCallingPlugin(false); @@ -426,6 +452,7 @@ bool PluginView::dispatchNPEvent(NPEvent& npEvent) void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const IntRect& rect) const { +#if !PLATFORM(WINCE) ASSERT(m_isWindowed); ASSERT(context->shouldIncludeChildWindows()); @@ -450,6 +477,7 @@ void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const SetWorldTransform(hdc, &originalTransform); context->releaseWindowsContext(hdc, frameRect(), false); +#endif } void PluginView::paint(GraphicsContext* context, const IntRect& rect) @@ -464,8 +492,10 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect) return; if (m_isWindowed) { +#if !PLATFORM(WINCE) if (context->shouldIncludeChildWindows()) paintWindowedPluginIntoContext(context, rect); +#endif return; } @@ -478,7 +508,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect) // of the window and the plugin expects that the passed in DC has window coordinates. // In the Qt port we always draw in an offscreen buffer and therefore need to preserve // the translation set in getWindowsContext. -#if !PLATFORM(QT) +#if !PLATFORM(QT) && !PLATFORM(WINCE) if (!context->inTransparencyLayer()) { XFORM transform; GetWorldTransform(hdc, &transform); @@ -491,15 +521,24 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect) m_npWindow.type = NPWindowTypeDrawable; m_npWindow.window = hdc; - IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(frameRect().location()); - WINDOWPOS windowpos; memset(&windowpos, 0, sizeof(windowpos)); +#if PLATFORM(WINCE) + IntRect r = static_cast<FrameView*>(parent())->contentsToWindow(frameRect()); + + windowpos.x = r.x(); + windowpos.y = r.y(); + windowpos.cx = r.width(); + windowpos.cy = r.height(); +#else + IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(frameRect().location()); + windowpos.x = p.x(); windowpos.y = p.y(); windowpos.cx = frameRect().width(); windowpos.cy = frameRect().height(); +#endif npEvent.event = WM_WINDOWPOSCHANGED; npEvent.lParam = reinterpret_cast<uint32>(&windowpos); @@ -535,13 +574,15 @@ void PluginView::handleKeyboardEvent(KeyboardEvent* event) npEvent.lParam = 0x8000; } - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); if (!dispatchNPEvent(npEvent)) event->setDefaultHandled(); } +#if !PLATFORM(WINCE) extern HCURSOR lastSetCursor; extern bool ignoreNextSetCursor; +#endif void PluginView::handleMouseEvent(MouseEvent* event) { @@ -602,11 +643,11 @@ void PluginView::handleMouseEvent(MouseEvent* event) } else return; - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); if (!dispatchNPEvent(npEvent)) event->setDefaultHandled(); -#if !PLATFORM(QT) +#if !PLATFORM(QT) && !PLATFORM(WINCE) // Currently, Widget::setCursor is always called after this function in EventHandler.cpp // and since we don't want that we set ignoreNextSetCursor to true here to prevent that. ignoreNextSetCursor = true; @@ -618,6 +659,15 @@ void PluginView::setParent(ScrollView* parent) { Widget::setParent(parent); +#if PLATFORM(WINCE) + if (parent) { + init(); + if (parent->isVisible()) + show(); + else + hide(); + } +#else if (parent) init(); else { @@ -631,7 +681,7 @@ void PluginView::setParent(ScrollView* parent) if (platformPluginWidget() == focusedWindow || ::IsChild(platformPluginWidget(), focusedWindow)) ::SetFocus(0); } - +#endif } void PluginView::setParentVisible(bool visible) @@ -654,6 +704,17 @@ void PluginView::setNPWindowRect(const IntRect& rect) if (!m_isStarted) return; +#if PLATFORM(WINCE) + IntRect r = static_cast<FrameView*>(parent())->contentsToWindow(rect); + m_npWindow.x = r.x(); + m_npWindow.y = r.y(); + + m_npWindow.width = r.width(); + m_npWindow.height = r.height(); + + m_npWindow.clipRect.right = r.width(); + m_npWindow.clipRect.bottom = r.height(); +#else IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(rect.location()); m_npWindow.x = p.x(); m_npWindow.y = p.y(); @@ -661,13 +722,14 @@ void PluginView::setNPWindowRect(const IntRect& rect) m_npWindow.width = rect.width(); m_npWindow.height = rect.height(); - m_npWindow.clipRect.left = 0; - m_npWindow.clipRect.top = 0; m_npWindow.clipRect.right = rect.width(); m_npWindow.clipRect.bottom = rect.height(); +#endif + m_npWindow.clipRect.left = 0; + m_npWindow.clipRect.top = 0; if (m_plugin->pluginFuncs()->setwindow) { - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); setCallingPlugin(true); m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow); setCallingPlugin(false); @@ -677,9 +739,17 @@ void PluginView::setNPWindowRect(const IntRect& rect) ASSERT(platformPluginWidget()); +#if PLATFORM(WINCE) + if (!m_pluginWndProc) { + WNDPROC currentWndProc = (WNDPROC)GetWindowLong(platformPluginWidget(), GWL_WNDPROC); + if (currentWndProc != PluginViewWndProc) + m_pluginWndProc = (WNDPROC)SetWindowLong(platformPluginWidget(), GWL_WNDPROC, (LONG)PluginViewWndProc); + } +#else WNDPROC currentWndProc = (WNDPROC)GetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC); if (currentWndProc != PluginViewWndProc) m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)PluginViewWndProc); +#endif } } @@ -701,13 +771,20 @@ void PluginView::stop() // Unsubclass the window if (m_isWindowed) { +#if PLATFORM(WINCE) + WNDPROC currentWndProc = (WNDPROC)GetWindowLong(platformPluginWidget(), GWL_WNDPROC); + + if (currentWndProc == PluginViewWndProc) + SetWindowLong(platformPluginWidget(), GWL_WNDPROC, (LONG)m_pluginWndProc); +#else WNDPROC currentWndProc = (WNDPROC)GetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC); - + if (currentWndProc == PluginViewWndProc) SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)m_pluginWndProc); +#endif } - JSC::JSLock::DropAllLocks dropAllLocks(false); + JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly); // Clear the window m_npWindow.window = 0; @@ -785,11 +862,15 @@ NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len, const c NPError PluginView::getValueStatic(NPNVariable variable, void* value) { + LOG(Plugins, "PluginView::getValueStatic(%s)", prettyNameForNPNVariable(variable).data()); + return NPERR_GENERIC_ERROR; } NPError PluginView::getValue(NPNVariable variable, void* value) { + LOG(Plugins, "PluginView::getValue(%s)", prettyNameForNPNVariable(variable).data()); + switch (variable) { #if ENABLE(NETSCAPE_PLUGIN_API) case NPNVWindowNPObject: { @@ -950,7 +1031,9 @@ void PluginView::init() if (m_isWindowed) { registerPluginView(); +#if !PLATFORM(WINCE) setUpOffscreenPaintingHooks(hookedBeginPaint, hookedEndPaint); +#endif DWORD flags = WS_CHILD; if (isSelfVisible()) @@ -959,6 +1042,7 @@ void PluginView::init() HWND parentWindowHandle = windowHandleForPlatformWidget(m_parentFrame->view()->hostWindow()->platformWindow()); HWND window = ::CreateWindowEx(0, kWebPluginViewdowClassName, 0, flags, 0, 0, 0, 0, parentWindowHandle, 0, Page::instanceHandle(), 0); + #if PLATFORM(WIN_OS) && PLATFORM(QT) m_window = window; #else @@ -969,6 +1053,8 @@ void PluginView::init() // the Shockwave Director plug-in. #if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC) ::SetWindowLongPtrA(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); +#elif PLATFORM(WINCE) + ::SetWindowLong(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProc); #else ::SetWindowLongPtrA(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProcA); #endif diff --git a/src/3rdparty/webkit/WebCore/rendering/CounterNode.h b/src/3rdparty/webkit/WebCore/rendering/CounterNode.h index 57f956310f..b432e1d5ce 100644 --- a/src/3rdparty/webkit/WebCore/rendering/CounterNode.h +++ b/src/3rdparty/webkit/WebCore/rendering/CounterNode.h @@ -37,7 +37,7 @@ namespace WebCore { class RenderObject; -class CounterNode : Noncopyable { +class CounterNode : public Noncopyable { public: CounterNode(RenderObject*, bool isReset, int value); diff --git a/src/3rdparty/webkit/WebCore/rendering/HitTestResult.cpp b/src/3rdparty/webkit/WebCore/rendering/HitTestResult.cpp index f2ed7dbe60..b7de46be5a 100644 --- a/src/3rdparty/webkit/WebCore/rendering/HitTestResult.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/HitTestResult.cpp @@ -26,6 +26,7 @@ #include "HTMLAnchorElement.h" #include "HTMLImageElement.h" #include "HTMLInputElement.h" +#include "HTMLMediaElement.h" #include "HTMLNames.h" #include "RenderImage.h" #include "Scrollbar.h" @@ -145,17 +146,20 @@ bool HitTestResult::isSelected() const return frame->selection()->contains(m_point); } -String HitTestResult::spellingToolTip() const +String HitTestResult::spellingToolTip(TextDirection& dir) const { + dir = LTR; // Return the tool tip string associated with this point, if any. Only markers associated with bad grammar // currently supply strings, but maybe someday markers associated with misspelled words will also. if (!m_innerNonSharedNode) return String(); - DocumentMarker* marker = m_innerNonSharedNode->document()->markerContainingPoint(m_point, DocumentMarker::Grammar); + DocumentMarker* marker = m_innerNonSharedNode->document()->markerContainingPoint(m_point, DocumentMarker::Grammar); if (!marker) return String(); + if (RenderObject* renderer = m_innerNonSharedNode->renderer()) + dir = renderer->style()->direction(); return marker->description; } @@ -173,15 +177,19 @@ String HitTestResult::replacedString() const return marker->description; } -String HitTestResult::title() const +String HitTestResult::title(TextDirection& dir) const { + dir = LTR; // Find the title in the nearest enclosing DOM node. // For <area> tags in image maps, walk the tree for the <area>, not the <img> using it. for (Node* titleNode = m_innerNode.get(); titleNode; titleNode = titleNode->parentNode()) { if (titleNode->isElementNode()) { String title = static_cast<Element*>(titleNode)->title(); - if (!title.isEmpty()) + if (!title.isEmpty()) { + if (RenderObject* renderer = titleNode->renderer()) + dir = renderer->style()->direction(); return title; + } } } return String(); @@ -208,7 +216,7 @@ String HitTestResult::altDisplayString() const HTMLInputElement* input = static_cast<HTMLInputElement*>(m_innerNonSharedNode.get()); return displayString(input->alt(), m_innerNonSharedNode.get()); } - + #if ENABLE(WML) if (m_innerNonSharedNode->hasTagName(WMLNames::imgTag)) { WMLImageElement* image = static_cast<WMLImageElement*>(m_innerNonSharedNode.get()); @@ -266,7 +274,29 @@ KURL HitTestResult::absoluteImageURL() const } else return KURL(); - return m_innerNonSharedNode->document()->completeURL(parseURL(urlString)); + return m_innerNonSharedNode->document()->completeURL(deprecatedParseURL(urlString)); +} + +KURL HitTestResult::absoluteMediaURL() const +{ +#if ENABLE(VIDEO) + if (!(m_innerNonSharedNode && m_innerNonSharedNode->document())) + return KURL(); + + if (!(m_innerNonSharedNode->renderer() && m_innerNonSharedNode->renderer()->isMedia())) + return KURL(); + + AtomicString urlString; + if (m_innerNonSharedNode->hasTagName(HTMLNames::videoTag) || m_innerNonSharedNode->hasTagName(HTMLNames::audioTag)) { + HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(m_innerNonSharedNode.get()); + urlString = mediaElement->currentSrc(); + } else + return KURL(); + + return m_innerNonSharedNode->document()->completeURL(deprecatedParseURL(urlString)); +#else + return KURL(); +#endif } KURL HitTestResult::absoluteLinkURL() const @@ -288,7 +318,7 @@ KURL HitTestResult::absoluteLinkURL() const else return KURL(); - return m_innerURLElement->document()->completeURL(parseURL(urlString)); + return m_innerURLElement->document()->completeURL(deprecatedParseURL(urlString)); } bool HitTestResult::isLiveLink() const diff --git a/src/3rdparty/webkit/WebCore/rendering/HitTestResult.h b/src/3rdparty/webkit/WebCore/rendering/HitTestResult.h index 4f0383fd63..f29ca41950 100644 --- a/src/3rdparty/webkit/WebCore/rendering/HitTestResult.h +++ b/src/3rdparty/webkit/WebCore/rendering/HitTestResult.h @@ -23,6 +23,7 @@ #define HitTestResult_h #include "IntPoint.h" +#include "TextDirection.h" #include <wtf/RefPtr.h> namespace WebCore { @@ -30,8 +31,8 @@ namespace WebCore { class Element; class Frame; class Image; -class KURL; class IntRect; +class KURL; class Node; class Scrollbar; class String; @@ -64,14 +65,15 @@ public: Frame* targetFrame() const; IntRect boundingBox() const; bool isSelected() const; - String spellingToolTip() const; + String spellingToolTip(TextDirection&) const; String replacedString() const; - String title() const; + String title(TextDirection&) const; String altDisplayString() const; String titleDisplayString() const; Image* image() const; IntRect imageRect() const; KURL absoluteImageURL() const; + KURL absoluteMediaURL() const; KURL absoluteLinkURL() const; String textContent() const; bool isLiveLink() const; diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp b/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp index e46ba382df..b397bce601 100644 --- a/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 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 @@ -256,8 +256,8 @@ int InlineFlowBox::placeBoxesHorizontally(int xPos, int& leftPosition, int& righ int boxShadowLeft = 0; int boxShadowRight = 0; for (ShadowData* boxShadow = renderer()->style(m_firstLine)->boxShadow(); boxShadow; boxShadow = boxShadow->next) { - boxShadowLeft = min(boxShadow->x - boxShadow->blur, boxShadowLeft); - boxShadowRight = max(boxShadow->x + boxShadow->blur, boxShadowRight); + boxShadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread, boxShadowLeft); + boxShadowRight = max(boxShadow->x + boxShadow->blur + boxShadow->spread, boxShadowRight); } leftPosition = min(xPos + boxShadowLeft, leftPosition); @@ -529,8 +529,8 @@ void InlineFlowBox::placeBoxesVertically(int yPos, int maxHeight, int maxAscent, } for (ShadowData* boxShadow = curr->renderer()->style(m_firstLine)->boxShadow(); boxShadow; boxShadow = boxShadow->next) { - overflowTop = min(overflowTop, boxShadow->y - boxShadow->blur); - overflowBottom = max(overflowBottom, boxShadow->y + boxShadow->blur); + overflowTop = min(overflowTop, boxShadow->y - boxShadow->blur - boxShadow->spread); + overflowBottom = max(overflowBottom, boxShadow->y + boxShadow->blur + boxShadow->spread); } for (ShadowData* textShadow = curr->renderer()->style(m_firstLine)->textShadow(); textShadow; textShadow = textShadow->next) { @@ -601,8 +601,8 @@ void InlineFlowBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty) int shadowLeft = 0; int shadowRight = 0; for (ShadowData* boxShadow = renderer()->style(m_firstLine)->boxShadow(); boxShadow; boxShadow = boxShadow->next) { - shadowLeft = min(boxShadow->x - boxShadow->blur, shadowLeft); - shadowRight = max(boxShadow->x + boxShadow->blur, shadowRight); + shadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread, shadowLeft); + shadowRight = max(boxShadow->x + boxShadow->blur + boxShadow->spread, shadowRight); } for (ShadowData* textShadow = renderer()->style(m_firstLine)->textShadow(); textShadow; textShadow = textShadow->next) { shadowLeft = min(textShadow->x - textShadow->blur, shadowLeft); @@ -696,14 +696,14 @@ void InlineFlowBox::paintFillLayer(const RenderObject::PaintInfo& paintInfo, con } } -void InlineFlowBox::paintBoxShadow(GraphicsContext* context, RenderStyle* s, int tx, int ty, int w, int h) +void InlineFlowBox::paintBoxShadow(GraphicsContext* context, RenderStyle* s, ShadowStyle shadowStyle, int tx, int ty, int w, int h) { if ((!prevLineBox() && !nextLineBox()) || !parent()) - boxModelObject()->paintBoxShadow(context, tx, ty, w, h, s); + boxModelObject()->paintBoxShadow(context, tx, ty, w, h, s, shadowStyle); else { // FIXME: We can do better here in the multi-line case. We want to push a clip so that the shadow doesn't // protrude incorrectly at the edges, and we want to possibly include shadows cast from the previous/following lines - boxModelObject()->paintBoxShadow(context, tx, ty, w, h, s, includeLeftEdge(), includeRightEdge()); + boxModelObject()->paintBoxShadow(context, tx, ty, w, h, s, shadowStyle, includeLeftEdge(), includeRightEdge()); } } @@ -727,11 +727,14 @@ void InlineFlowBox::paintBoxDecorations(RenderObject::PaintInfo& paintInfo, int if ((!parent() && m_firstLine && styleToUse != renderer()->style()) || (parent() && renderer()->hasBoxDecorations())) { // Shadow comes first and is behind the background and border. if (styleToUse->boxShadow()) - paintBoxShadow(context, styleToUse, tx, ty, w, h); + paintBoxShadow(context, styleToUse, Normal, tx, ty, w, h); Color c = styleToUse->backgroundColor(); paintFillLayers(paintInfo, c, styleToUse->backgroundLayers(), tx, ty, w, h); + if (styleToUse->boxShadow()) + paintBoxShadow(context, styleToUse, Inset, tx, ty, w, h); + // :first-line cannot be used to put borders on a line. Always paint borders with our // non-first-line style. if (parent() && renderer()->style()->hasBorder()) { diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h b/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h index 9bb1162cee..809fd54cbc 100644 --- a/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h +++ b/src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h @@ -89,7 +89,7 @@ public: virtual void paintMask(RenderObject::PaintInfo&, int tx, int ty); void paintFillLayers(const RenderObject::PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int w, int h, CompositeOperator = CompositeSourceOver); void paintFillLayer(const RenderObject::PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int w, int h, CompositeOperator = CompositeSourceOver); - void paintBoxShadow(GraphicsContext*, RenderStyle*, int tx, int ty, int w, int h); + void paintBoxShadow(GraphicsContext*, RenderStyle*, ShadowStyle, int tx, int ty, int w, int h); virtual void paintTextDecorations(RenderObject::PaintInfo&, int tx, int ty, bool paintedChildren = false); virtual void paint(RenderObject::PaintInfo&, int tx, int ty); virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty); diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp b/src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp index 94dd4f3924..619fb952b0 100644 --- a/src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp @@ -256,6 +256,11 @@ bool InlineTextBox::nodeAtPoint(const HitTestRequest&, HitTestResult& result, in static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun, int startOffset, int endOffset, const IntPoint& textOrigin, int x, int y, int w, int h, ShadowData* shadow, bool stroked) { + Color fillColor = context->fillColor(); + bool opaque = fillColor.alpha() == 255; + if (!opaque) + context->setFillColor(Color::black); + do { IntSize extraOffset; @@ -264,7 +269,7 @@ static void paintTextWithShadows(GraphicsContext* context, const Font& font, con int shadowBlur = shadow->blur; const Color& shadowColor = shadow->color; - if (shadow->next || stroked) { + if (shadow->next || stroked || !opaque) { IntRect shadowRect(x, y, w, h); shadowRect.inflate(shadowBlur); shadowRect.move(shadowOffset); @@ -275,7 +280,8 @@ static void paintTextWithShadows(GraphicsContext* context, const Font& font, con shadowOffset -= extraOffset; } context->setShadow(shadowOffset, shadowBlur, shadowColor); - } + } else if (!opaque) + context->setFillColor(fillColor); if (startOffset <= endOffset) context->drawText(font, textRun, textOrigin + extraOffset, startOffset, endOffset); @@ -289,13 +295,13 @@ static void paintTextWithShadows(GraphicsContext* context, const Font& font, con if (!shadow) break; - if (shadow->next || stroked) + if (shadow->next || stroked || !opaque) context->restore(); else context->clearShadow(); shadow = shadow->next; - } while (shadow || stroked); + } while (shadow || stroked || !opaque); } void InlineTextBox::paint(RenderObject::PaintInfo& paintInfo, int tx, int ty) diff --git a/src/3rdparty/webkit/WebCore/rendering/LayoutState.h b/src/3rdparty/webkit/WebCore/rendering/LayoutState.h index afa295206b..2f040c82c3 100644 --- a/src/3rdparty/webkit/WebCore/rendering/LayoutState.h +++ b/src/3rdparty/webkit/WebCore/rendering/LayoutState.h @@ -36,7 +36,7 @@ class RenderArena; class RenderBox; class RenderObject; -class LayoutState : Noncopyable { +class LayoutState : public Noncopyable { public: LayoutState() : m_clipped(false) diff --git a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp index 74293e030a..d0af9811d6 100644 --- a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp @@ -556,14 +556,15 @@ PassRefPtr<RenderStyle> MediaControlTimeDisplayElement::styleForElement() void MediaControlTimeDisplayElement::setVisible(bool visible) { + if (visible == m_isVisible) + return; + m_isVisible = visible; + // This function is used during the RenderMedia::layout() // call, where we cannot change the renderer at this time. if (!renderer() || !renderer()->style()) return; - if (visible == m_isVisible) - return; - m_isVisible = visible; RefPtr<RenderStyle> style = styleForElement(); renderer()->setStyle(style.get()); } diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp index c949eda8fa..be1bab3e37 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp @@ -555,7 +555,7 @@ int RenderBlock::overflowHeight(bool includeInterior) const if (!includeInterior && hasOverflowClip()) { int shadowHeight = 0; for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) - shadowHeight = max(boxShadow->y + boxShadow->blur, shadowHeight); + shadowHeight = max(boxShadow->y + boxShadow->blur + boxShadow->spread, shadowHeight); int inflatedHeight = height() + shadowHeight; if (hasReflection()) inflatedHeight = max(inflatedHeight, reflectionBox().bottom()); @@ -569,7 +569,7 @@ int RenderBlock::overflowWidth(bool includeInterior) const if (!includeInterior && hasOverflowClip()) { int shadowWidth = 0; for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) - shadowWidth = max(boxShadow->x + boxShadow->blur, shadowWidth); + shadowWidth = max(boxShadow->x + boxShadow->blur + boxShadow->spread, shadowWidth); int inflatedWidth = width() + shadowWidth; if (hasReflection()) inflatedWidth = max(inflatedWidth, reflectionBox().right()); @@ -583,7 +583,7 @@ int RenderBlock::overflowLeft(bool includeInterior) const if (!includeInterior && hasOverflowClip()) { int shadowLeft = 0; for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) - shadowLeft = min(boxShadow->x - boxShadow->blur, shadowLeft); + shadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread, shadowLeft); int left = shadowLeft; if (hasReflection()) left = min(left, reflectionBox().x()); @@ -597,7 +597,7 @@ int RenderBlock::overflowTop(bool includeInterior) const if (!includeInterior && hasOverflowClip()) { int shadowTop = 0; for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) - shadowTop = min(boxShadow->y - boxShadow->blur, shadowTop); + shadowTop = min(boxShadow->y - boxShadow->blur - boxShadow->spread, shadowTop); int top = shadowTop; if (hasReflection()) top = min(top, reflectionBox().y()); @@ -616,10 +616,10 @@ IntRect RenderBlock::overflowRect(bool includeInterior) const int shadowBottom = 0; for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) { - shadowLeft = min(boxShadow->x - boxShadow->blur, shadowLeft); - shadowRight = max(boxShadow->x + boxShadow->blur, shadowRight); - shadowTop = min(boxShadow->y - boxShadow->blur, shadowTop); - shadowBottom = max(boxShadow->y + boxShadow->blur, shadowBottom); + shadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread, shadowLeft); + shadowRight = max(boxShadow->x + boxShadow->blur + boxShadow->spread, shadowRight); + shadowTop = min(boxShadow->y - boxShadow->blur - boxShadow->spread, shadowTop); + shadowBottom = max(boxShadow->y + boxShadow->blur + boxShadow->spread, shadowBottom); } box.move(shadowLeft, shadowTop); @@ -871,10 +871,10 @@ void RenderBlock::layoutBlock(bool relayoutChildren) if (!hasOverflowClip()) { for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) { - m_overflowLeft = min(m_overflowLeft, boxShadow->x - boxShadow->blur); - m_overflowWidth = max(m_overflowWidth, width() + boxShadow->x + boxShadow->blur); - m_overflowTop = min(m_overflowTop, boxShadow->y - boxShadow->blur); - m_overflowHeight = max(m_overflowHeight, height() + boxShadow->y + boxShadow->blur); + m_overflowLeft = min(m_overflowLeft, boxShadow->x - boxShadow->blur - boxShadow->spread); + m_overflowWidth = max(m_overflowWidth, width() + boxShadow->x + boxShadow->blur + boxShadow->spread); + m_overflowTop = min(m_overflowTop, boxShadow->y - boxShadow->blur - boxShadow->spread); + m_overflowHeight = max(m_overflowHeight, height() + boxShadow->y + boxShadow->blur + boxShadow->spread); } if (hasReflection()) { @@ -1013,13 +1013,13 @@ bool RenderBlock::handleRunInChild(RenderBox* child) if (!child->isRunIn() || !child->childrenInline() && !child->isReplaced()) return false; - RenderBlock* blockRunIn = toRenderBlock(child); // Get the next non-positioned/non-floating RenderBlock. + RenderBlock* blockRunIn = toRenderBlock(child); RenderObject* curr = blockRunIn->nextSibling(); while (curr && curr->isFloatingOrPositioned()) curr = curr->nextSibling(); - if (!curr || !curr->isRenderBlock() || !curr->childrenInline() || curr->isRunIn()) + if (!curr || !curr->isRenderBlock() || !curr->childrenInline() || curr->isRunIn() || curr->isAnonymous()) return false; RenderBlock* currBlock = toRenderBlock(curr); @@ -3937,6 +3937,9 @@ void RenderBlock::calcPrefWidths() int toAdd = 0; toAdd = borderLeft() + borderRight() + paddingLeft() + paddingRight(); + if (hasOverflowClip() && style()->overflowY() == OSCROLL) + toAdd += verticalScrollbarWidth(); + m_minPrefWidth += toAdd; m_maxPrefWidth += toAdd; diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp index 4db5c55760..19a2167d5b 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp @@ -3,7 +3,7 @@ * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) - * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2007, 2008, 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 @@ -607,7 +607,7 @@ void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty) // FIXME: Should eventually give the theme control over whether the box shadow should paint, since controls could have // custom shadows of their own. - paintBoxShadow(paintInfo.context, tx, ty, w, h, style()); + paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Normal); // If we have a native theme appearance, paint that before painting our background. // The theme will tell us whether or not we should also paint the CSS background. @@ -621,6 +621,7 @@ void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty) if (style()->hasAppearance()) theme()->paintDecorations(this, paintInfo, IntRect(tx, ty, w, h)); } + paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Inset); // The theme will tell us whether or not we should also paint the CSS border. if ((!style()->hasAppearance() || (!themePainted && theme()->paintBorderOnly(this, paintInfo, IntRect(tx, ty, w, h)))) && style()->hasBorder()) diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp index ced5a78530..c22462509f 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.cpp @@ -173,13 +173,20 @@ void RenderBoxModelObject::updateBoxModelInfoFromStyle() int RenderBoxModelObject::relativePositionOffsetX() const { + // Objects that shrink to avoid floats normally use available line width when computing containing block width. However + // in the case of relative positioning using percentages, we can't do this. The offset should always be resolved using the + // available width of the containing block. Therefore we don't use containingBlockWidthForContent() here, but instead explicitly + // call availableWidth on our containing block. if (!style()->left().isAuto()) { + RenderBlock* cb = containingBlock(); if (!style()->right().isAuto() && containingBlock()->style()->direction() == RTL) - return -style()->right().calcValue(containingBlockWidthForContent()); - return style()->left().calcValue(containingBlockWidthForContent()); + return -style()->right().calcValue(cb->availableWidth()); + return style()->left().calcValue(cb->availableWidth()); + } + if (!style()->right().isAuto()) { + RenderBlock* cb = containingBlock(); + return -style()->right().calcValue(cb->availableWidth()); } - if (!style()->right().isAuto()) - return -style()->right().calcValue(containingBlockWidthForContent()); return 0; } @@ -322,6 +329,18 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co clippedToBorderRadius = true; } + bool clippedWithLocalScrolling = hasOverflowClip() && bgLayer->attachment() == LocalBackgroundAttachment; + if (clippedWithLocalScrolling) { + // Clip to the overflow area. + context->save(); + context->clip(toRenderBox(this)->overflowClipRect(tx, ty)); + + // Now adjust our tx, ty, w, h to reflect a scrolled content box with borders at the ends. + layer()->subtractScrolledContentOffset(tx, ty); + w = bLeft + layer()->scrollWidth() + bRight; + h = borderTop() + layer()->scrollHeight() + borderBottom(); + } + if (bgLayer->clip() == PaddingFillBox || bgLayer->clip() == ContentFillBox) { // Clip to the padding or content boxes as necessary. bool includePadding = bgLayer->clip() == ContentFillBox; @@ -465,6 +484,9 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co if (clippedToBorderRadius) // Undo the border radius clip context->restore(); + + if (clippedWithLocalScrolling) // Undo the clip for local background attachments. + context->restore(); } IntSize RenderBoxModelObject::calculateBackgroundSize(const FillLayer* bgLayer, int scaledWidth, int scaledHeight) const @@ -521,9 +543,9 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* bgL int rh = 0; // CSS2 chapter 14.2.1 - - if (bgLayer->attachment()) { - // Scroll + bool fixedAttachment = bgLayer->attachment() == FixedBackgroundAttachment; + if (!fixedAttachment) { + // Scroll and Local if (bgLayer->origin() != BorderFillBox) { left = borderLeft(); right = borderRight(); @@ -553,7 +575,7 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* bgL pw = w - left - right; ph = h - top - bottom; } else { - // Fixed + // Fixed background attachment. IntRect vr = viewRect(); cx = vr.x(); cy = vr.y(); @@ -567,7 +589,7 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* bgL int ch; IntSize scaledImageSize; - if (isRoot() && bgLayer->attachment()) + if (isRoot() && !fixedAttachment) scaledImageSize = calculateBackgroundSize(bgLayer, rw, rh); else scaledImageSize = calculateBackgroundSize(bgLayer, pw, ph); @@ -578,7 +600,7 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* bgL EFillRepeat backgroundRepeat = bgLayer->repeat(); int xPosition; - if (isRoot() && bgLayer->attachment()) + if (isRoot() && !fixedAttachment) xPosition = bgLayer->xPosition().calcMinValue(rw - scaledImageWidth, true); else xPosition = bgLayer->xPosition().calcMinValue(pw - scaledImageWidth, true); @@ -592,7 +614,7 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* bgL } int yPosition; - if (isRoot() && bgLayer->attachment()) + if (isRoot() && !fixedAttachment) yPosition = bgLayer->yPosition().calcMinValue(rh - scaledImageHeight, true); else yPosition = bgLayer->yPosition().calcMinValue(ph - scaledImageHeight, true); @@ -605,7 +627,7 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* bgL ch = scaledImageHeight + min(yPosition + top, 0); } - if (!bgLayer->attachment()) { + if (fixedAttachment) { sx += max(tx - cx, 0); sy += max(ty - cy, 0); } @@ -1120,7 +1142,7 @@ void RenderBoxModelObject::paintBorder(GraphicsContext* graphicsContext, int tx, graphicsContext->restore(); } -void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int ty, int w, int h, const RenderStyle* s, bool begin, bool end) +void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int ty, int w, int h, const RenderStyle* s, ShadowStyle shadowStyle, bool begin, bool end) { // FIXME: Deal with border-image. Would be great to use border-image as a mask. @@ -1128,83 +1150,201 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int return; IntRect rect(tx, ty, w, h); + IntSize topLeft; + IntSize topRight; + IntSize bottomLeft; + IntSize bottomRight; + bool hasBorderRadius = s->hasBorderRadius(); + if (hasBorderRadius && (begin || end)) { + IntSize topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius; + s->getBorderRadiiForRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius); + + if (begin) { + if (shadowStyle == Inset) { + topLeftRadius.expand(-borderLeft(), -borderTop()); + topLeftRadius.clampNegativeToZero(); + bottomLeftRadius.expand(-borderLeft(), -borderBottom()); + bottomLeftRadius.clampNegativeToZero(); + } + topLeft = topLeftRadius; + bottomLeft = bottomLeftRadius; + } + if (end) { + if (shadowStyle == Inset) { + topRightRadius.expand(-borderRight(), -borderTop()); + topRightRadius.clampNegativeToZero(); + bottomRightRadius.expand(-borderRight(), -borderBottom()); + bottomRightRadius.clampNegativeToZero(); + } + topRight = topRightRadius; + bottomRight = bottomRightRadius; + } + } + + if (shadowStyle == Inset) { + rect.move(begin ? borderLeft() : 0, borderTop()); + rect.setWidth(rect.width() - (begin ? borderLeft() : 0) - (end ? borderRight() : 0)); + rect.setHeight(rect.height() - borderTop() - borderBottom()); + } + bool hasOpaqueBackground = s->backgroundColor().isValid() && s->backgroundColor().alpha() == 255; for (ShadowData* shadow = s->boxShadow(); shadow; shadow = shadow->next) { - context->save(); + if (shadow->style != shadowStyle) + continue; IntSize shadowOffset(shadow->x, shadow->y); int shadowBlur = shadow->blur; - IntRect fillRect(rect); - - IntRect shadowRect(rect); - shadowRect.inflate(shadowBlur); - shadowRect.move(shadowOffset); - context->clip(shadowRect); - - // Move the fill just outside the clip, adding 1 pixel separation so that the fill does not - // bleed in (due to antialiasing) if the context is transformed. - IntSize extraOffset(w + max(0, shadowOffset.width()) + shadowBlur + 1, 0); - shadowOffset -= extraOffset; - fillRect.move(extraOffset); - - context->setShadow(shadowOffset, shadowBlur, shadow->color); - if (hasBorderRadius) { - IntSize topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius; - s->getBorderRadiiForRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius); - - IntSize topLeft = begin ? topLeftRadius : IntSize(); - IntSize topRight = end ? topRightRadius : IntSize(); - IntSize bottomLeft = begin ? bottomLeftRadius : IntSize(); - IntSize bottomRight = end ? bottomRightRadius : IntSize(); - - IntRect rectToClipOut = rect; - IntSize topLeftToClipOut = topLeft; - IntSize topRightToClipOut = topRight; - IntSize bottomLeftToClipOut = bottomLeft; - IntSize bottomRightToClipOut = bottomRight; - - // If the box is opaque, it is unnecessary to clip it out. However, doing so saves time - // when painting the shadow. On the other hand, it introduces subpixel gaps along the - // corners. Those are avoided by insetting the clipping path by one pixel. - if (hasOpaqueBackground) { - rectToClipOut.inflate(-1); - - topLeftToClipOut.expand(-1, -1); - topLeftToClipOut.clampNegativeToZero(); - - topRightToClipOut.expand(-1, -1); - topRightToClipOut.clampNegativeToZero(); - - bottomLeftToClipOut.expand(-1, -1); - bottomLeftToClipOut.clampNegativeToZero(); - - bottomRightToClipOut.expand(-1, -1); - bottomRightToClipOut.clampNegativeToZero(); + int shadowSpread = shadow->spread; + Color& shadowColor = shadow->color; + + if (shadow->style == Normal) { + IntRect fillRect(rect); + fillRect.inflate(shadowSpread); + if (fillRect.isEmpty()) + continue; + + IntRect shadowRect(rect); + shadowRect.inflate(shadowBlur + shadowSpread); + shadowRect.move(shadowOffset); + + context->save(); + context->clip(shadowRect); + + // Move the fill just outside the clip, adding 1 pixel separation so that the fill does not + // bleed in (due to antialiasing) if the context is transformed. + IntSize extraOffset(w + max(0, shadowOffset.width()) + shadowBlur + 2 * shadowSpread + 1, 0); + shadowOffset -= extraOffset; + fillRect.move(extraOffset); + + context->setShadow(shadowOffset, shadowBlur, shadowColor); + if (hasBorderRadius) { + IntRect rectToClipOut = rect; + IntSize topLeftToClipOut = topLeft; + IntSize topRightToClipOut = topRight; + IntSize bottomLeftToClipOut = bottomLeft; + IntSize bottomRightToClipOut = bottomRight; + + if (shadowSpread < 0) { + topLeft.expand(shadowSpread, shadowSpread); + topLeft.clampNegativeToZero(); + + topRight.expand(shadowSpread, shadowSpread); + topRight.clampNegativeToZero(); + + bottomLeft.expand(shadowSpread, shadowSpread); + bottomLeft.clampNegativeToZero(); + + bottomRight.expand(shadowSpread, shadowSpread); + bottomRight.clampNegativeToZero(); + } + + // If the box is opaque, it is unnecessary to clip it out. However, doing so saves time + // when painting the shadow. On the other hand, it introduces subpixel gaps along the + // corners. Those are avoided by insetting the clipping path by one pixel. + if (hasOpaqueBackground) { + rectToClipOut.inflate(-1); + + topLeftToClipOut.expand(-1, -1); + topLeftToClipOut.clampNegativeToZero(); + + topRightToClipOut.expand(-1, -1); + topRightToClipOut.clampNegativeToZero(); + + bottomLeftToClipOut.expand(-1, -1); + bottomLeftToClipOut.clampNegativeToZero(); + + bottomRightToClipOut.expand(-1, -1); + bottomRightToClipOut.clampNegativeToZero(); + } + + if (!rectToClipOut.isEmpty()) + context->clipOutRoundedRect(rectToClipOut, topLeftToClipOut, topRightToClipOut, bottomLeftToClipOut, bottomRightToClipOut); + context->fillRoundedRect(fillRect, topLeft, topRight, bottomLeft, bottomRight, Color::black); + } else { + IntRect rectToClipOut = rect; + + // If the box is opaque, it is unnecessary to clip it out. However, doing so saves time + // when painting the shadow. On the other hand, it introduces subpixel gaps along the + // edges if they are not pixel-aligned. Those are avoided by insetting the clipping path + // by one pixel. + if (hasOpaqueBackground) { + TransformationMatrix currentTransformation = context->getCTM(); + if (currentTransformation.a() != 1 || (currentTransformation.d() != 1 && currentTransformation.d() != -1) + || currentTransformation.b() || currentTransformation.c()) + rectToClipOut.inflate(-1); + } + + if (!rectToClipOut.isEmpty()) + context->clipOut(rectToClipOut); + context->fillRect(fillRect, Color::black); } - if (!rectToClipOut.isEmpty()) - context->clipOutRoundedRect(rectToClipOut, topLeftToClipOut, topRightToClipOut, bottomLeftToClipOut, bottomRightToClipOut); - context->fillRoundedRect(fillRect, topLeft, topRight, bottomLeft, bottomRight, Color::black); + context->restore(); } else { - IntRect rectToClipOut = rect; - - // If the box is opaque, it is unnecessary to clip it out. However, doing so saves time - // when painting the shadow. On the other hand, it introduces subpixel gaps along the - // edges if they are not pixel-aligned. Those are avoided by insetting the clipping path - // by one pixel. - if (hasOpaqueBackground) { - TransformationMatrix currentTransformation = context->getCTM(); - if (currentTransformation.a() != 1 || (currentTransformation.d() != 1 && currentTransformation.d() != -1) - || currentTransformation.b() || currentTransformation.c()) - rectToClipOut.inflate(-1); + // Inset shadow. + IntRect holeRect(rect); + holeRect.inflate(-shadowSpread); + + if (holeRect.isEmpty()) { + if (hasBorderRadius) + context->fillRoundedRect(rect, topLeft, topRight, bottomLeft, bottomRight, shadowColor); + else + context->fillRect(rect, shadowColor); + continue; + } + if (!begin) { + holeRect.move(-max(shadowOffset.width(), 0) - shadowBlur, 0); + holeRect.setWidth(holeRect.width() + max(shadowOffset.width(), 0) + shadowBlur); } + if (!end) + holeRect.setWidth(holeRect.width() - min(shadowOffset.width(), 0) + shadowBlur); + + Color fillColor(shadowColor.red(), shadowColor.green(), shadowColor.blue(), 255); - if (!rectToClipOut.isEmpty()) - context->clipOut(rectToClipOut); - context->fillRect(fillRect, Color::black); + IntRect outerRect(rect); + outerRect.inflateX(w - 2 * shadowSpread); + outerRect.inflateY(h - 2 * shadowSpread); + + context->save(); + + if (hasBorderRadius) + context->clip(Path::createRoundedRectangle(rect, topLeft, topRight, bottomLeft, bottomRight)); + else + context->clip(rect); + + IntSize extraOffset(2 * w + max(0, shadowOffset.width()) + shadowBlur - 2 * shadowSpread + 1, 0); + context->translate(extraOffset.width(), extraOffset.height()); + shadowOffset -= extraOffset; + + context->beginPath(); + context->addPath(Path::createRectangle(outerRect)); + + if (hasBorderRadius) { + if (shadowSpread > 0) { + topLeft.expand(-shadowSpread, -shadowSpread); + topLeft.clampNegativeToZero(); + + topRight.expand(-shadowSpread, -shadowSpread); + topRight.clampNegativeToZero(); + + bottomLeft.expand(-shadowSpread, -shadowSpread); + bottomLeft.clampNegativeToZero(); + + bottomRight.expand(-shadowSpread, -shadowSpread); + bottomRight.clampNegativeToZero(); + } + context->addPath(Path::createRoundedRectangle(holeRect, topLeft, topRight, bottomLeft, bottomRight)); + } else + context->addPath(Path::createRectangle(holeRect)); + + context->setFillRule(RULE_EVENODD); + context->setFillColor(fillColor); + context->setShadow(shadowOffset, shadowBlur, shadowColor); + context->fillPath(); + + context->restore(); } - context->restore(); } } diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.h b/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.h index 9feaf2f896..c67477808a 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderBoxModelObject.h @@ -89,7 +89,7 @@ public: void paintBorder(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, bool begin = true, bool end = true); bool paintNinePieceImage(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, const NinePieceImage&, CompositeOperator = CompositeSourceOver); - void paintBoxShadow(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, bool begin = true, bool end = true); + void paintBoxShadow(GraphicsContext*, int tx, int ty, int w, int h, const RenderStyle*, ShadowStyle, bool begin = true, bool end = true); void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, InlineFlowBox* = 0, CompositeOperator = CompositeSourceOver); // The difference between this inline's baseline position and the line's baseline position. diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderButton.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderButton.cpp index b266f42e5e..6d36a0f8ab 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderButton.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderButton.cpp @@ -164,6 +164,11 @@ void RenderButton::setText(const String& str) } } +String RenderButton::text() const +{ + return m_buttonText ? m_buttonText->text() : 0; +} + void RenderButton::updateBeforeAfterContent(PseudoId type) { if (m_inner) diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderButton.h b/src/3rdparty/webkit/WebCore/rendering/RenderButton.h index 89f7cf86bc..3b4ff3f4e8 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderButton.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderButton.h @@ -55,7 +55,8 @@ public: virtual IntRect controlClipRect(int /*tx*/, int /*ty*/) const; void setText(const String&); - + String text() const; + virtual bool canHaveChildren() const; protected: diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp index 393c237116..437991acd0 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp @@ -131,9 +131,10 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty) h -= yOff; ty += yOff; - paintBoxShadow(paintInfo.context, tx, ty, w, h, style()); + paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Normal); paintFillLayers(paintInfo, style()->backgroundColor(), style()->backgroundLayers(), tx, ty, w, h); + paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Inset); if (!style()->hasBorder()) return; diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp index 65990f2746..e9fc7aa60c 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp @@ -191,6 +191,10 @@ void RenderFlexibleBox::calcPrefWidths() } int toAdd = borderLeft() + borderRight() + paddingLeft() + paddingRight(); + + if (hasOverflowClip() && style()->overflowY() == OSCROLL) + toAdd += verticalScrollbarWidth(); + m_minPrefWidth += toAdd; m_maxPrefWidth += toAdd; @@ -276,10 +280,10 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren) if (!hasOverflowClip()) { for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) { - m_overflowLeft = min(m_overflowLeft, boxShadow->x - boxShadow->blur); - m_overflowWidth = max(m_overflowWidth, width() + boxShadow->x + boxShadow->blur); - m_overflowTop = min(m_overflowTop, boxShadow->y - boxShadow->blur); - m_overflowHeight = max(m_overflowHeight, height() + boxShadow->y + boxShadow->blur); + m_overflowLeft = min(m_overflowLeft, boxShadow->x - boxShadow->blur - boxShadow->spread); + m_overflowWidth = max(m_overflowWidth, width() + boxShadow->x + boxShadow->blur + boxShadow->spread); + m_overflowTop = min(m_overflowTop, boxShadow->y - boxShadow->blur - boxShadow->spread); + m_overflowHeight = max(m_overflowHeight, height() + boxShadow->y + boxShadow->blur + boxShadow->spread); } if (hasReflection()) { diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h b/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h index 713a24851a..9f905023b8 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h @@ -83,7 +83,7 @@ public: private: static const int noSplit = -1; - class GridAxis : Noncopyable { + class GridAxis : public Noncopyable { public: GridAxis(); void resize(int); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp index 5de1bbf16b..4b6d291d01 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp @@ -2709,7 +2709,7 @@ void RenderLayer::calculateRects(const RenderLayer* rootLayer, const IntRect& pa do { IntRect shadowRect = layerBounds; shadowRect.move(boxShadow->x, boxShadow->y); - shadowRect.inflate(boxShadow->blur); + shadowRect.inflate(boxShadow->blur + boxShadow->spread); overflow.unite(shadowRect); boxShadow = boxShadow->next; } while (boxShadow); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp index adf6debeec..df8c58a0e1 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp @@ -1218,7 +1218,7 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta if (width) { int shadowRight = 0; for (ShadowData* shadow = boxShadow; shadow; shadow = shadow->next) - shadowRight = max(shadow->x + shadow->blur, shadowRight); + shadowRight = max(shadow->x + shadow->blur + shadow->spread, shadowRight); int borderRight = isBox() ? toRenderBox(this)->borderRight() : 0; int borderWidth = max(-outlineStyle->outlineOffset(), max(borderRight, max(style()->borderTopRightRadius().width(), style()->borderBottomRightRadius().width()))) + max(ow, shadowRight); @@ -1236,7 +1236,7 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta if (height) { int shadowBottom = 0; for (ShadowData* shadow = boxShadow; shadow; shadow = shadow->next) - shadowBottom = max(shadow->y + shadow->blur, shadowBottom); + shadowBottom = max(shadow->y + shadow->blur + shadow->spread, shadowBottom); int borderBottom = isBox() ? toRenderBox(this)->borderBottom() : 0; int borderHeight = max(-outlineStyle->outlineOffset(), max(borderBottom, max(style()->borderBottomLeftRadius().height(), style()->borderBottomRightRadius().height()))) + max(ow, shadowBottom); @@ -2240,10 +2240,10 @@ void RenderObject::adjustRectForOutlineAndShadow(IntRect& rect) const int shadowBottom = 0; do { - shadowLeft = min(boxShadow->x - boxShadow->blur - outlineSize, shadowLeft); - shadowRight = max(boxShadow->x + boxShadow->blur + outlineSize, shadowRight); - shadowTop = min(boxShadow->y - boxShadow->blur - outlineSize, shadowTop); - shadowBottom = max(boxShadow->y + boxShadow->blur + outlineSize, shadowBottom); + shadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread - outlineSize, shadowLeft); + shadowRight = max(boxShadow->x + boxShadow->blur + boxShadow->spread + outlineSize, shadowRight); + shadowTop = min(boxShadow->y - boxShadow->blur - boxShadow->spread - outlineSize, shadowTop); + shadowBottom = max(boxShadow->y + boxShadow->blur + boxShadow->spread + outlineSize, shadowBottom); boxShadow = boxShadow->next; } while (boxShadow); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp index d9a0b6211f..ba045eab3b 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp @@ -333,7 +333,7 @@ void RenderReplaced::adjustOverflowForBoxShadowAndReflect() for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) { IntRect shadow = borderBoxRect(); shadow.move(boxShadow->x, boxShadow->y); - shadow.inflate(boxShadow->blur); + shadow.inflate(boxShadow->blur + boxShadow->spread); overflow.unite(shadow); } diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp index 5d70784254..009a375297 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp @@ -4,7 +4,7 @@ * (C) 1998 Waldo Bastian (bastian@kde.org) * (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) * * This library is free software; you can redistribute it and/or @@ -514,9 +514,10 @@ void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty) ty += captionHeight; } - paintBoxShadow(paintInfo.context, tx, ty, w, h, style()); + paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Normal); paintFillLayers(paintInfo, style()->backgroundColor(), style()->backgroundLayers(), tx, ty, w, h); + paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Inset); if (style()->hasBorder() && !collapseBorders()) paintBorder(paintInfo.context, tx, ty, w, h, style()); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTableCell.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTableCell.cpp index 9b02c9d297..acdd5d52c1 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTableCell.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTableCell.cpp @@ -4,7 +4,7 @@ * (C) 1998 Waldo Bastian (bastian@kde.org) * (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 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 @@ -847,10 +847,12 @@ void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty) int h = height(); if (style()->boxShadow()) - paintBoxShadow(paintInfo.context, tx, ty, w, h, style()); + paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Normal); // Paint our cell background. paintBackgroundsBehindCell(paintInfo, tx, ty, this); + if (style()->boxShadow()) + paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Inset); if (!style()->hasBorder() || tableElt->collapseBorders()) return; diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp index 9acd9b2145..95e71ddeef 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp @@ -235,7 +235,7 @@ void RenderTextControl::setSelectionRange(int start, int end) end = max(end, 0); start = min(max(start, 0), end); - document()->updateLayout(); + ASSERT(!document()->childNeedsAndNotInStyleRecalc()); if (style()->visibility() == HIDDEN || !m_innerText || !m_innerText->renderer() || !m_innerText->renderBox()->height()) { cacheSelection(start, end); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp index df31c2bdf6..566a81c868 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp @@ -106,19 +106,6 @@ PassRefPtr<RenderStyle> RenderTextControlMultiLine::createInnerTextStyle(const R textBlockStyle->inheritFrom(startStyle); adjustInnerTextStyle(startStyle, textBlockStyle.get()); - - // FIXME: This code should just map wrap into CSS in the DOM code. - // Then here we should set the textBlockStyle appropriately based off this - // object's style()->whiteSpace() and style->wordWrap(). - // Set word wrap property based on wrap attribute. - if (static_cast<HTMLTextAreaElement*>(node())->shouldWrapText()) { - textBlockStyle->setWhiteSpace(PRE_WRAP); - textBlockStyle->setWordWrap(BreakWordWrap); - } else { - textBlockStyle->setWhiteSpace(PRE); - textBlockStyle->setWordWrap(NormalWordWrap); - } - textBlockStyle->setDisplay(BLOCK); return textBlockStyle.release(); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp index 23b6343946..d48652fbf1 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp @@ -319,6 +319,7 @@ bool RenderTheme::paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo case TextAreaPart: return paintTextArea(o, paintInfo, r); case MenulistButtonPart: + case SearchFieldPart: return true; case CheckboxPart: case RadioPart: @@ -331,7 +332,6 @@ bool RenderTheme::paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo case SliderVerticalPart: case SliderThumbHorizontalPart: case SliderThumbVerticalPart: - case SearchFieldPart: case SearchFieldCancelButtonPart: case SearchFieldDecorationPart: case SearchFieldResultsDecorationPart: diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeWince.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderThemeWince.cpp new file mode 100644 index 0000000000..fb89678b6c --- /dev/null +++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeWince.cpp @@ -0,0 +1,667 @@ +/* + * This file is part of the WebKit project. + * + * Copyright (C) 2006, 2007 Apple Computer, Inc. + * Copyright (C) 2007-2009 Torch Mobile, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#include "config.h" +#include "RenderThemeWince.h" + +#include "CSSStyleSheet.h" +#include "CSSValueKeywords.h" +#include "Document.h" +#include "GraphicsContext.h" +#if ENABLE(VIDEO) +#include "HTMLMediaElement.h" +#endif + +#include <windows.h> + +/* + * The following constants are used to determine how a widget is drawn using + * Windows' Theme API. For more information on theme parts and states see + * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/topics/partsandstates.asp + */ +#define THEME_COLOR 204 +#define THEME_FONT 210 + +// Generic state constants +#define TS_NORMAL 1 +#define TS_HOVER 2 +#define TS_ACTIVE 3 +#define TS_DISABLED 4 +#define TS_FOCUSED 5 + +// Button constants +#define BP_BUTTON 1 +#define BP_RADIO 2 +#define BP_CHECKBOX 3 + +// Textfield constants +#define TFP_TEXTFIELD 1 +#define TFS_READONLY 6 + +typedef HANDLE (WINAPI*openThemeDataPtr)(HWND hwnd, LPCWSTR pszClassList); +typedef HRESULT (WINAPI*closeThemeDataPtr)(HANDLE hTheme); +typedef HRESULT (WINAPI*drawThemeBackgroundPtr)(HANDLE hTheme, HDC hdc, int iPartId, + int iStateId, const RECT *pRect, + const RECT* pClipRect); +typedef HRESULT (WINAPI*drawThemeEdgePtr)(HANDLE hTheme, HDC hdc, int iPartId, + int iStateId, const RECT *pRect, + unsigned uEdge, unsigned uFlags, + const RECT* pClipRect); +typedef HRESULT (WINAPI*getThemeContentRectPtr)(HANDLE hTheme, HDC hdc, int iPartId, + int iStateId, const RECT* pRect, + RECT* pContentRect); +typedef HRESULT (WINAPI*getThemePartSizePtr)(HANDLE hTheme, HDC hdc, int iPartId, + int iStateId, RECT* prc, int ts, + SIZE* psz); +typedef HRESULT (WINAPI*getThemeSysFontPtr)(HANDLE hTheme, int iFontId, OUT LOGFONT* pFont); +typedef HRESULT (WINAPI*getThemeColorPtr)(HANDLE hTheme, HDC hdc, int iPartId, + int iStateId, int iPropId, OUT COLORREF* pFont); + +namespace WebCore { + +static const int dropDownButtonWidth = 17; +static const int trackWidth = 4; + +PassRefPtr<RenderTheme> RenderThemeWince::create() +{ + return adoptRef(new RenderThemeWince); +} + +PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page) +{ + static RenderTheme* winceTheme = RenderThemeWince::create().releaseRef(); + return winceTheme; +} + +RenderThemeWince::RenderThemeWince() +{ +} + +RenderThemeWince::~RenderThemeWince() +{ +} + +Color RenderThemeWince::platformActiveSelectionBackgroundColor() const +{ + COLORREF color = GetSysColor(COLOR_HIGHLIGHT); + return Color(GetRValue(color), GetGValue(color), GetBValue(color), 255); +} + +Color RenderThemeWince::platformInactiveSelectionBackgroundColor() const +{ + COLORREF color = GetSysColor(COLOR_GRAYTEXT); + return Color(GetRValue(color), GetGValue(color), GetBValue(color), 255); +} + +Color RenderThemeWince::platformActiveSelectionForegroundColor() const +{ + COLORREF color = GetSysColor(COLOR_HIGHLIGHTTEXT); + return Color(GetRValue(color), GetGValue(color), GetBValue(color), 255); +} + +Color RenderThemeWince::platformInactiveSelectionForegroundColor() const +{ + return Color::white; +} + +bool RenderThemeWince::supportsFocus(ControlPart appearance) const +{ + switch (appearance) { + case PushButtonPart: + case ButtonPart: + case TextFieldPart: + case TextAreaPart: + return true; + default: + return false; + } + + return false; +} + +bool RenderThemeWince::supportsFocusRing(const RenderStyle *style) const +{ + return supportsFocus(style->appearance()); +} + +unsigned RenderThemeWince::determineClassicState(RenderObject* o) +{ + unsigned result = 0; + if (!isEnabled(o) || isReadOnlyControl(o)) + result = DFCS_INACTIVE; + else if (isPressed(o)) // Active supersedes hover + result = DFCS_PUSHED; + + if (isChecked(o)) + result |= DFCS_CHECKED; + return result; +} + +ThemeData RenderThemeWince::getThemeData(RenderObject* o) +{ + ThemeData result; + switch (o->style()->appearance()) { + case PushButtonPart: + case ButtonPart: + result.m_part = BP_BUTTON; + result.m_classicState = DFCS_BUTTONPUSH; + break; + case CheckboxPart: + result.m_part = BP_CHECKBOX; + result.m_classicState = DFCS_BUTTONCHECK; + break; + case RadioPart: + result.m_part = BP_RADIO; + result.m_classicState = DFCS_BUTTONRADIO; + break; + case ListboxPart: + case MenulistPart: + case TextFieldPart: + case TextAreaPart: + result.m_part = TFP_TEXTFIELD; + break; + } + + result.m_classicState |= determineClassicState(o); + + return result; +} + +bool RenderThemeWince::paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) +{ + // Get the correct theme data for a button + ThemeData themeData = getThemeData(o); + + // Now paint the button. + i.context->drawFrameControl(r, DFC_BUTTON, themeData.m_classicState); + if (isFocused(o)) { + if (themeData.m_part == BP_BUTTON) { + IntRect focusRect(r); + focusRect.inflate(-2); + i.context->drawFocusRect(focusRect); + } else + i.context->drawFocusRect(r); + } + + return false; +} + +void RenderThemeWince::setCheckboxSize(RenderStyle* style) const +{ + // If the width and height are both specified, then we have nothing to do. + if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto()) + return; + + // FIXME: A hard-coded size of 13 is used. This is wrong but necessary for now. It matches Firefox. + // At different DPI settings on Windows, querying the theme gives you a larger size that accounts for + // the higher DPI. Until our entire engine honors a DPI setting other than 96, we can't rely on the theme's + // metrics. + if (style->width().isIntrinsicOrAuto()) + style->setWidth(Length(13, Fixed)); + if (style->height().isAuto()) + style->setHeight(Length(13, Fixed)); +} + +bool RenderThemeWince::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) +{ + // Get the correct theme data for a textfield + ThemeData themeData = getThemeData(o); + + // Now paint the text field. + i.context->paintTextField(r, themeData.m_classicState); + + return false; +} + +void RenderThemeWince::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const +{ + style->resetBorder(); + adjustMenuListButtonStyle(selector, style, e); +} + +bool RenderThemeWince::paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) +{ + paintTextField(o, i, r); + paintMenuListButton(o, i, r); + return true; +} + +bool RenderThemeWince::paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) +{ + IntRect buttonRect(r.right() - dropDownButtonWidth - 1, r.y(), dropDownButtonWidth, r.height()); + buttonRect.inflateY(-1); + i.context->drawFrameControl(buttonRect, DFC_SCROLL, DFCS_SCROLLCOMBOBOX | determineClassicState(o)); + return true; +} + +void RenderThemeWince::systemFont(int propId, FontDescription& fontDescription) const +{ + notImplemented(); +} + +void RenderThemeWince::themeChanged() +{ +} + +String RenderThemeWince::extraDefaultStyleSheet() +{ + notImplemented(); + return String(); +} + +String RenderThemeWince::extraQuirksStyleSheet() +{ + notImplemented(); + return String(); +} + +bool RenderThemeWince::supportsHover(const RenderStyle*) const +{ + return false; +} + +// Map a CSSValue* system color to an index understood by GetSysColor +static int cssValueIdToSysColorIndex(int cssValueId) +{ + switch (cssValueId) { + case CSSValueActiveborder: return COLOR_ACTIVEBORDER; + case CSSValueActivecaption: return COLOR_ACTIVECAPTION; + case CSSValueAppworkspace: return COLOR_APPWORKSPACE; + case CSSValueBackground: return COLOR_BACKGROUND; + case CSSValueButtonface: return COLOR_BTNFACE; + case CSSValueButtonhighlight: return COLOR_BTNHIGHLIGHT; + case CSSValueButtonshadow: return COLOR_BTNSHADOW; + case CSSValueButtontext: return COLOR_BTNTEXT; + case CSSValueCaptiontext: return COLOR_CAPTIONTEXT; + case CSSValueGraytext: return COLOR_GRAYTEXT; + case CSSValueHighlight: return COLOR_HIGHLIGHT; + case CSSValueHighlighttext: return COLOR_HIGHLIGHTTEXT; + case CSSValueInactiveborder: return COLOR_INACTIVEBORDER; + case CSSValueInactivecaption: return COLOR_INACTIVECAPTION; + case CSSValueInactivecaptiontext: return COLOR_INACTIVECAPTIONTEXT; + case CSSValueInfobackground: return COLOR_INFOBK; + case CSSValueInfotext: return COLOR_INFOTEXT; + case CSSValueMenu: return COLOR_MENU; + case CSSValueMenutext: return COLOR_MENUTEXT; + case CSSValueScrollbar: return COLOR_SCROLLBAR; + case CSSValueThreeddarkshadow: return COLOR_3DDKSHADOW; + case CSSValueThreedface: return COLOR_3DFACE; + case CSSValueThreedhighlight: return COLOR_3DHIGHLIGHT; + case CSSValueThreedlightshadow: return COLOR_3DLIGHT; + case CSSValueThreedshadow: return COLOR_3DSHADOW; + case CSSValueWindow: return COLOR_WINDOW; + case CSSValueWindowframe: return COLOR_WINDOWFRAME; + case CSSValueWindowtext: return COLOR_WINDOWTEXT; + default: return -1; // Unsupported CSSValue + } +} + +Color RenderThemeWince::systemColor(int cssValueId) const +{ + int sysColorIndex = cssValueIdToSysColorIndex(cssValueId); + if (sysColorIndex == -1) + return RenderTheme::systemColor(cssValueId); + + COLORREF color = GetSysColor(sysColorIndex); + return Color(GetRValue(color), GetGValue(color), GetBValue(color)); +} + +const int sliderThumbWidth = 7; +const int sliderThumbHeight = 15; + +void RenderThemeWince::adjustSliderThumbSize(RenderObject* o) const +{ + if (o->style()->appearance() == SliderThumbVerticalPart) { + o->style()->setWidth(Length(sliderThumbHeight, Fixed)); + o->style()->setHeight(Length(sliderThumbWidth, Fixed)); + } else if (o->style()->appearance() == SliderThumbHorizontalPart) { + o->style()->setWidth(Length(sliderThumbWidth, Fixed)); + o->style()->setHeight(Length(sliderThumbHeight, Fixed)); + } +} + +#if 0 +void RenderThemeWince::adjustButtonInnerStyle(RenderStyle* style) const +{ + // This inner padding matches Firefox. + style->setPaddingTop(Length(1, Fixed)); + style->setPaddingRight(Length(3, Fixed)); + style->setPaddingBottom(Length(1, Fixed)); + style->setPaddingLeft(Length(3, Fixed)); +} + +void RenderThemeWince::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const +{ + // Override padding size to match AppKit text positioning. + const int padding = 1; + style->setPaddingLeft(Length(padding, Fixed)); + style->setPaddingRight(Length(padding, Fixed)); + style->setPaddingTop(Length(padding, Fixed)); + style->setPaddingBottom(Length(padding, Fixed)); +} +#endif + +bool RenderThemeWince::paintSearchField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) +{ + return paintTextField(o, i, r); +} + +bool RenderThemeWince::paintSearchFieldCancelButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + Color buttonColor = (o->node() && o->node()->active()) ? Color(138, 138, 138) : Color(186, 186, 186); + + IntSize cancelSize(10, 10); + IntSize cancelRadius(cancelSize.width() / 2, cancelSize.height() / 2); + int x = r.x() + (r.width() - cancelSize.width()) / 2; + int y = r.y() + (r.height() - cancelSize.height()) / 2 + 1; + IntRect cancelBounds(IntPoint(x, y), cancelSize); + paintInfo.context->save(); + paintInfo.context->addRoundedRectClip(cancelBounds, cancelRadius, cancelRadius, cancelRadius, cancelRadius); + paintInfo.context->fillRect(cancelBounds, buttonColor); + + // Draw the 'x' + IntSize xSize(3, 3); + IntRect xBounds(cancelBounds.location() + IntSize(3, 3), xSize); + paintInfo.context->setStrokeColor(Color::white); + paintInfo.context->drawLine(xBounds.location(), xBounds.location() + xBounds.size()); + paintInfo.context->drawLine(IntPoint(xBounds.right(), xBounds.y()), IntPoint(xBounds.x(), xBounds.bottom())); + + paintInfo.context->restore(); + return false; +} + +void RenderThemeWince::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const +{ + IntSize cancelSize(13, 11); + style->setWidth(Length(cancelSize.width(), Fixed)); + style->setHeight(Length(cancelSize.height(), Fixed)); +} + +void RenderThemeWince::adjustSearchFieldDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const +{ + IntSize emptySize(1, 11); + style->setWidth(Length(emptySize.width(), Fixed)); + style->setHeight(Length(emptySize.height(), Fixed)); +} + +void RenderThemeWince::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const +{ + IntSize magnifierSize(15, 11); + style->setWidth(Length(magnifierSize.width(), Fixed)); + style->setHeight(Length(magnifierSize.height(), Fixed)); +} + +bool RenderThemeWince::paintSearchFieldResultsDecoration(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + notImplemented(); + return false; +} + +void RenderThemeWince::adjustSearchFieldResultsButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const +{ + IntSize magnifierSize(15, 11); + style->setWidth(Length(magnifierSize.width(), Fixed)); + style->setHeight(Length(magnifierSize.height(), Fixed)); +} + +bool RenderThemeWince::paintSearchFieldResultsButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + paintSearchFieldResultsDecoration(o, paintInfo, r); + return false; +} + +void RenderThemeWince::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const +{ + // These are the paddings needed to place the text correctly in the <select> box + const int dropDownBoxPaddingTop = 2; + const int dropDownBoxPaddingRight = style->direction() == LTR ? 4 + dropDownButtonWidth : 4; + const int dropDownBoxPaddingBottom = 2; + const int dropDownBoxPaddingLeft = style->direction() == LTR ? 4 : 4 + dropDownButtonWidth; + // The <select> box must be at least 12px high for the button to render nicely on Windows + const int dropDownBoxMinHeight = 12; + + // Position the text correctly within the select box and make the box wide enough to fit the dropdown button + style->setPaddingTop(Length(dropDownBoxPaddingTop, Fixed)); + style->setPaddingRight(Length(dropDownBoxPaddingRight, Fixed)); + style->setPaddingBottom(Length(dropDownBoxPaddingBottom, Fixed)); + style->setPaddingLeft(Length(dropDownBoxPaddingLeft, Fixed)); + + // Height is locked to auto + style->setHeight(Length(Auto)); + + // Calculate our min-height + int minHeight = style->font().height(); + minHeight = max(minHeight, dropDownBoxMinHeight); + + style->setMinHeight(Length(minHeight, Fixed)); + + // White-space is locked to pre + style->setWhiteSpace(PRE); + + DWORD colorMenu = GetSysColor(COLOR_MENU); + DWORD colorMenuText = GetSysColor(COLOR_MENUTEXT); + Color bgColor(GetRValue(colorMenu), GetGValue(colorMenu), GetBValue(colorMenu), 255); + Color textColor(GetRValue(colorMenuText), GetGValue(colorMenuText), GetBValue(colorMenuText), 255); + if (bgColor == textColor) + textColor.setRGB((~bgColor.rgb()) | 0xFF000000); + style->clearBackgroundLayers(); + style->accessBackgroundLayers()->setClip(ContentFillBox); + style->setBackgroundColor(bgColor); + style->setColor(textColor); +} + +#if ENABLE(VIDEO) +// Attempt to retrieve a HTMLMediaElement from a Node. Returns 0 if one cannot be found. +static HTMLMediaElement* mediaElementParent(Node* node) +{ + if (!node) + return 0; + Node* mediaNode = node->shadowAncestorNode(); + if (!mediaNode || (!mediaNode->hasTagName(HTMLNames::videoTag) && !mediaNode->hasTagName(HTMLNames::audioTag))) + return 0; + + return static_cast<HTMLMediaElement*>(mediaNode); +} +#endif + +bool RenderThemeWince::paintSliderTrack(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) +{ + bool rc = RenderTheme::paintSliderTrack(o, i, r); + IntPoint left = IntPoint(r.x() + 2, (r.y() + r.bottom()) / 2); + i.context->save(); + i.context->setStrokeColor(Color::gray); + i.context->setFillColor(Color::gray); + i.context->fillRect(r); +#if ENABLE(VIDEO) + HTMLMediaElement *mediaElement = mediaElementParent(o->node()); + if (mediaElement) { + i.context->setStrokeColor(Color(0, 0xff, 0)); + IntPoint right = IntPoint(left.x() + mediaElement->percentLoaded() * (r.right() - r.x() - 4), (r.y() + r.bottom()) / 2); + i.context->drawLine(left, right); + left = right; + } +#endif + i.context->setStrokeColor(Color::black); + i.context->drawLine(left, IntPoint(r.right() - 2, left.y())); + i.context->restore(); + return rc; +} + +bool RenderThemeWince::paintSliderThumb(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) +{ + bool rc = RenderTheme::paintSliderThumb(o, i, r); + i.context->save(); + i.context->setStrokeColor(Color::black); + i.context->setFillColor(Color::black); +#if ENABLE(VIDEO) + HTMLMediaElement *mediaElement = mediaElementParent(o->node()); + if (mediaElement) { + float pt = (mediaElement->currentTime() - mediaElement->startTime()) / mediaElement->duration(); + FloatRect intRect = r; + intRect.setX(intRect.x() + intRect.width() * pt - 2); + intRect.setWidth(5); + i.context->fillRect(intRect); + } +#endif + i.context->restore(); + return rc; +} + +int RenderThemeWince::buttonInternalPaddingLeft() const +{ + return 3; +} + +int RenderThemeWince::buttonInternalPaddingRight() const +{ + return 3; +} + +int RenderThemeWince::buttonInternalPaddingTop() const +{ + return 1; +} + +int RenderThemeWince::buttonInternalPaddingBottom() const +{ + return 1; +} + +void RenderThemeWince::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const +{ + const int padding = 1; + style->setPaddingLeft(Length(padding, Fixed)); + style->setPaddingRight(Length(padding, Fixed)); + style->setPaddingTop(Length(padding, Fixed)); + style->setPaddingBottom(Length(padding, Fixed)); +} + +#if ENABLE(VIDEO) + +bool RenderThemeWince::paintMediaFullscreenButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + bool rc = paintButton(o, paintInfo, r); + FloatRect imRect = r; + imRect.inflate(-2); + paintInfo.context->save(); + paintInfo.context->setStrokeColor(Color::black); + paintInfo.context->setFillColor(Color::gray); + paintInfo.context->fillRect(imRect); + paintInfo.context->restore(); + return rc; +} + +bool RenderThemeWince::paintMediaMuteButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + bool rc = paintButton(o, paintInfo, r); + HTMLMediaElement *mediaElement = mediaElementParent(o->node()); + bool muted = !mediaElement || mediaElement->muted(); + FloatRect imRect = r; + imRect.inflate(-2); + paintInfo.context->save(); + paintInfo.context->setStrokeColor(Color::black); + paintInfo.context->setFillColor(Color::black); + FloatPoint pts[6] = { + FloatPoint(imRect.x() + 1, imRect.y() + imRect.height() / 3.0), + FloatPoint(imRect.x() + 1 + imRect.width() / 2.0, imRect.y() + imRect.height() / 3.0), + FloatPoint(imRect.right() - 1, imRect.y()), + FloatPoint(imRect.right() - 1, imRect.bottom()), + FloatPoint(imRect.x() + 1 + imRect.width() / 2.0, imRect.y() + 2.0 * imRect.height() / 3.0), + FloatPoint(imRect.x() + 1, imRect.y() + 2.0 * imRect.height() / 3.0) + }; + paintInfo.context->drawConvexPolygon(6, pts); + if (muted) + paintInfo.context->drawLine(IntPoint(imRect.right(), imRect.y()), IntPoint(imRect.x(), imRect.bottom())); + paintInfo.context->restore(); + return rc; +} + +bool RenderThemeWince::paintMediaPlayButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + bool rc = paintButton(o, paintInfo, r); + FloatRect imRect = r; + imRect.inflate(-3); + paintInfo.context->save(); + paintInfo.context->setStrokeColor(Color::black); + paintInfo.context->setFillColor(Color::black); + HTMLMediaElement *mediaElement = mediaElementParent(o->node()); + bool paused = !mediaElement || mediaElement->paused(); + if (paused) { + float width = imRect.width(); + imRect.setWidth(width / 3.0); + paintInfo.context->fillRect(imRect); + imRect.move(2.0 * width / 3.0, 0); + paintInfo.context->fillRect(imRect); + } else { + FloatPoint pts[3] = { FloatPoint(imRect.x(), imRect.y()), FloatPoint(imRect.right(), (imRect.y() + imRect.bottom()) / 2.0), FloatPoint(imRect.x(), imRect.bottom()) }; + paintInfo.context->drawConvexPolygon(3, pts); + } + paintInfo.context->restore(); + return rc; +} + +bool RenderThemeWince::paintMediaSeekBackButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + bool rc = paintButton(o, paintInfo, r); + FloatRect imRect = r; + imRect.inflate(-3); + FloatPoint pts[3] = { FloatPoint((imRect.x() + imRect.right()) / 2.0, imRect.y()), FloatPoint(imRect.x(), (imRect.y() + imRect.bottom()) / 2.0), FloatPoint((imRect.x() + imRect.right()) / 2.0, imRect.bottom()) }; + FloatPoint pts2[3] = { FloatPoint(imRect.right(), imRect.y()), FloatPoint((imRect.x() + imRect.right()) / 2.0, (imRect.y() + imRect.bottom()) / 2.0), FloatPoint(imRect.right(), imRect.bottom()) }; + paintInfo.context->save(); + paintInfo.context->setStrokeColor(Color::black); + paintInfo.context->setFillColor(Color::black); + paintInfo.context->drawConvexPolygon(3, pts); + paintInfo.context->drawConvexPolygon(3, pts2); + paintInfo.context->restore(); + return rc; +} + +bool RenderThemeWince::paintMediaSeekForwardButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + bool rc = paintButton(o, paintInfo, r); + FloatRect imRect = r; + imRect.inflate(-3); + FloatPoint pts[3] = { FloatPoint(imRect.x(), imRect.y()), FloatPoint((imRect.x() + imRect.right()) / 2.0, (imRect.y() + imRect.bottom()) / 2.0), FloatPoint(imRect.x(), imRect.bottom()) }; + FloatPoint pts2[3] = { FloatPoint((imRect.x() + imRect.right()) / 2.0, imRect.y()), FloatPoint(imRect.right(), (imRect.y() + imRect.bottom()) / 2.0), FloatPoint((imRect.x() + imRect.right()) / 2.0, imRect.bottom()) }; + paintInfo.context->save(); + paintInfo.context->setStrokeColor(Color::black); + paintInfo.context->setFillColor(Color::black); + paintInfo.context->drawConvexPolygon(3, pts); + paintInfo.context->drawConvexPolygon(3, pts2); + paintInfo.context->restore(); + return rc; +} + +bool RenderThemeWince::paintMediaSliderTrack(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + return paintSliderTrack(o, paintInfo, r); +} + +bool RenderThemeWince::paintMediaSliderThumb(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + return paintSliderThumb(o, paintInfo, r); +} +#endif + +} + diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeWince.h b/src/3rdparty/webkit/WebCore/rendering/RenderThemeWince.h new file mode 100644 index 0000000000..a2d04e1219 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeWince.h @@ -0,0 +1,147 @@ +/* + * This file is part of the WebKit project. + * + * Copyright (C) 2006, 2008 Apple Computer, Inc. + * Copyright (C) 2009 Torch Mobile, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifndef RenderThemeWince_h +#define RenderThemeWince_h + +#include "RenderTheme.h" + +typedef void* HANDLE; +typedef struct HINSTANCE__* HINSTANCE; +typedef HINSTANCE HMODULE; + +namespace WebCore { + + struct ThemeData { + ThemeData() :m_part(0), m_state(0), m_classicState(0) {} + ThemeData(int part, int state) + : m_part(part) + , m_state(state) + , m_classicState(0) + { } + + unsigned m_part; + unsigned m_state; + unsigned m_classicState; + }; + + class RenderThemeWince : public RenderTheme { + public: + static PassRefPtr<RenderTheme> create(); + ~RenderThemeWince(); + + virtual String extraDefaultStyleSheet(); + virtual String extraQuirksStyleSheet(); + + // A method asking if the theme's controls actually care about redrawing when hovered. + virtual bool supportsHover(const RenderStyle*) const; + + virtual Color platformActiveSelectionBackgroundColor() const; + virtual Color platformInactiveSelectionBackgroundColor() const; + virtual Color platformActiveSelectionForegroundColor() const; + virtual Color platformInactiveSelectionForegroundColor() const; + + // System fonts. + virtual void systemFont(int propId, FontDescription&) const; + virtual Color systemColor(int cssValueId) const; + + virtual bool paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) + { return paintButton(o, i, r); } + virtual void setCheckboxSize(RenderStyle*) const; + + virtual bool paintRadio(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) + { return paintButton(o, i, r); } + virtual void setRadioSize(RenderStyle* style) const + { return setCheckboxSize(style); } + + virtual bool paintButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + + virtual bool paintTextField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + + virtual bool paintTextArea(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) + { return paintTextField(o, i, r); } + + virtual void adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const; + virtual bool paintMenuList(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + virtual void adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const; + + virtual bool paintMenuListButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + + virtual bool paintSliderTrack(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r); + virtual bool paintSliderThumb(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r); + virtual void adjustSliderThumbSize(RenderObject*) const; + + virtual bool popupOptionSupportsTextIndent() const { return true; } + + virtual int buttonInternalPaddingLeft() const; + virtual int buttonInternalPaddingRight() const; + virtual int buttonInternalPaddingTop() const; + virtual int buttonInternalPaddingBottom() const; + + virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const; + virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + + virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; + virtual bool paintSearchFieldCancelButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + + virtual void adjustSearchFieldDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const; + virtual bool paintSearchFieldDecoration(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return false; } + + virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const; + virtual bool paintSearchFieldResultsDecoration(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + + virtual void adjustSearchFieldResultsButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const; + virtual bool paintSearchFieldResultsButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + + virtual void themeChanged(); + + virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const {} + virtual void adjustTextFieldStyle(CSSStyleSelector*, RenderStyle* style, Element*) const {} + virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle* style, Element*) const {} + + static void setWebKitIsBeingUnloaded(); + + virtual bool supportsFocusRing(const RenderStyle*) const; + + #if ENABLE(VIDEO) + virtual bool paintMediaFullscreenButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + virtual bool paintMediaPlayButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + virtual bool paintMediaMuteButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + virtual bool paintMediaSeekBackButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + virtual bool paintMediaSeekForwardButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + virtual bool paintMediaSliderTrack(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + virtual bool paintMediaSliderThumb(RenderObject*, const RenderObject::PaintInfo&, const IntRect&); + #endif + + private: + RenderThemeWince(); + + unsigned determineClassicState(RenderObject*); + bool supportsFocus(ControlPart) const; + + ThemeData getThemeData(RenderObject*); + }; + +}; + +#endif diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderView.h b/src/3rdparty/webkit/WebCore/rendering/RenderView.h index b0de7dd8f0..854a4214d3 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderView.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderView.h @@ -222,7 +222,7 @@ void toRenderView(const RenderView*); // Stack-based class to assist with LayoutState push/pop -class LayoutStateMaintainer : Noncopyable { +class LayoutStateMaintainer : public Noncopyable { public: // ctor to push now LayoutStateMaintainer(RenderView* view, RenderBox* root, IntSize offset, bool disableState = false) diff --git a/src/3rdparty/webkit/WebCore/rendering/SVGRenderTreeAsText.cpp b/src/3rdparty/webkit/WebCore/rendering/SVGRenderTreeAsText.cpp index 33baebac87..cc5e4b8552 100644 --- a/src/3rdparty/webkit/WebCore/rendering/SVGRenderTreeAsText.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/SVGRenderTreeAsText.cpp @@ -33,6 +33,7 @@ #include "GraphicsTypes.h" #include "InlineTextBox.h" #include "HTMLNames.h" +#include "NodeRenderStyle.h" #include "RenderPath.h" #include "RenderSVGContainer.h" #include "RenderSVGImage.h" @@ -272,7 +273,7 @@ static void writeStyle(TextStream& ts, const RenderObject& object) ts << s << *strokePaintServer; double dashOffset = SVGRenderStyle::cssPrimitiveToLength(&path, svgStyle->strokeDashOffset(), 0.0f); - const DashArray& dashArray = dashArrayFromRenderingStyle(style); + const DashArray& dashArray = dashArrayFromRenderingStyle(style, object.document()->documentElement()->renderStyle()); double strokeWidth = SVGRenderStyle::cssPrimitiveToLength(&path, svgStyle->strokeWidth(), 1.0f); writeIfNotDefault(ts, "opacity", svgStyle->strokeOpacity(), 1.0f); diff --git a/src/3rdparty/webkit/WebCore/rendering/TransformState.h b/src/3rdparty/webkit/WebCore/rendering/TransformState.h index 92275f9fef..d2c962a90c 100644 --- a/src/3rdparty/webkit/WebCore/rendering/TransformState.h +++ b/src/3rdparty/webkit/WebCore/rendering/TransformState.h @@ -37,7 +37,7 @@ namespace WebCore { -class TransformState : Noncopyable { +class TransformState : public Noncopyable { public: enum TransformDirection { ApplyTransformDirection, UnapplyInverseTransformDirection }; enum TransformAccumulation { FlattenTransform, AccumulateTransform }; diff --git a/src/3rdparty/webkit/WebCore/rendering/style/FillLayer.h b/src/3rdparty/webkit/WebCore/rendering/style/FillLayer.h index 2dc5871889..c3944adc90 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/FillLayer.h +++ b/src/3rdparty/webkit/WebCore/rendering/style/FillLayer.h @@ -42,7 +42,7 @@ public: StyleImage* image() const { return m_image.get(); } Length xPosition() const { return m_xPosition; } Length yPosition() const { return m_yPosition; } - bool attachment() const { return m_attachment; } + EFillAttachment attachment() const { return static_cast<EFillAttachment>(m_attachment); } EFillBox clip() const { return static_cast<EFillBox>(m_clip); } EFillBox origin() const { return static_cast<EFillBox>(m_origin); } EFillRepeat repeat() const { return static_cast<EFillRepeat>(m_repeat); } @@ -65,7 +65,7 @@ public: void setImage(StyleImage* i) { m_image = i; m_imageSet = true; } void setXPosition(const Length& l) { m_xPosition = l; m_xPosSet = true; } void setYPosition(const Length& l) { m_yPosition = l; m_yPosSet = true; } - void setAttachment(bool b) { m_attachment = b; m_attachmentSet = true; } + void setAttachment(EFillAttachment attachment) { m_attachment = attachment; m_attachmentSet = true; } void setClip(EFillBox b) { m_clip = b; m_clipSet = true; } void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; } void setRepeat(EFillRepeat r) { m_repeat = r; m_repeatSet = true; } @@ -104,7 +104,7 @@ public: bool hasFixedImage() const { - if (m_image && !m_attachment) + if (m_image && m_attachment == FixedBackgroundAttachment) return true; return m_next ? m_next->hasFixedImage() : false; } @@ -114,7 +114,7 @@ public: void fillUnsetProperties(); void cullEmptyLayers(); - static bool initialFillAttachment(EFillLayerType) { return true; } + static EFillAttachment initialFillAttachment(EFillLayerType) { return ScrollBackgroundAttachment; } static EFillBox initialFillClip(EFillLayerType) { return BorderFillBox; } static EFillBox initialFillOrigin(EFillLayerType type) { return type == BackgroundFillLayer ? PaddingFillBox : BorderFillBox; } static EFillRepeat initialFillRepeat(EFillLayerType) { return RepeatFill; } @@ -133,7 +133,7 @@ public: Length m_xPosition; Length m_yPosition; - bool m_attachment : 1; + unsigned m_attachment : 2; // EFillAttachment unsigned m_clip : 2; // EFillBox unsigned m_origin : 2; // EFillBox unsigned m_repeat : 2; // EFillRepeat diff --git a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp index 36255b8132..efec1bdd53 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp @@ -695,6 +695,8 @@ void RenderStyle::addBindingURI(StringImpl* uri) void RenderStyle::setTextShadow(ShadowData* val, bool add) { + ASSERT(!val || !val->spread); + StyleRareInheritedData* rareData = rareInheritedData.access(); if (!add) { delete rareData->textShadow; diff --git a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h index 6922c8870b..4582dbb2b9 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h +++ b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h @@ -523,7 +523,7 @@ public: StyleImage* backgroundImage() const { return background->m_background.m_image.get(); } EFillRepeat backgroundRepeat() const { return static_cast<EFillRepeat>(background->m_background.m_repeat); } CompositeOperator backgroundComposite() const { return static_cast<CompositeOperator>(background->m_background.m_composite); } - bool backgroundAttachment() const { return background->m_background.m_attachment; } + EFillAttachment backgroundAttachment() const { return static_cast<EFillAttachment>(background->m_background.m_attachment); } EFillBox backgroundClip() const { return static_cast<EFillBox>(background->m_background.m_clip); } EFillBox backgroundOrigin() const { return static_cast<EFillBox>(background->m_background.m_origin); } Length backgroundXPosition() const { return background->m_background.m_xPosition; } @@ -535,7 +535,7 @@ public: StyleImage* maskImage() const { return rareNonInheritedData->m_mask.m_image.get(); } EFillRepeat maskRepeat() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.m_repeat); } CompositeOperator maskComposite() const { return static_cast<CompositeOperator>(rareNonInheritedData->m_mask.m_composite); } - bool maskAttachment() const { return rareNonInheritedData->m_mask.m_attachment; } + EFillAttachment maskAttachment() const { return static_cast<EFillAttachment>(rareNonInheritedData->m_mask.m_attachment); } EFillBox maskClip() const { return static_cast<EFillBox>(rareNonInheritedData->m_mask.m_clip); } EFillBox maskOrigin() const { return static_cast<EFillBox>(rareNonInheritedData->m_mask.m_origin); } Length maskXPosition() const { return rareNonInheritedData->m_mask.m_xPosition; } diff --git a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h index b08dd87e08..1b3e1f405f 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h +++ b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h @@ -122,6 +122,10 @@ enum EUnicodeBidi { UBNormal, Embed, Override }; +enum EFillAttachment { + ScrollBackgroundAttachment, LocalBackgroundAttachment, FixedBackgroundAttachment +}; + enum EFillBox { BorderFillBox, PaddingFillBox, ContentFillBox, TextFillBox }; diff --git a/src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyle.cpp b/src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyle.cpp index c5f06481fd..1289b06b79 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyle.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyle.cpp @@ -32,6 +32,7 @@ #include "CSSPrimitiveValue.h" #include "CSSValueList.h" +#include "NodeRenderStyle.h" #include "RenderObject.h" #include "RenderStyle.h" #include "SVGStyledElement.h" @@ -136,7 +137,7 @@ float SVGRenderStyle::cssPrimitiveToLength(const RenderObject* item, CSSValue* v } } - return primitive->computeLengthFloat(const_cast<RenderStyle*>(item->style())); + return primitive->computeLengthFloat(const_cast<RenderStyle*>(item->style()), item->document()->documentElement()->renderStyle()); } } diff --git a/src/3rdparty/webkit/WebCore/rendering/style/ShadowData.cpp b/src/3rdparty/webkit/WebCore/rendering/style/ShadowData.cpp index 75fb9dc89f..1954224e02 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/ShadowData.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/style/ShadowData.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 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 @@ -28,6 +28,8 @@ ShadowData::ShadowData(const ShadowData& o) : x(o.x) , y(o.y) , blur(o.blur) + , spread(o.spread) + , style(o.style) , color(o.color) { next = o.next ? new ShadowData(*o.next) : 0; @@ -39,7 +41,7 @@ bool ShadowData::operator==(const ShadowData& o) const (next && o.next && *next != *o.next)) return false; - return x == o.x && y == o.y && blur == o.blur && color == o.color; + return x == o.x && y == o.y && blur == o.blur && spread == o.spread && style == o.style && color == o.color; } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/rendering/style/ShadowData.h b/src/3rdparty/webkit/WebCore/rendering/style/ShadowData.h index dac2b18843..f4061f2e5e 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/ShadowData.h +++ b/src/3rdparty/webkit/WebCore/rendering/style/ShadowData.h @@ -2,7 +2,7 @@ * Copyright (C) 2000 Lars Knoll (knoll@kde.org) * (C) 2000 Antti Koivisto (koivisto@kde.org) * (C) 2000 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) * * This library is free software; you can redistribute it and/or @@ -29,6 +29,8 @@ namespace WebCore { +enum ShadowStyle { Normal, Inset }; + // This struct holds information about shadows for the text-shadow and box-shadow properties. struct ShadowData { @@ -36,15 +38,19 @@ struct ShadowData { : x(0) , y(0) , blur(0) + , spread(0) + , style(Normal) , next(0) { } - ShadowData(int _x, int _y, int _blur, const Color& _color) - : x(_x) - , y(_y) - , blur(_blur) - , color(_color) + ShadowData(int x, int y, int blur, int spread, ShadowStyle style, const Color& color) + : x(x) + , y(y) + , blur(blur) + , spread(spread) + , style(style) + , color(color) , next(0) { } @@ -62,6 +68,8 @@ struct ShadowData { int x; int y; int blur; + int spread; + ShadowStyle style; Color color; ShadowData* next; }; diff --git a/src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp b/src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp index 4a64fe62bd..e7c9485ef9 100644 --- a/src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp +++ b/src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp @@ -227,13 +227,6 @@ String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String } statement.finalize(); - SQLiteStatement sequenceStatement(m_database, "SELECT seq FROM sqlite_sequence WHERE name='Databases';"); - - // FIXME: More informative error handling here, even though these steps should never fail - if (sequenceStatement.prepare() != SQLResultOk) - return String(); - result = sequenceStatement.step(); - String fileName = SQLiteFileSystem::getFileNameForNewDatabase(originPath, origin->databaseIdentifier(), name, &m_database); if (!addDatabase(origin, name, fileName)) return String(); diff --git a/src/3rdparty/webkit/WebCore/storage/LocalStorageTask.cpp b/src/3rdparty/webkit/WebCore/storage/LocalStorageTask.cpp index f9b8dc23a5..f5d4890eae 100644 --- a/src/3rdparty/webkit/WebCore/storage/LocalStorageTask.cpp +++ b/src/3rdparty/webkit/WebCore/storage/LocalStorageTask.cpp @@ -49,6 +49,10 @@ LocalStorageTask::LocalStorageTask(Type type, PassRefPtr<LocalStorageThread> thr ASSERT(m_type == TerminateThread); } +LocalStorageTask::~LocalStorageTask() +{ +} + void LocalStorageTask::performTask() { switch (m_type) { diff --git a/src/3rdparty/webkit/WebCore/storage/LocalStorageTask.h b/src/3rdparty/webkit/WebCore/storage/LocalStorageTask.h index 2c397dad76..b12a26b8f7 100644 --- a/src/3rdparty/webkit/WebCore/storage/LocalStorageTask.h +++ b/src/3rdparty/webkit/WebCore/storage/LocalStorageTask.h @@ -42,6 +42,8 @@ namespace WebCore { public: enum Type { AreaImport, AreaSync, TerminateThread }; + ~LocalStorageTask(); + static PassRefPtr<LocalStorageTask> createImport(PassRefPtr<StorageAreaSync> area) { return adoptRef(new LocalStorageTask(AreaImport, area)); } static PassRefPtr<LocalStorageTask> createSync(PassRefPtr<StorageAreaSync> area) { return adoptRef(new LocalStorageTask(AreaSync, area)); } static PassRefPtr<LocalStorageTask> createTerminate(PassRefPtr<LocalStorageThread> thread) { return adoptRef(new LocalStorageTask(TerminateThread, thread)); } diff --git a/src/3rdparty/webkit/WebCore/storage/Storage.cpp b/src/3rdparty/webkit/WebCore/storage/Storage.cpp index e22897125a..016609849b 100644 --- a/src/3rdparty/webkit/WebCore/storage/Storage.cpp +++ b/src/3rdparty/webkit/WebCore/storage/Storage.cpp @@ -47,6 +47,10 @@ Storage::Storage(Frame* frame, PassRefPtr<StorageArea> storageArea) ASSERT(m_storageArea); } +Storage::~Storage() +{ +} + unsigned Storage::length() const { if (!m_frame) diff --git a/src/3rdparty/webkit/WebCore/storage/Storage.h b/src/3rdparty/webkit/WebCore/storage/Storage.h index ca7a32eb53..77c572003d 100644 --- a/src/3rdparty/webkit/WebCore/storage/Storage.h +++ b/src/3rdparty/webkit/WebCore/storage/Storage.h @@ -28,8 +28,6 @@ #if ENABLE(DOM_STORAGE) -#include "StorageArea.h" - #include <wtf/Forward.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> @@ -37,13 +35,15 @@ namespace WebCore { class Frame; + class StorageArea; class String; typedef int ExceptionCode; class Storage : public RefCounted<Storage> { public: static PassRefPtr<Storage> create(Frame*, PassRefPtr<StorageArea>); - + ~Storage(); + unsigned length() const; String key(unsigned index, ExceptionCode&) const; String getItem(const String&) const; diff --git a/src/3rdparty/webkit/WebCore/storage/StorageArea.cpp b/src/3rdparty/webkit/WebCore/storage/StorageArea.cpp index 11b3517f65..e69de29bb2 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageArea.cpp +++ b/src/3rdparty/webkit/WebCore/storage/StorageArea.cpp @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "StorageArea.h" - -#if PLATFORM(CHROMIUM) -#error "Chromium should not compile this file and instead define its own version of these factories that navigate the multi-process boundry." -#endif - -#if ENABLE(DOM_STORAGE) - -#include "StorageAreaImpl.h" - -namespace WebCore { - -PassRefPtr<StorageArea> StorageArea::create(StorageType storageType, SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager) -{ - return StorageAreaImpl::create(storageType, origin, syncManager); -} - -} - -#endif // ENABLE(DOM_STORAGE) - diff --git a/src/3rdparty/webkit/WebCore/storage/StorageArea.h b/src/3rdparty/webkit/WebCore/storage/StorageArea.h index 31f716a0a7..6ae10c198a 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageArea.h +++ b/src/3rdparty/webkit/WebCore/storage/StorageArea.h @@ -29,23 +29,14 @@ #if ENABLE(DOM_STORAGE) #include "PlatformString.h" -#include "SecurityOrigin.h" -#include "StorageAreaSync.h" -#include "StorageMap.h" -#include "StorageSyncManager.h" -#include <wtf/Forward.h> #include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> -#include <wtf/RefPtr.h> +#include <wtf/Threading.h> namespace WebCore { class Frame; - class Page; class SecurityOrigin; - class StorageAreaSync; - class StorageMap; class StorageSyncManager; typedef int ExceptionCode; enum StorageType { LocalStorage, SessionStorage }; @@ -53,9 +44,7 @@ namespace WebCore { // This interface is required for Chromium since these actions need to be proxied between processes. class StorageArea : public ThreadSafeShared<StorageArea> { public: - static PassRefPtr<StorageArea> create(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>); virtual ~StorageArea() { } - virtual PassRefPtr<StorageArea> copy(SecurityOrigin*) = 0; // The HTML5 DOM Storage API virtual unsigned length() const = 0; @@ -64,13 +53,7 @@ namespace WebCore { virtual void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame) = 0; virtual void removeItem(const String& key, Frame* sourceFrame) = 0; virtual void clear(Frame* sourceFrame) = 0; - virtual bool contains(const String& key) const = 0; - virtual void close() = 0; - - // Could be called from a background thread. - virtual void importItem(const String& key, const String& value) = 0; - virtual SecurityOrigin* securityOrigin() = 0; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp index ba316583a1..9eb59e33c7 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp +++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp @@ -43,11 +43,6 @@ namespace WebCore { -PassRefPtr<StorageArea> StorageAreaImpl::create(StorageType storageType, SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager) -{ - return adoptRef(new StorageAreaImpl(storageType, origin, syncManager)); -} - StorageAreaImpl::~StorageAreaImpl() { } @@ -72,7 +67,7 @@ StorageAreaImpl::StorageAreaImpl(StorageType storageType, SecurityOrigin* origin } } -PassRefPtr<StorageArea> StorageAreaImpl::copy(SecurityOrigin* origin) +PassRefPtr<StorageAreaImpl> StorageAreaImpl::copy(SecurityOrigin* origin) { ASSERT(!m_isShutdown); return adoptRef(new StorageAreaImpl(origin, this)); diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h index e2d14f1697..d3f0785679 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h +++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h @@ -30,31 +30,36 @@ #include "StorageArea.h" +#include <wtf/RefPtr.h> + namespace WebCore { + class SecurityOrigin; + class StorageMap; + class StorageAreaSync; + class StorageAreaImpl : public StorageArea { public: - static PassRefPtr<StorageArea> create(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>); + StorageAreaImpl(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>); virtual ~StorageAreaImpl(); - virtual PassRefPtr<StorageArea> copy(SecurityOrigin*); - // The HTML5 DOM Storage API + // The HTML5 DOM Storage API (and contains) virtual unsigned length() const; virtual String key(unsigned index, ExceptionCode& ec) const; virtual String getItem(const String& key) const; virtual void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame); virtual void removeItem(const String& key, Frame* sourceFrame); virtual void clear(Frame* sourceFrame); - virtual bool contains(const String& key) const; - virtual void close(); + + PassRefPtr<StorageAreaImpl> copy(SecurityOrigin*); + void close(); // Could be called from a background thread. void importItem(const String& key, const String& value); SecurityOrigin* securityOrigin(); private: - StorageAreaImpl(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>); StorageAreaImpl(SecurityOrigin*, StorageAreaImpl*); void blockUntilImportComplete() const; diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.cpp b/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.cpp index 2cef56d8db..01d2a65e71 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.cpp +++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.cpp @@ -32,7 +32,8 @@ #include "EventNames.h" #include "HTMLElement.h" #include "SQLiteStatement.h" -#include "StorageArea.h" +#include "StorageAreaImpl.h" +#include "StorageSyncManager.h" #include "SuddenTermination.h" namespace WebCore { @@ -41,12 +42,12 @@ namespace WebCore { // Instead, queue up a batch of items to sync and actually do the sync at the following interval. static const double StorageSyncInterval = 1.0; -PassRefPtr<StorageAreaSync> StorageAreaSync::create(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageArea> storageArea) +PassRefPtr<StorageAreaSync> StorageAreaSync::create(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageAreaImpl> storageArea) { return adoptRef(new StorageAreaSync(storageSyncManager, storageArea)); } -StorageAreaSync::StorageAreaSync(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageArea> storageArea) +StorageAreaSync::StorageAreaSync(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageAreaImpl> storageArea) : m_syncTimer(this, &StorageAreaSync::syncTimerFired) , m_itemsCleared(false) , m_finalSyncScheduled(false) @@ -65,12 +66,10 @@ StorageAreaSync::StorageAreaSync(PassRefPtr<StorageSyncManager> storageSyncManag m_importComplete = true; } -#ifndef NDEBUG StorageAreaSync::~StorageAreaSync() { ASSERT(!m_syncTimer.isActive()); } -#endif void StorageAreaSync::scheduleFinalSync() { diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h b/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h index a7f1082c42..e436befa7a 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h +++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaSync.h @@ -28,26 +28,23 @@ #if ENABLE(DOM_STORAGE) +#include "PlatformString.h" #include "SQLiteDatabase.h" #include "StringHash.h" -#include "StorageSyncManager.h" #include "Timer.h" #include <wtf/HashMap.h> namespace WebCore { class Frame; - class StorageArea; + class StorageAreaImpl; class StorageSyncManager; class StorageAreaSync : public RefCounted<StorageAreaSync> { public: -#ifndef NDEBUG + static PassRefPtr<StorageAreaSync> create(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageAreaImpl> storageArea); ~StorageAreaSync(); -#endif - static PassRefPtr<StorageAreaSync> create(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageArea> storageArea); - void scheduleFinalSync(); void blockUntilImportComplete() const; @@ -55,7 +52,7 @@ namespace WebCore { void scheduleClear(); private: - StorageAreaSync(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageArea> storageArea); + StorageAreaSync(PassRefPtr<StorageSyncManager> storageSyncManager, PassRefPtr<StorageAreaImpl> storageArea); void dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame); @@ -65,7 +62,7 @@ namespace WebCore { bool m_finalSyncScheduled; - RefPtr<StorageArea> m_storageArea; + RefPtr<StorageAreaImpl> m_storageArea; RefPtr<StorageSyncManager> m_syncManager; // The database handle will only ever be opened and used on the background thread. diff --git a/src/3rdparty/webkit/WebCore/storage/StorageEvent.cpp b/src/3rdparty/webkit/WebCore/storage/StorageEvent.cpp index f2945a9dd9..2e620d510e 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageEvent.cpp +++ b/src/3rdparty/webkit/WebCore/storage/StorageEvent.cpp @@ -33,6 +33,20 @@ namespace WebCore { +PassRefPtr<StorageEvent> StorageEvent::create() +{ + return adoptRef(new StorageEvent); +} + +StorageEvent::StorageEvent() +{ +} + +PassRefPtr<StorageEvent> StorageEvent::create(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& uri, PassRefPtr<DOMWindow> source, Storage* storageArea) +{ + return adoptRef(new StorageEvent(type, key, oldValue, newValue, uri, source, storageArea)); +} + StorageEvent::StorageEvent(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& uri, PassRefPtr<DOMWindow> source, Storage* storageArea) : Event(type, false, true) , m_key(key) diff --git a/src/3rdparty/webkit/WebCore/storage/StorageEvent.h b/src/3rdparty/webkit/WebCore/storage/StorageEvent.h index ee3d5ad216..703fb5affe 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageEvent.h +++ b/src/3rdparty/webkit/WebCore/storage/StorageEvent.h @@ -29,22 +29,17 @@ #if ENABLE(DOM_STORAGE) #include "Event.h" -#include "Storage.h" +#include "PlatformString.h" namespace WebCore { class DOMWindow; + class Storage; class StorageEvent : public Event { public: - static PassRefPtr<StorageEvent> create() - { - return adoptRef(new StorageEvent); - } - static PassRefPtr<StorageEvent> create(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& uri, PassRefPtr<DOMWindow> source, Storage* storageArea) - { - return adoptRef(new StorageEvent(type, key, oldValue, newValue, uri, source, storageArea)); - } + static PassRefPtr<StorageEvent> create(); + static PassRefPtr<StorageEvent> create(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& uri, PassRefPtr<DOMWindow> source, Storage* storageArea); const String& key() const { return m_key; } const String& oldValue() const { return m_oldValue; } @@ -61,7 +56,7 @@ namespace WebCore { virtual bool isStorageEvent() const { return true; } private: - StorageEvent() { } + StorageEvent(); StorageEvent(const AtomicString& type, const String& key, const String& oldValue, const String& newValue, const String& uri, PassRefPtr<DOMWindow> source, Storage* storageArea); String m_key; diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h b/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h index 687cea2bb9..edbe339862 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h +++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h @@ -28,16 +28,15 @@ #if ENABLE(DOM_STORAGE) -#include "SecurityOriginHash.h" -#include "StorageArea.h" +#include "PlatformString.h" -#include <wtf/HashMap.h> +#include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> namespace WebCore { + class SecurityOrigin; class StorageArea; - class StorageSyncManager; // This interface is required for Chromium since these actions need to be proxied between processes. class StorageNamespace : public RefCounted<StorageNamespace> { diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp index 39ec27bd34..8b08a27ec3 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp +++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp @@ -28,6 +28,10 @@ #if ENABLE(DOM_STORAGE) +#include "SecurityOriginHash.h" +#include "StringHash.h" +#include "StorageAreaImpl.h" +#include "StorageSyncManager.h" #include <wtf/StdLibExtras.h> namespace WebCore { @@ -89,7 +93,7 @@ PassRefPtr<StorageNamespace> StorageNamespaceImpl::copy() StorageAreaMap::iterator end = m_storageAreaMap.end(); for (StorageAreaMap::iterator i = m_storageAreaMap.begin(); i != end; ++i) { - RefPtr<StorageArea> areaCopy = i->second->copy(i->first.get()); + RefPtr<StorageAreaImpl> areaCopy = i->second->copy(i->first.get()); newNamespace->m_storageAreaMap.set(i->first, areaCopy.release()); } @@ -101,11 +105,11 @@ PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(SecurityOrigin* origin ASSERT(isMainThread()); ASSERT(!m_isShutdown); - RefPtr<StorageArea> storageArea; + RefPtr<StorageAreaImpl> storageArea; if (storageArea = m_storageAreaMap.get(origin)) return storageArea.release(); - storageArea = StorageArea::create(m_storageType, origin, m_syncManager); + storageArea = new StorageAreaImpl(m_storageType, origin, m_syncManager); m_storageAreaMap.set(origin, storageArea); return storageArea.release(); } diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h index 6c5a9dcf77..4ec2f72a17 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h +++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h @@ -28,10 +28,18 @@ #if ENABLE(DOM_STORAGE) +#include "PlatformString.h" +#include "SecurityOriginHash.h" +#include "StorageArea.h" #include "StorageNamespace.h" +#include <wtf/HashMap.h> +#include <wtf/RefPtr.h> + namespace WebCore { + class StorageAreaImpl; + class StorageNamespaceImpl : public StorageNamespace { public: static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path); @@ -45,7 +53,7 @@ namespace WebCore { private: StorageNamespaceImpl(StorageType, const String& path); - typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageArea>, SecurityOriginHash> StorageAreaMap; + typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageAreaImpl>, SecurityOriginHash> StorageAreaMap; StorageAreaMap m_storageAreaMap; StorageType m_storageType; diff --git a/src/3rdparty/webkit/WebCore/storage/StorageSyncManager.cpp b/src/3rdparty/webkit/WebCore/storage/StorageSyncManager.cpp index 5dab7a6038..a935242828 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageSyncManager.cpp +++ b/src/3rdparty/webkit/WebCore/storage/StorageSyncManager.cpp @@ -33,6 +33,8 @@ #include "FileSystem.h" #include "Frame.h" #include "FrameTree.h" +#include "LocalStorageTask.h" +#include "LocalStorageThread.h" #include "Page.h" #include "PageGroup.h" #include "StorageAreaSync.h" @@ -53,6 +55,10 @@ StorageSyncManager::StorageSyncManager(const String& path) m_thread->start(); } +StorageSyncManager::~StorageSyncManager() +{ +} + String StorageSyncManager::fullDatabaseFilename(SecurityOrigin* origin) { ASSERT(origin); diff --git a/src/3rdparty/webkit/WebCore/storage/StorageSyncManager.h b/src/3rdparty/webkit/WebCore/storage/StorageSyncManager.h index 83353ed8a6..4c5e82101a 100644 --- a/src/3rdparty/webkit/WebCore/storage/StorageSyncManager.h +++ b/src/3rdparty/webkit/WebCore/storage/StorageSyncManager.h @@ -28,18 +28,22 @@ #if ENABLE(DOM_STORAGE) -#include "LocalStorageTask.h" -#include "LocalStorageThread.h" -#include "StorageArea.h" -#include "StorageAreaSync.h" +#include "PlatformString.h" +#include <wtf/PassRefPtr.h> +#include <wtf/RefPtr.h> #include <wtf/Threading.h> namespace WebCore { + class LocalStorageThread; + class SecurityOrigin; + class StorageAreaSync; + class StorageSyncManager : public ThreadSafeShared<StorageSyncManager> { public: static PassRefPtr<StorageSyncManager> create(const String& path); + ~StorageSyncManager(); bool scheduleImport(PassRefPtr<StorageAreaSync>); void scheduleSync(PassRefPtr<StorageAreaSync>); diff --git a/src/3rdparty/webkit/WebCore/svg/SVGAElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGAElement.cpp index 6fd0274a00..991970261e 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGAElement.cpp +++ b/src/3rdparty/webkit/WebCore/svg/SVGAElement.cpp @@ -138,7 +138,7 @@ void SVGAElement::defaultEventHandler(Event* evt) target = (getAttribute(XLinkNames::showAttr) == "new") ? "_blank" : "_self"; if (!evt->defaultPrevented()) { - String url = parseURL(href()); + String url = deprecatedParseURL(href()); #if ENABLE(SVG_ANIMATION) if (url.startsWith("#")) { Element* targetElement = document()->getElementById(url.substring(1)); diff --git a/src/3rdparty/webkit/WebCore/svg/SVGAnimatedProperty.h b/src/3rdparty/webkit/WebCore/svg/SVGAnimatedProperty.h index 334a6ebd1a..6803055580 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGAnimatedProperty.h +++ b/src/3rdparty/webkit/WebCore/svg/SVGAnimatedProperty.h @@ -66,7 +66,7 @@ namespace WebCore { void synchronizeProperty(const OwnerElement* ownerElement, const QualifiedName& attributeName, DecoratedType baseValue); // Abstract base class - class SVGAnimatedPropertyBase : Noncopyable { + class SVGAnimatedPropertyBase : public Noncopyable { public: virtual ~SVGAnimatedPropertyBase() { } virtual void synchronize() const = 0; diff --git a/src/3rdparty/webkit/WebCore/svg/SVGColor.cpp b/src/3rdparty/webkit/WebCore/svg/SVGColor.cpp index 5939b48e5e..f939ef096c 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGColor.cpp +++ b/src/3rdparty/webkit/WebCore/svg/SVGColor.cpp @@ -25,6 +25,7 @@ #include "SVGColor.h" #include "CSSParser.h" +#include "RGBColor.h" #include "SVGException.h" namespace WebCore { @@ -61,9 +62,9 @@ unsigned short SVGColor::colorType() const return m_colorType; } -unsigned SVGColor::rgbColor() const +RGBColor* SVGColor::rgbColor() const { - return m_color.rgb(); + return RGBColor::create(m_color.rgb()).releaseRef(); } void SVGColor::setRGBColor(const String& rgbColor, ExceptionCode& ec) diff --git a/src/3rdparty/webkit/WebCore/svg/SVGColor.h b/src/3rdparty/webkit/WebCore/svg/SVGColor.h index e3a4b1936f..5dfb694e17 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGColor.h +++ b/src/3rdparty/webkit/WebCore/svg/SVGColor.h @@ -28,6 +28,8 @@ namespace WebCore { + class RGBColor; + class SVGColor : public CSSValue { public: static PassRefPtr<SVGColor> create(const String& color) @@ -55,7 +57,7 @@ namespace WebCore { // 'SVGColor' functions unsigned short colorType() const; - unsigned rgbColor() const; + RGBColor* rgbColor() const; static Color colorFromRGBColorString(const String&); diff --git a/src/3rdparty/webkit/WebCore/svg/SVGImageLoader.cpp b/src/3rdparty/webkit/WebCore/svg/SVGImageLoader.cpp index 9333f7536a..f8380f58c3 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGImageLoader.cpp +++ b/src/3rdparty/webkit/WebCore/svg/SVGImageLoader.cpp @@ -53,7 +53,7 @@ void SVGImageLoader::dispatchLoadEvent() String SVGImageLoader::sourceURI(const AtomicString& attr) const { - return parseURL(KURL(element()->baseURI(), attr).string()); + return deprecatedParseURL(KURL(element()->baseURI(), attr).string()); } } diff --git a/src/3rdparty/webkit/WebCore/svg/SVGPolyElement.h b/src/3rdparty/webkit/WebCore/svg/SVGPolyElement.h index 0de9f1b019..8dd16cd1bc 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGPolyElement.h +++ b/src/3rdparty/webkit/WebCore/svg/SVGPolyElement.h @@ -58,7 +58,6 @@ namespace WebCore { virtual const SVGElement* contextElement() const { return this; } private: - bool m_ignoreAttributeChanges : 1; mutable RefPtr<SVGPointList> m_points; }; diff --git a/src/3rdparty/webkit/WebCore/svg/SynchronizableTypeWrapper.h b/src/3rdparty/webkit/WebCore/svg/SynchronizableTypeWrapper.h index 418c76d89e..12f84263d9 100644 --- a/src/3rdparty/webkit/WebCore/svg/SynchronizableTypeWrapper.h +++ b/src/3rdparty/webkit/WebCore/svg/SynchronizableTypeWrapper.h @@ -26,7 +26,7 @@ namespace WebCore { template<typename StoredType> - class SynchronizableTypeWrapperBase : Noncopyable { + class SynchronizableTypeWrapperBase : public Noncopyable { protected: SynchronizableTypeWrapperBase(); diff --git a/src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.cpp b/src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.cpp index 0fcd7224f3..728ff1b86b 100644 --- a/src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.cpp +++ b/src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.cpp @@ -31,6 +31,7 @@ #include "SVGPaintServer.h" #include "GraphicsContext.h" +#include "NodeRenderStyle.h" #include "RenderObject.h" #include "RenderStyle.h" #include "SVGPaintServerSolid.h" @@ -158,7 +159,7 @@ void applyStrokeStyleToContext(GraphicsContext* context, RenderStyle* style, con if (style->svgStyle()->joinStyle() == MiterJoin) context->setMiterLimit(style->svgStyle()->strokeMiterLimit()); - const DashArray& dashes = dashArrayFromRenderingStyle(object->style()); + const DashArray& dashes = dashArrayFromRenderingStyle(object->style(), object->document()->documentElement()->renderStyle()); float dashOffset = SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeDashOffset(), 0.0f); context->setLineDash(dashes, dashOffset); } @@ -192,8 +193,8 @@ void SVGPaintServer::teardown(GraphicsContext*& context, const RenderObject*, SV // added back to the context after filling. This is because internally it // calls CGContextFillPath() which closes the path. context->beginPath(); - context->platformContext()->setGradient(0); - context->platformContext()->setPattern(0); + context->platformContext()->setFillShader(0); + context->platformContext()->setStrokeShader(0); } #else void SVGPaintServer::teardown(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool) const @@ -201,7 +202,7 @@ void SVGPaintServer::teardown(GraphicsContext*&, const RenderObject*, SVGPaintTa } #endif -DashArray dashArrayFromRenderingStyle(const RenderStyle* style) +DashArray dashArrayFromRenderingStyle(const RenderStyle* style, RenderStyle* rootStyle) { DashArray array; @@ -214,7 +215,7 @@ DashArray dashArrayFromRenderingStyle(const RenderStyle* style) if (!dash) continue; - array.append((float) dash->computeLengthFloat(const_cast<RenderStyle*>(style))); + array.append((float) dash->computeLengthFloat(const_cast<RenderStyle*>(style), rootStyle)); } } diff --git a/src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.h b/src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.h index 9174f66f7c..244243ccbb 100644 --- a/src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.h +++ b/src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.h @@ -85,7 +85,7 @@ namespace WebCore { SVGPaintServer* getPaintServerById(Document*, const AtomicString&); void applyStrokeStyleToContext(GraphicsContext*, RenderStyle*, const RenderObject*); - DashArray dashArrayFromRenderingStyle(const RenderStyle* style); + DashArray dashArrayFromRenderingStyle(const RenderStyle* style, RenderStyle* rootStyle); } // namespace WebCore #endif diff --git a/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp index 5fbeac63d9..9c84193cf6 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp @@ -150,7 +150,7 @@ void WMLAElement::defaultEventHandler(Event* event) } if (!event->defaultPrevented() && document()->frame()) { - KURL url = document()->completeURL(parseURL(getAttribute(HTMLNames::hrefAttr))); + KURL url = document()->completeURL(deprecatedParseURL(getAttribute(HTMLNames::hrefAttr))); document()->frame()->loader()->urlSelected(url, target(), event, false, false, true); } diff --git a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp index 0f49bd7326..0b73f52510 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp @@ -28,6 +28,7 @@ #include "HTMLNames.h" #include "MappedAttribute.h" #include "NodeList.h" +#include "Page.h" #include "RenderStyle.h" #include "WMLDocument.h" #include "WMLDoElement.h" @@ -131,20 +132,21 @@ void WMLCardElement::handleIntrinsicEventIfNeeded() FrameLoader* loader = frame->loader(); if (!loader) return; - - int currentHistoryLength = loader->getHistoryLength(); - int lastHistoryLength = pageState->historyLength(); // Calculate the entry method of current card WMLIntrinsicEventType eventType = WMLIntrinsicEventUnknown; - if (lastHistoryLength > currentHistoryLength) + + switch (loader->loadType()) { + case FrameLoadTypeReload: + break; + case FrameLoadTypeBack: eventType = WMLIntrinsicEventOnEnterBackward; - else if (lastHistoryLength < currentHistoryLength) + break; + default: eventType = WMLIntrinsicEventOnEnterForward; + break; + } - // Synchronize history length with WMLPageState - pageState->setHistoryLength(currentHistoryLength); - // Figure out target event handler WMLIntrinsicEventHandler* eventHandler = this->eventHandler(); bool hasIntrinsicEvent = false; @@ -204,11 +206,6 @@ void WMLCardElement::handleDeckLevelTaskOverridesIfNeeded() (*it)->setActive(!cardDoElementNames.contains((*it)->name())); } -String WMLCardElement::title() const -{ - return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::titleAttr)); -} - void WMLCardElement::parseMappedAttribute(MappedAttribute* attr) { WMLIntrinsicEventType eventType = WMLIntrinsicEventUnknown; @@ -241,13 +238,25 @@ void WMLCardElement::parseMappedAttribute(MappedAttribute* attr) void WMLCardElement::insertedIntoDocument() { WMLElement::insertedIntoDocument(); + Document* document = this->document(); // The first card inserted into a document, is visible by default. if (!m_isVisible) { - RefPtr<NodeList> nodeList = document()->getElementsByTagName("card"); + RefPtr<NodeList> nodeList = document->getElementsByTagName("card"); if (nodeList && nodeList->length() == 1 && nodeList->item(0) == this) m_isVisible = true; } + + // For the WML layout tests we embed WML content in a XHTML document. Navigating to different cards + // within the same deck has a different behaviour in HTML than in WML. HTML wants to "scroll to anchor" + // (see FrameLoader) but WML wants a reload. Notify the root document of the layout test that we want + // to mimic WML behaviour. This is rather tricky, but has been tested extensively. Usually it's not possible + // at all to embed WML in HTML, it's not designed that way, we're just "abusing" it for dynamically created layout tests. + if (document->page() && document->page()->mainFrame()) { + Document* rootDocument = document->page()->mainFrame()->document(); + if (rootDocument && rootDocument != document) + rootDocument->setContainsWMLContent(true); + } } RenderObject* WMLCardElement::createRenderer(RenderArena* arena, RenderStyle* style) diff --git a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.h b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.h index e033e3da78..972961e59e 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.h +++ b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.h @@ -47,7 +47,6 @@ public: void handleIntrinsicEventIfNeeded(); void handleDeckLevelTaskOverridesIfNeeded(); - virtual String title() const; virtual void parseMappedAttribute(MappedAttribute*); virtual void insertedIntoDocument(); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); diff --git a/src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp index f553fff3da..830009eefe 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp @@ -122,6 +122,17 @@ void WMLDoElement::insertedIntoDocument() eventHandlingElement->registerDoElement(this, document()); } +void WMLDoElement::attach() +{ + WMLElement::attach(); + + // The call to updateFromElement() needs to go after the call through + // to the base class's attach() because that can sometimes do a close + // on the renderer. + if (renderer()) + renderer()->updateFromElement(); +} + RenderObject* WMLDoElement::createRenderer(RenderArena* arena, RenderStyle* style) { if (!m_isActive || m_isOptional || m_isNoop) diff --git a/src/3rdparty/webkit/WebCore/wml/WMLDoElement.h b/src/3rdparty/webkit/WebCore/wml/WMLDoElement.h index 51e37c4341..eff2589193 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLDoElement.h +++ b/src/3rdparty/webkit/WebCore/wml/WMLDoElement.h @@ -36,6 +36,7 @@ public: virtual void parseMappedAttribute(MappedAttribute*); virtual void insertedIntoDocument(); + virtual void attach(); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); virtual void recalcStyle(StyleChange); diff --git a/src/3rdparty/webkit/WebCore/wml/WMLElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLElement.cpp index f59a3a1958..a9e4b5d959 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLElement.cpp @@ -77,6 +77,11 @@ void WMLElement::parseMappedAttribute(MappedAttribute* attr) } } +String WMLElement::title() const +{ + return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::titleAttr)); +} + bool WMLElement::rendererIsNeeded(RenderStyle* style) { return document()->documentElement() == this || style->display() != NONE; diff --git a/src/3rdparty/webkit/WebCore/wml/WMLElement.h b/src/3rdparty/webkit/WebCore/wml/WMLElement.h index 04e28d045c..46b0ff41dc 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLElement.h +++ b/src/3rdparty/webkit/WebCore/wml/WMLElement.h @@ -37,6 +37,8 @@ public: virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const; virtual void parseMappedAttribute(MappedAttribute*); + virtual String title() const; + virtual bool rendererIsNeeded(RenderStyle*); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); diff --git a/src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp index 7293e66844..c1bf283618 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) + * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -102,9 +102,6 @@ void WMLGoElement::executeTask(Event*) // FIXME: 'newcontext' handling not implemented for external cards bool inSameDeck = doc->url().path() == url.path(); if (inSameDeck && url.hasRef()) { - // Force frame loader to load the URL with fragment identifier - loader->setForceReloadWmlDeck(true); - if (WMLCardElement* card = WMLCardElement::findNamedCardInDocument(doc, url.ref())) { if (card->isNewContext()) pageState->reset(); diff --git a/src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp b/src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp index c77b5119a2..3c402155d1 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp @@ -49,7 +49,7 @@ void WMLImageLoader::dispatchLoadEvent() String WMLImageLoader::sourceURI(const AtomicString& attr) const { - return parseURL(KURL(element()->baseURI(), attr).string()); + return deprecatedParseURL(KURL(element()->baseURI(), attr).string()); } void WMLImageLoader::notifyFinished(CachedResource* image) diff --git a/src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp index 1ba1c18b35..7c69ddcac1 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp @@ -53,7 +53,12 @@ void WMLNoopElement::insertedIntoDocument() if (parent->hasTagName(doTag)) { WMLDoElement* doElement = static_cast<WMLDoElement*>(parent); doElement->setNoop(true); - doElement->setNeedsStyleRecalc(); + + if (doElement->attached()) + doElement->detach(); + + ASSERT(!doElement->attached()); + doElement->attach(); } else if (parent->hasTagName(anchorTag)) reportWMLError(document(), WMLErrorForbiddenTaskInAnchorElement); } diff --git a/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp index 3614c6c533..9a7ea88251 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp @@ -44,11 +44,6 @@ WMLOptGroupElement::~WMLOptGroupElement() { } -String WMLOptGroupElement::title() const -{ - return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::titleAttr)); -} - const AtomicString& WMLOptGroupElement::formControlType() const { DEFINE_STATIC_LOCAL(const AtomicString, optgroup, ("optgroup")); diff --git a/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h b/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h index 04600565c9..e1b921736d 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h +++ b/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h @@ -32,8 +32,6 @@ public: WMLOptGroupElement(const QualifiedName& tagName, Document*); virtual ~WMLOptGroupElement(); - String title() const; - virtual const AtomicString& formControlType() const; virtual bool rendererIsNeeded(RenderStyle*) { return false; } diff --git a/src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp index 1087134ff0..60d3de6e74 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp @@ -125,7 +125,15 @@ bool WMLOptionElement::selected() const void WMLOptionElement::setSelectedState(bool selected) { + if (this->selected() == selected) + return; + OptionElement::setSelectedState(m_data, this, selected); + + if (WMLSelectElement* select = ownerSelectElement(this)) { + if (select->multiple() || selected) + handleIntrinsicEventIfNeeded(); + } } String WMLOptionElement::value() const diff --git a/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp b/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp index 1afc0c91e0..6b6a763886 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp @@ -1,6 +1,5 @@ /* - * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) - * + * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * Copyright (C) 2004-2007 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or @@ -25,6 +24,7 @@ #if ENABLE(WML) #include "WMLPageState.h" +#include "CString.h" #include "HistoryItem.h" #include "KURL.h" #include "Page.h" @@ -33,7 +33,6 @@ namespace WebCore { WMLPageState::WMLPageState(Page* page) : m_page(page) - , m_historyLength(0) , m_activeCard(0) , m_hasDeckAccess(false) { @@ -44,17 +43,27 @@ WMLPageState::~WMLPageState() m_variables.clear(); } +#ifndef NDEBUG +// Debugging helper for use within gdb +void WMLPageState::dump() +{ + WMLVariableMap::iterator it = m_variables.begin(); + WMLVariableMap::iterator end = m_variables.end(); + + fprintf(stderr, "Dumping WMLPageState (this=%p) associated with Page (page=%p)...\n", this, m_page); + for (; it != end; ++it) + fprintf(stderr, "\t-> name: '%s'\tvalue: '%s'\n", (*it).first.latin1().data(), (*it).second.latin1().data()); +} +#endif + void WMLPageState::reset() { - // remove all the variables in the current browser context + // Remove all the variables m_variables.clear(); - // clear the navigation history state - if (m_page) - m_page->backForwardList()->clearWmlPageHistory(); - - // reset implementation-specfic state if UA has - m_historyLength = 0; + // Clear the navigation history state + if (BackForwardList* list = m_page ? m_page->backForwardList() : 0) + list->clearWMLPageHistory(); } bool WMLPageState::setNeedCheckDeckAccess(bool need) diff --git a/src/3rdparty/webkit/WebCore/wml/WMLPageState.h b/src/3rdparty/webkit/WebCore/wml/WMLPageState.h index 6a1d960d39..72bc72c2f7 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLPageState.h +++ b/src/3rdparty/webkit/WebCore/wml/WMLPageState.h @@ -39,6 +39,10 @@ public: WMLPageState(Page*); virtual ~WMLPageState(); +#ifndef NDEBUG + void dump(); +#endif + // reset the browser context when 'newcontext' attribute // of card element is performed as part of go task void reset(); diff --git a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp index 5e70098f28..2d03a3f02e 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp @@ -46,11 +46,6 @@ WMLSelectElement::~WMLSelectElement() { } -String WMLSelectElement::title() const -{ - return substituteVariableReferences(getAttribute(HTMLNames::titleAttr), document()); -} - const AtomicString& WMLSelectElement::formControlName() const { AtomicString name = this->name(); diff --git a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h index 6cd3bcbdd3..412a9509aa 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h +++ b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h @@ -32,8 +32,6 @@ public: WMLSelectElement(const QualifiedName&, Document*); virtual ~WMLSelectElement(); - virtual String title() const; - virtual const AtomicString& formControlName() const; virtual const AtomicString& formControlType() const; diff --git a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.cpp b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.cpp index 120f78a2fd..7cb2c11db4 100644 --- a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.cpp +++ b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.cpp @@ -30,10 +30,11 @@ #include "config.h" -#if ENABLE(SHARED_WORKERS) +#if ENABLE(WORKERS) #include "AbstractWorker.h" +#include "ErrorEvent.h" #include "Event.h" #include "EventException.h" #include "EventNames.h" @@ -114,12 +115,25 @@ void AbstractWorker::dispatchLoadErrorEvent() ASSERT(!ec); } -void AbstractWorker::dispatchScriptErrorEvent(const String&, const String&, int) +bool AbstractWorker::dispatchScriptErrorEvent(const String& message, const String& sourceURL, int lineNumber) { - //FIXME: Generate an ErrorEvent instead of a simple event - dispatchLoadErrorEvent(); + bool handled = false; + RefPtr<ErrorEvent> event = ErrorEvent::create(message, sourceURL, static_cast<unsigned>(lineNumber)); + if (m_onErrorListener) { + event->setTarget(this); + event->setCurrentTarget(this); + m_onErrorListener->handleEvent(event.get(), true); + if (event->defaultPrevented()) + handled = true; + } + + ExceptionCode ec = 0; + dispatchEvent(event.release(), ec); + ASSERT(!ec); + + return handled; } } // namespace WebCore -#endif // ENABLE(SHARED_WORKERS) +#endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.h b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.h index 89e425882f..28cc50d964 100644 --- a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.h +++ b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.h @@ -31,7 +31,7 @@ #ifndef AbstractWorker_h #define AbstractWorker_h -#if ENABLE(SHARED_WORKERS) +#if ENABLE(WORKERS) #include "ActiveDOMObject.h" #include "AtomicStringHash.h" @@ -56,7 +56,7 @@ namespace WebCore { // Utility routines to generate appropriate error events for loading and script exceptions. void dispatchLoadErrorEvent(); - void dispatchScriptErrorEvent(const String& errorMessage, const String& sourceURL, int); + bool dispatchScriptErrorEvent(const String& errorMessage, const String& sourceURL, int); void setOnerror(PassRefPtr<EventListener> eventListener) { m_onErrorListener = eventListener; } EventListener* onerror() const { return m_onErrorListener.get(); } @@ -81,6 +81,6 @@ namespace WebCore { } // namespace WebCore -#endif // ENABLE(SHARED_WORKERS) +#endif // ENABLE(WORKERS) #endif // AbstractWorker_h diff --git a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.idl b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.idl index 1234c0de10..ae7ebc6cf6 100644 --- a/src/3rdparty/webkit/WebCore/workers/AbstractWorker.idl +++ b/src/3rdparty/webkit/WebCore/workers/AbstractWorker.idl @@ -31,7 +31,7 @@ module threads { interface [ - Conditional=SHARED_WORKERS, + Conditional=WORKERS, CustomMarkFunction, CustomToJS, GenerateConstructor diff --git a/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.cpp b/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.cpp new file mode 100644 index 0000000000..97c15811b8 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.cpp @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if ENABLE(WORKERS) + +#include "DedicatedWorkerContext.h" + +#include "DOMWindow.h" +#include "MessageEvent.h" +#include "WorkerObjectProxy.h" +#include "WorkerThread.h" + +namespace WebCore { + +DedicatedWorkerContext::DedicatedWorkerContext(const KURL& url, const String& userAgent, WorkerThread* thread) + : WorkerContext(url, userAgent, thread) +{ +} + +DedicatedWorkerContext::~DedicatedWorkerContext() +{ + ASSERT(currentThread() == thread()->threadID()); + // Notify parent worker we are going away. This can free the WorkerThread object, so do not access it after this. + thread()->workerObjectProxy().workerContextDestroyed(); +} + +void DedicatedWorkerContext::reportException(const String& errorMessage, int lineNumber, const String& sourceURL) +{ + bool errorHandled = false; + if (onerror()) + errorHandled = onerror()->reportError(errorMessage, sourceURL, lineNumber); + + if (!errorHandled) + thread()->workerObjectProxy().postExceptionToWorkerObject(errorMessage, lineNumber, sourceURL); +} + +void DedicatedWorkerContext::postMessage(const String& message, ExceptionCode& ec) +{ + postMessage(message, 0, ec); +} + +void DedicatedWorkerContext::postMessage(const String& message, MessagePort* port, ExceptionCode& ec) +{ + if (isClosing()) + return; + // Disentangle the port in preparation for sending it to the remote context. + OwnPtr<MessagePortChannel> channel = port ? port->disentangle(ec) : 0; + if (ec) + return; + thread()->workerObjectProxy().postMessageToWorkerObject(message, channel.release()); +} + +void DedicatedWorkerContext::dispatchMessage(const String& message, PassRefPtr<MessagePort> port) +{ + // Since close() stops the thread event loop, this should not ever get called while closing. + ASSERT(!isClosing()); + RefPtr<Event> evt = MessageEvent::create(message, "", "", 0, port); + + if (m_onmessageListener.get()) { + evt->setTarget(this); + evt->setCurrentTarget(this); + m_onmessageListener->handleEvent(evt.get(), false); + } + + ExceptionCode ec = 0; + dispatchEvent(evt.release(), ec); + ASSERT(!ec); +} + +} // namespace WebCore + +#endif // ENABLE(WORKERS) diff --git a/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.h b/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.h new file mode 100644 index 0000000000..e37c13fe26 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DedicatedWorkerContext_h +#define DedicatedWorkerContext_h + +#include "WorkerContext.h" + +namespace WebCore { + + class DedicatedWorkerContext : public WorkerContext { + public: + static PassRefPtr<DedicatedWorkerContext> create(const KURL& url, const String& userAgent, WorkerThread* thread) + { + return adoptRef(new DedicatedWorkerContext(url, userAgent, thread)); + } + virtual ~DedicatedWorkerContext(); + + virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL); + + // EventTarget + virtual DedicatedWorkerContext* toDedicatedWorkerContext() { return this; } + void postMessage(const String&, ExceptionCode&); + void postMessage(const String&, MessagePort*, ExceptionCode&); + void setOnmessage(PassRefPtr<EventListener> eventListener) { m_onmessageListener = eventListener; } + EventListener* onmessage() const { return m_onmessageListener.get(); } + + void dispatchMessage(const String&, PassRefPtr<MessagePort>); + + private: + DedicatedWorkerContext(const KURL&, const String&, WorkerThread*); + RefPtr<EventListener> m_onmessageListener; + }; + +} // namespace WebCore + +#endif // DedicatedWorkerContext_h diff --git a/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.idl b/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.idl new file mode 100644 index 0000000000..ebbee338fd --- /dev/null +++ b/src/3rdparty/webkit/WebCore/workers/DedicatedWorkerContext.idl @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +module threads { + + interface [ + Conditional=WORKERS, + CustomMarkFunction, + ExtendsDOMGlobalObject, + IsWorkerContext, + GenerateNativeConverter, + NoStaticTables + ] DedicatedWorkerContext : WorkerContext { + + void postMessage(in DOMString message, in [Optional] MessagePort messagePort) + raises(DOMException); + attribute EventListener onmessage; + + }; + +} diff --git a/src/3rdparty/webkit/WebCore/workers/Worker.cpp b/src/3rdparty/webkit/WebCore/workers/Worker.cpp index 2e03e3d830..866687f928 100644 --- a/src/3rdparty/webkit/WebCore/workers/Worker.cpp +++ b/src/3rdparty/webkit/WebCore/workers/Worker.cpp @@ -50,23 +50,12 @@ namespace WebCore { -Worker::Worker(const String& url, ScriptExecutionContext* context, ExceptionCode& ec) - : ActiveDOMObject(context, this) +Worker::Worker(const String& url, ScriptExecutionContext* context) + : AbstractWorker(context) , m_contextProxy(WorkerContextProxy::create(this)) { - m_scriptURL = context->completeURL(url); - if (url.isEmpty() || !m_scriptURL.isValid()) { - ec = SYNTAX_ERR; - return; - } - - if (!context->securityOrigin()->canAccess(SecurityOrigin::create(m_scriptURL).get())) { - ec = SECURITY_ERR; - return; - } - m_scriptLoader = new WorkerScriptLoader(); - m_scriptLoader->loadAsynchronously(scriptExecutionContext(), m_scriptURL, DenyCrossOriginRedirect, this); + m_scriptLoader->loadAsynchronously(scriptExecutionContext(), url, CompleteURL, DenyCrossOriginLoad, this); setPendingActivity(this); // The worker context does not exist while loading, so we must ensure that the worker object is not collected, as well as its event listeners. } @@ -115,80 +104,15 @@ bool Worker::hasPendingActivity() const void Worker::notifyFinished() { if (m_scriptLoader->failed()) - dispatchErrorEvent(); + dispatchLoadErrorEvent(); else - m_contextProxy->startWorkerContext(m_scriptURL, scriptExecutionContext()->userAgent(m_scriptURL), m_scriptLoader->script()); + m_contextProxy->startWorkerContext(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script()); m_scriptLoader = 0; unsetPendingActivity(this); } -void Worker::dispatchErrorEvent() -{ - RefPtr<Event> evt = Event::create(eventNames().errorEvent, false, true); - if (m_onErrorListener) { - evt->setTarget(this); - evt->setCurrentTarget(this); - m_onErrorListener->handleEvent(evt.get(), true); - } - - ExceptionCode ec = 0; - dispatchEvent(evt.release(), ec); - ASSERT(!ec); -} - -void Worker::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> eventListener, bool) -{ - EventListenersMap::iterator iter = m_eventListeners.find(eventType); - if (iter == m_eventListeners.end()) { - ListenerVector listeners; - listeners.append(eventListener); - m_eventListeners.add(eventType, listeners); - } else { - ListenerVector& listeners = iter->second; - for (ListenerVector::iterator listenerIter = listeners.begin(); listenerIter != listeners.end(); ++listenerIter) { - if (*listenerIter == eventListener) - return; - } - - listeners.append(eventListener); - m_eventListeners.add(eventType, listeners); - } -} - -void Worker::removeEventListener(const AtomicString& eventType, EventListener* eventListener, bool) -{ - EventListenersMap::iterator iter = m_eventListeners.find(eventType); - if (iter == m_eventListeners.end()) - return; - - ListenerVector& listeners = iter->second; - for (ListenerVector::const_iterator listenerIter = listeners.begin(); listenerIter != listeners.end(); ++listenerIter) { - if (*listenerIter == eventListener) { - listeners.remove(listenerIter - listeners.begin()); - return; - } - } -} - -bool Worker::dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) -{ - if (!event || event->type().isEmpty()) { - ec = EventException::UNSPECIFIED_EVENT_TYPE_ERR; - return true; - } - - ListenerVector listenersCopy = m_eventListeners.get(event->type()); - for (ListenerVector::const_iterator listenerIter = listenersCopy.begin(); listenerIter != listenersCopy.end(); ++listenerIter) { - event->setTarget(this); - event->setCurrentTarget(this); - listenerIter->get()->handleEvent(event.get(), false); - } - - return !event->defaultPrevented(); -} - void Worker::dispatchMessage(const String& message, PassRefPtr<MessagePort> port) { RefPtr<Event> evt = MessageEvent::create(message, "", "", 0, port); diff --git a/src/3rdparty/webkit/WebCore/workers/Worker.h b/src/3rdparty/webkit/WebCore/workers/Worker.h index 1fcc8be7b4..6b8ee63a1c 100644 --- a/src/3rdparty/webkit/WebCore/workers/Worker.h +++ b/src/3rdparty/webkit/WebCore/workers/Worker.h @@ -29,11 +29,11 @@ #if ENABLE(WORKERS) -#include "AtomicStringHash.h" +#include "AbstractWorker.h" #include "ActiveDOMObject.h" +#include "AtomicStringHash.h" #include "EventListener.h" #include "EventTarget.h" -#include "KURL.h" #include "WorkerScriptLoaderClient.h" #include <wtf/OwnPtr.h> #include <wtf/PassRefPtr.h> @@ -49,13 +49,11 @@ namespace WebCore { typedef int ExceptionCode; - class Worker : public RefCounted<Worker>, public ActiveDOMObject, private WorkerScriptLoaderClient, public EventTarget { + class Worker : public AbstractWorker, private WorkerScriptLoaderClient { public: - static PassRefPtr<Worker> create(const String& url, ScriptExecutionContext* context, ExceptionCode& ec) { return adoptRef(new Worker(url, context, ec)); } + static PassRefPtr<Worker> create(const String& url, ScriptExecutionContext* context) { return adoptRef(new Worker(url, context)); } ~Worker(); - virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); } - virtual Worker* toWorker() { return this; } void postMessage(const String&, ExceptionCode&); @@ -70,39 +68,22 @@ namespace WebCore { virtual void stop(); virtual bool hasPendingActivity() const; - virtual void addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture); - virtual void removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture); - virtual bool dispatchEvent(PassRefPtr<Event>, ExceptionCode&); - - typedef Vector<RefPtr<EventListener> > ListenerVector; - typedef HashMap<AtomicString, ListenerVector> EventListenersMap; - EventListenersMap& eventListeners() { return m_eventListeners; } - - using RefCounted<Worker>::ref; - using RefCounted<Worker>::deref; - void setOnmessage(PassRefPtr<EventListener> eventListener) { m_onMessageListener = eventListener; } EventListener* onmessage() const { return m_onMessageListener.get(); } - void setOnerror(PassRefPtr<EventListener> eventListener) { m_onErrorListener = eventListener; } - EventListener* onerror() const { return m_onErrorListener.get(); } - private: - Worker(const String&, ScriptExecutionContext*, ExceptionCode&); + Worker(const String&, ScriptExecutionContext*); virtual void notifyFinished(); virtual void refEventTarget() { ref(); } virtual void derefEventTarget() { deref(); } - KURL m_scriptURL; OwnPtr<WorkerScriptLoader> m_scriptLoader; WorkerContextProxy* m_contextProxy; // The proxy outlives the worker to perform thread shutdown. RefPtr<EventListener> m_onMessageListener; - RefPtr<EventListener> m_onErrorListener; - EventListenersMap m_eventListeners; }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/workers/Worker.idl b/src/3rdparty/webkit/WebCore/workers/Worker.idl index e078e7cd9a..e701523d35 100644 --- a/src/3rdparty/webkit/WebCore/workers/Worker.idl +++ b/src/3rdparty/webkit/WebCore/workers/Worker.idl @@ -26,24 +26,18 @@ module threads { - interface [CustomMarkFunction, Conditional=WORKERS] Worker { + interface [ + Conditional=WORKERS, + CustomMarkFunction, + GenerateNativeConverter, + GenerateToJS + ] Worker : AbstractWorker { - attribute EventListener onerror; attribute EventListener onmessage; void postMessage(in DOMString message, in [Optional] MessagePort messagePort) raises(DOMException); void terminate(); - - // EventTarget interface - [Custom] void addEventListener(in DOMString type, - in EventListener listener, - in boolean useCapture); - [Custom] void removeEventListener(in DOMString type, - in EventListener listener, - in boolean useCapture); - boolean dispatchEvent(in Event evt) - raises(EventException); }; } diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp index 8e9fb9783d..9d88b75bc2 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp +++ b/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp @@ -36,7 +36,7 @@ #include "DOMWindow.h" #include "Event.h" #include "EventException.h" -#include "MessageEvent.h" +#include "MessagePort.h" #include "NotImplemented.h" #include "ScriptSourceCode.h" #include "ScriptValue.h" @@ -64,9 +64,6 @@ WorkerContext::WorkerContext(const KURL& url, const String& userAgent, WorkerThr WorkerContext::~WorkerContext() { - ASSERT(currentThread() == m_thread->threadID()); - - m_thread->workerObjectProxy().workerContextDestroyed(); } ScriptExecutionContext* WorkerContext::scriptExecutionContext() const @@ -141,11 +138,6 @@ bool WorkerContext::hasPendingActivity() const return false; } -void WorkerContext::reportException(const String& errorMessage, int lineNumber, const String& sourceURL) -{ - m_thread->workerObjectProxy().postExceptionToWorkerObject(errorMessage, lineNumber, sourceURL); -} - void WorkerContext::addMessage(MessageDestination destination, MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL) { m_thread->workerObjectProxy().postConsoleMessageToWorkerObject(destination, source, type, level, message, lineNumber, sourceURL); @@ -163,22 +155,6 @@ void WorkerContext::scriptImported(unsigned long, const String&) notImplemented(); } -void WorkerContext::postMessage(const String& message, ExceptionCode& ec) -{ - postMessage(message, 0, ec); -} - -void WorkerContext::postMessage(const String& message, MessagePort* port, ExceptionCode& ec) -{ - if (m_closing) - return; - // Disentangle the port in preparation for sending it to the remote context. - OwnPtr<MessagePortChannel> channel = port ? port->disentangle(ec) : 0; - if (ec) - return; - m_thread->workerObjectProxy().postMessageToWorkerObject(message, channel.release()); -} - void WorkerContext::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> eventListener, bool) { EventListenersMap::iterator iter = m_eventListeners.find(eventType); @@ -255,23 +231,6 @@ void WorkerContext::clearInterval(int timeoutId) DOMTimer::removeById(scriptExecutionContext(), timeoutId); } -void WorkerContext::dispatchMessage(const String& message, PassRefPtr<MessagePort> port) -{ - // Since close() stops the thread event loop, this should not ever get called while closing. - ASSERT(!m_closing); - RefPtr<Event> evt = MessageEvent::create(message, "", "", 0, port); - - if (m_onmessageListener.get()) { - evt->setTarget(this); - evt->setCurrentTarget(this); - m_onmessageListener->handleEvent(evt.get(), false); - } - - ExceptionCode ec = 0; - dispatchEvent(evt.release(), ec); - ASSERT(!ec); -} - void WorkerContext::importScripts(const Vector<String>& urls, const String& callerURL, int callerLine, ExceptionCode& ec) { ec = 0; @@ -290,7 +249,7 @@ void WorkerContext::importScripts(const Vector<String>& urls, const String& call for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++it) { WorkerScriptLoader scriptLoader; - scriptLoader.loadSynchronously(scriptExecutionContext(), *it, AllowCrossOriginRedirect); + scriptLoader.loadSynchronously(scriptExecutionContext(), *it, DoNotCompleteURL, AllowCrossOriginLoad); // If the fetching attempt failed, throw a NETWORK_ERR exception and abort all these steps. if (scriptLoader.failed()) { diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerContext.h b/src/3rdparty/webkit/WebCore/workers/WorkerContext.h index 16f43fd555..266553a9e5 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerContext.h +++ b/src/3rdparty/webkit/WebCore/workers/WorkerContext.h @@ -48,17 +48,11 @@ namespace WebCore { class WorkerContext : public RefCounted<WorkerContext>, public ScriptExecutionContext, public EventTarget { public: - static PassRefPtr<WorkerContext> create(const KURL& url, const String& userAgent, WorkerThread* thread) - { - return adoptRef(new WorkerContext(url, userAgent, thread)); - } virtual ~WorkerContext(); virtual bool isWorkerContext() const { return true; } - virtual WorkerContext* toWorkerContext() { return this; } - virtual ScriptExecutionContext* scriptExecutionContext() const; const KURL& url() const { return m_url; } @@ -73,7 +67,7 @@ namespace WebCore { bool hasPendingActivity() const; - virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL); + virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL) = 0; virtual void addMessage(MessageDestination, MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL); virtual void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString); virtual void scriptImported(unsigned long identifier, const String& sourceString); @@ -84,17 +78,13 @@ namespace WebCore { WorkerContext* self() { return this; } WorkerLocation* location() const; void close(); + void setOnerror(PassRefPtr<EventListener> eventListener) { m_onerrorListener = eventListener; } + EventListener* onerror() const { return m_onerrorListener.get(); } // WorkerUtils void importScripts(const Vector<String>& urls, const String& callerURL, int callerLine, ExceptionCode&); WorkerNavigator* navigator() const; - // DedicatedWorkerGlobalScope - void postMessage(const String&, ExceptionCode&); - void postMessage(const String&, MessagePort*, ExceptionCode&); - void setOnmessage(PassRefPtr<EventListener> eventListener) { m_onmessageListener = eventListener; } - EventListener* onmessage() const { return m_onmessageListener.get(); } - // Timers int setTimeout(ScheduledAction*, int timeout); void clearTimeout(int timeoutId); @@ -110,7 +100,6 @@ namespace WebCore { typedef HashMap<AtomicString, ListenerVector> EventListenersMap; EventListenersMap& eventListeners() { return m_eventListeners; } - void dispatchMessage(const String&, PassRefPtr<MessagePort>); // These methods are used for GC marking. See JSWorkerContext::mark() in // JSWorkerContextCustom.cpp. @@ -120,9 +109,11 @@ namespace WebCore { using RefCounted<WorkerContext>::ref; using RefCounted<WorkerContext>::deref; - private: + protected: WorkerContext(const KURL&, const String&, WorkerThread*); + bool isClosing() { return m_closing; } + private: virtual void refScriptExecutionContext() { ref(); } virtual void derefScriptExecutionContext() { deref(); } virtual void refEventTarget() { ref(); } @@ -140,7 +131,7 @@ namespace WebCore { OwnPtr<WorkerScriptController> m_script; WorkerThread* m_thread; - RefPtr<EventListener> m_onmessageListener; + RefPtr<EventListener> m_onerrorListener; EventListenersMap m_eventListeners; bool m_closing; diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerContext.idl b/src/3rdparty/webkit/WebCore/workers/WorkerContext.idl index 709410a267..2404d228f3 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerContext.idl +++ b/src/3rdparty/webkit/WebCore/workers/WorkerContext.idl @@ -28,9 +28,10 @@ module threads { interface [ Conditional=WORKERS, - DelegatingGetOwnPropertySlot, CustomMarkFunction, + DelegatingGetOwnPropertySlot, ExtendsDOMGlobalObject, + IsWorkerContext, LegacyParent=JSWorkerContextBase, NoStaticTables ] WorkerContext { @@ -41,7 +42,7 @@ module threads { #endif attribute [Replaceable] WorkerLocation location; void close(); - // attribute EventListener onerror; + attribute EventListener onerror; // WorkerUtils [Custom] void importScripts(/*[Variadic] in DOMString urls */); @@ -49,12 +50,6 @@ module threads { // Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); // DatabaseSync openDatabaseSync(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); - - // DedicatedWorkerGlobalScope - void postMessage(in DOMString message, in [Optional] MessagePort messagePort) - raises(DOMException); - attribute EventListener onmessage; - // Timers [Custom] long setTimeout(in TimeoutHandler handler, in long timeout); // [Custom] long setTimeout(in DOMString code, in long timeout); diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp index b6e16424ba..5971c1dac6 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp +++ b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp @@ -31,13 +31,13 @@ #include "WorkerMessagingProxy.h" +#include "DedicatedWorkerContext.h" #include "DOMWindow.h" #include "Document.h" #include "GenericWorkerTask.h" #include "MessageEvent.h" #include "ScriptExecutionContext.h" #include "Worker.h" -#include "WorkerContext.h" #include "WorkerThread.h" namespace WebCore { @@ -59,7 +59,7 @@ private: virtual void performTask(ScriptExecutionContext* scriptContext) { ASSERT(scriptContext->isWorkerContext()); - WorkerContext* context = static_cast<WorkerContext*>(scriptContext); + DedicatedWorkerContext* context = static_cast<DedicatedWorkerContext*>(scriptContext); RefPtr<MessagePort> port; if (m_channel) { port = MessagePort::create(*scriptContext); @@ -127,7 +127,15 @@ private: virtual void performTask(ScriptExecutionContext* context) { - if (!m_messagingProxy->askedToTerminate()) + Worker* workerObject = m_messagingProxy->workerObject(); + if (!workerObject || m_messagingProxy->askedToTerminate()) + return; + + bool errorHandled = false; + if (workerObject->onerror()) + errorHandled = workerObject->dispatchScriptErrorEvent(m_errorMessage, m_sourceURL, m_lineNumber); + + if (!errorHandled) context->reportException(m_errorMessage, m_lineNumber, m_sourceURL); } diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h index f9e1cd48c2..b705ca4d20 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h +++ b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.h @@ -47,7 +47,7 @@ namespace WebCore { class Worker; class WorkerThread; - class WorkerMessagingProxy : public WorkerContextProxy, public WorkerObjectProxy, public WorkerLoaderProxy, Noncopyable { + class WorkerMessagingProxy : public WorkerContextProxy, public WorkerObjectProxy, public WorkerLoaderProxy, public Noncopyable { public: WorkerMessagingProxy(Worker*); @@ -82,6 +82,7 @@ namespace WebCore { private: friend class MessageWorkerTask; friend class WorkerContextDestroyedTask; + friend class WorkerExceptionTask; friend class WorkerThreadActivityReportTask; virtual ~WorkerMessagingProxy(); diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp index b6f6487b2e..cb31fe7f1f 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp +++ b/src/3rdparty/webkit/WebCore/workers/WorkerRunLoop.cpp @@ -125,7 +125,7 @@ String WorkerRunLoop::defaultMode() return String(); } -class RunLoopSetup : Noncopyable { +class RunLoopSetup : public Noncopyable { public: RunLoopSetup(WorkerRunLoop& runLoop) : m_runLoop(runLoop) diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerScriptLoader.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerScriptLoader.cpp index 8737b881b9..093bf07d36 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerScriptLoader.cpp +++ b/src/3rdparty/webkit/WebCore/workers/WorkerScriptLoader.cpp @@ -31,12 +31,15 @@ #include "WorkerScriptLoader.h" +#include "GenericWorkerTask.h" #include "ResourceRequest.h" #include "ScriptExecutionContext.h" #include "SecurityOrigin.h" #include "WorkerContext.h" #include "WorkerScriptLoaderClient.h" #include "WorkerThreadableLoader.h" +#include <wtf/OwnPtr.h> +#include <wtf/UnusedParam.h> namespace WebCore { @@ -47,24 +50,59 @@ WorkerScriptLoader::WorkerScriptLoader() { } -void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecutionContext, const String& url, CrossOriginRedirectPolicy crossOriginRedirectPolicy) +static CrossOriginRedirectPolicy toCrossOriginRedirectPolicy(CrossOriginLoadPolicy crossOriginLoadPolicy) { - ResourceRequest request(url); - request.setHTTPMethod("GET"); + return (crossOriginLoadPolicy == DenyCrossOriginLoad) ? DenyCrossOriginRedirect : AllowCrossOriginRedirect; +} + +void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecutionContext, const String& url, URLCompletionPolicy urlCompletionPolicy, CrossOriginLoadPolicy crossOriginLoadPolicy) +{ + OwnPtr<ResourceRequest> request(createResourceRequest(scriptExecutionContext, url, urlCompletionPolicy, crossOriginLoadPolicy)); + if (!request) + return; ASSERT(scriptExecutionContext->isWorkerContext()); - WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerContext*>(scriptExecutionContext), request, *this, AllowStoredCredentials, crossOriginRedirectPolicy); + WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerContext*>(scriptExecutionContext), *request, *this, AllowStoredCredentials, toCrossOriginRedirectPolicy(crossOriginLoadPolicy)); } -void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecutionContext, const String& url, CrossOriginRedirectPolicy crossOriginRedirectPolicy, WorkerScriptLoaderClient* client) +void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecutionContext, const String& url, URLCompletionPolicy urlCompletionPolicy, CrossOriginLoadPolicy crossOriginLoadPolicy, WorkerScriptLoaderClient* client) { ASSERT(client); m_client = client; - ResourceRequest request(url); - request.setHTTPMethod("GET"); + OwnPtr<ResourceRequest> request(createResourceRequest(scriptExecutionContext, url, urlCompletionPolicy, crossOriginLoadPolicy)); + if (!request) + return; - m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, request, DoNotSendLoadCallbacks, DoNotSniffContent, AllowStoredCredentials, crossOriginRedirectPolicy); + m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, *request, DoNotSendLoadCallbacks, DoNotSniffContent, AllowStoredCredentials, toCrossOriginRedirectPolicy(crossOriginLoadPolicy)); +} + +static void notifyLoadErrorTask(ScriptExecutionContext* context, WorkerScriptLoader* loader) +{ + UNUSED_PARAM(context); + loader->notifyError(); +} + +PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest(ScriptExecutionContext* scriptExecutionContext, const String& url, URLCompletionPolicy urlCompletionPolicy, CrossOriginLoadPolicy crossOriginLoadPolicy) +{ + if (urlCompletionPolicy == CompleteURL) { + m_url = scriptExecutionContext->completeURL(url); + if (url.isEmpty() || !m_url.isValid()) { + scriptExecutionContext->postTask(createCallbackTask(¬ifyLoadErrorTask, this)); + return 0; + } + } else + m_url = KURL(url); + + if (crossOriginLoadPolicy == DenyCrossOriginLoad && !scriptExecutionContext->securityOrigin()->canAccess(SecurityOrigin::create(m_url).get())) { + scriptExecutionContext->postTask(createCallbackTask(¬ifyLoadErrorTask, this)); + return 0; + } + + OwnPtr<ResourceRequest> request(new ResourceRequest(m_url)); + request->setHTTPMethod("GET"); + + return request.release(); } void WorkerScriptLoader::didReceiveResponse(const ResourceResponse& response) @@ -111,18 +149,21 @@ void WorkerScriptLoader::didFinishLoading(unsigned long identifier) void WorkerScriptLoader::didFail(const ResourceError&) { - m_failed = true; - notifyFinished(); + notifyError(); } void WorkerScriptLoader::didFailRedirectCheck() { - m_failed = true; - notifyFinished(); + notifyError(); } void WorkerScriptLoader::didReceiveAuthenticationCancellation(const ResourceResponse&) { + notifyError(); +} + +void WorkerScriptLoader::notifyError() +{ m_failed = true; notifyFinished(); } diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerScriptLoader.h b/src/3rdparty/webkit/WebCore/workers/WorkerScriptLoader.h index e3a96637ea..f465d7f337 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerScriptLoader.h +++ b/src/3rdparty/webkit/WebCore/workers/WorkerScriptLoader.h @@ -30,6 +30,7 @@ #if ENABLE(WORKERS) +#include "KURL.h" #include "ResourceResponse.h" #include "ScriptString.h" #include "TextResourceDecoder.h" @@ -41,14 +42,27 @@ namespace WebCore { class ScriptExecutionContext; class WorkerScriptLoaderClient; + enum URLCompletionPolicy { + CompleteURL, + DoNotCompleteURL + }; + + enum CrossOriginLoadPolicy { + DenyCrossOriginLoad, + AllowCrossOriginLoad + }; + class WorkerScriptLoader : public ThreadableLoaderClient { public: WorkerScriptLoader(); - void loadSynchronously(ScriptExecutionContext*, const String& url, CrossOriginRedirectPolicy); - void loadAsynchronously(ScriptExecutionContext*, const String& url, CrossOriginRedirectPolicy, WorkerScriptLoaderClient*); + void loadSynchronously(ScriptExecutionContext*, const String& url, URLCompletionPolicy, CrossOriginLoadPolicy); + void loadAsynchronously(ScriptExecutionContext*, const String& url, URLCompletionPolicy, CrossOriginLoadPolicy, WorkerScriptLoaderClient*); + + void notifyError(); const String& script() const { return m_script; } + const KURL& url() const { return m_url; } bool failed() const { return m_failed; } unsigned long identifier() const { return m_identifier; } @@ -60,6 +74,7 @@ namespace WebCore { virtual void didReceiveAuthenticationCancellation(const ResourceResponse&); private: + PassOwnPtr<ResourceRequest> createResourceRequest(ScriptExecutionContext*, const String& url, URLCompletionPolicy, CrossOriginLoadPolicy); void notifyFinished(); WorkerScriptLoaderClient* m_client; @@ -67,6 +82,7 @@ namespace WebCore { String m_responseEncoding; RefPtr<TextResourceDecoder> m_decoder; String m_script; + KURL m_url; bool m_failed; unsigned long m_identifier; }; diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerThread.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerThread.cpp index 0745226def..5d58eea85f 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerThread.cpp +++ b/src/3rdparty/webkit/WebCore/workers/WorkerThread.cpp @@ -30,11 +30,11 @@ #include "WorkerThread.h" +#include "DedicatedWorkerContext.h" #include "KURL.h" #include "PlatformString.h" #include "ScriptSourceCode.h" #include "ScriptValue.h" -#include "WorkerContext.h" #include "WorkerObjectProxy.h" #include <utility> @@ -101,9 +101,9 @@ void* WorkerThread::workerThread() { { MutexLocker lock(m_threadCreationMutex); - m_workerContext = WorkerContext::create(m_startupData->m_scriptURL, m_startupData->m_userAgent, this); + m_workerContext = DedicatedWorkerContext::create(m_startupData->m_scriptURL, m_startupData->m_userAgent, this); if (m_runLoop.terminated()) { - // The worker was terminated before the thread had a chance to run. Since the context didn't exist yet, + // The worker was terminated before the thread had a chance to run. Since the context didn't exist yet, // forbidExecution() couldn't be called from stop(). m_workerContext->script()->forbidExecution(); } diff --git a/src/3rdparty/webkit/WebCore/xml/XPathExpressionNode.h b/src/3rdparty/webkit/WebCore/xml/XPathExpressionNode.h index d12b451dd6..74b134e7b5 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathExpressionNode.h +++ b/src/3rdparty/webkit/WebCore/xml/XPathExpressionNode.h @@ -53,7 +53,7 @@ namespace WebCore { virtual ~ParseNode() { } }; - class Expression : public ParseNode, Noncopyable { + class Expression : public ParseNode, public Noncopyable { public: static EvaluationContext& evaluationContext(); diff --git a/src/3rdparty/webkit/WebCore/xml/XPathGrammar.y b/src/3rdparty/webkit/WebCore/xml/XPathGrammar.y index 15a859bff5..14e9fa3948 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathGrammar.y +++ b/src/3rdparty/webkit/WebCore/xml/XPathGrammar.y @@ -37,6 +37,10 @@ #include "XPathPath.h" #include "XPathPredicate.h" #include "XPathVariableReference.h" +#include <wtf/FastMalloc.h> + +#define YYMALLOC fastMalloc +#define YYFREE fastFree #define YYENABLE_NLS 0 #define YYLTYPE_IS_TRIVIAL 1 diff --git a/src/3rdparty/webkit/WebCore/xml/XPathParser.h b/src/3rdparty/webkit/WebCore/xml/XPathParser.h index 8d6da3f970..e77960308e 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathParser.h +++ b/src/3rdparty/webkit/WebCore/xml/XPathParser.h @@ -58,7 +58,7 @@ namespace WebCore { Token(int t, EqTestOp::Opcode v): type(t), eqop(v) {} }; - class Parser : Noncopyable { + class Parser : public Noncopyable { public: Parser(); diff --git a/src/3rdparty/webkit/WebCore/xml/XPathPredicate.h b/src/3rdparty/webkit/WebCore/xml/XPathPredicate.h index 6c9d413e3f..5f2482a026 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathPredicate.h +++ b/src/3rdparty/webkit/WebCore/xml/XPathPredicate.h @@ -105,7 +105,7 @@ namespace WebCore { virtual Value::Type resultType() const { return Value::NodeSetValue; } }; - class Predicate : Noncopyable { + class Predicate : public Noncopyable { public: Predicate(Expression*); ~Predicate(); diff --git a/src/3rdparty/webkit/WebCore/xml/XPathStep.h b/src/3rdparty/webkit/WebCore/xml/XPathStep.h index 1c26327738..11612e92f0 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathStep.h +++ b/src/3rdparty/webkit/WebCore/xml/XPathStep.h @@ -39,7 +39,7 @@ namespace WebCore { class Predicate; - class Step : public ParseNode, Noncopyable { + class Step : public ParseNode, public Noncopyable { public: enum Axis { AncestorAxis, AncestorOrSelfAxis, AttributeAxis, diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri index 73288abc0f..b363365e30 100644 --- a/src/3rdparty/webkit/WebKit.pri +++ b/src/3rdparty/webkit/WebKit.pri @@ -39,6 +39,23 @@ CONFIG(release, debug|release) { BASE_DIR = $$PWD INCLUDEPATH += $$PWD/WebKit/qt/Api +# Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT +*-armcc { + QMAKE_CFLAGS += --gnu + QMAKE_CXXFLAGS += --gnu --no_parse_templates +} + +symbian { + QMAKE_CXXFLAGS.ARMCC += --gnu --no_parse_templates + DEFINES *= QT_NO_UITOOLS +} + +contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools + +# Disable a few warnings on Windows. The warnings are also +# disabled in WebKitLibraries/win/tools/vsprops/common.vsprops +win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4503 -wd4800 -wd4819 -wd4996 + # # For builds inside Qt we interpret the output rule and the input of each extra compiler manually # and add the resulting sources to the SOURCES variable, because the build inside Qt contains already diff --git a/src/3rdparty/webkit/WebKit/ChangeLog b/src/3rdparty/webkit/WebKit/ChangeLog index cabdf46a6c..c7913d26f3 100644 --- a/src/3rdparty/webkit/WebKit/ChangeLog +++ b/src/3rdparty/webkit/WebKit/ChangeLog @@ -1,3 +1,145 @@ +2009-07-24 Andrei Popescu <andreip@google.com> + + ApplicationCache should have size limit + https://bugs.webkit.org/show_bug.cgi?id=22700 + + Updated the project after adding WebApplicationCache.h/mm + + * WebKit.xcodeproj/project.pbxproj: + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Eric Seidel. + + Added InspectorClient for Haiku WebCore support. + https://bugs.webkit.org/show_bug.cgi?id=26952 + + Adding two files, InspectorClientHaiku.h and InspectorClientHaiku.cpp + + * haiku/WebCoreSupport/InspectorClientHaiku.cpp: Added. + (WebCore::InspectorClientHaiku::inspectorDestroyed): + (WebCore::InspectorClientHaiku::createPage): + (WebCore::InspectorClientHaiku::localizedStringsURL): + (WebCore::InspectorClientHaiku::hiddenPanels): + (WebCore::InspectorClientHaiku::showWindow): + (WebCore::InspectorClientHaiku::closeWindow): + (WebCore::InspectorClientHaiku::attachWindow): + (WebCore::InspectorClientHaiku::detachWindow): + (WebCore::InspectorClientHaiku::setAttachedWindowHeight): + (WebCore::InspectorClientHaiku::highlight): + (WebCore::InspectorClientHaiku::hideHighlight): + (WebCore::InspectorClientHaiku::inspectedURLChanged): + (WebCore::InspectorClientHaiku::populateSetting): + (WebCore::InspectorClientHaiku::storeSetting): + (WebCore::InspectorClientHaiku::removeSetting): + * haiku/WebCoreSupport/InspectorClientHaiku.h: Added. + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Oliver Hunt. + + Added EditorClient for Haiku WebCore support. + https://bugs.webkit.org/show_bug.cgi?id=26952 + + Adding two files, EditorClientHaiku.h and EditorClientHaiku.cpp + + * haiku/WebCoreSupport/EditorClientHaiku.cpp: Added. + (WebCore::EditorClientHaiku::EditorClientHaiku): + (WebCore::EditorClientHaiku::setPage): + (WebCore::EditorClientHaiku::pageDestroyed): + (WebCore::EditorClientHaiku::shouldDeleteRange): + (WebCore::EditorClientHaiku::shouldShowDeleteInterface): + (WebCore::EditorClientHaiku::smartInsertDeleteEnabled): + (WebCore::EditorClientHaiku::isSelectTrailingWhitespaceEnabled): + (WebCore::EditorClientHaiku::isContinuousSpellCheckingEnabled): + (WebCore::EditorClientHaiku::toggleContinuousSpellChecking): + (WebCore::EditorClientHaiku::isGrammarCheckingEnabled): + (WebCore::EditorClientHaiku::toggleGrammarChecking): + (WebCore::EditorClientHaiku::spellCheckerDocumentTag): + (WebCore::EditorClientHaiku::isEditable): + (WebCore::EditorClientHaiku::shouldBeginEditing): + (WebCore::EditorClientHaiku::shouldEndEditing): + (WebCore::EditorClientHaiku::shouldInsertNode): + (WebCore::EditorClientHaiku::shouldInsertText): + (WebCore::EditorClientHaiku::shouldChangeSelectedRange): + (WebCore::EditorClientHaiku::shouldApplyStyle): + (WebCore::EditorClientHaiku::shouldMoveRangeAfterDelete): + (WebCore::EditorClientHaiku::didBeginEditing): + (WebCore::EditorClientHaiku::respondToChangedContents): + (WebCore::EditorClientHaiku::respondToChangedSelection): + (WebCore::EditorClientHaiku::didEndEditing): + (WebCore::EditorClientHaiku::didWriteSelectionToPasteboard): + (WebCore::EditorClientHaiku::didSetSelectionTypesForPasteboard): + (WebCore::EditorClientHaiku::registerCommandForUndo): + (WebCore::EditorClientHaiku::registerCommandForRedo): + (WebCore::EditorClientHaiku::clearUndoRedoOperations): + (WebCore::EditorClientHaiku::canUndo): + (WebCore::EditorClientHaiku::canRedo): + (WebCore::EditorClientHaiku::undo): + (WebCore::EditorClientHaiku::redo): + (WebCore::EditorClientHaiku::handleKeyboardEvent): + (WebCore::EditorClientHaiku::handleInputMethodKeydown): + (WebCore::EditorClientHaiku::textFieldDidBeginEditing): + (WebCore::EditorClientHaiku::textFieldDidEndEditing): + (WebCore::EditorClientHaiku::textDidChangeInTextField): + (WebCore::EditorClientHaiku::doTextFieldCommandFromEvent): + (WebCore::EditorClientHaiku::textWillBeDeletedInTextField): + (WebCore::EditorClientHaiku::textDidChangeInTextArea): + (WebCore::EditorClientHaiku::ignoreWordInSpellDocument): + (WebCore::EditorClientHaiku::learnWord): + (WebCore::EditorClientHaiku::checkSpellingOfString): + (WebCore::EditorClientHaiku::getAutoCorrectSuggestionForMisspelledWord): + (WebCore::EditorClientHaiku::checkGrammarOfString): + (WebCore::EditorClientHaiku::updateSpellingUIWithGrammarString): + (WebCore::EditorClientHaiku::updateSpellingUIWithMisspelledWord): + (WebCore::EditorClientHaiku::showSpellingUI): + (WebCore::EditorClientHaiku::spellingUIIsShowing): + (WebCore::EditorClientHaiku::getGuessesForWord): + (WebCore::EditorClientHaiku::setInputMethodState): + (WebCore::EditorClientHaiku::isEditing): + * haiku/WebCoreSupport/EditorClientHaiku.h: Added. + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Eric Seidel. + + Added DragClient for Haiku WebCore support. + https://bugs.webkit.org/show_bug.cgi?id=26952 + + Adding two files, DragClientHaiku.h and DragClientHaiku.cpp + + * haiku/WebCoreSupport/DragClientHaiku.cpp: Added. + (WebCore::DragClientHaiku::actionMaskForDrag): + (WebCore::DragClientHaiku::willPerformDragDestinationAction): + (WebCore::DragClientHaiku::dragControllerDestroyed): + (WebCore::DragClientHaiku::dragSourceActionMaskForPoint): + (WebCore::DragClientHaiku::willPerformDragSourceAction): + (WebCore::DragClientHaiku::startDrag): + (WebCore::DragClientHaiku::createDragImageForLink): + * haiku/WebCoreSupport/DragClientHaiku.h: Added. + +2009-07-16 Maxime Simon <simon.maxime@gmail.com> + + Reviewed by Oliver Hunt. + + Added ContextMenuClient for Haiku WebCore support. + https://bugs.webkit.org/show_bug.cgi?id=26952 + + Adding two files, ContextMenuClientHaiku.h + and ContextMenuClientHaiku.cpp + + * haiku/WebCoreSupport/ContextMenuClientHaiku.cpp: Added. + (WebCore::ContextMenuClientHaiku::contextMenuDestroyed): + (WebCore::ContextMenuClientHaiku::getCustomMenuFromDefaultItems): + (WebCore::ContextMenuClientHaiku::contextMenuItemSelected): + (WebCore::ContextMenuClientHaiku::downloadURL): + (WebCore::ContextMenuClientHaiku::lookUpInDictionary): + (WebCore::ContextMenuClientHaiku::speak): + (WebCore::ContextMenuClientHaiku::isSpeaking): + (WebCore::ContextMenuClientHaiku::stopSpeaking): + (WebCore::ContextMenuClientHaiku::searchWithGoogle): + * haiku/WebCoreSupport/ContextMenuClientHaiku.h: Added. + 2009-07-10 Adam Roben <aroben@apple.com> Sort all our Xcode projects diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp index 0d11381676..d51e4e6fd0 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp @@ -55,7 +55,8 @@ using namespace WebCore; /*! Constructs a web database from \a other. */ -QWebDatabase::QWebDatabase(const QWebDatabase& other) : d(other.d) +QWebDatabase::QWebDatabase(const QWebDatabase& other) + : d(other.d) { } @@ -163,7 +164,7 @@ QWebSecurityOrigin QWebDatabase::origin() const Removes the database \a db from its security origin. All data stored in the database \a db will be destroyed. */ -void QWebDatabase::removeDatabase(const QWebDatabase &db) +void QWebDatabase::removeDatabase(const QWebDatabase& db) { #if ENABLE(DATABASE) DatabaseTracker::tracker().deleteDatabase(db.d->origin.get(), db.d->name); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h index 5b4f704a75..875b2eb0c3 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h @@ -31,8 +31,7 @@ namespace WebCore { class QWebDatabasePrivate; class QWebSecurityOrigin; -class QWEBKIT_EXPORT QWebDatabase -{ +class QWEBKIT_EXPORT QWebDatabase { public: QWebDatabase(const QWebDatabase& other); QWebDatabase &operator=(const QWebDatabase& other); @@ -45,7 +44,7 @@ public: QString fileName() const; QWebSecurityOrigin origin() const; - static void removeDatabase(const QWebDatabase &db); + static void removeDatabase(const QWebDatabase&); static void removeAllDatabases(); private: diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase_p.h index 988fb16ef0..9ae8fc83e6 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase_p.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase_p.h @@ -27,8 +27,7 @@ #include "RefPtr.h" -class QWebDatabasePrivate : public QSharedData -{ +class QWebDatabasePrivate : public QSharedData { public: WebCore::String name; WTF::RefPtr<WebCore::SecurityOrigin> origin; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp index 413a662647..1dfb4098a1 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp @@ -46,46 +46,52 @@ using namespace WebCore; -class QWebElementPrivate -{ +class QWebElementPrivate { public: }; /*! \class QWebElement \since 4.6 - \brief The QWebElement class provides convenience access to DOM elements in a QWebFrame. - \preliminary + \brief The QWebElement class provides convenient access to DOM elements in a QWebFrame. - QWebElement is the main class to provide easy access to the document model. + QWebElement is the main class to easily access to the document model. The document model is represented by a tree-like structure of DOM elements. The root of the tree is called the document element and can be accessed using QWebFrame::documentElement(). - You can reach specific elements by using the findAll() and findFirst() functions, which - allow the use of CSS selectors to identify elements. + You can reach specific elements using findAll() and findFirst(); the elements + are identified through CSS selectors. \snippet webkitsnippets/webelement/main.cpp FindAll - The first list contains all span elements in the document. The second list contains - only the span elements that are children of the paragraph that is classified - as "intro" paragraph. + The first list contains all \c span elements in the document. The second list contains + \c span elements that are children of \c p, classified with \c intro. + + Using findFirst() is more efficient than calling findAll() and extracting the first element + only in the returned list. Alternatively you can manually traverse the document using firstChild() and nextSibling(): \snippet webkitsnippets/webelement/main.cpp Traversing with QWebElement The underlying content of QWebElement is explicitly shared. Creating a copy of a QWebElement - does not create a copy of the content, both instances point to the same underlying element. + does not create a copy of the content. Instead, both instances point to the same element. + + The element's attributes can be read using attribute() and modified with setAttribute(). - The element's attributes can be read using attribute() and changed using setAttribute(). + The contents of child elements can be converted to plain text with toPlainText() and to + XHTML using toInnerXml(). To also include the element's tag in the output, use toOuterXml(). - The content of the child elements can be converted to plain text using toPlainText() and to - x(html) using toXml(), and it is possible to replace the content using setPlainText() and setXml(). + It is possible to replace the contents using setPlainText() and setInnerXml(). To replace + the element itself and its contents, use setOuterXml(). - Depending on the type of the underlying element there may be extra functionality available, not - covered through QWebElement's API. For example a HTML form element can be triggered to submit the - entire form. These list of these functions is available through functions() and they can be called - directly using callFunction(). + In the JavaScript DOM interfaces, elements can have additional functions depending on their + type. For example an HTML form element can be triggered to submit the entire form to the + web server using the submit() function. A list of these special functions can be obtained + in QWebElement using functions(); they can be invoked using callFunction(). + + Similarly element specific properties can be obtained using scriptableProperties() and + read/written using scriptableProperty()/setScriptableProperty(). */ /*! @@ -178,10 +184,13 @@ bool QWebElement::isNull() const } /*! - Returns a new collection of elements that are children of this element - and that match the given CSS selector \a selectorQuery. + Returns a new list of child elements matching the given CSS selector \a selectorQuery. + If there are no matching elements, an empty list is returned. + + \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is + used for the query. - The query is specified using \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{standard CSS2 selectors}. + \note This search is performed recursively. */ QList<QWebElement> QWebElement::findAll(const QString &selectorQuery) const { @@ -205,9 +214,10 @@ QList<QWebElement> QWebElement::findAll(const QString &selectorQuery) const /*! Returns the first child element that matches the given CSS selector \a selectorQuery. - This function is equivalent to calling findAll() and taking only the - first element in the returned collection of elements. However calling - this function is more efficient. + \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is + used for the query. + + \note This search is performed recursively. */ QWebElement QWebElement::findFirst(const QString &selectorQuery) const { @@ -743,7 +753,7 @@ QStringList QWebElement::functions() const continue; JSC::UString ustring = (*it).ustring(); - names << QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + names << QString::fromUtf16((const ushort*)ustring.rep()->data(), ustring.size()); } if (state->hadException()) @@ -868,7 +878,7 @@ QStringList QWebElement::scriptableProperties() const continue; JSC::UString ustring = (*it).ustring(); - names << QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()); + names << QString::fromUtf16((const ushort*)ustring.rep()->data(), ustring.size()); } if (exec->hadException()) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h index 7e56d0ff05..bc6f8a9566 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h @@ -34,12 +34,11 @@ namespace WebCore { class QWebFrame; class QWebElementPrivate; -class QWEBKIT_EXPORT QWebElement -{ +class QWEBKIT_EXPORT QWebElement { public: QWebElement(); - QWebElement(const QWebElement &); - QWebElement &operator=(const QWebElement &); + QWebElement(const QWebElement&); + QWebElement &operator=(const QWebElement&); ~QWebElement(); bool operator==(const QWebElement& o) const; @@ -47,33 +46,33 @@ public: bool isNull() const; - QList<QWebElement> findAll(const QString &selectorQuery) const; - QWebElement findFirst(const QString &selectorQuery) const; + QList<QWebElement> findAll(const QString& selectorQuery) const; + QWebElement findFirst(const QString& selectorQuery) const; - void setPlainText(const QString &text); + void setPlainText(const QString& text); QString toPlainText() const; - void setOuterXml(const QString &markup); + void setOuterXml(const QString& markup); QString toOuterXml() const; - void setInnerXml(const QString &markup); + void setInnerXml(const QString& markup); QString toInnerXml() const; - void setAttribute(const QString &name, const QString &value); - void setAttributeNS(const QString &namespaceUri, const QString &name, const QString &value); - QString attribute(const QString &name, const QString &defaultValue = QString()) const; - QString attributeNS(const QString &namespaceUri, const QString &name, const QString &defaultValue = QString()) const; - bool hasAttribute(const QString &name) const; - bool hasAttributeNS(const QString &namespaceUri, const QString &name) const; - void removeAttribute(const QString &name); - void removeAttributeNS(const QString &namespaceUri, const QString &name); + void setAttribute(const QString& name, const QString& value); + void setAttributeNS(const QString& namespaceUri, const QString& name, const QString& value); + QString attribute(const QString& name, const QString& defaultValue = QString()) const; + QString attributeNS(const QString& namespaceUri, const QString& name, const QString& defaultValue = QString()) const; + bool hasAttribute(const QString& name) const; + bool hasAttributeNS(const QString& namespaceUri, const QString& name) const; + void removeAttribute(const QString& name); + void removeAttributeNS(const QString& namespaceUri, const QString& name); bool hasAttributes() const; QStringList classes() const; - bool hasClass(const QString &name) const; - void addClass(const QString &name); - void removeClass(const QString &name); - void toggleClass(const QString &name); + bool hasClass(const QString& name) const; + void addClass(const QString& name); + void removeClass(const QString& name); + void toggleClass(const QString& name); QRect geometry() const; @@ -92,62 +91,62 @@ public: // TODO: Add QList<QWebElement> overloads // docs need example snippet - void appendInside(const QString &markup); - void appendInside(const QWebElement &element); + void appendInside(const QString& markup); + void appendInside(const QWebElement& element); // docs need example snippet - void prependInside(const QString &markup); - void prependInside(const QWebElement &element); + void prependInside(const QString& markup); + void prependInside(const QWebElement& element); // docs need example snippet - void appendOutside(const QString &markup); - void appendOutside(const QWebElement &element); + void appendOutside(const QString& markup); + void appendOutside(const QWebElement& element); // docs need example snippet - void prependOutside(const QString &markup); - void prependOutside(const QWebElement &element); + void prependOutside(const QString& markup); + void prependOutside(const QWebElement& element); // docs need example snippet - void encloseContentsWith(const QWebElement &element); - void encloseContentsWith(const QString &markup); - void encloseWith(const QString &markup); - void encloseWith(const QWebElement &element); + void encloseContentsWith(const QWebElement& element); + void encloseContentsWith(const QString& markup); + void encloseWith(const QString& markup); + void encloseWith(const QWebElement& element); - void replace(const QString &markup); - void replace(const QWebElement &element); + void replace(const QString& markup); + void replace(const QWebElement& element); QWebElement clone() const; - QWebElement &takeFromDocument(); + QWebElement& takeFromDocument(); void removeFromDocument(); void removeChildren(); QVariant evaluateScript(const QString& scriptSource); - QVariant callFunction(const QString &functionName, const QVariantList &arguments = QVariantList()); + QVariant callFunction(const QString& functionName, const QVariantList& arguments = QVariantList()); QStringList functions() const; - QVariant scriptableProperty(const QString &name) const; - void setScriptableProperty(const QString &name, const QVariant &value); + QVariant scriptableProperty(const QString& name) const; + void setScriptableProperty(const QString& name, const QVariant& value); QStringList scriptableProperties() const; enum ResolveRule { IgnoreCascadingStyles, RespectCascadingStyles }; - QString styleProperty(const QString &name, ResolveRule = IgnoreCascadingStyles) const; + QString styleProperty(const QString& name, ResolveRule = IgnoreCascadingStyles) const; enum StylePriority { NormalStylePriority, DeclaredStylePriority, ImportantStylePriority }; - void setStyleProperty(const QString &name, const QString &value, StylePriority = DeclaredStylePriority); + void setStyleProperty(const QString& name, const QString& value, StylePriority = DeclaredStylePriority); - QString computedStyleProperty(const QString &name) const; + QString computedStyleProperty(const QString& name) const; private: - explicit QWebElement(WebCore::Element *domElement); - explicit QWebElement(WebCore::Node *node); + explicit QWebElement(WebCore::Element*); + explicit QWebElement(WebCore::Node*); friend class QWebFrame; friend class QWebHitTestResult; friend class QWebHitTestResultPrivate; - QWebElementPrivate *d; - WebCore::Element *m_element; + QWebElementPrivate* d; + WebCore::Element* m_element; }; #endif // QWEBELEMENT_H diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 29d380dcab..23cb473dc4 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -232,7 +232,7 @@ WebCore::Scrollbar* QWebFramePrivate::verticalScrollBar() const return frame->view()->verticalScrollbar(); } -void QWebFramePrivate::renderPrivate(QPainter *painter, const QRegion &clip, bool contents) +void QWebFramePrivate::renderPrivate(QPainter *painter, const QRegion &clip) { if (!frame->view() || !frame->contentRenderer()) return; @@ -246,7 +246,7 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, const QRegion &clip, boo GraphicsContext context(painter); - if (!contents) + if (clipRenderToViewport) view->paint(&context, vector.first()); else view->paintContents(&context, vector.first()); @@ -255,7 +255,7 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, const QRegion &clip, boo const QRect& clipRect = vector.at(i); painter->save(); painter->setClipRect(clipRect, Qt::IntersectClip); - if (!contents) + if (clipRenderToViewport) view->paint(&context, clipRect); else view->paintContents(&context, clipRect); @@ -280,6 +280,13 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, const QRegion &clip, boo \l{Elements of QWebView} for an explanation of how web frames are related to a web page and web view. + The QWebFrame class also offers methods to retrieve both the URL currently + loaded by the frame (see url()) as well as the URL originally requested + to be loaded (see requestedUrl()). These methods make possible the retrieval + of the URL before and after a DNS resolution or a redirection occurs during + the load process. The requestedUrl() also matches to the URL added to the + frame history (\l{QWebHistory}) if load is successful. + The title of an HTML frame can be accessed with the title() property. Additionally, a frame may also specify an icon, which can be accessed using the icon() property. If the title or the icon changes, the @@ -376,7 +383,7 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object if (!page()->settings()->testAttribute(QWebSettings::JavascriptEnabled)) return; - JSC::JSLock lock(false); + JSC::JSLock lock(JSC::SilenceAssertionsOnly); JSDOMWindow* window = toJSDOMWindow(d->frame); JSC::Bindings::RootObject* root = d->frame->script()->bindingRootObject(); if (!window) { @@ -443,7 +450,7 @@ QString QWebFrame::title() const { if (d->frame->document()) return d->frame->loader()->documentLoader()->title(); - else return QString(); + return QString(); } /*! @@ -479,10 +486,10 @@ QString QWebFrame::title() const */ QMultiMap<QString, QString> QWebFrame::metaData() const { - if(!d->frame->document()) - return QMap<QString,QString>(); + if (!d->frame->document()) + return QMap<QString, QString>(); - QMultiMap<QString,QString> map; + QMultiMap<QString, QString> map; Document* doc = d->frame->document(); RefPtr<NodeList> list = doc->getElementsByTagName("meta"); unsigned len = list->length(); @@ -521,6 +528,24 @@ QUrl QWebFrame::url() const } /*! + \since 4.6 + \property QWebFrame::requestedUrl + + The URL requested to loaded by the frame currently viewed. The URL may differ from + the one returned by url() if a DNS resolution or a redirection occurs. + + \sa url(), setUrl() +*/ +QUrl QWebFrame::requestedUrl() const +{ + if (!d->frame->loader()->activeDocumentLoader() + || !d->frameLoaderClient->m_loadSucceeded) + return QUrl(d->frame->loader()->outgoingReferrer()); + + return d->frame->loader()->originalRequest().url(); +} +/*! + \since 4.6 \property QWebFrame::baseUrl \brief the base URL of the frame, can be used to resolve relative URLs \since 4.6 @@ -815,9 +840,8 @@ int QWebFrame::scrollBarValue(Qt::Orientation orientation) const { Scrollbar *sb; sb = (orientation == Qt::Horizontal) ? d->horizontalScrollBar() : d->verticalScrollBar(); - if (sb) { + if (sb) return sb->value(); - } return 0; } @@ -867,7 +891,7 @@ QRect QWebFrame::scrollBarGeometry(Qt::Orientation orientation) const \since 4.5 Scrolls the frame \a dx pixels to the right and \a dy pixels downward. Both \a dx and \a dy may be negative. - + \sa QWebFrame::scrollPosition */ @@ -875,7 +899,7 @@ void QWebFrame::scroll(int dx, int dy) { if (!d->frame->view()) return; - + d->frame->view()->scrollBy(IntSize(dx, dy)); } @@ -888,7 +912,7 @@ void QWebFrame::scroll(int dx, int dy) QPoint QWebFrame::scrollPosition() const { if (!d->frame->view()) - return QPoint(0,0); + return QPoint(0, 0); IntSize ofs = d->frame->view()->scrollOffset(); return QPoint(ofs.width(), ofs.height()); @@ -924,12 +948,23 @@ void QWebFrame::render(QPainter *painter) } /*! - \since 4.6 - Render the frame's \a contents into \a painter while clipping to \a contents. + \since 4.6 + \property QWebFrame::clipRenderToViewport + + Returns true if render will clip content to viewport; otherwise returns false. */ -void QWebFrame::renderContents(QPainter *painter, const QRegion &contents) +bool QWebFrame::clipRenderToViewport() const { - d->renderPrivate(painter, contents, true); + return d->clipRenderToViewport; +} + +/*! + \since 4.6 + Sets whether the content of a frame will be clipped to viewport when rendered. +*/ +void QWebFrame::setClipRenderToViewport(bool clipRenderToViewport) +{ + d->clipRenderToViewport = clipRenderToViewport; } /*! @@ -1051,8 +1086,11 @@ QWebElement QWebFrame::documentElement() const /*! \since 4.6 - Returns a new collection of elements that are children of the frame's - document element and that match the given CSS selector \a selectorQuery. + Returns a new list of elements matching the given CSS selector \a selectorQuery. + If there are no matching elements, an empty list is returned. + + \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is + used for the query. \sa QWebElement::findAll() */ @@ -1064,8 +1102,11 @@ QList<QWebElement> QWebFrame::findAllElements(const QString &selectorQuery) cons /*! \since 4.6 Returns the first element in the frame's document that matches the - given CSS selector \a selectorQuery. Returns a null element if there is no - match. + given CSS selector \a selectorQuery. If there is no matching element, a + null element is returned. + + \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is + used for the query. \sa QWebElement::findFirst() */ @@ -1123,11 +1164,11 @@ void QWebFrame::print(QPrinter *printer) const printContext.begin(pageRect.width()); - printContext.computePageRects(pageRect, /*headerHeight*/0, /*footerHeight*/0, /*userScaleFactor*/1.0, pageHeight); + printContext.computePageRects(pageRect, /* headerHeight */ 0, /* footerHeight */ 0, /* userScaleFactor */ 1.0, pageHeight); int docCopies; int pageCopies; - if (printer->collateCopies() == true){ + if (printer->collateCopies()) { docCopies = 1; pageCopies = printer->numCopies(); } else { @@ -1340,7 +1381,8 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult return; pos = hitTest.point(); boundingRect = hitTest.boundingBox(); - title = hitTest.title(); + WebCore::TextDirection dir; + title = hitTest.title(dir); linkText = hitTest.textContent(); linkUrl = hitTest.absoluteLinkURL(); linkTitle = hitTest.titleDisplayString(); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h index 2c5309aa71..55c73b4132 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h @@ -60,8 +60,7 @@ class QWebFrameData; class QWebHitTestResultPrivate; class QWebFrame; -class QWEBKIT_EXPORT QWebHitTestResult -{ +class QWEBKIT_EXPORT QWebHitTestResult { public: QWebHitTestResult(); QWebHitTestResult(const QWebHitTestResult &other); @@ -102,17 +101,18 @@ private: friend class QWebPage; }; -class QWEBKIT_EXPORT QWebFrame : public QObject -{ +class QWEBKIT_EXPORT QWebFrame : public QObject { Q_OBJECT Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false) Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor) Q_PROPERTY(QString title READ title) Q_PROPERTY(QUrl url READ url WRITE setUrl) + Q_PROPERTY(QUrl requestedUrl READ requestedUrl) Q_PROPERTY(QUrl baseUrl READ baseUrl) Q_PROPERTY(QIcon icon READ icon) Q_PROPERTY(QSize contentsSize READ contentsSize) Q_PROPERTY(QPoint scrollPosition READ scrollPosition WRITE setScrollPosition) + Q_PROPERTY(bool clipRenderToViewport READ clipRenderToViewport WRITE setClipRenderToViewport) Q_PROPERTY(bool focus READ hasFocus) private: QWebFrame(QWebPage *parent, QWebFrameData *frameData); @@ -142,6 +142,7 @@ public: QString title() const; void setUrl(const QUrl &url); QUrl url() const; + QUrl requestedUrl() const; QUrl baseUrl() const; QIcon icon() const; QMultiMap<QString, QString> metaData() const; @@ -166,7 +167,8 @@ public: void render(QPainter *painter, const QRegion &clip); void render(QPainter *painter); - void renderContents(QPainter *painter, const QRegion &contents); + bool clipRenderToViewport() const; + void setClipRenderToViewport(bool clipRenderToViewport); void setTextSizeMultiplier(qreal factor); qreal textSizeMultiplier() const; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h index 2b5c1873e5..d6afc01bcd 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h @@ -31,8 +31,7 @@ #include "wtf/RefPtr.h" #include "Frame.h" -namespace WebCore -{ +namespace WebCore { class FrameLoaderClientQt; class FrameView; class HTMLFrameOwnerElement; @@ -40,8 +39,7 @@ namespace WebCore } class QWebPage; -class QWebFrameData -{ +class QWebFrameData { public: QWebFrameData(WebCore::Page*, WebCore::Frame* parentFrame = 0, WebCore::HTMLFrameOwnerElement* = 0, @@ -60,8 +58,7 @@ public: int marginHeight; }; -class QWebFramePrivate -{ +class QWebFramePrivate { public: QWebFramePrivate() : q(0) @@ -73,6 +70,7 @@ public: , allowsScrolling(true) , marginWidth(-1) , marginHeight(-1) + , clipRenderToViewport(true) {} void init(QWebFrame* qframe, QWebFrameData* frameData); @@ -82,12 +80,12 @@ public: WebCore::Scrollbar* verticalScrollBar() const; Qt::ScrollBarPolicy horizontalScrollBarPolicy; - Qt::ScrollBarPolicy verticalScrollBarPolicy; + Qt::ScrollBarPolicy verticalScrollBarPolicy; static WebCore::Frame* core(QWebFrame*); static QWebFrame* kit(WebCore::Frame*); - void renderPrivate(QPainter *painter, const QRegion &clip, bool contents = false); + void renderPrivate(QPainter *painter, const QRegion &clip); QWebFrame *q; WebCore::FrameLoaderClientQt *frameLoaderClient; @@ -97,10 +95,10 @@ public: bool allowsScrolling; int marginWidth; int marginHeight; + bool clipRenderToViewport; }; -class QWebHitTestResultPrivate -{ +class QWebHitTestResultPrivate { public: QWebHitTestResultPrivate() : isContentEditable(false), isContentSelected(false), isScrollBar(false) {} QWebHitTestResultPrivate(const WebCore::HitTestResult &hitTest); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp index 7cdc00e112..1c1c72a360 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp @@ -32,7 +32,6 @@ /*! \class QWebHistoryItem - \ingroup explicitly-shared \since 4.4 \brief The QWebHistoryItem class represents one item in the history of a QWebPage @@ -52,13 +51,17 @@ \row \o userData() \o The user specific data that was stored with the history item. \endtable - \note QWebHistoryItem objects are value based and \l{explicitly shared}. + \note QWebHistoryItem objects are value based, but \e{explicitly shared}. Changing + a QWebHistoryItem instance by calling setUserData() will change all copies of that + instance. \sa QWebHistory, QWebPage::history(), QWebHistoryInterface */ /*! - Constructs a history item from \a other. + Constructs a history item from \a other. The new item and \a other + will share their data, and modifying either this item or \a other will + modify both instances. */ QWebHistoryItem::QWebHistoryItem(const QWebHistoryItem &other) : d(other.d) @@ -66,7 +69,9 @@ QWebHistoryItem::QWebHistoryItem(const QWebHistoryItem &other) } /*! - Assigns the \a other history item to this. + Assigns the \a other history item to this. This item and \a other + will share their data, and modifying either this item or \a other will + modify both instances. */ QWebHistoryItem &QWebHistoryItem::operator=(const QWebHistoryItem &other) { @@ -163,6 +168,8 @@ QVariant QWebHistoryItem::userData() const \since 4.5 Stores user specific data \a userData with the history item. + + \note All copies of this item will be modified. \sa userData() */ @@ -239,7 +246,7 @@ void QWebHistory::clear() { RefPtr<WebCore::HistoryItem> current = d->lst->currentItem(); int capacity = d->lst->capacity(); - d->lst->setCapacity(0); + d->lst->setCapacity(0); WebCore::Page* page = d->lst->page(); if (page && page->groupPtr()) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.h index 1a048f4e48..e46f124c05 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.h @@ -35,8 +35,8 @@ namespace WebCore { } class QWebHistoryItemPrivate; -class QWEBKIT_EXPORT QWebHistoryItem -{ + +class QWEBKIT_EXPORT QWebHistoryItem { public: QWebHistoryItem(const QWebHistoryItem &other); QWebHistoryItem &operator=(const QWebHistoryItem &other); @@ -74,18 +74,17 @@ private: class QWebHistoryPrivate; -class QWEBKIT_EXPORT QWebHistory -{ +class QWEBKIT_EXPORT QWebHistory { public: enum HistoryStateVersion { HistoryVersion_1, /*, HistoryVersion_2, */ DefaultHistoryVersion = HistoryVersion_1 }; - + bool restoreState(const QByteArray& buffer); QByteArray saveState(HistoryStateVersion version = DefaultHistoryVersion) const; - + void clear(); QList<QWebHistoryItem> items() const; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory_p.h index 4bee62bb8a..e77adefc2f 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory_p.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory_p.h @@ -25,8 +25,7 @@ #include <QtCore/qglobal.h> #include <QtCore/qshareddata.h> -class Q_AUTOTEST_EXPORT QWebHistoryItemPrivate : public QSharedData -{ +class Q_AUTOTEST_EXPORT QWebHistoryItemPrivate : public QSharedData { public: static QExplicitlySharedDataPointer<QWebHistoryItemPrivate> get(QWebHistoryItem *q) { @@ -65,8 +64,7 @@ public: WebCore::HistoryItem *item; }; -class QWebHistoryPrivate : public QSharedData -{ +class QWebHistoryPrivate : public QSharedData { public: QWebHistoryPrivate(WebCore::BackForwardList *l) { diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp index 88a1aa38c6..87d52cecdc 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp @@ -28,13 +28,13 @@ #include "PlatformString.h" -static QWebHistoryInterface *default_interface; +static QWebHistoryInterface* default_interface; static bool gRoutineAdded; static void gCleanupInterface() { - if (default_interface && default_interface->parent() == 0) + if (default_interface && !default_interface->parent()) delete default_interface; default_interface = 0; } @@ -47,11 +47,12 @@ static void gCleanupInterface() When the application exists QWebHistoryInterface will automatically delete the \a defaultInterface if it does not have a parent. */ -void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface *defaultInterface) +void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface* defaultInterface) { if (default_interface == defaultInterface) return; - if (default_interface && default_interface->parent() == 0) + + if (default_interface && !default_interface->parent()) delete default_interface; default_interface = defaultInterface; @@ -70,7 +71,7 @@ void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface *defaultInte Returns the default interface that will be used by WebKit. If no default interface has been set, QtWebkit will not track history. */ -QWebHistoryInterface *QWebHistoryInterface::defaultInterface() +QWebHistoryInterface* QWebHistoryInterface::defaultInterface() { return default_interface; } @@ -91,7 +92,8 @@ QWebHistoryInterface *QWebHistoryInterface::defaultInterface() /*! Constructs a new QWebHistoryInterface with parent \a parent. */ -QWebHistoryInterface::QWebHistoryInterface(QObject *parent) : QObject(parent) +QWebHistoryInterface::QWebHistoryInterface(QObject* parent) + : QObject(parent) { } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.h index 670fca0261..a49c58684d 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.h @@ -26,8 +26,7 @@ #include "qwebkitglobal.h" -class QWEBKIT_EXPORT QWebHistoryInterface : public QObject -{ +class QWEBKIT_EXPORT QWebHistoryInterface : public QObject { Q_OBJECT public: QWebHistoryInterface(QObject *parent = 0); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index 3c2151b37a..1a45fe69c2 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -59,6 +59,7 @@ #include "Scrollbar.h" #include "PlatformKeyboardEvent.h" #include "PlatformWheelEvent.h" +#include "PluginDatabase.h" #include "ProgressTracker.h" #include "RefPtr.h" #include "HashMap.h" @@ -99,6 +100,18 @@ using namespace WebCore; +void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories() +{ + PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false); + + Vector<String> paths; + String qtPath(getenv("QTWEBKIT_PLUGIN_PATH")); + qtPath.split(UChar(':'), /* allowEmptyEntries */ false, paths); + + db->setPluginDirectories(paths); + db->refresh(); +} + bool QWebPagePrivate::drtRun = false; void QWEBKIT_EXPORT qt_drt_run(bool b) { @@ -116,29 +129,29 @@ QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page) } // Lookup table mapping QWebPage::WebActions to the associated Editor commands -static const char* editorCommandWebActions[] = +static const char* editorCommandWebActions[] = { 0, // OpenLink, 0, // OpenLinkInNewWindow, 0, // OpenFrameInNewWindow, - + 0, // DownloadLinkToDisk, 0, // CopyLinkToClipboard, - + 0, // OpenImageInNewWindow, 0, // DownloadImageToDisk, 0, // CopyImageToClipboard, - + 0, // Back, 0, // Forward, 0, // Stop, 0, // Reload, - + "Cut", // Cut, "Copy", // Copy, "Paste", // Paste, - + "Undo", // Undo, "Redo", // Redo, "MoveForward", // MoveToNextChar, @@ -167,21 +180,22 @@ static const char* editorCommandWebActions[] = "MoveToEndOfDocumentAndModifySelection", // SelectEndOfDocument, "DeleteWordBackward", // DeleteStartOfWord, "DeleteWordForward", // DeleteEndOfWord, - + 0, // SetTextDirectionDefault, 0, // SetTextDirectionLeftToRight, 0, // SetTextDirectionRightToLeft, - + "ToggleBold", // ToggleBold, "ToggleItalic", // ToggleItalic, "ToggleUnderline", // ToggleUnderline, - + 0, // InspectElement, "InsertNewline", // InsertParagraphSeparator "InsertLineBreak", // InsertLineSeparator "SelectAll", // SelectAll + 0, // ReloadAndBypassCache, "PasteAndMatchStyle", // PasteAndMatchStyle "RemoveFormat", // RemoveFormat @@ -206,7 +220,6 @@ const char* QWebPagePrivate::editorCommandForWebActions(QWebPage::WebAction acti { if ((action > QWebPage::NoWebAction) && (action < int(sizeof(editorCommandWebActions) / sizeof(const char*)))) return editorCommandWebActions[action]; - return 0; } @@ -252,7 +265,7 @@ static inline Qt::DropAction dragOpToDropAction(unsigned actions) QWebPagePrivate::QWebPagePrivate(QWebPage *qq) : q(qq) , view(0) - , viewportSize(QSize(0,0)) + , viewportSize(QSize(0, 0)) { WebCore::InitializeLoggingChannelsIfNecessary(); JSC::initializeThreading(); @@ -405,9 +418,8 @@ QMenu *QWebPagePrivate::createContextMenu(const WebCore::ContextMenu *webcoreMen if (anyEnabledAction) { subMenu->setTitle(item.title()); menu->addAction(subMenu->menuAction()); - } else { + } else delete subMenu; - } break; } } @@ -456,6 +468,7 @@ void QWebPagePrivate::updateAction(QWebPage::WebAction action) enabled = loader->isLoading(); break; case QWebPage::Reload: + case QWebPage::ReloadAndBypassCache: enabled = !loader->isLoading(); break; #ifndef QT_NO_UNDOSTACK @@ -501,6 +514,7 @@ void QWebPagePrivate::updateNavigationActions() updateAction(QWebPage::Forward); updateAction(QWebPage::Stop); updateAction(QWebPage::Reload); + updateAction(QWebPage::ReloadAndBypassCache); } void QWebPagePrivate::updateEditorActions() @@ -647,12 +661,12 @@ void QWebPagePrivate::mouseReleaseEvent(QMouseEvent *ev) Pasteboard::generalPasteboard()->setSelectionMode(true); WebCore::Frame* focusFrame = page->focusController()->focusedOrMainFrame(); if (ev->button() == Qt::LeftButton) { - if(focusFrame && (focusFrame->editor()->canCopy() || focusFrame->editor()->canDHTMLCopy())) { + if (focusFrame && (focusFrame->editor()->canCopy() || focusFrame->editor()->canDHTMLCopy())) { focusFrame->editor()->copy(); ev->setAccepted(true); } } else if (ev->button() == Qt::MidButton) { - if(focusFrame && (focusFrame->editor()->canPaste() || focusFrame->editor()->canDHTMLPaste())) { + if (focusFrame && (focusFrame->editor()->canPaste() || focusFrame->editor()->canDHTMLPaste())) { focusFrame->editor()->paste(); ev->setAccepted(true); } @@ -822,11 +836,10 @@ void QWebPagePrivate::focusInEvent(QFocusEvent *ev) FocusController *focusController = page->focusController(); Frame *frame = focusController->focusedFrame(); focusController->setActive(true); - if (frame) { + if (frame) focusController->setFocused(true); - } else { + else focusController->setFocusedFrame(QWebFramePrivate::core(mainFrame)); - } } void QWebPagePrivate::focusOutEvent(QFocusEvent *ev) @@ -932,7 +945,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) QString preedit = ev->preeditString(); // ### FIXME: use the provided QTextCharFormat (use color at least) Vector<CompositionUnderline> underlines; - underlines.append(CompositionUnderline(0, preedit.length(), Color(0,0,0), false)); + underlines.append(CompositionUnderline(0, preedit.length(), Color(0, 0, 0), false)); editor->setComposition(preedit, underlines, preedit.length(), 0); } ev->accept(); @@ -968,9 +981,8 @@ void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event) } } #ifndef QT_NO_SHORTCUT - else if (editorActionForKeyEvent(event) != QWebPage::NoWebAction) { + else if (editorActionForKeyEvent(event) != QWebPage::NoWebAction) event->accept(); - } #endif } } @@ -1036,12 +1048,11 @@ bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame) */ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const { - switch(property) { + switch (property) { case Qt::ImMicroFocus: { Frame *frame = d->page->focusController()->focusedFrame(); - if (frame) { + if (frame) return QVariant(frame->selection()->absoluteCaretBounds()); - } return QVariant(); } case Qt::ImFont: { @@ -1054,9 +1065,8 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const Frame *frame = d->page->focusController()->focusedFrame(); if (frame) { VisibleSelection selection = frame->selection()->selection(); - if (selection.isCaret()) { + if (selection.isCaret()) return QVariant(selection.start().deprecatedEditingOffset()); - } } return QVariant(); } @@ -1064,9 +1074,8 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const Frame *frame = d->page->focusController()->focusedFrame(); if (frame) { Document *document = frame->document(); - if (document->focusedNode()) { + if (document->focusedNode()) return QVariant(document->focusedNode()->nodeValue()); - } } return QVariant(); } @@ -1142,6 +1151,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const \value Forward Navigate forward in the history of navigated links. \value Stop Stop loading the current page. \value Reload Reload the current page. + \value ReloadAndBypassCache Reload the current page, but do not use any local cache. (Added in Qt 4.6) \value Cut Cut the content currently selected into the clipboard. \value Copy Copy the content currently selected into the clipboard. \value Paste Paste content from the clipboard. @@ -1415,9 +1425,8 @@ bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QStr bool ok = false; #ifndef QT_NO_INPUTDIALOG QString x = QInputDialog::getText(d->view, tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok); - if (ok && result) { + if (ok && result) *result = x; - } #endif return ok; } @@ -1568,7 +1577,10 @@ void QWebPage::triggerAction(WebAction action, bool checked) mainFrame()->d->frame->loader()->stopForUserCancel(); break; case Reload: - mainFrame()->d->frame->loader()->reload(); + mainFrame()->d->frame->loader()->reload(/*endtoendreload*/false); + break; + case ReloadAndBypassCache: + mainFrame()->d->frame->loader()->reload(/*endtoendreload*/true); break; case SetTextDirectionDefault: editor->setBaseWritingDirection(NaturalWritingDirection); @@ -1630,9 +1642,8 @@ QSize QWebPage::fixedContentsSize() const QWebFrame* frame = d->mainFrame; if (frame) { WebCore::FrameView* view = frame->d->frame->view(); - if (view && view->useFixedLayout()) { + if (view && view->useFixedLayout()) return d->mainFrame->d->frame->view()->fixedLayoutSize(); - } } return d->fixedLayoutSize; @@ -2140,9 +2151,8 @@ void QWebPage::setContentEditable(bool editable) frame->applyEditingStyleToBodyElement(); // FIXME: mac port calls this if there is no selectedDOMRange //frame->setSelectionFromNone(); - } else { + } else frame->removeEditingStyleFromBodyElement(); - } } d->updateEditorActions(); @@ -2210,9 +2220,8 @@ bool QWebPage::swallowContextMenuEvent(QContextMenuEvent *event) if (QWebFrame* webFrame = frameAt(event->pos())) { Frame* frame = QWebFramePrivate::core(webFrame); - if (Scrollbar* scrollbar = frame->view()->scrollbarAtPoint(PlatformMouseEvent(event, 1).pos())) { + if (Scrollbar* scrollbar = frame->view()->scrollbarAtPoint(PlatformMouseEvent(event, 1).pos())) return scrollbar->contextMenu(PlatformMouseEvent(event, 1)); - } } WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame(); @@ -2267,9 +2276,8 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) originallyEnabledWebActions &= ~visitedWebActions; // Mask out visited actions (they're part of the menu) for (int i = 0; i < QWebPage::WebActionCount; ++i) { if (originallyEnabledWebActions.at(i)) { - if (QAction *a = this->action(QWebPage::WebAction(i))) { + if (QAction *a = this->action(QWebPage::WebAction(i))) a->setEnabled(true); - } } } @@ -2392,9 +2400,8 @@ bool QWebPage::findText(const QString &subString, FindFlags options) if (subString.isEmpty()) { d->page->unmarkAllTextMatches(); return true; - } else { + } else return d->page->markAllMatchesForText(subString, caseSensitivity, true, 0); - } } else { ::FindDirection direction = ::FindDirectionForward; if (options & FindBackward) @@ -2635,7 +2642,7 @@ QString QWebPage::userAgentForUrl(const QUrl& url) const #if defined Q_OS_WIN32 QString ver; - switch(QSysInfo::WindowsVersion) { + switch (QSysInfo::WindowsVersion) { case QSysInfo::WV_32s: ver = "Windows 3.1"; break; @@ -2709,7 +2716,8 @@ QString QWebPage::userAgentForUrl(const QUrl& url) const } -void QWebPagePrivate::_q_onLoadProgressChanged(int) { +void QWebPagePrivate::_q_onLoadProgressChanged(int) +{ m_totalBytes = page->progress()->totalPageAndResourceBytesToLoad(); m_bytesReceived = page->progress()->totalBytesReceived(); } @@ -2721,7 +2729,8 @@ void QWebPagePrivate::_q_onLoadProgressChanged(int) { \sa bytesReceived() */ -quint64 QWebPage::totalBytes() const { +quint64 QWebPage::totalBytes() const +{ return d->m_totalBytes; } @@ -2731,7 +2740,8 @@ quint64 QWebPage::totalBytes() const { \sa totalBytes() */ -quint64 QWebPage::bytesReceived() const { +quint64 QWebPage::bytesReceived() const +{ return d->m_bytesReceived; } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h index 517a77c617..24741a1654 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h @@ -59,8 +59,7 @@ namespace WebCore { struct FrameLoadRequest; } -class QWEBKIT_EXPORT QWebPage : public QObject -{ +class QWEBKIT_EXPORT QWebPage : public QObject { Q_OBJECT Q_PROPERTY(bool modified READ isModified) @@ -149,6 +148,7 @@ public: InsertLineSeparator, SelectAll, + ReloadAndBypassCache, PasteAndMatchStyle, RemoveFormat, diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h index 3a3a674b9a..87c624d6e1 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h @@ -35,8 +35,7 @@ #include <wtf/RefPtr.h> -namespace WebCore -{ +namespace WebCore { class ChromeClientQt; class ContextMenuClientQt; class ContextMenuItem; @@ -66,14 +65,13 @@ class QMenu; class QBitArray; QT_END_NAMESPACE -class QWebPagePrivate -{ +class QWebPagePrivate { public: - QWebPagePrivate(QWebPage *); + QWebPagePrivate(QWebPage*); ~QWebPagePrivate(); void createMainFrame(); #ifndef QT_NO_CONTEXTMENU - QMenu *createContextMenu(const WebCore::ContextMenu *webcoreMenu, const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions); + QMenu* createContextMenu(const WebCore::ContextMenu* webcoreMenu, const QList<WebCore::ContextMenuItem>* items, QBitArray* visitedWebActions); #endif void _q_onLoadProgressChanged(int); void _q_webActionTriggered(bool checked); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.h index 3531b06f05..cff774d60f 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.h @@ -31,8 +31,7 @@ class QString; QT_END_NAMESPACE class QWebPluginFactoryPrivate; -class QWEBKIT_EXPORT QWebPluginFactory : public QObject -{ +class QWEBKIT_EXPORT QWebPluginFactory : public QObject { Q_OBJECT public: struct MimeType { @@ -47,16 +46,16 @@ public: QList<MimeType> mimeTypes; }; - explicit QWebPluginFactory(QObject *parent = 0); + explicit QWebPluginFactory(QObject* parent = 0); virtual ~QWebPluginFactory(); virtual QList<Plugin> plugins() const = 0; virtual void refreshPlugins(); - virtual QObject *create(const QString &mimeType, - const QUrl &url, - const QStringList &argumentNames, - const QStringList &argumentValues) const = 0; + virtual QObject *create(const QString& mimeType, + const QUrl&, + const QStringList& argumentNames, + const QStringList& argumentValues) const = 0; enum Extension { }; @@ -64,11 +63,11 @@ public: {}; class ExtensionReturn {}; - virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0); + virtual bool extension(Extension extension, const ExtensionOption* option = 0, ExtensionReturn* output = 0); virtual bool supportsExtension(Extension extension) const; private: - QWebPluginFactoryPrivate *d; + QWebPluginFactoryPrivate* d; }; #endif diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.h index b52194d74e..3cfb0f49c3 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.h @@ -34,8 +34,7 @@ class QWebSecurityOriginPrivate; class QWebDatabase; class QWebFrame; -class QWEBKIT_EXPORT QWebSecurityOrigin -{ +class QWEBKIT_EXPORT QWebSecurityOrigin { public: static QList<QWebSecurityOrigin> allOrigins(); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin_p.h index 73fe8ed245..cdc93bd141 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin_p.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin_p.h @@ -23,8 +23,7 @@ #include "SecurityOrigin.h" #include "RefPtr.h" -class QWebSecurityOriginPrivate : public QSharedData -{ +class QWebSecurityOriginPrivate : public QSharedData { public: QWebSecurityOriginPrivate(WebCore::SecurityOrigin* o) { diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp index 02ef4a0980..fb94d55b10 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp @@ -42,10 +42,9 @@ #include <QUrl> #include <QFileInfo> -class QWebSettingsPrivate -{ +class QWebSettingsPrivate { public: - QWebSettingsPrivate(WebCore::Settings *wcSettings = 0) + QWebSettingsPrivate(WebCore::Settings* wcSettings = 0) : settings(wcSettings) { } @@ -60,7 +59,7 @@ public: qint64 offlineStorageDefaultQuota; void apply(); - WebCore::Settings *settings; + WebCore::Settings* settings; }; typedef QHash<int, QPixmap> WebGraphicHash; @@ -80,14 +79,14 @@ static WebGraphicHash* graphics() return hash; } -Q_GLOBAL_STATIC(QList<QWebSettingsPrivate *>, allSettings); +Q_GLOBAL_STATIC(QList<QWebSettingsPrivate*>, allSettings); void QWebSettingsPrivate::apply() { if (settings) { settings->setTextAreasAreResizable(true); - QWebSettingsPrivate *global = QWebSettings::globalSettings()->d; + QWebSettingsPrivate* global = QWebSettings::globalSettings()->d; QString family = fontFamilies.value(QWebSettings::StandardFont, global->fontFamilies.value(QWebSettings::StandardFont)); @@ -194,7 +193,7 @@ void QWebSettingsPrivate::apply() global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls)); settings->setAllowUniversalAccessFromFileURLs(value); } else { - QList<QWebSettingsPrivate *> settings = *::allSettings(); + QList<QWebSettingsPrivate*> settings = *::allSettings(); for (int i = 0; i < settings.count(); ++i) settings[i]->apply(); } @@ -206,9 +205,9 @@ void QWebSettingsPrivate::apply() Any setting changed on the default object is automatically applied to all QWebPage instances where the particular setting is not overriden already. */ -QWebSettings *QWebSettings::globalSettings() +QWebSettings* QWebSettings::globalSettings() { - static QWebSettings *global = 0; + static QWebSettings* global = 0; if (!global) global = new QWebSettings; return global; @@ -365,7 +364,7 @@ QWebSettings::QWebSettings() /*! \internal */ -QWebSettings::QWebSettings(WebCore::Settings *settings) +QWebSettings::QWebSettings(WebCore::Settings* settings) : d(new QWebSettingsPrivate(settings)) { d->settings = settings; @@ -400,7 +399,7 @@ int QWebSettings::fontSize(FontSize type) const { int defaultValue = 0; if (d->settings) { - QWebSettingsPrivate *global = QWebSettings::globalSettings()->d; + QWebSettingsPrivate* global = QWebSettings::globalSettings()->d; defaultValue = global->fontSizes.value(type); } return d->fontSizes.value(type, defaultValue); @@ -427,7 +426,7 @@ void QWebSettings::resetFontSize(FontSize type) \sa userStyleSheetUrl() */ -void QWebSettings::setUserStyleSheetUrl(const QUrl &location) +void QWebSettings::setUserStyleSheetUrl(const QUrl& location) { d->userStyleSheetLocation = location; d->apply(); @@ -453,7 +452,7 @@ QUrl QWebSettings::userStyleSheetUrl() const \sa defaultTextEncoding() */ -void QWebSettings::setDefaultTextEncoding(const QString &encoding) +void QWebSettings::setDefaultTextEncoding(const QString& encoding) { d->defaultTextEncoding = encoding; d->apply(); @@ -478,7 +477,7 @@ QString QWebSettings::defaultTextEncoding() const Setting an empty path disables the icon database. */ -void QWebSettings::setIconDatabasePath(const QString &path) +void QWebSettings::setIconDatabasePath(const QString& path) { WebCore::iconDatabase()->delayDatabaseCleanup(); @@ -501,11 +500,10 @@ void QWebSettings::setIconDatabasePath(const QString &path) */ QString QWebSettings::iconDatabasePath() { - if (WebCore::iconDatabase()->isEnabled() && WebCore::iconDatabase()->isOpen()) { + if (WebCore::iconDatabase()->isEnabled() && WebCore::iconDatabase()->isOpen()) return WebCore::iconDatabase()->databasePath(); - } else { + else return QString(); - } } /*! @@ -527,18 +525,18 @@ void QWebSettings::clearIconDatabase() \sa setIconDatabasePath() */ -QIcon QWebSettings::iconForUrl(const QUrl &url) +QIcon QWebSettings::iconForUrl(const QUrl& url) { WebCore::Image* image = WebCore::iconDatabase()->iconForPageURL(WebCore::KURL(url).string(), WebCore::IntSize(16, 16)); - if (!image) { + if (!image) return QPixmap(); - } - QPixmap *icon = image->nativeImageForCurrentFrame(); - if (!icon) { + + QPixmap* icon = image->nativeImageForCurrentFrame(); + if (!icon) return QPixmap(); - } - return *icon; + + return* icon; } /*! @@ -550,9 +548,9 @@ QIcon QWebSettings::iconForUrl(const QUrl &url) \sa webGraphic() */ -void QWebSettings::setWebGraphic(WebGraphic type, const QPixmap &graphic) +void QWebSettings::setWebGraphic(WebGraphic type, const QPixmap& graphic) { - WebGraphicHash *h = graphics(); + WebGraphicHash* h = graphics(); if (graphic.isNull()) h->remove(type); else @@ -641,7 +639,7 @@ int QWebSettings::maximumPagesInCache() */ void QWebSettings::setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity) { - bool disableCache = cacheMinDeadCapacity == 0 && cacheMaxDead == 0 && totalCapacity == 0; + bool disableCache = !cacheMinDeadCapacity && !cacheMaxDead && !totalCapacity; WebCore::cache()->setDisabled(disableCache); WebCore::cache()->setCapacities(qMax(0, cacheMinDeadCapacity), @@ -653,7 +651,7 @@ void QWebSettings::setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheM Sets the actual font family to \a family for the specified generic family, \a which. */ -void QWebSettings::setFontFamily(FontFamily which, const QString &family) +void QWebSettings::setFontFamily(FontFamily which, const QString& family) { d->fontFamilies.insert(which, family); d->apply(); @@ -667,7 +665,7 @@ QString QWebSettings::fontFamily(FontFamily which) const { QString defaultValue; if (d->settings) { - QWebSettingsPrivate *global = QWebSettings::globalSettings()->d; + QWebSettingsPrivate* global = QWebSettings::globalSettings()->d; defaultValue = global->fontFamilies.value(which); } return d->fontFamilies.value(which, defaultValue); @@ -708,7 +706,7 @@ bool QWebSettings::testAttribute(WebAttribute attr) const { bool defaultValue = false; if (d->settings) { - QWebSettingsPrivate *global = QWebSettings::globalSettings()->d; + QWebSettingsPrivate* global = QWebSettings::globalSettings()->d; defaultValue = global->attributes.value(attr); } return d->attributes.value(attr, defaultValue); @@ -789,7 +787,7 @@ qint64 QWebSettings::offlineStorageDefaultQuota() /* \internal \relates QWebSettings - + Sets the path for HTML5 offline web application cache storage to \a path. \a path must point to an existing directory where the cache is stored. @@ -808,7 +806,7 @@ void QWEBKIT_EXPORT qt_websettings_setOfflineWebApplicationCachePath(const QStri /* \internal \relates QWebSettings - + Returns the path of the HTML5 offline web application cache storage or an empty string if the feature is disabled. @@ -837,7 +835,7 @@ QString QWEBKIT_EXPORT qt_websettings_offlineWebApplicationCachePath() */ void QWEBKIT_EXPORT qt_websettings_setLocalStorageDatabasePath(QWebSettings* settings, const QString& path) { - QWebSettingsPrivate *d = settings->handle(); + QWebSettingsPrivate* d = settings->handle(); d->localStorageDatabasePath = path; d->apply(); } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h index 7cbca2558f..63144cb403 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h @@ -27,8 +27,7 @@ #include <QtGui/qicon.h> #include <QtCore/qshareddata.h> -namespace WebCore -{ +namespace WebCore { class Settings; } @@ -38,8 +37,7 @@ QT_BEGIN_NAMESPACE class QUrl; QT_END_NAMESPACE -class QWEBKIT_EXPORT QWebSettings -{ +class QWEBKIT_EXPORT QWebSettings { public: enum FontFamily { StandardFont, diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 6c5860cfe8..e1a0c98cba 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -30,8 +30,7 @@ #include "qdir.h" #include "qfile.h" -class QWebViewPrivate -{ +class QWebViewPrivate { public: QWebViewPrivate(QWebView *view) : view(view) @@ -87,7 +86,7 @@ public: \image qwebview-url.png A web site can be loaded onto QWebView with the load() function. Like all - Qt Widgets, the show() function must be invoked in order to display + Qt widgets, the show() function must be invoked in order to display QWebView. The snippet below illustrates this: \snippet webkitsnippets/simple/main.cpp Using QWebView @@ -147,7 +146,8 @@ public: if you do not require QWidget attributes. Nevertheless, QtWebKit depends on QtGui, so you should use a QApplication instead of QCoreApplication. - \sa {Previewer Example}, {Browser} + \sa {Previewer Example}, {Web Browser}, {Form Extractor Example}, + {Google Chat Example}, {Fancy Browser Example} */ /*! @@ -206,16 +206,15 @@ QWebPage *QWebView::page() const \sa page() */ -void QWebView::setPage(QWebPage *page) +void QWebView::setPage(QWebPage* page) { if (d->page == page) return; if (d->page) { - if (d->page->parent() == this) { + if (d->page->parent() == this) delete d->page; - } else { + else d->page->disconnect(this); - } } d->page = page; if (d->page) { @@ -710,9 +709,8 @@ bool QWebView::event(QEvent *e) } #endif #endif - } else if (e->type() == QEvent::Leave) { + } else if (e->type() == QEvent::Leave) d->page->event(e); - } } return QWidget::event(e); @@ -815,7 +813,7 @@ void QWebView::paintEvent(QPaintEvent *ev) #ifdef QWEBKIT_TIME_RENDERING int elapsed = time.elapsed(); - qDebug()<<"paint event on "<<ev->region()<<", took to render = "<<elapsed; + qDebug() << "paint event on " << ev->region() << ", took to render = " << elapsed; #endif } @@ -1011,9 +1009,8 @@ void QWebView::inputMethodEvent(QInputMethodEvent *e) */ void QWebView::changeEvent(QEvent *e) { - if (d->page && e->type() == QEvent::PaletteChange) { + if (d->page && e->type() == QEvent::PaletteChange) d->page->setPalette(palette()); - } QWidget::changeEvent(e); } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h index 0dab925462..e8861444d5 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h @@ -40,8 +40,7 @@ class QWebPage; class QWebViewPrivate; class QWebNetworkRequest; -class QWEBKIT_EXPORT QWebView : public QWidget -{ +class QWEBKIT_EXPORT QWebView : public QWidget { Q_OBJECT Q_PROPERTY(QString title READ title) Q_PROPERTY(QUrl url READ url WRITE setUrl) @@ -54,27 +53,27 @@ class QWEBKIT_EXPORT QWebView : public QWidget Q_PROPERTY(QPainter::RenderHints renderHints READ renderHints WRITE setRenderHints) Q_FLAGS(QPainter::RenderHints) public: - explicit QWebView(QWidget *parent = 0); + explicit QWebView(QWidget* parent = 0); virtual ~QWebView(); - QWebPage *page() const; - void setPage(QWebPage *page); + QWebPage* page() const; + void setPage(QWebPage* page); - static QUrl guessUrlFromString(const QString &string); + static QUrl guessUrlFromString(const QString& string); - void load(const QUrl &url); + void load(const QUrl& url); #if QT_VERSION < 0x040400 && !defined(qdoc) - void load(const QWebNetworkRequest &request); + void load(const QWebNetworkRequest& request); #else - void load(const QNetworkRequest &request, + void load(const QNetworkRequest& request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray &body = QByteArray()); #endif - void setHtml(const QString &html, const QUrl &baseUrl = QUrl()); - void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl()); + void setHtml(const QString& html, const QUrl& baseUrl = QUrl()); + void setContent(const QByteArray& data, const QString& mimeType = QString(), const QUrl& baseUrl = QUrl()); - QWebHistory *history() const; - QWebSettings *settings() const; + QWebHistory* history() const; + QWebSettings* settings() const; QString title() const; void setUrl(const QUrl &url); @@ -83,7 +82,7 @@ public: QString selectedText() const; - QAction *pageAction(QWebPage::WebAction action) const; + QAction* pageAction(QWebPage::WebAction action) const; void triggerPageAction(QWebPage::WebAction action, bool checked = false); bool isModified() const; @@ -108,9 +107,9 @@ public: void setRenderHints(QPainter::RenderHints hints); void setRenderHint(QPainter::RenderHint hint, bool enabled = true); - bool findText(const QString &subString, QWebPage::FindFlags options = 0); + bool findText(const QString& subString, QWebPage::FindFlags options = 0); - virtual bool event(QEvent *); + virtual bool event(QEvent*); public Q_SLOTS: void stop(); @@ -118,7 +117,7 @@ public Q_SLOTS: void forward(); void reload(); - void print(QPrinter *printer) const; + void print(QPrinter*) const; Q_SIGNALS: void loadStarted(); @@ -126,14 +125,14 @@ Q_SIGNALS: void loadFinished(bool); void titleChanged(const QString& title); void statusBarMessage(const QString& text); - void linkClicked(const QUrl &url); + void linkClicked(const QUrl&); void selectionChanged(); void iconChanged(); - void urlChanged(const QUrl &url); + void urlChanged(const QUrl&); protected: - void resizeEvent(QResizeEvent *e); - void paintEvent(QPaintEvent *ev); + void resizeEvent(QResizeEvent*); + void paintEvent(QPaintEvent*); virtual QWebView *createWindow(QWebPage::WebWindowType type); @@ -150,10 +149,10 @@ protected: #endif virtual void keyPressEvent(QKeyEvent*); virtual void keyReleaseEvent(QKeyEvent*); - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dragLeaveEvent(QDragLeaveEvent *); - virtual void dragMoveEvent(QDragMoveEvent *); - virtual void dropEvent(QDropEvent *); + virtual void dragEnterEvent(QDragEnterEvent*); + virtual void dragLeaveEvent(QDragLeaveEvent*); + virtual void dragMoveEvent(QDragMoveEvent*); + virtual void dropEvent(QDropEvent*); virtual void focusInEvent(QFocusEvent*); virtual void focusOutEvent(QFocusEvent*); virtual void inputMethodEvent(QInputMethodEvent*); @@ -162,7 +161,7 @@ protected: private: friend class QWebPage; - QWebViewPrivate *d; + QWebViewPrivate* d; }; #endif // QWEBVIEW_H diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 02aab770a1..83808d24b2 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,522 @@ +2009-07-28 Simon Hausmann <simon.hausmann@nokia.com> + + Rubber-stamped by Ariya Hidayat. + + Fix compilation with the precompiled header. + + * WebKit_pch.h: Don't include JSDOMBinding.h and MathObject.h, + as they include AtomicString.h. AtomicString.cpp needs to enable + a #define before including AtomicString.h, which breaks if the PCH + forces the inclusion beforehand. + +2009-07-28 Ariya Hidayat <ariya.hidayat@nokia.com> + + Reviewed by Simon Hausmann. + + Added tests to ensure that scroll position can be changed + programmatically, even when the scroll bar policy is set to off. + + * tests/qwebframe/tst_qwebframe.cpp: + +2009-07-28 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Fix a few compilation warnings in the QWebFrame tests. + + * tests/qwebframe/tst_qwebframe.cpp: + +2009-07-28 Andre Pedralho <andre.pedralho@openbossa.org> + + Reviewed by Simon Hausmann. + + Fixed tst_QWebFrame::hasSetFocus test which was using + an undefined resource. + https://bugs.webkit.org/show_bug.cgi?id=27512 + + * tests/qwebframe/tst_qwebframe.cpp: + +2009-07-28 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Ariya Hidayat. + + Make it possible to pass relative file names to QtLauncher. + + * QtLauncher/main.cpp: + (MainWindow::MainWindow): + +2009-07-27 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=27735 + Give a helpful name to JSLock constructor argument + + * Api/qwebframe.cpp: + (QWebFrame::addToJavaScriptWindowObject): + +2009-07-27 Volker Hilsheimer <volker.hilsheimer@nokia.com> + + Reviewed by Simon Hausmann. + + QWebView's "enabled" parameter should default to true, as with QGraphicsView and + QPainter. + + * Api/qwebview.cpp: Add reference to QPainter::renderHints(). + * Api/qwebview.h: Add default for enabled argument. + +2009-07-26 Kavindra Palaraja <kavindra.palaraja@nokia.com> + + Reviewed by Simon Hausmann. + + More documentation cleanups in the QWebElement class overview. + + * Api/qwebelement.cpp: + +2009-07-26 Kavindra Palaraja <kavindra.palaraja@nokia.com> + + Reviewed by Simon Hausmann. + + Clean up documentation of QWebElement's findFirst and findAll functions, + as well as their QWebFrame counterparts. + + * Api/qwebelement.cpp: + * Api/qwebframe.cpp: + +2009-07-26 Kavindra Palaraja <kavindra.palaraja@nokia.com> + + Reviewed by Simon Hausmann. + + Various documentation cleanups + + * Fixed qdoc warnings + * Hide QWebNetworkInterface from the class overview + * Mention QWebElement in the module overview + * More cleanups + + * Api/qwebframe.cpp: + * Api/qwebnetworkinterface.cpp: + * Api/qwebview.cpp: + * docs/qtwebkit.qdoc: + +2009-07-26 Kavindra Palaraja <kavindra.palaraja@nokia.com> + + Reviewed by Simon Hausmann. + + Added missing class diagram referenced from the docs, taken from the Qt + documentation. + + * docs/qtwebkit.qdocconf: Register the image directory with + qdoc. + * docs/qwebview-diagram.png: Added. + +2009-07-24 Antonio Gomes <antonio.gomes@openbossa.org> + + Reviewed by Adam Treat. + + As per discussion on IRC, changed originalUrl by requestedUrl. + + * Api/qwebframe.cpp: + (QWebFrame::requestedUrl): + * Api/qwebframe.h: + * tests/qwebframe/tst_qwebframe.cpp: + +2009-07-24 Andre Pedralho <andre.pedralho@openbossa.org> + + Reviewed by Adam Treat. + + Removed void QWebFrame::renderContents(...) and added the Q_PROPERTY + clipRenderToViewport to control whether QWebFrame::render would call + FrameView::paintContents rather than FrameView::paint and do not clip + the frame content to viewport. + + + * Api/qwebframe.cpp: + (QWebFramePrivate::renderPrivate): + (QWebFrame::clipRenderToViewport): + (QWebFrame::setClipRenderToViewport): + * Api/qwebframe.h: + * Api/qwebframe_p.h: + (QWebFramePrivate::QWebFramePrivate): + * tests/qwebframe/tst_qwebframe.cpp: + +2009-07-24 Antonio Gomes <antonio.gomes@openbossa.org> + + Reviewed by Simon Hausmann. + + [QT] Implement originalUrl getter method to the API + https://bugs.webkit.org/show_bug.cgi?id=25867 + + * Api/qwebframe.cpp: + (QWebFrame::originalUrl): + * Api/qwebframe.h: + * tests/qwebframe/qwebframe.qrc: + * tests/qwebframe/test1.html: Added. + * tests/qwebframe/test2.html: Added. + * tests/qwebframe/tst_qwebframe.cpp: + +2009-07-24 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Build fix for Qt. + + Fix build issue introduced in 46344 + ([Bug 22700] ApplicationCache should have size limit) + + Remove method only added to the Qt ChromeClient. + + * WebCoreSupport/ChromeClientQt.h: + +2009-07-24 Andrei Popescu <andreip@google.com> + + Reviewed by Anders Carlsson. + + ApplicationCache should have size limit + https://bugs.webkit.org/show_bug.cgi?id=22700 + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::reachedMaxAppCacheSize): + Adds empty implementation of the reachedMaxAppCacheSize callback. + * WebCoreSupport/ChromeClientQt.h: + +2009-07-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Add simple proxy support for QtLauncher + https://bugs.webkit.org/show_bug.cgi?id=27495 + + Picks up proxy settings from the http_proxy environment + variable. + + * QtLauncher/QtLauncher.pro: Add QtNetwork dependency for all + platforms. + * QtLauncher/main.cpp: + (MainWindow::MainWindow): + +2009-07-23 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Holger Freyther. + + Added a testcase to verify that cached methods in the QOBject bindings + remain alife even after garbage collection. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::protectBindingsRuntimeObjectsFromCollector): + +2009-07-23 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + + Reviewed by Simon Hausmann. + + Fixing two issues related to QtLauncher + - MainWindow objects are not always freed after close + - JavaScript window.close() sometimes crashes + https://bugs.webkit.org/show_bug.cgi?id=27601 + + * QtLauncher/main.cpp: + (MainWindow::MainWindow): + (main): + +2009-07-21 Volker Hilsheimer <volker.hilsheimer@nokia.com> + + Reviewed by Simon Hausmann. + + Various improvements to the API documentation. + + * Updated link to W3c Database spec + * Formatting fixes, cleanups + * Add missing \since 4.6 tags to QWebPage::frameAt + * Extend QWebDatabase and QWebSecurityOrigin docs. + + * Api/qwebdatabase.cpp: + * Api/qwebpage.cpp: + * Api/qwebsecurityorigin.cpp: + * Api/qwebview.cpp: + +2009-07-21 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Rubber-stamped by Simon Hausmann. + + Remove preliminary-tag from QWebElement + + * Api/qwebelement.cpp: + +2009-07-20 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Eric Seidel. + + Fix Qt code to follow the WebKit Coding Style. + + * Api/qcookiejar.cpp: + (QCookieJar::setCookieJar): + (QCookieJar::cookieJar): + * Api/qcookiejar.h: + * Api/qwebdatabase.cpp: + (QWebDatabase::QWebDatabase): + (QWebDatabase::removeDatabase): + * Api/qwebdatabase.h: + * Api/qwebdatabase_p.h: + * Api/qwebelement.h: + * Api/qwebframe.cpp: + (QWebFrame::title): + (QWebFrame::print): + * Api/qwebframe.h: + * Api/qwebframe_p.h: + * Api/qwebhistory.cpp: + (QWebHistory::clear): + * Api/qwebhistory.h: + * Api/qwebhistory_p.h: + * Api/qwebhistoryinterface.cpp: + (gCleanupInterface): + (QWebHistoryInterface::setDefaultInterface): + (QWebHistoryInterface::defaultInterface): + (QWebHistoryInterface::QWebHistoryInterface): + * Api/qwebhistoryinterface.h: + * Api/qwebnetworkinterface.cpp: + (QWebNetworkManager::started): + (QWebNetworkManager::finished): + (QWebNetworkInterfacePrivate::parseDataUrl): + (QWebNetworkInterface::addJob): + (WebCoreHttp::onResponseHeaderReceived): + (WebCoreHttp::onReadyRead): + * Api/qwebnetworkinterface.h: + * Api/qwebnetworkinterface_p.h: + * Api/qwebpage.cpp: + (QWebPagePrivate::editorCommandForWebActions): + (QWebPagePrivate::createContextMenu): + (QWebPagePrivate::focusInEvent): + (QWebPage::fixedContentsSize): + (QWebPage::setContentEditable): + (QWebPage::swallowContextMenuEvent): + (QWebPage::findText): + * Api/qwebpage.h: + * Api/qwebpage_p.h: + * Api/qwebpluginfactory.h: + * Api/qwebsecurityorigin.h: + * Api/qwebsecurityorigin_p.h: + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::QWebSettingsPrivate): + (QWebSettingsPrivate::apply): + (QWebSettings::globalSettings): + (QWebSettings::QWebSettings): + (QWebSettings::fontSize): + (QWebSettings::setUserStyleSheetUrl): + (QWebSettings::setDefaultTextEncoding): + (QWebSettings::setIconDatabasePath): + (QWebSettings::iconDatabasePath): + (QWebSettings::iconForUrl): + (QWebSettings::setWebGraphic): + (QWebSettings::setFontFamily): + (QWebSettings::fontFamily): + (QWebSettings::testAttribute): + (qt_websettings_setLocalStorageDatabasePath): + * Api/qwebsettings.h: + * Api/qwebview.cpp: + (QWebView::setPage): + (QWebView::event): + * Api/qwebview.h: + +2009-07-20 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Simon Hausmann. + + [Qt] Add test for loading webpages... + + Performance test for loading webpages. Wait for the loadFinished + signal to be fired. This should include a non empty layout. + + * tests/benchmarks/loading/tst_loading.cpp: Added. + (waitForSignal): + (tst_Loading::init): + (tst_Loading::cleanup): + (tst_Loading::load_data): + (tst_Loading::load): + * tests/benchmarks/loading/tst_loading.pro: Added. + * tests/tests.pro: + +2009-07-20 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Simon Hausmann. + + [Qt] Add a test case for drawing a simple viewrect to a QPixmap + + * tests/benchmarks/painting/tst_painting.cpp: Added. + (waitForSignal): + (tst_Painting::init): + (tst_Painting::cleanup): + (tst_Painting::paint_data): + (tst_Painting::paint): + * tests/benchmarks/painting/tst_painting.pro: Added. + * tests/tests.pro: + +2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Holger Freyther. + + [Qt] Add an option for QtLauncher to build without QtUiTools dependency + https://bugs.webkit.org/show_bug.cgi?id=27438 + + Based on Norbert Leser's work. + + * QtLauncher/main.cpp: + (WebPage::createPlugin): + +2009-07-17 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> + + Reviewed by Adam Treat. + + Coding style fixes. + + * Api/qcookiejar.cpp: + (QCookieJarPrivate::QCookieJarPrivate): + (qHash): + (QCookieJar::cookieJar): + * Api/qwebelement.cpp: + (QWebElement::functions): + (QWebElement::scriptableProperties): + * Api/qwebframe.cpp: + (QWebFrame::metaData): + (QWebFrame::scrollBarValue): + (QWebFrame::scroll): + (QWebFrame::scrollPosition): + (QWebFrame::print): + * Api/qwebnetworkinterface.cpp: + (decodePercentEncoding): + (QWebNetworkRequestPrivate::init): + (QWebNetworkRequestPrivate::setURL): + (QWebNetworkRequest::QWebNetworkRequest): + (QWebNetworkRequest::operator=): + (QWebNetworkRequest::setUrl): + (QWebNetworkRequest::setHttpHeader): + (QWebNetworkRequest::httpHeaderField): + (QWebNetworkRequest::setHttpHeaderField): + (QWebNetworkRequest::setPostData): + (QWebNetworkJob::setResponse): + (QWebNetworkJob::frame): + (QWebNetworkManager::add): + (QWebNetworkManager::cancel): + (QWebNetworkManager::started): + (QWebNetworkManager::data): + (QWebNetworkManager::finished): + (QWebNetworkManager::addHttpJob): + (QWebNetworkManager::cancelHttpJob): + (QWebNetworkManager::httpConnectionClosed): + (QWebNetworkInterfacePrivate::sendFileData): + (QWebNetworkInterfacePrivate::parseDataUrl): + (QWebNetworkManager::doWork): + (QWebNetworkInterface::setDefaultInterface): + (QWebNetworkInterface::defaultInterface): + (QWebNetworkInterface::QWebNetworkInterface): + (QWebNetworkInterface::addJob): + (QWebNetworkInterface::cancelJob): + (WebCoreHttp::WebCoreHttp): + (WebCoreHttp::request): + (WebCoreHttp::scheduleNextRequest): + (WebCoreHttp::getConnection): + (WebCoreHttp::onResponseHeaderReceived): + (WebCoreHttp::onReadyRead): + (WebCoreHttp::onRequestFinished): + (WebCoreHttp::onAuthenticationRequired): + (WebCoreHttp::onProxyAuthenticationRequired): + * Api/qwebpage.cpp: + (QWebPagePrivate::QWebPagePrivate): + (QWebPagePrivate::mouseReleaseEvent): + (QWebPagePrivate::inputMethodEvent): + (QWebPagePrivate::shortcutOverrideEvent): + (QWebPage::inputMethodQuery): + (QWebPage::javaScriptPrompt): + (QWebPage::updatePositionDependentActions): + (QWebPage::userAgentForUrl): + (QWebPagePrivate::_q_onLoadProgressChanged): + (QWebPage::totalBytes): + (QWebPage::bytesReceived): + * Api/qwebsettings.cpp: + (QWebSettings::iconForUrl): + (QWebSettings::setObjectCacheCapacities): + * Api/qwebview.cpp: + (QWebView::paintEvent): + (QWebView::changeEvent): + +2009-07-17 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> + + Reviewed by Simon Hausmann. + + Overwrite the plugin directories for the DRT. + Part of https://bugs.webkit.org/show_bug.cgi?id=27215 + + * Api/qwebpage.cpp: + (qt_drt_overwritePluginDirectories): Only set the plugin directories + to the ones in the QTWEBKIT_PLUGIN_PATH environment variable. + +2009-07-16 Xiaomei Ji <xji@chromium.org> + + Reviewed by Dan Bernstein. + + This is the 2nd part of fixing "RTL: tooltip does not get its directionlity from its element's." + https://bugs.webkit.org/show_bug.cgi?id=24187 + + Add one extra parameter to the callee of HitTestResult::title() due to the signature change. + + * Api/qwebframe.cpp: + (QWebHitTestResultPrivate::QWebHitTestResultPrivate): Add direction as a parameter to the callee of HitTestResult::title(). + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::mouseDidMoveOverElement): Add direction as a parameter to the callee of HitTestResult::title(). + +2009-07-16 Benjamin C Meyer <benjamin.meyer@torchmobile.com> + + Reviewed by Adam Treat. + + Add new action to qwebpage to reload without cache. + + * Api/qwebpage.cpp: + (QWebPagePrivate::updateAction): + (QWebPagePrivate::updateNavigationActions): + (QWebPage::triggerAction): + * Api/qwebpage.h: + +2009-07-16 Xiaomei Ji <xji@chromium.org> + + Reviewed by Darin Adler. + + Fix tooltip does not get its directionality from its element's directionality. + https://bugs.webkit.org/show_bug.cgi?id=24187 + + Per mitz's suggestion in comment #6, while getting the plain-text + title, we also get the directionality of the title. How to handle + the directionality is up to clients. Clients could ignore it, + or use attribute or unicode control characters to display the title + as what they want. + + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::setToolTip): Add directionality as 2nd parameter to setToopTip() (without handling it yet). + * WebCoreSupport/ChromeClientQt.h: Add directionality as 2nd parameter to setToolTip(). + +2009-07-15 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=27285 + + When the user clicks a link with a target attribute, the newly created window should be visible. + Make new windows created in Qtlauncher visible. + + * QtLauncher/main.cpp: + (WebPage::createWindow): + +2009-07-14 Adam Treat <adam.treat@torchmobile.com> + + Reviewed by Zack Rusin. + + https://bugs.webkit.org/show_bug.cgi?id=26983 + + The default constructed values for QSize and WebCore::IntSize are different. The former + produces an invalid size whereas the latter produces a size of zero. This was causing + a layout to be triggered when constructing a view and an assert to be hit. This patch fixes + the crash by taking care not to cause an unnecessary layout triggered by ScrollView::setFixedLayoutSize. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage): + 2009-07-13 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Ariya Hidayat. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index c169a9f677..d659833880 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -353,18 +353,19 @@ void ChromeClientQt::contentsSizeChanged(Frame* frame, const IntSize& size) cons void ChromeClientQt::mouseDidMoveOverElement(const HitTestResult& result, unsigned modifierFlags) { + TextDirection dir; if (result.absoluteLinkURL() != lastHoverURL - || result.title() != lastHoverTitle + || result.title(dir) != lastHoverTitle || result.textContent() != lastHoverContent) { lastHoverURL = result.absoluteLinkURL(); - lastHoverTitle = result.title(); + lastHoverTitle = result.title(dir); lastHoverContent = result.textContent(); emit m_webPage->linkHovered(lastHoverURL.prettyURL(), lastHoverTitle, lastHoverContent); } } -void ChromeClientQt::setToolTip(const String &tip) +void ChromeClientQt::setToolTip(const String &tip, TextDirection) { #ifndef QT_NO_TOOLTIP QWidget* view = m_webPage->view(); @@ -400,6 +401,14 @@ void ChromeClientQt::exceededDatabaseQuota(Frame* frame, const String& databaseN } #endif +#if ENABLE(OFFLINE_WEB_APPLICATIONS) +void ChromeClientQt::reachedMaxAppCacheSize(int64_t spaceNeeded) +{ + // FIXME: Free some space. + notImplemented(); +} +#endif + void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser) { RefPtr<FileChooser> fileChooser = prpFileChooser; diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h index 67663fbd8c..96c7faba9b 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h @@ -110,12 +110,15 @@ namespace WebCore { virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); - virtual void setToolTip(const String&); + virtual void setToolTip(const String&, TextDirection); virtual void print(Frame*); #if ENABLE(DATABASE) virtual void exceededDatabaseQuota(Frame*, const String&); #endif +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); +#endif virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); virtual void formStateDidChange(const Node*) { } diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 8e6ffed805..5cf86b12c6 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -214,7 +214,7 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage() m_frame->createView(m_webFrame->page()->viewportSize(), backgroundColor, !backgroundColor.alpha(), - fixedLayoutSize, + fixedLayoutSize.isValid() ? IntSize(fixedLayoutSize) : IntSize(), fixedLayoutSize.isValid(), (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Horizontal), (ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Vertical)); diff --git a/src/3rdparty/webkit/WebKit/qt/WebKit_pch.h b/src/3rdparty/webkit/WebKit/qt/WebKit_pch.h index ae8ec889ac..1dd4d52f1e 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebKit_pch.h +++ b/src/3rdparty/webkit/WebKit/qt/WebKit_pch.h @@ -77,7 +77,4 @@ #include <wtf/UnusedParam.h> #include <wtf/AlwaysInline.h> #include <wtf/GetPtr.h> - -#include "../../WebCore/bindings/js/JSDOMBinding.h" -#include "../../JavaScriptCore/runtime/MathObject.h" #endif diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc index 3def65cbca..f3681ee620 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc @@ -57,16 +57,13 @@ \section1 Configuring the Build Process - Applications that use QtWebKit's classes need to be configured to be built + Applications using QtWebKit's classes need to be configured to be built against the QtWebKit module. The following declaration in a \c qmake project file ensures that an application is compiled and linked appropriately: \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0 - This line is necessary because only the QtCore and QtGui modules are used - in the default build process. - To include the definitions of the module's classes, use the following directive: @@ -80,17 +77,24 @@ \snippet webkitsnippets/simple/main.cpp Using QWebView - QWebView acts as a view onto Web pages, each of which is represented by an - instance of the QWebPage class. QWebPage provides access to the document - structure in a page, describing features such as frames, the navigation - history, and the undo/redo stack for editable content. + QWebView is used to view Web pages. An instance of QWebView has one + QWebPage. QWebPage provides access to the document structure in a page, + describing features such as frames, the navigation history, and the + undo/redo stack for editable content. HTML documents can be nested using frames in a frameset. An individual - frame in HTML is represented using the QWebFrame class. It includes the + frame in HTML is represented using the QWebFrame class. This class includes the bridge to the JavaScript window object and can be painted using QPainter. - Each QWebPage has one QWebFrame object as its main frame. + Each QWebPage has one QWebFrame object as its main frame, and the main frame + may contain many child frames. + + Individual elements of an HTML document can be accessed via DOM JavaScript + interfaces from within a web page. The equivalent of this API in QtWebKit + is represented by QWebElement. QWebElement objects are obtained using QWebFrame's + \l{QWebFrame::}{findAllElements()} and \l{QWebFrame::}{findFirstElement()} + functions with CSS selector queries. - Individual browser features, defaults and other settings can be configured + Common web browser features, defaults and other settings can be configured through the QWebSettings class. It is possible to provide defaults for all QWebPage instances through the default settings. Individual attributes can be overidden by the page specific settings object. @@ -100,7 +104,7 @@ Since WebKit supports the Netscape Plugin API, Qt applications can display Web pages that embed common plugins, as long as the user has the appropriate binary files for those plugins installed and the \l{QWebSettings::PluginsEnabled} - attribute is set for the application. + attribute is enabled for the application. The following locations are searched for plugins: diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf index 6343b1798f..8ee8f69427 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf @@ -9,6 +9,7 @@ outputdir = $OUTPUT_DIR/doc/html outputformats = HTML sources.fileextensions = "*.cpp *.doc *.qdoc *.h" exampledirs = $SRCDIR/WebKit/qt/docs +imagedirs = $SRCDIR/WebKit/qt/docs indexes = $QTDIR/doc/html/qt.index diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qwebview-diagram.png b/src/3rdparty/webkit/WebKit/qt/docs/qwebview-diagram.png Binary files differnew file mode 100644 index 0000000000..ada865e2e4 --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/docs/qwebview-diagram.png diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp new file mode 100644 index 0000000000..0bc87f7bfa --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2009 Holger Hans Peter Freyther + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include <QtTest/QtTest> + +#include <qwebframe.h> +#include <qwebview.h> +#include <qpainter.h> + +/** + * Starts an event loop that runs until the given signal is received. + Optionally the event loop + * can return earlier on a timeout. + * + * \return \p true if the requested signal was received + * \p false on timeout + */ +static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0) +{ + QEventLoop loop; + QObject::connect(obj, signal, &loop, SLOT(quit())); + QTimer timer; + QSignalSpy timeoutSpy(&timer, SIGNAL(timeout())); + if (timeout > 0) { + QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); + timer.setSingleShot(true); + timer.start(timeout); + } + loop.exec(); + return timeoutSpy.isEmpty(); +} + +class tst_Loading : public QObject +{ + Q_OBJECT + +public: + +public Q_SLOTS: + void init(); + void cleanup(); + +private Q_SLOTS: + void load_data(); + void load(); + +private: + QWebView* m_view; + QWebPage* m_page; +}; + +void tst_Loading::init() +{ + m_view = new QWebView; + m_page = m_view->page(); + + QSize viewportSize(1024, 768); + m_view->setFixedSize(viewportSize); + m_page->setViewportSize(viewportSize); +} + +void tst_Loading::cleanup() +{ + delete m_view; +} + +void tst_Loading::load_data() +{ + QTest::addColumn<QUrl>("url"); + QTest::newRow("amazon") << QUrl("http://www.amazon.com"); + QTest::newRow("kde") << QUrl("http://www.kde.org"); + QTest::newRow("apple") << QUrl("http://www.apple.com"); +} + +void tst_Loading::load() +{ + QFETCH(QUrl, url); + + + QBENCHMARK { + m_view->load(url); + + // really wait for loading, painting is in another test + ::waitForSignal(m_view, SIGNAL(loadFinished(bool))); + } +} + +QTEST_MAIN(tst_Loading) +#include "tst_loading.moc" diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.pro b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.pro new file mode 100644 index 0000000000..af0387eb74 --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.pro @@ -0,0 +1,6 @@ +TEMPLATE = app +TARGET = tst_loading +include(../../../../../WebKit.pri) +SOURCES += tst_loading.cpp +QT += testlib network +QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp new file mode 100644 index 0000000000..f4531fdac2 --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2009 Holger Hans Peter Freyther + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include <QtTest/QtTest> + +#include <qwebframe.h> +#include <qwebview.h> +#include <qpainter.h> + +/** + * Starts an event loop that runs until the given signal is received. + Optionally the event loop + * can return earlier on a timeout. + * + * \return \p true if the requested signal was received + * \p false on timeout + */ +static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0) +{ + QEventLoop loop; + QObject::connect(obj, signal, &loop, SLOT(quit())); + QTimer timer; + QSignalSpy timeoutSpy(&timer, SIGNAL(timeout())); + if (timeout > 0) { + QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); + timer.setSingleShot(true); + timer.start(timeout); + } + loop.exec(); + return timeoutSpy.isEmpty(); +} + +class tst_Painting : public QObject +{ + Q_OBJECT + +public: + +public Q_SLOTS: + void init(); + void cleanup(); + +private Q_SLOTS: + void paint_data(); + void paint(); + +private: + QWebView* m_view; + QWebPage* m_page; +}; + +void tst_Painting::init() +{ + m_view = new QWebView; + m_page = m_view->page(); + + QSize viewportSize(1024, 768); + m_view->setFixedSize(viewportSize); + m_page->setViewportSize(viewportSize); +} + +void tst_Painting::cleanup() +{ + delete m_view; +} + +void tst_Painting::paint_data() +{ + QTest::addColumn<QUrl>("url"); + QTest::newRow("amazon") << QUrl("http://www.amazon.com"); +} + +void tst_Painting::paint() +{ + QFETCH(QUrl, url); + + m_view->load(url); + ::waitForSignal(m_view, SIGNAL(loadFinished(bool))); + + /* force a layout */ + QWebFrame* mainFrame = m_page->mainFrame(); + mainFrame->toPlainText(); + + QPixmap pixmap(m_page->viewportSize()); + QBENCHMARK { + QPainter painter(&pixmap); + mainFrame->render(&painter, QRect(QPoint(0, 0), m_page->viewportSize())); + painter.end(); + } +} + +QTEST_MAIN(tst_Painting) +#include "tst_painting.moc" diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.pro b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.pro new file mode 100644 index 0000000000..496210e0db --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.pro @@ -0,0 +1,6 @@ +TEMPLATE = app +TARGET = tst_painting +include(../../../../../WebKit.pri) +SOURCES += tst_painting.cpp +QT += testlib network +QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc index 266cdce2df..9615e27f42 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc @@ -2,5 +2,7 @@ <qresource prefix="/"> <file>image.png</file> <file>style.css</file> +<file>test1.html</file> +<file>test2.html</file> </qresource> </RCC> diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test1.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test1.html new file mode 100644 index 0000000000..b323f966e9 --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test1.html @@ -0,0 +1 @@ +<html><body><p>Some text 1</p></body></html> diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test2.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test2.html new file mode 100644 index 0000000000..63ac1f6ecb --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test2.html @@ -0,0 +1 @@ +<html><body> <p>Some text 2</p></body></html> diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index c0e72be201..a3bcd20ca3 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -29,8 +29,10 @@ #include <QAbstractItemView> #include <QApplication> #include <QComboBox> +#include <QPicture> #include <QRegExp> #include <QNetworkRequest> +#include <QNetworkReply> //TESTED_CLASS= //TESTED_FILES= @@ -573,6 +575,7 @@ private slots: void progressSignal(); void urlChange(); void domCycles(); + void requestedUrl(); void setHtml(); void setHtmlWithResource(); void ipv6HostEncoding(); @@ -585,6 +588,8 @@ private slots: void baseUrl_data(); void baseUrl(); void hasSetFocus(); + void render(); + void scrollPosition(); private: QString evalJS(const QString&s) { @@ -2159,6 +2164,93 @@ void tst_QWebFrame::domCycles() QVERIFY(v.type() == QVariant::Map); } +class FakeReply : public QNetworkReply { + Q_OBJECT + + public: + FakeReply(const QNetworkRequest& request, QObject* parent = 0) + : QNetworkReply(parent) + { + setOperation(QNetworkAccessManager::GetOperation); + setRequest(request); + if (request.url() == QUrl("qrc:/test1.html")) { + setHeader(QNetworkRequest::LocationHeader, QString("qrc:/test2.html")); + setAttribute(QNetworkRequest::RedirectionTargetAttribute, QUrl("qrc:/test2.html")); + } else + setError(QNetworkReply::HostNotFoundError, tr("Invalid URL")); + + open(QIODevice::ReadOnly); + QTimer::singleShot(0, this, SLOT(timeout())); + } + ~FakeReply() + { + close(); + } + virtual void abort() {} + virtual void close() {} + protected: + qint64 readData(char*, qint64) + { + return 0; + } + private slots: + void timeout() + { + if (request().url() == QUrl("qrc://test1.html")) + emit error(this->error()); + else if (request().url() == QUrl("http://abcdef.abcdef/")) + emit metaDataChanged(); + + emit readyRead(); + emit finished(); + } +}; + +class FakeNetworkManager : public QNetworkAccessManager { +public: + FakeNetworkManager(QObject* parent) : QNetworkAccessManager(parent) { } + +protected: + virtual QNetworkReply* createRequest(Operation op, const QNetworkRequest& request, QIODevice* outgoingData) + { + if (op == QNetworkAccessManager::GetOperation + && (request.url().toString() == "qrc:/test1.html" + || request.url().toString() == "http://abcdef.abcdef/")) + return new FakeReply(request, this); + + return QNetworkAccessManager::createRequest(op, request, outgoingData); + } +}; + +void tst_QWebFrame::requestedUrl() +{ + QWebPage page; + QWebFrame* frame = page.mainFrame(); + + // in few seconds, the image should be completely loaded + QSignalSpy spy(&page, SIGNAL(loadFinished(bool))); + FakeNetworkManager* networkManager = new FakeNetworkManager(&page); + page.setNetworkAccessManager(networkManager); + + frame->setUrl(QUrl("qrc:/test1.html")); + QTest::qWait(200); + QCOMPARE(spy.count(), 1); + QCOMPARE(frame->requestedUrl(), QUrl("qrc:/test1.html")); + QCOMPARE(frame->url(), QUrl("qrc:/test2.html")); + + frame->setUrl(QUrl("qrc:/non-existent.html")); + QTest::qWait(200); + QCOMPARE(spy.count(), 2); + QCOMPARE(frame->requestedUrl(), QUrl("qrc:/non-existent.html")); + QCOMPARE(frame->url(), QUrl("qrc:/non-existent.html")); + + frame->setUrl(QUrl("http://abcdef.abcdef")); + QTest::qWait(200); + QCOMPARE(spy.count(), 3); + QCOMPARE(frame->requestedUrl(), QUrl("http://abcdef.abcdef/")); + QCOMPARE(frame->url(), QUrl("http://abcdef.abcdef/")); +} + void tst_QWebFrame::setHtml() { QString html("<html><head></head><body><p>hello world</p></body></html>"); @@ -2453,16 +2545,29 @@ void tst_QWebFrame::baseUrl() void tst_QWebFrame::hasSetFocus() { + QString html("<html><body><p>top</p>" \ + "<iframe width='80%' height='30%'/>" \ + "</body></html>"); + QSignalSpy loadSpy(m_page, SIGNAL(loadFinished(bool))); - QUrl url = QUrl("qrc:///frametest/iframe.html"); - m_page->mainFrame()->load(url); + m_page->mainFrame()->setHtml(html); + + QTest::qWait(200); + QCOMPARE(loadSpy.size(), 1); - ::waitForSignal(m_page, SIGNAL(loadFinished(bool))); + QList<QWebFrame*> children = m_page->mainFrame()->childFrames(); + QWebFrame* frame = children.at(0); + QString innerHtml("<html><body><p>another iframe</p>" \ + "<iframe width='80%' height='30%'/>" \ + "</body></html>"); + frame->setHtml(innerHtml); + + QTest::qWait(200); + QCOMPARE(loadSpy.size(), 2); m_page->mainFrame()->setFocus(); QVERIFY(m_page->mainFrame()->hasFocus()); - QList<QWebFrame*> children = m_page->mainFrame()->childFrames(); for (int i = 0; i < children.size(); ++i) { children.at(i)->setFocus(); QVERIFY(children.at(i)->hasFocus()); @@ -2473,5 +2578,70 @@ void tst_QWebFrame::hasSetFocus() QVERIFY(m_page->mainFrame()->hasFocus()); } +void tst_QWebFrame::render() +{ + QString html("<html>" \ + "<head><style>" \ + "body, iframe { margin: 0px; border: none; }" \ + "</style></head>" \ + "<body><iframe width='100px' height='100px'/></body>" \ + "</html>"); + + QWebPage page; + page.mainFrame()->setHtml(html); + + QList<QWebFrame*> frames = page.mainFrame()->childFrames(); + QWebFrame *frame = frames.at(0); + QString innerHtml("<body style='margin: 0px;'><img src='qrc:/image.png'/></body>"); + frame->setHtml(innerHtml); + + QPicture picture; + + // render clipping to Viewport + frame->setClipRenderToViewport(true); + QPainter painter1(&picture); + frame->render(&painter1); + painter1.end(); + + QSize size = page.mainFrame()->contentsSize(); + page.setViewportSize(size); + QCOMPARE(size.width(), picture.boundingRect().width()); // 100px + QCOMPARE(size.height(), picture.boundingRect().height()); // 100px + + // render without clipping to Viewport + frame->setClipRenderToViewport(false); + QPainter painter2(&picture); + frame->render(&painter2); + painter2.end(); + + QImage resource(":/image.png"); + QCOMPARE(resource.width(), picture.boundingRect().width()); // resource width: 128px + QCOMPARE(resource.height(), picture.boundingRect().height()); // resource height: 128px +} + +void tst_QWebFrame::scrollPosition() +{ + // enlarged image in a small viewport, to provoke the scrollbars to appear + QString html("<html><body><img src='qrc:/image.png' height=500 width=500/></body></html>"); + + QWebPage page; + page.setViewportSize(QSize(200, 200)); + + QWebFrame* frame = page.mainFrame(); + frame->setHtml(html); + frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); + frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); + + // try to set the scroll offset programmatically + frame->setScrollPosition(QPoint(23, 29)); + QCOMPARE(frame->scrollPosition().x(), 23); + QCOMPARE(frame->scrollPosition().y(), 29); + + int x = frame->evaluateJavaScript("window.scrollX").toInt(); + int y = frame->evaluateJavaScript("window.scrollY").toInt(); + QCOMPARE(x, 23); + QCOMPARE(y, 29); +} + QTEST_MAIN(tst_QWebFrame) #include "tst_qwebframe.moc" diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 6c3b296abc..966f049927 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -109,6 +109,7 @@ private slots: void backActionUpdate(); void frameAt(); void requestCache(); + void protectBindingsRuntimeObjectsFromCollector(); private: @@ -1164,5 +1165,30 @@ void tst_QWebPage::frameAt() frameAtHelper(webPage, webPage->mainFrame(), webPage->mainFrame()->pos()); } +// import a little DRT helper function to trigger the garbage collector +void QWEBKIT_EXPORT qt_drt_garbageCollector_collect(); + +void tst_QWebPage::protectBindingsRuntimeObjectsFromCollector() +{ + QSignalSpy loadSpy(m_view, SIGNAL(loadFinished(bool))); + + PluginPage* newPage = new PluginPage(m_view); + m_view->setPage(newPage); + + m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true); + + m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='lineedit' id='mylineedit'/></body></html>")); + QTRY_COMPARE(loadSpy.count(), 1); + + newPage->mainFrame()->evaluateJavaScript("function testme(text) { var lineedit = document.getElementById('mylineedit'); lineedit.setText(text); lineedit.selectAll(); }"); + + newPage->mainFrame()->evaluateJavaScript("testme('foo')"); + + qt_drt_garbageCollector_collect(); + + // don't crash! + newPage->mainFrame()->evaluateJavaScript("testme('bar')"); +} + QTEST_MAIN(tst_QWebPage) #include "tst_qwebpage.moc" diff --git a/src/3rdparty/webkit/WebKit/qt/tests/tests.pro b/src/3rdparty/webkit/WebKit/qt/tests/tests.pro index 076046f052..7000d32f08 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/tests.pro +++ b/src/3rdparty/webkit/WebKit/qt/tests/tests.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs SUBDIRS = qwebframe qwebpage qwebelement qwebhistoryinterface qwebview qwebhistory +SUBDIRS += benchmarks/painting/tst_painting.pro benchmarks/loading/tst_loading.pro diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index ae468ef52f..ff6bcb86a2 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -118,6 +118,8 @@ public: QSize minimumSizeHint() const; int qt_metacall(QMetaObject::Call, int isignal, void **argv); + void* qt_metacast(const char *clname); + inline QAxClientSite *clientSite() const { return axhost; @@ -478,7 +480,9 @@ bool axc_FilterProc(void *m) QAxWidget *ax = 0; QAxHostWidget *host = 0; while (!host && hwnd) { - host = qobject_cast<QAxHostWidget*>(QWidget::find(hwnd)); + QWidget *widget = QWidget::find(hwnd); + if (widget && widget->inherits("QAxHostWidget")) + host = qobject_cast<QAxHostWidget*>(widget); hwnd = ::GetParent(hwnd); } if (host) @@ -976,10 +980,38 @@ HRESULT WINAPI QAxClientSite::TransformCoords(POINTL* /*pPtlHimetric*/, POINTF* HRESULT WINAPI QAxClientSite::TranslateAccelerator(LPMSG lpMsg, DWORD /*grfModifiers*/) { - eventTranslated = false; if (lpMsg->message == WM_KEYDOWN && !lpMsg->wParam) return S_OK; + + bool ActiveQtDetected = false; + bool fromInProcServer = false; +#ifdef GWLP_USERDATA + LONG_PTR serverType = GetWindowLongPtr(lpMsg->hwnd, GWLP_USERDATA); +#else + LONG serverType = GetWindowLong(lpMsg->hwnd, GWL_USERDATA); +#endif + if (serverType == QAX_INPROC_SERVER) { + ActiveQtDetected = true; + fromInProcServer = true; + } else if (serverType == QAX_OUTPROC_SERVER) { + ActiveQtDetected = true; + fromInProcServer = false; + } + + eventTranslated = false; + if (!ActiveQtDetected || !fromInProcServer) { + // if the request is coming from an out-of-proc server or a non ActiveQt server, + // we send the message to the host window. This will make sure this key event + // comes to Qt for processing. SendMessage(host->winId(), lpMsg->message, lpMsg->wParam, lpMsg->lParam); + if (ActiveQtDetected && !fromInProcServer) { + // ActiveQt based servers will need further processing of the event + // (eg. <SPACE> key for a checkbox), so we return false. + return S_FALSE; + } + } + // ActiveQt based in-processes-servers will handle the event properly, so + // we dont need to send this key event to the host. return S_OK; } @@ -1617,6 +1649,14 @@ int QAxHostWidget::qt_metacall(QMetaObject::Call call, int isignal, void **argv) return -1; } +void* QAxHostWidget::qt_metacast(const char *clname) +{ + if (!clname) return 0; + if (!qstrcmp(clname,"QAxHostWidget")) + return static_cast<void*>(const_cast< QAxHostWidget*>(this)); + return QWidget::qt_metacast(clname); +} + QSize QAxHostWidget::sizeHint() const { return axhost ? axhost->sizeHint() : QWidget::sizeHint(); diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index d7a8e070e0..e7ddb47853 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -3502,24 +3502,24 @@ Q_GUI_EXPORT int qt_translateKeyCode(int); HRESULT WINAPI QAxServerBase::TranslateAcceleratorW(MSG *pMsg) { if (pMsg->message != WM_KEYDOWN || !isWidget) - return S_FALSE; + return S_FALSE; DWORD dwKeyMod = 0; if (::GetKeyState(VK_SHIFT) < 0) - dwKeyMod |= 1; // KEYMOD_SHIFT + dwKeyMod |= 1; // KEYMOD_SHIFT if (::GetKeyState(VK_CONTROL) < 0) - dwKeyMod |= 2; // KEYMOD_CONTROL + dwKeyMod |= 2; // KEYMOD_CONTROL if (::GetKeyState(VK_MENU) < 0) - dwKeyMod |= 4; // KEYMOD_ALT + dwKeyMod |= 4; // KEYMOD_ALT switch (LOWORD(pMsg->wParam)) { case VK_TAB: - if (isUIActive) { - bool shift = ::GetKeyState(VK_SHIFT) < 0; - bool giveUp = true; + if (isUIActive) { + bool shift = ::GetKeyState(VK_SHIFT) < 0; + bool giveUp = true; QWidget *curFocus = qt.widget->focusWidget(); if (curFocus) { - if (shift) { + if (shift) { if (!curFocus->isWindow()) { QWidget *nextFocus = curFocus->nextInFocusChain(); QWidget *prevFocus = 0; @@ -3537,9 +3537,10 @@ HRESULT WINAPI QAxServerBase::TranslateAcceleratorW(MSG *pMsg) if (!topLevel) { giveUp = false; ((HackWidget*)curFocus)->focusNextPrevChild(false); + curFocus->window()->setAttribute(Qt::WA_KeyboardFocusChange); } } - } else { + } else { QWidget *nextFocus = curFocus; while (1) { nextFocus = nextFocus->nextInFocusChain(); @@ -3548,64 +3549,82 @@ HRESULT WINAPI QAxServerBase::TranslateAcceleratorW(MSG *pMsg) if (nextFocus->focusPolicy() & Qt::TabFocus) { giveUp = false; ((HackWidget*)curFocus)->focusNextPrevChild(true); + curFocus->window()->setAttribute(Qt::WA_KeyboardFocusChange); break; } } - } + } + } + if (giveUp) { + HWND hwnd = ::GetParent(m_hWnd); + ::SetFocus(hwnd); + } else { + return S_OK; } - if (giveUp) { - HWND hwnd = ::GetParent(m_hWnd); - ::SetFocus(hwnd); - } else { - return S_OK; - } - } - break; + } + break; case VK_LEFT: case VK_RIGHT: case VK_UP: case VK_DOWN: - if (isUIActive) - return S_FALSE; - break; + if (isUIActive) + return S_FALSE; + break; default: - if (isUIActive && qt.widget->focusWidget()) { + if (isUIActive && qt.widget->focusWidget()) { int state = Qt::NoButton; - if (dwKeyMod & 1) - state |= Qt::ShiftModifier; - if (dwKeyMod & 2) - state |= Qt::ControlModifier; - if (dwKeyMod & 4) - state |= Qt::AltModifier; - - int key = pMsg->wParam; + if (dwKeyMod & 1) + state |= Qt::ShiftModifier; + if (dwKeyMod & 2) + state |= Qt::ControlModifier; + if (dwKeyMod & 4) + state |= Qt::AltModifier; + + int key = pMsg->wParam; if (!(key >= 'A' && key <= 'Z') && !(key >= '0' && key <= '9')) key = qt_translateKeyCode(pMsg->wParam); - QKeyEvent override(QEvent::ShortcutOverride, key, (Qt::KeyboardModifiers)state); - override.ignore(); - QApplication::sendEvent(qt.widget->focusWidget(), &override); - if (override.isAccepted()) - return S_FALSE; - } - break; + QKeyEvent override(QEvent::ShortcutOverride, key, (Qt::KeyboardModifiers)state); + override.ignore(); + QApplication::sendEvent(qt.widget->focusWidget(), &override); + if (override.isAccepted()) + return S_FALSE; + } + break; } if (!m_spClientSite) - return S_FALSE; + return S_FALSE; IOleControlSite *controlSite = 0; m_spClientSite->QueryInterface(IID_IOleControlSite, (void**)&controlSite); if (!controlSite) - return S_FALSE; - + return S_FALSE; + bool resetUserData = false; + // set server type in the user-data of the window. +#ifdef GWLP_USERDATA + LONG_PTR serverType = QAX_INPROC_SERVER; +#else + LONG serverType = QAX_INPROC_SERVER; +#endif + if (qAxOutProcServer) + serverType = QAX_OUTPROC_SERVER; +#ifdef GWLP_USERDATA + LONG_PTR oldData = SetWindowLongPtr(pMsg->hwnd, GWLP_USERDATA, serverType); +#else + LONG oldData = SetWindowLong(pMsg->hwnd, GWL_USERDATA, serverType); +#endif HRESULT hres = controlSite->TranslateAcceleratorW(pMsg, dwKeyMod); - controlSite->Release(); - + // reset the user-data for the window. +#ifdef GWLP_USERDATA + SetWindowLongPtr(pMsg->hwnd, GWLP_USERDATA, oldData); +#else + SetWindowLong(pMsg->hwnd, GWL_USERDATA, oldData); +#endif return hres; } diff --git a/src/activeqt/shared/qaxtypes.h b/src/activeqt/shared/qaxtypes.h index 4f647a3364..e3c7138e51 100644 --- a/src/activeqt/shared/qaxtypes.h +++ b/src/activeqt/shared/qaxtypes.h @@ -89,6 +89,9 @@ extern QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName extern bool QVariantToVoidStar(const QVariant &var, void *data, const QByteArray &typeName, uint type = 0); extern void clearVARIANT(VARIANT *var); +#define QAX_INPROC_SERVER (0x51540001) +#define QAX_OUTPROC_SERVER (0x51540002) + QT_END_NAMESPACE #endif // QT_NO_WIN_ACTIVEQT diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 48e5ec1761..fdd98c22bf 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -267,7 +267,7 @@ void QVariantAnimationPrivate::setCurrentValueForProgress(const qreal progress) localProgress); qSwap(currentValue, ret); q->updateCurrentValue(currentValue); - if ((connectedSignals & changedSignalMask) && currentValue != ret) { + if ((connectedSignals[0] & changedSignalMask) && currentValue != ret) { //the value has changed emit q->valueChanged(currentValue); } diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri index de4de1f405..9f0e28937c 100644 --- a/src/corelib/arch/arch.pri +++ b/src/corelib/arch/arch.pri @@ -7,6 +7,8 @@ mac:HEADERS += arch/qatomic_macosx.h \ symbian:HEADERS += arch/qatomic_symbian.h \ arch/qatomic_generic.h +vxworks:HEADERS += arch/qatomic_vxworks.h + !wince*:!win32:!mac:!symbian:HEADERS += arch/qatomic_alpha.h \ arch/qatomic_avr32.h \ arch/qatomic_ia64.h \ diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h index 6c145755ff..17bced684f 100644 --- a/src/corelib/arch/qatomic_arch.h +++ b/src/corelib/arch/qatomic_arch.h @@ -46,7 +46,9 @@ QT_BEGIN_HEADER #include "QtCore/qglobal.h" -#if defined(QT_ARCH_ALPHA) +#if defined(QT_ARCH_VXWORKS) +# include "QtCore/qatomic_vxworks.h" +#elif defined(QT_ARCH_ALPHA) # include "QtCore/qatomic_alpha.h" #elif defined(QT_ARCH_ARM) # include "QtCore/qatomic_arm.h" diff --git a/src/corelib/arch/qatomic_vxworks.h b/src/corelib/arch/qatomic_vxworks.h new file mode 100644 index 0000000000..573a44dbc9 --- /dev/null +++ b/src/corelib/arch/qatomic_vxworks.h @@ -0,0 +1,318 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QATOMIC_VXWORKS_H +#define QATOMIC_VXWORKS_H + +QT_BEGIN_HEADER + +#if defined(__ppc) +# include <QtCore/qatomic_powerpc.h> +#else // generic implementation with taskLock() + +#if 0 +// we don't want to include the system header here for two function prototypes, +// because it pulls in a _lot_ of stuff that pollutes the global namespace +# include <vxWorksCommon.h> +# include <taskLib.h> +#else +extern "C" int taskLock(); +extern "C" int taskUnlock(); +#endif + + + +QT_BEGIN_NAMESPACE + +#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE + +inline bool QBasicAtomicInt::isReferenceCountingNative() +{ return false; } +inline bool QBasicAtomicInt::isReferenceCountingWaitFree() +{ return false; } + +#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE + +inline bool QBasicAtomicInt::isTestAndSetNative() +{ return false; } +inline bool QBasicAtomicInt::isTestAndSetWaitFree() +{ return false; } + +#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE + +inline bool QBasicAtomicInt::isFetchAndStoreNative() +{ return false; } +inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() +{ return false; } + +#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE + +inline bool QBasicAtomicInt::isFetchAndAddNative() +{ return false; } +inline bool QBasicAtomicInt::isFetchAndAddWaitFree() +{ return false; } + +#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative() +{ return false; } +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree() +{ return false; } + +#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative() +{ return false; } +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree() +{ return false; } + +#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative() +{ return false; } +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree() +{ return false; } + +// Reference counting + +inline bool QBasicAtomicInt::ref() +{ + taskLock(); + bool ret = (++_q_value != 0); + taskUnlock(); + return ret; +} + +inline bool QBasicAtomicInt::deref() +{ + taskLock(); + bool ret = (--_q_value != 0); + taskUnlock(); + return ret; +} + +// Test-and-set for integers + +inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) +{ + taskLock(); + if (_q_value == expectedValue) { + _q_value = newValue; + taskUnlock(); + return true; + } + taskUnlock(); + return false; +} + +inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +// Fetch-and-store for integers + +inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) +{ + taskLock(); + int returnValue = _q_value; + _q_value = newValue; + taskUnlock(); + return returnValue; +} + +inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +// Fetch-and-add for integers + +inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) +{ + taskLock(); + int originalValue = _q_value; + _q_value += valueToAdd; + taskUnlock(); + return originalValue; +} + +inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +// Test and set for pointers + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) +{ + taskLock(); + if (_q_value == expectedValue) { + _q_value = newValue; + taskUnlock(); + return true; + } + taskUnlock(); + return false; +} + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +// Fetch and store for pointers + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) +{ + taskLock(); + T *returnValue = (_q_value); + _q_value = newValue; + taskUnlock(); + return returnValue; +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +// Fetch and add for pointers + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) +{ + taskLock(); + T *returnValue = (_q_value); + _q_value += valueToAdd; + taskUnlock(); + return returnValue; +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +QT_END_NAMESPACE + +#endif // generic implementation with taskLock() + +QT_END_HEADER + +#endif // QATOMIC_VXWORKS_H diff --git a/src/corelib/arch/vxworks/arch.pri b/src/corelib/arch/vxworks/arch.pri new file mode 100644 index 0000000000..a7686186b0 --- /dev/null +++ b/src/corelib/arch/vxworks/arch.pri @@ -0,0 +1,6 @@ +# +# VxWorks generic +# +*-ppc-* { + SOURCES += qatomic_ppc.s +} diff --git a/src/corelib/arch/vxworks/qatomic_ppc.s b/src/corelib/arch/vxworks/qatomic_ppc.s new file mode 100644 index 0000000000..03971e89e8 --- /dev/null +++ b/src/corelib/arch/vxworks/qatomic_ppc.s @@ -0,0 +1,415 @@ + + .align 2 + .globl q_atomic_test_and_set_int + .globl .q_atomic_test_and_set_int +q_atomic_test_and_set_int: +.q_atomic_test_and_set_int: + lwarx 6,0,3 + xor. 6,6,4 + bne $+12 + stwcx. 5,0,3 + bne- $-16 + subfic 3,6,0 + adde 3,3,6 + blr +LT..q_atomic_test_and_set_int: + .long 0 + .byte 0,9,32,64,0,0,3,0 + .long 0 + .long LT..q_atomic_test_and_set_int-.q_atomic_test_and_set_int + .short 25 + .byte "q_atomic_test_and_set_int" + .align 2 + + .align 2 + .globl q_atomic_test_and_set_acquire_int + .globl .q_atomic_test_and_set_acquire_int +q_atomic_test_and_set_acquire_int: +.q_atomic_test_and_set_acquire_int: + lwarx 6,0,3 + xor. 6,6,4 + bne $+16 + stwcx. 5,0,3 + bne- $-16 + isync + subfic 3,6,0 + adde 3,3,6 + blr +LT..q_atomic_test_and_set_acquire_int: + .long 0 + .byte 0,9,32,64,0,0,3,0 + .long 0 + .long LT..q_atomic_test_and_set_acquire_int-.q_atomic_test_and_set_acquire_int + .short 33 + .byte "q_atomic_test_and_set_acquire_int" + .align 2 + + .align 2 + .globl q_atomic_test_and_set_release_int + .globl .q_atomic_test_and_set_release_int +q_atomic_test_and_set_release_int: +.q_atomic_test_and_set_release_int: + lwarx 6,0,3 + xor. 6,6,4 + bne $+12 + stwcx. 5,0,3 + bne- $-16 + subfic 3,6,0 + adde 3,3,6 + blr +LT..q_atomic_test_and_set_release_int: + .long 0 + .byte 0,9,32,64,0,0,3,0 + .long 0 + .long LT..q_atomic_test_and_set_release_int-.q_atomic_test_and_set_release_int + .short 33 + .byte "q_atomic_test_and_set_release_int" + .align 2 + + .align 2 + .globl q_atomic_test_and_set_ptr + .globl .q_atomic_test_and_set_ptr +q_atomic_test_and_set_ptr: +.q_atomic_test_and_set_ptr: + lwarx 6,0,3 + xor. 6,6,4 + bne $+12 + stwcx. 5,0,3 + bne- $-16 + subfic 3,6,0 + adde 3,3,6 + blr +LT..q_atomic_test_and_set_ptr: + .long 0 + .byte 0,9,32,64,0,0,3,0 + .long 0 + .long LT..q_atomic_test_and_set_ptr-.q_atomic_test_and_set_ptr + .short 25 + .byte "q_atomic_test_and_set_ptr" + .align 2 + + .align 2 + .globl q_atomic_test_and_set_acquire_ptr + .globl .q_atomic_test_and_set_acquire_ptr +q_atomic_test_and_set_acquire_ptr: +.q_atomic_test_and_set_acquire_ptr: + lwarx 6,0,3 + xor. 6,6,4 + bne $+16 + stwcx. 5,0,3 + bne- $-16 + isync + subfic 3,6,0 + adde 3,3,6 + blr +LT..q_atomic_test_and_set_acquire_ptr: + .long 0 + .byte 0,9,32,64,0,0,3,0 + .long 0 + .long LT..q_atomic_test_and_set_acquire_ptr-.q_atomic_test_and_set_acquire_ptr + .short 25 + .byte "q_atomic_test_and_set_acquire_ptr" + .align 2 + + .align 2 + .globl q_atomic_test_and_set_release_ptr + .globl .q_atomic_test_and_set_release_ptr +q_atomic_test_and_set_release_ptr: +.q_atomic_test_and_set_release_ptr: + lwarx 6,0,3 + xor. 6,6,4 + bne $+12 + stwcx. 5,0,3 + bne- $-16 + subfic 3,6,0 + adde 3,3,6 + blr +LT..q_atomic_test_and_set_release_ptr: + .long 0 + .byte 0,9,32,64,0,0,3,0 + .long 0 + .long LT..q_atomic_test_and_set_release_ptr-.q_atomic_test_and_set_release_ptr + .short 33 + .byte "q_atomic_test_and_set_release_ptr" + .align 2 + + .align 2 + .globl q_atomic_increment + .globl .q_atomic_increment +q_atomic_increment: +.q_atomic_increment: + lwarx 4,0,3 + addi 4,4,1 + stwcx. 4,0,3 + bne- $-12 + mr 3,4 + blr +LT..q_atomic_increment: + .long 0 + .byte 0,9,32,64,0,0,1,0 + .long 0 + .long LT..q_atomic_increment-.q_atomic_increment + .short 18 + .byte "q_atomic_increment" + .align 2 + + .align 2 + .globl q_atomic_decrement + .globl .q_atomic_decrement +q_atomic_decrement: +.q_atomic_decrement: + lwarx 4,0,3 + subi 4,4,1 + stwcx. 4,0,3 + bne- $-12 + mr 3,4 + blr +LT..q_atomic_decrement: + .long 0 + .byte 0,9,32,64,0,0,1,0 + .long 0 + .long LT..q_atomic_decrement-.q_atomic_decrement + .short 18 + .byte "q_atomic_decrement" + .align 2 + + .align 2 + .globl q_atomic_set_int + .globl .q_atomic_set_int +q_atomic_set_int: +.q_atomic_set_int: + lwarx 5,0,3 + stwcx. 4,0,3 + bne- $-8 + mr 3,5 + blr +LT..q_atomic_set_int: + .long 0 + .byte 0,9,32,64,0,0,2,0 + .long 0 + .long LT..q_atomic_set_int-.q_atomic_set_int + .short 16 + .byte "q_atomic_set_int" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_store_acquire_int + .globl .q_atomic_fetch_and_store_acquire_int +q_atomic_fetch_and_store_acquire_int: +.q_atomic_fetch_and_store_acquire_int: + lwarx 5,0,3 + stwcx. 4,0,3 + bne- $-8 + isync + mr 3,5 + blr +LT..q_atomic_fetch_and_store_acquire_int: + .long 0 + .byte 0,9,32,64,0,0,2,0 + .long 0 + .long LT..q_atomic_fetch_and_store_acquire_int-.q_atomic_fetch_and_store_acquire_int + .short 16 + .byte "q_atomic_fetch_and_store_acquire_int" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_store_release_int + .globl .q_atomic_fetch_and_store_release_int +q_atomic_fetch_and_store_release_int: +.q_atomic_fetch_and_store_release_int: + lwarx 5,0,3 + stwcx. 4,0,3 + bne- $-8 + mr 3,5 + blr +LT..q_atomic_fetch_and_store_release_int: + .long 0 + .byte 0,9,32,64,0,0,2,0 + .long 0 + .long LT..q_atomic_fetch_and_store_release_int-.q_atomic_fetch_and_store_release_int + .short 16 + .byte "q_atomic_fetch_and_store_release_int" + .align 2 + + .align 2 + .globl q_atomic_set_ptr + .globl .q_atomic_set_ptr +q_atomic_set_ptr: +.q_atomic_set_ptr: + lwarx 5,0,3 + stwcx. 4,0,3 + bne- $-8 + mr 3,5 + blr +LT..q_atomic_set_ptr: + .long 0 + .byte 0,9,32,64,0,0,2,0 + .long 0 + .long LT..q_atomic_set_ptr-.q_atomic_set_ptr + .short 16 + .byte "q_atomic_set_ptr" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_store_acquire_ptr + .globl .q_atomic_fetch_and_store_acquire_ptr +q_atomic_fetch_and_store_acquire_ptr: +.q_atomic_fetch_and_store_acquire_ptr: + lwarx 5,0,3 + stwcx. 4,0,3 + bne- $-8 + isync + mr 3,5 + blr +LT..q_atomic_fetch_and_store_acquire_ptr: + .long 0 + .byte 0,9,32,64,0,0,2,0 + .long 0 + .long LT..q_atomic_fetch_and_store_acquire_ptr-.q_atomic_fetch_and_store_acquire_ptr + .short 16 + .byte "q_atomic_fetch_and_store_acquire_ptr" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_store_release_ptr + .globl .q_atomic_fetch_and_store_release_ptr +q_atomic_fetch_and_store_release_ptr: +.q_atomic_fetch_and_store_release_ptr: + lwarx 5,0,3 + stwcx. 4,0,3 + bne- $-8 + mr 3,5 + blr +LT..q_atomic_fetch_and_store_release_ptr: + .long 0 + .byte 0,9,32,64,0,0,2,0 + .long 0 + .long LT..q_atomic_fetch_and_store_release_ptr-.q_atomic_fetch_and_store_release_ptr + .short 16 + .byte "q_atomic_fetch_and_store_release_ptr" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_add_int + .globl .q_atomic_fetch_and_add_int +q_atomic_fetch_and_add_int: +.q_atomic_fetch_and_add_int: + lwarx 5,0,3 + add 6,4,5 + stwcx. 6,0,3 + bne- $-12 + mr 3,5 + blr +LT..q_atomic_fetch_and_add_int: + .long 0 + .byte 0,9,32,64,0,0,1,0 + .long 0 + .long LT..q_atomic_fetch_and_add_int-.q_atomic_fetch_and_add_int + .short 18 + .byte "q_atomic_fetch_and_add_int" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_add_acquire_int + .globl .q_atomic_fetch_and_add_acquire_int +q_atomic_fetch_and_add_acquire_int: +.q_atomic_fetch_and_add_acquire_int: + lwarx 5,0,3 + add 6,4,5 + stwcx. 6,0,3 + bne- $-12 + isync + mr 3,5 + blr +LT..q_atomic_fetch_and_add_acquire_int: + .long 0 + .byte 0,9,32,64,0,0,1,0 + .long 0 + .long LT..q_atomic_fetch_and_add_acquire_int-.q_atomic_fetch_and_add_acquire_int + .short 18 + .byte "q_atomic_fetch_and_add_acquire_int" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_add_release_int + .globl .q_atomic_fetch_and_add_release_int +q_atomic_fetch_and_add_release_int: +.q_atomic_fetch_and_add_release_int: + lwarx 5,0,3 + add 6,4,5 + stwcx. 6,0,3 + bne- $-12 + mr 3,5 + blr +LT..q_atomic_fetch_and_add_release_int: + .long 0 + .byte 0,9,32,64,0,0,1,0 + .long 0 + .long LT..q_atomic_fetch_and_add_release_int-.q_atomic_fetch_and_add_release_int + .short 34 + .byte "q_atomic_fetch_and_add_release_int" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_add_ptr + .globl .q_atomic_fetch_and_add_ptr +q_atomic_fetch_and_add_ptr: +.q_atomic_fetch_and_add_ptr: + lwarx 5,0,3 + add 6,4,5 + stwcx. 6,0,3 + bne- $-12 + mr 3,5 + blr +LT..q_atomic_fetch_and_add_ptr: + .long 0 + .byte 0,9,32,64,0,0,1,0 + .long 0 + .long LT..q_atomic_fetch_and_add_ptr-.q_atomic_fetch_and_add_ptr + .short 26 + .byte "q_atomic_fetch_and_add_ptr" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_add_acquire_ptr + .globl .q_atomic_fetch_and_add_acquire_ptr +q_atomic_fetch_and_add_acquire_ptr: +.q_atomic_fetch_and_add_acquire_ptr: + lwarx 5,0,3 + add 6,4,5 + stwcx. 6,0,3 + bne- $-12 + isync + mr 3,5 + blr +LT..q_atomic_fetch_and_add_acquire_ptr: + .long 0 + .byte 0,9,32,64,0,0,1,0 + .long 0 + .long LT..q_atomic_fetch_and_add_acquire_ptr-.q_atomic_fetch_and_add_acquire_ptr + .short 34 + .byte "q_atomic_fetch_and_add_acquire_ptr" + .align 2 + + .align 2 + .globl q_atomic_fetch_and_add_release_ptr + .globl .q_atomic_fetch_and_add_release_ptr +q_atomic_fetch_and_add_release_ptr: +.q_atomic_fetch_and_add_release_ptr: + lwarx 5,0,3 + add 6,4,5 + stwcx. 6,0,3 + bne- $-12 + mr 3,5 + blr +LT..q_atomic_fetch_and_add_release_ptr: + .long 0 + .byte 0,9,32,64,0,0,1,0 + .long 0 + .long LT..q_atomic_fetch_and_add_release_ptr-.q_atomic_fetch_and_add_release_ptr + .short 34 + .byte "q_atomic_fetch_and_add_release_ptr" + .align 2 + +_section_.text: + .long _section_.text diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp index 188ac8ca90..7f89a8fdac 100644 --- a/src/corelib/codecs/qiconvcodec.cpp +++ b/src/corelib/codecs/qiconvcodec.cpp @@ -52,7 +52,7 @@ // unistd.h is needed for the _XOPEN_UNIX macro #include <unistd.h> -#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) +#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) # include <langinfo.h> #endif @@ -455,7 +455,7 @@ iconv_t QIconvCodec::createIconv_t(const char *to, const char *from) char *codeset = 0; #endif -#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) +#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) if (cd == (iconv_t) -1) { codeset = nl_langinfo(CODESET); if (codeset) diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 354f29b753..9e3fdf2408 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -84,7 +84,7 @@ #include <stdlib.h> #include <ctype.h> #include <locale.h> -#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) +#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) #include <langinfo.h> #endif @@ -545,7 +545,7 @@ static void setupLocaleMapper() localeMapper = QTextCodec::codecForName("System"); #endif -#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) +#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) if (!localeMapper) { char *charset = nl_langinfo (CODESET); if (charset) diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp index caf8baccab..8b042d96e5 100644 --- a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp +++ b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp @@ -52,6 +52,8 @@ #include <qt_windows.h> #endif +#include "private/qfunctions_p.h" + #ifndef QT_NO_CONCURRENT diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 0a8f5b9a04..375f4aa826 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -64,6 +64,10 @@ # endif #endif +#if defined(Q_OS_VXWORKS) +# include <envLib.h> +#endif + #if defined(Q_CC_MWERKS) && defined(Q_OS_MACX) #include <CoreServices/CoreServices.h> #endif @@ -1100,7 +1104,7 @@ bool qSharedBuild() \value WV_XP Windows XP (operating system version 5.1) \value WV_2003 Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2) \value WV_VISTA Windows Vista, Windows Server 2008 (operating system version 6.0) - \value WV_WINDOWS7 Windows 7 (operating system version 6.1) + \value WV_WINDOWS7 Windows 7, Windows Server 2008 R2 (operating system version 6.1) Alternatively, you may use the following macros which correspond directly to the Windows operating system version number: @@ -1109,7 +1113,7 @@ bool qSharedBuild() \value WV_5_1 Operating system version 5.1, corresponds to Windows XP \value WV_5_2 Operating system version 5.2, corresponds to Windows Server 2003, Windows Server 2003 R2, Windows Home Server, and Windows XP Professional x64 Edition \value WV_6_0 Operating system version 6.0, corresponds to Windows Vista and Windows Server 2008 - \value WV_6_1 Operating system version 6.1, corresponds to Windows 7 + \value WV_6_1 Operating system version 6.1, corresponds to Windows 7 and Windows Server 2008 R2 CE-based versions: @@ -1397,14 +1401,7 @@ bool qSharedBuild() \macro Q_OS_QNX \relates <QtGlobal> - Defined on QNX. -*/ - -/*! - \macro Q_OS_QNX6 - \relates <QtGlobal> - - Defined on QNX RTP 6.1. + Defined on QNX Neutrino. */ /*! @@ -2059,7 +2056,7 @@ QString qt_error_string(int errorCode) if (ret.isEmpty() && errorCode == ERROR_MOD_NOT_FOUND) ret = QString::fromLatin1("The specified module could not be found."); -#elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) +#elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX) QByteArray buf(1024, '\0'); strerror_r(errorCode, buf.data(), buf.size()); diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index dd876f5b71..9013416b51 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -244,8 +244,6 @@ namespace QT_NAMESPACE {} #elif defined(__DGUX__) # define Q_OS_DGUX #elif defined(__QNXNTO__) -# define Q_OS_QNX6 -#elif defined(__QNX__) # define Q_OS_QNX #elif defined(_SEQUENT_) # define Q_OS_DYNIX @@ -257,6 +255,8 @@ namespace QT_NAMESPACE {} # define Q_OS_UNIXWARE #elif defined(__INTEGRITY) # define Q_OS_INTEGRITY +#elif defined(VXWORKS) /* there is no "real" VxWorks define - this has to be set in the mkspec! */ +# define Q_OS_VXWORKS #elif defined(__MAKEDEPEND__) #else # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" @@ -436,25 +436,6 @@ namespace QT_NAMESPACE {} #elif defined(__WATCOMC__) # define Q_CC_WAT -# if defined(Q_OS_QNX4) -/* compiler flags */ -# define Q_TYPENAME -# define Q_NO_BOOL_TYPE -# define Q_CANNOT_DELETE_CONSTANT -# define mutable -/* ??? */ -# define Q_BROKEN_TEMPLATE_SPECIALIZATION -/* no template classes in QVariant */ -# define QT_NO_TEMPLATE_VARIANT -/* Wcc does not fill in functions needed by valuelists, maps, and - valuestacks implicitly */ -# define Q_FULL_TEMPLATE_INSTANTIATION -/* can we just compare the structures? */ -# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP -/* these are not useful to our customers */ -# define QT_NO_QWS_MULTIPROCESS -# define QT_NO_QWS_CURSOR -# endif /* Symbian GCCE */ #elif defined(__GCCE__) @@ -630,6 +611,13 @@ namespace QT_NAMESPACE {} # elif defined(__ghs) # define Q_CC_GHS +# elif defined(__DCC__) +# define Q_CC_DIAB +# undef Q_NO_BOOL_TYPE +# if !defined(__bool) +# define Q_NO_BOOL_TYPE +# endif + /* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ # elif defined(__USLC__) && defined(__SCO_VERSION__) # define Q_CC_USLC @@ -661,6 +649,11 @@ namespace QT_NAMESPACE {} # endif # endif +/* VxWorks' DIAB toolchain has an additional EDG type C++ compiler + (see __DCC__ above). This one is for C mode files (__EDG is not defined) */ +#elif defined(_DIAB_TOOL) +# define Q_CC_DIAB + /* Never tested! */ #elif defined(__HIGHC__) # define Q_CC_HIGHC @@ -1150,6 +1143,15 @@ class QDataStream; # define QT_NO_COP #endif +#if defined(Q_OS_VXWORKS) +# define QT_NO_CRASHHANDLER // no popen +# define QT_NO_PROCESS // no exec*, no fork +# define QT_NO_LPR +# define QT_NO_SHAREDMEMORY // only POSIX, no SysV and in the end... +# define QT_NO_SYSTEMSEMAPHORE // not needed at all in a flat address space +# define QT_NO_QWS_MULTIPROCESS // no processes +#endif + # include <QtCore/qfeatures.h> #define QT_SUPPORTS(FEATURE) (!defined(QT_NO_##FEATURE)) @@ -1649,7 +1651,7 @@ Q_CORE_EXPORT void qBadAlloc(); # define Q_CHECK_PTR(p) do { if (!(p)) qBadAlloc(); } while (0) #endif -#if (defined(Q_CC_GNU) && !defined(Q_OS_SOLARIS)) || defined(Q_CC_HPACC) +#if (defined(Q_CC_GNU) && !defined(Q_OS_SOLARIS)) || defined(Q_CC_HPACC) || defined(Q_CC_DIAB) # define Q_FUNC_INFO __PRETTY_FUNCTION__ #elif defined(_MSC_VER) /* MSVC 2002 doesn't have __FUNCSIG__ nor can it handle QT_STRINGIFY. */ @@ -2239,6 +2241,17 @@ inline const QForeachContainer<T> *qForeachContainer(const QForeachContainerBase qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->brk; \ --qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->brk) +#elif defined(Q_CC_DIAB) +// VxWorks DIAB generates unresolvable symbols, if container is a function call +# define Q_FOREACH(variable,container) \ + if(0){}else \ + for (const QForeachContainerBase &_container_ = qForeachContainerNew(container); \ + qForeachContainer(&_container_, (__typeof__(container) *) 0)->condition(); \ + ++qForeachContainer(&_container_, (__typeof__(container) *) 0)->i) \ + for (variable = *qForeachContainer(&_container_, (__typeof__(container) *) 0)->i; \ + qForeachContainer(&_container_, (__typeof__(container) *) 0)->brk; \ + --qForeachContainer(&_container_, (__typeof__(container) *) 0)->brk) + #else # define Q_FOREACH(variable, container) \ for (const QForeachContainerBase &_container_ = qForeachContainerNew(container); \ @@ -2558,6 +2571,17 @@ QT_LICENSED_MODULE(DBus) # define QT_NO_CONCURRENT_FILTER #endif +#ifdef Q_OS_QNX +// QNX doesn't have SYSV style shared memory. Multiprocess QWS apps, +// shared fonts and QSystemSemaphore + QSharedMemory are not available +# define QT_NO_QWS_MULTIPROCESS +# define QT_NO_QWS_SHARE_FONTS +# define QT_NO_SYSTEMSEMAPHORE +# define QT_NO_SHAREDMEMORY +// QNX currently doesn't support forking in a thread, so disable QProcess +# define QT_NO_PROCESS +#endif + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.cpp b/src/corelib/io/qfilesystemwatcher_fsevents.cpp index 3e0aee89c0..cb276b795b 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents.cpp +++ b/src/corelib/io/qfilesystemwatcher_fsevents.cpp @@ -422,9 +422,12 @@ void QFSEventsFileSystemWatcherEngine::fseventsCallback(ConstFSEventStreamRef , void QFSEventsFileSystemWatcherEngine::stop() { #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 + QMutexLocker locker(&mutex); stopFSStream(fsStream); - if (threadsRunLoop) + if (threadsRunLoop) { CFRunLoopStop(threadsRunLoop); + waitForStop.wait(&mutex); + } #endif } @@ -461,6 +464,8 @@ void QFSEventsFileSystemWatcherEngine::run() // immediately. CFRunLoopRun(); threadsRunLoop = 0; + QMutexLocker locker(&mutex); + waitForStop.wakeAll(); #endif } diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h index 4770867258..ffc0c687f9 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h +++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h @@ -114,6 +114,7 @@ private: CFRunLoopRef threadsRunLoop; QMutex mutex; QWaitCondition waitCondition; + QWaitCondition waitForStop; #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 PathHash filePathInfoHash; PathHash dirPathInfoHash; diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 6a0e7add33..6c5db5fb89 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -464,7 +464,7 @@ bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) con if (QT_STAT(chunk, &st) != -1) { if ((st.st_mode & S_IFMT) != S_IFDIR) return false; - } else if (::mkdir(chunk, 0777) != 0) { + } else if (QT_MKDIR(chunk, 0777) != 0) { return false; } } @@ -475,7 +475,7 @@ bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) con if (dirName[dirName.length() - 1] == QLatin1Char('/')) dirName = dirName.left(dirName.length() - 1); #endif - return (::mkdir(QFile::encodeName(dirName), 0777) == 0); + return (QT_MKDIR(QFile::encodeName(dirName), 0777) == 0); } bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index f46877a95b..e15fcf2360 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -62,6 +62,15 @@ //#define DEBUG_RESOURCE_MATCH +#if defined(Q_OS_VXWORKS) +# if defined(m_data) +# undef m_data +# endif +# if defined(m_len) +# undef m_len +# endif +#endif + QT_BEGIN_NAMESPACE diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 4e442614ca..20cd8a71d2 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -74,6 +74,10 @@ #endif // Q_OS_WIN #endif // QT_NO_QOBJECT +#ifdef Q_OS_VXWORKS +# include <ioLib.h> +#endif + #include <stdlib.h> #ifndef CSIDL_COMMON_APPDATA @@ -167,7 +171,7 @@ static bool isLikelyToBeNfs(int handle) } #elif defined(Q_OS_SOLARIS) || defined(Q_OS_IRIX) || defined(Q_OS_AIX) || defined(Q_OS_HPUX) \ - || defined(Q_OS_OSF) || defined(Q_OS_QNX) || defined(Q_OS_QNX6) || defined(Q_OS_SCO) \ + || defined(Q_OS_OSF) || defined(Q_OS_QNX) || defined(Q_OS_SCO) \ || defined(Q_OS_UNIXWARE) || defined(Q_OS_RELIANT) || defined(Q_OS_NETBSD) QT_BEGIN_INCLUDE_NAMESPACE # include <sys/statvfs.h> diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index e098064be4..5dc30c5af1 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -73,7 +73,10 @@ #if defined(Q_OS_WINCE) # include <types.h> -# include "qfunctions_wince.h" +#endif + +#if defined(Q_OS_VXWORKS) +# include <taskLib.h> #endif QT_BEGIN_NAMESPACE @@ -133,6 +136,8 @@ static int _gettemp(char *path, int *doopen, int domkdir, int slen) } #if defined(Q_OS_WIN) && defined(_MSC_VER) && _MSC_VER >= 1400 pid = _getpid(); +#elif defined(Q_OS_VXWORKS) + pid = (pid_t) taskIdCurrent; #else pid = getpid(); #endif @@ -234,7 +239,7 @@ static int _gettemp(char *path, int *doopen, int domkdir, int slen) #ifdef Q_OS_WIN if (QT_MKDIR(path) == 0) #else - if (mkdir(path, 0700) == 0) + if (QT_MKDIR(path, 0700) == 0) #endif return 1; if (errno != EEXIST) diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri index 4b7baef0b5..124b2b386c 100644 --- a/src/corelib/kernel/kernel.pri +++ b/src/corelib/kernel/kernel.pri @@ -32,7 +32,8 @@ HEADERS += \ kernel/qsharedmemory_p.h \ kernel/qsystemsemaphore.h \ kernel/qsystemsemaphore_p.h \ - kernel/qfunctions_p.h + kernel/qfunctions_p.h \ + kernel/qguard_p.h SOURCES += \ kernel/qabstracteventdispatcher.cpp \ @@ -54,7 +55,7 @@ SOURCES += \ kernel/qcoreglobaldata.cpp \ kernel/qsharedmemory.cpp \ kernel/qsystemsemaphore.cpp \ - kernel/qpointer.cpp + kernel/qpointer.cpp win32 { SOURCES += \ @@ -128,3 +129,10 @@ symbian { kernel/qcore_symbian_p.h } +vxworks { + SOURCES += \ + kernel/qfunctions_vxworks.cpp + HEADERS += \ + kernel/qfunctions_vxworks.h +} + diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 3d9263ebc4..bc95c60195 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -467,6 +467,27 @@ QAbstractItemModel *QAbstractItemModelPrivate::staticEmptyModel() return qEmptyModel(); } +namespace { + struct DefaultRoleNames : public QHash<int, QByteArray> + { + DefaultRoleNames() { + (*this)[Qt::DisplayRole] = "display"; + (*this)[Qt::DecorationRole] = "decoration"; + (*this)[Qt::EditRole] = "edit"; + (*this)[Qt::ToolTipRole] = "toolTip"; + (*this)[Qt::StatusTipRole] = "statusTip"; + (*this)[Qt::WhatsThisRole] = "whatsThis"; + } + }; +} + +Q_GLOBAL_STATIC(DefaultRoleNames, qDefaultRoleNames) + +const QHash<int,QByteArray> &QAbstractItemModelPrivate::defaultRoleNames() +{ + return *qDefaultRoleNames(); +} + /*! \internal return true if \a value contains a numerical type @@ -1863,6 +1884,33 @@ QSize QAbstractItemModel::span(const QModelIndex &) const } /*! + Sets the model's role names to \a roleNames. + + This function is provided to allow mapping of role identifiers to + role property names in Declarative UI. This function must be called + before the model is used. Modifying the role names after the model + has been set may result in undefined behaviour. + + \sa roleNames() +*/ +void QAbstractItemModel::setRoleNames(const QHash<int,QByteArray> &roleNames) +{ + Q_D(QAbstractItemModel); + d->roleNames = roleNames; +} + +/*! + Returns the model's role names. + + \sa setRoleNames() +*/ +const QHash<int,QByteArray> &QAbstractItemModel::roleNames() const +{ + Q_D(const QAbstractItemModel); + return d->roleNames; +} + +/*! Called to let the model know that it should submit whatever it has cached to the permanent storage. Typically used for row editing. diff --git a/src/corelib/kernel/qabstractitemmodel.h b/src/corelib/kernel/qabstractitemmodel.h index dc7d7bdac3..a6bbff4aa4 100644 --- a/src/corelib/kernel/qabstractitemmodel.h +++ b/src/corelib/kernel/qabstractitemmodel.h @@ -220,6 +220,8 @@ public: Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const; virtual QSize span(const QModelIndex &index) const; + const QHash<int,QByteArray> &roleNames() const; + #ifdef Q_NO_USING_KEYWORD inline QObject *parent() const { return QObject::parent(); } #else @@ -282,6 +284,8 @@ protected: void changePersistentIndexList(const QModelIndexList &from, const QModelIndexList &to); QModelIndexList persistentIndexList() const; + void setRoleNames(const QHash<int,QByteArray> &roleNames); + private: Q_DECLARE_PRIVATE(QAbstractItemModel) Q_DISABLE_COPY(QAbstractItemModel) diff --git a/src/corelib/kernel/qabstractitemmodel_p.h b/src/corelib/kernel/qabstractitemmodel_p.h index c047f95132..6a29723af1 100644 --- a/src/corelib/kernel/qabstractitemmodel_p.h +++ b/src/corelib/kernel/qabstractitemmodel_p.h @@ -78,7 +78,7 @@ class Q_CORE_EXPORT QAbstractItemModelPrivate : public QObjectPrivate Q_DECLARE_PUBLIC(QAbstractItemModel) public: - QAbstractItemModelPrivate() : QObjectPrivate(), supportedDragActions(-1) {} + QAbstractItemModelPrivate() : QObjectPrivate(), supportedDragActions(-1), roleNames(defaultRoleNames()) {} void removePersistentIndexData(QPersistentModelIndexData *data); void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last); void rowsInserted(const QModelIndex &parent, int first, int last); @@ -144,6 +144,9 @@ public: } persistent; Qt::DropActions supportedDragActions; + + QHash<int,QByteArray> roleNames; + static const QHash<int,QByteArray> &defaultRoleNames(); }; QT_END_NAMESPACE diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp index 28c1d9cd92..b57d385bc6 100644 --- a/src/corelib/kernel/qcore_unix.cpp +++ b/src/corelib/kernel/qcore_unix.cpp @@ -41,11 +41,14 @@ #include "qcore_unix_p.h" -#include <sys/select.h> -#include <sys/time.h> -#include <stdlib.h> +#ifndef Q_OS_VXWORKS +# include <sys/select.h> +# include <sys/time.h> +#else +# include <selectLib.h> +#endif -#include "qeventdispatcher_unix_p.h" // for the timeval operators +#include <stdlib.h> #ifdef Q_OS_MAC #include <mach/mach_time.h> diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h index 28bc34a1a0..e301c924e5 100644 --- a/src/corelib/kernel/qcore_unix_p.h +++ b/src/corelib/kernel/qcore_unix_p.h @@ -67,6 +67,10 @@ #include <errno.h> #include <fcntl.h> +#if defined(Q_OS_VXWORKS) +# include <ioLib.h> +#endif + struct sockaddr; #if defined(Q_OS_LINUX) && defined(__GLIBC__) && (__GLIBC__ * 0x100 + __GLIBC_MINOR__) >= 0x0204 @@ -110,6 +114,51 @@ using namespace QT_PREPEND_NAMESPACE(QtLibcSupplement); QT_BEGIN_NAMESPACE +// Internal operator functions for timevals +inline timeval &normalizedTimeval(timeval &t) +{ + while (t.tv_usec > 1000000l) { + ++t.tv_sec; + t.tv_usec -= 1000000l; + } + while (t.tv_usec < 0l) { + --t.tv_sec; + t.tv_usec += 1000000l; + } + return t; +} +inline bool operator<(const timeval &t1, const timeval &t2) +{ return t1.tv_sec < t2.tv_sec || (t1.tv_sec == t2.tv_sec && t1.tv_usec < t2.tv_usec); } +inline bool operator==(const timeval &t1, const timeval &t2) +{ return t1.tv_sec == t2.tv_sec && t1.tv_usec == t2.tv_usec; } +inline timeval &operator+=(timeval &t1, const timeval &t2) +{ + t1.tv_sec += t2.tv_sec; + t1.tv_usec += t2.tv_usec; + return normalizedTimeval(t1); +} +inline timeval operator+(const timeval &t1, const timeval &t2) +{ + timeval tmp; + tmp.tv_sec = t1.tv_sec + t2.tv_sec; + tmp.tv_usec = t1.tv_usec + t2.tv_usec; + return normalizedTimeval(tmp); +} +inline timeval operator-(const timeval &t1, const timeval &t2) +{ + timeval tmp; + tmp.tv_sec = t1.tv_sec - (t2.tv_sec - 1); + tmp.tv_usec = t1.tv_usec - (t2.tv_usec + 1000000); + return normalizedTimeval(tmp); +} +inline timeval operator*(const timeval &t1, int mul) +{ + timeval tmp; + tmp.tv_sec = t1.tv_sec * mul; + tmp.tv_usec = t1.tv_usec * mul; + return normalizedTimeval(tmp); +} + // don't call QT_OPEN or ::open // call qt_safe_open static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 0777) @@ -129,6 +178,7 @@ static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 07 #undef QT_OPEN #define QT_OPEN qt_safe_open +#ifndef Q_OS_VXWORKS // no POSIX pipes in VxWorks // don't call ::pipe // call qt_safe_pipe static inline int qt_safe_pipe(int pipefd[2], int flags = 0) @@ -164,6 +214,8 @@ static inline int qt_safe_pipe(int pipefd[2], int flags = 0) return 0; } +#endif // Q_OS_VXWORKS + // don't call dup or fcntl(F_DUPFD) static inline int qt_safe_dup(int oldfd, int atleast = 0, int flags = FD_CLOEXEC) { @@ -238,8 +290,8 @@ static inline int qt_safe_close(int fd) #undef QT_CLOSE #define QT_CLOSE qt_safe_close -// Open C does not (yet?) implement these on Symbian OS -#ifndef Q_OS_SYMBIAN +// Open C does not (yet?) implement these on Symbian OS and VxWorks doesn't have processes +#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_VXWORKS) static inline int qt_safe_execve(const char *filename, char *const argv[], char *const envp[]) { @@ -263,6 +315,7 @@ static inline int qt_safe_execvp(const char *file, char *const argv[]) } #endif +#ifndef Q_OS_VXWORKS // no processes on VxWorks static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options) { register int ret; @@ -270,6 +323,12 @@ static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options) return ret; } +#endif // Q_OS_VXWORKS + +#if !defined(_POSIX_MONOTONIC_CLOCK) +# define _POSIX_MONOTONIC_CLOCK -1 +#endif + bool qt_gettime_is_monotonic(); timeval qt_gettime(); Q_CORE_EXPORT int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept, diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 5865dc38c0..b84ad5334e 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -61,6 +61,7 @@ #include <private/qthread_p.h> #include <qlibraryinfo.h> #include <private/qfactoryloader_p.h> +#include <private/qfunctions_p.h> #ifdef Q_OS_SYMBIAN # include <exception> @@ -88,6 +89,10 @@ # include <locale.h> #endif +#ifdef Q_OS_VXWORKS +# include <taskLib.h> +#endif + QT_BEGIN_NAMESPACE class QLockedMutexUnlocker @@ -1917,8 +1922,9 @@ qint64 QCoreApplication::applicationPid() { #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) return GetCurrentProcessId(); +#elif defined(Q_OS_VXWORKS) + return (pid_t) taskIdCurrent; #else - // UNIX return getpid(); #endif } diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index c3979e8259..78a2b0be51 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -55,6 +55,16 @@ #include <stdio.h> #include <stdlib.h> +// VxWorks doesn't correctly set the _POSIX_... options +#if defined(Q_OS_VXWORKS) +# if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK <= 0) +# undef _POSIX_MONOTONIC_CLOCK +# define _POSIX_MONOTONIC_CLOCK 1 +# endif +# include <pipeDrv.h> +# include <selectLib.h> +#endif + #if (_POSIX_MONOTONIC_CLOCK-0 <= 0) || defined(QT_BOOTSTRAPPED) # include <sys/times.h> #endif @@ -77,7 +87,7 @@ static void signalHandler(int sig) } -#ifdef Q_OS_INTEGRITY +#if defined(Q_OS_INTEGRITY) || defined(Q_OS_VXWORKS) static void initThreadPipeFD(int fd) { int ret = fcntl(fd, F_SETFD, FD_CLOEXEC); @@ -98,20 +108,47 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() { extern Qt::HANDLE qt_application_thread_id; mainThread = (QThread::currentThreadId() == qt_application_thread_id); + bool pipefail = false; // initialize the common parts of the event loop -#ifdef Q_OS_INTEGRITY +#if defined(Q_OS_INTEGRITY) // INTEGRITY doesn't like a "select" on pipes, so use socketpair instead - if (socketpair(AF_INET, SOCK_STREAM, PF_INET, thread_pipe) == -1) + if (socketpair(AF_INET, SOCK_STREAM, PF_INET, thread_pipe) == -1) { perror("QEventDispatcherUNIXPrivate(): Unable to create socket pair"); - - initThreadPipeFD(thread_pipe[0]); - initThreadPipeFD(thread_pipe[1]); + pipefail = true; + } else { + initThreadPipeFD(thread_pipe[0]); + initThreadPipeFD(thread_pipe[1]); + } +#elif defined(Q_OS_VXWORKS) + char name[20]; + qsnprintf(name, sizeof(name), "/pipe/qt_%08x", int(taskIdCurrent)); + + // make sure there is no pipe with this name + pipeDevDelete(name, true); + // create the pipe + if (pipeDevCreate(name, 128 /*maxMsg*/, 1 /*maxLength*/) != OK) { + perror("QEventDispatcherUNIXPrivate(): Unable to create thread pipe device"); + pipefail = true; + } else { + if ((thread_pipe[0] = open(name, O_RDWR, 0)) < 0) { + perror("QEventDispatcherUNIXPrivate(): Unable to create thread pipe"); + pipefail = true; + } else { + initThreadPipeFD(thread_pipe[0]); + thread_pipe[1] = thread_pipe[0]; + } + } #else - if (qt_safe_pipe(thread_pipe, O_NONBLOCK) == -1) + if (qt_safe_pipe(thread_pipe, O_NONBLOCK) == -1) { perror("QEventDispatcherUNIXPrivate(): Unable to create thread pipe"); + pipefail = true; + } #endif + if (pipefail) + qFatal("QEventDispatcherUNIXPrivate(): Can not continue without a thread pipe"); + sn_highest = -1; interrupt = false; @@ -119,9 +156,18 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() QEventDispatcherUNIXPrivate::~QEventDispatcherUNIXPrivate() { +#if defined(Q_OS_VXWORKS) + close(thread_pipe[0]); + + char name[20]; + qsnprintf(name, sizeof(name), "/pipe/qt_%08x", int(taskIdCurrent)); + + pipeDevDelete(name, true); +#else // cleanup the common parts of the event loop close(thread_pipe[0]); close(thread_pipe[1]); +#endif // cleanup timers qDeleteAll(timerList); @@ -226,9 +272,15 @@ int QEventDispatcherUNIXPrivate::doSelect(QEventLoop::ProcessEventsFlags flags, // select doesn't immediately return next time int nevents = 0; if (nsel > 0 && FD_ISSET(thread_pipe[0], &sn_vec[0].select_fds)) { +#if defined(Q_OS_VXWORKS) + char c[16]; + ::read(thread_pipe[0], c, sizeof(c)); + ::ioctl(thread_pipe[0], FIOFLUSH, 0); +#else char c[16]; while (::read(thread_pipe[0], c, sizeof(c)) > 0) ; +#endif if (!wakeUps.testAndSetRelease(1, 0)) { // hopefully, this is dead code qWarning("QEventDispatcherUNIX: internal error, wakeUps.testAndSetRelease(1, 0) failed!"); @@ -313,7 +365,7 @@ timeval qAbs(const timeval &t) */ bool QTimerInfoList::timeChanged(timeval *delta) { - tms unused; + struct tms unused; clock_t currentTicks = times(&unused); clock_t elapsedTicks = currentTicks - previousTicks; diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h index fedbccf45d..a52af009da 100644 --- a/src/corelib/kernel/qeventdispatcher_unix_p.h +++ b/src/corelib/kernel/qeventdispatcher_unix_p.h @@ -56,65 +56,20 @@ #include "QtCore/qabstracteventdispatcher.h" #include "QtCore/qlist.h" #include "private/qabstracteventdispatcher_p.h" +#include "private/qcore_unix_p.h" #include "private/qpodlist_p.h" #include "QtCore/qvarlengtharray.h" -#include <sys/types.h> -#include <sys/time.h> -#if !defined(Q_OS_HPUX) || defined(__ia64) -#include <sys/select.h> +#if defined(Q_OS_VXWORKS) +# include <sys/times.h> +#else +# include <sys/time.h> +# if !defined(Q_OS_HPUX) || defined(__ia64) +# include <sys/select.h> +# endif #endif -#include <unistd.h> QT_BEGIN_NAMESPACE -#if !defined(_POSIX_MONOTONIC_CLOCK) -# define _POSIX_MONOTONIC_CLOCK -1 -#endif - -// Internal operator functions for timevals -inline timeval &normalizedTimeval(timeval &t) -{ - while (t.tv_usec > 1000000l) { - ++t.tv_sec; - t.tv_usec -= 1000000l; - } - while (t.tv_usec < 0l) { - --t.tv_sec; - t.tv_usec += 1000000l; - } - return t; -} -inline bool operator<(const timeval &t1, const timeval &t2) -{ return t1.tv_sec < t2.tv_sec || (t1.tv_sec == t2.tv_sec && t1.tv_usec < t2.tv_usec); } -inline bool operator==(const timeval &t1, const timeval &t2) -{ return t1.tv_sec == t2.tv_sec && t1.tv_usec == t2.tv_usec; } -inline timeval &operator+=(timeval &t1, const timeval &t2) -{ - t1.tv_sec += t2.tv_sec; - t1.tv_usec += t2.tv_usec; - return normalizedTimeval(t1); -} -inline timeval operator+(const timeval &t1, const timeval &t2) -{ - timeval tmp; - tmp.tv_sec = t1.tv_sec + t2.tv_sec; - tmp.tv_usec = t1.tv_usec + t2.tv_usec; - return normalizedTimeval(tmp); -} -inline timeval operator-(const timeval &t1, const timeval &t2) -{ - timeval tmp; - tmp.tv_sec = t1.tv_sec - (t2.tv_sec - 1); - tmp.tv_usec = t1.tv_usec - (t2.tv_usec + 1000000); - return normalizedTimeval(tmp); -} -inline timeval operator*(const timeval &t1, int mul) -{ - timeval tmp; - tmp.tv_sec = t1.tv_sec * mul; - tmp.tv_usec = t1.tv_usec * mul; - return normalizedTimeval(tmp); -} // internal timer info struct QTimerInfo { diff --git a/src/corelib/kernel/qfunctions_p.h b/src/corelib/kernel/qfunctions_p.h index a7f2f9d9a0..ad44a15f29 100644 --- a/src/corelib/kernel/qfunctions_p.h +++ b/src/corelib/kernel/qfunctions_p.h @@ -57,6 +57,8 @@ #if defined(Q_OS_WINCE) # include "QtCore/qfunctions_wince.h" +#elif defined(Q_OS_VXWORKS) +# include "QtCore/qfunctions_vxworks.h" #endif #ifdef Q_CC_RVCT diff --git a/src/corelib/kernel/qfunctions_vxworks.cpp b/src/corelib/kernel/qfunctions_vxworks.cpp new file mode 100644 index 0000000000..6d5e7ccb7f --- /dev/null +++ b/src/corelib/kernel/qfunctions_vxworks.cpp @@ -0,0 +1,202 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qglobal.h" + +#ifdef Q_OS_VXWORKS + +#include "qplatformdefs.h" +#include "qfunctions_vxworks.h" + +#include <vmLib.h> +#include <selectLib.h> +#include <ioLib.h> + +QT_USE_NAMESPACE + +#ifdef __cplusplus +extern "C" { +#endif + +// no lfind() - used by the TIF image format +void *lfind(const void* key, const void* base, size_t* elements, size_t size, + int (*compare)(const void*, const void*)) +{ + const char* current = (char*) base; + const char* const end = (char*) (current + (*elements) * size); + while (current != end) { + if (compare(current, key) == 0) + return (void*)current; + current += size; + } + return 0; +} + + +// no rand_r(), but rand() +// NOTE: this implementation is wrong for multi threaded applications, +// but there is no way to get it right on VxWorks (in kernel mode) +int rand_r(unsigned int * /*seedp*/) +{ + return rand(); +} + +// no usleep() support +int usleep(unsigned int usec) +{ + div_t dt = div(usec, 1000000); + struct timespec ts = { dt.quot, dt.rem * 1000 }; + + return nanosleep(&ts, 0); +} + + +// gettimeofday() is declared, but is missing from the library +// It IS however defined in the Curtis-Wright X11 libraries, so +// we have to make the symbol 'weak' +#if defined(Q_CC_DIAB) +# pragma weak gettimeofday +#endif +int gettimeofday(struct timeval *tv, void /*struct timezone*/ *) +{ + // the compiler will optimize this and will only use one code path + if (sizeof(struct timeval) == sizeof(struct timespec)) { + int res = clock_gettime(CLOCK_REALTIME, (struct timespec *) tv); + if (!res) + tv->tv_usec /= 1000; + return res; + } else { + struct timespec ts; + + int res = clock_gettime(CLOCK_REALTIME, &ts); + if (!res) { + tv->tv_sec = ts.tv_sec; + tv->tv_usec = ts.tv_nsec / 1000; + } + return res; + } +} + +// neither getpagesize() or sysconf(_SC_PAGESIZE) are available +int getpagesize() +{ + return vmPageSizeGet(); +} + +// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h) +int symlink(const char *, const char *) +{ + errno = EIO; + return -1; +} + +ssize_t readlink(const char *, char *, size_t) +{ + errno = EIO; + return -1; +} + +// there's no truncate(), but ftruncate() support... +int truncate(const char *path, off_t length) +{ + int fd = open(path, O_WRONLY, 00777); + if (fd >= 0) { + int res = ftruncate(fd, length); + int en = errno; + close(fd); + errno = en; + return res; + } + // errno is already set by open + return -1; +} + + + +// VxWorks doesn't know about passwd & friends. +// in order to avoid patching the unix fs path everywhere +// we introduce some dummy functions that simulate a single +// 'root' user on the system. + +uid_t getuid() +{ + return 0; +} + +gid_t getgid() +{ + return 0; +} + +uid_t geteuid() +{ + return 0; +} + +struct passwd *getpwuid(uid_t uid) +{ + static struct passwd pwbuf = { "root", 0, 0, 0, 0, 0, 0 }; + + if (uid == 0) { + return &pwbuf; + } else { + errno = ENOENT; + return 0; + } +} + +struct group *getgrgid(gid_t gid) +{ + static struct group grbuf = { "root", 0, 0, 0 }; + + if (gid == 0) { + return &grbuf; + } else { + errno = ENOENT; + return 0; + } +} + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // Q_OS_VXWORKS diff --git a/src/corelib/kernel/qfunctions_vxworks.h b/src/corelib/kernel/qfunctions_vxworks.h new file mode 100644 index 0000000000..cc989488b8 --- /dev/null +++ b/src/corelib/kernel/qfunctions_vxworks.h @@ -0,0 +1,153 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QFUNCTIONS_VXWORKS_H +#define QFUNCTIONS_VXWORKS_H +#ifdef Q_OS_VXWORKS + +#include <unistd.h> +#include <pthread.h> +#include <dirent.h> +#include <signal.h> +#include <string.h> +#include <strings.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/times.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <netinet/in.h> +#ifndef QT_NO_IPV6IFNAME +#include <net/if.h> +#endif + +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + +#ifdef QT_BUILD_CORE_LIB +QT_MODULE(Core) +#endif + +QT_END_NAMESPACE +QT_END_HEADER + + +#ifndef RTLD_LOCAL +#define RTLD_LOCAL 0 +#endif + +#ifndef NSIG +#define NSIG _NSIGS +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// isascii is missing (sometimes!!) +#ifndef isascii +inline int isascii(int c) { return (c & 0x7f); } +#endif + +// no lfind() - used by the TIF image format +void *lfind(const void* key, const void* base, size_t* elements, size_t size, + int (*compare)(const void*, const void*)); + +// no rand_r(), but rand() +// NOTE: this implementation is wrong for multi threaded applications, +// but there is no way to get it right on VxWorks (in kernel mode) +int rand_r(unsigned int * /*seedp*/); + +// no usleep() support +int usleep(unsigned int); + +// gettimeofday() is declared, but is missing from the library. +// It IS however defined in the Curtis-Wright X11 libraries, so +// we have to make the symbol 'weak' +int gettimeofday(struct timeval *tv, void /*struct timezone*/ *) __attribute__((weak)); + +// neither getpagesize() or sysconf(_SC_PAGESIZE) are available +int getpagesize(); + +// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h) +int symlink(const char *, const char *); +ssize_t readlink(const char *, char *, size_t); + +// there's no truncate(), but ftruncate() support... +int truncate(const char *path, off_t length); + +// VxWorks doesn't know about passwd & friends. +// in order to avoid patching the unix fs path everywhere +// we introduce some dummy functions that simulate a single +// 'root' user on the system. + +uid_t getuid(); +gid_t getgid(); +uid_t geteuid(); + +struct passwd { + char *pw_name; /* user name */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ +}; + +struct group { + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* group members */ +}; + +struct passwd *getpwuid(uid_t uid); +struct group *getgrgid(gid_t gid); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // Q_OS_VXWORKS +#endif // QFUNCTIONS_VXWORKS_H diff --git a/src/corelib/kernel/qguard_p.h b/src/corelib/kernel/qguard_p.h new file mode 100644 index 0000000000..6af01ac43c --- /dev/null +++ b/src/corelib/kernel/qguard_p.h @@ -0,0 +1,157 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QGUARD_P_H +#define QGUARD_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header +// file may change from version to version without notice, or even be removed. +// +// We mean it. +// + +#include "QtCore/qglobal.h" + +QT_BEGIN_NAMESPACE + +class QObject; +template<class T> +class QGuard +{ + QObject *o; + QGuard<QObject> *next; + QGuard<QObject> **prev; + friend void q_guard_addGuard(QGuard<QObject> *); + friend void q_guard_removeGuard(QGuard<QObject> *); + friend class QObjectPrivate; +public: + inline QGuard(); + inline QGuard(T *); + inline QGuard(const QGuard<T> &); + inline virtual ~QGuard(); + + inline QGuard<T> &operator=(const QGuard<T> &o); + inline QGuard<T> &operator=(T *); + + inline bool isNull() const + { return !o; } + + inline T* operator->() const + { return static_cast<T*>(const_cast<QObject*>(o)); } + inline T& operator*() const + { return *static_cast<T*>(const_cast<QObject*>(o)); } + inline operator T*() const + { return static_cast<T*>(const_cast<QObject*>(o)); } + inline T* data() const + { return static_cast<T*>(const_cast<QObject*>(o)); } + +protected: + virtual void objectDestroyed(T *) {} +}; + +QT_END_NAMESPACE + +#include "private/qobject_p.h" + +QT_BEGIN_NAMESPACE + +inline void q_guard_addGuard(QGuard<QObject> *); +inline void q_guard_removeGuard(QGuard<QObject> *); + +template<class T> +QGuard<T>::QGuard() +: o(0), next(0), prev(0) +{ +} + +template<class T> +QGuard<T>::QGuard(T *g) +: o(g), next(0), prev(0) +{ + if (o) q_guard_addGuard(reinterpret_cast<QGuard<QObject> *>(this)); +} + +template<class T> +QGuard<T>::QGuard(const QGuard<T> &g) +: o(g.o), next(0), prev(0) +{ + if (o) q_guard_addGuard(reinterpret_cast<QGuard<QObject> *>(this)); +} + +template<class T> +QGuard<T>::~QGuard() +{ + if (prev) q_guard_removeGuard(reinterpret_cast<QGuard<QObject> *>(this)); + o = 0; +} + +template<class T> +QGuard<T> &QGuard<T>::operator=(const QGuard<T> &g) +{ + if (g.o != o) { + if (prev) + q_guard_removeGuard(reinterpret_cast<QGuard<QObject> *>(this)); + o = g.o; + if (o) q_guard_addGuard(reinterpret_cast<QGuard<QObject> *>(this)); + } + return *this; +} + +template<class T> +inline QGuard<T> &QGuard<T>::operator=(T *g) +{ + if (g != o) { + if (prev) + q_guard_removeGuard(reinterpret_cast<QGuard<QObject> *>(this)); + o = g; + if (o) q_guard_addGuard(reinterpret_cast<QGuard<QObject> *>(this)); + } + return *this; +} + +QT_END_NAMESPACE + +#endif // QGUARD_P_H diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 08cecaffc0..9ff0bc173b 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -148,7 +148,9 @@ enum PropertyFlags { Resettable = 0x00000004, EnumOrFlag = 0x00000008, StdCppSet = 0x00000100, -// Override = 0x00000200, +// Override = 0x00000200, + Constant = 0x00000400, + Final = 0x00000800, Designable = 0x00001000, ResolveDesignable = 0x00002000, Scriptable = 0x00004000, @@ -179,6 +181,10 @@ enum MethodFlags { MethodScriptable = 0x40 }; +enum MetaObjectFlags { + DynamicMetaObject = 0x01 +}; + struct QMetaObjectPrivate { int revision; @@ -188,6 +194,7 @@ struct QMetaObjectPrivate int propertyCount, propertyData; int enumeratorCount, enumeratorData; int constructorCount, constructorData; + int flags; }; static inline const QMetaObjectPrivate *priv(const uint* data) @@ -277,6 +284,17 @@ int QMetaObject::static_metacall(Call cl, int idx, void **argv) const } /*! + \internal +*/ +int QMetaObject::metacall(QObject *object, Call cl, int idx, void **argv) +{ + if (QMetaObject *mo = object->d_ptr->metaObject) + return static_cast<QAbstractDynamicMetaObject*>(mo)->metaCall(cl, idx, argv); + else + return object->qt_metacall(cl, idx, argv); +} + +/*! \fn const char *QMetaObject::className() const Returns the class name. @@ -696,6 +714,14 @@ int QMetaObject::indexOfProperty(const char *name) const } m = m->d.superdata; } + + if (i == -1 && priv(this->d.data)->revision >= 3 && (priv(this->d.data)->flags & DynamicMetaObject)){ + QAbstractDynamicMetaObject *me = + const_cast<QAbstractDynamicMetaObject *>(static_cast<const QAbstractDynamicMetaObject *>(this)); + + i = me->createProperty(name, 0); + } + return i; } @@ -1326,6 +1352,16 @@ int QMetaMethod::attributes() const } /*! + Returns this method's index. +*/ +int QMetaMethod::methodIndex() const +{ + if (!mobj) + return -1; + return ((handle - priv(mobj->d.data)->methodData) / 5) + mobj->methodOffset(); +} + +/*! Returns the access specification of this method (private, protected, or public). @@ -1525,7 +1561,7 @@ bool QMetaMethod::invoke(QObject *object, // recompute the methodIndex by reversing the arithmetic in QMetaObject::property() int methodIndex = ((handle - priv(mobj->d.data)->methodData) / 5) + mobj->methodOffset(); if (connectionType == Qt::DirectConnection) { - return object->qt_metacall(QMetaObject::InvokeMetaMethod, methodIndex, param) < 0; + return QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, methodIndex, param) < 0; } else { if (returnValue.data()) { qWarning("QMetaMethod::invoke: Unable to invoke methods with return values in " @@ -2040,6 +2076,16 @@ int QMetaProperty::userType() const } /*! + Returns this property's index. +*/ +int QMetaProperty::propertyIndex() const +{ + if (!mobj) + return -1; + return idx + mobj->propertyOffset(); +} + +/*! Returns true if the property's type is an enumeration value that is used as a flag; otherwise returns false. @@ -2151,9 +2197,8 @@ QVariant QMetaProperty::read(const QObject *object) const value = QVariant(t, (void*)0); argv[0] = value.data(); } - const_cast<QObject*>(object)->qt_metacall(QMetaObject::ReadProperty, - idx + mobj->propertyOffset(), - argv); + QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::ReadProperty, + idx + mobj->propertyOffset(), argv); if (status != -1) return value; @@ -2224,7 +2269,7 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const argv[0] = &v; else argv[0] = v.data(); - object->qt_metacall(QMetaObject::WriteProperty, idx + mobj->propertyOffset(), argv); + QMetaObject::metacall(object, QMetaObject::WriteProperty, idx + mobj->propertyOffset(), argv); return status; } @@ -2241,7 +2286,7 @@ bool QMetaProperty::reset(QObject *object) const if (!object || !mobj || !isResettable()) return false; void *argv[] = { 0 }; - object->qt_metacall(QMetaObject::ResetProperty, idx + mobj->propertyOffset(), argv); + QMetaObject::metacall(object, QMetaObject::ResetProperty, idx + mobj->propertyOffset(), argv); return true; } @@ -2355,8 +2400,8 @@ bool QMetaProperty::isDesignable(const QObject *object) const bool b = flags & Designable; if (object) { void *argv[] = { &b }; - const_cast<QObject*>(object)->qt_metacall(QMetaObject::QueryPropertyDesignable, - idx + mobj->propertyOffset(), argv); + QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyDesignable, + idx + mobj->propertyOffset(), argv); } return b; @@ -2381,8 +2426,8 @@ bool QMetaProperty::isScriptable(const QObject *object) const bool b = flags & Scriptable; if (object) { void *argv[] = { &b }; - const_cast<QObject*>(object)->qt_metacall(QMetaObject::QueryPropertyScriptable, - idx + mobj->propertyOffset(), argv); + QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyScriptable, + idx + mobj->propertyOffset(), argv); } return b; } @@ -2405,8 +2450,8 @@ bool QMetaProperty::isStored(const QObject *object) const bool b = flags & Stored; if (object) { void *argv[] = { &b }; - const_cast<QObject*>(object)->qt_metacall(QMetaObject::QueryPropertyStored, - idx + mobj->propertyOffset(), argv); + QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyStored, + idx + mobj->propertyOffset(), argv); } return b; } @@ -2432,13 +2477,41 @@ bool QMetaProperty::isUser(const QObject *object) const bool b = flags & User; if (object) { void *argv[] = { &b }; - const_cast<QObject*>(object)->qt_metacall(QMetaObject::QueryPropertyUser, - idx + mobj->propertyOffset(), argv); + QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyUser, + idx + mobj->propertyOffset(), argv); } return b; } /*! + Returns true if the property is constant; otherwise returns false. + + A property is constant if the \c{Q_PROPERTY()}'s \c CONSTANT attribute + is set. +*/ +bool QMetaProperty::isConstant() const +{ + if (!mobj) + return false; + int flags = mobj->d.data[handle + 2]; + return flags & Constant; +} + +/*! + Returns true if the property is final; otherwise returns false. + + A property is final if the \c{Q_PROPERTY()}'s \c FINAL attribute + is set. +*/ +bool QMetaProperty::isFinal() const +{ + if (!mobj) + return false; + int flags = mobj->d.data[handle + 2]; + return flags & Final; +} + +/*! \obsolete Returns true if the property is editable for the given \a object; @@ -2458,8 +2531,8 @@ bool QMetaProperty::isEditable(const QObject *object) const bool b = flags & Editable; if (object) { void *argv[] = { &b }; - const_cast<QObject*>(object)->qt_metacall(QMetaObject::QueryPropertyEditable, - idx + mobj->propertyOffset(), argv); + QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyEditable, + idx + mobj->propertyOffset(), argv); } return b; } diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h index 000ba6e8ff..419fe066e0 100644 --- a/src/corelib/kernel/qmetaobject.h +++ b/src/corelib/kernel/qmetaobject.h @@ -69,6 +69,7 @@ public: MethodType methodType() const; enum Attributes { Compatibility = 0x1, Cloned = 0x2, Scriptable = 0x4 }; int attributes() const; + int methodIndex() const; inline const QMetaObject *enclosingMetaObject() const { return mobj; } @@ -178,6 +179,7 @@ public: const char *typeName() const; QVariant::Type type() const; int userType() const; + int propertyIndex() const; bool isReadable() const; bool isWritable() const; @@ -187,6 +189,8 @@ public: bool isStored(const QObject *obj = 0) const; bool isEditable(const QObject *obj = 0) const; bool isUser(const QObject *obj = 0) const; + bool isConstant() const; + bool isFinal() const; bool isFlagType() const; bool isEnumType() const; diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 3aa919349a..e8492276b5 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -123,7 +123,7 @@ extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *) } QObjectPrivate::QObjectPrivate(int version) - : threadData(0), currentSender(0), currentChildBeingDeleted(0), connectionLists(0), senders(0) + : threadData(0), currentSender(0), declarativeData(0), connectionLists(0), senders(0) { if (version != QObjectPrivateVersion) qFatal("Cannot mix incompatible Qt libraries"); @@ -139,15 +139,19 @@ QObjectPrivate::QObjectPrivate(int version) receiveChildEvents = true; postedEvents = 0; extraData = 0; - connectedSignals = 0; + for (uint i = 0; i < (sizeof connectedSignals / sizeof connectedSignals[0]); ++i) + connectedSignals[i] = 0; inEventHandler = false; inThreadChangeEvent = false; deleteWatch = 0; + objectGuards = 0; + metaObject = 0; hasGuards = false; } QObjectPrivate::~QObjectPrivate() { + delete static_cast<QAbstractDynamicMetaObject*>(metaObject); if (deleteWatch) *deleteWatch = 1; #ifndef QT_NO_USERDATA @@ -427,8 +431,24 @@ void QMetaObject::changeGuard(QObject **ptr, QObject *o) */ void QObjectPrivate::clearGuards(QObject *object) { - if (!QObjectPrivate::get(object)->hasGuards) + QObjectPrivate *priv = QObjectPrivate::get(object); + QGuard<QObject> *guard = priv->objectGuards; + while (guard) { + guard->o = 0; + guard = guard->next; + } + while (priv->objectGuards) { + guard = priv->objectGuards; + guard->prev = 0; + if (guard->next) guard->next->prev = &priv->objectGuards; + priv->objectGuards = guard->next; + guard->next = 0; + guard->objectDestroyed(object); + } + + if (!priv->hasGuards) return; + GuardHash *hash = 0; QMutex *mutex = 0; QT_TRY { @@ -479,7 +499,7 @@ QMetaCallEvent::~QMetaCallEvent() */ int QMetaCallEvent::placeMetaCall(QObject *object) { - return object->qt_metacall(QMetaObject::InvokeMetaMethod, id_, args_); + return QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, id_, args_); } /*! @@ -844,6 +864,14 @@ QObject::~QObject() d->eventFilters.clear(); + // As declarativeData is in a union with currentChildBeingDeleted, this must + // be done (and declarativeData set back to 0) before deleting children. + if(d->declarativeData) { + QDeclarativeData *dd = d->declarativeData; + d->declarativeData = 0; + dd->destroyed(this); + } + if (!d->children.isEmpty()) d->deleteChildren(); @@ -1850,12 +1878,13 @@ void QObjectPrivate::deleteChildren() // don't use qDeleteAll as the destructor of the child might // delete siblings for (int i = 0; i < children.count(); ++i) { - currentChildBeingDeleted = children.at(i); + QObject *child = children.at(i); children[i] = 0; - delete currentChildBeingDeleted; + if (child) + child->d_func()->parent = 0; + delete child; } children.clear(); - currentChildBeingDeleted = 0; wasDeleted = reallyWasDeleted; } @@ -1866,20 +1895,14 @@ void QObjectPrivate::setParent_helper(QObject *o) return; if (parent) { QObjectPrivate *parentD = parent->d_func(); - if (parentD->wasDeleted && wasDeleted - && parentD->currentChildBeingDeleted == q) { - // don't do anything since QObjectPrivate::deleteChildren() already - // cleared our entry in parentD->children. + const int index = parentD->children.indexOf(q); + if (parentD->wasDeleted) { + parentD->children[index] = 0; } else { - const int index = parentD->children.indexOf(q); - if (parentD->wasDeleted) { - parentD->children[index] = 0; - } else { - parentD->children.removeAt(index); - if (sendChildEvents && parentD->receiveChildEvents) { - QChildEvent e(QEvent::ChildRemoved, q); - QCoreApplication::sendEvent(parent, &e); - } + parentD->children.removeAt(index); + if (sendChildEvents && parentD->receiveChildEvents) { + QChildEvent e(QEvent::ChildRemoved, q); + QCoreApplication::sendEvent(parent, &e); } } } @@ -2867,10 +2890,16 @@ bool QMetaObject::connect(const QObject *sender, int signal_index, s->d_func()->addConnection(signal_index, c); - if (signal_index < 0) - sender->d_func()->connectedSignals = ~0u; - else if (signal_index < 32) - sender->d_func()->connectedSignals |= (1 << signal_index); + if (signal_index < 0) { + for (uint i = 0; i < (sizeof sender->d_func()->connectedSignals + / sizeof sender->d_func()->connectedSignals[0] ); ++i) + sender->d_func()->connectedSignals[i] = ~0u; + } else if (signal_index < (int)sizeof sender->d_func()->connectedSignals * 8) { + uint n = (signal_index / (8 * sizeof sender->d_func()->connectedSignals[0])); + sender->d_func()->connectedSignals[n] |= (1 << (signal_index - n * 8 + * sizeof sender->d_func()->connectedSignals[0])); + } + return true; } @@ -3158,10 +3187,10 @@ void QMetaObject::activate(QObject *sender, int from_signal_index, int to_signal } #if defined(QT_NO_EXCEPTIONS) - receiver->qt_metacall(QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv); + metacall(receiver, QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv); #else QT_TRY { - receiver->qt_metacall(QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv); + metacall(receiver, QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv); } QT_CATCH(...) { locker.relock(); @@ -3210,11 +3239,12 @@ void QMetaObject::activate(QObject *sender, int from_signal_index, int to_signal */ void QMetaObject::activate(QObject *sender, int signal_index, void **argv) { - if (signal_index < 32 + if (signal_index < (int)sizeof(sender->d_func()->connectedSignals) * 8 && !qt_signal_spy_callback_set.signal_begin_callback && !qt_signal_spy_callback_set.signal_end_callback) { - uint signal_mask = 1 << signal_index; - if ((sender->d_func()->connectedSignals & signal_mask) == 0) + uint n = (signal_index / (8 * sizeof sender->d_func()->connectedSignals[0])); + uint m = 1 << (signal_index - n * 8 * sizeof sender->d_func()->connectedSignals[0]); + if ((sender->d_func()->connectedSignals[n] & m) == 0) // nothing connected to these signals, and no spy return; } @@ -3227,11 +3257,12 @@ void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_sign void **argv) { int signal_index = m->methodOffset() + local_signal_index; - if (signal_index < 32 + if (signal_index < (int)sizeof(sender->d_func()->connectedSignals) * 8 && !qt_signal_spy_callback_set.signal_begin_callback && !qt_signal_spy_callback_set.signal_end_callback) { - uint signal_mask = 1 << signal_index; - if ((sender->d_func()->connectedSignals & signal_mask) == 0) + uint n = (signal_index / (8 * sizeof sender->d_func()->connectedSignals[0])); + uint m = 1 << (signal_index - n * 8 * sizeof sender->d_func()->connectedSignals[0]); + if ((sender->d_func()->connectedSignals[n] & m) == 0) // nothing connected to these signals, and no spy return; } @@ -3243,21 +3274,59 @@ void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_sign void QMetaObject::activate(QObject *sender, const QMetaObject *m, int from_local_signal_index, int to_local_signal_index, void **argv) { + Q_ASSERT(from_local_signal_index <= to_local_signal_index); int offset = m->methodOffset(); int from_signal_index = offset + from_local_signal_index; int to_signal_index = offset + to_local_signal_index; - if (to_signal_index < 32 + + if (to_signal_index < (int)sizeof(sender->d_func()->connectedSignals) * 8 && !qt_signal_spy_callback_set.signal_begin_callback && !qt_signal_spy_callback_set.signal_end_callback) { - uint signal_mask = (1 << (to_signal_index + 1)) - 1; - signal_mask ^= (1 << from_signal_index) - 1; - if ((sender->d_func()->connectedSignals & signal_mask) == 0) + + uint n = (from_signal_index / (8 * sizeof sender->d_func()->connectedSignals[0])); + uint m = 1 << (from_signal_index - n * 8 * sizeof sender->d_func()->connectedSignals[0]); + uint nt = (to_signal_index / (8 * sizeof sender->d_func()->connectedSignals[0])); + uint mt = 1 << (to_signal_index - n * 8 * sizeof sender->d_func()->connectedSignals[0]); + bool connected = false; + quint32 *connectedSignals = sender->d_func()->connectedSignals; + for (uint i = 0; !connected && i < (sizeof sender->d_func()->connectedSignals + / sizeof sender->d_func()->connectedSignals[0]); ++i) { + uint mask = 0; + if (i > n) + mask = ~0u; + else if (i == n) + mask = ~(m -1); + if (i > nt) + mask = 0; + else if (i == nt) + mask &= (mt << 1) - 1; + connected = connectedSignals[i] & mask; + } + if (!connected) // nothing connected to these signals, and no spy return; } activate(sender, from_signal_index, to_signal_index, argv); } +/*! \internal + + Returns true if the signal with index \a signal_index from object \a sender is connected. + Signals with indices above a certain range are always considered connected (see connectedSignals + in QObjectPrivate). If a signal spy is installed, all signals are considered connected. +*/ +bool QMetaObject::isConnected(QObject *sender, int signal_index) { + if (signal_index < (int)sizeof(sender->d_func()->connectedSignals) * 8 + && !qt_signal_spy_callback_set.signal_begin_callback + && !qt_signal_spy_callback_set.signal_end_callback) { + uint n = (signal_index / (8 * sizeof sender->d_func()->connectedSignals[0])); + uint m = 1 << (signal_index - n * 8 * sizeof sender->d_func()->connectedSignals[0]); + if ((sender->d_func()->connectedSignals[n] & m) == 0) + // nothing connected to these signals, and no spy + return false; + } + return true; +} /***************************************************************************** Properties @@ -3864,6 +3933,7 @@ void qDeleteInEventHandler(QObject *o) delete o; } + QT_END_NAMESPACE #include "moc_qobject.cpp" diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 74a590451c..a9f005b5e2 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -110,6 +110,7 @@ public: uint hasGuards : 1; //true iff there is one or more QPointer attached to this object uint unused : 22; int postedEvents; + QMetaObject *metaObject; // assert dynamic }; @@ -380,6 +381,9 @@ inline QList<T> qFindChildren(const QObject *o, const QRegExp &re) #endif // Q_MOC_RUN +template <class T> inline const char * qobject_interface_iid() +{ return 0; } + template <class T> inline T qobject_cast_helper(QObject *object, T) { return static_cast<T>(((T)0)->staticMetaObject.cast(object)); } @@ -396,6 +400,8 @@ inline T qobject_cast(const QObject *object) #ifndef Q_MOC_RUN # define Q_DECLARE_INTERFACE(IFace, IId) \ + template <> inline const char *qobject_interface_iid<IFace *>() \ + { return IId; } \ template <> inline IFace *qobject_cast_helper<IFace *>(QObject *object, IFace *) \ { return (IFace *)(object ? object->qt_metacast(IId) : 0); } \ template <> inline IFace *qobject_cast_helper<IFace *>(const QObject *object, IFace *) \ @@ -459,8 +465,13 @@ inline T qobject_cast(const QObject *object) } +template <class T> inline const char * qobject_interface_iid() +{ return 0; } + #ifndef Q_MOC_RUN # define Q_DECLARE_INTERFACE(IFace, IId) \ + template <> inline const char *qobject_interface_iid<IFace *>() \ + { return IId; } \ template <> inline IFace *qobject_cast<IFace *>(QObject *object) \ { return reinterpret_cast<IFace *>((object ? object->qt_metacast(IId) : 0)); } \ template <> inline IFace *qobject_cast<IFace *>(const QObject *object) \ diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index 07c397fe36..0b41c9afa1 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -60,6 +60,7 @@ #include "QtCore/qvector.h" #include "QtCore/qreadwritelock.h" #include "QtCore/qvariant.h" +#include "private/qguard_p.h" QT_BEGIN_NAMESPACE @@ -85,6 +86,13 @@ inline QObjectData::~QObjectData() {} enum { QObjectPrivateVersion = QT_VERSION }; +class QDeclarativeData +{ +public: + virtual ~QDeclarativeData() {} + virtual void destroyed(QObject *) {} +}; + class Q_CORE_EXPORT QObjectPrivate : public QObjectData { Q_DECLARE_PUBLIC(QObject) @@ -117,7 +125,7 @@ public: // object currently activating the object Sender *currentSender; - QObject *currentChildBeingDeleted; + QDeclarativeData *declarativeData; bool isSender(const QObject *receiver, const char *signal) const; QObjectList receiverList(const char *signal) const; @@ -140,7 +148,7 @@ public: QList<QVariant> propertyValues; }; ExtraData *extraData; - mutable quint32 connectedSignals; + mutable quint32 connectedSignals[2]; QString objectName; @@ -174,12 +182,37 @@ public: static void resetDeleteWatch(QObjectPrivate *d, int *oldWatch, int deleteWatch); int *deleteWatch; + QGuard<QObject> *objectGuards; static QObjectPrivate *get(QObject *o) { return o->d_func(); } }; +inline void q_guard_addGuard(QGuard<QObject> *g) +{ + QObjectPrivate *p = QObjectPrivate::get(g->o); + if (p->wasDeleted) { + qWarning("QGuard: cannot add guard to deleted object"); + g->o = 0; + return; + } + + g->next = p->objectGuards; + p->objectGuards = g; + g->prev = &p->objectGuards; + if (g->next) + g->next->prev = &g->next; +} + +inline void q_guard_removeGuard(QGuard<QObject> *g) +{ + if (g->next) g->next->prev = g->prev; + *g->prev = g->next; + g->next = 0; + g->prev = 0; +} + Q_DECLARE_TYPEINFO(QObjectPrivate::Connection, Q_MOVABLE_TYPE); Q_DECLARE_TYPEINFO(QObjectPrivate::Sender, Q_MOVABLE_TYPE); @@ -220,6 +253,14 @@ private: void Q_CORE_EXPORT qDeleteInEventHandler(QObject *o); + +struct Q_CORE_EXPORT QAbstractDynamicMetaObject : public QMetaObject +{ + virtual ~QAbstractDynamicMetaObject() {} + virtual int metaCall(QMetaObject::Call, int _id, void **) { return _id; } + virtual int createProperty(const char *, const char *) { return -1; } +}; + QT_END_NAMESPACE #endif // QOBJECT_P_H diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 9187765de3..1ae46d5274 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -334,6 +334,9 @@ struct Q_CORE_EXPORT QMetaObject static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv); static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv); static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv); + + static bool isConnected(QObject *sender, int signal_index); + // internal guarded pointers static void addGuard(QObject **ptr); static void removeGuard(QObject **ptr); @@ -428,6 +431,7 @@ struct Q_CORE_EXPORT QMetaObject }; int static_metacall(Call, int, void **) const; + static int metacall(QObject *, Call, int, void **); #ifdef QT3_SUPPORT QT3_SUPPORT const char *superClassName() const; @@ -439,6 +443,7 @@ struct Q_CORE_EXPORT QMetaObject const uint *data; const void *extradata; } d; + }; struct QMetaObjectExtraData diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 772655e7df..265a5a2d77 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -694,12 +694,15 @@ bool QLibraryPrivate::isPlugin(QSettings *settings) #endif } + // Qt 4.5 compatibility: stl doesn't affect binary compatibility + key.replace(" no-stl", ""); + +#ifndef QT_NO_SETTINGS QStringList queried; queried << QString::number(qt_version,16) << QString::number((int)debug) << QLatin1String(key) << lastModified; -#ifndef QT_NO_SETTINGS settings->setValue(regkey, queried); #endif } diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index bdf6b78a6b..462cfbffa0 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE -#if !defined(QT_HPUX_LD) +#if !defined(QT_HPUX_LD) && !defined(Q_OS_VXWORKS) QT_BEGIN_INCLUDE_NAMESPACE #include <dlfcn.h> QT_END_INCLUDE_NAMESPACE @@ -66,7 +66,9 @@ QT_END_INCLUDE_NAMESPACE static QString qdlerror() { -#if !defined(QT_HPUX_LD) +#if defined(Q_OS_VXWORKS) + const char *err = "VxWorks does not support dynamic libraries."; +#elif !defined(QT_HPUX_LD) const char *err = dlerror(); #else const char *err = strerror(errno); @@ -76,6 +78,8 @@ static QString qdlerror() bool QLibraryPrivate::load_sys() { + QString attempt; +#if !defined(Q_OS_VXWORKS) QFileInfo fi(fileName); #if defined(Q_OS_SYMBIAN) @@ -179,7 +183,6 @@ bool QLibraryPrivate::load_sys() } #endif #endif // QT_HPUX_LD - QString attempt; bool retry = true; for(int prefix = 0; retry && !pHnd && prefix < prefixes.size(); prefix++) { for(int suffix = 0; retry && !pHnd && suffix < suffixes.size(); suffix++) { @@ -227,7 +230,8 @@ bool QLibraryPrivate::load_sys() attempt = str; } } -# endif +#endif +#endif // Q_OS_VXWORKS if (!pHnd) { errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName).arg(qdlerror()); } @@ -240,14 +244,16 @@ bool QLibraryPrivate::load_sys() bool QLibraryPrivate::unload_sys() { -#if defined(QT_HPUX_LD) +#if !defined(Q_OS_VXWORKS) +# if defined(QT_HPUX_LD) if (shl_unload((shl_t)pHnd)) { -#else +# else if (dlclose(pHnd)) { -#endif +# endif errorString = QLibrary::tr("Cannot unload library %1: %2").arg(fileName).arg(qdlerror()); return false; } +#endif errorString.clear(); return true; } @@ -272,6 +278,8 @@ void* QLibraryPrivate::resolve_sys(const char* symbol) void* address = 0; if (shl_findsym((shl_t*)&pHnd, symbol, TYPE_UNDEFINED, &address) < 0) address = 0; +#elif defined(Q_OS_VXWORKS) + void *address = 0; #else void* address = dlsym(pHnd, symbol); #endif diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp index 0004d3e123..3248dcf945 100644 --- a/src/corelib/statemachine/qabstracttransition.cpp +++ b/src/corelib/statemachine/qabstracttransition.cpp @@ -153,34 +153,12 @@ QAbstractTransition::QAbstractTransition(QState *sourceState) } /*! - Constructs a new QAbstractTransition object with the given \a targets and \a - sourceState. -*/ -QAbstractTransition::QAbstractTransition(const QList<QAbstractState*> &targets, - QState *sourceState) - : QObject(*new QAbstractTransitionPrivate, sourceState) -{ - setTargetStates(targets); -} - -/*! - \internal -*/ -QAbstractTransition::QAbstractTransition(QAbstractTransitionPrivate &dd, - QState *parent) - : QObject(dd, parent) -{ -} - -/*! \internal */ QAbstractTransition::QAbstractTransition(QAbstractTransitionPrivate &dd, - const QList<QAbstractState*> &targets, QState *parent) : QObject(dd, parent) { - setTargetStates(targets); } /*! diff --git a/src/corelib/statemachine/qabstracttransition.h b/src/corelib/statemachine/qabstracttransition.h index 9ba1f11b61..8ff3a6edb7 100644 --- a/src/corelib/statemachine/qabstracttransition.h +++ b/src/corelib/statemachine/qabstracttransition.h @@ -72,7 +72,6 @@ class Q_CORE_EXPORT QAbstractTransition : public QObject Q_PROPERTY(QList<QAbstractState*> targetStates READ targetStates WRITE setTargetStates) public: QAbstractTransition(QState *sourceState = 0); - QAbstractTransition(const QList<QAbstractState*> &targets, QState *sourceState = 0); virtual ~QAbstractTransition(); QState *sourceState() const; @@ -104,8 +103,6 @@ protected: protected: QAbstractTransition(QAbstractTransitionPrivate &dd, QState *parent); - QAbstractTransition(QAbstractTransitionPrivate &dd, - const QList<QAbstractState*> &targets, QState *parent); private: Q_DISABLE_COPY(QAbstractTransition) diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp index 393398127d..813c960266 100644 --- a/src/corelib/statemachine/qeventtransition.cpp +++ b/src/corelib/statemachine/qeventtransition.cpp @@ -153,22 +153,6 @@ QEventTransition::QEventTransition(QObject *object, QEvent::Type type, } /*! - Constructs a new QEventTransition object associated with events of the given - \a type for the given \a object. The transition has the given \a targets and - \a sourceState. -*/ -QEventTransition::QEventTransition(QObject *object, QEvent::Type type, - const QList<QAbstractState*> &targets, - QState *sourceState) - : QAbstractTransition(*new QEventTransitionPrivate, targets, sourceState) -{ - Q_D(QEventTransition); - d->registered = false; - d->object = object; - d->eventType = type; -} - -/*! \internal */ QEventTransition::QEventTransition(QEventTransitionPrivate &dd, QState *parent) @@ -190,20 +174,6 @@ QEventTransition::QEventTransition(QEventTransitionPrivate &dd, QObject *object, } /*! - \internal -*/ -QEventTransition::QEventTransition(QEventTransitionPrivate &dd, QObject *object, - QEvent::Type type, const QList<QAbstractState*> &targets, - QState *parent) - : QAbstractTransition(dd, targets, parent) -{ - Q_D(QEventTransition); - d->registered = false; - d->object = object; - d->eventType = type; -} - -/*! Destroys this QObject event transition. */ QEventTransition::~QEventTransition() diff --git a/src/corelib/statemachine/qeventtransition.h b/src/corelib/statemachine/qeventtransition.h index b05ffefd2e..0ebca19483 100644 --- a/src/corelib/statemachine/qeventtransition.h +++ b/src/corelib/statemachine/qeventtransition.h @@ -62,8 +62,6 @@ class Q_CORE_EXPORT QEventTransition : public QAbstractTransition public: QEventTransition(QState *sourceState = 0); QEventTransition(QObject *object, QEvent::Type type, QState *sourceState = 0); - QEventTransition(QObject *object, QEvent::Type type, - const QList<QAbstractState*> &targets, QState *sourceState = 0); ~QEventTransition(); QObject *eventObject() const; @@ -82,9 +80,6 @@ protected: QEventTransition(QEventTransitionPrivate &dd, QState *parent); QEventTransition(QEventTransitionPrivate &dd, QObject *object, QEvent::Type type, QState *parent); - QEventTransition(QEventTransitionPrivate &dd, QObject *object, - QEvent::Type type, const QList<QAbstractState*> &targets, - QState *parent); private: Q_DISABLE_COPY(QEventTransition) diff --git a/src/corelib/statemachine/qsignalevent.h b/src/corelib/statemachine/qsignalevent.h index c09c5a3080..b7ca61f7fc 100644 --- a/src/corelib/statemachine/qsignalevent.h +++ b/src/corelib/statemachine/qsignalevent.h @@ -58,16 +58,16 @@ QT_MODULE(Core) class Q_CORE_EXPORT QSignalEvent : public QEvent { public: - QSignalEvent(const QObject *sender, int signalIndex, + QSignalEvent(QObject *sender, int signalIndex, const QList<QVariant> &arguments); ~QSignalEvent(); - inline const QObject *sender() const { return m_sender; } + inline QObject *sender() const { return m_sender; } inline int signalIndex() const { return m_signalIndex; } inline QList<QVariant> arguments() const { return m_arguments; } private: - const QObject *m_sender; + QObject *m_sender; int m_signalIndex; QList<QVariant> m_arguments; }; diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp index 389e51302a..781469935c 100644 --- a/src/corelib/statemachine/qsignaltransition.cpp +++ b/src/corelib/statemachine/qsignaltransition.cpp @@ -159,21 +159,6 @@ QSignalTransition::QSignalTransition(QObject *sender, const char *signal, } /*! - Constructs a new signal transition associated with the given \a signal of - the given \a sender. The transition has the given \a targets and \a - sourceState. -*/ -QSignalTransition::QSignalTransition(QObject *sender, const char *signal, - const QList<QAbstractState*> &targets, - QState *sourceState) - : QAbstractTransition(*new QSignalTransitionPrivate, targets, sourceState) -{ - Q_D(QSignalTransition); - d->sender = sender; - d->signal = signal; -} - -/*! Destroys this signal transition. */ QSignalTransition::~QSignalTransition() diff --git a/src/corelib/statemachine/qsignaltransition.h b/src/corelib/statemachine/qsignaltransition.h index 69060ae661..415751eb92 100644 --- a/src/corelib/statemachine/qsignaltransition.h +++ b/src/corelib/statemachine/qsignaltransition.h @@ -62,9 +62,6 @@ public: QSignalTransition(QState *sourceState = 0); QSignalTransition(QObject *sender, const char *signal, QState *sourceState = 0); - QSignalTransition(QObject *sender, const char *signal, - const QList<QAbstractState*> &targets, - QState *sourceState = 0); ~QSignalTransition(); QObject *senderObject() const; diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp index 2042288ceb..09d0be083b 100644 --- a/src/corelib/statemachine/qstate.cpp +++ b/src/corelib/statemachine/qstate.cpp @@ -339,7 +339,8 @@ QSignalTransition *QState::addTransition(QObject *sender, const char *signal, return 0; } } - QSignalTransition *trans = new QSignalTransition(sender, signal, QList<QAbstractState*>() << target); + QSignalTransition *trans = new QSignalTransition(sender, signal); + trans->setTargetState(target); addTransition(trans); return trans; } @@ -351,7 +352,8 @@ class UnconditionalTransition : public QAbstractTransition { public: UnconditionalTransition(QAbstractState *target) - : QAbstractTransition(QList<QAbstractState*>() << target) {} + : QAbstractTransition() + { setTargetState(target); } protected: void onTransition(QEvent *) {} bool eventTest(QEvent *) { return true; } diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 1780d90479..932a239338 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -205,6 +205,7 @@ This is QStateMachinePrivate::QStateMachinePrivate() { state = NotRunning; + _startState = 0; processing = false; processingScheduled = false; stop = false; @@ -1138,7 +1139,8 @@ class InitialTransition : public QAbstractTransition { public: InitialTransition(QAbstractState *target) - : QAbstractTransition(QList<QAbstractState*>() << target) {} + : QAbstractTransition() + { setTargetState(target); } protected: virtual bool eventTest(QEvent *) { return true; } virtual void onTransition(QEvent *) {} @@ -1146,6 +1148,20 @@ protected: } // namespace +QState *QStateMachinePrivate::startState() +{ + Q_Q(QStateMachine); + if (_startState == 0) + _startState = new StartState(q); + return _startState; +} + +void QStateMachinePrivate::removeStartState() +{ + delete _startState; + _startState = 0; +} + void QStateMachinePrivate::_q_start() { Q_Q(QStateMachine); @@ -1165,11 +1181,19 @@ void QStateMachinePrivate::_q_start() processingScheduled = true; // we call _q_process() below emit q->started(); - StartState *start = new StartState(rootState()); - QAbstractTransition *initialTransition = new InitialTransition(initial); - start->addTransition(initialTransition); - QList<QAbstractTransition*> transitions; - transitions.append(initialTransition); + QState *start = startState(); + Q_ASSERT(start != 0); + + QList<QAbstractTransition*> transitions = QStatePrivate::get(start)->transitions(); + + // If a transition has already been added, then we skip this step, as the + // initial transition in that case has been overridden. + if (transitions.isEmpty()) { + QAbstractTransition *initialTransition = new InitialTransition(initial); + start->addTransition(initialTransition); + transitions.append(initialTransition); + } + QEvent nullEvent(QEvent::None); executeTransitionContent(&nullEvent, transitions); QList<QAbstractState*> enteredStates = enterStates(&nullEvent, transitions); @@ -1177,7 +1201,7 @@ void QStateMachinePrivate::_q_start() applyProperties(transitions, QList<QAbstractState*>() << start, enteredStates); #endif - delete start; + removeStartState(); #ifdef QSTATEMACHINE_DEBUG qDebug() << q << ": initial configuration:" << configuration; @@ -1277,6 +1301,68 @@ void QStateMachinePrivate::scheduleProcess() QMetaObject::invokeMethod(q_func(), "_q_process", Qt::QueuedConnection); } +namespace { + +class GoToStateTransition : public QAbstractTransition +{ +public: + GoToStateTransition(QAbstractState *target) + : QAbstractTransition() + { setTargetState(target); } +protected: + void onTransition(QEvent *) { deleteLater(); } + bool eventTest(QEvent *) { return true; } +}; + +} // namespace + +/*! + \internal + + Causes this state machine to unconditionally transition to the given + \a targetState. + + Provides a backdoor for using the state machine "imperatively"; i.e. rather + than defining explicit transitions, you drive the machine's execution by + calling this function. It breaks the whole integrity of the + transition-driven model, but is provided for pragmatic reasons. +*/ +void QStateMachinePrivate::goToState(QAbstractState *targetState) +{ + if (!targetState) { + qWarning("QStateMachine::goToState(): cannot go to null state"); + return; + } + + if (configuration.contains(targetState)) + return; + + QState *sourceState = 0; + if (state == Running) { + QSet<QAbstractState*>::const_iterator it; + for (it = configuration.constBegin(); it != configuration.constEnd(); ++it) { + sourceState = qobject_cast<QState*>(*it); + if (sourceState != 0) + break; + } + } else { + sourceState = startState(); + } + + Q_ASSERT(sourceState != 0); + // Reuse previous GoToStateTransition in case of several calls to + // goToState() in a row. + GoToStateTransition *trans = qFindChild<GoToStateTransition*>(sourceState); + if (!trans) { + trans = new GoToStateTransition(targetState); + sourceState->addTransition(trans); + } else { + trans->setTargetState(targetState); + } + + scheduleProcess(); +} + void QStateMachinePrivate::registerTransitions(QAbstractState *state) { QState *group = qobject_cast<QState*>(state); @@ -1446,7 +1532,7 @@ void QStateMachinePrivate::unregisterEventTransition(QEventTransition *transitio } #endif -void QStateMachinePrivate::handleTransitionSignal(const QObject *sender, int signalIndex, +void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalIndex, void **argv) { Q_ASSERT(connections[sender].at(signalIndex) != 0); @@ -2026,7 +2112,7 @@ QSignalEventGenerator::QSignalEventGenerator(QStateMachine *parent) Constructs a new QSignalEvent object with the given \a sender, \a signalIndex and \a arguments. */ -QSignalEvent::QSignalEvent(const QObject *sender, int signalIndex, +QSignalEvent::QSignalEvent(QObject *sender, int signalIndex, const QList<QVariant> &arguments) : QEvent(QEvent::Signal), m_sender(sender), m_signalIndex(signalIndex), m_arguments(arguments) diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h index cae21aad29..f0f74d6596 100644 --- a/src/corelib/statemachine/qstatemachine_p.h +++ b/src/corelib/statemachine/qstatemachine_p.h @@ -79,7 +79,7 @@ class QAbstractAnimation; #endif class QStateMachine; -class QStateMachinePrivate : public QStatePrivate +class Q_CORE_EXPORT QStateMachinePrivate : public QStatePrivate { Q_DECLARE_PUBLIC(QStateMachine) public: @@ -116,6 +116,9 @@ public: QState *rootState() const; + QState *startState(); + void removeStartState(); + void microstep(QEvent *event, const QList<QAbstractTransition*> &transitionList); bool isPreempted(const QAbstractState *s, const QSet<QAbstractTransition*> &transitions) const; QSet<QAbstractTransition*> selectTransitions(QEvent *event) const; @@ -138,6 +141,8 @@ public: static bool isDescendantOf(const QAbstractState *s, const QAbstractState *other); static QList<QState*> properAncestors(const QAbstractState *s, const QState *upperBound); + void goToState(QAbstractState *targetState); + void registerTransitions(QAbstractState *state); void registerSignalTransition(QSignalTransition *transition); void unregisterSignalTransition(QSignalTransition *transition); @@ -147,7 +152,7 @@ public: #endif void unregisterTransition(QAbstractTransition *transition); void unregisterAllTransitions(); - void handleTransitionSignal(const QObject *sender, int signalIndex, + void handleTransitionSignal(QObject *sender, int signalIndex, void **args); void scheduleProcess(); @@ -162,6 +167,7 @@ public: #endif State state; + QState *_startState; bool processing; bool processingScheduled; bool stop; @@ -208,7 +214,7 @@ public: f_cloneEvent cloneEvent; }; - static Q_CORE_EXPORT const Handler *handler; + static const Handler *handler; }; QT_END_NAMESPACE diff --git a/src/corelib/thread/qmutex_unix.cpp b/src/corelib/thread/qmutex_unix.cpp index 43ba668486..02c7c6f919 100644 --- a/src/corelib/thread/qmutex_unix.cpp +++ b/src/corelib/thread/qmutex_unix.cpp @@ -49,6 +49,10 @@ #include <errno.h> +#if defined(Q_OS_VXWORKS) && defined(wakeup) +#undef wakeup +#endif + QT_BEGIN_NAMESPACE static void report_error(int code, const char *where, const char *what) diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 881b88924c..1be9048699 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -66,6 +66,13 @@ #ifdef Q_OS_BSD4 #include <sys/sysctl.h> #endif +#ifdef Q_OS_VXWORKS +# if (_WRS_VXWORKS_MAJOR > 6) || ((_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR >= 6)) +# include <vxCpuLib.h> +# include <cpuset.h> +# define QT_VXWORKS_HAS_CPUSET +# endif +#endif #if defined(Q_OS_MAC) # ifdef qDebug @@ -90,6 +97,13 @@ static pthread_key_t current_thread_data_key; static void destroy_current_thread_data(void *p) { +#if defined(Q_OS_VXWORKS) + // Calling setspecific(..., 0) sets the value to 0 for ALL threads. + // The 'set to 1' workaround adds a bit of an overhead though, + // since this function is called twice now. + if (p == (void *)1) + return; +#endif // POSIX says the value in our key is set to zero before calling // this destructor function, so we need to set it back to the // right value... @@ -98,7 +112,12 @@ static void destroy_current_thread_data(void *p) // ... but we must reset it to zero before returning so we aren't // called again (POSIX allows implementations to call destructor // functions repeatedly until all values are zero) - pthread_setspecific(current_thread_data_key, 0); + pthread_setspecific(current_thread_data_key, +#if defined(Q_OS_VXWORKS) + (void *)1); +#else + 0); +#endif } static void create_current_thread_data_key() @@ -323,10 +342,28 @@ int QThread::idealThreadCount() // IRIX cores = (int)sysconf(_SC_NPROC_ONLN); #elif defined(Q_OS_INTEGRITY) - // ### TODO - how to get the amound of CPUs on INTEGRITY? + // as of aug 2008 Integrity only supports one single core CPU + cores = 1; #elif defined(Q_OS_SYMBIAN) - // ### TODO - Get the number of cores from HAL? when multicore architectures (SMP) are supported + // ### TODO - Get the number of cores from HAL? when multicore architectures (SMP) are supported + cores = 1; +#elif defined(Q_OS_VXWORKS) + // VxWorks +# if defined(QT_VXWORKS_HAS_CPUSET) + cpuset_t cpus = vxCpuEnabledGet(); + cores = 0; + + // 128 cores should be enough for everyone ;) + for (int i = 0; i < 128 && !CPUSET_ISZERO(cpus); ++i) { + if (CPUSET_ISSET(cpus, i)) { + CPUSET_CLR(cpus, i); + cores++; + } + } +# else + // as of aug 2008 VxWorks < 6.6 only supports one single core CPU cores = 1; +# endif #else // the rest: Linux, Solaris, AIX, Tru64 cores = (int)sysconf(_SC_NPROCESSORS_ONLN); diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h index 0020d2227a..7221925438 100644 --- a/src/corelib/tools/qcontiguouscache.h +++ b/src/corelib/tools/qcontiguouscache.h @@ -44,6 +44,7 @@ #include <QtCore/qatomic.h> #include <limits.h> +#include <new> QT_BEGIN_HEADER @@ -76,6 +77,12 @@ struct QContiguousCacheTypedData int start; int offset; uint sharable : 1; + // uint unused : 31; + + // total is 24 bytes (HP-UX aCC: 40 bytes) + // the next entry is already aligned to 8 bytes + // there will be an 8 byte gap here if T requires 16-byte alignment + // (such as long double on 64-bit platforms, __int128, __float128) T array[1]; }; diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index a7cc95bbaa..e66f533ab8 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -2647,6 +2647,8 @@ static QString timeZone() # else return QString::fromLocal8Bit(_tzname[1]); # endif +#elif defined(Q_OS_VXWORKS) + return QString(); #else tzset(); return QString::fromLocal8Bit(tzname[1]); @@ -4945,6 +4947,9 @@ static inline void Storeinc(ULong *&a, const ULong &b, const ULong &c) #define Bletch 0x10 #define Bndry_mask 0xfffff #define Bndry_mask1 0xfffff +#if defined(LSB) && defined(Q_OS_VXWORKS) +#undef LSB +#endif #define LSB 1 #define Sign_bit 0x80000000 #define Log2P 1 diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index adca703696..8bda634dde 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -688,6 +688,10 @@ int qFindString(const QChar *haystack, int haystackLen, int from, {tools/regexp}{Regular Expression Example} */ +#if defined(Q_OS_VXWORKS) && defined(EOS) +# undef EOS +#endif + const int NumBadChars = 64; #define BadChar(ch) ((ch).unicode() % NumBadChars) diff --git a/src/corelib/tools/qshareddata.cpp b/src/corelib/tools/qshareddata.cpp index 1599a13903..d000c3353c 100644 --- a/src/corelib/tools/qshareddata.cpp +++ b/src/corelib/tools/qshareddata.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE QSharedData is designed to be used with QSharedDataPointer or QExplicitlySharedDataPointer to implement custom \l{implicitly - shared} or \l {explicitly shared} classes. QSharedData provides + shared} or explicitly shared classes. QSharedData provides \l{thread-safe} reference counting. See QSharedDataPointer and QExplicitlySharedDataPointer for details. diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index a1867711d0..8a63d641d5 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -902,6 +902,7 @@ QT_BEGIN_NAMESPACE namespace QtSharedPointer { Q_CORE_EXPORT void internalSafetyCheckAdd(const volatile void *); Q_CORE_EXPORT void internalSafetyCheckRemove(const volatile void *); + Q_AUTOTEST_EXPORT void internalSafetyCheckCleanCheck(); } /*! @@ -966,6 +967,7 @@ void QtSharedPointer::internalSafetyCheckAdd2(const void *d_ptr, const volatile kp->dPointers.insert(d_ptr, data); kp->dataPointers.insert(ptr, d_ptr); + Q_ASSERT(kp->dPointers.size() == kp->dataPointers.size()); } /*! @@ -990,10 +992,29 @@ void QtSharedPointer::internalSafetyCheckRemove2(const void *d_ptr) Q_ASSERT(it2 != kp->dataPointers.end()); //qDebug("Removing d=%p value=%p", d_ptr, it->pointer); - + // remove entries kp->dataPointers.erase(it2); kp->dPointers.erase(it); + Q_ASSERT(kp->dPointers.size() == kp->dataPointers.size()); +} + +/*! + \internal + Called by the QSharedPointer autotest +*/ +void QtSharedPointer::internalSafetyCheckCleanCheck() +{ +# ifdef QT_BUILD_INTERNAL + KnownPointers *const kp = knownPointers(); + Q_ASSERT_X(kp, "internalSafetyCheckSelfCheck()", "Called after global statics deletion!"); + + if (kp->dPointers.size() != kp->dataPointers.size()) + qFatal("Internal consistency error: the number of pointers is not equal!"); + + if (!kp->dPointers.isEmpty()) + qFatal("Pointer cleaning failed: %d entries remaining", kp->dPointers.size()); +# endif } QT_END_NAMESPACE diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 657c45aa89..9a5532c86f 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -100,20 +100,22 @@ namespace QtSharedPointer { // used in debug mode to verify the reuse of pointers Q_CORE_EXPORT void internalSafetyCheckAdd2(const void *, const volatile void *); Q_CORE_EXPORT void internalSafetyCheckRemove2(const void *); - + template <class T, typename Klass, typename RetVal> inline void executeDeleter(T *t, RetVal (Klass:: *memberDeleter)()) { (t->*memberDeleter)(); } template <class T, typename Deleter> inline void executeDeleter(T *t, Deleter d) { d(t); } + template <class T> inline void normalDeleter(T *t) { delete t; } + + // this uses partial template specialization + // the only compilers that didn't support this were MSVC 6.0 and 2002 + template <class T> struct RemovePointer; + template <class T> struct RemovePointer<T *> { typedef T Type; }; + template <class T> struct RemovePointer<QSharedPointer<T> > { typedef T Type; }; + template <class T> struct RemovePointer<QWeakPointer<T> > { typedef T Type; }; - // - // Depending on its template parameter, QSharedPointer derives from either - // QtSharedPointer::InternalRefCount or from QtSharedPointer::ExternalRefCount. - // Both of these classes derive from QtSharedPointer::Basic, which provides common - // operations, - // template <class T> class Basic { @@ -174,6 +176,7 @@ namespace QtSharedPointer { virtual inline bool destroy() { return false; } }; + // sizeof(ExternalRefCount) = 12 (32-bit) / 16 (64-bit) template <class T, typename Deleter> struct CustomDeleter @@ -183,6 +186,9 @@ namespace QtSharedPointer { inline CustomDeleter(T *p, Deleter d) : deleter(d), ptr(p) {} }; + // sizeof(CustomDeleter) = sizeof(Deleter) + sizeof(void*) + // for Deleter = function pointer: 8 (32-bit) / 16 (64-bit) + // for Deleter = PMF: 12 (32-bit) / 24 (64-bit) (GCC) struct ExternalRefCountWithDestroyFn: public ExternalRefCountData { @@ -196,6 +202,7 @@ namespace QtSharedPointer { inline bool destroy() { destroyer(this); return true; } inline void operator delete(void *ptr) { ::operator delete(ptr); } }; + // sizeof(ExternalRefCountWithDestroyFn) = 16 (32-bit) / 24 (64-bit) template <class T, typename Deleter> struct ExternalRefCountWithCustomDeleter: public ExternalRefCountWithDestroyFn @@ -209,11 +216,23 @@ namespace QtSharedPointer { { Self *realself = static_cast<Self *>(self); executeDeleter(realself->extra.ptr, realself->extra.deleter); + + // delete the deleter too + realself->extra.~Next(); + } + static void safetyCheckDeleter(ExternalRefCountData *self) + { + internalSafetyCheckRemove2(self); + deleter(self); } static inline Self *create(T *ptr, Deleter userDeleter) { +# ifdef QT_SHAREDPOINTER_TRACK_POINTERS + DestroyerFn destroy = &safetyCheckDeleter; +# else DestroyerFn destroy = &deleter; +# endif Self *d = static_cast<Self *>(::operator new(sizeof(Self))); // initialize the two sub-objects @@ -240,10 +259,19 @@ namespace QtSharedPointer { static_cast<ExternalRefCountWithContiguousData *>(self); that->data.~T(); } + static void safetyCheckDeleter(ExternalRefCountData *self) + { + internalSafetyCheckRemove2(self); + deleter(self); + } static inline ExternalRefCountData *create(T **ptr) { +# ifdef QT_SHAREDPOINTER_TRACK_POINTERS + DestroyerFn destroy = &safetyCheckDeleter; +# else DestroyerFn destroy = &deleter; +# endif ExternalRefCountWithContiguousData *d = static_cast<ExternalRefCountWithContiguousData *>(::operator new(sizeof(ExternalRefCountWithContiguousData))); @@ -264,9 +292,9 @@ namespace QtSharedPointer { template <class T> class ExternalRefCount: public Basic<T> { - typedef ExternalRefCountData Data; - typedef void (*DeleterFunction)(T *); protected: + typedef ExternalRefCountData Data; + inline void ref() const { d->weakref.ref(); d->strongref.ref(); } inline bool deref() { @@ -278,32 +306,34 @@ namespace QtSharedPointer { inline void internalConstruct(T *ptr) { - Basic<T>::internalConstruct(ptr); +#ifdef QT_SHAREDPOINTER_TRACK_POINTERS + internalConstruct<void (*)(T *)>(ptr, normalDeleter); +#else Q_ASSERT(!d); if (ptr) d = new Data; -#ifdef QT_SHAREDPOINTER_TRACK_POINTERS - if (ptr) internalSafetyCheckAdd2(d, ptr); + internalFinishConstruction(ptr); #endif } template <typename Deleter> inline void internalConstruct(T *ptr, Deleter deleter) { - Basic<T>::internalConstruct(ptr); Q_ASSERT(!d); if (ptr) d = ExternalRefCountWithCustomDeleter<T, Deleter>::create(ptr, deleter); -#ifdef QT_SHAREDPOINTER_TRACK_POINTERS - if (ptr) internalSafetyCheckAdd2(d, ptr); -#endif + internalFinishConstruction(ptr); } inline void internalCreate() { T *ptr; d = ExternalRefCountWithContiguousData<T>::create(&ptr); + Basic<T>::internalConstruct(ptr); + } + inline void internalFinishConstruction(T *ptr) + { Basic<T>::internalConstruct(ptr); #ifdef QT_SHAREDPOINTER_TRACK_POINTERS if (ptr) internalSafetyCheckAdd2(d, ptr); @@ -323,9 +353,6 @@ namespace QtSharedPointer { inline void internalDestroy() { -#ifdef QT_SHAREDPOINTER_TRACK_POINTERS - internalSafetyCheckRemove2(d); -#endif if (!d->destroy()) delete this->value; } @@ -343,12 +370,22 @@ namespace QtSharedPointer { inline void internalSet(Data *o, T *actual) { if (d == o) return; - if (o && !o->strongref) - o = 0; if (o) { Basic<T>::verifyReconstruction(actual); - o->weakref.ref(); - o->strongref.ref(); + + // increase the strongref, but never up from zero + register int tmp = o->strongref; + while (tmp > 0) { + // try to increment from "tmp" to "tmp + 1" + if (o->strongref.testAndSetRelaxed(tmp, tmp + 1)) + break; // succeeded + tmp = o->strongref; // failed, try again + } + + if (tmp) + o->weakref.ref(); + else + o = 0; } if (d && !deref()) delete d; @@ -356,9 +393,7 @@ namespace QtSharedPointer { this->value = d && d->strongref ? actual : 0; } -#if defined(QT_BUILD_INTERNAL) - public: -#endif + protected: Data *d; private: @@ -448,6 +483,7 @@ public: // now initialize the data new (result.data()) T(); + result.internalFinishConstruction(result.data()); return result; } }; @@ -681,14 +717,6 @@ Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerObjectCast(const QWeakPointer< return qSharedPointerObjectCast<X>(src.toStrongRef()); } -# ifndef QT_NO_PARTIAL_TEMPLATE_SPECIALIZATION -namespace QtSharedPointer { - template <class T> struct RemovePointer; - template <class T> struct RemovePointer<T *> { typedef T Type; }; - template <class T> struct RemovePointer<QSharedPointer<T> > { typedef T Type; }; - template <class T> struct RemovePointer<QWeakPointer<T> > { typedef T Type; }; -} - template <class X, class T> inline QSharedPointer<typename QtSharedPointer::RemovePointer<X>::Type> qobject_cast(const QSharedPointer<T> &src) @@ -701,7 +729,6 @@ qobject_cast(const QWeakPointer<T> &src) { return qSharedPointerObjectCast<typename QtSharedPointer::RemovePointer<X>::Type, T>(src); } -# endif #endif diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 247f9f1915..3a7b35ce90 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -253,11 +253,7 @@ public: typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; -#ifndef QT_NO_STL typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif typedef iterator Iterator; typedef const_iterator ConstIterator; typedef int size_type; diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 85d9dbf670..e6c6169122 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -114,4 +114,4 @@ HEADERS += tools/qharfbuzz_p.h INCLUDEPATH += ../3rdparty/md5 \ ../3rdparty/md4 -!macx-icc:unix:!symbian:LIBS += -lm +!macx-icc:unix:!symbian:!vxworks:LIBS += -lm diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h index f1614ea457..7a4d2a8f95 100644 --- a/src/corelib/xml/qxmlstream_p.h +++ b/src/corelib/xml/qxmlstream_p.h @@ -54,6 +54,10 @@ #ifndef QXMLSTREAM_P_H #define QXMLSTREAM_P_H +#if defined(Q_OS_VXWORKS) && defined(ERROR) +# undef ERROR +#endif + class QXmlStreamReader_Table { public: diff --git a/src/gui/accessible/accessible.pri b/src/gui/accessible/accessible.pri index 76b66879e0..ad2fb4c828 100644 --- a/src/gui/accessible/accessible.pri +++ b/src/gui/accessible/accessible.pri @@ -14,7 +14,8 @@ contains(QT_CONFIG, accessibility) { mac:!embedded { HEADERS += accessible/qaccessible_mac_p.h - OBJECTIVE_SOURCES += accessible/qaccessible_mac.mm + OBJECTIVE_SOURCES += accessible/qaccessible_mac.mm \ + accessible/qaccessible_mac_cocoa.mm } else:win32 { SOURCES += accessible/qaccessible_win.cpp } else { diff --git a/src/gui/accessible/qaccessible_mac_cocoa.mm b/src/gui/accessible/qaccessible_mac_cocoa.mm index e69de29bb2..1cb2ffa247 100644 --- a/src/gui/accessible/qaccessible_mac_cocoa.mm +++ b/src/gui/accessible/qaccessible_mac_cocoa.mm @@ -0,0 +1,234 @@ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qaccessible.h" +#include "qaccessible_mac_p.h" +#include "qdebug.h" +#include "qtabwidget.h" + +#include <private/qt_mac_p.h> +#include <private/qcocoaview_mac_p.h> +#include <private/qwidget_p.h> + + +#ifndef QT_NO_ACCESSIBILITY + +#ifdef QT_MAC_USE_COCOA + +QT_BEGIN_NAMESPACE + +//#define MAC_ACCESSIBILTY_DEVELOPER_MODE + +#ifdef MAC_ACCESSIBILTY_DEVELOPER_MODE +#define MAC_ACCESSIBILTY_DEBUG qDebug +#else +#define MAC_ACCESSIBILTY_DEBUG if (0) qDebug +#endif + +typedef QMap<QAccessible::Role, NSString *> QMacAccessibiltyRoleMap; +Q_GLOBAL_STATIC(QMacAccessibiltyRoleMap, qMacAccessibiltyRoleMap); + +static QAInterface interfaceForView(QT_MANGLE_NAMESPACE(QCocoaView) *view) +{ + return QAInterface(QAccessible::queryAccessibleInterface([view qt_qwidget])); +} + +/* + Set up mappings from Qt accessibilty roles to Mac accessibilty roles. +*/ +static void populateRoleMap() +{ + QMacAccessibiltyRoleMap &roleMap = *qMacAccessibiltyRoleMap(); + roleMap[QAccessible::MenuItem] = NSAccessibilityMenuItemRole; + roleMap[QAccessible::MenuBar] = NSAccessibilityMenuBarRole; + roleMap[QAccessible::ScrollBar] = NSAccessibilityScrollBarRole; + roleMap[QAccessible::Grip] = NSAccessibilityGrowAreaRole; + roleMap[QAccessible::Window] = NSAccessibilityWindowRole; + roleMap[QAccessible::Dialog] = NSAccessibilityWindowRole; + roleMap[QAccessible::AlertMessage] = NSAccessibilityWindowRole; + roleMap[QAccessible::ToolTip] = NSAccessibilityWindowRole; + roleMap[QAccessible::HelpBalloon] = NSAccessibilityWindowRole; + roleMap[QAccessible::PopupMenu] = NSAccessibilityMenuRole; + roleMap[QAccessible::Application] = NSAccessibilityApplicationRole; + roleMap[QAccessible::Pane] = NSAccessibilityGroupRole; + roleMap[QAccessible::Grouping] = NSAccessibilityGroupRole; + roleMap[QAccessible::Separator] = NSAccessibilitySplitterRole; + roleMap[QAccessible::ToolBar] = NSAccessibilityToolbarRole; + roleMap[QAccessible::PageTab] = NSAccessibilityRadioButtonRole; + roleMap[QAccessible::ButtonMenu] = NSAccessibilityMenuButtonRole; + roleMap[QAccessible::ButtonDropDown] = NSAccessibilityPopUpButtonRole; + roleMap[QAccessible::SpinBox] = NSAccessibilityIncrementorRole; + roleMap[QAccessible::Slider] = NSAccessibilitySliderRole; + roleMap[QAccessible::ProgressBar] = NSAccessibilityProgressIndicatorRole; + roleMap[QAccessible::ComboBox] = NSAccessibilityPopUpButtonRole; + roleMap[QAccessible::RadioButton] = NSAccessibilityRadioButtonRole; + roleMap[QAccessible::CheckBox] = NSAccessibilityCheckBoxRole; + roleMap[QAccessible::StaticText] = NSAccessibilityStaticTextRole; + roleMap[QAccessible::Table] = NSAccessibilityTableRole; + roleMap[QAccessible::StatusBar] = NSAccessibilityStaticTextRole; + roleMap[QAccessible::Column] = NSAccessibilityColumnRole; + roleMap[QAccessible::ColumnHeader] = NSAccessibilityColumnRole; + roleMap[QAccessible::Row] = NSAccessibilityRowRole; + roleMap[QAccessible::RowHeader] = NSAccessibilityRowRole; + roleMap[QAccessible::Cell] = NSAccessibilityTextFieldRole; + roleMap[QAccessible::PushButton] = NSAccessibilityButtonRole; + roleMap[QAccessible::EditableText] = NSAccessibilityTextFieldRole; + roleMap[QAccessible::Link] = NSAccessibilityTextFieldRole; + roleMap[QAccessible::Indicator] = NSAccessibilityValueIndicatorRole; + roleMap[QAccessible::Splitter] = NSAccessibilitySplitGroupRole; + roleMap[QAccessible::List] = NSAccessibilityListRole; + roleMap[QAccessible::ListItem] = NSAccessibilityStaticTextRole; + roleMap[QAccessible::Cell] = NSAccessibilityStaticTextRole; +} + +/* + Returns a Mac accessibility role for the given interface, or + NSAccessibilityUnknownRole if no role mapping is found. +*/ +static NSString *macRoleForInterface(QAInterface interface) +{ + const QAccessible::Role qtRole = interface.role(); + QMacAccessibiltyRoleMap &roleMap = *qMacAccessibiltyRoleMap(); + + if (roleMap.isEmpty()) + populateRoleMap(); + + MAC_ACCESSIBILTY_DEBUG() << "role for" << interface.object() << "interface role" << hex << qtRole; + + if (roleMap.contains(qtRole)) { + MAC_ACCESSIBILTY_DEBUG() << "return" << roleMap[qtRole]; + return roleMap[qtRole]; + } + + MAC_ACCESSIBILTY_DEBUG() << "return NSAccessibilityUnknownRole"; + return NSAccessibilityUnknownRole; +} + +/* + Is the interface a QTabBar embedded in a QTabWidget? + (as opposed to a stand-alone tab bar) +*/ +static bool isEmbeddedTabBar(const QAInterface &interface) +{ + QObject *object = interface.object(); + if (interface.role() == QAccessible::PageTabList && object) + return (qobject_cast<QTabWidget *>(object->parent())); + + return false; +} + +static bool isInterfaceIgnored(QAInterface interface) +{ + // Mac accessibility does not have an attribute that corresponds to the + // Invisible/Offscreen state. Use the ignore facility to disable them. + const QAccessible::State state = interface.state(); + if (state & QAccessible::Invisible || + state & QAccessible::Offscreen ) + return false; + + // Hide QTabBars that has a QTabWidget parent (the QTabWidget handles the accessibility) + if (isEmbeddedTabBar(interface)) + return false; + + if (QObject * const object = interface.object()) { + const QString className = QLatin1String(object->metaObject()->className()); + + // Prevent VoiceOver from focusing on tool tips by ignoring those + // interfaces. Shifting VoiceOver focus to the tool tip is confusing + // and the contents of the tool tip is avalible through the description + // attribute anyway. + if (className == QLatin1String("QTipLabel")) + return false; + } + + // Hide interfaces with an unknown role. When developing it's often useful to disable + // this check to see all interfaces in the hierarchy. +#ifndef MAC_ACCESSIBILTY_DEVELOPER_MODE + return [macRoleForInterface(interface) isEqualToString: NSAccessibilityUnknownRole]; +#else + return NO; +#endif +} + +QT_END_NAMESPACE + +@implementation QT_MANGLE_NAMESPACE(QCocoaView) (Accessibility) + +- (BOOL)accessibilityIsIgnored +{ + QAInterface interface = interfaceForView(self); + return isInterfaceIgnored(interface); +} + +- (NSArray *)accessibilityAttributeNames +{ + QAInterface interface = interfaceForView(self); + + static NSArray *attributes = nil; + if (attributes == nil) { + attributes = [super accessibilityAttributeNames]; + + } + return attributes; +} + +- (id)accessibilityAttributeValue:(NSString *)attribute +{ + MAC_ACCESSIBILTY_DEBUG() << "accessibilityAttributeValue" << self << QCFString::toQString(reinterpret_cast<CFStringRef>(attribute)); + + QAInterface interface = interfaceForView(self); + + // Switch on the attribute name and call the appropriate handler function. + // Pass the call on to the NSView class for attributes we don't handle. + if ([attribute isEqualToString:@"AXRole"]) { + return macRoleForInterface(interface); + } else { + return [super accessibilityAttributeValue:attribute]; + } +} + +@end + +#endif // QT_MAC_USE_COCOA + +#endif // QT_NO_ACCESSIBILITY + diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp index 42d3a9a3e2..aee592c213 100644 --- a/src/gui/dialogs/qcolordialog.cpp +++ b/src/gui/dialogs/qcolordialog.cpp @@ -1583,8 +1583,7 @@ void QColorDialog::setCurrentColor(const QColor &color) #ifdef Q_WS_MAC d->setCurrentQColor(color); - if (d->delegate) - QColorDialogPrivate::setColor(d->delegate, color); + d->setCocoaPanelColor(color); #endif } @@ -1725,19 +1724,16 @@ void QColorDialog::setVisible(bool visible) #if defined(Q_WS_MAC) if (visible) { - if (!d->delegate && QColorDialogPrivate::sharedColorPanelAvailable && - !(testAttribute(Qt::WA_DontShowOnScreen) || (d->opts & DontUseNativeDialog))){ - d->delegate = QColorDialogPrivate::openCocoaColorPanel( - currentColor(), parentWidget(), windowTitle(), options(), d); + if (d->delegate || (QColorDialogPrivate::sharedColorPanelAvailable && + !(testAttribute(Qt::WA_DontShowOnScreen) || (d->opts & DontUseNativeDialog)))){ + d->openCocoaColorPanel(currentColor(), parentWidget(), windowTitle(), options()); QColorDialogPrivate::sharedColorPanelAvailable = false; setAttribute(Qt::WA_DontShowOnScreen); } setWindowFlags(windowModality() == Qt::WindowModal ? Qt::Sheet : DefaultWindowFlags); } else { if (d->delegate) { - QColorDialogPrivate::closeCocoaColorPanel(d->delegate); - d->delegate = 0; - QColorDialogPrivate::sharedColorPanelAvailable = true; + d->closeCocoaColorPanel(); setAttribute(Qt::WA_DontShowOnScreen, false); } } @@ -1840,6 +1836,14 @@ QRgb QColorDialog::getRgba(QRgb initial, bool *ok, QWidget *parent) QColorDialog::~QColorDialog() { + Q_D(QColorDialog); +#if defined(Q_WS_MAC) + if (d->delegate) { + d->releaseCocoaColorPanelDelegate(); + QColorDialogPrivate::sharedColorPanelAvailable = true; + } +#endif + #ifndef QT_NO_SETTINGS if (!customSet) { QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm index 1936de5318..6cdb7eeaf7 100644 --- a/src/gui/dialogs/qcolordialog_mac.mm +++ b/src/gui/dialogs/qcolordialog_mac.mm @@ -76,6 +76,8 @@ QT_USE_NAMESPACE CGFloat mMinWidth; // currently unused CGFloat mExtraHeight; // currently unused BOOL mHackedPanel; + NSInteger mResultCode; + BOOL mDialogIsExecuting; } - (id)initWithColorPanel:(NSColorPanel *)panel stolenContentView:(NSView *)stolenContentView @@ -90,7 +92,8 @@ QT_USE_NAMESPACE - (NSColorPanel *)colorPanel; - (QColor)qtColor; - (void)finishOffWithCode:(NSInteger)result; -- (void)cleanUpAfterMyself; +- (void)showColorPanel; +- (void)exec; @end @implementation QCocoaColorPanelDelegate @@ -110,6 +113,8 @@ QT_USE_NAMESPACE mMinWidth = 0.0; mExtraHeight = 0.0; mHackedPanel = (okButton != 0); + mResultCode = NSCancelButton; + mDialogIsExecuting = false; if (mHackedPanel) { [self relayout]; @@ -121,19 +126,31 @@ QT_USE_NAMESPACE [cancelButton setTarget:self]; } - if (mPriv) - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(colorChanged:) - name:NSColorPanelColorDidChangeNotification - object:mColorPanel]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(colorChanged:) + name:NSColorPanelColorDidChangeNotification + object:mColorPanel]; + mQtColor = new QColor(); return self; } - (void)dealloc { - if (mPriv) - [[NSNotificationCenter defaultCenter] removeObserver:self]; + QMacCocoaAutoReleasePool pool; + if (mHackedPanel) { + NSView *ourContentView = [mColorPanel contentView]; + + // return stolen stuff to its rightful owner + [mStolenContentView removeFromSuperview]; + [mColorPanel setContentView:mStolenContentView]; + + [mOkButton release]; + [mCancelButton release]; + [ourContentView release]; + } + [mColorPanel setDelegate:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; delete mQtColor; [super dealloc]; } @@ -160,8 +177,7 @@ QT_USE_NAMESPACE - (void)colorChanged:(NSNotification *)notification; { Q_UNUSED(notification); - if (mPriv) - [self updateQtColor]; + [self updateQtColor]; } - (void)relayout @@ -258,8 +274,7 @@ QT_USE_NAMESPACE } } - if (mPriv) - mPriv->setCurrentQColor(*mQtColor); + mPriv->setCurrentQColor(*mQtColor); } - (NSColorPanel *)colorPanel @@ -274,36 +289,42 @@ QT_USE_NAMESPACE - (void)finishOffWithCode:(NSInteger)code { - if (mPriv) { - // Finish the QColorDialog as well. But since a call to accept or reject will - // close down the QEventLoop found in QDialog, we need to make sure that the - // current thread has exited the native dialogs modal session/run loop first. - // We ensure this by posting the call: + mResultCode = code; + if (mDialogIsExecuting) { + // We stop the current modal event loop. The control + // will then return inside -(void)exec below. + // It's important that the modal event loop is stopped before + // we accept/reject QColorDialog, since QColorDialog has its + // own event loop that needs to be stopped last. [NSApp stopModalWithCode:code]; - if (code == NSOKButton) - QMetaObject::invokeMethod(mPriv->colorDialog(), "accept", Qt::QueuedConnection); - else - QMetaObject::invokeMethod(mPriv->colorDialog(), "reject", Qt::QueuedConnection); } else { - [NSApp stopModalWithCode:code]; + // Since we are not in a modal event loop, we can safely close + // down QColorDialog + if (mResultCode == NSCancelButton) + mPriv->colorDialog()->reject(); + else + mPriv->colorDialog()->accept(); } } -- (void)cleanUpAfterMyself +- (void)showColorPanel { - if (mHackedPanel) { - NSView *ourContentView = [mColorPanel contentView]; - - // return stolen stuff to its rightful owner - [mStolenContentView removeFromSuperview]; - [mColorPanel setContentView:mStolenContentView]; + mDialogIsExecuting = false; + [mColorPanel makeKeyAndOrderFront:mColorPanel]; +} - [mOkButton release]; - [mCancelButton release]; - [ourContentView release]; - } - [mColorPanel setDelegate:nil]; +- (void)exec +{ + QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active); + QMacCocoaAutoReleasePool pool; + mDialogIsExecuting = true; + [NSApp runModalForWindow:mColorPanel]; + if (mResultCode == NSCancelButton) + mPriv->colorDialog()->reject(); + else + mPriv->colorDialog()->accept(); } + @end QT_BEGIN_NAMESPACE @@ -312,91 +333,90 @@ extern void macStartInterceptNSPanelCtor(); extern void macStopInterceptNSPanelCtor(); extern NSButton *macCreateButton(const char *text, NSView *superview); -void *QColorDialogPrivate::openCocoaColorPanel(const QColor &initial, - QWidget *parent, const QString &title, QColorDialog::ColorDialogOptions options, - QColorDialogPrivate *priv) +void QColorDialogPrivate::openCocoaColorPanel(const QColor &initial, + QWidget *parent, const QString &title, QColorDialog::ColorDialogOptions options) { Q_UNUSED(parent); // we would use the parent if only NSColorPanel could be a sheet QMacCocoaAutoReleasePool pool; - /* - The standard Cocoa color panel has no OK or Cancel button and - is created as a utility window, whereas we want something like - the Carbon color panel. We need to take the following steps: + if (!delegate) { + /* + The standard Cocoa color panel has no OK or Cancel button and + is created as a utility window, whereas we want something like + the Carbon color panel. We need to take the following steps: + + 1. Intercept the color panel constructor to turn off the + NSUtilityWindowMask flag. This is done by temporarily + replacing initWithContentRect:styleMask:backing:defer: + in NSPanel by our own method. - 1. Intercept the color panel constructor to turn off the - NSUtilityWindowMask flag. This is done by temporarily - replacing initWithContentRect:styleMask:backing:defer: - in NSPanel by our own method. + 2. Modify the color panel so that its content view is part + of a new content view that contains it as well as two + buttons (OK and Cancel). - 2. Modify the color panel so that its content view is part - of a new content view that contains it as well as two - buttons (OK and Cancel). + 3. Lay out the original content view and the buttons when + the color panel is shown and whenever it is resized. - 3. Lay out the original content view and the buttons when - the color panel is shown and whenever it is resized. + 4. Clean up after ourselves. + */ - 4. Clean up after ourselves. - */ + bool hackColorPanel = !(options & QColorDialog::NoButtons); - bool hackColorPanel = !(options & QColorDialog::NoButtons); + if (hackColorPanel) + macStartInterceptNSPanelCtor(); + NSColorPanel *colorPanel = [NSColorPanel sharedColorPanel]; + if (hackColorPanel) + macStopInterceptNSPanelCtor(); - if (hackColorPanel) - macStartInterceptNSPanelCtor(); - NSColorPanel *colorPanel = [NSColorPanel sharedColorPanel]; - if (hackColorPanel) - macStopInterceptNSPanelCtor(); + [colorPanel setHidesOnDeactivate:false]; - [colorPanel setHidesOnDeactivate:false]; + // set up the Cocoa color panel + [colorPanel setShowsAlpha:options & QColorDialog::ShowAlphaChannel]; + [colorPanel setTitle:(NSString*)(CFStringRef)QCFString(title)]; - // set up the Cocoa color panel - [colorPanel setShowsAlpha:options & QColorDialog::ShowAlphaChannel]; - [colorPanel setTitle:(NSString*)(CFStringRef)QCFString(title)]; + NSView *stolenContentView = 0; + NSButton *okButton = 0; + NSButton *cancelButton = 0; - NSView *stolenContentView = 0; - NSButton *okButton = 0; - NSButton *cancelButton = 0; + if (hackColorPanel) { + // steal the color panel's contents view + stolenContentView = [colorPanel contentView]; + [stolenContentView retain]; + [colorPanel setContentView:0]; - if (hackColorPanel) { - // steal the color panel's contents view - stolenContentView = [colorPanel contentView]; - [stolenContentView retain]; - [colorPanel setContentView:0]; + // create a new content view and add the stolen one as a subview + NSRect frameRect = { { 0.0, 0.0 }, { 0.0, 0.0 } }; + NSView *ourContentView = [[NSView alloc] initWithFrame:frameRect]; + [ourContentView addSubview:stolenContentView]; - // create a new content view and add the stolen one as a subview - NSRect frameRect = { { 0.0, 0.0 }, { 0.0, 0.0 } }; - NSView *ourContentView = [[NSView alloc] initWithFrame:frameRect]; - [ourContentView addSubview:stolenContentView]; + // create OK and Cancel buttons and add these as subviews + okButton = macCreateButton("&OK", ourContentView); + cancelButton = macCreateButton("Cancel", ourContentView); - // create OK and Cancel buttons and add these as subviews - okButton = macCreateButton("&OK", ourContentView); - cancelButton = macCreateButton("Cancel", ourContentView); + [colorPanel setContentView:ourContentView]; + [colorPanel setDefaultButtonCell:[okButton cell]]; + } - [colorPanel setContentView:ourContentView]; - [colorPanel setDefaultButtonCell:[okButton cell]]; + delegate = [[QCocoaColorPanelDelegate alloc] initWithColorPanel:colorPanel + stolenContentView:stolenContentView + okButton:okButton + cancelButton:cancelButton + priv:this]; + [colorPanel setDelegate:static_cast<QCocoaColorPanelDelegate *>(delegate)]; } - // create a delegate and set it - QCocoaColorPanelDelegate *delegate = - [[QCocoaColorPanelDelegate alloc] initWithColorPanel:colorPanel - stolenContentView:stolenContentView - okButton:okButton - cancelButton:cancelButton - priv:priv]; - [colorPanel setDelegate:delegate]; - setColor(delegate, initial); - [colorPanel makeKeyAndOrderFront:colorPanel]; - - return delegate; + setCocoaPanelColor(initial); + [static_cast<QCocoaColorPanelDelegate *>(delegate) showColorPanel]; } -void QColorDialogPrivate::closeCocoaColorPanel(void *delegate) +void QColorDialogPrivate::closeCocoaColorPanel() { - QMacCocoaAutoReleasePool pool; - QCocoaColorPanelDelegate *theDelegate = static_cast<QCocoaColorPanelDelegate *>(delegate); - [[theDelegate colorPanel] close]; - [theDelegate cleanUpAfterMyself]; - [theDelegate autorelease]; + [[static_cast<QCocoaColorPanelDelegate *>(delegate) colorPanel] close]; +} + +void QColorDialogPrivate::releaseCocoaColorPanelDelegate() +{ + [static_cast<QCocoaColorPanelDelegate *>(delegate) release]; } void QColorDialogPrivate::mac_nativeDialogModalHelp() @@ -416,13 +436,10 @@ void QColorDialogPrivate::mac_nativeDialogModalHelp() void QColorDialogPrivate::_q_macRunNativeAppModalPanel() { - QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active); - QMacCocoaAutoReleasePool pool; - QCocoaColorPanelDelegate *delegateCasted = static_cast<QCocoaColorPanelDelegate *>(delegate); - [NSApp runModalForWindow:[delegateCasted colorPanel]]; + [static_cast<QCocoaColorPanelDelegate *>(delegate) exec]; } -void QColorDialogPrivate::setColor(void *delegate, const QColor &color) +void QColorDialogPrivate::setCocoaPanelColor(const QColor &color) { QMacCocoaAutoReleasePool pool; QCocoaColorPanelDelegate *theDelegate = static_cast<QCocoaColorPanelDelegate *>(delegate); diff --git a/src/gui/dialogs/qcolordialog_p.h b/src/gui/dialogs/qcolordialog_p.h index ea66d4aae1..00d40b6fab 100644 --- a/src/gui/dialogs/qcolordialog_p.h +++ b/src/gui/dialogs/qcolordialog_p.h @@ -116,14 +116,11 @@ public: QByteArray memberToDisconnectOnClose; #ifdef Q_WS_MAC - static void *openCocoaColorPanel(const QColor &initial, - QWidget *parent, const QString &title, - QColorDialog::ColorDialogOptions options, - QColorDialogPrivate *priv = 0); - static void closeCocoaColorPanel(void *delegate); - static QColor execCocoaColorPanel(const QColor &initial, QWidget *parent, - const QString &title, QColorDialog::ColorDialogOptions options); - static void setColor(void *delegate, const QColor &color); + void openCocoaColorPanel(const QColor &initial, + QWidget *parent, const QString &title, QColorDialog::ColorDialogOptions options); + void closeCocoaColorPanel(); + void releaseCocoaColorPanelDelegate(); + void setCocoaPanelColor(const QColor &color); inline void done(int result) { q_func()->done(result); } inline QColorDialog *colorDialog() { return q_func(); } diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp index 4d9a0085dc..6e1b6afed7 100644 --- a/src/gui/dialogs/qfileinfogatherer.cpp +++ b/src/gui/dialogs/qfileinfogatherer.cpp @@ -44,8 +44,11 @@ #include <qfsfileengine.h> #include <qdiriterator.h> #ifndef Q_OS_WIN -#include <unistd.h> -#include <sys/types.h> +# include <unistd.h> +# include <sys/types.h> +#endif +#if defined(Q_OS_VXWORKS) +# include "qplatformdefs.h" #endif QT_BEGIN_NAMESPACE diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp index 283bda61fc..749203957b 100644 --- a/src/gui/dialogs/qfilesystemmodel.cpp +++ b/src/gui/dialogs/qfilesystemmodel.cpp @@ -884,6 +884,7 @@ QVariant QFileSystemModel::headerData(int section, Qt::Orientation orientation, pixmap.setAlphaChannel(pixmap.createAlphaMask()); return pixmap; } + break; case Qt::TextAlignmentRole: return Qt::AlignLeft; } diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 89d9d1bcd6..ebdac9a606 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -400,4 +400,15 @@ void QEglContext::dumpAllConfigs() delete [] configs; } +QString QEglContext::extensions() +{ + const char* exts = eglQueryString(dpy, EGL_EXTENSIONS); + return QString(QLatin1String(exts)); +} + +bool QEglContext::hasExtension(const char* extensionName) +{ + return extensions().contains(QLatin1String(extensionName)); +} + QT_END_NAMESPACE diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index b457552532..d2be229a40 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -122,6 +122,9 @@ public: void dumpAllConfigs(); + QString extensions(); + bool hasExtension(const char* extensionName); + private: QEgl::API apiType; EGLDisplay dpy; diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index be89efe78b..daaa4ba121 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -125,7 +125,17 @@ void QEglProperties::setVisualFormat(const QX11Info *xinfo) setValue(EGL_RED_SIZE, countBits(visual->red_mask)); setValue(EGL_GREEN_SIZE, countBits(visual->green_mask)); setValue(EGL_BLUE_SIZE, countBits(visual->blue_mask)); - setValue(EGL_ALPHA_SIZE, 0); // XXX + + EGLint alphaBits = 0; +#if !defined(QT_NO_XRENDER) + XRenderPictFormat *format; + format = XRenderFindVisualFormat(xinfo->display(), visual); + if (format && (format->type == PictTypeDirect) && format->direct.alphaMask) { + alphaBits = countBits(format->direct.alphaMask); + qDebug("QEglProperties::setVisualFormat() - visual's alphaMask is %d", alphaBits); + } +#endif + setValue(EGL_ALPHA_SIZE, alphaBits); } extern const QX11Info *qt_x11Info(const QPaintDevice *pd); diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index e0ae8a65de..358ebccb3b 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -46,12 +46,26 @@ QT_BEGIN_NAMESPACE #include <QtCore/qdebug.h> #include <QtCore/qstringlist.h> +#include "qegl_p.h" + + // Initialize a property block. QEglProperties::QEglProperties() { props.append(EGL_NONE); } +QEglProperties::QEglProperties(EGLConfig cfg) +{ + props.append(EGL_NONE); + for (int name = 0x3020; name <= 0x304F; ++name) { + EGLint value; + if (name != EGL_NONE && eglGetConfigAttrib(QEglContext::defaultDisplay(0), cfg, name, &value)) + setValue(name, value); + } + eglGetError(); // Clear the error state. +} + // Fetch the current value associated with a property. int QEglProperties::value(int name) const { @@ -215,12 +229,21 @@ bool QEglProperties::reduceConfiguration() removeValue(EGL_SAMPLES); return true; } - if (removeValue(EGL_ALPHA_SIZE)) + if (removeValue(EGL_ALPHA_SIZE)) { +#if defined(EGL_BIND_TO_TEXTURE_RGBA) && defined(EGL_BIND_TO_TEXTURE_RGB) + if (removeValue(EGL_BIND_TO_TEXTURE_RGBA)) + setValue(EGL_BIND_TO_TEXTURE_RGB, TRUE); +#endif return true; + } if (removeValue(EGL_STENCIL_SIZE)) return true; if (removeValue(EGL_DEPTH_SIZE)) return true; +#if defined(EGL_BIND_TO_TEXTURE_RGB) + if (removeValue(EGL_BIND_TO_TEXTURE_RGB)) + return true; +#endif return false; } diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h index 81af4cd41b..bcdc657375 100644 --- a/src/gui/egl/qeglproperties_p.h +++ b/src/gui/egl/qeglproperties_p.h @@ -107,6 +107,7 @@ class Q_GUI_EXPORT QEglProperties { public: QEglProperties(); + QEglProperties(EGLConfig); QEglProperties(const QEglProperties& other) : props(other.props) {} ~QEglProperties() {} diff --git a/src/gui/embedded/embedded.pri b/src/gui/embedded/embedded.pri index 53a2512937..e8eb9590d9 100644 --- a/src/gui/embedded/embedded.pri +++ b/src/gui/embedded/embedded.pri @@ -114,11 +114,18 @@ embedded { SOURCES += embedded/qscreenlinuxfb_qws.cpp } + contains( gfx-drivers, qnx ) { + HEADERS += embedded/qscreenqnx_qws.h + SOURCES += embedded/qscreenqnx_qws.cpp + LIBS += -lgf + } + contains( gfx-drivers, qvfb ) { HEADERS += embedded/qscreenvfb_qws.h SOURCES += embedded/qscreenvfb_qws.cpp } + contains( gfx-drivers, vnc ) { VNCDIR = $$QT_SOURCE_TREE/src/plugins/gfxdrivers/vnc INCLUDEPATH += $$VNCDIR @@ -158,6 +165,11 @@ embedded { SOURCES +=embedded/qkbdum_qws.cpp } + contains( kbd-drivers, qnx ) { + HEADERS += embedded/qkbdqnx_qws.h + SOURCES += embedded/qkbdqnx_qws.cpp + } + # # Mouse drivers # @@ -185,5 +197,10 @@ embedded { contains( mouse-drivers, linuxinput ) { HEADERS +=embedded/qmouselinuxinput_qws.h SOURCES +=embedded/qmouselinuxinput_qws.cpp - } + } + + contains( mouse-drivers, qnx ) { + HEADERS += embedded/qmouseqnx_qws.h + SOURCES += embedded/qmouseqnx_qws.cpp + } } diff --git a/src/gui/embedded/qkbddriverfactory_qws.cpp b/src/gui/embedded/qkbddriverfactory_qws.cpp index b77eb72faa..fb10030827 100644 --- a/src/gui/embedded/qkbddriverfactory_qws.cpp +++ b/src/gui/embedded/qkbddriverfactory_qws.cpp @@ -48,6 +48,7 @@ #include "qkbdlinuxinput_qws.h" #include "qkbdum_qws.h" #include "qkbdvfb_qws.h" +#include "qkbdqnx_qws.h" #include <stdlib.h> #include "private/qfactoryloader_p.h" #include "qkbddriverplugin_qws.h" @@ -101,6 +102,10 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, QWSKeyboardHandler *QKbdDriverFactory::create(const QString& key, const QString& device) { QString driver = key.toLower(); +#if defined(Q_OS_QNX) && !defined(QT_NO_QWS_KBD_QNX) + if (driver == QLatin1String("qnx") || driver.isEmpty()) + return new QWSQnxKeyboardHandler(device); +#endif #ifndef QT_NO_QWS_KEYBOARD # ifndef QT_NO_QWS_KBD_TTY if (driver == QLatin1String("tty") || driver.isEmpty()) @@ -143,6 +148,9 @@ QStringList QKbdDriverFactory::keys() { QStringList list; +#if defined(Q_OS_QNX) && !defined(QT_NO_QWS_KBD_QNX) + list << QLatin1String("QNX"); +#endif #ifndef QT_NO_QWS_KBD_TTY list << QLatin1String("TTY"); #endif diff --git a/src/gui/embedded/qkbdqnx_qws.cpp b/src/gui/embedded/qkbdqnx_qws.cpp new file mode 100644 index 0000000000..06163c735a --- /dev/null +++ b/src/gui/embedded/qkbdqnx_qws.cpp @@ -0,0 +1,231 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qkbdqnx_qws.h" +#include "QtCore/qsocketnotifier.h" +#include "QtCore/qdebug.h" + +#include <sys/dcmd_input.h> +#include <photon/keycodes.h> + +#include "qplatformdefs.h" +#include <errno.h> + +/*! + \class QWSQnxKeyboardHandler + \preliminary + \ingroup qws + \since 4.6 + \internal + + \brief The QWSQnxKeyboardHandler class implements a keyboard driver + for the QNX \c{devi-hid} input manager. + + To be able to compile this mouse handler, \l{Qt for Embedded Linux} + must be configured with the \c -qt-kbd-qnx option, see the + \l{Qt for Embedded Linux Character Input} documentation for details. + + In order to use this keyboard handler, the \c{devi-hid} input manager + must be set up and run with the resource manager interface (option \c{-r}). + Also, Photon must not be running. + + Example invocation from command line: \c{/usr/photon/bin/devi-hid -Pr kbd mouse} + Note that after running \c{devi-hid}, you will not be able to use the local + shell anymore. It is suggested to run the command in a shell scrip, that launches + a Qt application after invocation of \c{devi-hid}. + + To make \l{Qt for Embedded Linux} explicitly choose the qnx keyboard + handler, set the QWS_KEYBOARD environment variable to \c{qnx}. By default, + the first keyboard device (\c{/dev/devi/keyboard0}) is used. To override, pass a device + name as the first and only parameter, for example + \c{QWS_KEYBOARD=qnx:/dev/devi/keyboard1; export QWS_KEYBOARD}. + + \sa {Qt for Embedded Linux Character Input}, {Qt for Embedded Linux} +*/ + +/*! + Constructs a keyboard handler for the specified \a device, defaulting to + \c{/dev/devi/keyboard0}. + + Note that you should never instanciate this class, instead let QKbdDriverFactory + handle the keyboard handlers. + + \sa QKbdDriverFactory + */ +QWSQnxKeyboardHandler::QWSQnxKeyboardHandler(const QString &device) +{ + // open the keyboard device + keyboardFD = QT_OPEN(device.isEmpty() ? "/dev/devi/keyboard0" : device.toLatin1().constData(), + QT_OPEN_RDONLY); + if (keyboardFD == -1) { + qErrnoWarning(errno, "QWSQnxKeyboardHandler: Unable to open device"); + return; + } + + // create a socket notifier so we'll wake up whenever keyboard input is detected. + QSocketNotifier *notifier = new QSocketNotifier(keyboardFD, QSocketNotifier::Read, this); + connect(notifier, SIGNAL(activated(int)), SLOT(socketActivated())); + + qDebug() << "QWSQnxKeyboardHandler: connected."; + +} + +/*! + Destroys this keyboard handler and closes the connection to the keyboard device. + */ +QWSQnxKeyboardHandler::~QWSQnxKeyboardHandler() +{ + QT_CLOSE(keyboardFD); +} + +/*! \internal + Translates the QNX keyboard events to Qt keyboard events + */ +void QWSQnxKeyboardHandler::socketActivated() +{ + _keyboard_packet packet; + + // read one keyboard event + int bytesRead = QT_READ(keyboardFD, &packet, sizeof(_keyboard_packet)); + if (bytesRead == -1) { + qErrnoWarning(errno, "QWSQnxKeyboardHandler::socketActivated(): Unable to read data."); + return; + } + + // the bytes read must be the size of a keyboard packet + Q_ASSERT(bytesRead == sizeof(_keyboard_packet)); + +#if 0 + qDebug() << "keyboard got scancode" + << hex << packet.data.modifiers + << packet.data.flags + << packet.data.key_cap + << packet.data.key_sym + << packet.data.key_scan; +#endif + + // QNX is nice enough to translate the raw keyboard data into a QNX data structure + // Now we just have to translate it into a format Qt understands. + + // figure out whether it's a press + bool isPress = packet.data.key_cap & KEY_DOWN; + // figure out wheter the key is still pressed and the key event is repeated + bool isRepeat = packet.data.key_cap & KEY_REPEAT; + + Qt::Key key = Qt::Key_unknown; + int unicode = 0xffff; + + // TODO - this switch is not complete! + switch (packet.data.key_scan) { + case KEYCODE_SPACE: key = Qt::Key_Space; unicode = 0x20; break; + case KEYCODE_F1: key = Qt::Key_F1; break; + case KEYCODE_F2: key = Qt::Key_F2; break; + case KEYCODE_F3: key = Qt::Key_F3; break; + case KEYCODE_F4: key = Qt::Key_F4; break; + case KEYCODE_F5: key = Qt::Key_F5; break; + case KEYCODE_F6: key = Qt::Key_F6; break; + case KEYCODE_F7: key = Qt::Key_F7; break; + case KEYCODE_F8: key = Qt::Key_F8; break; + case KEYCODE_F9: key = Qt::Key_F9; break; + case KEYCODE_F10: key = Qt::Key_F10; break; + case KEYCODE_F11: key = Qt::Key_F11; break; + case KEYCODE_F12: key = Qt::Key_F12; break; + case KEYCODE_BACKSPACE: key = Qt::Key_Backspace; break; + case KEYCODE_TAB: key = Qt::Key_Tab; break; + case KEYCODE_RETURN: key = Qt::Key_Return; break; + case KEYCODE_KP_ENTER: key = Qt::Key_Enter; break; + case KEYCODE_UP: + case KEYCODE_KP_UP: + key = Qt::Key_Up; break; + case KEYCODE_DOWN: + case KEYCODE_KP_DOWN: + key = Qt::Key_Down; break; + case KEYCODE_LEFT: + case KEYCODE_KP_LEFT: + key = Qt::Key_Left; break; + case KEYCODE_RIGHT: + case KEYCODE_KP_RIGHT: + key = Qt::Key_Right; break; + case KEYCODE_HOME: + case KEYCODE_KP_HOME: + key = Qt::Key_Home; break; + case KEYCODE_END: + case KEYCODE_KP_END: + key = Qt::Key_End; break; + case KEYCODE_PG_UP: + case KEYCODE_KP_PG_UP: + key = Qt::Key_PageUp; break; + case KEYCODE_PG_DOWN: + case KEYCODE_KP_PG_DOWN: + key = Qt::Key_PageDown; break; + case KEYCODE_INSERT: + case KEYCODE_KP_INSERT: + key = Qt::Key_Insert; break; + case KEYCODE_DELETE: + case KEYCODE_KP_DELETE: + key = Qt::Key_Delete; break; + case KEYCODE_ESCAPE: + key = Qt::Key_Escape; break; + default: // none of the above, try the key_scan directly + unicode = packet.data.key_scan; + break; + } + + // figure out the modifiers that are currently pressed + Qt::KeyboardModifiers modifiers = Qt::NoModifier; + if (packet.data.flags & KEYMOD_SHIFT) + modifiers |= Qt::ShiftModifier; + if (packet.data.flags & KEYMOD_CTRL) + modifiers |= Qt::ControlModifier; + if (packet.data.flags & KEYMOD_ALT) + modifiers |= Qt::AltModifier; + + // if the unicode value is not ascii, we ignore it. + // TODO - do a complete mapping between all QNX scan codes and Qt codes + if (unicode != 0xffff && !isascii(unicode)) + return; // unprintable character + + // call processKeyEvent. This is where all the magic happens to insert a + // key event into Qt's event loop. + // Note that for repeated key events, isPress must be true + // (on QNX, isPress is not set when the key event is repeated). + processKeyEvent(unicode, key, modifiers, isPress || isRepeat, isRepeat); +} diff --git a/src/gui/embedded/qkbdqnx_qws.h b/src/gui/embedded/qkbdqnx_qws.h new file mode 100644 index 0000000000..c046c8d81d --- /dev/null +++ b/src/gui/embedded/qkbdqnx_qws.h @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QKBDQNX_QWS_H +#define QKBDQNX_QWS_H + +#include <QtGui/qapplication.h> +#include <QtGui/qkbd_qws.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + +#if !defined(QT_NO_QWS_KEYBOARD) && !defined(QT_NO_QWS_KBD_QNX) + +class Q_GUI_EXPORT QWSQnxKeyboardHandler : public QObject, public QWSKeyboardHandler +{ + Q_OBJECT +public: + QWSQnxKeyboardHandler(const QString &device); + ~QWSQnxKeyboardHandler(); + +private Q_SLOTS: + void socketActivated(); + +private: + int keyboardFD; +}; + +#endif // QT_NO_QWS_KEYBOARD + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QKBDQNX_QWS_H diff --git a/src/gui/embedded/qlock.cpp b/src/gui/embedded/qlock.cpp index 305832cf5d..9592a4d39d 100644 --- a/src/gui/embedded/qlock.cpp +++ b/src/gui/embedded/qlock.cpp @@ -41,9 +41,46 @@ #include "qlock_p.h" -#ifndef QT_NO_QWS_MULTIPROCESS +QT_BEGIN_NAMESPACE + +#ifdef QT_NO_QWS_MULTIPROCESS + +/* no multiprocess - use a dummy */ + +QLock::QLock(const QString & /*filename*/, char /*id*/, bool /*create*/) + : type(Read), data(0) +{ +} + +QLock::~QLock() +{ +} + +bool QLock::isValid() const +{ + return true; +} + +void QLock::lock(Type t) +{ + data = (QLockData *)-1; + type = t; +} + +void QLock::unlock() +{ + data = 0; +} + +bool QLock::locked() const +{ + return data; +} + +#else // QT_NO_QWS_MULTIPROCESS #include "qwssignalhandler_p.h" + #include <unistd.h> #include <sys/types.h> #if defined(Q_OS_DARWIN) @@ -71,16 +108,10 @@ union semun { #include <qdebug.h> #include <signal.h> -#endif // QT_NO_QWS_MULTIPROCESS - #include <private/qcore_unix_p.h> // overrides QT_OPEN #define MAX_LOCKS 200 // maximum simultaneous read locks -QT_BEGIN_NAMESPACE - - -#ifndef QT_NO_QWS_MULTIPROCESS class QLockData { public: @@ -91,7 +122,6 @@ public: int count; bool owned; }; -#endif // QT_NO_QWS_MULTIPROCESS /*! \class QLock @@ -126,11 +156,6 @@ public: QLock::QLock(const QString &filename, char id, bool create) { -#ifdef QT_NO_QWS_MULTIPROCESS - Q_UNUSED(filename); - Q_UNUSED(id); - Q_UNUSED(create); -#else data = new QLockData; data->count = 0; #ifdef Q_NO_SEMAPHORE @@ -163,7 +188,6 @@ QLock::QLock(const QString &filename, char id, bool create) qPrintable(filename), id); qDebug() << "Error" << eno << strerror(eno); } -#endif } /*! @@ -174,7 +198,6 @@ QLock::QLock(const QString &filename, char id, bool create) QLock::~QLock() { -#ifndef QT_NO_QWS_MULTIPROCESS if (locked()) unlock(); #ifdef Q_NO_SEMAPHORE @@ -188,7 +211,6 @@ QLock::~QLock() QWSSignalHandler::instance()->removeSemaphore(data->id); #endif delete data; -#endif } /*! @@ -200,11 +222,7 @@ QLock::~QLock() bool QLock::isValid() const { -#ifndef QT_NO_QWS_MULTIPROCESS return (data->id != -1); -#else - return true; -#endif } /*! @@ -221,9 +239,6 @@ bool QLock::isValid() const void QLock::lock(Type t) { -#ifdef QT_NO_QWS_MULTIPROCESS - Q_UNUSED(t); -#else if (!data->count) { #ifdef Q_NO_SEMAPHORE int op = LOCK_SH; @@ -256,7 +271,6 @@ void QLock::lock(Type t) #endif } data->count++; -#endif } /*! @@ -269,7 +283,6 @@ void QLock::lock(Type t) void QLock::unlock() { -#ifndef QT_NO_QWS_MULTIPROCESS if(data->count) { data->count--; if(!data->count) { @@ -298,7 +311,6 @@ void QLock::unlock() } else { qDebug("Unlock without corresponding lock"); } -#endif } /*! @@ -310,11 +322,9 @@ void QLock::unlock() bool QLock::locked() const { -#ifndef QT_NO_QWS_MULTIPROCESS return (data->count > 0); -#else - return false; -#endif } +#endif // QT_NO_QWS_MULTIPROCESS + QT_END_NAMESPACE diff --git a/src/gui/embedded/qmousedriverfactory_qws.cpp b/src/gui/embedded/qmousedriverfactory_qws.cpp index 46898aed87..6d717505a6 100644 --- a/src/gui/embedded/qmousedriverfactory_qws.cpp +++ b/src/gui/embedded/qmousedriverfactory_qws.cpp @@ -47,6 +47,7 @@ #include "qmouselinuxinput_qws.h" #include "qmousevfb_qws.h" #include "qmousetslib_qws.h" +#include "qmouseqnx_qws.h" #include <stdlib.h> #include "private/qfactoryloader_p.h" #include "qmousedriverplugin_qws.h" @@ -102,6 +103,10 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, QWSMouseHandler *QMouseDriverFactory::create(const QString& key, const QString &device) { QString driver = key.toLower(); +#if defined(Q_OS_QNX) && !defined(QT_NO_QWS_MOUSE_QNX) + if (driver == QLatin1String("qnx") || driver.isEmpty()) + return new QQnxMouseHandler(key, device); +#endif #ifndef QT_NO_QWS_MOUSE_LINUXTP if (driver == QLatin1String("linuxtp") || driver.isEmpty()) return new QWSLinuxTPMouseHandler(key, device); @@ -149,6 +154,9 @@ QStringList QMouseDriverFactory::keys() { QStringList list; +#if defined(Q_OS_QNX) && !defined(QT_NO_QWS_MOUSE_QNX) + list << QLatin1String("QNX"); +#endif #ifndef QT_NO_QWS_MOUSE_LINUXTP list << QLatin1String("LinuxTP"); #endif diff --git a/src/gui/embedded/qmousepc_qws.cpp b/src/gui/embedded/qmousepc_qws.cpp index 317bb8af04..2d627729ae 100644 --- a/src/gui/embedded/qmousepc_qws.cpp +++ b/src/gui/embedded/qmousepc_qws.cpp @@ -332,7 +332,7 @@ protected: tty.c_oflag = 0; tty.c_lflag = 0; tty.c_cflag = f | CREAD | CLOCAL | HUPCL; -#if !defined(Q_OS_DARWIN) && !defined(Q_OS_SOLARIS) && !defined(Q_OS_INTEGRITY) +#ifdef Q_OS_LINUX tty.c_line = 0; #endif tty.c_cc[VTIME] = 0; diff --git a/src/gui/embedded/qmouseqnx_qws.cpp b/src/gui/embedded/qmouseqnx_qws.cpp new file mode 100644 index 0000000000..98f8f06003 --- /dev/null +++ b/src/gui/embedded/qmouseqnx_qws.cpp @@ -0,0 +1,190 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qplatformdefs.h" +#include "qmouseqnx_qws.h" + +#include "qsocketnotifier.h" +#include "qdebug.h" + +#include <sys/dcmd_input.h> + +#include <errno.h> + +QT_BEGIN_NAMESPACE + +/*! + \class QQnxMouseHandler + \preliminary + \ingroup qws + \internal + \since 4.6 + + \brief The QQnxMouseHandler class implements a mouse driver + for the QNX \c{devi-hid} input manager. + + To be able to compile this mouse handler, \l{Qt for Embedded Linux} + must be configured with the \c -qt-mouse-qnx option, see the + \l{Qt for Embedded Linux Pointer Handling}{Pointer Handling} documentation for details. + + In order to use this mouse handler, the \c{devi-hid} input manager + must be set up and run with the resource manager interface (option \c{-r}). + Also, Photon must not be running. + + Example invocation from command line: \c{/usr/photon/bin/devi-hid -Pr kbd mouse} + Note that after running \c{devi-hid}, you will not be able to use the local + shell anymore. It is suggested to run the command in a shell scrip, that launches + a Qt application after invocation of \c{devi-hid}. + + To make \l{Qt for Embedded Linux} explicitly choose the qnx mouse + handler, set the QWS_MOUSE_PROTO environment variable to \c{qnx}. By default, + the first mouse device (\c{/dev/devi/mouse0}) is used. To override, pass a device + name as the first and only parameter, for example + \c{QWS_MOUSE_PROTO=qnx:/dev/devi/mouse1; export QWS_MOUSE_PROTO}. + + \sa {Qt for Embedded Linux Pointer Handling}{Pointer Handling}, {Qt for Embedded Linux} +*/ + +/*! + Constructs a mouse handler for the specified \a device, defaulting to \c{/dev/devi/mouse0}. + The \a driver parameter must be \c{"qnx"}. + + Note that you should never instanciate this class, instead let QMouseDriverFactory + handle the mouse handlers. + + \sa QMouseDriverFactory + */ +QQnxMouseHandler::QQnxMouseHandler(const QString & /*driver*/, const QString &device) +{ + // open the mouse device with O_NONBLOCK so reading won't block when there's no data + mouseFD = QT_OPEN(device.isEmpty() ? "/dev/devi/mouse0" : device.toLatin1().constData(), + QT_OPEN_RDONLY | O_NONBLOCK); + if (mouseFD == -1) { + qErrnoWarning(errno, "QQnxMouseHandler: Unable to open mouse device"); + return; + } + + // register a socket notifier on the file descriptor so we'll wake up whenever + // there's a mouse move waiting for us. + mouseNotifier = new QSocketNotifier(mouseFD, QSocketNotifier::Read, this); + connect(mouseNotifier, SIGNAL(activated(int)), SLOT(socketActivated())); + + qDebug() << "QQnxMouseHandler: connected."; +} + +/*! + Destroys this mouse handler and closes the connection to the mouse device. + */ +QQnxMouseHandler::~QQnxMouseHandler() +{ + QT_CLOSE(mouseFD); +} + +/*! \reimp */ +void QQnxMouseHandler::resume() +{ + if (mouseNotifier) + mouseNotifier->setEnabled(true); +} + +/*! \reimp */ +void QQnxMouseHandler::suspend() +{ + if (mouseNotifier) + mouseNotifier->setEnabled(false); +} + +/*! \internal + + This function is called whenever there is activity on the mouse device. + By default, it reads up to 10 mouse move packets and calls mouseChanged() + for each of them. +*/ +void QQnxMouseHandler::socketActivated() +{ + // _mouse_packet is a QNX structure. devi-hid is nice enough to translate + // the raw byte data from mouse devices into generic format for us. + _mouse_packet packet; + + int iteration = 0; + + // read mouse events in batches of 10. Since we're getting quite a lot + // of mouse events, it's better to do them in batches than to return to the + // event loop every time. + do { + int bytesRead = QT_READ(mouseFD, &packet, sizeof(packet)); + if (bytesRead == -1) { + // EAGAIN means that there are no more mouse events to read + if (errno != EAGAIN) + qErrnoWarning(errno, "QQnxMouseHandler: Unable to read from socket"); + return; + } + + // bytes read should always be equal to the size of a packet. + Q_ASSERT(bytesRead == sizeof(packet)); + + // translate the coordinates from the QNX data structure to Qt coordinates + // note the swapped y axis + QPoint pos = mousePos; + pos += QPoint(packet.dx, -packet.dy); + + // QNX only tells us relative mouse movements, not absolute ones, so limit the + // cursor position manually to the screen + limitToScreen(pos); + + // translate the QNX mouse button bitmask to Qt buttons + int buttons = Qt::NoButton; + + if (packet.hdr.buttons & _POINTER_BUTTON_LEFT) + buttons |= Qt::LeftButton; + if (packet.hdr.buttons & _POINTER_BUTTON_MIDDLE) + buttons |= Qt::MidButton; + if (packet.hdr.buttons & _POINTER_BUTTON_RIGHT) + buttons |= Qt::RightButton; + + // call mouseChanged() - this does all the magic to actually move the on-screen + // mouse cursor. + mouseChanged(pos, buttons, 0); + } while (++iteration < 11); +} + +QT_END_NAMESPACE + diff --git a/src/gui/embedded/qmouseqnx_qws.h b/src/gui/embedded/qmouseqnx_qws.h new file mode 100644 index 0000000000..a61562e2fb --- /dev/null +++ b/src/gui/embedded/qmouseqnx_qws.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOUSE_QNX_H +#define QMOUSE_QNX_H + +#include <QtCore/qobject.h> +#include <QtGui/qmouse_qws.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + +class QSocketNotifier; + +class Q_GUI_EXPORT QQnxMouseHandler : public QObject, public QWSMouseHandler +{ + Q_OBJECT +public: + explicit QQnxMouseHandler(const QString &driver = QString(), + const QString &device = QString()); + ~QQnxMouseHandler(); + + void resume(); + void suspend(); + +private Q_SLOTS: + void socketActivated(); + +private: + QSocketNotifier *mouseNotifier; + int mouseFD; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QMOUSE_QWS_H diff --git a/src/gui/embedded/qscreendriverfactory_qws.cpp b/src/gui/embedded/qscreendriverfactory_qws.cpp index 229062775e..b531798b74 100644 --- a/src/gui/embedded/qscreendriverfactory_qws.cpp +++ b/src/gui/embedded/qscreendriverfactory_qws.cpp @@ -47,6 +47,7 @@ #include "qscreentransformed_qws.h" #include "qscreenvfb_qws.h" #include "qscreenmulti_qws_p.h" +#include "qscreenqnx_qws.h" #include <stdlib.h> #include "private/qfactoryloader_p.h" #include "qscreendriverplugin_qws.h" @@ -105,6 +106,10 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, QScreen *QScreenDriverFactory::create(const QString& key, int displayId) { QString driver = key.toLower(); +#if defined(Q_OS_QNX) && !defined(QT_NO_QWS_QNX) + if (driver == QLatin1String("qnx") || driver.isEmpty()) + return new QQnxScreen(displayId); +#endif #ifndef QT_NO_QWS_QVFB if (driver == QLatin1String("qvfb") || driver.isEmpty()) return new QVFbScreen(displayId); @@ -146,6 +151,9 @@ QStringList QScreenDriverFactory::keys() { QStringList list; +#if defined(Q_OS_QNX) && !defined(QT_NO_QWS_QNX) + list << QLatin1String("QNX"); +#endif #ifndef QT_NO_QWS_QVFB list << QLatin1String("QVFb"); #endif diff --git a/src/gui/embedded/qscreenqnx_qws.cpp b/src/gui/embedded/qscreenqnx_qws.cpp new file mode 100644 index 0000000000..7101bc7865 --- /dev/null +++ b/src/gui/embedded/qscreenqnx_qws.cpp @@ -0,0 +1,447 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qscreenqnx_qws.h" +#include "qdebug.h" + +#include <gf/gf.h> + +// This struct holds all the pointers to QNX's internals +struct QQnxScreenContext +{ + inline QQnxScreenContext() + : device(0), display(0), layer(0), hwSurface(0), memSurface(0), context(0) + {} + + gf_dev_t device; + gf_dev_info_t deviceInfo; + gf_display_t display; + gf_display_info_t displayInfo; + gf_layer_t layer; + gf_surface_t hwSurface; + gf_surface_t memSurface; + gf_surface_info_t memSurfaceInfo; + gf_context_t context; +}; + +/*! + \class QQnxScreen + \preliminary + \ingroup qws + \since 4.6 + \internal + + \brief The QQnxScreen class implements a screen driver + for QNX io-display based devices. + + Note - you never have to instanciate this class, the QScreenDriverFactory + does that for us based on the \c{QWS_DISPLAY} environment variable. + + To activate this driver, set \c{QWS_DISPLAY} to \c{qnx}. + + Example: + \c{QWS_DISPLAY=qnx; export QWS_DISPLAY} + + By default, the main layer of the first display of the first device is used. + If you have multiple graphic cards, multiple displays or multiple layers and + don't want to connect to the default, you can override that with setting + the corresponding options \c{device}, \c{display} or \c{layer} in the \c{QWS_DISPLAY} variable: + + \c{QWS_DISPLAY=qnx:device=3:display=4:layer=5} + + In addition, it is suggested to set the physical width and height of the display. + QQnxScreen will use that information to compute the dots per inch (DPI) in order to render + fonts correctly. If this informaiton is omitted, QQnxScreen defaults to 72 dpi. + + \c{QWS_DISPLAY=qnx:mmWidth=120:mmHeight=80} + + \c{mmWidth} and \c{mmHeight} are the physical width/height of the screen in millimeters. + + \sa QScreen, QScreenDriverPlugin, {Running Qt for Embedded Linux Applications}{Running Applications} +*/ + +/*! + Constructs a QQnxScreen object. The \a display_id argument + identifies the Qt for Embedded Linux server to connect to. +*/ +QQnxScreen::QQnxScreen(int display_id) + : QScreen(display_id), d(new QQnxScreenContext) +{ +} + +/*! + Destroys this QQnxScreen object. +*/ +QQnxScreen::~QQnxScreen() +{ + delete d; +} + +/*! \reimp +*/ +bool QQnxScreen::initDevice() +{ + // implement this if you have multiple processes that want to access the display + // (not required if QT_NO_QWS_MULTIPROCESS is set) + return true; +} + +/*! \internal + Attaches to the named device \a name. +*/ +static bool attachDevice(QQnxScreenContext * const d, const char *name) +{ + int ret = gf_dev_attach(&d->device, name, &d->deviceInfo); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_dev_attach(%s) failed with error code %d", name, ret); + return false; + } + return true; +} + +/*! \internal + Attaches to the display at index \a displayIndex. + */ +static bool attachDisplay(QQnxScreenContext * const d, int displayIndex) +{ + int ret = gf_display_attach(&d->display, d->device, displayIndex, &d->displayInfo); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_display_attach(%d) failed with error code %d", + displayIndex, ret); + return false; + } + return true; +} + +/*! \internal + Attaches to the layer \a layerIndex. + */ +static bool attachLayer(QQnxScreenContext * const d, int layerIndex) +{ + int ret = gf_layer_attach(&d->layer, d->display, layerIndex, 0); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_layer_attach(%d) failed with error code %d", layerIndex, + ret); + return false; + } + gf_layer_enable(d->layer); + + return true; +} + +/*! \internal + Creates a new hardware surface (usually on the Gfx card memory) with the dimensions \a w * \a h. + */ +static bool createHwSurface(QQnxScreenContext * const d, int w, int h) +{ + int ret = gf_surface_create_layer(&d->hwSurface, &d->layer, 1, 0, + w, h, GF_FORMAT_ARGB8888, 0, 0); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_surface_create_layer(%dx%d) failed with error code %d", + w, h, ret); + return false; + } + + gf_layer_set_surfaces(d->layer, &d->hwSurface, 1); + + ret = gf_layer_update(d->layer, 0); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_layer_update() failed with error code %d\n", ret); + return false; + } + + return true; +} + +/*! \internal + Creates an in-memory, linear accessible surface of dimensions \a w * \a h. + This is the main surface that QWS blits to. + */ +static bool createMemSurface(QQnxScreenContext * const d, int w, int h) +{ + // Note: gf_surface_attach() could also be used, so we'll create the buffer + // and let the surface point to it. Here, we use surface_create instead. + + int ret = gf_surface_create(&d->memSurface, d->device, w, h, + GF_FORMAT_ARGB8888, 0, + GF_SURFACE_CREATE_CPU_FAST_ACCESS | GF_SURFACE_CREATE_CPU_LINEAR_ACCESSIBLE + | GF_SURFACE_PHYS_CONTIG); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_surface_create(%dx%d) failed with error code %d", + w, h, ret); + return false; + } + + gf_surface_get_info(d->memSurface, &d->memSurfaceInfo); + + if (d->memSurfaceInfo.sid == unsigned(GF_SID_INVALID)) { + qWarning("QQnxScreen: gf_surface_get_info() failed."); + return false; + } + + return true; +} + +/* \internal + Creates a QNX gf context and sets our memory surface on it. + */ +static bool createContext(QQnxScreenContext * const d) +{ + int ret = gf_context_create(&d->context); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_context_create() failed with error code %d", ret); + return false; + } + + ret = gf_context_set_surface(d->context, d->memSurface); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_context_set_surface() failed with error code %d", ret); + return false; + } + + return true; +} + +/*! \reimp + Connects to QNX's io-display based device based on the \a displaySpec parameters + from the \c{QWS_DISPLAY} environment variable. See the QQnxScreen class documentation + for possible parameters. + + \sa QQnxScreen + */ +bool QQnxScreen::connect(const QString &displaySpec) +{ + const QStringList params = displaySpec.split(QLatin1Char(':'), QString::SkipEmptyParts); + + bool isOk = false; + QRegExp deviceRegExp(QLatin1String("^device=(.+)$")); + if (params.indexOf(deviceRegExp) != -1) { + isOk = attachDevice(d, deviceRegExp.cap(1).toLocal8Bit().constData()); + } else { + // no device specified - attach to device 0 (the default) + isOk = attachDevice(d, GF_DEVICE_INDEX(0)); + } + + if (!isOk) + return false; + + qDebug("QQnxScreen: Attached to Device, number of displays: %d", d->deviceInfo.ndisplays); + + // default to display 0 + int displayIndex = 0; + QRegExp displayRegexp(QLatin1String("^display=(\\d+)$")); + if (params.indexOf(displayRegexp) != -1) { + displayIndex = displayRegexp.cap(1).toInt(); + } + + if (!attachDisplay(d, displayIndex)) + return false; + + qDebug("QQnxScreen: Attached to Display %d, resolution %dx%d, refresh %d Hz", + displayIndex, d->displayInfo.xres, d->displayInfo.yres, + d->displayInfo.refresh); + + + // default to main_layer_index from the displayInfo struct + int layerIndex = 0; + QRegExp layerRegexp(QLatin1String("^layer=(\\d+)$")); + if (params.indexOf(layerRegexp) != -1) { + layerIndex = layerRegexp.cap(1).toInt(); + } else { + layerIndex = d->displayInfo.main_layer_index; + } + + if (!attachLayer(d, layerIndex)) + return false; + + // tell QWSDisplay the width and height of the display + w = dw = d->displayInfo.xres; + h = dh = d->displayInfo.yres; + + // we only support 32 bit displays for now. + QScreen::d = 32; + + // assume 72 dpi as default, to calculate the physical dimensions if not specified + const int defaultDpi = 72; + + // Handle display physical size spec. + QRegExp mmWidthRegexp(QLatin1String("^mmWidth=(\\d+)$")); + if (params.indexOf(mmWidthRegexp) == -1) { + physWidth = qRound(dw * 25.4 / defaultDpi); + } else { + physWidth = mmWidthRegexp.cap(1).toInt(); + } + + QRegExp mmHeightRegexp(QLatin1String("^mmHeight=(\\d+)$")); + if (params.indexOf(mmHeightRegexp) == -1) { + physHeight = qRound(dh * 25.4 / defaultDpi); + } else { + physHeight = mmHeightRegexp.cap(1).toInt(); + } + + // create a hardware surface with our dimensions. In the old days, it was possible + // to get a pointer directly to the hw surface, so we could blit directly. Now, we + // have to use one indirection more, because it's not guaranteed that the hw surface + // is mappable into our process. + if (!createHwSurface(d, w, h)) + return false; + + // create an in-memory linear surface that is used by QWS. QWS will blit directly in here. + if (!createMemSurface(d, w, h)) + return false; + + // set the address of the in-memory buffer that QWS is blitting to + data = d->memSurfaceInfo.vaddr; + // set the line stepping + lstep = d->memSurfaceInfo.stride; + + // the overall size of the in-memory buffer is linestep * height + size = mapsize = lstep * h; + + // create a QNX drawing context + if (!createContext(d)) + return false; + + // we're always using a software cursor for now. Initialize it here. + QScreenCursor::initSoftwareCursor(); + + // done, the driver should be connected to the display now. + return true; +} + +/*! \reimp + */ +void QQnxScreen::disconnect() +{ + if (d->context) + gf_context_free(d->context); + + if (d->memSurface) + gf_surface_free(d->memSurface); + + if (d->hwSurface) + gf_surface_free(d->hwSurface); + + if (d->layer) + gf_layer_detach(d->layer); + + if (d->display) + gf_display_detach(d->display); + + if (d->device) + gf_dev_detach(d->device); + + d->memSurface = 0; + d->hwSurface = 0; + d->context = 0; + d->layer = 0; + d->display = 0; + d->device = 0; +} + +/*! \reimp + */ +void QQnxScreen::shutdownDevice() +{ +} + + +/*! \reimp + QQnxScreen doesn't support setting the mode, use io-display instead. + */ +void QQnxScreen::setMode(int,int,int) +{ + qWarning("QQnxScreen: Unable to change mode, use io-display instead."); +} + +/*! \reimp + */ +bool QQnxScreen::supportsDepth(int depth) const +{ + // only 32-bit for the moment + return depth == 32; +} + +/*! \reimp + */ +void QQnxScreen::exposeRegion(QRegion r, int changing) +{ + // here is where the actual magic happens. QWS will call exposeRegion whenever + // a region on the screen is dirty and needs to be updated on the actual screen. + + // first, call the parent implementation. The parent implementation will update + // the region on our in-memory surface + QScreen::exposeRegion(r, changing); + + // now our in-memory surface should be up to date with the latest changes. + // the code below copies the region from the in-memory surface to the hardware. + + // just get the bounding rectangle of the region. Most screen updates are rectangular + // anyways. Code could be optimized to blit each and every member of the region + // individually, but in real life, the speed-up is neglectable + const QRect br = r.boundingRect(); + if (br.isEmpty()) + return; // ignore empty regions because gf_draw_blit2 doesn't like 0x0 dimensions + + // start drawing. + int ret = gf_draw_begin(d->context); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_draw_begin() failed with error code %d", ret); + return; + } + + // blit the changed region from the memory surface to the hardware surface + ret = gf_draw_blit2(d->context, d->memSurface, d->hwSurface, + br.x(), br.y(), br.right(), br.bottom(), br.x(), br.y()); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_draw_blit2() failed with error code %d", ret); + } + + // flush all drawing commands (in our case, a single blit) + ret = gf_draw_flush(d->context); + if (ret != GF_ERR_OK) { + qWarning("QQnxScreen: gf_draw_flush() failed with error code %d", ret); + } + + // tell QNX that we're done drawing. + gf_draw_end(d->context); +} + diff --git a/src/gui/embedded/qscreenqnx_qws.h b/src/gui/embedded/qscreenqnx_qws.h new file mode 100644 index 0000000000..837c0613dd --- /dev/null +++ b/src/gui/embedded/qscreenqnx_qws.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSCREENQNX_QWS_H +#define QSCREENQNX_QWS_H + +#include <QtGui/qscreen_qws.h> + +#ifndef QT_NO_QWS_QNX + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + +struct QQnxScreenContext; + +class QQnxScreen : public QScreen +{ +public: + explicit QQnxScreen(int display_id); + ~QQnxScreen(); + + bool initDevice(); + bool connect(const QString &displaySpec); + void disconnect(); + void shutdownDevice(); + void setMode(int,int,int); + bool supportsDepth(int) const; + + void exposeRegion(QRegion r, int changing); + +private: + QQnxScreenContext * const d; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QT_NO_QWS_QNX + +#endif diff --git a/src/gui/embedded/qwindowsystem_qws.cpp b/src/gui/embedded/qwindowsystem_qws.cpp index a521319ca3..954505176e 100644 --- a/src/gui/embedded/qwindowsystem_qws.cpp +++ b/src/gui/embedded/qwindowsystem_qws.cpp @@ -39,6 +39,8 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" + #include "qwindowsystem_qws.h" #include "qwsevent_qws.h" #include "qwscommand_qws_p.h" @@ -71,24 +73,26 @@ #include <qdebug.h> -#include <unistd.h> +#include "qkbddriverfactory_qws.h" +#include "qmousedriverfactory_qws.h" + +#include <qbuffer.h> +#include <qdir.h> + +#include <private/qwindowsurface_qws_p.h> +#include <private/qfontengine_qpf_p.h> + +#include "qwindowsystem_p.h" + + #include <stdlib.h> #include <stdio.h> #include <errno.h> #ifndef QT_NO_QWS_MULTIPROCESS -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/ipc.h> -#include <sys/shm.h> -#ifndef Q_OS_DARWIN -# include <sys/sem.h> -#endif #include <sys/param.h> #include <sys/mount.h> #endif -#include <signal.h> -#include <fcntl.h> #if !defined(QT_NO_SOUND) && !defined(Q_OS_DARWIN) #ifdef QT_USE_OLD_QWS_SOUND @@ -101,17 +105,6 @@ #endif #endif -#include "qkbddriverfactory_qws.h" -#include "qmousedriverfactory_qws.h" - -#include <qbuffer.h> -#include <qdir.h> - -#include <private/qwindowsurface_qws_p.h> -#include <private/qfontengine_qpf_p.h> - -#include "qwindowsystem_p.h" - //#define QWS_DEBUG_FONTCLEANUP QT_BEGIN_NAMESPACE @@ -1406,7 +1399,7 @@ void QWSServerPrivate::initServer(int flags) #ifndef QT_NO_QWS_MULTIPROCESS if (!geteuid()) { -#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_SOLARIS) && !defined(Q_OS_DARWIN) && !defined(QT_LINUXBASE) +#if defined(Q_OS_LINUX) && !defined(QT_LINUXBASE) if(mount(0,"/var/shm", "shm", 0, 0)) { /* This just confuses people with 2.2 kernels if (errno != EBUSY) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index db00fbd69b..7e738631bf 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -135,38 +135,39 @@ \section1 Transformation - QGraphicsItem supports affine transformations in addition to its base - position, pos(). To change the item's transformation, you can pass - a transformation matrix to setTransform() - - Item transformations accumulate from parent to child, so if both a - parent and child item are rotated 90 degrees, the child's total - transformation will be 180 degrees. Similarly, if the item's - parent is scaled to 2x its original size, its children will also - be twice as large. An item's transformation does not affect its - own local geometry; all geometry functions (e.g., contains(), - update(), and all the mapping functions) still operate in local - coordinates. For convenience, QGraphicsItem provides the functions - sceneTransform(), which returns the item's total transformation + QGraphicsItem supports projective transformations in addition to its base + position, pos(). There are several ways to change an item's transformation. + For simple transformations, you can call either of the convenience + functions setRotation() or setScale(), or you can pass any transformation + matrix to setTransform(). For advanced transformation control you also have + the option of setting several combined transformations by calling + setTransformations(). + + Item transformations accumulate from parent to child, so if both a parent + and child item are rotated 90 degrees, the child's total transformation + will be 180 degrees. Similarly, if the item's parent is scaled to 2x its + original size, its children will also be twice as large. An item's + transformation does not affect its own local geometry; all geometry + functions (e.g., contains(), update(), and all the mapping functions) still + operate in local coordinates. For convenience, QGraphicsItem provides the + functions sceneTransform(), which returns the item's total transformation matrix (including its position and all parents' positions and - transformations), and scenePos(), which returns its position in - scene coordinates. To reset an item's matrix, call - resetTransform(). + transformations), and scenePos(), which returns its position in scene + coordinates. To reset an item's matrix, call resetTransform(). - Another way to apply transformation to an item is to use the , or - set the different transformation properties (transformOrigin, - x/y/zRotation, x/yScale, horizontal/verticalShear). Those - properties come in addition to the base transformation + Certain transformation operations produce a different outcome depending on + the order in which they are applied. For example, if you scale an + transform, and then rotate it, you may get a different result than if the + transform was rotated first. However, the order you set the transformation + properties on QGraphicsItem does not affect the resulting transformation; + QGraphicsItem always applies the properties in a fixed, defined order: - The order you set the transformation properties does not affect - the resulting transformation The resulting transformation is - always computed in the following order - - \code - [Origin] [Base] [RotateX] [RotateY] [RotateZ] [Shear] [Scale] [-Origin] - \endcode - - Where [Base] is the stransformation set by setTransform + \list + \o The item's base transform is applied (transform()) + \o The item's transformations list is applied in order (transformations()) + \o The item is rotated relative to its transform origin point (rotation(), transformOriginPoint()) + \o The item is scaled relative to its transform origin point (scale(), transformOriginPoint()) + \endlist \section1 Painting @@ -2969,11 +2970,10 @@ QMatrix QGraphicsItem::matrix() const Returns this item's transformation matrix. - Either the one set by setTransform, or the resulting transformation from - all the transfmation properties - - If no matrix or transformation property has been set, the - identity matrix is returned. + The transformation matrix is combined with the item's rotation(), scale() + and transformations() into a combined transformations for the item. + + The default transformation matrix is an identity matrix. \sa setTransform(), sceneTransform() */ @@ -2987,13 +2987,13 @@ QTransform QGraphicsItem::transform() const /*! \since 4.6 - Returns the rotation around the Z axis. + Returns the clockwise rotation, in degrees, around the Z axis. The default + value is 0 (i.e., the item is not rotated). - The default is 0 + The rotation is combined with the item's scale(), transform() and + transformations() to map the item's coordinate system to the parent item. - \warning The value doesn't take in account any rotation set with the setTransform() method. - - \sa setRotation(), {Transformations} + \sa setRotation(), transformOriginPoint(), {Transformations} */ qreal QGraphicsItem::rotation() const { @@ -3005,9 +3005,19 @@ qreal QGraphicsItem::rotation() const /*! \since 4.6 - Sets the rotation around the Z axis to \a angle degrees. + Sets the clockwise rotation \a angle, in degrees, around the Z axis. The + default value is 0 (i.e., the item is not rotated). Assigning a negative + value will rotate the item counter-clockwise. Normally the rotation angle + is in the range (-360, 360), but it's also possible to assign values + outside of this range (e.g., a rotation of 370 degrees is the same as a + rotation of 10 degrees). + + The item is rotated around its transform origin point, which by default + is (0, 0). You can select a different transformation origin by calling + setTransformOriginPoint(). - \warning The value doesn't take in account any rotation set with the setTransform() method. + The rotation is combined with the item's scale(), transform() and + transformations() to map the item's coordinate system to the parent item. \sa rotation(), setTransformOriginPoint(), {Transformations} */ @@ -3027,13 +3037,13 @@ void QGraphicsItem::setRotation(qreal angle) /*! \since 4.6 - Returns the scale factor of the item. + Returns the scale factor of the item. The default scale factor is 1.0 + (i.e., the item is not scaled). - The default is 1 + The scale is combined with the item's rotation(), transform() and + transformations() to map the item's coordinate system to the parent item. - \warning The value doesn't take in account any scaling set with the setTransform() method. - - \sa setScale(), {Transformations} + \sa setScale(), rotation(), {Transformations} */ qreal QGraphicsItem::scale() const { @@ -3045,9 +3055,17 @@ qreal QGraphicsItem::scale() const /*! \since 4.6 - Sets the scale factor of the item to \a factor. + Sets the scale \a factor of the item. The default scale factor is 1.0 + (i.e., the item is not scaled). A scale factor of 0.0 will collapse the + item to a single point. If you provide a negative scale factor, the + item will be flipped and mirrored (i.e., rotated 180 degrees). + + The item is scaled around its transform origin point, which by default + is (0, 0). You can select a different transformation origin by calling + setTransformOriginPoint(). - \warning The value doesn't take in account any scaling set with the setTransform() method. + The scale is combined with the item's rotation(), transform() and + transformations() to map the item's coordinate system to the parent item. \sa scale(), setTransformOriginPoint(), {Transformations} */ @@ -3068,9 +3086,17 @@ void QGraphicsItem::setScale(qreal factor) /*! \since 4.6 - returns list of graphics transformations on the item. + Returns a list of graphics transforms that currently apply to this item. - \sa scale(), setTransformOriginPoint(), {Transformations} + QGraphicsTransform is for applying and controlling a chain of individual + transformation operations on an item. It's particularily useful in + animations, where each transform operation needs to be interpolated + independently, or differently. + + The transformations are combined with the item's rotation(), scale() and + transform() to map the item's coordinate system to the parent item. + + \sa scale(), rotation(), transformOriginPoint(), {Transformations} */ QList<QGraphicsTransform *> QGraphicsItem::transformations() const { @@ -3082,7 +3108,20 @@ QList<QGraphicsTransform *> QGraphicsItem::transformations() const /*! \since 4.6 - Sets a list of graphics transformations on the item to \a transformations. + Sets a list of graphics \a transformations (QGraphicsTransform) that + currently apply to this item. + + If all you want is to rotate or scale an item, you should call setRotation() + or setScale() instead. If you want to set an arbitrary transformation on + an item, you can call setTransform(). + + QGraphicsTransform is for applying and controlling a chain of individual + transformation operations on an item. It's particularily useful in + animations, where each transform operation needs to be interpolated + independently, or differently. + + The transformations are combined with the item's rotation(), scale() and + transform() to map the item's coordinate system to the parent item. \sa scale(), setTransformOriginPoint(), {Transformations} */ @@ -3098,7 +3137,9 @@ void QGraphicsItem::setTransformations(const QList<QGraphicsTransform *> &transf d_ptr->dirtySceneTransform = 1; } - +/*! + \internal +*/ void QGraphicsItemPrivate::appendGraphicsTransform(QGraphicsTransform *t) { if (!transformData) @@ -3432,7 +3473,9 @@ void QGraphicsItem::setMatrix(const QMatrix &matrix, bool combine) to map an item coordiate to a scene coordinate, or mapFromScene() to map from scene coordinates to item coordinates. - \warning using this function doesnt affect the value of the transformation properties + The transformation matrix is combined with the item's rotation(), scale() + and transformations() into a combined transformation that maps the item's + coordinate system to its parent. \sa transform(), setRotation(), setScale(), setTransformOriginPoint(), {The Graphics View Coordinate System}, {Transformations} */ @@ -3491,7 +3534,14 @@ void QGraphicsItem::resetTransform() /*! \obsolete - Use setZRotation() instead + + Use + + \code + setRotation(rotation() + angle); + \endcode + + instead. Rotates the current item transformation \a angle degrees clockwise around its origin. To translate around an arbitrary point (x, y), you need to @@ -3501,8 +3551,6 @@ void QGraphicsItem::resetTransform() \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 6 - \warning using this functionhas no effect on the zRotation value - \sa setTransform(), transform(), scale(), shear(), translate() */ void QGraphicsItem::rotate(qreal angle) @@ -3512,7 +3560,14 @@ void QGraphicsItem::rotate(qreal angle) /*! \obsolete - Use setScale() instead + + Use + + \code + setTransform(QTransform::fromScale(sx, sy), true); + \endcode + + instead. Scales the current item transformation by (\a sx, \a sy) around its origin. To scale from an arbitrary point (x, y), you need to combine @@ -3522,8 +3577,6 @@ void QGraphicsItem::rotate(qreal angle) \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 7 - \warning using this function has no effect on the xScale or yScale value - \sa setTransform(), transform() */ void QGraphicsItem::scale(qreal sx, qreal sy) @@ -3533,11 +3586,16 @@ void QGraphicsItem::scale(qreal sx, qreal sy) /*! \obsolete - Use setShear instead. - Shears the current item transformation by (\a sh, \a sv). + Use + + \code + setTransform(QTransform().shear(sh, sv), true); + \endcode + + instead. - \warning using this function has no effect on the horizontalShear or verticalShear value + Shears the current item transformation by (\a sh, \a sv). \sa setTransform(), transform() */ @@ -3548,7 +3606,13 @@ void QGraphicsItem::shear(qreal sh, qreal sv) /*! \obsolete - Use setPos() or setTransformOriginPoint() instead. + + Use setPos() or setTransformOriginPoint() instead. For identical + behavior, use + + \code + setTransform(QTransform::fromTranslate(dx, dy), true); + \endcode Translates the current item transformation by (\a dx, \a dy). @@ -6462,7 +6526,7 @@ void QGraphicsItem::prepareGeometryChange() // if someone is connected to the changed signal or the scene has no views. // Note that this has to be done *after* markDirty to ensure that // _q_processDirtyItems is called before _q_emitUpdated. - if ((scenePrivate->connectedSignals & scenePrivate->changedSignalMask) + if ((scenePrivate->connectedSignals[0] & scenePrivate->changedSignalMask) || scenePrivate->views.isEmpty()) { if (d_ptr->hasTranslateOnlySceneTransform()) { d_ptr->scene->update(boundingRect().translated(d_ptr->sceneTransform.dx(), @@ -6747,6 +6811,16 @@ QGraphicsObject::QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent */ /*! + \fn const QObjectList &QGraphicsObject::children() const + \internal + + This function returns the same value as QObject::children(). It's + provided to differentiate between the obsolete member + QGraphicsItem::children() and QObject::children(). QGraphicsItem now + provides childItems() instead. +*/ + +/*! \property QGraphicsObject::transformOriginPoint \brief the transformation origin diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index aa2cf401de..ba01b5254b 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -468,7 +468,8 @@ public: QGraphicsItem *q_ptr; }; -struct QGraphicsItemPrivate::TransformData { +struct QGraphicsItemPrivate::TransformData +{ QTransform transform; qreal scale; qreal rotation; @@ -481,7 +482,7 @@ struct QGraphicsItemPrivate::TransformData { scale(1.0), rotation(0.0), xOrigin(0.0), yOrigin(0.0), onlyTransform(true) - {} + { } QTransform computedFullTransform(QTransform *postmultiplyTransform = 0) const { diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index e6727af52c..9b9c9c24cf 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -344,7 +344,7 @@ void QGraphicsScenePrivate::_q_emitUpdated() // the optimization that items send updates directly to the views, but it // needs to happen in order to keep compatibility with the behavior from // Qt 4.4 and backward. - if (connectedSignals & changedSignalMask) { + if (connectedSignals[0] & changedSignalMask) { for (int i = 0; i < views.size(); ++i) { QGraphicsView *view = views.at(i); if (!view->d_func()->connectedToScene) { @@ -2899,7 +2899,7 @@ void QGraphicsScene::update(const QRectF &rect) // Check if anyone's connected; if not, we can send updates directly to // the views. Otherwise or if there are no views, use old behavior. - bool directUpdates = !(d->connectedSignals & d->changedSignalMask) && !d->views.isEmpty(); + bool directUpdates = !(d->connectedSignals[0] & d->changedSignalMask) && !d->views.isEmpty(); if (rect.isNull()) { d->updateAll = true; d->updatedRects.clear(); @@ -4477,7 +4477,7 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b if (removingItemFromScene) { // Note that this function can be called from the item's destructor, so // do NOT call any virtual functions on it within this block. - if ((connectedSignals & changedSignalMask) || views.isEmpty()) { + if ((connectedSignals[0] & changedSignalMask) || views.isEmpty()) { // This block of code is kept for compatibility. Since 4.5, by default // QGraphicsView does not connect the signal and we use the below // method of delivering updates. @@ -4623,7 +4623,7 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool // Process item. if (item->d_ptr->dirty || item->d_ptr->paintedViewBoundingRectsNeedRepaint) { - const bool useCompatUpdate = views.isEmpty() || (connectedSignals & changedSignalMask); + const bool useCompatUpdate = views.isEmpty() || (connectedSignals[0] & changedSignalMask); const QRectF itemBoundingRect = adjustedItemBoundingRect(item); if (useCompatUpdate && !itemIsUntransformable && qFuzzyIsNull(item->boundingRegionGranularity())) { diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp index 40043e7da4..e5f03b3e98 100644 --- a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp +++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp @@ -525,7 +525,7 @@ QGraphicsSceneBspTreeIndex::~QGraphicsSceneBspTreeIndex() } /*! - \reimp + \internal Clear the all the BSP index. */ void QGraphicsSceneBspTreeIndex::clear() @@ -566,7 +566,7 @@ void QGraphicsSceneBspTreeIndex::removeItem(QGraphicsItem *item) } /*! - \reimp + \internal Update the BSP when the \a item 's bounding rect has changed. */ void QGraphicsSceneBspTreeIndex::prepareBoundingRectChange(const QGraphicsItem *item) @@ -682,7 +682,7 @@ void QGraphicsSceneBspTreeIndex::setBspTreeDepth(int depth) } /*! - \reimp + \internal This method react to the \a rect change of the scene and reset the BSP tree index. @@ -695,11 +695,10 @@ void QGraphicsSceneBspTreeIndex::updateSceneRect(const QRectF &rect) } /*! - \reimp + \internal This method react to the \a change of the \a item and use the \a value to update the BSP tree if necessary. - */ void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value) { diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp index a71d5cc794..69b600225f 100644 --- a/src/gui/graphicsview/qgraphicstransform.cpp +++ b/src/gui/graphicsview/qgraphicstransform.cpp @@ -39,6 +39,43 @@ ** ****************************************************************************/ +/*! + \class QGraphicsTransform + \brief The QGraphicsTransform class is an abstract base class for building + advanced transformations on QGraphicsItems. + \since 4.6 + + As an alternative to QGraphicsItem::transform, QGraphicsTransform lets you + create and control advanced transformations that can be configured + independently using specialized properties. + + QGraphicsItem allows you to assign any number of QGraphicsTransform + instances to one QGraphicsItem. Each QGraphicsTransform is applied in + order, one at a time, to the QGraphicsItem it's assigned to. + + QGraphicsTransform is particularily useful for animations. Whereas + QGraphicsItem::setTransform() lets you assign any transform directly to an + item, there is no direct way to interpolate between two different + transformations (e.g., when transitioning between two states, each for + which the item has a different arbitrary transform assigned). Using + QGraphicsTransform you can interpolate the property values of each + independent transformation. The resulting operation is then combined into a + single transform which is applied to QGraphicsItem. + + If you want to create your own configurable transformation, you can create + a subclass of QGraphicsTransform (or any or the existing subclasses), and + reimplement the pure virtual applyTo() function, which takes a pointer to a + QTransform. Each operation you would like to apply should be exposed as + properties (e.g., customTransform->setVerticalShear(2.5)). Inside you + reimplementation of applyTo(), you can modify the provided transform + respectively. + + QGraphicsTransform can be used together with QGraphicsItem::setTransform(), + QGraphicsItem::setRotation(), and QGraphicsItem::setScale(). + + \sa QGraphicsItem::transform(), QGraphicsScale, QGraphicsRotation, QGraphicsRotation3D +*/ + #include "qgraphicstransform.h" #include "qgraphicsitem_p.h" #include "qgraphicstransform_p.h" @@ -51,7 +88,6 @@ QT_BEGIN_NAMESPACE - void QGraphicsTransformPrivate::setItem(QGraphicsItem *i) { if (item == i) @@ -77,15 +113,38 @@ void QGraphicsTransformPrivate::updateItem(QGraphicsItem *item) item->d_ptr->dirtySceneTransform = 1; } -void QGraphicsTransform::update() +/*! + Constructs a new QGraphicsTransform with the given \a parent. +*/ +QGraphicsTransform::QGraphicsTransform(QObject *parent) + : QObject(*new QGraphicsTransformPrivate, parent) +{ +} + +/*! + Destroys the graphics transform. +*/ +QGraphicsTransform::~QGraphicsTransform() { Q_D(QGraphicsTransform); - if (d->item) - d->updateItem(d->item); + d->setItem(0); +} + +/*! + \internal +*/ +QGraphicsTransform::QGraphicsTransform(QGraphicsTransformPrivate &p, QObject *parent) + : QObject(p, parent) +{ } /*! - returns this object as a QTransform. + Applies this transformation to an identity transform, and returns the + resulting transform. + + This is equivalent to passing an identity transform to applyTo(). + + \sa applyTo() */ QTransform QGraphicsTransform::transform() const { @@ -95,76 +154,65 @@ QTransform QGraphicsTransform::transform() const } /*! - \class QGraphicsTransform - \brief The QGraphicsTransform class is an abstract base class for tranformations on QGraphicsItems. - \since 4.6 - - The classes that inherit QGraphicsTransform express different types of transformations - that can be applied to graphics items. + \fn void QGraphicsTransform::applyTo(QTransform *transform) const - A list of these transformations can be applied to any graphics item. These - transformations are then easily modifyable and usable from e.g. within animations. + This pure virtual method has to be reimplemented in derived classes. - QGraphicsTransform is an abstract base class that is implemented by QGraphicsScale, - QGraphicsRotation and QGraphicsRotation3D. Subclasses have to implement the applyTo method. + It applies this transformation to \a transform. - \sa QGraphicsItem::transform(), QGraphicsScale, QGraphicsRotation, QGraphicsRotation3D + \sa QGraphicsItem::transform() */ /*! - Constructs a new QGraphicsTransform with \a parent. -*/ -QGraphicsTransform::QGraphicsTransform(QObject *parent) : - QObject(*new QGraphicsTransformPrivate, parent) -{ -} + Notifies that this transform operation has changed its parameters in such a + way that applyTo() will return a different result than before. -/*! - Destructs the graphics transform. + When implementing you own custom graphics transform, you must call this + function every time you change a parameter, to let QGraphicsItem know that + its transformation needs to be updated. + + \sa applyTo() */ -QGraphicsTransform::~QGraphicsTransform() +void QGraphicsTransform::update() { Q_D(QGraphicsTransform); - d->setItem(0); + if (d->item) + d->updateItem(d->item); } /*! - \internal -*/ -QGraphicsTransform::QGraphicsTransform(QGraphicsTransformPrivate &p, QObject *parent) - : QObject(p, parent) -{ -} - -/*! \fn void QGraphicsTransform::applyTo(QTransform *transform) const + \class QGraphicsScale + \brief The QGraphicsScale class provides a scale transformation. + \since 4.6 - This pure virtual method has to be reimplemented in derived classes. + QGraphicsScene provides certain parameters to help control how the scale + should be applied. - It applies this transformation to \a transform. -*/ + The origin is the point that the item is scaled from (i.e., it stays fixed + relative to the parent as the rest of the item grows). By default the + origin is QPointF(0, 0). + The two parameters xScale and yScale describe the scale factors to apply in + horizontal and vertical direction. They can take on any value, including 0 + (to collapse the item to a point) or negativate value. A negative xScale + value will mirror the item horizontally. A negative yScale value will flip + the item vertically. -/*! - \class QGraphicsScale - \brief The QGraphicsScale class provides a way to scale a graphics item in 2 dimensions. - \since 4.6 - - QGraphicsScale contains an \a origin around which the scaling happens, and two - scale factors, xScale and yScale, the x and one for the y axis. + \sa QGraphicsTransform, QGraphicsItem::setScale(), QTransform::scale() */ class QGraphicsScalePrivate : public QGraphicsTransformPrivate { public: QGraphicsScalePrivate() - : xScale(1), yScale(1) {} + : xScale(1), yScale(1) {} QPointF origin; qreal xScale; qreal yScale; }; /*! - Constructs a new graphics scale object with \a parent. + Constructs an empty QGraphicsScale object with the given \a parent. */ QGraphicsScale::QGraphicsScale(QObject *parent) : QGraphicsTransform(*new QGraphicsScalePrivate, parent) @@ -172,24 +220,26 @@ QGraphicsScale::QGraphicsScale(QObject *parent) } /*! - Destroys the object + Destroys the graphics scale. */ QGraphicsScale::~QGraphicsScale() { } /*! - \property QGraphicsScale::origin - The origin of the scale. All scaling will be done relative to this point. + \property QGraphicsScale::origin + \brief The QGraphicsScene class provides the origin of the scale. + + All scaling will be done relative to this point (i.e., this point + will stay fixed, relative to the parent, when the item is scaled). - The \a origin is in other words the fixed point for the transformation. + \sa xScale, yScale */ QPointF QGraphicsScale::origin() const { Q_D(const QGraphicsScale); return d->origin; } - void QGraphicsScale::setOrigin(const QPointF &point) { Q_D(QGraphicsScale); @@ -199,26 +249,21 @@ void QGraphicsScale::setOrigin(const QPointF &point) } /*! - \fn QGraphicsScale::originChanged() - - This signal is emitted whenever the origin of the object - changes. -*/ - -/*! - \property QGraphicsScale::xScale + \property QGraphicsScale::xScale + \brief the horizontal scale factor. - The scale factor in x direction. The x direction is - in the graphics items logical coordinates. + The scale factor can be any real number; the default value is 1.0. If you + set the factor to 0.0, the item will be collapsed to a single point. If you + provide a negative value, the item will be mirrored horizontally around its + origin. - \sa yScale + \sa yScale, origin */ qreal QGraphicsScale::xScale() const { Q_D(const QGraphicsScale); return d->xScale; } - void QGraphicsScale::setXScale(qreal scale) { Q_D(QGraphicsScale); @@ -230,19 +275,21 @@ void QGraphicsScale::setXScale(qreal scale) } /*! - \property QGraphicsScale::yScale + \property QGraphicsScale::yScale + \brief the vertical scale factor. - The scale factor in y direction. The y direction is - in the graphics items logical coordinates. + The scale factor can be any real number; the default value is 1.0. If you + set the factor to 0.0, the item will be collapsed to a single point. If you + provide a negative value, the item will be flipped vertically around its + origin. - \sa xScale + \sa xScale, origin */ qreal QGraphicsScale::yScale() const { Q_D(const QGraphicsScale); return d->yScale; } - void QGraphicsScale::setYScale(qreal scale) { Q_D(QGraphicsScale); @@ -254,14 +301,7 @@ void QGraphicsScale::setYScale(qreal scale) } /*! - \fn QGraphicsScale::scaleChanged() - - This signal is emitted whenever the xScale or yScale of the object - changes. -*/ - -/*! - \reimp + \reimp */ void QGraphicsScale::applyTo(QTransform *transform) const { @@ -272,12 +312,41 @@ void QGraphicsScale::applyTo(QTransform *transform) const } /*! - \class QGraphicsRotation - \brief The QGraphicsRotation class provides a way to rotate a graphics item in 2 dimensions. - \since 4.6 + \fn QGraphicsScale::originChanged() + + QGraphicsScale emits this signal when its origin changes. + + \sa QGraphicsScale::origin +*/ + +/*! + \fn QGraphicsScale::scaleChanged() + + This signal is emitted whenever the xScale or yScale of the object + changes. - QGraphicsRotation contains an \a origin around which the rotation happens, and one - angle in degrees describing the amount of the rotation. + \sa QGraphicsScale::xScale, QGraphicsScale::yScale +*/ + +/*! + \class QGraphicsRotation + \brief The QGraphicsRotation class provides a rotation transformation. + \since 4.6 + + QGraphicsRotation provides certain parameters to help control how the + rotation should be applied. + + The origin is the point that the item is rotated around (i.e., it stays + fixed relative to the parent as the rest of the item is rotated). By + default the origin is QPointF(0, 0). + + The angle property provides the number of degrees to rotate the item + clockwise around the origin. This value also be negative, indicating a + counter-clockwise rotation. For animation purposes it may also be useful to + provide rotation angles exceeding (-360, 360) degrees, for instance to + animate how an item rotates several times. + + \sa QGraphicsTransform, QGraphicsItem::setRotation(), QTransform::rotate() */ class QGraphicsRotationPrivate : public QGraphicsTransformPrivate @@ -291,7 +360,7 @@ public: }; /*! - Constructs a new graphics rotation with \a parent. + Constructs a new QGraphicsRotation with the given \a parent. */ QGraphicsRotation::QGraphicsRotation(QObject *parent) : QGraphicsTransform(*new QGraphicsRotationPrivate, parent) @@ -299,7 +368,7 @@ QGraphicsRotation::QGraphicsRotation(QObject *parent) } /*! - \internal + \internal */ QGraphicsRotation::QGraphicsRotation(QGraphicsRotationPrivate &p, QObject *parent) : QGraphicsTransform(p, parent) @@ -307,24 +376,26 @@ QGraphicsRotation::QGraphicsRotation(QGraphicsRotationPrivate &p, QObject *paren } /*! - Destructs the object + Destroys the graphics rotation. */ QGraphicsRotation::~QGraphicsRotation() { } /*! - \property QGraphicsRotation::origin - The origin around which this object will rotate the graphics item. + \property QGraphicsRotation::origin + \brief the origin of the rotation. - The \a origin is in other words the fixed point for the transformation. + All rotations will be done relative to this point (i.e., this point + will stay fixed, relative to the parent, when the item is rotated). + + \sa angle */ QPointF QGraphicsRotation::origin() const { Q_D(const QGraphicsRotation); return d->origin; } - void QGraphicsRotation::setOrigin(const QPointF &point) { Q_D(QGraphicsRotation); @@ -334,22 +405,22 @@ void QGraphicsRotation::setOrigin(const QPointF &point) } /*! - \fn QGraphicsRotation::originChanged() + \property QGraphicsRotation::angle + \brief the angle for clockwise rotation, in degrees. - This signal is emitted whenever the origin of the object - changes. -*/ + The angle can be any real number; the default value is 0.0. A value of 180 + will rotate 180 degrees, clockwise. If you provide a negative number, the + item will be rotated counter-clockwise. Normally the rotation angle will be + in the range (-360, 360), but you can also provide numbers outside of this + range (e.g., a angle of 370 degrees gives the same result as 10 degrees). -/*! - \property QGraphicsRotation::angle - The angle, in degrees, of the rotation. + \sa origin */ qreal QGraphicsRotation::angle() const { Q_D(const QGraphicsRotation); return d->angle; } - void QGraphicsRotation::setAngle(qreal angle) { Q_D(QGraphicsRotation); @@ -361,33 +432,50 @@ void QGraphicsRotation::setAngle(qreal angle) } /*! - \fn void QGraphicsRotation::angleChanged() - - This signal is emitted whenever the angle of the object - changes. -*/ - -/*! - \reimp + \reimp */ void QGraphicsRotation::applyTo(QTransform *t) const { Q_D(const QGraphicsRotation); - if(d->angle) { + if (d->angle) { t->translate(d->origin.x(), d->origin.y()); t->rotate(d->angle); t->translate(-d->origin.x(), -d->origin.y()); } } +/*! + \fn QGraphicsRotation::originChanged() + + This signal is emitted whenever the origin has changed. + + \sa QGraphicsRotation::origin +*/ /*! - \class QGraphicsRotation3D - \brief The QGraphicsRotation3D class provides a way to rotate a graphics item in 3 dimensions. - \since 4.6 + \fn void QGraphicsRotation::angleChanged() - In addition to the origin and angle of a simple QGraphicsRotation, QGraphicsRotation3D contains - also an axis that describes around which axis in space the rotation is supposed to happen. + This signal is emitted whenever the angle has changed. + + \sa QGraphicsRotation::angle +*/ + +/*! + \class QGraphicsRotation3D + \brief The QGraphicsRotation3D class provides rotation in 3 dimensions. + \since 4.6 + + QGraphicsRotation3D extends QGraphicsRotation with the ability to rotate + around a given axis. + + You can provide the desired axis by assigning a QVector3D to the axis + property. The angle property, which is provided by QGraphicsRotation, now + describes the number of degrees to rotate around this axis. + + By default the axis is (0, 0, 1), giving QGraphicsRotation3D the same + default behavior as QGraphicsRotation (i.e., rotation around the Z axis). + + \sa QGraphicsTransform, QGraphicsItem::setRotation(), QTransform::rotate() */ class QGraphicsRotation3DPrivate : public QGraphicsRotationPrivate @@ -399,7 +487,7 @@ public: }; /*! - Constructs a new 3D rotation with \a parent. + Constructs a new QGraphicsRotation3D with the given \a parent. */ QGraphicsRotation3D::QGraphicsRotation3D(QObject *parent) : QGraphicsRotation(*new QGraphicsRotation3DPrivate, parent) @@ -407,7 +495,7 @@ QGraphicsRotation3D::QGraphicsRotation3D(QObject *parent) } /*! - Destroys the object + Destroys the 3D graphics rotation. */ QGraphicsRotation3D::~QGraphicsRotation3D() { @@ -415,15 +503,22 @@ QGraphicsRotation3D::~QGraphicsRotation3D() /*! \property QGraphicsRotation3D::axis + \brief a rotation axis, specified by a vector in 3D space. + + This can be any axis in 3D space. By default the axis is (0, 0, 1), + which is aligned with the Z axis and provides the same behavior + for the rotation angle as QGraphicsRotation. If you provide another + axis, QGraphicsRotation3D will provide a transformation that rotates + around this axis. For example, if you would like to rotate an item + around its X axis, you could pass (1, 0, 0) as the axis. - A rotation axis is specified by a vector in 3D space. + \sa QTransform, QGraphicsRotation::angle */ QVector3D QGraphicsRotation3D::axis() { Q_D(QGraphicsRotation3D); return d->axis; } - void QGraphicsRotation3D::setAxis(const QVector3D &axis) { Q_D(QGraphicsRotation3D); @@ -431,17 +526,10 @@ void QGraphicsRotation3D::setAxis(const QVector3D &axis) update(); } -/*! - \fn void QGraphicsRotation3D::axisChanged() - - This signal is emitted whenever the axis of the object - changes. -*/ - -const qreal inv_dist_to_plane = 1. / 1024.; +static const qreal inv_dist_to_plane = 1. / 1024.; /*! - \reimp + \reimp */ void QGraphicsRotation3D::applyTo(QTransform *t) const { @@ -474,6 +562,12 @@ void QGraphicsRotation3D::applyTo(QTransform *t) const t->translate(-d->origin.x(), -d->origin.y()); } +/*! + \fn void QGraphicsRotation3D::axisChanged() + + This signal is emitted whenever the axis of the object changes. +*/ + #include "moc_qgraphicstransform.cpp" QT_END_NAMESPACE diff --git a/src/gui/graphicsview/qgraphicstransform.h b/src/gui/graphicsview/qgraphicstransform.h index adf9438157..d7c07d0233 100644 --- a/src/gui/graphicsview/qgraphicstransform.h +++ b/src/gui/graphicsview/qgraphicstransform.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -65,11 +65,12 @@ public: QTransform transform() const; virtual void applyTo(QTransform *transform) const = 0; -protected slots: +protected Q_SLOTS: void update(); protected: QGraphicsTransform(QGraphicsTransformPrivate &p, QObject *parent); + private: friend class QGraphicsItem; friend class QGraphicsItemPrivate; diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri index c15e8b603f..5e9bf8eff3 100644 --- a/src/gui/image/image.pri +++ b/src/gui/image/image.pri @@ -25,7 +25,9 @@ HEADERS += \ image/qpixmapcache_p.h \ image/qpixmapdata_p.h \ image/qpixmapdatafactory_p.h \ - image/qpixmapfilter_p.h + image/qpixmapfilter_p.h \ + image/qimagepixmapcleanuphooks_p.h \ + SOURCES += \ image/qbitmap.cpp \ @@ -47,6 +49,8 @@ SOURCES += \ image/qmovie.cpp \ image/qpixmap_raster.cpp \ image/qnativeimage.cpp \ + image/qimagepixmapcleanuphooks.cpp \ + win32 { SOURCES += image/qpixmap_win.cpp diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 9a1380e2ee..476fe52b24 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -49,6 +49,7 @@ #include "qimagewriter.h" #include "qstringlist.h" #include "qvariant.h" +#include "qimagepixmapcleanuphooks_p.h" #include <ctype.h> #include <stdlib.h> #include <limits.h> @@ -106,14 +107,6 @@ static inline bool checkPixelSize(const QImage::Format format) } -// ### Qt 5: remove -typedef void (*_qt_image_cleanup_hook)(int); -Q_GUI_EXPORT _qt_image_cleanup_hook qt_image_cleanup_hook = 0; - -// ### Qt 5: rename -typedef void (*_qt_image_cleanup_hook_64)(qint64); -Q_GUI_EXPORT _qt_image_cleanup_hook_64 qt_image_cleanup_hook_64 = 0; - static QImage rotated90(const QImage &src); static QImage rotated180(const QImage &src); static QImage rotated270(const QImage &src); @@ -263,8 +256,8 @@ QImageData * QImageData::create(const QSize &size, QImage::Format format, int nu QImageData::~QImageData() { - if (is_cached && qt_image_cleanup_hook_64) - qt_image_cleanup_hook_64((((qint64) ser_no) << 32) | ((qint64) detach_no)); + if (is_cached) + QImagePixmapCleanupHooks::executeImageHooks((((qint64) ser_no) << 32) | ((qint64) detach_no)); delete paintEngine; if (data && own_data) free(data); @@ -1348,8 +1341,8 @@ QImage::operator QVariant() const void QImage::detach() { if (d) { - if (d->is_cached && qt_image_cleanup_hook_64 && d->ref == 1) - qt_image_cleanup_hook_64(cacheKey()); + if (d->is_cached && d->ref == 1) + QImagePixmapCleanupHooks::executeImageHooks(cacheKey()); if (d->ref != 1 || d->ro_data) *this = copy(); diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp new file mode 100644 index 0000000000..7d1c5fbe26 --- /dev/null +++ b/src/gui/image/qimagepixmapcleanuphooks.cpp @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qimagepixmapcleanuphooks_p.h" +#include "qpixmapdata_p.h" + + +// Legacy, single instance hooks: ### Qt 5: remove +typedef void (*_qt_pixmap_cleanup_hook)(int); +typedef void (*_qt_pixmap_cleanup_hook_64)(qint64); +typedef void (*_qt_image_cleanup_hook)(int); +Q_GUI_EXPORT _qt_pixmap_cleanup_hook qt_pixmap_cleanup_hook = 0; +Q_GUI_EXPORT _qt_pixmap_cleanup_hook_64 qt_pixmap_cleanup_hook_64 = 0; +Q_GUI_EXPORT _qt_image_cleanup_hook qt_image_cleanup_hook = 0; +Q_GUI_EXPORT _qt_image_cleanup_hook_64 qt_image_cleanup_hook_64 = 0; + + +QImagePixmapCleanupHooks* qt_image_and_pixmap_cleanup_hooks = 0; + + +QImagePixmapCleanupHooks::QImagePixmapCleanupHooks() +{ + qt_image_and_pixmap_cleanup_hooks = this; +} + +QImagePixmapCleanupHooks *QImagePixmapCleanupHooks::instance() +{ + if (!qt_image_and_pixmap_cleanup_hooks) + qt_image_and_pixmap_cleanup_hooks = new QImagePixmapCleanupHooks; + return qt_image_and_pixmap_cleanup_hooks; +} + +void QImagePixmapCleanupHooks::addPixmapHook(_qt_pixmap_cleanup_hook_pm hook) +{ + pixmapHooks.append(hook); +} + +void QImagePixmapCleanupHooks::addImageHook(_qt_image_cleanup_hook_64 hook) +{ + imageHooks.append(hook); +} + +void QImagePixmapCleanupHooks::removePixmapHook(_qt_pixmap_cleanup_hook_pm hook) +{ + pixmapHooks.removeAll(hook); +} + +void QImagePixmapCleanupHooks::removeImageHook(_qt_image_cleanup_hook_64 hook) +{ + imageHooks.removeAll(hook); +} + + +void QImagePixmapCleanupHooks::executePixmapHooks(QPixmap* pm) +{ + for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks->pixmapHooks.count(); ++i) + qt_image_and_pixmap_cleanup_hooks->pixmapHooks[i](pm); + + if (qt_pixmap_cleanup_hook_64) + qt_pixmap_cleanup_hook_64(pm->cacheKey()); +} + + +void QImagePixmapCleanupHooks::executeImageHooks(qint64 key) +{ + for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks->imageHooks.count(); ++i) + qt_image_and_pixmap_cleanup_hooks->imageHooks[i](key); + + if (qt_image_cleanup_hook_64) + qt_image_cleanup_hook_64(key); +} + diff --git a/src/gui/image/qimagepixmapcleanuphooks_p.h b/src/gui/image/qimagepixmapcleanuphooks_p.h new file mode 100644 index 0000000000..e765e697f5 --- /dev/null +++ b/src/gui/image/qimagepixmapcleanuphooks_p.h @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QIMAGEPIXMAP_CLEANUPHOOKS_P_H +#define QIMAGEPIXMAP_CLEANUPHOOKS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtGui/qpixmap.h> + +QT_BEGIN_NAMESPACE + +typedef void (*_qt_image_cleanup_hook_64)(qint64); +typedef void (*_qt_pixmap_cleanup_hook_pm)(QPixmap*); + +class QImagePixmapCleanupHooks; +extern QImagePixmapCleanupHooks* qt_image_and_pixmap_cleanup_hooks; + +class Q_GUI_EXPORT QImagePixmapCleanupHooks +{ +public: + QImagePixmapCleanupHooks(); + + static QImagePixmapCleanupHooks *instance(); + + void addPixmapHook(_qt_pixmap_cleanup_hook_pm); + void addImageHook(_qt_image_cleanup_hook_64); + + void removePixmapHook(_qt_pixmap_cleanup_hook_pm); + void removeImageHook(_qt_image_cleanup_hook_64); + + static void executePixmapHooks(QPixmap*); + static void executeImageHooks(qint64 key); + +private: + QList<_qt_image_cleanup_hook_64> imageHooks; + QList<_qt_pixmap_cleanup_hook_pm> pixmapHooks; +}; + +QT_END_NAMESPACE + +#endif // QIMAGEPIXMAP_CLEANUPHOOKS_P_H diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index b7d5efd757..44181d1040 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -43,6 +43,7 @@ #include "qpixmap.h" #include "qpixmapdata_p.h" +#include "qimagepixmapcleanuphooks_p.h" #include "qbitmap.h" #include "qcolormap.h" @@ -85,14 +86,6 @@ QT_BEGIN_NAMESPACE // ### Qt 5: remove -typedef void (*_qt_pixmap_cleanup_hook)(int); -Q_GUI_EXPORT _qt_pixmap_cleanup_hook qt_pixmap_cleanup_hook = 0; - -// ### Qt 5: rename -typedef void (*_qt_pixmap_cleanup_hook_64)(qint64); -Q_GUI_EXPORT _qt_pixmap_cleanup_hook_64 qt_pixmap_cleanup_hook_64 = 0; - -// ### Qt 5: remove Q_GUI_EXPORT qint64 qt_pixmap_id(const QPixmap &pixmap) { return pixmap.cacheKey(); @@ -660,7 +653,7 @@ void QPixmap::resize_helper(const QSize &s) QX11PixmapData *x11Data = data->classId() == QPixmapData::X11Class ? static_cast<QX11PixmapData*>(data) : 0; if (x11Data) { pm.x11SetScreen(x11Data->xinfo.screen()); - uninit = x11Data->uninit; + uninit = x11Data->flags & QX11PixmapData::Uninitialized; } #elif defined(Q_WS_MAC) QMacPixmapData *macData = data->classId() == QPixmapData::MacClass ? static_cast<QMacPixmapData*>(data) : 0; @@ -1361,8 +1354,8 @@ bool QPixmap::isDetached() const void QPixmap::deref() { if (data && !data->ref.deref()) { // Destroy image if last ref - if (data->is_cached && qt_pixmap_cleanup_hook_64) - qt_pixmap_cleanup_hook_64(cacheKey()); + if (data->is_cached) + QImagePixmapCleanupHooks::executePixmapHooks(this); delete data; data = 0; } @@ -1904,9 +1897,6 @@ int QPixmap::defaultDepth() } -typedef void (*_qt_pixmap_cleanup_hook_64)(qint64); -extern _qt_pixmap_cleanup_hook_64 qt_pixmap_cleanup_hook_64; - /*! Detaches the pixmap from shared pixmap data. @@ -1932,8 +1922,8 @@ void QPixmap::detach() rasterData->image.detach(); } - if (data->is_cached && qt_pixmap_cleanup_hook_64 && data->ref == 1) - qt_pixmap_cleanup_hook_64(cacheKey()); + if (data->is_cached && data->ref == 1) + QImagePixmapCleanupHooks::executePixmapHooks(this); #if defined(Q_WS_MAC) QMacPixmapData *macData = id == QPixmapData::MacClass ? static_cast<QMacPixmapData*>(data) : 0; @@ -1953,7 +1943,7 @@ void QPixmap::detach() #if defined(Q_WS_X11) if (data->classId() == QPixmapData::X11Class) { QX11PixmapData *d = static_cast<QX11PixmapData*>(data); - d->uninit = false; + d->flags &= ~QX11PixmapData::Uninitialized; // reset the cache data if (d->hd2) { diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index 45392f160a..556889832f 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -1178,6 +1178,7 @@ QPixmap QPixmap::fromMacCGImageRef(CGImageRef image) const size_t w = CGImageGetWidth(image), h = CGImageGetHeight(image); QPixmap ret(w, h); + ret.fill(Qt::transparent); CGRect rect = CGRectMake(0, 0, w, h); CGContextRef ctx = qt_mac_cg_context(&ret); qt_mac_drawCGImage(ctx, &rect, image); diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 86cf515da7..be3d0705b2 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -313,7 +313,7 @@ int Q_GUI_EXPORT qt_x11_preferred_pixmap_depth = 0; QX11PixmapData::QX11PixmapData(PixelType type) : QPixmapData(type, X11Class), hd(0), - uninit(true), read_only(false), x11_mask(0), picture(0), mask_picture(0), hd2(0), + flags(Uninitialized), x11_mask(0), picture(0), mask_picture(0), hd2(0), gl_surface(0), share_mode(QPixmap::ImplicitlyShared), pengine(0) { } @@ -1217,7 +1217,7 @@ void QX11PixmapData::release() XFreePixmap(xinfo.display(), hd2); hd2 = 0; } - if (!read_only) + if (!(flags & Readonly)) XFreePixmap(xinfo.display(), hd); hd = 0; } @@ -1876,7 +1876,7 @@ QPixmap QX11PixmapData::transformed(const QTransform &transform, } else { // color pixmap QPixmap pm; QX11PixmapData *x11Data = static_cast<QX11PixmapData*>(pm.data); - x11Data->uninit = false; + x11Data->flags &= ~QX11PixmapData::Uninitialized; x11Data->xinfo = xinfo; x11Data->d = d; x11Data->w = w; @@ -2018,7 +2018,7 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) QPixmap pm(data); - data->uninit = false; + data->flags &= ~QX11PixmapData::Uninitialized; pm.x11SetScreen(scr); GC gc = XCreateGC(dpy, pm.handle(), 0, 0); @@ -2060,7 +2060,7 @@ QPaintEngine* QX11PixmapData::paintEngine() const { QX11PixmapData *that = const_cast<QX11PixmapData*>(this); - if (read_only && share_mode == QPixmap::ImplicitlyShared) { + if ((flags & Readonly) && share_mode == QPixmap::ImplicitlyShared) { // if someone wants to draw onto us, copy the shared contents // and turn it into a fully fledged QPixmap ::Pixmap hd_copy = XCreatePixmap(X11->display, RootWindow(X11->display, xinfo.screen()), @@ -2082,7 +2082,7 @@ QPaintEngine* QX11PixmapData::paintEngine() const XFreeGC(X11->display, gc); } that->hd = hd_copy; - that->read_only = false; + that->flags &= ~QX11PixmapData::Readonly; } if (!that->pengine) @@ -2133,7 +2133,7 @@ void QX11PixmapData::copy(const QPixmapData *data, const QRect &rect) setSerialNumber(++qt_pixmap_serial); - uninit = false; + flags &= ~Uninitialized; xinfo = x11Data->xinfo; d = x11Data->d; w = rect.width(); @@ -2201,7 +2201,7 @@ void QX11PixmapData::convertToARGB32(bool preserveContents) return; // Q_ASSERT(count == 1); - if (read_only && share_mode == QPixmap::ExplicitlyShared) + if ((flags & Readonly) && share_mode == QPixmap::ExplicitlyShared) return; Pixmap pm = XCreatePixmap(X11->display, RootWindow(X11->display, xinfo.screen()), @@ -2211,10 +2211,10 @@ void QX11PixmapData::convertToARGB32(bool preserveContents) if (picture) { if (preserveContents) XRenderComposite(X11->display, PictOpSrc, picture, 0, p, 0, 0, 0, 0, 0, 0, w, h); - if (!read_only) + if (!(flags & Readonly)) XRenderFreePicture(X11->display, picture); } - if (hd && !read_only) + if (hd && !(flags & Readonly)) XFreePixmap(X11->display, hd); if (x11_mask) { XFreePixmap(X11->display, x11_mask); @@ -2252,9 +2252,8 @@ QPixmap QPixmap::fromX11Pixmap(Qt::HANDLE pixmap, QPixmap::ShareMode mode) QX11PixmapData *data = new QX11PixmapData(depth == 1 ? QPixmapData::BitmapType : QPixmapData::PixmapType); data->setSerialNumber(++qt_pixmap_serial); - data->read_only = true; + data->flags = QX11PixmapData::Readonly; data->share_mode = mode; - data->uninit = false; data->w = width; data->h = height; data->is_null = (width <= 0 || height <= 0); diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h index 3de9a0f933..835fea42db 100644 --- a/src/gui/image/qpixmap_x11_p.h +++ b/src/gui/image/qpixmap_x11_p.h @@ -99,6 +99,7 @@ private: friend class QX11PaintEngine; friend class QX11WindowSurface; friend class QRasterWindowSurface; + friend class QGLContextPrivate; // Needs to access xinfo, gl_surface & flags void release(); @@ -108,14 +109,21 @@ private: Qt::HANDLE hd; - uint uninit : 1; - uint read_only : 1; + enum Flag { + NoFlags = 0x0, + Uninitialized = 0x1, + Readonly = 0x2, + InvertedWhenBoundToTexture = 0x4, + GlSurfaceCreatedWithAlpha = 0x8 + }; + uint flags; QX11Info xinfo; Qt::HANDLE x11_mask; Qt::HANDLE picture; Qt::HANDLE mask_picture; Qt::HANDLE hd2; // sorted in the default display depth + Qt::HANDLE gl_surface; #ifndef QT_NO_XRENDER void convertToARGB32(bool preserveContents = true); #endif diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h index 29dafaf088..32b419ef4c 100644 --- a/src/gui/image/qpixmapdata_p.h +++ b/src/gui/image/qpixmapdata_p.h @@ -116,6 +116,7 @@ private: friend class QPixmap; friend class QGLContextPrivate; friend class QX11PixmapData; + friend class QGLTextureCache; //Needs to check the reference count QAtomicInt ref; int detach_no; diff --git a/src/gui/inputmethod/qinputcontextplugin.h b/src/gui/inputmethod/qinputcontextplugin.h index 8ab8f84162..c0c127b92d 100644 --- a/src/gui/inputmethod/qinputcontextplugin.h +++ b/src/gui/inputmethod/qinputcontextplugin.h @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) -#if !defined(QT_NO_IM) && !defined(QT_NO_LIBRARY) +#if !defined(QT_NO_IM) class QInputContext; class QInputContextPluginPrivate; diff --git a/src/gui/inputmethod/qximinputcontext_x11.cpp b/src/gui/inputmethod/qximinputcontext_x11.cpp index edc6904b3a..65b5a24bb6 100644 --- a/src/gui/inputmethod/qximinputcontext_x11.cpp +++ b/src/gui/inputmethod/qximinputcontext_x11.cpp @@ -53,6 +53,7 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" #include "qdebug.h" #include "qximinputcontext_p.h" diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp index 6bcc153b85..2c3d1272aa 100644 --- a/src/gui/itemviews/qitemdelegate.cpp +++ b/src/gui/itemviews/qitemdelegate.cpp @@ -1226,9 +1226,12 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event) } else if (event->type() == QEvent::FocusOut || (event->type() == QEvent::Hide && editor->isWindow())) { //the Hide event will take care of he editors that are in fact complete dialogs if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { - if (editor->isAncestorOf(QApplication::focusWidget())) - return false; // don't worry about focus changes internally in the editor - + QWidget *w = QApplication::focusWidget(); + while (w) { // don't worry about focus changes internally in the editor + if (w == editor) + return false; + w = w->parentWidget(); + } #ifndef QT_NO_DRAGANDDROP // The window may lose focus during an drag operation. // i.e when dragging involves the taskbar on Windows. diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp index df519eee5b..5730c86362 100644 --- a/src/gui/itemviews/qstyleditemdelegate.cpp +++ b/src/gui/itemviews/qstyleditemdelegate.cpp @@ -674,9 +674,12 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event) } else if (event->type() == QEvent::FocusOut || (event->type() == QEvent::Hide && editor->isWindow())) { //the Hide event will take care of he editors that are in fact complete dialogs if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { - if (editor->isAncestorOf(QApplication::focusWidget())) - return false; // don't worry about focus changes internally in the editor - + QWidget *w = QApplication::focusWidget(); + while (w) { // don't worry about focus changes internally in the editor + if (w == editor) + return false; + w = w->parentWidget(); + } #ifndef QT_NO_DRAGANDDROP // The window may lose focus during an drag operation. // i.e when dragging involves the taskbar on Windows. diff --git a/src/gui/kernel/qaction.h b/src/gui/kernel/qaction.h index 3fd80b968f..68f88c5512 100644 --- a/src/gui/kernel/qaction.h +++ b/src/gui/kernel/qaction.h @@ -69,25 +69,25 @@ class Q_GUI_EXPORT QAction : public QObject Q_ENUMS(MenuRole) Q_ENUMS(SoftKeyRole) Q_ENUMS(Priority) - Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable) + Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY changed) Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled) - Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled) - Q_PROPERTY(QIcon icon READ icon WRITE setIcon) - Q_PROPERTY(QString text READ text WRITE setText) - Q_PROPERTY(QString iconText READ iconText WRITE setIconText) - Q_PROPERTY(QString toolTip READ toolTip WRITE setToolTip) - Q_PROPERTY(QString statusTip READ statusTip WRITE setStatusTip) - Q_PROPERTY(QString whatsThis READ whatsThis WRITE setWhatsThis) - Q_PROPERTY(QFont font READ font WRITE setFont) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY changed) + Q_PROPERTY(QIcon icon READ icon WRITE setIcon NOTIFY changed) + Q_PROPERTY(QString text READ text WRITE setText NOTIFY changed) + Q_PROPERTY(QString iconText READ iconText WRITE setIconText NOTIFY changed) + Q_PROPERTY(QString toolTip READ toolTip WRITE setToolTip NOTIFY changed) + Q_PROPERTY(QString statusTip READ statusTip WRITE setStatusTip NOTIFY changed) + Q_PROPERTY(QString whatsThis READ whatsThis WRITE setWhatsThis NOTIFY changed) + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY changed) #ifndef QT_NO_SHORTCUT - Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut) - Q_PROPERTY(Qt::ShortcutContext shortcutContext READ shortcutContext WRITE setShortcutContext) - Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat) + Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut NOTIFY changed) + Q_PROPERTY(Qt::ShortcutContext shortcutContext READ shortcutContext WRITE setShortcutContext NOTIFY changed) + Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY changed) #endif - Q_PROPERTY(bool visible READ isVisible WRITE setVisible) - Q_PROPERTY(MenuRole menuRole READ menuRole WRITE setMenuRole) - Q_PROPERTY(SoftKeyRole softKeyRole READ softKeyRole WRITE setSoftKeyRole) - Q_PROPERTY(bool iconVisibleInMenu READ isIconVisibleInMenu WRITE setIconVisibleInMenu) + Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY changed) + Q_PROPERTY(MenuRole menuRole READ menuRole WRITE setMenuRole NOTIFY changed) + Q_PROPERTY(SoftKeyRole softKeyRole READ softKeyRole WRITE setSoftKeyRole NOTIFY changed) + Q_PROPERTY(bool iconVisibleInMenu READ isIconVisibleInMenu WRITE setIconVisibleInMenu NOTIFY changed) Q_PROPERTY(Priority priority READ priority WRITE setPriority) public: diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 700af43703..7acba93415 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" #include "qabstracteventdispatcher.h" #include "qaccessible.h" #include "qapplication.h" @@ -183,11 +184,11 @@ QApplicationPrivate::~QApplicationPrivate() QApplication contains the main event loop, where all events from the window system and other sources are processed and dispatched. It also handles the - application's initialization and finalization, and provides session - management. In addition, it handles most system-wide and application-wide - settings. + application's initialization, finalization, and provides session + management. In addition, QApplication handles most of the system-wide and + application-wide settings. - For any GUI application using Qt, there is precisely one QApplication + For any GUI application using Qt, there is precisely \bold one QApplication object, no matter whether the application has 0, 1, 2 or more windows at any given time. For non-GUI Qt applications, use QCoreApplication instead, as it does not depend on the \l QtGui library. @@ -243,9 +244,9 @@ QApplicationPrivate::~QApplicationPrivate() saveState() for details. \endlist - The QApplication object does so much initialization. Hence, it \e{must} be + Since the QApplication object does so much initialization, it \e{must} be created before any other objects related to the user interface are created. - Since QApplication also deals with common command line arguments, it is + QApplication also deals with common command line arguments. Hence, it is usually a good idea to create it \e before any interpretation or modification of \c argv is done in the application itself. @@ -687,9 +688,9 @@ QApplication::QApplication(int &argc, char **argv, int _internal) On X11, the window system is initialized if \a GUIenabled is true. If \a GUIenabled is false, the application does not connect to the X server. - On Windows and Macintosh, currently the window system is always - initialized, regardless of the value of GUIenabled. This may change in - future versions of Qt. + On Windows and Mac OS, currently the window system is always initialized, + regardless of the value of GUIenabled. This may change in future versions + of Qt. The following example shows how to create an application that uses a graphical interface when available. @@ -1210,21 +1211,22 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis \since 4.4 \brief defines a threshold for auto maximizing widgets - The auto maximize threshold is only available as part of Qt for Windows CE. + \bold{The auto maximize threshold is only available as part of Qt for + Windows CE.} This property defines a threshold for the size of a window as a percentage of the screen size. If the minimum size hint of a window exceeds the - threshold, calling show() will then cause the window to be maximized + threshold, calling show() will cause the window to be maximized automatically. - Setting the threshold to be 100 or greater means that it will cause it to - always be maximized. Setting it to be 50 means that the widget is maximized - if the vertical minimum size hint is at least 50% of the vertical screen - size. + Setting the threshold to 100 or greater means that the widget will always + be maximized. Alternatively, setting the threshold to 50 means that the + widget will be maximized only if the vertical minimum size hint is at least + 50% of the vertical screen size. - If -1 is specified then this will disable the feature. + Setting the threshold to -1 disables the feature. - On Windows CE the default is -1 (i.e. it is disabled). + On Windows CE the default is -1 (i.e., it is disabled). On Windows Mobile the default is 40. */ @@ -1233,13 +1235,13 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis \since 4.5 \brief toggles automatic SIP (software input panel) visibility - Set this property to true to automatically display the SIP when entering + Set this property to \c true to automatically display the SIP when entering widgets that accept keyboard input. This property only affects widgets with the WA_InputMethodEnabled attribute set, and is typically used to launch a virtual keyboard on devices which have very few or no keys. - The property only has an effect on platforms which use software input - panels, such as Windows CE and Symbian. + \bold{ The property only has an effect on platforms which use software input + panels, such as Windows CE and Symbian.} The default is platform dependent. */ @@ -1537,7 +1539,7 @@ int QApplication::colorSpec() strategy. Use this option if your application uses buttons, menus, texts and pixmaps with few colors. With this option, the application uses system global colors. This works fine for most - applications under X11, but on Windows machines it may cause + applications under X11, but on the Windows platform, it may cause dithering of non-standard colors. \o QApplication::CustomColor. Use this option if your application needs a small number of custom colors. On X11, this option is the @@ -3580,12 +3582,12 @@ void QApplication::changeOverrideCursor(const QCursor &cursor) We recommend that you connect clean-up code to the \l{QCoreApplication::}{aboutToQuit()} signal, instead of putting it in your - application's \c{main()} function because on some platforms the - QApplication::exec() call may not return. For example, on Windows when the - user logs off, the system terminates the process after Qt closes all - top-level windows. Hence, there is no guarantee that the application will - have time to exit its event loop and execute code at the end of the - \c{main()} function after the QApplication::exec() call. + application's \c{main()} function. This is because, on some platforms the + QApplication::exec() call may not return. For example, on the Windows + platform, when the user logs off, the system terminates the process after Qt + closes all top-level windows. Hence, there is \e{no guarantee} that the + application will have time to exit its event loop and execute code at the + end of the \c{main()} function, after the QApplication::exec() call. \sa quitOnLastWindowClosed, quit(), exit(), processEvents(), QCoreApplication::exec() @@ -4851,7 +4853,7 @@ bool QApplication::keypadNavigationEnabled() On Mac OS X, this works more at the application level and will cause the application icon to bounce in the dock. - On Windows this causes the window's taskbar entry to flash for a time. If + On Windows, this causes the window's taskbar entry to flash for a time. If \a msec is zero, the flashing will stop and the taskbar entry will turn a different color (currently orange). @@ -4868,24 +4870,22 @@ bool QApplication::keypadNavigationEnabled() caret display. Usually the text cursor is displayed for half the cursor flash time, then hidden for the same amount of time, but this may vary. - The default value on X11 is 1000 milliseconds. On Windows, the control - panel value is used. Widgets should not cache this value since it may be - changed at any time by the user changing the global desktop settings. + The default value on X11 is 1000 milliseconds. On Windows, the + \gui{Control Panel} value is used and setting this property sets the cursor + flash time for all applications. - \note On Microsoft Windows, setting this property sets the cursor flash - time for all applications. + We recommend that widgets do not cache this value as it may change at any + time if the user changes the global desktop settings. */ /*! \property QApplication::doubleClickInterval - \brief the time limit in milliseconds that distinguishes a double click from two - consecutive mouse clicks - - The default value on X11 is 400 milliseconds. On Windows and Mac OS X, the - operating system's value is used. + \brief the time limit in milliseconds that distinguishes a double click + from two consecutive mouse clicks - On Microsoft Windows and Symbian, calling this function sets the - double click interval for all applications. + The default value on X11 is 400 milliseconds. On Windows and Mac OS, the + operating system's value is used. However, on Windows and Symbian OS, + calling this function sets the double click interval for all applications. */ /*! @@ -4894,7 +4894,7 @@ bool QApplication::keypadNavigationEnabled() from two consecutive key presses \since 4.2 - The default value on X11 is 400 milliseconds. On Windows and Mac OS X, the + The default value on X11 is 400 milliseconds. On Windows and Mac OS, the operating system's value is used. */ @@ -4959,7 +4959,7 @@ bool QApplication::keypadNavigationEnabled() You need not have a main widget; connecting lastWindowClosed() to quit() is an alternative. - For X11, this function also resizes and moves the main widget according + On X11, this function also resizes and moves the main widget according to the \e -geometry command-line option, so you should set the default geometry (using \l QWidget::setGeometry()) before calling setMainWidget(). @@ -4988,9 +4988,10 @@ bool QApplication::keypadNavigationEnabled() Application cursors are stored on an internal stack. setOverrideCursor() pushes the cursor onto the stack, and restoreOverrideCursor() pops the active cursor off the stack. changeOverrideCursor() changes the curently - active application override cursor. Every setOverrideCursor() must - eventually be followed by a corresponding restoreOverrideCursor(), - otherwise the stack will never be emptied. + active application override cursor. + + Every setOverrideCursor() must eventually be followed by a corresponding + restoreOverrideCursor(), otherwise the stack will never be emptied. Example: \snippet doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp 0 @@ -5177,19 +5178,19 @@ bool QApplicationPrivate::shouldSetFocus(QWidget *w, Qt::FocusPolicy policy) */ /*! \fn QDecoration* QApplication::qwsSetDecoration(const QString &decoration) - \overload + \overload - Requests a QDecoration object for \a decoration from the QDecorationFactory. + Requests a QDecoration object for \a decoration from the + QDecorationFactory. - The string must be one of the QDecorationFactory::keys(). Keys are - case insensitive. + The string must be one of the QDecorationFactory::keys(). Keys are case + insensitive. - A later call to the QApplication constructor will override the - requested style when a "-style" option is passed in as a commandline - parameter. + A later call to the QApplication constructor will override the requested + style when a "-style" option is passed in as a commandline parameter. - Returns 0 if an unknown \a decoration is passed, otherwise the QStyle object - returned is set as the application's GUI style. + Returns 0 if an unknown \a decoration is passed, otherwise the QStyle object + returned is set as the application's GUI style. */ /*! diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index beccfb0d39..ac132aa321 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -1480,6 +1480,7 @@ QWidget *QApplicationPrivate::tryModalHelper_sys(QWidget *top) return top; } +#ifndef QT_MAC_USE_COCOA static bool qt_try_modal(QWidget *widget, EventRef event) { QWidget * top = 0; @@ -1513,6 +1514,7 @@ static bool qt_try_modal(QWidget *widget, EventRef event) #endif return !block_event; } +#endif OSStatus QApplicationPrivate::tabletProximityCallback(EventHandlerCallRef, EventRef carbonEvent, void *) @@ -2890,52 +2892,25 @@ bool QApplicationPrivate::canQuit() #endif } -void onApplicationWindowChangedActivation( QWidget*widget, bool activated ) +void onApplicationWindowChangedActivation(QWidget *widget, bool activated) { #if QT_MAC_USE_COCOA - QApplication *app = qApp; + if (!widget) + return; - if ( activated ) - { - if (QApplicationPrivate::app_style) - { + if (activated) { + if (QApplicationPrivate::app_style) { QEvent ev(QEvent::Style); qt_sendSpontaneousEvent(QApplicationPrivate::app_style, &ev); } - - if (widget && app_do_modal && !qt_try_modal(widget, NULL)) - return; - - if (widget && widget->window()->isVisible()) - { - QWidget *tlw = widget->window(); - - if (tlw->isWindow() && !(tlw->windowType() == Qt::Popup) - && !qt_mac_is_macdrawer(tlw) - && (!tlw->parentWidget() || tlw->isModal() || !(tlw->windowType() == Qt::Tool))) { - bool just_send_event = false; -#if 0 - WindowActivationScope scope; - if ( GetWindowActivationScope((OSWindowRef)wid, &scope) == noErr && - scope == kWindowActivationScopeIndependent) - { - if ( GetFrontWindowOfClass(kAllWindowClasses, true) != wid ) - just_send_event = true; - } -#endif - if (just_send_event) { - QEvent e(QEvent::WindowActivate); - qt_sendSpontaneousEvent(widget, &e); - } else { - app->setActiveWindow(tlw); - } - } - } + qApp->setActiveWindow(widget); } else { // deactivated - if (widget && QApplicationPrivate::active_window == widget) - app->setActiveWindow(0); + if (QApplicationPrivate::active_window == widget) + qApp->setActiveWindow(0); } + QMenuBar::macUpdateMenuBar(); + #else Q_UNUSED(widget); Q_UNUSED(activated); diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index 83b286177f..0f41025538 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -101,7 +101,11 @@ #include <locale.h> #include <errno.h> #include <fcntl.h> -#include <sys/time.h> +#ifdef Q_OS_VXWORKS +# include <sys/times.h> +#else +# include <sys/time.h> +#endif #include <sys/stat.h> #include <sys/types.h> @@ -196,7 +200,14 @@ QString qws_dataDir() static QString result; if (!result.isEmpty()) return result; - QByteArray dataDir = QString::fromLatin1("/tmp/qtembedded-%1").arg(qws_display_id).toLocal8Bit(); + QByteArray dataDir; +#ifdef QT_QWS_TEMP_DIR + dataDir = QT_QWS_TEMP_DIR; +#else + dataDir = "/tmp"; +#endif + dataDir += "/qtembedded-"; + dataDir += QByteArray::number(qws_display_id); if (QT_MKDIR(dataDir, 0700)) { if (errno != EEXIST) { qFatal("Cannot create Qt for Embedded Linux data directory: %s", dataDir.constData()); @@ -210,7 +221,7 @@ QString qws_dataDir() if (!S_ISDIR(buf.st_mode)) qFatal("%s is not a directory", dataDir.constData()); -#ifndef Q_OS_INTEGRITY +#if !defined(Q_OS_INTEGRITY) && !defined(Q_OS_VXWORKS) if (buf.st_uid != getuid()) qFatal("Qt for Embedded Linux data directory is not owned by user %d", getuid()); diff --git a/src/gui/kernel/qboxlayout.cpp b/src/gui/kernel/qboxlayout.cpp index 770f5bbd03..23d20ff9b1 100644 --- a/src/gui/kernel/qboxlayout.cpp +++ b/src/gui/kernel/qboxlayout.cpp @@ -527,7 +527,7 @@ void QBoxLayoutPrivate::calcHfw(int w) You will almost always want to use QVBoxLayout and QHBoxLayout rather than QBoxLayout because of their convenient constructors. - \sa QGridLayout, QStackedLayout, {Layout Classes} + \sa QGridLayout, QStackedLayout, {Layout Management} */ /*! @@ -1295,7 +1295,7 @@ QBoxLayout::Direction QBoxLayout::direction() const \image qhboxlayout-with-5-children.png Horizontal box layout with five child widgets - \sa QVBoxLayout, QGridLayout, QStackedLayout, {Layout Classes}, {Basic Layouts Example} + \sa QVBoxLayout, QGridLayout, QStackedLayout, {Layout Management}, {Basic Layouts Example} */ @@ -1413,7 +1413,7 @@ QHBoxLayout::~QHBoxLayout() \image qvboxlayout-with-5-children.png Horizontal box layout with five child widgets - \sa QHBoxLayout, QGridLayout, QStackedLayout, {Layout Classes}, {Basic Layouts Example} + \sa QHBoxLayout, QGridLayout, QStackedLayout, {Layout Management}, {Basic Layouts Example} */ /*! diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 57c911783c..1d352cb3aa 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -327,7 +327,7 @@ extern "C" { return NSDragOperationNone; } else { // save the mouse position, used by draggingExited handler. - DnDParams *dndParams = [QCocoaView currentMouseEvent]; + DnDParams *dndParams = [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]; dndParams->activeDragEnterPos = windowPoint; // send a drag move event immediately after a drag enter event (as per documentation). QDragMoveEvent qDMEvent(posDrag, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers); @@ -406,7 +406,7 @@ extern "C" { dragEnterSequence = -1; if (qwidget->testAttribute(Qt::WA_TransparentForMouseEvents)) { // try sending the leave event to the last view which accepted drag enter. - DnDParams *dndParams = [QCocoaView currentMouseEvent]; + DnDParams *dndParams = [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]; NSView *candidateView = [[[self window] contentView] hitTest:dndParams->activeDragEnterPos]; if (candidateView && candidateView != self) return [candidateView draggingExited:sender]; diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp index d665cc2b6c..e5ca196823 100644 --- a/src/gui/kernel/qcursor.cpp +++ b/src/gui/kernel/qcursor.cpp @@ -127,11 +127,11 @@ QT_BEGIN_NAMESPACE \o Qt::SizeAllCursor \o \c size_all \row \o \inlineimage cursor-busy.png \o Qt::BusyCursor \o \c left_ptr_watch - \o \inlineimage cursor-hsplit.png + \o \inlineimage cursor-vsplit.png \o Qt::SplitVCursor \o \c split_v \row \o \inlineimage cursor-forbidden.png \o Qt::ForbiddenCursor \o \c forbidden - \o \inlineimage cursor-vsplit.png + \o \inlineimage cursor-hsplit.png \o Qt::SplitHCursor \o \c split_h \row \o \inlineimage cursor-hand.png \o Qt::PointingHandCursor \o \c pointing_hand diff --git a/src/gui/kernel/qformlayout.cpp b/src/gui/kernel/qformlayout.cpp index 0b7656f2e2..de33f93e29 100644 --- a/src/gui/kernel/qformlayout.cpp +++ b/src/gui/kernel/qformlayout.cpp @@ -689,16 +689,12 @@ void QFormLayoutPrivate::setupVerticalLayoutData(int width) // are split. maxLabelWidth = 0; if (!wrapAllRows) { - int maxFieldMinWidth = 0; //the maximum minimum size of the field for (int i = 0; i < rr; ++i) { const QFormLayoutItem *label = m_matrix(i, 0); const QFormLayoutItem *field = m_matrix(i, 1); - if (label && field && label->sideBySide) + if (label && (label->sizeHint.width() + (field ? field->minSize.width() : 0) <= width)) maxLabelWidth = qMax(maxLabelWidth, label->sizeHint.width()); - if (field) - maxFieldMinWidth = qMax(maxFieldMinWidth, field->minSize.width() + field->sbsHSpace); } - maxLabelWidth = qMin(maxLabelWidth, width - maxFieldMinWidth); } else { maxLabelWidth = width; } diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp index d53b419d5d..1f98013c6f 100644 --- a/src/gui/kernel/qgesture.cpp +++ b/src/gui/kernel/qgesture.cpp @@ -153,7 +153,7 @@ QGesture::QGesture(QObject *parent) : QObject(*new QGesturePrivate, parent) { if (parent) - installEventFilter(parent); + parent->installEventFilter(this); } /*! \internal @@ -162,7 +162,7 @@ QGesture::QGesture(QGesturePrivate &dd, QObject *parent) : QObject(dd, parent) { if (parent) - installEventFilter(parent); + parent->installEventFilter(this); } /*! diff --git a/src/gui/kernel/qgridlayout.cpp b/src/gui/kernel/qgridlayout.cpp index 7ac874e9e1..558f570389 100644 --- a/src/gui/kernel/qgridlayout.cpp +++ b/src/gui/kernel/qgridlayout.cpp @@ -1046,7 +1046,7 @@ QRect QGridLayoutPrivate::cellRect(int row, int col) const the margin width for a top-level layout, or to the same as the parent layout. - \sa QBoxLayout, QStackedLayout, {Layout Classes}, {Basic Layouts Example} + \sa QBoxLayout, QStackedLayout, {Layout Management}, {Basic Layouts Example} */ diff --git a/src/gui/kernel/qlayout.cpp b/src/gui/kernel/qlayout.cpp index 921afce59e..f41de1130f 100644 --- a/src/gui/kernel/qlayout.cpp +++ b/src/gui/kernel/qlayout.cpp @@ -83,7 +83,7 @@ static int menuBarHeightForWidth(QWidget *menubar, int w) For users of QLayout subclasses or of QMainWindow there is seldom any need to use the basic functions provided by QLayout, such as - setSizeConstraint() or setMenuBar(). See \l{Layout Classes} + setSizeConstraint() or setMenuBar(). See \l{Layout Management} for more information. To make your own layout manager, implement the functions @@ -98,7 +98,7 @@ static int menuBarHeightForWidth(QWidget *menubar, int w) Geometry management stops when the layout manager is deleted. - \sa QLayoutItem, {Layout Classes}, {Basic Layouts Example}, + \sa QLayoutItem, {Layout Management}, {Basic Layouts Example}, {Border Layout Example}, {Flow Layout Example} */ diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 1c4177e129..3104083356 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1211,7 +1211,10 @@ void qt_mac_menu_collapseSeparators(void */*NSMenu **/ theMenu, bool collapse) if (collapse) { bool previousIsSeparator = true; // setting to true kills all the separators placed at the top. NSMenuItem *previousItem = nil; - for (NSMenuItem *item in [menu itemArray]) { + + NSArray *itemArray = [menu itemArray]; + for (unsigned int i = 0; i < [itemArray count]; ++i) { + NSMenuItem *item = reinterpret_cast<NSMenuItem *>([itemArray objectAtIndex:i]); if ([item isSeparatorItem]) { [item setHidden:previousIsSeparator]; } @@ -1226,7 +1229,9 @@ void qt_mac_menu_collapseSeparators(void */*NSMenu **/ theMenu, bool collapse) if (previousItem && previousIsSeparator) [previousItem setHidden:YES]; } else { - for (NSMenuItem *item in [menu itemArray]) { + NSArray *itemArray = [menu itemArray]; + for (unsigned int i = 0; i < [itemArray count]; ++i) { + NSMenuItem *item = reinterpret_cast<NSMenuItem *>([itemArray objectAtIndex:i]); if (QAction *action = reinterpret_cast<QAction *>([item tag])) [item setHidden:!action->isVisible()]; } diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h index 1c8394bc45..1ac51e01d7 100644 --- a/src/gui/kernel/qt_x11_p.h +++ b/src/gui/kernel/qt_x11_p.h @@ -74,11 +74,19 @@ #include <X11/Xutil.h> #include <X11/Xos.h> #ifdef index -# undef index +# undef index #endif #ifdef rindex -# undef rindex +# undef rindex #endif +#ifdef Q_OS_VXWORS +# ifdef open +# undef open +# endif +# ifdef getpid +# undef getpid +# endif +#endif // Q_OS_VXWORKS #include <X11/Xatom.h> //#define QT_NO_SHAPE diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index c2fdadf97b..d7c89a6f32 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -511,7 +511,7 @@ void QWidget::setAutoFillBackground(bool enabled) been outlined to indicate their full sizes. If you want to use a QWidget to hold child widgets you will usually want to - add a layout to the parent QWidget. See \l{Layout Classes} for more + add a layout to the parent QWidget. See \l{Layout Management} for more information. @@ -1438,6 +1438,12 @@ QWidget::~QWidget() // set all QPointers for this object to zero QObjectPrivate::clearGuards(this); + if(d->declarativeData) { + QDeclarativeData *dd = d->declarativeData; + d->declarativeData = 0; + dd->destroyed(this); + } + if (!d->children.isEmpty()) d->deleteChildren(); @@ -3567,11 +3573,16 @@ bool QWidgetPrivate::setMinimumSize_helper(int &minw, int &minh) minh = qMax(minh, 0); } createExtra(); - if (extra->minw == minw && extra->minh == minh) + int mw = minw, mh = minh; + if (mw == QWIDGETSIZE_MAX) + mw = 0; + if (mh == QWIDGETSIZE_MAX) + mh = 0; + if (extra->minw == mw && extra->minh == mh) return false; - extra->minw = minw; - extra->minh = minh; - extra->explicitMinSize = (minw ? Qt::Horizontal : 0) | (minh ? Qt::Vertical : 0); + extra->minw = mw; + extra->minh = mh; + extra->explicitMinSize = (mw ? Qt::Horizontal : 0) | (mh ? Qt::Vertical : 0); return true; } @@ -3631,7 +3642,8 @@ bool QWidgetPrivate::setMaximumSize_helper(int &maxw, int &maxh) return false; extra->maxw = maxw; extra->maxh = maxh; - extra->explicitMaxSize = (maxw != QWIDGETSIZE_MAX ? Qt::Horizontal : 0) | (maxh != QWIDGETSIZE_MAX ? Qt::Vertical : 0); + extra->explicitMaxSize = (maxw != QWIDGETSIZE_MAX ? Qt::Horizontal : 0) | + (maxh != QWIDGETSIZE_MAX ? Qt::Vertical : 0); return true; } @@ -3710,6 +3722,8 @@ void QWidget::setBaseSize(int basew, int baseh) This will override the default size constraints set by QLayout. + To remove constraints, set the size to QWIDGETSIZE_MAX. + Alternatively, if you want the widget to have a fixed size based on its contents, you can call QLayout::setSizeConstraint(QLayout::SetFixedSize); @@ -3751,7 +3765,8 @@ void QWidget::setFixedSize(int w, int h) else d->updateGeometry_helper(true); - resize(w, h); + if (w != QWIDGETSIZE_MAX || h != QWIDGETSIZE_MAX) + resize(w, h); } void QWidget::setMinimumWidth(int w) @@ -8993,7 +9008,7 @@ QRegion QWidget::mask() const The layout manager sets the geometry of the widget's children that have been added to the layout. - \sa setLayout(), sizePolicy(), {Layout Classes} + \sa setLayout(), sizePolicy(), {Layout Management} */ QLayout *QWidget::layout() const { @@ -9023,7 +9038,7 @@ QLayout *QWidget::layout() const The QWidget will take ownership of \a layout. - \sa layout(), {Layout Classes} + \sa layout(), {Layout Management} */ void QWidget::setLayout(QLayout *l) @@ -9989,6 +10004,10 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) data->window_modality = (w && w->testAttribute(Qt::WA_GroupLeader)) ? Qt::WindowModal : Qt::ApplicationModal; + // Some window managers does not allow us to enter modal after the + // window is showing. Therefore, to be consistent, we cannot call + // QApplicationPrivate::enterModal(this) here. The window must be + // hidden before changing modality. } if (testAttribute(Qt::WA_WState_Created)) { // don't call setModal_sys() before create_sys() diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 70eea3aefa..78df09da06 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3100,7 +3100,12 @@ void QWidgetPrivate::update_sys(const QRegion &rgn) return; dirtyOnWidget += rgn; #ifndef QT_MAC_USE_COCOA - HIViewSetNeedsDisplayInRegion(qt_mac_nativeview_for(q), QMacSmartQuickDrawRegion(rgn.toQDRgn()), true); + RgnHandle rgnHandle = rgn.toQDRgnForUpdate_sys(); + if (rgnHandle) + HIViewSetNeedsDisplayInRegion(qt_mac_nativeview_for(q), QMacSmartQuickDrawRegion(rgnHandle), true); + else { + HIViewSetNeedsDisplay(qt_mac_nativeview_for(q), true); // do a complete repaint on overflow. + } #else // Cocoa doesn't do regions, it seems more efficient to just update the bounding rect instead of a potential number of message passes for each rect. const QRect &boundingRect = rgn.boundingRect(); @@ -4584,6 +4589,7 @@ void QWidgetPrivate::setModal_sys() OSWindowRef windowRef = qt_mac_window_for(q); #ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; bool alreadySheet = [windowRef styleMask] & NSDocModalWindowMask; if (windowParent && q->windowModality() == Qt::WindowModal){ @@ -4660,31 +4666,40 @@ void QWidgetPrivate::setModal_sys() || (primaryWindow && primaryWindow->windowModality() == Qt::WindowModal)){ // Window should be window-modal (which implies a sheet). if (old_wclass != kSheetWindowClass){ - // We cannot convert a created window to a sheet. So we recreate the window: + // We cannot convert a created window to a sheet. + // So we recreate the window: recreateMacWindow(); return; } - } else if (!(q->data->window_flags & Qt::CustomizeWindowHint)) { - if (old_wclass == kDocumentWindowClass || old_wclass == kFloatingWindowClass || old_wclass == kUtilityWindowClass){ - // Only change the class to kMovableModalWindowClass if the no explicit jewels - // are set (kMovableModalWindowClass can't contain them), and the current window class - // can be converted to modal (according to carbon doc). Mind the order of - // HIWindowChangeClass and ChangeWindowAttributes. - WindowGroupRef group = GetWindowGroup(windowRef); - HIWindowChangeClass(windowRef, kMovableModalWindowClass); - quint32 tmpWattr = kWindowCloseBoxAttribute | kWindowHorizontalZoomAttribute; - ChangeWindowAttributes(windowRef, tmpWattr, kWindowNoAttributes); - ChangeWindowAttributes(windowRef, kWindowNoAttributes, tmpWattr); - // If the window belongs to a qt-created group, set that group once more: - if (data.window_flags & Qt::WindowStaysOnTopHint - || q->windowType() == Qt::Popup - || q->windowType() == Qt::ToolTip) - SetWindowGroup(windowRef, group); + } else { + // Window should be application-modal (which implies NOT using a sheet). + if (old_wclass == kSheetWindowClass){ + // We cannot convert a sheet to a window. + // So we recreate the window: + recreateMacWindow(); + return; + } else if (!(q->data->window_flags & Qt::CustomizeWindowHint)) { + if (old_wclass == kDocumentWindowClass || old_wclass == kFloatingWindowClass || old_wclass == kUtilityWindowClass){ + // Only change the class to kMovableModalWindowClass if the no explicit jewels + // are set (kMovableModalWindowClass can't contain them), and the current window class + // can be converted to modal (according to carbon doc). Mind the order of + // HIWindowChangeClass and ChangeWindowAttributes. + WindowGroupRef group = GetWindowGroup(windowRef); + HIWindowChangeClass(windowRef, kMovableModalWindowClass); + quint32 tmpWattr = kWindowCloseBoxAttribute | kWindowHorizontalZoomAttribute; + ChangeWindowAttributes(windowRef, tmpWattr, kWindowNoAttributes); + ChangeWindowAttributes(windowRef, kWindowNoAttributes, tmpWattr); + // If the window belongs to a qt-created group, set that group once more: + if (data.window_flags & Qt::WindowStaysOnTopHint + || q->windowType() == Qt::Popup + || q->windowType() == Qt::ToolTip) + SetWindowGroup(windowRef, group); + } + // Popups are usually handled "special" and are never modal. + Qt::WindowType winType = q->windowType(); + if (winType != Qt::Popup && winType != Qt::ToolTip) + SetWindowModality(windowRef, kWindowModalityAppModal, 0); } - // Popups are usually handled "special" and are never modal. - Qt::WindowType winType = q->windowType(); - if (winType != Qt::Popup && winType != Qt::ToolTip) - SetWindowModality(windowRef, kWindowModalityAppModal, 0); } } else if (windowRef) { if (old_wclass == kSheetWindowClass){ diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index 46fa3be0d5..b11b661d8e 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -467,6 +467,17 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO } } + if (topLevel) { + if (data.window_flags & Qt::CustomizeWindowHint + && data.window_flags & Qt::WindowTitleHint) { + HMENU systemMenu = GetSystemMenu((HWND)q->internalWinId(), FALSE); + if (data.window_flags & Qt::WindowCloseButtonHint) + EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_ENABLED); + else + EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_GRAYED); + } + } + q->setAttribute(Qt::WA_WState_Created); // accept move/resize events hd = 0; // no display context @@ -638,16 +649,6 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) || (!q->isWindow() && q->parentWidget() && q->parentWidget()->testAttribute(Qt::WA_DropSiteRegistered))) q->setAttribute(Qt::WA_DropSiteRegistered, true); - - if (data.window_flags & Qt::CustomizeWindowHint - && data.window_flags & Qt::WindowTitleHint) { - HMENU systemMenu = GetSystemMenu((HWND)q->internalWinId(), FALSE); - if (data.window_flags & Qt::WindowCloseButtonHint) - EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_ENABLED); - else - EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_GRAYED); - } - #ifdef Q_WS_WINCE // Show borderless toplevel windows in tasklist & NavBar if (!parent) { @@ -1431,10 +1432,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) qt_wince_maximize(q); } else { #endif - if (!isTranslucentWindow) - MoveWindow(q->internalWinId(), fs.x(), fs.y(), fs.width(), fs.height(), true); - else if (isMove && !isResize) - SetWindowPos(q->internalWinId(), 0, fs.x(), fs.y(), 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER); + MoveWindow(q->internalWinId(), fs.x(), fs.y(), fs.width(), fs.height(), true); } if (!q->isVisible()) InvalidateRect(q->internalWinId(), 0, FALSE); @@ -1524,6 +1522,11 @@ bool QWidgetPrivate::shouldShowMaximizeButton() { if (data.window_flags & Qt::MSWindowsFixedSizeDialogHint) return false; + // if the user explicitely asked for the maximize button, we try to add + // it even if the window has fixed size. + if (data.window_flags & Qt::CustomizeWindowHint && + data.window_flags & Qt::WindowMaximizeButtonHint) + return true; if (extra) { if ((extra->maxw && extra->maxw != QWIDGETSIZE_MAX && extra->maxw != QLAYOUTSIZE_MAX) || (extra->maxh && extra->maxh != QWIDGETSIZE_MAX && extra->maxh != QLAYOUTSIZE_MAX)) diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp index 659331fb6a..359434e026 100644 --- a/src/gui/kernel/qx11embed_x11.cpp +++ b/src/gui/kernel/qx11embed_x11.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" #include "qx11embed_x11.h" #include <qapplication.h> #include <qevent.h> diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index d153215cf3..4121be6753 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -101,8 +101,8 @@ win32 { painting/qcolormap_win.cpp \ painting/qpaintdevice_win.cpp \ painting/qprintengine_win.cpp \ - painting/qprinterinfo_win.cpp \ - painting/qregion_win.cpp + painting/qprinterinfo_win.cpp + !win32-borland:!wince*:LIBS += -lmsimg32 } @@ -127,10 +127,6 @@ embedded { painting/qwindowsurface_raster.cpp \ } -wince* { - SOURCES -= painting/qregion_win.cpp -} - unix:x11 { HEADERS += \ painting/qpaintengine_x11_p.h diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 405acb7319..40c9bf2ddf 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -39,6 +39,9 @@ ** ****************************************************************************/ + +#include "qplatformdefs.h" + #include "qbackingstore_p.h" #include <QtCore/qglobal.h> diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 831d389179..fc2eb60dc7 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -223,8 +223,8 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl, int h = ty2 - ty1; int w = tx2 - tx1; - const int dstx = int((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix); - const int dsty = int((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy); + const int dstx = qCeil((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix) - 1; + const int dsty = qCeil((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy) - 1; quint32 basex = quint32((sx < 0 ? srcRect.right() : srcRect.left()) * 65536) + dstx; quint32 srcy = quint32((sy < 0 ? srcRect.bottom() : srcRect.top()) * 65536) + dsty; @@ -723,8 +723,8 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl, int h = ty2 - ty1; int w = tx2 - tx1; - const int dstx = int((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix); - const int dsty = int((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy); + const int dstx = qCeil((tx1 + 0.5 - qMin(targetRect.left(), targetRect.right())) * ix) - 1; + const int dsty = qCeil((ty1 + 0.5 - qMin(targetRect.top(), targetRect.bottom())) * iy) - 1; quint32 basex = quint32((sx < 0 ? srcRect.right() : srcRect.left()) * 65536) + dstx; quint32 srcy = quint32((sy < 0 ? srcRect.bottom() : srcRect.top()) * 65536) + dsty; diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h index 5479305de0..fdb3a8a41e 100644 --- a/src/gui/painting/qbrush.h +++ b/src/gui/painting/qbrush.h @@ -52,6 +52,15 @@ #include <QtGui/qimage.h> #include <QtGui/qpixmap.h> +#if defined(Q_OS_VXWORKS) +# if defined(m_data) +# undef m_data +# endif +# if defined(m_type) +# undef m_type +# endif +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index a70923d516..d77ed57026 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -4954,30 +4954,60 @@ Q_STATIC_TEMPLATE_FUNCTION void blendTiled(int count, const QSpan *spans, void * if (sy < 0) sy += image_height; - while (length) { - int l = qMin(image_width - sx, length); - if (buffer_size < l) - l = buffer_size; - - DST *dest = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; - const SRC *src = (SRC*)data->texture.scanLine(sy) + sx; - if (modeSource && coverage == 255) { + if (modeSource && coverage == 255) { + // Copy the first texture block + length = image_width; + while (length) { + int l = qMin(image_width - sx, length); + if (buffer_size < l) + l = buffer_size; + DST *dest = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; + const SRC *src = (SRC*)data->texture.scanLine(sy) + sx; qt_memconvert<DST, SRC>(dest, src, l); - } else if (sizeof(DST) == 3 && sizeof(SRC) == 3 && l >= 4 && - (quintptr(dest) & 3) == (quintptr(src) & 3)) - { - blendUntransformed_dest24(dest, src, coverage, l); - } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && - (quintptr(dest) & 3) == (quintptr(src) & 3)) - { - blendUntransformed_dest16(dest, src, coverage, l); - } else { - blendUntransformed_unaligned(dest, src, coverage, l); + length -= l; + sx = 0; } - x += l; - length -= l; - sx = 0; + // Now use the rasterBuffer as the source of the texture, + // We can now progressively copy larger blocks + // - Less cpu time in code figuring out what to copy + // We are dealing with one block of data + // - More likely to fit in the cache + // - can use memcpy + int copy_image_width = image_width; + length = spans->len - image_width; + DST *src = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; + DST *dest = src + copy_image_width; + while (copy_image_width < length) { + qt_memconvert(dest, src, copy_image_width); + dest += copy_image_width; + length -= copy_image_width; + copy_image_width *= 2; + } + qt_memconvert(dest, src, length); + } else { + while (length) { + int l = qMin(image_width - sx, length); + if (buffer_size < l) + l = buffer_size; + DST *dest = ((DST*)data->rasterBuffer->scanLine(spans->y)) + x; + const SRC *src = (SRC*)data->texture.scanLine(sy) + sx; + if (sizeof(DST) == 3 && sizeof(SRC) == 3 && l >= 4 && + (quintptr(dest) & 3) == (quintptr(src) & 3)) + { + blendUntransformed_dest24(dest, src, coverage, l); + } else if (sizeof(DST) == 2 && sizeof(SRC) == 2 && l >= 2 && + (quintptr(dest) & 3) == (quintptr(src) & 3)) + { + blendUntransformed_dest16(dest, src, coverage, l); + } else { + blendUntransformed_unaligned(dest, src, coverage, l); + } + + x += l; + length -= l; + sx = 0; + } } ++spans; } diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index 888fd9adb0..6ab7055a68 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -134,7 +134,9 @@ #define ErrRaster_MemoryOverflow -4 - +#if defined(VXWORKS) +# include <vxWorksCommon.h> /* needed for setjmp.h */ +#endif #include <string.h> /* for qt_ft_memcpy() */ #include <setjmp.h> #include <limits.h> diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index 401fad92f5..70125b9ea3 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -198,32 +198,8 @@ void QOutlineMapper::endOutline() m_m22 * e.y() + m_m12 * e.x() + m_dy); } } else { - // ## TODO: this case needs to be plain code polygonal paths - QPainterPath path; - if (m_element_types.isEmpty()) { - if (!m_elements.isEmpty()) - path.moveTo(m_elements.at(0)); - for (int i=1; i<m_elements.size(); ++i) - path.lineTo(m_elements.at(i)); - } else { - for (int i=0; i<m_elements.size(); ++i) { - switch (m_element_types.at(i)) { - case QPainterPath::MoveToElement: - path.moveTo(m_elements.at(i)); - break; - case QPainterPath::LineToElement: - path.lineTo(m_elements.at(i)); - break; - case QPainterPath::CurveToElement: - path.cubicTo(m_elements.at(i), m_elements.at(i+1), m_elements.at(i+2)); - i += 2; - break; - default: - Q_ASSERT(false); - break; - } - } - } + const QVectorPath vp((qreal *)m_elements.data(), m_elements.size(), m_element_types.data()); + QPainterPath path = vp.convertToPainterPath(); path = QTransform(m_m11, m_m12, m_m13, m_m21, m_m22, m_m23, m_dx, m_dy, m_m33).map(path); uint old_txop = m_txop; m_txop = QTransform::TxNone; diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 3d8e349246..d9af3f61d5 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1675,34 +1675,6 @@ void QRasterPaintEngine::drawRects(const QRectF *rects, int rectCount) QPaintEngineEx::drawRects(rects, rectCount); } -void QRasterPaintEnginePrivate::strokeProjective(const QPainterPath &path) -{ - Q_Q(QRasterPaintEngine); - QRasterPaintEngineState *s = q->state(); - - const QPen &pen = s->lastPen; - QPainterPathStroker pathStroker; - pathStroker.setWidth(pen.width() == 0 ? qreal(1) : pen.width()); - pathStroker.setCapStyle(pen.capStyle()); - pathStroker.setJoinStyle(pen.joinStyle()); - pathStroker.setMiterLimit(pen.miterLimit()); - pathStroker.setDashOffset(pen.dashOffset()); - - if (qpen_style(pen) == Qt::CustomDashLine) - pathStroker.setDashPattern(pen.dashPattern()); - else - pathStroker.setDashPattern(qpen_style(pen)); - - outlineMapper->setMatrix(QTransform()); - const QPainterPath stroke = pen.isCosmetic() - ? pathStroker.createStroke(s->matrix.map(path)) - : s->matrix.map(pathStroker.createStroke(path)); - - rasterize(outlineMapper->convertPath(stroke), s->penData.blend, &s->penData, rasterBuffer); - outlinemapper_xform_dirty = true; -} - - /*! \internal @@ -1767,6 +1739,8 @@ void QRasterPaintEngine::stroke(const QVectorPath &path, const QPen &pen) const QLineF *lines = reinterpret_cast<const QLineF *>(path.points()); for (int i = 0; i < lineCount; ++i) { + if (path.shape() == QVectorPath::LinesHint) + dashOffset = s->lastPen.dashOffset(); if (lines[i].p1() == lines[i].p2()) { if (s->lastPen.capStyle() != Qt::FlatCap) { QPointF p = lines[i].p1(); @@ -1972,67 +1946,6 @@ void QRasterPaintEngine::fillRect(const QRectF &r, const QColor &color) fillRect(r, &d->solid_color_filler); } -/*! - \reimp -*/ -void QRasterPaintEngine::drawPath(const QPainterPath &path) -{ -#ifdef QT_DEBUG_DRAW - QRectF bounds = path.boundingRect(); - qDebug(" - QRasterPaintEngine::drawPath(), [%.2f, %.2f, %.2f, %.2f]", - bounds.x(), bounds.y(), bounds.width(), bounds.height()); -#endif - - if (path.isEmpty()) - return; - - // Filling.., - Q_D(QRasterPaintEngine); - QRasterPaintEngineState *s = state(); - - ensureBrush(); - if (s->brushData.blend) { - ensureOutlineMapper(); - fillPath(path, &s->brushData); - } - - // Stroking... - ensurePen(); - if (!s->penData.blend) - return; - { - if (s->matrix.type() >= QTransform::TxProject) { - d->strokeProjective(path); - } else { - Q_ASSERT(s->stroker); - d->outlineMapper->beginOutline(Qt::WindingFill); - qreal txscale = 1; - if (s->pen.isCosmetic() || (qt_scaleForTransform(s->matrix, &txscale) && txscale != 1)) { - const qreal strokeWidth = d->basicStroker.strokeWidth(); - const QRectF clipRect = d->dashStroker ? d->dashStroker->clipRect() : QRectF(); - if (d->dashStroker) - d->dashStroker->setClipRect(d->deviceRect); - d->basicStroker.setStrokeWidth(strokeWidth * txscale); - d->outlineMapper->setMatrix(QTransform()); - s->stroker->strokePath(path, d->outlineMapper, s->matrix); - d->outlinemapper_xform_dirty = true; - d->basicStroker.setStrokeWidth(strokeWidth); - if (d->dashStroker) - d->dashStroker->setClipRect(clipRect); - } else { - ensureOutlineMapper(); - s->stroker->strokePath(path, d->outlineMapper, QTransform()); - } - d->outlineMapper->endOutline(); - - ProcessSpans blend = d->getPenFunc(d->outlineMapper->controlPointRect, - &s->penData); - d->rasterize(d->outlineMapper->outline(), blend, &s->penData, d->rasterBuffer); - } - } - -} - static inline bool isAbove(const QPointF *a, const QPointF *b) { return a->y() < b->y(); @@ -3546,8 +3459,8 @@ void QRasterPaintEngine::drawLines(const QLine *lines, int lineCount) int m22 = int(s->matrix.m22()); int dx = qFloor(s->matrix.dx() + aliasedCoordinateDelta); int dy = qFloor(s->matrix.dy() + aliasedCoordinateDelta); - int dashOffset = int(s->lastPen.dashOffset()); for (int i=0; i<lineCount; ++i) { + int dashOffset = int(s->lastPen.dashOffset()); if (s->flags.int_xform) { const QLine &l = lines[i]; int x1 = l.x1() * m11 + dx; @@ -3646,8 +3559,8 @@ void QRasterPaintEngine::drawLines(const QLineF *lines, int lineCount) ? LineDrawNormal : LineDrawIncludeLastPixel; - int dashOffset = int(s->lastPen.dashOffset()); for (int i=0; i<lineCount; ++i) { + int dashOffset = int(s->lastPen.dashOffset()); QLineF line = (lines[i] * s->matrix).translated(aliasedCoordinateDelta, aliasedCoordinateDelta); const QRectF brect(QPointF(line.x1(), line.y1()), QPointF(line.x2(), line.y2())); diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index 283c442990..3dab49139a 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -165,7 +165,6 @@ public: void updateMatrix(const QTransform &matrix); - void drawPath(const QPainterPath &path); void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode); void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode); void fillPath(const QPainterPath &path, QSpanData *fillData); @@ -327,7 +326,6 @@ public: inline const QClipData *clip() const; - void strokeProjective(const QPainterPath &path); void initializeRasterizer(QSpanData *data); void recalculateFastImages(); diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index a71fe52ff1..81dce4ffd4 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -42,6 +42,7 @@ #include "qpaintengineex_p.h" #include "qpainter_p.h" #include "qstroker_p.h" +#include "qbezier_p.h" #include <private/qpainterpath_p.h> #include <qvarlengtharray.h> @@ -91,6 +92,40 @@ QRectF QVectorPath::controlPointRect() const return QRectF(QPointF(m_cp_rect.x1, m_cp_rect.y1), QPointF(m_cp_rect.x2, m_cp_rect.y2)); } +QPainterPath QVectorPath::convertToPainterPath() const +{ + QPainterPath path; + + if (m_count == 0) + return path; + + const QPointF *points = (const QPointF *) m_points; + + if (m_elements) { + for (int i=0; i<m_count; ++i) { + switch (m_elements[i]) { + case QPainterPath::MoveToElement: + path.moveTo(points[i]); + break; + case QPainterPath::LineToElement: + path.lineTo(points[i]); + break; + case QPainterPath::CurveToElement: + path.cubicTo(points[i], points[i+1], points[i+2]); + break; + default: + break; + } + } + } else { + path.moveTo(points[0]); + for (int i=1; i<m_count; ++i) + path.lineTo(points[i]); + } + + return path; +} + const QVectorPath &qtVectorPathForPath(const QPainterPath &path) { Q_ASSERT(path.d_func()); @@ -384,7 +419,6 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) const qreal *lastPoint = points + (pointCount<<1); - d->activeStroker->begin(d->strokeHandler); d->strokeHandler->types.reset(); d->strokeHandler->pts.reset(); @@ -393,13 +427,13 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) if (d->stroker.capStyle() == Qt::RoundCap || d->stroker.joinStyle() == Qt::RoundJoin) 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.. + d->activeStroker->begin(d->strokeHandler); if (types) { while (points < lastPoint) { switch (*types) { @@ -448,69 +482,75 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) QVectorPath strokePath(d->strokeHandler->pts.data(), d->strokeHandler->types.size(), d->strokeHandler->types.data(), - QVectorPath::WindingFill); + flags); 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) { - switch (*types) { - case QPainterPath::MoveToElement: { - QPointF pt = (*(QPointF *) points) * state()->matrix; - d->activeStroker->moveTo(pt.x(), pt.y()); - points += 2; - ++types; - break; + if (state()->matrix.type() >= QTransform::TxProject) { + QPainterPath painterPath = state()->matrix.map(path.convertToPainterPath()); + d->activeStroker->strokePath(painterPath, d->strokeHandler, QTransform()); + } else { + d->activeStroker->begin(d->strokeHandler); + if (types) { + while (points < lastPoint) { + switch (*types) { + case QPainterPath::MoveToElement: { + QPointF pt = (*(QPointF *) points) * state()->matrix; + d->activeStroker->moveTo(pt.x(), pt.y()); + points += 2; + ++types; + break; + } + case QPainterPath::LineToElement: { + QPointF pt = (*(QPointF *) points) * state()->matrix; + d->activeStroker->lineTo(pt.x(), pt.y()); + points += 2; + ++types; + break; + } + case QPainterPath::CurveToElement: { + QPointF c1 = ((QPointF *) points)[0] * state()->matrix; + QPointF c2 = ((QPointF *) points)[1] * state()->matrix; + QPointF e = ((QPointF *) points)[2] * state()->matrix; + d->activeStroker->cubicTo(c1.x(), c1.y(), c2.x(), c2.y(), e.x(), e.y()); + points += 6; + types += 3; + flags |= QVectorPath::CurvedShapeHint; + break; + } + default: + break; + } } - case QPainterPath::LineToElement: { - QPointF pt = (*(QPointF *) points) * state()->matrix; + if (path.hasImplicitClose()) { + QPointF pt = * ((QPointF *) path.points()) * state()->matrix; d->activeStroker->lineTo(pt.x(), pt.y()); - points += 2; - ++types; - break; } - case QPainterPath::CurveToElement: { - QPointF c1 = ((QPointF *) points)[0] * state()->matrix; - QPointF c2 = ((QPointF *) points)[1] * state()->matrix; - QPointF e = ((QPointF *) points)[2] * state()->matrix; - d->activeStroker->cubicTo(c1.x(), c1.y(), c2.x(), c2.y(), e.x(), e.y()); - points += 6; - types += 3; - flags |= QVectorPath::CurvedShapeHint; - break; - } - default: - break; - } - } - if (path.hasImplicitClose()) { - QPointF pt = * ((QPointF *) path.points()) * state()->matrix; - d->activeStroker->lineTo(pt.x(), pt.y()); - } - } else { - QPointF p = ((QPointF *)points)[0] * state()->matrix; - d->activeStroker->moveTo(p.x(), p.y()); - points += 2; - ++types; - while (points < lastPoint) { + } else { QPointF p = ((QPointF *)points)[0] * state()->matrix; - d->activeStroker->lineTo(p.x(), p.y()); + d->activeStroker->moveTo(p.x(), p.y()); points += 2; ++types; + while (points < lastPoint) { + QPointF p = ((QPointF *)points)[0] * state()->matrix; + d->activeStroker->lineTo(p.x(), p.y()); + points += 2; + ++types; + } + if (path.hasImplicitClose()) + d->activeStroker->lineTo(p.x(), p.y()); } - if (path.hasImplicitClose()) - d->activeStroker->lineTo(p.x(), p.y()); + d->activeStroker->end(); } - d->activeStroker->end(); d->stroker.setStrokeWidth(strokeWidth); QVectorPath strokePath(d->strokeHandler->pts.data(), d->strokeHandler->types.size(), d->strokeHandler->types.data(), - QVectorPath::WindingFill); + flags); QTransform xform = state()->matrix; state()->matrix = QTransform(); diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index b5301d1452..f9fd61e5b2 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -3280,6 +3280,8 @@ void QPainterPath::setDirty(bool dirty) { d_func()->dirtyBounds = dirty; d_func()->dirtyControlBounds = dirty; + delete d_func()->pathConverter; + d_func()->pathConverter = 0; } void QPainterPath::computeBoundingRect() const diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index 7289a6b760..47d24b3bb5 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -49,7 +49,7 @@ #include <qdebug.h> -#if defined(Q_OS_UNIX) || defined(Q_OS_WINCE) +#if defined(Q_OS_UNIX) || defined(Q_WS_WIN) #include "qimage.h" #include "qbitmap.h" #include <stdlib.h> @@ -545,7 +545,7 @@ QRegion& QRegion::operator|=(const QRegion &r) \sa intersected() */ -#if !defined (Q_OS_UNIX) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_UNIX) && !defined (Q_WS_WIN) QRegion& QRegion::operator+=(const QRect &r) { return operator+=(QRegion(r)); @@ -561,16 +561,14 @@ QRegion& QRegion::operator+=(const QRect &r) \sa intersected() */ -#if !defined(Q_WS_WIN) || defined(Q_OS_WINCE) QRegion& QRegion::operator&=(const QRegion &r) { return *this = *this & r; } -#endif /*! \overload \since 4.4 */ -#if defined (Q_OS_UNIX) || defined (Q_OS_WINCE) +#if defined (Q_OS_UNIX) || defined (Q_WS_WIN) QRegion& QRegion::operator&=(const QRect &r) { return *this = *this & r; @@ -591,10 +589,8 @@ QRegion& QRegion::operator&=(const QRect &r) \sa subtracted() */ -#if !defined(Q_WS_WIN) || defined(Q_OS_WINCE) QRegion& QRegion::operator-=(const QRegion &r) { return *this = *this - r; } -#endif /*! Applies the xored() function to this region and \a r and @@ -731,7 +727,7 @@ bool QRegion::intersects(const QRect &rect) const return false; } -#if !defined (Q_OS_UNIX) && !defined (Q_OS_WINCE) +#if !defined (Q_OS_UNIX) && !defined (Q_WS_WIN) /*! \overload \since 4.4 @@ -1086,7 +1082,7 @@ Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath(const QRegion ®ion) return result; } -#if defined(Q_OS_UNIX) || defined(Q_OS_WINCE) +#if defined(Q_OS_UNIX) || defined(Q_WS_WIN) //#define QT_REGION_DEBUG /* @@ -1627,9 +1623,9 @@ QT_END_INCLUDE_NAMESPACE QT_BEGIN_INCLUDE_NAMESPACE # include "qregion_mac.cpp" QT_END_INCLUDE_NAMESPACE -#elif defined(Q_OS_WINCE) +#elif defined(Q_WS_WIN) QT_BEGIN_INCLUDE_NAMESPACE -# include "qregion_wince.cpp" +# include "qregion_win.cpp" QT_END_INCLUDE_NAMESPACE #elif defined(Q_WS_QWS) static QRegionPrivate qrp; @@ -3846,7 +3842,7 @@ QRegion::QRegion(const QRect &r, RegionType t) #if defined(Q_WS_X11) d->rgn = 0; d->xrectangles = 0; -#elif defined(Q_OS_WINCE) +#elif defined(Q_WS_WIN) d->rgn = 0; #endif if (t == Rectangle) { @@ -3868,7 +3864,7 @@ QRegion::QRegion(const QPolygon &a, Qt::FillRule fillRule) #if defined(Q_WS_X11) d->rgn = 0; d->xrectangles = 0; -#elif defined(Q_OS_WINCE) +#elif defined(Q_WS_WIN) d->rgn = 0; #endif d->qt_rgn = PolygonRegion(a.constData(), a.size(), @@ -3898,7 +3894,7 @@ QRegion::QRegion(const QBitmap &bm) #if defined(Q_WS_X11) d->rgn = 0; d->xrectangles = 0; -#elif defined(Q_OS_WINCE) +#elif defined(Q_WS_WIN) d->rgn = 0; #endif d->qt_rgn = qt_bitmapToRegion(bm); @@ -3913,7 +3909,7 @@ void QRegion::cleanUp(QRegion::QRegionData *x) XDestroyRegion(x->rgn); if (x->xrectangles) free(x->xrectangles); -#elif defined(Q_OS_WINCE) +#elif defined(Q_WS_WIN) if (x->rgn) qt_win_dispose_rgn(x->rgn); #endif @@ -3948,7 +3944,7 @@ QRegion QRegion::copy() const #if defined(Q_WS_X11) x->rgn = 0; x->xrectangles = 0; -#elif defined(Q_OS_WINCE) +#elif defined(Q_WS_WIN) x->rgn = 0; #endif if (d->qt_rgn) diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h index 61a0623a71..8a56d54f2b 100644 --- a/src/gui/painting/qregion.h +++ b/src/gui/painting/qregion.h @@ -59,7 +59,7 @@ QT_MODULE(Gui) template <class T> class QVector; class QVariant; -#if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) struct QRegionPrivate; #endif @@ -148,6 +148,7 @@ public: #elif defined(Q_WS_MAC) #if defined Q_WS_MAC32 RgnHandle toQDRgn() const; + RgnHandle toQDRgnForUpdate_sys() const; static QRegion fromQDRgn(RgnHandle shape); #endif #ifdef QT_MAC_USE_COCOA @@ -199,7 +200,7 @@ private: #elif defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) mutable RgnHandle unused; // Here for binary compatability reasons. ### Qt 5 remove. #endif -#if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) +#if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) QRegionPrivate *qt_rgn; #endif }; diff --git a/src/gui/painting/qregion_mac.cpp b/src/gui/painting/qregion_mac.cpp index b57f23453c..9b0e99fd1e 100644 --- a/src/gui/painting/qregion_mac.cpp +++ b/src/gui/painting/qregion_mac.cpp @@ -155,6 +155,44 @@ RgnHandle QRegion::toQDRgn() const } return rgnHandle; } + +/*! + \internal + Create's a RegionHandle, it's the caller's responsibility to release. + Returns 0 if the QRegion overflows. +*/ +RgnHandle QRegion::toQDRgnForUpdate_sys() const +{ + RgnHandle rgnHandle = qt_mac_get_rgn(); + if(d->qt_rgn && d->qt_rgn->numRects) { + RgnHandle tmp_rgn = qt_mac_get_rgn(); + int n = d->qt_rgn->numRects; + const QRect *qt_r = (n == 1) ? &d->qt_rgn->extents : d->qt_rgn->rects.constData(); + while (n--) { + + // detect overflow. Tested for use with HIViewSetNeedsDisplayInRegion + // in QWidgetPrivate::update_sys(). + enum { HIViewSetNeedsDisplayInRegionOverflow = 10000 }; // empirically determined conservative value + qDebug() << qt_r->x() << qt_r->y() << qt_r->right() << qt_r->bottom(); + if (qt_r->right() > HIViewSetNeedsDisplayInRegionOverflow || qt_r->bottom() > HIViewSetNeedsDisplayInRegionOverflow) { + qt_mac_dispose_rgn(tmp_rgn); + qt_mac_dispose_rgn(rgnHandle); + return 0; + } + + SetRectRgn(tmp_rgn, + qMax(SHRT_MIN, qt_r->x()), + qMax(SHRT_MIN, qt_r->y()), + qMin(SHRT_MAX, qt_r->right() + 1), + qMin(SHRT_MAX, qt_r->bottom() + 1)); + UnionRgn(rgnHandle, tmp_rgn, rgnHandle); + ++qt_r; + } + qt_mac_dispose_rgn(tmp_rgn); + } + return rgnHandle; +} + #endif #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) diff --git a/src/gui/painting/qregion_win.cpp b/src/gui/painting/qregion_win.cpp index 249b1a642d..2d5e76b7c0 100644 --- a/src/gui/painting/qregion_win.cpp +++ b/src/gui/painting/qregion_win.cpp @@ -39,27 +39,25 @@ ** ****************************************************************************/ +#include "qatomic.h" #include "qbitmap.h" #include "qbuffer.h" #include "qimage.h" #include "qpolygon.h" #include "qregion.h" #include "qt_windows.h" +#include "qpainterpath.h" +#include "qguifunctions_wince.h" QT_BEGIN_NAMESPACE +QRegion::QRegionData QRegion::shared_empty = { Q_BASIC_ATOMIC_INITIALIZER(1), 0, 0 }; -/* - In Windows versions before Windows Vista CreateRectRgn - when called in a multi-threaded - environment - might return an invalid handle. This function works around this limitation - by verifying the handle with a quick GetRegionData() call and re-creates the region - if necessary. -*/ HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int right, int bottom) { const int tries = 10; for (int i = 0; i < tries; ++i) { - HRGN region = 0; + HRGN region; switch (type) { case QRegion::Rectangle: region = CreateRectRgn(left, top, right, bottom); @@ -80,497 +78,73 @@ HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int right, return 0; } -#ifndef Q_OS_WINCE -HRGN qt_tryCreatePolygonRegion(const QPolygon &a, Qt::FillRule fillRule) -{ - const int tries = 10; - for (int i = 0; i < tries; ++i) { - HRGN region = CreatePolygonRgn(reinterpret_cast<const POINT*>(a.data()), a.size(), - fillRule == Qt::OddEvenFill ? ALTERNATE : WINDING); - if (region) { - if (GetRegionData(region, 0, 0)) - return region; - else - DeleteObject(region); - } - } - return 0; -} -#endif - -QRegion::QRegionData QRegion::shared_empty = { Q_BASIC_ATOMIC_INITIALIZER(1), 0 }; - -QRegion::QRegion() - : d(&shared_empty) -{ - d->ref.ref(); -} - -#ifndef Q_OS_WINCE //implementation for WindowsCE in qregion_wce.cpp -QRegion::QRegion(const QRect &r, RegionType t) -{ - if (r.isEmpty()) { - d = &shared_empty; - d->ref.ref(); - } else { - d = new QRegionData; - d->ref = 1; - if (t == Rectangle) - d->rgn = qt_tryCreateRegion(t, r.left(), r.top(), r.x() + r.width(), r.y() + r.height()); - else if (t == Ellipse) { - // need to add 1 to width/height for the ellipse to have correct boundingrect. - d->rgn = qt_tryCreateRegion(t, r.x(), r.y(), r.x() + r.width() + 1, r.y() + r.height() + 1); - } - } -} -#endif - -#ifndef Q_OS_WINCE //implementation for WindowsCE in qregion_wce.cpp -QRegion::QRegion(const QPolygon &a, Qt::FillRule fillRule) -{ - if (a.size() < 3) { - d = &shared_empty; - d->ref.ref(); - } else { - d = new QRegionData; - d->ref = 1; - d->rgn = qt_tryCreatePolygonRegion(a, fillRule); - } -} -#endif - -QRegion::QRegion(const QRegion &r) -{ - d = r.d; - d->ref.ref(); -} - -HRGN qt_win_bitmapToRegion(const QBitmap& bitmap) -{ - HRGN region=0; - QImage image = bitmap.toImage(); - const int MAXRECT = 256; - struct RData { - RGNDATAHEADER header; - RECT rect[MAXRECT]; - }; - RData data; - -#define FlushSpans \ - { \ - data.header.dwSize = sizeof(RGNDATAHEADER); \ - data.header.iType = RDH_RECTANGLES; \ - data.header.nCount = n; \ - data.header.nRgnSize = 0; \ - data.header.rcBound.bottom = y; \ - HRGN r = ExtCreateRegion(0, \ - sizeof(RGNDATAHEADER)+n*sizeof(RECT),(RGNDATA*)&data); \ - if (region) { \ - CombineRgn(region, region, r, RGN_OR); \ - DeleteObject(r); \ - } else { \ - region = r; \ - } \ - data.header.rcBound.top = y; \ - } - -#define AddSpan \ - { \ - data.rect[n].left=prev1; \ - data.rect[n].top=y; \ - data.rect[n].right=x-1+1; \ - data.rect[n].bottom=y+1; \ - n++; \ - if (n == MAXRECT) { \ - FlushSpans \ - n=0; \ - } \ - } - - data.header.rcBound.top = 0; - data.header.rcBound.left = 0; - data.header.rcBound.right = image.width()-1; - int n = 0; - - int zero = 0x00; - - int x, y; - for (y = 0; y < image.height(); ++y) { - uchar *line = image.scanLine(y); - int w = image.width(); - uchar all=zero; - int prev1 = -1; - for (x = 0; x < w;) { - uchar byte = line[x/8]; - if (x > w - 8 || byte != all) { - for (int b = 8; b > 0 && x < w; --b) { - if (!(byte & 0x01) == !all) { - // More of the same - } else { - // A change. - if (all != zero) { - AddSpan; - all = zero; - } else { - prev1 = x; - all = ~zero; - } - } - byte >>= 1; - ++x; - } - } else { - x += 8; - } - } - if (all != zero) { - AddSpan; - } - } - if (n) { - FlushSpans; - } - - if (!region) { - // Surely there is some better way. - region = qt_tryCreateRegion(QRegion::Rectangle, 0,0,1,1); - CombineRgn(region, region, region, RGN_XOR); - } - return region; -} - -#ifndef Q_OS_WINCE //implementation for WindowsCE in qregion_wce.cpp -QRegion::QRegion(const QBitmap &bm) -{ - if (bm.isNull()) { - d = &shared_empty; - d->ref.ref(); - } else { - d = new QRegionData; - d->ref = 1; - d->rgn = qt_win_bitmapToRegion(bm); - } -} -#endif - -void QRegion::cleanUp(QRegion::QRegionData *x) -{ - if (x->rgn) - DeleteObject(x->rgn); - delete x; -} - -QRegion::~QRegion() -{ - if (!d->ref.deref()) - cleanUp(d); -} - -QRegion &QRegion::operator=(const QRegion &r) -{ - r.d->ref.ref(); - if (!d->ref.deref()) - cleanUp(d); - d = r.d; - return *this; -} - - -QRegion QRegion::copy() const -{ - QRegion r; - QRegionData *x = new QRegionData; - x->ref = 1; - if (d->rgn) { - x->rgn = qt_tryCreateRegion(QRegion::Rectangle, 0, 0, 2, 2); - CombineRgn(x->rgn, d->rgn, 0, RGN_COPY); - } else { - x->rgn = 0; - } - if (!r.d->ref.deref()) - cleanUp(r.d); - r.d = x; - return r; -} - -bool QRegion::isEmpty() const -{ - return (d == &shared_empty || boundingRect().isEmpty()); -} - - -bool QRegion::contains(const QPoint &p) const -{ - return d->rgn ? PtInRegion(d->rgn, p.x(), p.y()) : false; -} - -bool QRegion::contains(const QRect &r) const -{ - if (!d->rgn) - return false; - RECT rect; - SetRect(&rect, r.left(), r.top(), r.right(), r.bottom()); - return RectInRegion(d->rgn, &rect); -} - - -void QRegion::translate(int dx, int dy) -{ - if (!d->rgn || (dx == 0 && dy == 0)) - return; - detach(); - OffsetRgn(d->rgn, dx, dy); -} - - -#define RGN_NOP -1 - -// Duplicates of those in qregion.cpp -#define QRGN_OR 6 -#define QRGN_AND 7 -#define QRGN_SUB 8 -#define QRGN_XOR 9 - -/* - Performs the actual OR, AND, SUB and XOR operation between regions. - Sets the resulting region handle to 0 to indicate an empty region. -*/ - -QRegion QRegion::winCombine(const QRegion &r, int op) const +QRegion qt_region_from_HRGN(HRGN rgn) { - int both=RGN_NOP, - left=RGN_NOP, - right=RGN_NOP; - switch (op) { - case QRGN_OR: - both = RGN_OR; - left = right = RGN_COPY; - break; - case QRGN_AND: - both = RGN_AND; - break; - case QRGN_SUB: - both = RGN_DIFF; - left = RGN_COPY; - break; - case QRGN_XOR: - both = RGN_XOR; - left = right = RGN_COPY; - break; - default: - qWarning("QRegion: Internal error in winCombine"); - } - - int allCombineRgnResults = NULLREGION; - QRegion result; - result.detach(); - result.d->rgn = qt_tryCreateRegion(QRegion::Rectangle, 0, 0, 0, 0); - if (d->rgn && r.d->rgn) - allCombineRgnResults = CombineRgn(result.d->rgn, d->rgn, r.d->rgn, both); - else if (d->rgn && left != RGN_NOP) - allCombineRgnResults = CombineRgn(result.d->rgn, d->rgn, d->rgn, left); - else if (r.d->rgn && right != RGN_NOP) - allCombineRgnResults = CombineRgn(result.d->rgn, r.d->rgn, r.d->rgn, right); - - if (allCombineRgnResults == NULLREGION || allCombineRgnResults == ERROR) - result = QRegion(); - - //##### do not delete this. A null pointer is different from an empty region in SelectClipRgn in qpainter_win! (M) -// if (allCombineRgnResults == NULLREGION) { -// if (result.data->rgn) -// DeleteObject(result.data->rgn); -// result.data->rgn = 0; // empty region -// } - return result; -} - -QRegion QRegion::unite(const QRegion &r) const -{ - if (!d->rgn) - return r; - if (!r.d->rgn) - return *this; - return winCombine(r, QRGN_OR); -} - -QRegion QRegion::unite(const QRect &r) const -{ - return unite(QRegion(r)); -} - -QRegion QRegion::intersect(const QRegion &r) const -{ - if (!r.d->rgn || !d->rgn) - return QRegion(); - return winCombine(r, QRGN_AND); -} - -QRegion QRegion::subtract(const QRegion &r) const -{ - if (!r.d->rgn || !d->rgn) - return *this; - return winCombine(r, QRGN_SUB); -} - -QRegion QRegion::eor(const QRegion &r) const -{ - if (!d->rgn) - return r; - if (!r.d->rgn) - return *this; - return winCombine(r, QRGN_XOR); -} - - -QRect QRegion::boundingRect() const -{ - if (!d->rgn) - return QRect(); - RECT r; - if (GetRgnBox(d->rgn, &r) == NULLREGION) - return QRect(); - else - return QRect(r.left, r.top, r.right - r.left, r.bottom - r.top); -} - -QVector<QRect> QRegion::rects() const -{ - if (d->rgn == 0) - return QVector<QRect>(); - - int numBytes = GetRegionData(d->rgn, 0, 0); + int numBytes = GetRegionData(rgn, 0, 0); if (numBytes == 0) - return QVector<QRect>(); + return QRegion(); char *buf = new char[numBytes]; if (buf == 0) - return QVector<QRect>(); + return QRegion(); RGNDATA *rd = reinterpret_cast<RGNDATA*>(buf); - if (GetRegionData(d->rgn, numBytes, rd) == 0) { + if (GetRegionData(rgn, numBytes, rd) == 0) { delete [] buf; - return QVector<QRect>(); + return QRegion(); } - QVector<QRect> a(rd->rdh.nCount); + QRegion region; RECT *r = reinterpret_cast<RECT*>(rd->Buffer); - for (int i = 0; i < a.size(); ++i) { - a[i].setCoords(r->left, r->top, r->right - 1, r->bottom - 1); + for (int i = 0; i < rd->rdh.nCount; ++i) { + QRect rect; + rect.setCoords(r->left, r->top, r->right - 1, r->bottom - 1); ++r; + region |= rect; } delete [] buf; - return a; -} - -void QRegion::setRects(const QRect *rects, int num) -{ - *this = QRegion(); - if (!rects || num == 0 || (num == 1 && rects->isEmpty())) - return; - for (int i = 0; i < num; ++i) - *this |= rects[i]; -} - -int QRegion::numRects() const -{ - if (d->rgn == 0) - return 0; - - const int numBytes = GetRegionData(d->rgn, 0, 0); - if (numBytes == 0) - return 0; - - char *buf = new char[numBytes]; - if (buf == 0) - return 0; - - RGNDATA *rd = reinterpret_cast<RGNDATA*>(buf); - if (GetRegionData(d->rgn, numBytes, rd) == 0) { - delete[] buf; - return 0; - } - - const int n = rd->rdh.nCount; - delete[] buf; - return n; + return region; } -bool QRegion::operator==(const QRegion &r) const +void qt_win_dispose_rgn(HRGN r) { - if (d == r.d) - return true; - if ((d->rgn == 0) ^ (r.d->rgn == 0)) // one is empty, not both - return false; - return d->rgn == 0 ? true // both empty - : EqualRgn(d->rgn, r.d->rgn); // both non-empty + if (r) + DeleteObject(r); } -QRegion& QRegion::operator+=(const QRegion &r) +static void qt_add_rect(HRGN &winRegion, QRect r) { - if (!r.d->rgn) - return *this; - - if (!d->rgn) { - *this = r; - return *this; + HRGN rgn = CreateRectRgn(r.left(), r.top(), r.x() + r.width(), r.y() + r.height()); + if (rgn) { + HRGN dest = CreateRectRgn(0,0,0,0); + int result = CombineRgn(dest, winRegion, rgn, RGN_OR); + if (result) { + DeleteObject(winRegion); + winRegion = dest; + } + DeleteObject(rgn); } - - detach(); - - int result; - result = CombineRgn(d->rgn, d->rgn, r.d->rgn, RGN_OR); - if (result == NULLREGION || result == ERROR) - *this = QRegion(); - - return *this; -} - -QRegion& QRegion::operator-=(const QRegion &r) -{ - if (!r.d->rgn || !d->rgn) - return *this; - - detach(); - - int result; - result = CombineRgn(d->rgn, d->rgn, r.d->rgn, RGN_DIFF); - if (result == NULLREGION || result == ERROR) - *this = QRegion(); - - return *this; } -QRegion& QRegion::operator&=(const QRegion &r) +void QRegion::ensureHandle() const { - if (!d->rgn) - return *this; - - if (!r.d->rgn) { - *this = QRegion(); - return *this; + if (d->rgn) + DeleteObject(d->rgn); + d->rgn = CreateRectRgn(0,0,0,0); + if (d->qt_rgn) { + if (d->qt_rgn->numRects == 1) { + QRect r = d->qt_rgn->extents; + qt_add_rect(d->rgn, r); + return; + } + for (int i = 0;i < d->qt_rgn->numRects;i++) { + QRect r = d->qt_rgn->rects.at(i); + qt_add_rect(d->rgn, r); + } } - - detach(); - - int result; - result = CombineRgn(d->rgn, d->rgn, r.d->rgn, RGN_AND); - if (result == NULLREGION || result == ERROR) - *this = QRegion(); - - return *this; -} - -bool qt_region_strictContains(const QRegion ®ion, const QRect &rect) -{ - Q_UNUSED(region); - Q_UNUSED(rect); - return false; } -void QRegion::ensureHandle() const -{ -} QT_END_NAMESPACE diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h index 6968f4e17c..a34c3546c6 100644 --- a/src/gui/painting/qtextureglyphcache_p.h +++ b/src/gui/painting/qtextureglyphcache_p.h @@ -60,6 +60,10 @@ #include <private/qfontengineglyphcache_p.h> +#if defined(Q_OS_VXWORKS) && defined(m_type) +# undef m_type +#endif + struct glyph_metrics_t; typedef unsigned int glyph_t; diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp index a322fe4de4..0a64e4ede5 100644 --- a/src/gui/painting/qtransform.cpp +++ b/src/gui/painting/qtransform.cpp @@ -48,6 +48,8 @@ #include "qvariant.h" #include <qmath.h> +#include <private/qbezier_p.h> + QT_BEGIN_NAMESPACE #define Q_NEAR_CLIP 0.000001 @@ -1492,27 +1494,12 @@ static inline bool lineTo_clipped(QPainterPath &path, const QTransform &transfor static inline bool cubicTo_clipped(QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b, const QPointF &c, const QPointF &d, bool needsMoveTo) { - const QHomogeneousCoordinate ha = mapHomogeneous(transform, a); - const QHomogeneousCoordinate hb = mapHomogeneous(transform, b); - const QHomogeneousCoordinate hc = mapHomogeneous(transform, c); - const QHomogeneousCoordinate hd = mapHomogeneous(transform, d); - - if (ha.w < Q_NEAR_CLIP && hb.w < Q_NEAR_CLIP && hc.w < Q_NEAR_CLIP && hd.w < Q_NEAR_CLIP) - return false; + // Convert projective xformed curves to line + // segments so they can be transformed more accurately + QPolygonF segment = QBezier::fromPoints(a, b, c, d).toPolygon(); - if (ha.w >= Q_NEAR_CLIP && hb.w >= Q_NEAR_CLIP && hc.w >= Q_NEAR_CLIP && hd.w >= Q_NEAR_CLIP) { - if (needsMoveTo) - path.moveTo(ha.toPoint()); - - path.cubicTo(hb.toPoint(), hc.toPoint(), hd.toPoint()); - return true; - } - - if (lineTo_clipped(path, transform, a, b, needsMoveTo)) - needsMoveTo = false; - if (lineTo_clipped(path, transform, b, c, needsMoveTo)) - needsMoveTo = false; - if (lineTo_clipped(path, transform, c, d, needsMoveTo)) + for (int i = 0; i < segment.size() - 1; ++i) + if (lineTo_clipped(path, transform, segment.at(i), segment.at(i+1), needsMoveTo)) needsMoveTo = false; return !needsMoveTo; @@ -1793,6 +1780,14 @@ void QTransform::setMatrix(qreal m11, qreal m12, qreal m13, m_dirty = TxProject; } +static inline bool needsPerspectiveClipping(const QRectF &rect, const QTransform &transform) +{ + const qreal wx = qMin(transform.m13() * rect.left(), transform.m13() * rect.right()); + const qreal wy = qMin(transform.m23() * rect.top(), transform.m23() * rect.bottom()); + + return wx + wy + transform.m33() < Q_NEAR_CLIP; +} + QRect QTransform::mapRect(const QRect &rect) const { TransformationType t = inline_type(); @@ -1813,7 +1808,7 @@ QRect QTransform::mapRect(const QRect &rect) const y -= h; } return QRect(x, y, w, h); - } else { + } else if (t < TxProject || !needsPerspectiveClipping(rect, *this)) { // see mapToPolygon for explanations of the algorithm. qreal x = 0, y = 0; MAP(rect.left(), rect.top(), x, y); @@ -1837,6 +1832,10 @@ QRect QTransform::mapRect(const QRect &rect) const xmax = qMax(xmax, x); ymax = qMax(ymax, y); return QRect(qRound(xmin), qRound(ymin), qRound(xmax)-qRound(xmin), qRound(ymax)-qRound(ymin)); + } else { + QPainterPath path; + path.addRect(rect); + return map(path).boundingRect().toRect(); } } @@ -1879,7 +1878,7 @@ QRectF QTransform::mapRect(const QRectF &rect) const y -= h; } return QRectF(x, y, w, h); - } else { + } else if (t < TxProject || !needsPerspectiveClipping(rect, *this)) { qreal x = 0, y = 0; MAP(rect.x(), rect.y(), x, y); qreal xmin = x; @@ -1902,6 +1901,10 @@ QRectF QTransform::mapRect(const QRectF &rect) const xmax = qMax(xmax, x); ymax = qMax(ymax, y); return QRectF(xmin, ymin, xmax-xmin, ymax - ymin); + } else { + QPainterPath path; + path.addRect(rect); + return map(path).boundingRect(); } } diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h index 291d35c734..69d4de2183 100644 --- a/src/gui/painting/qtransform.h +++ b/src/gui/painting/qtransform.h @@ -50,6 +50,10 @@ #include <QtCore/qpoint.h> #include <QtCore/qrect.h> +#if defined(Q_OS_VXWORKS) && defined(m_type) +# undef m_type +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h index e3cb3332bc..df49500d15 100644 --- a/src/gui/painting/qvectorpath_p.h +++ b/src/gui/painting/qvectorpath_p.h @@ -130,6 +130,8 @@ public: static inline uint polygonFlags(QPaintEngine::PolygonDrawMode mode); + QPainterPath convertToPainterPath() const; + private: Q_DISABLE_COPY(QVectorPath) diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp index 63b39b20d8..863237b398 100644 --- a/src/gui/painting/qwindowsurface_raster.cpp +++ b/src/gui/painting/qwindowsurface_raster.cpp @@ -116,7 +116,7 @@ QPaintDevice *QRasterWindowSurface::paintDevice() void QRasterWindowSurface::beginPaint(const QRegion &rgn) { #if (defined(Q_WS_X11) && !defined(QT_NO_XRENDER)) || (defined(Q_WS_WIN) && !defined(Q_WS_WINCE)) - if (!qt_widget_private(window())->isOpaque) { + if (!qt_widget_private(window())->isOpaque && window()->testAttribute(Qt::WA_TranslucentBackground)) { #if defined(Q_WS_WIN) && !defined(Q_WS_WINCE) if (d_ptr->image->image.format() != QImage::Format_ARGB32_Premultiplied) prepareBuffer(QImage::Format_ARGB32_Premultiplied, window()); @@ -147,7 +147,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi QRect br = rgn.boundingRect(); #ifndef Q_WS_WINCE - if (!qt_widget_private(window())->isOpaque) { + if (!qt_widget_private(window())->isOpaque && window()->testAttribute(Qt::WA_TranslucentBackground)) { QRect r = window()->frameGeometry(); QPoint frameOffset = qt_widget_private(window())->frameStrut().topLeft(); QRect dirtyRect = br.translated(offset + frameOffset); diff --git a/src/gui/painting/qwindowsurface_x11.cpp b/src/gui/painting/qwindowsurface_x11.cpp index d8b0d9e7d1..95f6ce3b72 100644 --- a/src/gui/painting/qwindowsurface_x11.cpp +++ b/src/gui/painting/qwindowsurface_x11.cpp @@ -154,7 +154,7 @@ void QX11WindowSurface::setGeometry(const QRect &rect) QX11PixmapData *oldData = static_cast<QX11PixmapData *>(d_ptr->device.pixmapData()); Q_ASSERT(oldData); - if (!oldData->uninit && hasStaticContents()) { + if (!(oldData->flags & QX11PixmapData::Uninitialized) && hasStaticContents()) { // Copy the content of the old pixmap into the new one. QX11PixmapData *newData = new QX11PixmapData(QPixmapData::PixmapType); newData->resize(size.width(), size.height()); @@ -175,7 +175,7 @@ void QX11WindowSurface::setGeometry(const QRect &rect) dx, dy, qMin(boundingRect.width(), size.width()), qMin(boundingRect.height(), size.height()), dx, dy); XFreeGC(X11->display, tmpGc); - newData->uninit = false; + newData->flags &= ~QX11PixmapData::Uninitialized; d_ptr->device = QPixmap(newData); } else { diff --git a/src/gui/statemachine/qkeyeventtransition.cpp b/src/gui/statemachine/qkeyeventtransition.cpp index 51b3ccc1ea..21a073608e 100644 --- a/src/gui/statemachine/qkeyeventtransition.cpp +++ b/src/gui/statemachine/qkeyeventtransition.cpp @@ -106,19 +106,6 @@ QKeyEventTransition::QKeyEventTransition(QObject *object, QEvent::Type type, } /*! - Constructs a new key event transition for events of the given \a type for - the given \a object, with the given \a key, \a targets and \a sourceState. -*/ -QKeyEventTransition::QKeyEventTransition(QObject *object, QEvent::Type type, - int key, const QList<QAbstractState*> &targets, - QState *sourceState) - : QEventTransition(*new QKeyEventTransitionPrivate, object, type, targets, sourceState) -{ - Q_D(QKeyEventTransition); - d->transition = new QBasicKeyEventTransition(type, key); -} - -/*! Destroys this key event transition. */ QKeyEventTransition::~QKeyEventTransition() diff --git a/src/gui/statemachine/qkeyeventtransition.h b/src/gui/statemachine/qkeyeventtransition.h index f5e8de360e..45ae684d68 100644 --- a/src/gui/statemachine/qkeyeventtransition.h +++ b/src/gui/statemachine/qkeyeventtransition.h @@ -62,9 +62,6 @@ public: QKeyEventTransition(QState *sourceState = 0); QKeyEventTransition(QObject *object, QEvent::Type type, int key, QState *sourceState = 0); - QKeyEventTransition(QObject *object, QEvent::Type type, int key, - const QList<QAbstractState*> &targets, - QState *sourceState = 0); ~QKeyEventTransition(); int key() const; diff --git a/src/gui/statemachine/qmouseeventtransition.cpp b/src/gui/statemachine/qmouseeventtransition.cpp index 0cd096af3c..dbe50b3677 100644 --- a/src/gui/statemachine/qmouseeventtransition.cpp +++ b/src/gui/statemachine/qmouseeventtransition.cpp @@ -112,21 +112,6 @@ QMouseEventTransition::QMouseEventTransition(QObject *object, QEvent::Type type, } /*! - Constructs a new mouse event transition for events of the given \a type for - the given \a object, with the given \a button, \a targets and \a - sourceState. -*/ -QMouseEventTransition::QMouseEventTransition(QObject *object, QEvent::Type type, - Qt::MouseButton button, - const QList<QAbstractState*> &targets, - QState *sourceState) - : QEventTransition(*new QMouseEventTransitionPrivate, object, type, targets, sourceState) -{ - Q_D(QMouseEventTransition); - d->transition = new QBasicMouseEventTransition(type, button); -} - -/*! Destroys this mouse event transition. */ QMouseEventTransition::~QMouseEventTransition() diff --git a/src/gui/statemachine/qmouseeventtransition.h b/src/gui/statemachine/qmouseeventtransition.h index 73ae6c9aa6..a56a554341 100644 --- a/src/gui/statemachine/qmouseeventtransition.h +++ b/src/gui/statemachine/qmouseeventtransition.h @@ -63,10 +63,6 @@ public: QMouseEventTransition(QState *sourceState = 0); QMouseEventTransition(QObject *object, QEvent::Type type, Qt::MouseButton button, QState *sourceState = 0); - QMouseEventTransition(QObject *object, QEvent::Type type, - Qt::MouseButton button, - const QList<QAbstractState*> &targets, - QState *sourceState = 0); ~QMouseEventTransition(); Qt::MouseButton button() const; diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index 9560c4b988..ad87354886 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -134,6 +134,7 @@ static const int windowsRightBorder = 12; // right border on windows // External function calls extern Q_GUI_EXPORT HDC qt_win_display_dc(); +extern QRegion qt_region_from_HRGN(HRGN rgn); @@ -445,6 +446,7 @@ bool QWindowsXPStylePrivate::isTransparent(XPThemeData &themeData) themeData.stateId); } + /*! \internal Returns a QRegion of the region of the part */ @@ -456,12 +458,18 @@ QRegion QWindowsXPStylePrivate::region(XPThemeData &themeData) themeData.stateId, &rect, &hRgn))) return QRegion(); - QRegion rgn = QRegion(0,0,1,1); - const bool success = CombineRgn(rgn.handle(), hRgn, 0, RGN_COPY) != ERROR; - DeleteObject(hRgn); + HRGN dest = CreateRectRgn(0, 0, 0, 0); + const bool success = CombineRgn(dest, hRgn, 0, RGN_COPY) != ERROR; + + QRegion region; + if (success) - return rgn; - return QRegion(); + region = qt_region_from_HRGN(dest); + + DeleteObject(hRgn); + DeleteObject(dest); + + return region; } /*! \internal diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h index b07acd5d28..9f046ff6bd 100644 --- a/src/gui/text/qcssparser_p.h +++ b/src/gui/text/qcssparser_p.h @@ -67,6 +67,11 @@ #ifndef QT_NO_CSSPARSER +// VxWorks defines NONE as (-1) "for times when NULL won't do" +#if defined(Q_OS_VXWORKS) && defined(NONE) +# undef NONE +#endif + QT_BEGIN_NAMESPACE namespace QCss diff --git a/src/gui/text/qfontdatabase_qws.cpp b/src/gui/text/qfontdatabase_qws.cpp index ff6af9815e..040750868b 100644 --- a/src/gui/text/qfontdatabase_qws.cpp +++ b/src/gui/text/qfontdatabase_qws.cpp @@ -257,7 +257,7 @@ static QString qwsFontPath() return fontpath; } -#ifdef QFONTDATABASE_DEBUG +#if defined(QFONTDATABASE_DEBUG) && defined(QT_FONTS_ARE_RESOURCES) class FriendlyResource : public QResource { public: @@ -591,8 +591,12 @@ QFontEngine *loadSingleEngine(int script, const QFontPrivate *fp, QFontDef def = request; def.pixelSize = pixelSize; +#ifdef QT_NO_QWS_SHARE_FONTS + bool shareFonts = false; +#else static bool dontShareFonts = !qgetenv("QWS_NO_SHARE_FONTS").isEmpty(); bool shareFonts = !dontShareFonts; +#endif QScopedPointer<QFontEngine> engine; diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index ab04dc7125..499d28c2fe 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1380,8 +1380,8 @@ bool QFontEngineFT::loadGlyphs(QGlyphSet *gs, glyph_t *glyphs, int num_glyphs, G FT_Face face = 0; for (int i = 0; i < num_glyphs; ++i) { - if (!gs->glyph_data.contains(glyphs[i]) - || gs->glyph_data.value(glyphs[i])->format != format) { + Glyph *glyph = gs->glyph_data.value(glyphs[i]); + if (glyph == 0 || glyph->format != format) { if (!face) { face = lockFace(); FT_Matrix m = matrix; diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm index 76132dfd17..dbf3015512 100644 --- a/src/gui/text/qfontengine_mac.mm +++ b/src/gui/text/qfontengine_mac.mm @@ -156,7 +156,7 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, con if (!kerning) { float zero = 0.0; QCFType<CFNumberRef> noKern = CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &zero); - CFDictionaryAddValue(attributeDict, kCTKernAttributeName, &noKern); + CFDictionaryAddValue(attributeDict, kCTKernAttributeName, noKern); } QCoreTextFontEngine *fe = new QCoreTextFontEngine(ctfont, fontDef, this); @@ -1588,6 +1588,7 @@ QFontEngine::FaceId QFontEngineMac::faceId() const { FaceId ret; #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) +if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) { // CTFontGetPlatformFont FSRef ref; if (ATSFontGetFileReference(FMGetATSFontRefFromFont(fontID), &ref) != noErr) @@ -1595,7 +1596,9 @@ QFontEngine::FaceId QFontEngineMac::faceId() const ret.filename = QByteArray(128, 0); ret.index = fontID; FSRefMakePath(&ref, (UInt8 *)ret.filename.data(), ret.filename.size()); -#else +}else +#endif +{ FSSpec spec; if (ATSFontGetFileSpecification(FMGetATSFontRefFromFont(fontID), &spec) != noErr) return ret; @@ -1605,7 +1608,7 @@ QFontEngine::FaceId QFontEngineMac::faceId() const ret.filename = QByteArray(128, 0); ret.index = fontID; FSRefMakePath(&ref, (UInt8 *)ret.filename.data(), ret.filename.size()); -#endif +} return ret; } diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index 232f8391de..e7826cc2ae 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -331,16 +331,37 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng #if defined(DEBUG_FONTENGINE) qDebug() << "found existing qpf:" << fileName; #endif - if (::access(encodedName, W_OK | R_OK) == 0) - fd = QT_OPEN(encodedName, O_RDWR, 0); - else if (::access(encodedName, R_OK) == 0) - fd = QT_OPEN(encodedName, O_RDONLY, 0); + if (::access(encodedName, W_OK | R_OK) == 0) { + fd = QT_OPEN(encodedName, O_RDWR); + } + // read-write access failed - try read-only access + if (fd == -1 && ::access(encodedName, R_OK) == 0) { + fd = QT_OPEN(encodedName, O_RDONLY); + if (fd == -1) { +#if defined(DEBUG_FONTENGINE) + qErrnoWarning("QFontEngineQPF: unable to open %s", encodedName.constData()); +#endif + return; + } + } + if (fd == -1) { +#if defined(DEBUG_FONTENGINE) + qWarning("QFontEngineQPF: insufficient access rights to %s", encodedName.constData()); +#endif + return; + } } else { #if defined(DEBUG_FONTENGINE) qDebug() << "creating qpf on the fly:" << fileName; #endif if (::access(QFile::encodeName(qws_fontCacheDir()), W_OK) == 0) { fd = QT_OPEN(encodedName, O_RDWR | O_EXCL | O_CREAT, 0644); + if (fd == -1) { +#if defined(DEBUG_FONTENGINE) + qErrnoWarning(errno, "QFontEngineQPF: open() failed for %s", encodedName.constData()); +#endif + return; + } QBuffer buffer; buffer.open(QIODevice::ReadWrite); @@ -348,7 +369,17 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng generator.generate(); buffer.close(); const QByteArray &data = buffer.data(); - QT_WRITE(fd, data.constData(), data.size()); + if (QT_WRITE(fd, data.constData(), data.size()) == -1) { +#if defined(DEBUG_FONTENGINE) + qErrnoWarning(errno, "QFontEngineQPF: write() failed for %s", encodedName.constData()); +#endif + return; + } + } else { +#if defined(DEBUG_FONTENGINE) + qErrnoWarning(errno, "QFontEngineQPF: access() failed for %s", qPrintable(qws_fontCacheDir())); +#endif + return; } } } @@ -356,7 +387,7 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng QT_STATBUF st; if (QT_FSTAT(fd, &st)) { #if defined(DEBUG_FONTENGINE) - qDebug() << "stat failed!"; + qErrnoWarning(errno, "QFontEngineQPF: fstat failed!"); #endif return; } @@ -492,8 +523,13 @@ QFontEngineQPF::~QFontEngineQPF() } #endif delete renderingFontEngine; - if (fontData) - munmap((void *)fontData, dataSize); + if (fontData) { + if (munmap((void *)fontData, dataSize) == -1) { +#if defined(DEBUG_FONTENGINE) + qErrnoWarning(errno, "~QFontEngineQPF: Unable to munmap"); +#endif + } + } if (fd != -1) ::close(fd); #if !defined(QT_NO_FREETYPE) diff --git a/src/gui/text/qfontengine_qws.cpp b/src/gui/text/qfontengine_qws.cpp index 70ce8f9372..10bee2c946 100644 --- a/src/gui/text/qfontengine_qws.cpp +++ b/src/gui/text/qfontengine_qws.cpp @@ -396,7 +396,7 @@ QFontEngineQPF1::QFontEngineQPF1(const QFontDef&, const QString &fn) uchar* data = (uchar*)mmap( 0, // any address st.st_size, // whole file PROT_READ, // read-only memory -#if !defined(Q_OS_SOLARIS) && !defined(Q_OS_QNX4) && !defined(Q_OS_INTEGRITY) +#if !defined(Q_OS_SOLARIS) && !defined(Q_OS_QNX4) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_VXWORKS) MAP_FILE | MAP_PRIVATE, // swap-backed map from file #else MAP_PRIVATE, diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h index 872bcd56b6..eb0d749d4c 100644 --- a/src/gui/text/qtextcontrol_p.h +++ b/src/gui/text/qtextcontrol_p.h @@ -83,7 +83,7 @@ class QAbstractScrollArea; class QEvent; class QTimerEvent; -class Q_AUTOTEST_EXPORT QTextControl : public QObject +class Q_GUI_EXPORT QTextControl : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QTextControl) diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index ea37e044c0..e66b07c8a4 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -60,6 +60,15 @@ QT_BEGIN_NAMESPACE #define PMDEBUG if(0) qDebug +// The VxWorks DIAB compiler crashes when initializing the anonymouse union with { a7 } +#if !defined(Q_CC_DIAB) +# define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \ + QTextUndoCommand c = { a1, a2, a3, a4, a5, a6, { a7 }, a8 } +#else +# define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \ + QTextUndoCommand c = { a1, a2, a3, a4, a5, a6 }; c.blockFormat = a7; c.revision = a8 +#endif + /* Structure of a document: @@ -406,9 +415,9 @@ int QTextDocumentPrivate::insertBlock(const QChar &blockSeparator, int b = blocks.findNode(pos); QTextBlockData *B = blocks.fragment(b); - QTextUndoCommand c = { QTextUndoCommand::BlockInserted, editBlock != 0, - op, charFormat, strPos, pos, { blockFormat }, - B->revision }; + QT_INIT_TEXTUNDOCOMMAND(c, QTextUndoCommand::BlockInserted, editBlock != 0, + op, charFormat, strPos, pos, blockFormat, + B->revision); appendUndoItem(c); Q_ASSERT(undoState == undoStack.size()); @@ -447,9 +456,9 @@ void QTextDocumentPrivate::insert(int pos, int strPos, int strLength, int format int b = blocks.findNode(pos); QTextBlockData *B = blocks.fragment(b); - QTextUndoCommand c = { QTextUndoCommand::Inserted, editBlock != 0, - QTextUndoCommand::MoveCursor, format, strPos, pos, { strLength }, - B->revision }; + QT_INIT_TEXTUNDOCOMMAND(c, QTextUndoCommand::Inserted, editBlock != 0, + QTextUndoCommand::MoveCursor, format, strPos, pos, strLength, + B->revision); appendUndoItem(c); B->revision = undoState; Q_ASSERT(undoState == undoStack.size()); @@ -606,12 +615,12 @@ void QTextDocumentPrivate::move(int pos, int to, int length, QTextUndoCommand::O int blockRevision = B->revision; QTextFragmentData *X = fragments.fragment(x); - QTextUndoCommand c = { QTextUndoCommand::Removed, editBlock != 0, - op, X->format, X->stringPosition, key, { X->size_array[0] }, - blockRevision }; - QTextUndoCommand cInsert = { QTextUndoCommand::Inserted, editBlock != 0, - op, X->format, X->stringPosition, dstKey, { X->size_array[0] }, - blockRevision }; + QT_INIT_TEXTUNDOCOMMAND(c, QTextUndoCommand::Removed, editBlock != 0, + op, X->format, X->stringPosition, key, X->size_array[0], + blockRevision); + QT_INIT_TEXTUNDOCOMMAND(cInsert, QTextUndoCommand::Inserted, editBlock != 0, + op, X->format, X->stringPosition, dstKey, X->size_array[0], + blockRevision); if (key+1 != blocks.position(b)) { // qDebug("remove_string from %d length %d", key, X->size_array[0]); @@ -723,8 +732,8 @@ void QTextDocumentPrivate::setCharFormat(int pos, int length, const QTextCharFor fragment->format = newFormatIdx; } - QTextUndoCommand c = { QTextUndoCommand::CharFormatChanged, true, QTextUndoCommand::MoveCursor, oldFormat, - 0, pos, { length }, 0 }; + QT_INIT_TEXTUNDOCOMMAND(c, QTextUndoCommand::CharFormatChanged, true, QTextUndoCommand::MoveCursor, oldFormat, + 0, pos, length, 0); appendUndoItem(c); pos += length; @@ -783,8 +792,8 @@ void QTextDocumentPrivate::setBlockFormat(const QTextBlock &from, const QTextBlo block(it)->invalidate(); - QTextUndoCommand c = { QTextUndoCommand::BlockFormatChanged, true, QTextUndoCommand::MoveCursor, oldFormat, - 0, it.position(), { 1 }, 0 }; + QT_INIT_TEXTUNDOCOMMAND(c, QTextUndoCommand::BlockFormatChanged, true, QTextUndoCommand::MoveCursor, oldFormat, + 0, it.position(), 1, 0); appendUndoItem(c); if (group != oldGroup) { @@ -1298,8 +1307,8 @@ void QTextDocumentPrivate::changeObjectFormat(QTextObject *obj, int format) if (f) documentChange(f->firstPosition(), f->lastPosition() - f->firstPosition()); - QTextUndoCommand c = { QTextUndoCommand::GroupFormatChange, editBlock != 0, QTextUndoCommand::MoveCursor, oldFormatIndex, - 0, 0, { obj->d_func()->objectIndex }, 0 }; + QT_INIT_TEXTUNDOCOMMAND(c, QTextUndoCommand::GroupFormatChange, editBlock != 0, QTextUndoCommand::MoveCursor, oldFormatIndex, + 0, 0, obj->d_func()->objectIndex, 0); appendUndoItem(c); endEditBlock(); diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp index a940aa4c37..cb09452fd1 100644 --- a/src/gui/text/qtextdocumentfragment.cpp +++ b/src/gui/text/qtextdocumentfragment.cpp @@ -54,7 +54,11 @@ QT_BEGIN_NAMESPACE QTextCopyHelper::QTextCopyHelper(const QTextCursor &_source, const QTextCursor &_destination, bool forceCharFormat, const QTextCharFormat &fmt) +#if defined(Q_CC_DIAB) // compiler bug + : formatCollection(*_destination.d->priv->formatCollection()), originalText((const QString)_source.d->priv->buffer()) +#else : formatCollection(*_destination.d->priv->formatCollection()), originalText(_source.d->priv->buffer()) +#endif { src = _source.d->priv; dst = _destination.d->priv; diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp index 0ce3b3c88f..b823100538 100644 --- a/src/gui/util/qcompleter.cpp +++ b/src/gui/util/qcompleter.cpp @@ -824,6 +824,9 @@ void QCompleterPrivate::_q_complete(QModelIndex index, bool highlighted) Q_Q(QCompleter); QString completion; + if (!(index.flags() & Qt::ItemIsEnabled)) + return; + if (!index.isValid() || (!proxy->showAll && (index.row() >= proxy->engine->matchCount()))) { completion = prefix; } else { @@ -1102,7 +1105,8 @@ void QCompleter::setPopup(QAbstractItemView *popup) QObject::connect(popup, SIGNAL(clicked(QModelIndex)), this, SLOT(_q_complete(QModelIndex))); - QObject::connect(popup, SIGNAL(clicked(QModelIndex)), popup, SLOT(hide())); + QObject::connect(this, SIGNAL(activated(QModelIndex)), + popup, SLOT(hide())); QObject::connect(popup->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(_q_completionSelected(QItemSelection))); diff --git a/src/gui/util/qdesktopservices_x11.cpp b/src/gui/util/qdesktopservices_x11.cpp index f0202d4a65..0a3c2d0757 100644 --- a/src/gui/util/qdesktopservices_x11.cpp +++ b/src/gui/util/qdesktopservices_x11.cpp @@ -56,7 +56,11 @@ QT_BEGIN_NAMESPACE inline static bool launch(const QUrl &url, const QString &client) { +#if !defined(QT_NO_PROCESS) return (QProcess::startDetached(client + QLatin1Char(' ') + QString::fromLatin1(url.toEncoded().constData()))); +#else + return (::system((client + QLatin1Char(' ') + QString::fromLatin1(url.toEncoded().constData())).toLocal8Bit().constData()) != -1); +#endif } static bool openDocument(const QUrl &url) diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp index 8027f9eb14..bcc5c923e4 100644 --- a/src/gui/widgets/qabstractspinbox.cpp +++ b/src/gui/widgets/qabstractspinbox.cpp @@ -987,7 +987,7 @@ void QAbstractSpinBox::keyPressEvent(QKeyEvent *event) #endif case Qt::Key_Enter: case Qt::Key_Return: - d->edit->d_func()->modifiedState = d->edit->d_func()->undoState = 0; + d->edit->d_func()->control->clearUndo(); d->interpret(d->keyboardTracking ? AlwaysEmit : EmitIfChanged); selectAll(); event->ignore(); diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp new file mode 100644 index 0000000000..106d8f2aae --- /dev/null +++ b/src/gui/widgets/qlinecontrol.cpp @@ -0,0 +1,1749 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qlinecontrol_p.h" + +#ifndef QT_NO_LINEEDIT + +#include "qabstractitemview.h" +#include "qclipboard.h" +#ifndef QT_NO_ACCESSIBILITY +#include "qaccessible.h" +#endif +#ifndef QT_NO_IM +#include "qinputcontext.h" +#include "qlist.h" +#endif +#include "qapplication.h" +#ifndef QT_NO_GRAPHICSVIEW +#include "qgraphicssceneevent.h" +#endif + +QT_BEGIN_NAMESPACE + +/*! + \internal + + Updates the display text based of the current edit text + If the text has changed will emit displayTextChanged() +*/ +void QLineControl::updateDisplayText() +{ + QString orig = m_textLayout.text(); + QString str; + if (m_echoMode == QLineEdit::NoEcho) + str = QString::fromLatin1(""); + else + str = m_text; + + if (m_echoMode == QLineEdit::Password || (m_echoMode == QLineEdit::PasswordEchoOnEdit + && !m_passwordEchoEditing)) + str.fill(m_passwordCharacter); + + // replace certain non-printable characters with spaces (to avoid + // drawing boxes when using fonts that don't have glyphs for such + // characters) + QChar* uc = str.data(); + for (int i = 0; i < (int)str.length(); ++i) { + if ((uc[i] < 0x20 && uc[i] != 0x09) + || uc[i] == QChar::LineSeparator + || uc[i] == QChar::ParagraphSeparator + || uc[i] == QChar::ObjectReplacementCharacter) + uc[i] = QChar(0x0020); + } + + m_textLayout.setText(str); + + QTextOption option; + option.setTextDirection(m_layoutDirection); + option.setFlags(QTextOption::IncludeTrailingSpaces); + m_textLayout.setTextOption(option); + + m_textLayout.beginLayout(); + QTextLine l = m_textLayout.createLine(); + m_textLayout.endLayout(); + m_ascent = qRound(l.ascent()); + + if (str != orig) + emit displayTextChanged(str); +} + +#ifndef QT_NO_CLIPBOARD +/*! + \internal + + Copies the currently selected text into the clipboard using the given + \a mode. + + \note If the echo mode is set to a mode other than Normal then copy + will not work. This is to prevent using copy as a method of bypassing + password features of the line control. +*/ +void QLineControl::copy(QClipboard::Mode mode) const +{ + QString t = selectedText(); + if (!t.isEmpty() && m_echoMode == QLineEdit::Normal) { + disconnect(QApplication::clipboard(), SIGNAL(selectionChanged()), this, 0); + QApplication::clipboard()->setText(t, mode); + connect(QApplication::clipboard(), SIGNAL(selectionChanged()), + this, SLOT(_q_clipboardChanged())); + } +} + +/*! + \internal + + Inserts the text stored in the application clipboard into the line + control. + + \sa insert() +*/ +void QLineControl::paste() +{ + insert(QApplication::clipboard()->text(QClipboard::Clipboard)); +} + +#endif // !QT_NO_CLIPBOARD + +/*! + \internal + + Handles the behavior for the backspace key or function. + Removes the current selection if there is a selection, otherwise + removes the character prior to the cursor position. + + \sa del() +*/ +void QLineControl::backspace() +{ + int priorState = m_undoState; + if (hasSelectedText()) { + removeSelectedText(); + } else if (m_cursor) { + --m_cursor; + if (m_maskData) + m_cursor = prevMaskBlank(m_cursor); + QChar uc = m_text.at(m_cursor); + if (m_cursor > 0 && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) { + // second half of a surrogate, check if we have the first half as well, + // if yes delete both at once + uc = m_text.at(m_cursor - 1); + if (uc.unicode() >= 0xd800 && uc.unicode() < 0xdc00) { + internalDelete(true); + --m_cursor; + } + } + internalDelete(true); + } + finishChange(priorState); +} + +/*! + \internal + + Handles the behavior for the delete key or function. + Removes the current selection if there is a selection, otherwise + removes the character after the cursor position. + + \sa del() +*/ +void QLineControl::del() +{ + int priorState = m_undoState; + if (hasSelectedText()) { + removeSelectedText(); + } else { + int n = m_textLayout.nextCursorPosition(m_cursor) - m_cursor; + while (n--) + internalDelete(); + } + finishChange(priorState); +} + +/*! + \internal + + Inserts the given \a newText at the current cursor position. + If there is any selected text it is removed prior to insertion of + the new text. +*/ +void QLineControl::insert(const QString &newText) +{ + int priorState = m_undoState; + removeSelectedText(); + internalInsert(newText); + finishChange(priorState); +} + +/*! + \internal + + Clears the line control text. +*/ +void QLineControl::clear() +{ + int priorState = m_undoState; + m_selstart = 0; + m_selend = m_text.length(); + removeSelectedText(); + separate(); + finishChange(priorState, /*update*/false, /*edited*/false); +} + +/*! + \internal + + Sets \a length characters from the given \a start position as selected. + The given \a start position must be within the current text for + the line control. If \a length characters cannot be selected, then + the selection will extend to the end of the current text. +*/ +void QLineControl::setSelection(int start, int length) +{ + if(start < 0 || start > (int)m_text.length()){ + qWarning("QLineControl::setSelection: Invalid start position"); + return; + } + + if (length > 0) { + if (start == m_selstart && start + length == m_selend) + return; + m_selstart = start; + m_selend = qMin(start + length, (int)m_text.length()); + m_cursor = m_selend; + } else { + if (start == m_selend && start + length == m_selstart) + return; + m_selstart = qMax(start + length, 0); + m_selend = start; + m_cursor = m_selstart; + } + emit selectionChanged(); +} + +void QLineControl::_q_clipboardChanged() +{ +} + +void QLineControl::_q_deleteSelected() +{ + if (!hasSelectedText()) + return; + + int priorState = m_undoState; + emit resetInputContext(); + removeSelectedText(); + separate(); + finishChange(priorState); +} + +/*! + \internal + + Initializes the line control with a starting text value of \a txt. +*/ +void QLineControl::init(const QString &txt) +{ + m_text = txt; + updateDisplayText(); + m_cursor = m_text.length(); +} + +/*! + \internal + + Sets the password echo editing to \a editing. If password echo editing + is true, then the text of the password is displayed even if the echo + mode is set to QLineEdit::PasswordEchoOnEdit. Password echoing editing + does not affect other echo modes. +*/ +void QLineControl::updatePasswordEchoEditing(bool editing) +{ + m_passwordEchoEditing = editing; + updateDisplayText(); +} + +/*! + \internal + + Returns the cursor position of the given \a x pixel value in relation + to the displayed text. The given \a betweenOrOn specified what kind + of cursor position is requested. +*/ +int QLineControl::xToPos(int x, QTextLine::CursorPosition betweenOrOn) const +{ + return m_textLayout.lineAt(0).xToCursor(x, betweenOrOn); +} + +/*! + \internal + + Returns the bounds of the current cursor, as defined as a + between characters cursor. +*/ +QRect QLineControl::cursorRect() const +{ + QTextLine l = m_textLayout.lineAt(0); + int c = m_cursor; + if (m_preeditCursor != -1) + c += m_preeditCursor; + int cix = qRound(l.cursorToX(c)); + int w = m_cursorWidth; + int ch = l.height() + 1; + + return QRect(cix-5, 0, w+9, ch); +} + +/*! + \internal + + Fixes the current text so that it is valid given any set validators. + + Returns true if the text was changed. Otherwise returns false. +*/ +bool QLineControl::fixup() // this function assumes that validate currently returns != Acceptable +{ +#ifndef QT_NO_VALIDATOR + if (m_validator) { + QString textCopy = m_text; + int cursorCopy = m_cursor; + m_validator->fixup(textCopy); + if (m_validator->validate(textCopy, cursorCopy) == QValidator::Acceptable) { + if (textCopy != m_text || cursorCopy != m_cursor) + internalSetText(textCopy, cursorCopy); + return true; + } + } +#endif + return false; +} + +/*! + \internal + + Moves the cursor to the given position \a pos. If \a mark is true will + adjust the currently selected text. +*/ +void QLineControl::moveCursor(int pos, bool mark) +{ + if (pos != m_cursor) { + separate(); + if (m_maskData) + pos = pos > m_cursor ? nextMaskBlank(pos) : prevMaskBlank(pos); + } + if (mark) { + int anchor; + if (m_selend > m_selstart && m_cursor == m_selstart) + anchor = m_selend; + else if (m_selend > m_selstart && m_cursor == m_selend) + anchor = m_selstart; + else + anchor = m_cursor; + m_selstart = qMin(anchor, pos); + m_selend = qMax(anchor, pos); + updateDisplayText(); + } else { + internalDeselect(); + } + m_cursor = pos; + if (mark || m_selDirty) { + m_selDirty = false; + emit selectionChanged(); + } + emitCursorPositionChanged(); +} + +/*! + \internal + + Applies the given input method event \a event to the text of the line + control +*/ +void QLineControl::processInputMethodEvent(QInputMethodEvent *event) +{ + int priorState = m_undoState; + removeSelectedText(); + + int c = m_cursor; // cursor position after insertion of commit string + if (event->replacementStart() <= 0) + c += event->commitString().length() + qMin(-event->replacementStart(), event->replacementLength()); + + m_cursor += event->replacementStart(); + + // insert commit string + if (event->replacementLength()) { + m_selstart = m_cursor; + m_selend = m_selstart + event->replacementLength(); + removeSelectedText(); + } + if (!event->commitString().isEmpty()) + insert(event->commitString()); + + m_cursor = qMin(c, m_text.length()); + + setPreeditArea(m_cursor, event->preeditString()); + m_preeditCursor = event->preeditString().length(); + m_hideCursor = false; + QList<QTextLayout::FormatRange> formats; + for (int i = 0; i < event->attributes().size(); ++i) { + const QInputMethodEvent::Attribute &a = event->attributes().at(i); + if (a.type == QInputMethodEvent::Cursor) { + m_preeditCursor = a.start; + m_hideCursor = !a.length; + } else if (a.type == QInputMethodEvent::TextFormat) { + QTextCharFormat f = qvariant_cast<QTextFormat>(a.value).toCharFormat(); + if (f.isValid()) { + QTextLayout::FormatRange o; + o.start = a.start + m_cursor; + o.length = a.length; + o.format = f; + formats.append(o); + } + } + } + m_textLayout.setAdditionalFormats(formats); + updateDisplayText(); + if (!event->commitString().isEmpty()) + emitCursorPositionChanged(); + finishChange(priorState); +} + +/*! + \internal + + Draws the display text for the line control using the given + \a painter, \a clip, and \a offset. Which aspects of the display text + are drawn is specified by the given \a flags. + + If the flags contain DrawSelections, then the selection or input mask + backgrounds and foregrounds will be applied before drawing the text. + + If the flags contain DrawCursor a cursor of the current cursorWidth() + will be drawn after drawing the text. + + The display text will only be drawn if the flags contain DrawText +*/ +void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &clip, int flags) +{ + QVector<QTextLayout::FormatRange> selections; + if (flags & DrawSelections) { + QTextLayout::FormatRange o; + if (m_selstart < m_selend) { + o.start = m_selstart; + o.length = m_selend - m_selstart; + o.format.setBackground(m_palette.brush(QPalette::Highlight)); + o.format.setForeground(m_palette.brush(QPalette::HighlightedText)); + } else { + // mask selection + o.start = m_cursor; + o.length = 1; + o.format.setBackground(m_palette.brush(QPalette::Text)); + o.format.setForeground(m_palette.brush(QPalette::Window)); + } + selections.append(o); + } + + if (flags & DrawText) + m_textLayout.draw(painter, offset, selections, clip); + + if (flags & DrawCursor){ + if(!m_blinkPeriod || m_blinkStatus) + m_textLayout.drawCursor(painter, offset, m_cursor, m_cursorWidth); + } +} + +/*! + \internal + + Sets the selection to cover the word at the given cursor position. + The word boundries is defined by the behavior of QTextLayout::SkipWords + cursor mode. +*/ +void QLineControl::selectWordAtPos(int cursor) +{ + int c = m_textLayout.previousCursorPosition(cursor, QTextLayout::SkipWords); + moveCursor(c, false); + // ## text layout should support end of words. + int end = m_textLayout.nextCursorPosition(cursor, QTextLayout::SkipWords); + while (end > cursor && m_text[end-1].isSpace()) + --end; + moveCursor(end, true); +} + +/*! + \internal + + Completes a change to the line control text. If the change is not valid + will undo the line control state back to the given \a validateFromState. + + If \a edited is true and the change is valid, will emit textEdited() in + addition to textChanged(). Otherwise only emits textChanged() on a valid + change. + + The \a update value is currently unused. +*/ +bool QLineControl::finishChange(int validateFromState, bool update, bool edited) +{ + Q_UNUSED(update) + bool lineDirty = m_selDirty; + if (m_textDirty) { + // do validation + bool wasValidInput = m_validInput; + m_validInput = true; +#ifndef QT_NO_VALIDATOR + if (m_validator) { + m_validInput = false; + QString textCopy = m_text; + int cursorCopy = m_cursor; + m_validInput = (m_validator->validate(textCopy, cursorCopy) != QValidator::Invalid); + if (m_validInput) { + if (m_text != textCopy) { + internalSetText(textCopy, cursorCopy); + return true; + } + m_cursor = cursorCopy; + } + } +#endif + if (validateFromState >= 0 && wasValidInput && !m_validInput) { + if (m_transactions.count()) + return false; + internalUndo(validateFromState); + m_history.resize(m_undoState); + if (m_modifiedState > m_undoState) + m_modifiedState = -1; + m_validInput = true; + m_textDirty = false; + } + updateDisplayText(); + lineDirty |= m_textDirty; + if (m_textDirty) { + m_textDirty = false; + QString actualText = text(); + if (edited) + emit textEdited(actualText); + emit textChanged(actualText); + } + } + if (m_selDirty) { + m_selDirty = false; + emit selectionChanged(); + } + emitCursorPositionChanged(); + return true; +} + +/*! + \internal + + An internal function for setting the text of the line control. +*/ +void QLineControl::internalSetText(const QString &txt, int pos, bool edited) +{ + internalDeselect(); + emit resetInputContext(); + QString oldText = m_text; + if (m_maskData) { + m_text = maskString(0, txt, true); + m_text += clearString(m_text.length(), m_maxLength - m_text.length()); + } else { + m_text = txt.isEmpty() ? txt : txt.left(m_maxLength); + } + m_history.clear(); + m_modifiedState = m_undoState = 0; + m_cursor = (pos < 0 || pos > m_text.length()) ? m_text.length() : pos; + m_textDirty = (oldText != m_text); + finishChange(-1, true, edited); +} + + +/*! + \internal + + Adds the given \a command to the undo history + of the line control. Does not apply the command. +*/ +void QLineControl::addCommand(const Command &cmd) +{ + if (m_separator && m_undoState && m_history[m_undoState - 1].type != Separator) { + m_history.resize(m_undoState + 2); + m_history[m_undoState++] = Command(Separator, m_cursor, 0, m_selstart, m_selend); + } else { + m_history.resize(m_undoState + 1); + } + m_separator = false; + m_history[m_undoState++] = cmd; +} + +/*! + \internal + + Inserts the given string \a s into the line + control. + + Also adds the appropriate commands into the undo history. + This function does not call finishChange(), and may leave the text + in an invalid state. +*/ +void QLineControl::internalInsert(const QString &s) +{ + if (hasSelectedText()) + addCommand(Command(SetSelection, m_cursor, 0, m_selstart, m_selend)); + if (m_maskData) { + QString ms = maskString(m_cursor, s); + for (int i = 0; i < (int) ms.length(); ++i) { + addCommand (Command(DeleteSelection, m_cursor + i, m_text.at(m_cursor + i), -1, -1)); + addCommand(Command(Insert, m_cursor + i, ms.at(i), -1, -1)); + } + m_text.replace(m_cursor, ms.length(), ms); + m_cursor += ms.length(); + m_cursor = nextMaskBlank(m_cursor); + m_textDirty = true; + } else { + int remaining = m_maxLength - m_text.length(); + if (remaining != 0) { + m_text.insert(m_cursor, s.left(remaining)); + for (int i = 0; i < (int) s.left(remaining).length(); ++i) + addCommand(Command(Insert, m_cursor++, s.at(i), -1, -1)); + m_textDirty = true; + } + } +} + +/*! + \internal + + deletes a single character from the current text. If \a wasBackspace, + the character prior to the cursor is removed. Otherwise the character + after the cursor is removed. + + Also adds the appropriate commands into the undo history. + This function does not call finishChange(), and may leave the text + in an invalid state. +*/ +void QLineControl::internalDelete(bool wasBackspace) +{ + if (m_cursor < (int) m_text.length()) { + if (hasSelectedText()) + addCommand(Command(SetSelection, m_cursor, 0, m_selstart, m_selend)); + addCommand(Command((CommandType)((m_maskData ? 2 : 0) + (wasBackspace ? Remove : Delete)), + m_cursor, m_text.at(m_cursor), -1, -1)); + if (m_maskData) { + m_text.replace(m_cursor, 1, clearString(m_cursor, 1)); + addCommand(Command(Insert, m_cursor, m_text.at(m_cursor), -1, -1)); + } else { + m_text.remove(m_cursor, 1); + } + m_textDirty = true; + } +} + +/*! + \internal + + removes the currently selected text from the line control. + + Also adds the appropriate commands into the undo history. + This function does not call finishChange(), and may leave the text + in an invalid state. +*/ +void QLineControl::removeSelectedText() +{ + if (m_selstart < m_selend && m_selend <= (int) m_text.length()) { + separate(); + int i ; + addCommand(Command(SetSelection, m_cursor, 0, m_selstart, m_selend)); + if (m_selstart <= m_cursor && m_cursor < m_selend) { + // cursor is within the selection. Split up the commands + // to be able to restore the correct cursor position + for (i = m_cursor; i >= m_selstart; --i) + addCommand (Command(DeleteSelection, i, m_text.at(i), -1, 1)); + for (i = m_selend - 1; i > m_cursor; --i) + addCommand (Command(DeleteSelection, i - m_cursor + m_selstart - 1, m_text.at(i), -1, -1)); + } else { + for (i = m_selend-1; i >= m_selstart; --i) + addCommand (Command(RemoveSelection, i, m_text.at(i), -1, -1)); + } + if (m_maskData) { + m_text.replace(m_selstart, m_selend - m_selstart, clearString(m_selstart, m_selend - m_selstart)); + for (int i = 0; i < m_selend - m_selstart; ++i) + addCommand(Command(Insert, m_selstart + i, m_text.at(m_selstart + i), -1, -1)); + } else { + m_text.remove(m_selstart, m_selend - m_selstart); + } + if (m_cursor > m_selstart) + m_cursor -= qMin(m_cursor, m_selend) - m_selstart; + internalDeselect(); + m_textDirty = true; + } +} + +/*! + \internal + + Parses the input mask specified by \a maskFields to generate + the mask data used to handle input masks. +*/ +void QLineControl::parseInputMask(const QString &maskFields) +{ + int delimiter = maskFields.indexOf(QLatin1Char(';')); + if (maskFields.isEmpty() || delimiter == 0) { + if (m_maskData) { + delete [] m_maskData; + m_maskData = 0; + m_maxLength = 32767; + internalSetText(QString()); + } + return; + } + + if (delimiter == -1) { + m_blank = QLatin1Char(' '); + m_inputMask = maskFields; + } else { + m_inputMask = maskFields.left(delimiter); + m_blank = (delimiter + 1 < maskFields.length()) ? maskFields[delimiter + 1] : QLatin1Char(' '); + } + + // calculate m_maxLength / m_maskData length + m_maxLength = 0; + QChar c = 0; + for (int i=0; i<m_inputMask.length(); i++) { + c = m_inputMask.at(i); + if (i > 0 && m_inputMask.at(i-1) == QLatin1Char('\\')) { + m_maxLength++; + continue; + } + if (c != QLatin1Char('\\') && c != QLatin1Char('!') && + c != QLatin1Char('<') && c != QLatin1Char('>') && + c != QLatin1Char('{') && c != QLatin1Char('}') && + c != QLatin1Char('[') && c != QLatin1Char(']')) + m_maxLength++; + } + + delete [] m_maskData; + m_maskData = new MaskInputData[m_maxLength]; + + MaskInputData::Casemode m = MaskInputData::NoCaseMode; + c = 0; + bool s; + bool escape = false; + int index = 0; + for (int i = 0; i < m_inputMask.length(); i++) { + c = m_inputMask.at(i); + if (escape) { + s = true; + m_maskData[index].maskChar = c; + m_maskData[index].separator = s; + m_maskData[index].caseMode = m; + index++; + escape = false; + } else if (c == QLatin1Char('<')) { + m = MaskInputData::Lower; + } else if (c == QLatin1Char('>')) { + m = MaskInputData::Upper; + } else if (c == QLatin1Char('!')) { + m = MaskInputData::NoCaseMode; + } else if (c != QLatin1Char('{') && c != QLatin1Char('}') && c != QLatin1Char('[') && c != QLatin1Char(']')) { + switch (c.unicode()) { + case 'A': + case 'a': + case 'N': + case 'n': + case 'X': + case 'x': + case '9': + case '0': + case 'D': + case 'd': + case '#': + case 'H': + case 'h': + case 'B': + case 'b': + s = false; + break; + case '\\': + escape = true; + default: + s = true; + break; + } + + if (!escape) { + m_maskData[index].maskChar = c; + m_maskData[index].separator = s; + m_maskData[index].caseMode = m; + index++; + } + } + } + internalSetText(m_text); +} + + +/*! + \internal + + checks if the key is valid compared to the inputMask +*/ +bool QLineControl::isValidInput(QChar key, QChar mask) const +{ + switch (mask.unicode()) { + case 'A': + if (key.isLetter()) + return true; + break; + case 'a': + if (key.isLetter() || key == m_blank) + return true; + break; + case 'N': + if (key.isLetterOrNumber()) + return true; + break; + case 'n': + if (key.isLetterOrNumber() || key == m_blank) + return true; + break; + case 'X': + if (key.isPrint()) + return true; + break; + case 'x': + if (key.isPrint() || key == m_blank) + return true; + break; + case '9': + if (key.isNumber()) + return true; + break; + case '0': + if (key.isNumber() || key == m_blank) + return true; + break; + case 'D': + if (key.isNumber() && key.digitValue() > 0) + return true; + break; + case 'd': + if ((key.isNumber() && key.digitValue() > 0) || key == m_blank) + return true; + break; + case '#': + if (key.isNumber() || key == QLatin1Char('+') || key == QLatin1Char('-') || key == m_blank) + return true; + break; + case 'B': + if (key == QLatin1Char('0') || key == QLatin1Char('1')) + return true; + break; + case 'b': + if (key == QLatin1Char('0') || key == QLatin1Char('1') || key == m_blank) + return true; + break; + case 'H': + if (key.isNumber() || (key >= QLatin1Char('a') && key <= QLatin1Char('f')) || (key >= QLatin1Char('A') && key <= QLatin1Char('F'))) + return true; + break; + case 'h': + if (key.isNumber() || (key >= QLatin1Char('a') && key <= QLatin1Char('f')) || (key >= QLatin1Char('A') && key <= QLatin1Char('F')) || key == m_blank) + return true; + break; + default: + break; + } + return false; +} + +/*! + \internal + + Returns true if the given text \a str is valid for any + validator or input mask set for the line control. + + Otherwise returns false +*/ +bool QLineControl::hasAcceptableInput(const QString &str) const +{ +#ifndef QT_NO_VALIDATOR + QString textCopy = str; + int cursorCopy = m_cursor; + if (m_validator && m_validator->validate(textCopy, cursorCopy) + != QValidator::Acceptable) + return false; +#endif + + if (!m_maskData) + return true; + + if (str.length() != m_maxLength) + return false; + + for (int i=0; i < m_maxLength; ++i) { + if (m_maskData[i].separator) { + if (str.at(i) != m_maskData[i].maskChar) + return false; + } else { + if (!isValidInput(str.at(i), m_maskData[i].maskChar)) + return false; + } + } + return true; +} + +/*! + \internal + + Applies the inputMask on \a str starting from position \a pos in the mask. \a clear + specifies from where characters should be gotten when a separator is met in \a str - true means + that blanks will be used, false that previous input is used. + Calling this when no inputMask is set is undefined. +*/ +QString QLineControl::maskString(uint pos, const QString &str, bool clear) const +{ + if (pos >= (uint)m_maxLength) + return QString::fromLatin1(""); + + QString fill; + fill = clear ? clearString(0, m_maxLength) : m_text; + + int strIndex = 0; + QString s = QString::fromLatin1(""); + int i = pos; + while (i < m_maxLength) { + if (strIndex < str.length()) { + if (m_maskData[i].separator) { + s += m_maskData[i].maskChar; + if (str[(int)strIndex] == m_maskData[i].maskChar) + strIndex++; + ++i; + } else { + if (isValidInput(str[(int)strIndex], m_maskData[i].maskChar)) { + switch (m_maskData[i].caseMode) { + case MaskInputData::Upper: + s += str[(int)strIndex].toUpper(); + break; + case MaskInputData::Lower: + s += str[(int)strIndex].toLower(); + break; + default: + s += str[(int)strIndex]; + } + ++i; + } else { + // search for separator first + int n = findInMask(i, true, true, str[(int)strIndex]); + if (n != -1) { + if (str.length() != 1 || i == 0 || (i > 0 && (!m_maskData[i-1].separator || m_maskData[i-1].maskChar != str[(int)strIndex]))) { + s += fill.mid(i, n-i+1); + i = n + 1; // update i to find + 1 + } + } else { + // search for valid m_blank if not + n = findInMask(i, true, false, str[(int)strIndex]); + if (n != -1) { + s += fill.mid(i, n-i); + switch (m_maskData[n].caseMode) { + case MaskInputData::Upper: + s += str[(int)strIndex].toUpper(); + break; + case MaskInputData::Lower: + s += str[(int)strIndex].toLower(); + break; + default: + s += str[(int)strIndex]; + } + i = n + 1; // updates i to find + 1 + } + } + } + ++strIndex; + } + } else + break; + } + + return s; +} + + + +/*! + \internal + + Returns a "cleared" string with only separators and blank chars. + Calling this when no inputMask is set is undefined. +*/ +QString QLineControl::clearString(uint pos, uint len) const +{ + if (pos >= (uint)m_maxLength) + return QString(); + + QString s; + int end = qMin((uint)m_maxLength, pos + len); + for (int i = pos; i < end; ++i) + if (m_maskData[i].separator) + s += m_maskData[i].maskChar; + else + s += m_blank; + + return s; +} + +/*! + \internal + + Strips blank parts of the input in a QLineControl when an inputMask is set, + separators are still included. Typically "127.0__.0__.1__" becomes "127.0.0.1". +*/ +QString QLineControl::stripString(const QString &str) const +{ + if (!m_maskData) + return str; + + QString s; + int end = qMin(m_maxLength, (int)str.length()); + for (int i = 0; i < end; ++i) + if (m_maskData[i].separator) + s += m_maskData[i].maskChar; + else + if (str[i] != m_blank) + s += str[i]; + + return s; +} + +/*! + \internal + searches forward/backward in m_maskData for either a separator or a m_blank +*/ +int QLineControl::findInMask(int pos, bool forward, bool findSeparator, QChar searchChar) const +{ + if (pos >= m_maxLength || pos < 0) + return -1; + + int end = forward ? m_maxLength : -1; + int step = forward ? 1 : -1; + int i = pos; + + while (i != end) { + if (findSeparator) { + if (m_maskData[i].separator && m_maskData[i].maskChar == searchChar) + return i; + } else { + if (!m_maskData[i].separator) { + if (searchChar.isNull()) + return i; + else if (isValidInput(searchChar, m_maskData[i].maskChar)) + return i; + } + } + i += step; + } + return -1; +} + +void QLineControl::internalUndo(int until) +{ + if (!isUndoAvailable()) + return; + internalDeselect(); + while (m_undoState && m_undoState > until) { + Command& cmd = m_history[--m_undoState]; + switch (cmd.type) { + case Insert: + m_text.remove(cmd.pos, 1); + m_cursor = cmd.pos; + break; + case SetSelection: + m_selstart = cmd.selStart; + m_selend = cmd.selEnd; + m_cursor = cmd.pos; + break; + case Remove: + case RemoveSelection: + m_text.insert(cmd.pos, cmd.uc); + m_cursor = cmd.pos + 1; + break; + case Delete: + case DeleteSelection: + m_text.insert(cmd.pos, cmd.uc); + m_cursor = cmd.pos; + break; + case Separator: + continue; + } + if (until < 0 && m_undoState) { + Command& next = m_history[m_undoState-1]; + if (next.type != cmd.type && next.type < RemoveSelection + && (cmd.type < RemoveSelection || next.type == Separator)) + break; + } + } + m_textDirty = true; + emitCursorPositionChanged(); +} + +void QLineControl::internalRedo() +{ + if (!isRedoAvailable()) + return; + internalDeselect(); + while (m_undoState < (int)m_history.size()) { + Command& cmd = m_history[m_undoState++]; + switch (cmd.type) { + case Insert: + m_text.insert(cmd.pos, cmd.uc); + m_cursor = cmd.pos + 1; + break; + case SetSelection: + m_selstart = cmd.selStart; + m_selend = cmd.selEnd; + m_cursor = cmd.pos; + break; + case Remove: + case Delete: + case RemoveSelection: + case DeleteSelection: + m_text.remove(cmd.pos, 1); + m_selstart = cmd.selStart; + m_selend = cmd.selEnd; + m_cursor = cmd.pos; + break; + case Separator: + m_selstart = cmd.selStart; + m_selend = cmd.selEnd; + m_cursor = cmd.pos; + break; + } + if (m_undoState < (int)m_history.size()) { + Command& next = m_history[m_undoState]; + if (next.type != cmd.type && cmd.type < RemoveSelection && next.type != Separator + && (next.type < RemoveSelection || cmd.type == Separator)) + break; + } + } + m_textDirty = true; + emitCursorPositionChanged(); +} + +/*! + \internal + + If the current cursor position differs from the last emited cursor + position, emits cursorPositionChanged(). +*/ +void QLineControl::emitCursorPositionChanged() +{ + if (m_cursor != m_lastCursorPos) { + const int oldLast = m_lastCursorPos; + m_lastCursorPos = m_cursor; + cursorPositionChanged(oldLast, m_cursor); + } +} + +#ifndef QT_NO_COMPLETER +// iterating forward(dir=1)/backward(dir=-1) from the +// current row based. dir=0 indicates a new completion prefix was set. +bool QLineControl::advanceToEnabledItem(int dir) +{ + int start = m_completer->currentRow(); + if (start == -1) + return false; + int i = start + dir; + if (dir == 0) dir = 1; + do { + if (!m_completer->setCurrentRow(i)) { + if (!m_completer->wrapAround()) + break; + i = i > 0 ? 0 : m_completer->completionCount() - 1; + } else { + QModelIndex currentIndex = m_completer->currentIndex(); + if (m_completer->completionModel()->flags(currentIndex) & Qt::ItemIsEnabled) + return true; + i += dir; + } + } while (i != start); + + m_completer->setCurrentRow(start); // restore + return false; +} + +void QLineControl::complete(int key) +{ + if (!m_completer || isReadOnly() || echoMode() != QLineEdit::Normal) + return; + + QString text = this->text(); + if (m_completer->completionMode() == QCompleter::InlineCompletion) { + if (key == Qt::Key_Backspace) + return; + int n = 0; + if (key == Qt::Key_Up || key == Qt::Key_Down) { + if (textAfterSelection().length()) + return; + QString prefix = hasSelectedText() ? textBeforeSelection() + : text; + if (text.compare(m_completer->currentCompletion(), m_completer->caseSensitivity()) != 0 + || prefix.compare(m_completer->completionPrefix(), m_completer->caseSensitivity()) != 0) { + m_completer->setCompletionPrefix(prefix); + } else { + n = (key == Qt::Key_Up) ? -1 : +1; + } + } else { + m_completer->setCompletionPrefix(text); + } + if (!advanceToEnabledItem(n)) + return; + } else { +#ifndef QT_KEYPAD_NAVIGATION + if (text.isEmpty()) { + m_completer->popup()->hide(); + return; + } +#endif + m_completer->setCompletionPrefix(text); + } + + m_completer->complete(); +} +#endif + +void QLineControl::setCursorBlinkPeriod(int msec) +{ + if (msec == m_blinkPeriod) + return; + if (m_blinkTimer) { + killTimer(m_blinkTimer); + } + if (msec) { + m_blinkTimer = startTimer(msec / 2); + m_blinkStatus = 1; + } else { + m_blinkTimer = 0; + if (m_blinkStatus == 0) + emit updateNeeded(inputMask().isEmpty() ? cursorRect() : QRect()); + } + m_blinkPeriod = msec; +} + +void QLineControl::timerEvent(QTimerEvent *event) +{ + if (event->timerId() == m_blinkTimer) { + m_blinkStatus = !m_blinkStatus; + emit updateNeeded(inputMask().isEmpty() ? cursorRect() : QRect()); + } else if (event->timerId() == m_deleteAllTimer) { + killTimer(m_deleteAllTimer); + m_deleteAllTimer = 0; + clear(); + } else if (event->timerId() == m_tripleClickTimer) { + killTimer(m_tripleClickTimer); + m_tripleClickTimer = 0; + } +} + +bool QLineControl::processEvent(QEvent* ev) +{ +#ifdef QT_KEYPAD_NAVIGATION + if (QApplication::keypadNavigationEnabled()) { + if ((ev->type() == QEvent::KeyPress) || (ev->type() == QEvent::KeyRelease)) { + QKeyEvent *ke = (QKeyEvent *)ev; + if (ke->key() == Qt::Key_Back) { + if (ke->isAutoRepeat()) { + // Swallow it. We don't want back keys running amok. + ke->accept(); + return true; + } + if ((ev->type() == QEvent::KeyRelease) + && !isReadOnly() + && deleteAllTimer) { + killTimer(m_deleteAllTimer); + m_deleteAllTimer = 0; + backspace(); + ke->accept(); + return true; + } + } + } + } +#endif + switch(ev->type()){ +#ifndef QT_NO_GRAPHICSVIEW + case QEvent::GraphicsSceneMouseMove: + case QEvent::GraphicsSceneMouseRelease: + case QEvent::GraphicsSceneMousePress:{ + QGraphicsSceneMouseEvent *gvEv = static_cast<QGraphicsSceneMouseEvent*>(ev); + QMouseEvent* mouse = new QMouseEvent(ev->type(), + gvEv->pos().toPoint(), gvEv->button(), gvEv->buttons(), gvEv->modifiers()); + processMouseEvent(mouse); break; + } +#endif + case QEvent::MouseButtonPress: + case QEvent::MouseButtonRelease: + case QEvent::MouseButtonDblClick: + case QEvent::MouseMove: + processMouseEvent(static_cast<QMouseEvent*>(ev)); break; + case QEvent::KeyPress: + case QEvent::KeyRelease: + processKeyEvent(static_cast<QKeyEvent*>(ev)); break; + case QEvent::InputMethod: + processInputMethodEvent(static_cast<QInputMethodEvent*>(ev)); break; +#ifndef QT_NO_SHORTCUT + case QEvent::ShortcutOverride:{ + QKeyEvent* ke = static_cast<QKeyEvent*>(ev); + if (ke == QKeySequence::Copy + || ke == QKeySequence::Paste + || ke == QKeySequence::Cut + || ke == QKeySequence::Redo + || ke == QKeySequence::Undo + || ke == QKeySequence::MoveToNextWord + || ke == QKeySequence::MoveToPreviousWord + || ke == QKeySequence::MoveToStartOfDocument + || ke == QKeySequence::MoveToEndOfDocument + || ke == QKeySequence::SelectNextWord + || ke == QKeySequence::SelectPreviousWord + || ke == QKeySequence::SelectStartOfLine + || ke == QKeySequence::SelectEndOfLine + || ke == QKeySequence::SelectStartOfBlock + || ke == QKeySequence::SelectEndOfBlock + || ke == QKeySequence::SelectStartOfDocument + || ke == QKeySequence::SelectAll + || ke == QKeySequence::SelectEndOfDocument) { + ke->accept(); + } else if (ke->modifiers() == Qt::NoModifier || ke->modifiers() == Qt::ShiftModifier + || ke->modifiers() == Qt::KeypadModifier) { + if (ke->key() < Qt::Key_Escape) { + ke->accept(); + } else { + switch (ke->key()) { + case Qt::Key_Delete: + case Qt::Key_Home: + case Qt::Key_End: + case Qt::Key_Backspace: + case Qt::Key_Left: + case Qt::Key_Right: + ke->accept(); + default: + break; + } + } + } + } +#endif + default: + return false; + } + return true; +} + +void QLineControl::processMouseEvent(QMouseEvent* ev) +{ + + switch (ev->type()) { + case QEvent::GraphicsSceneMousePress: + case QEvent::MouseButtonPress:{ + if (m_tripleClickTimer + && (ev->pos() - m_tripleClick).manhattanLength() + < QApplication::startDragDistance()) { + selectAll(); + return; + } + if (ev->button() == Qt::RightButton) + return; + + bool mark = ev->modifiers() & Qt::ShiftModifier; + int cursor = xToPos(ev->pos().x()); + moveCursor(cursor, mark); + break; + } + case QEvent::MouseButtonDblClick: + if (ev->button() == Qt::LeftButton) { + selectWordAtPos(xToPos(ev->pos().x())); + if (m_tripleClickTimer) + killTimer(m_tripleClickTimer); + m_tripleClickTimer = startTimer(QApplication::doubleClickInterval()); + m_tripleClick = ev->pos(); + } + break; + case QEvent::GraphicsSceneMouseRelease: + case QEvent::MouseButtonRelease: +#ifndef QT_NO_CLIPBOARD + if (QApplication::clipboard()->supportsSelection()) { + if (ev->button() == Qt::LeftButton) { + copy(QClipboard::Selection); + } else if (!isReadOnly() && ev->button() == Qt::MidButton) { + deselect(); + insert(QApplication::clipboard()->text(QClipboard::Selection)); + } + } +#endif + break; + case QEvent::GraphicsSceneMouseMove: + case QEvent::MouseMove: + if (ev->buttons() & Qt::LeftButton) { + moveCursor(xToPos(ev->pos().x()), true); + } + break; + default: + break; + } +} + +void QLineControl::processKeyEvent(QKeyEvent* event) +{ + bool inlineCompletionAccepted = false; + +#ifndef QT_NO_COMPLETER + if (m_completer) { + QCompleter::CompletionMode completionMode = m_completer->completionMode(); + if ((completionMode == QCompleter::PopupCompletion + || completionMode == QCompleter::UnfilteredPopupCompletion) + && m_completer->popup() + && m_completer->popup()->isVisible()) { + // The following keys are forwarded by the completer to the widget + // Ignoring the events lets the completer provide suitable default behavior + switch (event->key()) { + case Qt::Key_Escape: + event->ignore(); + return; + case Qt::Key_Enter: + case Qt::Key_Return: + case Qt::Key_F4: +#ifdef QT_KEYPAD_NAVIGATION + case Qt::Key_Select: + if (!QApplication::keypadNavigationEnabled()) + break; +#endif + m_completer->popup()->hide(); // just hide. will end up propagating to parent + default: + break; // normal key processing + } + } else if (completionMode == QCompleter::InlineCompletion) { + switch (event->key()) { + case Qt::Key_Enter: + case Qt::Key_Return: + case Qt::Key_F4: +#ifdef QT_KEYPAD_NAVIGATION + case Qt::Key_Select: + if (!QApplication::keypadNavigationEnabled()) + break; +#endif + if (!m_completer->currentCompletion().isEmpty() && hasSelectedText() + && textAfterSelection().isEmpty()) { + setText(m_completer->currentCompletion()); + inlineCompletionAccepted = true; + } + default: + break; // normal key processing + } + } + } +#endif // QT_NO_COMPLETER + + if (echoMode() == QLineEdit::PasswordEchoOnEdit + && !passwordEchoEditing() + && !isReadOnly() + && !event->text().isEmpty() +#ifdef QT_KEYPAD_NAVIGATION + && event->key() != Qt::Key_Select + && event->key() != Qt::Key_Up + && event->key() != Qt::Key_Down + && event->key() != Qt::Key_Back +#endif + && !(event->modifiers() & Qt::ControlModifier)) { + // Clear the edit and reset to normal echo mode while editing; the + // echo mode switches back when the edit loses focus + // ### resets current content. dubious code; you can + // navigate with keys up, down, back, and select(?), but if you press + // "left" or "right" it clears? + updatePasswordEchoEditing(true); + clear(); + } + + if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) { + if (hasAcceptableInput() || fixup()) { + emit accepted(); + emit editingFinished(); + } + if (inlineCompletionAccepted) + event->accept(); + else + event->ignore(); + return; + } + bool unknown = false; + + if (false) { + } +#ifndef QT_NO_SHORTCUT + else if (event == QKeySequence::Undo) { + if (!isReadOnly()) + undo(); + } + else if (event == QKeySequence::Redo) { + if (!isReadOnly()) + redo(); + } + else if (event == QKeySequence::SelectAll) { + selectAll(); + } +#ifndef QT_NO_CLIPBOARD + else if (event == QKeySequence::Copy) { + copy(); + } + else if (event == QKeySequence::Paste) { + if (!isReadOnly()) + paste(); + } + else if (event == QKeySequence::Cut) { + if (!isReadOnly()) { + copy(); + del(); + } + } + else if (event == QKeySequence::DeleteEndOfLine) { + if (!isReadOnly()) { + setSelection(cursor(), end()); + copy(); + del(); + } + } +#endif //QT_NO_CLIPBOARD + else if (event == QKeySequence::MoveToStartOfLine) { + home(0); + } + else if (event == QKeySequence::MoveToEndOfLine) { + end(0); + } + else if (event == QKeySequence::SelectStartOfLine) { + home(1); + } + else if (event == QKeySequence::SelectEndOfLine) { + end(1); + } + else if (event == QKeySequence::MoveToNextChar) { +#if !defined(Q_WS_WIN) || defined(QT_NO_COMPLETER) + if (hasSelectedText()) { +#else + if (hasSelectedText() && m_completer + && m_completer->completionMode() == QCompleter::InlineCompletion) { +#endif + moveCursor(selectionEnd(), false); + } else { + cursorForward(0, layoutDirection() == Qt::LeftToRight ? 1 : -1); + } + } + else if (event == QKeySequence::SelectNextChar) { + cursorForward(1, layoutDirection() == Qt::LeftToRight ? 1 : -1); + } + else if (event == QKeySequence::MoveToPreviousChar) { +#if !defined(Q_WS_WIN) || defined(QT_NO_COMPLETER) + if (hasSelectedText()) { +#else + if (hasSelectedText() && m_completer + && m_completer->completionMode() == QCompleter::InlineCompletion) { +#endif + moveCursor(selectionStart(), false); + } else { + cursorForward(0, layoutDirection() == Qt::LeftToRight ? -1 : 1); + } + } + else if (event == QKeySequence::SelectPreviousChar) { + cursorForward(1, layoutDirection() == Qt::LeftToRight ? -1 : 1); + } + else if (event == QKeySequence::MoveToNextWord) { + if (echoMode() == QLineEdit::Normal) + layoutDirection() == Qt::LeftToRight ? cursorWordForward(0) : cursorWordBackward(0); + else + layoutDirection() == Qt::LeftToRight ? end(0) : home(0); + } + else if (event == QKeySequence::MoveToPreviousWord) { + if (echoMode() == QLineEdit::Normal) + layoutDirection() == Qt::LeftToRight ? cursorWordBackward(0) : cursorWordForward(0); + else if (!isReadOnly()) { + layoutDirection() == Qt::LeftToRight ? home(0) : end(0); + } + } + else if (event == QKeySequence::SelectNextWord) { + if (echoMode() == QLineEdit::Normal) + layoutDirection() == Qt::LeftToRight ? cursorWordForward(1) : cursorWordBackward(1); + else + layoutDirection() == Qt::LeftToRight ? end(1) : home(1); + } + else if (event == QKeySequence::SelectPreviousWord) { + if (echoMode() == QLineEdit::Normal) + layoutDirection() == Qt::LeftToRight ? cursorWordBackward(1) : cursorWordForward(1); + else + layoutDirection() == Qt::LeftToRight ? home(1) : end(1); + } + else if (event == QKeySequence::Delete) { + if (!isReadOnly()) + del(); + } + else if (event == QKeySequence::DeleteEndOfWord) { + if (!isReadOnly()) { + cursorWordForward(true); + del(); + } + } + else if (event == QKeySequence::DeleteStartOfWord) { + if (!isReadOnly()) { + cursorWordBackward(true); + del(); + } + } +#endif // QT_NO_SHORTCUT + else { +#ifdef Q_WS_MAC + if (event->key() == Qt::Key_Up || event->key() == Qt::Key_Down) { + Qt::KeyboardModifiers myModifiers = (event->modifiers() & ~Qt::KeypadModifier); + if (myModifiers & Qt::ShiftModifier) { + if (myModifiers == (Qt::ControlModifier|Qt::ShiftModifier) + || myModifiers == (Qt::AltModifier|Qt::ShiftModifier) + || myModifiers == Qt::ShiftModifier) { + + event->key() == Qt::Key_Up ? home(1) : end(1); + } + } else { + if ((myModifiers == Qt::ControlModifier + || myModifiers == Qt::AltModifier + || myModifiers == Qt::NoModifier)) { + event->key() == Qt::Key_Up ? home(0) : end(0); + } + } + } +#endif + if (event->modifiers() & Qt::ControlModifier) { + switch (event->key()) { + case Qt::Key_Backspace: + if (!isReadOnly()) { + cursorWordBackward(true); + del(); + } + break; +#ifndef QT_NO_COMPLETER + case Qt::Key_Up: + case Qt::Key_Down: + complete(event->key()); + break; +#endif +#if defined(Q_WS_X11) + case Qt::Key_E: + end(0); + break; + + case Qt::Key_U: + if (!isReadOnly()) { + setSelection(0, text().size()); +#ifndef QT_NO_CLIPBOARD + copy(); +#endif + del(); + } + break; +#endif + default: + unknown = true; + } + } else { // ### check for *no* modifier + switch (event->key()) { + case Qt::Key_Backspace: + if (!isReadOnly()) { + backspace(); +#ifndef QT_NO_COMPLETER + complete(Qt::Key_Backspace); +#endif + } + break; +#ifdef QT_KEYPAD_NAVIGATION + case Qt::Key_Back: + if (QApplication::keypadNavigationEnabled() && !event->isAutoRepeat() + && !isReadOnly()) { + if (text().length() == 0) { + setText(m_cancelText); + + if (passwordEchoEditing) + updatePasswordEchoEditing(false); + + setEditFocus(false); + } else if (!deleteAllTimer) { + deleteAllTimer = startTimer(750); + } + } else { + unknown = true; + } + break; +#endif + + default: + unknown = true; + } + } + } + + if (event->key() == Qt::Key_Direction_L || event->key() == Qt::Key_Direction_R) { + setLayoutDirection((event->key() == Qt::Key_Direction_L) ? Qt::LeftToRight : Qt::RightToLeft); + unknown = false; + } + + if (unknown && !isReadOnly()) { + QString t = event->text(); + if (!t.isEmpty() && t.at(0).isPrint()) { + insert(t); +#ifndef QT_NO_COMPLETER + complete(event->key()); +#endif + event->accept(); + return; + } + } + + if (unknown) + event->ignore(); + else + event->accept(); +} + + +QT_END_NAMESPACE + +#endif diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h new file mode 100644 index 0000000000..9cad857c4c --- /dev/null +++ b/src/gui/widgets/qlinecontrol_p.h @@ -0,0 +1,741 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QLINECONTROL_P_H +#define QLINECONTROL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "QtCore/qglobal.h" + +#ifndef QT_NO_LINEEDIT +#include "private/qwidget_p.h" +#include "QtGui/qlineedit.h" +#include "QtGui/qtextlayout.h" +#include "QtGui/qstyleoption.h" +#include "QtCore/qpointer.h" +#include "QtGui/qlineedit.h" +#include "QtGui/qclipboard.h" +#include "QtCore/qpoint.h" +#include "QtGui/qcompleter.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + +class Q_GUI_EXPORT QLineControl : public QObject +{ + Q_OBJECT + +public: + QLineControl(const QString &txt = QString()) + : m_cursor(0), m_preeditCursor(0), m_layoutDirection(Qt::LeftToRight), + m_hideCursor(false), m_separator(0), m_readOnly(0), + m_dragEnabled(0), m_echoMode(0), m_textDirty(0), m_selDirty(0), + m_validInput(1), m_blinkPeriod(0), m_blinkTimer(0), m_deleteAllTimer(0), + m_ascent(0), m_maxLength(32767), m_lastCursorPos(-1), + m_tripleClickTimer(0), m_maskData(0), m_modifiedState(0), m_undoState(0), + m_selstart(0), m_selend(0), m_passwordEchoEditing(false) + { + init(txt); + } + + ~QLineControl() + { + delete [] m_maskData; + } + + int nextMaskBlank(int pos); + int prevMaskBlank(int pos); + + bool isUndoAvailable() const; + bool isRedoAvailable() const; + void clearUndo(); + bool isModified() const; + void setModified(bool modified); + + bool allSelected() const; + bool hasSelectedText() const; + + int width() const; + int height() const; + int ascent() const; + + void setSelection(int start, int length); + + QString selectedText() const; + QString textBeforeSelection() const; + QString textAfterSelection() const; + + int selectionStart() const; + int selectionEnd() const; + bool inSelection(int x) const; + + void removeSelection(); + + int start() const; + int end() const; + +#ifndef QT_NO_CLIPBOARD + void copy(QClipboard::Mode mode = QClipboard::Clipboard) const; + void paste(); +#endif + + int cursor() const; + int preeditCursor() const; + + int cursorWidth() const; + void setCursorWidth(int value); + + void moveCursor(int pos, bool mark = false); + void cursorForward(bool mark, int steps); + void cursorWordForward(bool mark); + void cursorWordBackward(bool mark); + void home(bool mark); + void end(bool mark); + + int xToPos(int x, QTextLine::CursorPosition = QTextLine::CursorBetweenCharacters) const; + QRect cursorRect() const; + + qreal cursorToX(int cursor) const; + qreal cursorToX() const; + + bool isReadOnly() const; + void setReadOnly(bool enable); + + QString text() const; + void setText(const QString &txt); + + QString displayText() const; + + void backspace(); + void del(); + void deselect(); + void selectAll(); + void insert(const QString &); + void clear(); + void undo(); + void redo(); + void selectWordAtPos(int); + + uint echoMode() const; + void setEchoMode(uint mode); + + void setMaxLength(int maxLength); + int maxLength() const; + + const QValidator *validator() const; + void setValidator(const QValidator *); + +#ifndef QT_NO_COMPLETER + QCompleter *completer() const; + void setCompleter(const QCompleter*); + void complete(int key); +#endif + + void setCursorPosition(int pos); + int cursorPosition() const; + + bool hasAcceptableInput() const; + bool fixup(); + + QString inputMask() const; + void setInputMask(const QString &mask); + + // input methods +#ifndef QT_NO_IM + bool composeMode() const; + void setPreeditArea(int cursor, const QString &text); +#endif + + QString preeditAreaText() const; + + void updatePasswordEchoEditing(bool editing); + bool passwordEchoEditing() const; + + QChar passwordCharacter() const; + void setPasswordCharacter(const QChar &character); + + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection(Qt::LayoutDirection direction); + void setFont(const QFont &font); + + void processInputMethodEvent(QInputMethodEvent *event); + void processMouseEvent(QMouseEvent* ev); + void processKeyEvent(QKeyEvent* ev); + + int cursorBlinkPeriod() const; + void setCursorBlinkPeriod(int msec); + + QString cancelText() const; + void setCancelText(const QString &text); + + enum DrawFlags { + DrawText = 0x01, + DrawSelections = 0x02, + DrawCursor = 0x04, + DrawAll = DrawText | DrawSelections | DrawCursor + }; + void draw(QPainter *, const QPoint &, const QRect &, int flags = DrawAll); + + bool processEvent(QEvent *ev); + +private: + void init(const QString &txt); + void removeSelectedText(); + void internalSetText(const QString &txt, int pos = -1, bool edited = true); + void updateDisplayText(); + + void internalInsert(const QString &s); + void internalDelete(bool wasBackspace = false); + void internalRemove(int pos); + + inline void internalDeselect() + { + m_selDirty |= (m_selend > m_selstart); + m_selstart = m_selend = 0; + } + + void internalUndo(int until = -1); + void internalRedo(); + + QString m_text; + QPalette m_palette; + int m_cursor; + int m_preeditCursor; + int m_cursorWidth; + Qt::LayoutDirection m_layoutDirection; + uint m_hideCursor : 1; // used to hide the m_cursor inside preedit areas + uint m_separator : 1; + uint m_readOnly : 1; + uint m_dragEnabled : 1; + uint m_echoMode : 2; + uint m_textDirty : 1; + uint m_selDirty : 1; + uint m_validInput : 1; + int m_blinkPeriod; // 0 for non-blinking cursor + int m_blinkTimer; + int m_deleteAllTimer; + int m_blinkStatus; + int m_ascent; + int m_maxLength; + int m_lastCursorPos; + QList<int> m_transactions; + QPoint m_tripleClick; + int m_tripleClickTimer; + QString m_cancelText; + + void emitCursorPositionChanged(); + + bool finishChange(int validateFromState = -1, bool update = false, bool edited = true); + + QPointer<QValidator> m_validator; + QPointer<QCompleter> m_completer; +#ifndef QT_NO_COMPLETER + bool advanceToEnabledItem(int dir); +#endif + + struct MaskInputData { + enum Casemode { NoCaseMode, Upper, Lower }; + QChar maskChar; // either the separator char or the inputmask + bool separator; + Casemode caseMode; + }; + QString m_inputMask; + QChar m_blank; + MaskInputData *m_maskData; + + // undo/redo handling + enum CommandType { Separator, Insert, Remove, Delete, RemoveSelection, DeleteSelection, SetSelection }; + struct Command { + inline Command() {} + inline Command(CommandType t, int p, QChar c, int ss, int se) : type(t),uc(c),pos(p),selStart(ss),selEnd(se) {} + uint type : 4; + QChar uc; + int pos, selStart, selEnd; + }; + int m_modifiedState; + int m_undoState; + QVector<Command> m_history; + void addCommand(const Command& cmd); + + inline void separate() { m_separator = true; } + + // selection + int m_selstart; + int m_selend; + + // masking + void parseInputMask(const QString &maskFields); + bool isValidInput(QChar key, QChar mask) const; + bool hasAcceptableInput(const QString &text) const; + QString maskString(uint pos, const QString &str, bool clear = false) const; + QString clearString(uint pos, uint len) const; + QString stripString(const QString &str) const; + int findInMask(int pos, bool forward, bool findSeparator, QChar searchChar = QChar()) const; + + // complex text layout + QTextLayout m_textLayout; + + bool m_passwordEchoEditing; + QChar m_passwordCharacter; + +Q_SIGNALS: + void cursorPositionChanged(int, int); + void selectionChanged(); + + void displayTextChanged(const QString &); + void textChanged(const QString &); + void textEdited(const QString &); + + void resetInputContext(); + + void accepted(); + void editingFinished(); + void updateNeeded(const QRect &); + +protected: + virtual void timerEvent(QTimerEvent *event); + +private slots: + void _q_clipboardChanged(); + void _q_deleteSelected(); + +}; + +inline int QLineControl::nextMaskBlank(int pos) +{ + int c = findInMask(pos, true, false); + m_separator |= (c != pos); + return (c != -1 ? c : m_maxLength); +} + +inline int QLineControl::prevMaskBlank(int pos) +{ + int c = findInMask(pos, false, false); + m_separator |= (c != pos); + return (c != -1 ? c : 0); +} + +inline bool QLineControl::isUndoAvailable() const +{ + return !m_readOnly && m_undoState; +} + +inline bool QLineControl::isRedoAvailable() const +{ + return !m_readOnly && m_undoState < (int)m_history.size(); +} + +inline void QLineControl::clearUndo() +{ + m_history.clear(); + m_modifiedState = m_undoState = 0; +} + +inline bool QLineControl::isModified() const +{ + return m_modifiedState != m_undoState; +} + +inline void QLineControl::setModified(bool modified) +{ + m_modifiedState = modified ? -1 : m_undoState; +} + +inline bool QLineControl::allSelected() const +{ + return !m_text.isEmpty() && m_selstart == 0 && m_selend == (int)m_text.length(); +} + +inline bool QLineControl::hasSelectedText() const +{ + return !m_text.isEmpty() && m_selend > m_selstart; +} + +inline int QLineControl::width() const +{ + return qRound(m_textLayout.lineAt(0).width()) + 1; +} + +inline int QLineControl::height() const +{ + return qRound(m_textLayout.lineAt(0).height()) + 1; +} + +inline int QLineControl::ascent() const +{ + return m_ascent; +} + +inline QString QLineControl::selectedText() const +{ + if (hasSelectedText()) + return m_text.mid(m_selstart, m_selend - m_selstart); + return QString(); +} + +inline QString QLineControl::textBeforeSelection() const +{ + if (hasSelectedText()) + return m_text.left(m_selstart); + return QString(); +} + +inline QString QLineControl::textAfterSelection() const +{ + if (hasSelectedText()) + return m_text.mid(m_selend); + return QString(); +} + +inline int QLineControl::selectionStart() const +{ + return hasSelectedText() ? m_selstart : -1; +} + +inline int QLineControl::selectionEnd() const +{ + return hasSelectedText() ? m_selend : -1; +} + +inline int QLineControl::start() const +{ + return 0; +} + +inline int QLineControl::end() const +{ + return m_text.length(); +} + +inline void QLineControl::removeSelection() +{ + int priorState = m_undoState; + removeSelectedText(); + finishChange(priorState); +} + +inline bool QLineControl::inSelection(int x) const +{ + if (m_selstart >= m_selend) + return false; + int pos = xToPos(x, QTextLine::CursorOnCharacter); + return pos >= m_selstart && pos < m_selend; +} + +inline int QLineControl::cursor() const +{ + return m_cursor; +} + +inline int QLineControl::preeditCursor() const +{ + return m_preeditCursor; +} + +inline int QLineControl::cursorWidth() const +{ + return m_cursorWidth; +} + +inline void QLineControl::setCursorWidth(int value) +{ + m_cursorWidth = value; +} + +inline void QLineControl::cursorForward(bool mark, int steps) +{ + int c = m_cursor; + if (steps > 0) { + while (steps--) + c = m_textLayout.nextCursorPosition(c); + } else if (steps < 0) { + while (steps++) + c = m_textLayout.previousCursorPosition(c); + } + moveCursor(c, mark); +} + +inline void QLineControl::cursorWordForward(bool mark) +{ + moveCursor(m_textLayout.nextCursorPosition(m_cursor, QTextLayout::SkipWords), mark); +} + +inline void QLineControl::home(bool mark) +{ + moveCursor(0, mark); +} + +inline void QLineControl::end(bool mark) +{ + moveCursor(text().length(), mark); +} + +inline void QLineControl::cursorWordBackward(bool mark) +{ + moveCursor(m_textLayout.previousCursorPosition(m_cursor, QTextLayout::SkipWords), mark); +} + +inline qreal QLineControl::cursorToX(int cursor) const +{ + return m_textLayout.lineAt(0).cursorToX(cursor); +} + +inline qreal QLineControl::cursorToX() const +{ + return cursorToX(m_cursor); +} + +inline bool QLineControl::isReadOnly() const +{ + return m_readOnly; +} + +inline void QLineControl::setReadOnly(bool enable) +{ + m_readOnly = enable; +} + +inline QString QLineControl::text() const +{ + QString res = m_maskData ? stripString(m_text) : m_text; + return (res.isNull() ? QString::fromLatin1("") : res); +} + +inline void QLineControl::setText(const QString &txt) +{ + internalSetText(txt, -1, false); +} + +inline QString QLineControl::displayText() const +{ + return m_textLayout.text(); +} + +inline void QLineControl::deselect() +{ + internalDeselect(); + finishChange(); +} + +inline void QLineControl::selectAll() +{ + m_selstart = m_selend = m_cursor = 0; + moveCursor(m_text.length(), true); +} + +inline void QLineControl::undo() +{ + internalUndo(); + finishChange(-1, true); +} + +inline void QLineControl::redo() +{ + internalRedo(); + finishChange(); +} + +inline uint QLineControl::echoMode() const +{ + return m_echoMode; +} + +inline void QLineControl::setEchoMode(uint mode) +{ + m_echoMode = mode; + m_passwordEchoEditing = false; + updateDisplayText(); +} + +inline void QLineControl::setMaxLength(int maxLength) +{ + if (m_maskData) + return; + m_maxLength = maxLength; + setText(m_text); +} + +inline int QLineControl::maxLength() const +{ + return m_maxLength; +} + +inline const QValidator *QLineControl::validator() const +{ + return m_validator; +} + +inline void QLineControl::setValidator(const QValidator *v) +{ + m_validator = const_cast<QValidator*>(v); +} + +#ifndef QT_NO_COMPLETER +inline QCompleter *QLineControl::completer() const +{ + return m_completer; +} + +/* Note that you must set the widget for the completer seperately */ +inline void QLineControl::setCompleter(const QCompleter* c) +{ + m_completer = const_cast<QCompleter*>(c); +} +#endif + +inline void QLineControl::setCursorPosition(int pos) +{ + if (pos < 0) + pos = 0; + if (pos < m_text.length()) + moveCursor(pos); +} + +inline int QLineControl::cursorPosition() const +{ + return m_cursor; +} + +inline bool QLineControl::hasAcceptableInput() const +{ + return hasAcceptableInput(m_text); +} + +inline QString QLineControl::inputMask() const +{ + return m_maskData ? m_inputMask + QLatin1Char(';') + m_blank : QString(); +} + +inline void QLineControl::setInputMask(const QString &mask) +{ + parseInputMask(mask); + if (m_maskData) + moveCursor(nextMaskBlank(0)); +} + +// input methods +#ifndef QT_NO_IM +inline bool QLineControl::composeMode() const +{ + return !m_textLayout.preeditAreaText().isEmpty(); +} + +inline void QLineControl::setPreeditArea(int cursor, const QString &text) +{ + m_textLayout.setPreeditArea(cursor, text); +} +#endif + +inline QString QLineControl::preeditAreaText() const +{ + return m_textLayout.preeditAreaText(); +} + +inline bool QLineControl::passwordEchoEditing() const +{ + return m_passwordEchoEditing; +} + +inline QChar QLineControl::passwordCharacter() const +{ + return m_passwordCharacter; +} + +inline void QLineControl::setPasswordCharacter(const QChar &character) +{ + m_passwordCharacter = character; + updateDisplayText(); +} + +inline Qt::LayoutDirection QLineControl::layoutDirection() const +{ + return m_layoutDirection; +} + +inline void QLineControl::setLayoutDirection(Qt::LayoutDirection direction) +{ + if (direction != m_layoutDirection) { + m_layoutDirection = direction; + updateDisplayText(); + } +} + +inline void QLineControl::setFont(const QFont &font) +{ + m_textLayout.setFont(font); + updateDisplayText(); +} + +inline int QLineControl::cursorBlinkPeriod() const +{ + return m_blinkPeriod; +} + +inline QString QLineControl::cancelText() const +{ + return m_cancelText; +} + +inline void QLineControl::setCancelText(const QString &text) +{ + m_cancelText = text; +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QT_NO_LINEEDIT + +#endif // QLINECONTROL_P_H diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 4d69a9ffc2..01d4890587 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -86,20 +86,12 @@ #include <limits.h> -#define verticalMargin 1 -#define horizontalMargin 2 - QT_BEGIN_NAMESPACE #ifdef Q_WS_MAC extern void qt_mac_secure_keyboard(bool); //qapplication_mac.cpp #endif -static inline bool shouldEnableInputMethod(QLineEdit *lineedit) -{ - return !lineedit->isReadOnly(); -} - /*! Initialize \a option with the values from this QLineEdit. This method is useful for subclasses when they need a QStyleOptionFrame or QStyleOptionFrameV2, but don't want @@ -121,7 +113,7 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const : 0; option->midLineWidth = 0; option->state |= QStyle::State_Sunken; - if (d->readOnly) + if (d->control->isReadOnly()) option->state |= QStyle::State_ReadOnly; #ifdef QT_KEYPAD_NAVIGATION if (hasEditFocus()) @@ -349,14 +341,9 @@ QLineEdit::QLineEdit(const QString& contents, const QString &inputMask, QWidget* { Q_D(QLineEdit); setObjectName(QString::fromAscii(name)); - d->parseInputMask(inputMask); - if (d->maskData) { - QString ms = d->maskString(0, contents); - d->init(ms + d->clearString(ms.length(), d->maxLength - ms.length())); - d->cursor = d->nextMaskBlank(ms.length()); - } else { - d->init(contents); - } + d->init(contents); + d->control->setInputMask(inputMask); + d->control->moveCursor(d->control->nextMaskBlank(contents.length())); } #endif @@ -387,19 +374,13 @@ QLineEdit::~QLineEdit() QString QLineEdit::text() const { Q_D(const QLineEdit); - QString res = d->text; - if (d->maskData) - res = d->stripString(d->text); - return (res.isNull() ? QString::fromLatin1("") : res); + return d->control->text(); } void QLineEdit::setText(const QString& text) { Q_D(QLineEdit); - d->setText(text, -1, false); -#ifdef QT_KEYPAD_NAVIGATION - d->origText = d->text; -#endif + d->control->setText(text); } @@ -420,17 +401,7 @@ void QLineEdit::setText(const QString& text) QString QLineEdit::displayText() const { Q_D(const QLineEdit); - if (d->echoMode == NoEcho) - return QString::fromLatin1(""); - QString res = d->text; - - if (d->echoMode == Password || (d->echoMode == PasswordEchoOnEdit - && !d->passwordEchoEditing)) { - QStyleOptionFrameV2 opt; - initStyleOption(&opt); - res.fill(style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, &opt, this)); - } - return (res.isNull() ? QString::fromLatin1("") : res); + return d->control->displayText(); } @@ -455,20 +426,15 @@ QString QLineEdit::displayText() const int QLineEdit::maxLength() const { Q_D(const QLineEdit); - return d->maxLength; + return d->control->maxLength(); } void QLineEdit::setMaxLength(int maxLength) { Q_D(QLineEdit); - if (d->maskData) - return; - d->maxLength = maxLength; - setText(d->text); + d->control->setMaxLength(maxLength); } - - /*! \property QLineEdit::frame \brief whether the line edit draws itself with a frame @@ -535,13 +501,13 @@ void QLineEdit::setFrame(bool enable) QLineEdit::EchoMode QLineEdit::echoMode() const { Q_D(const QLineEdit); - return (EchoMode) d->echoMode; + return (EchoMode) d->control->echoMode(); } void QLineEdit::setEchoMode(EchoMode mode) { Q_D(QLineEdit); - if (mode == (EchoMode)d->echoMode) + if (mode == (EchoMode)d->control->echoMode()) return; Qt::InputMethodHints imHints = inputMethodHints(); if (mode == Password) { @@ -550,13 +516,11 @@ void QLineEdit::setEchoMode(EchoMode mode) imHints &= ~Qt::ImhHiddenText; } setInputMethodHints(imHints); - d->echoMode = mode; - d->passwordEchoEditing = false; - d->updateTextLayout(); + d->control->setEchoMode(mode); update(); #ifdef Q_WS_MAC if (hasFocus()) - qt_mac_secure_keyboard(d->echoMode == Password || d->echoMode == NoEcho); + qt_mac_secure_keyboard(mode == Password || mode == NoEcho); #endif } @@ -572,7 +536,7 @@ void QLineEdit::setEchoMode(EchoMode mode) const QValidator * QLineEdit::validator() const { Q_D(const QLineEdit); - return d->validator; + return d->control->validator(); } /*! @@ -590,7 +554,7 @@ const QValidator * QLineEdit::validator() const void QLineEdit::setValidator(const QValidator *v) { Q_D(QLineEdit); - d->validator = const_cast<QValidator*>(v); + d->control->setValidator(v); } #endif // QT_NO_VALIDATOR @@ -614,23 +578,23 @@ void QLineEdit::setValidator(const QValidator *v) void QLineEdit::setCompleter(QCompleter *c) { Q_D(QLineEdit); - if (c == d->completer) + if (c == d->control->completer()) return; - if (d->completer) { - disconnect(d->completer, 0, this, 0); - d->completer->setWidget(0); - if (d->completer->parent() == this) - delete d->completer; + if (d->control->completer()) { + disconnect(d->control->completer(), 0, this, 0); + d->control->completer()->setWidget(0); + if (d->control->completer()->parent() == this) + delete d->control->completer(); } - d->completer = c; + d->control->setCompleter(c); if (!c) return; if (c->widget() == 0) c->setWidget(this); if (hasFocus()) { - QObject::connect(d->completer, SIGNAL(activated(QString)), + QObject::connect(d->control->completer(), SIGNAL(activated(QString)), this, SLOT(setText(QString))); - QObject::connect(d->completer, SIGNAL(highlighted(QString)), + QObject::connect(d->control->completer(), SIGNAL(highlighted(QString)), this, SLOT(_q_completionHighlighted(QString))); } } @@ -643,83 +607,9 @@ void QLineEdit::setCompleter(QCompleter *c) QCompleter *QLineEdit::completer() const { Q_D(const QLineEdit); - return d->completer; -} - -// looks for an enabled item iterating forward(dir=1)/backward(dir=-1) from the -// current row based. dir=0 indicates a new completion prefix was set. -bool QLineEditPrivate::advanceToEnabledItem(int dir) -{ - int start = completer->currentRow(); - if (start == -1) - return false; - int i = start + dir; - if (dir == 0) dir = 1; - do { - if (!completer->setCurrentRow(i)) { - if (!completer->wrapAround()) - break; - i = i > 0 ? 0 : completer->completionCount() - 1; - } else { - QModelIndex currentIndex = completer->currentIndex(); - if (completer->completionModel()->flags(currentIndex) & Qt::ItemIsEnabled) - return true; - i += dir; - } - } while (i != start); - - completer->setCurrentRow(start); // restore - return false; -} - -void QLineEditPrivate::complete(int key) -{ - if (!completer || readOnly || echoMode != QLineEdit::Normal) - return; - - if (completer->completionMode() == QCompleter::InlineCompletion) { - if (key == Qt::Key_Backspace) - return; - int n = 0; - if (key == Qt::Key_Up || key == Qt::Key_Down) { - if (selend != 0 && selend != text.length()) - return; - QString prefix = hasSelectedText() ? text.left(selstart) : text; - if (text.compare(completer->currentCompletion(), completer->caseSensitivity()) != 0 - || prefix.compare(completer->completionPrefix(), completer->caseSensitivity()) != 0) { - completer->setCompletionPrefix(prefix); - } else { - n = (key == Qt::Key_Up) ? -1 : +1; - } - } else { - completer->setCompletionPrefix(text); - } - if (!advanceToEnabledItem(n)) - return; - } else { -#ifndef QT_KEYPAD_NAVIGATION - if (text.isEmpty()) { - completer->popup()->hide(); - return; - } -#endif - completer->setCompletionPrefix(text); - } - - completer->complete(); + return d->control->completer(); } -void QLineEditPrivate::_q_completionHighlighted(QString newText) -{ - Q_Q(QLineEdit); - if (completer->completionMode() != QCompleter::InlineCompletion) - q->setText(newText); - else { - int c = cursor; - q->setText(text.left(c) + newText.mid(c)); - q->setSelection(text.length(), c - newText.length()); - } -} #endif // QT_NO_COMPLETER /*! @@ -734,10 +624,10 @@ QSize QLineEdit::sizeHint() const Q_D(const QLineEdit); ensurePolished(); QFontMetrics fm(font()); - int h = qMax(fm.lineSpacing(), 14) + 2*verticalMargin + int h = qMax(fm.lineSpacing(), 14) + 2*d->verticalMargin + d->topTextMargin + d->bottomTextMargin + d->topmargin + d->bottommargin; - int w = fm.width(QLatin1Char('x')) * 17 + 2*horizontalMargin + int w = fm.width(QLatin1Char('x')) * 17 + 2*d->horizontalMargin + d->leftTextMargin + d->rightTextMargin + d->leftmargin + d->rightmargin; // "some" QStyleOptionFrameV2 opt; @@ -758,7 +648,7 @@ QSize QLineEdit::minimumSizeHint() const Q_D(const QLineEdit); ensurePolished(); QFontMetrics fm = fontMetrics(); - int h = fm.height() + qMax(2*verticalMargin, fm.leading()) + int h = fm.height() + qMax(2*d->verticalMargin, fm.leading()) + d->topmargin + d->bottommargin; int w = fm.maxWidth() + d->leftmargin + d->rightmargin; QStyleOptionFrameV2 opt; @@ -780,17 +670,13 @@ QSize QLineEdit::minimumSizeHint() const int QLineEdit::cursorPosition() const { Q_D(const QLineEdit); - return d->cursor; + return d->control->cursorPosition(); } void QLineEdit::setCursorPosition(int pos) { Q_D(QLineEdit); - if (pos < 0) - pos = 0; - - if (pos <= d->text.length()) - d->moveCursor(pos); + d->control->setCursorPosition(pos); } /*! @@ -812,22 +698,17 @@ int QLineEdit::cursorPositionAt(const QPoint &pos) bool QLineEdit::validateAndSet(const QString &newText, int newPos, int newMarkAnchor, int newMarkDrag) { - Q_D(QLineEdit); - int priorState = d->undoState; - d->selstart = 0; - d->selend = d->text.length(); - d->removeSelectedText(); - d->insert(newText); - d->finishChange(priorState); - if (d->undoState > priorState) { - d->cursor = newPos; - d->selstart = qMin(newMarkAnchor, newMarkDrag); - d->selend = qMax(newMarkAnchor, newMarkDrag); - update(); - d->emitCursorPositionChanged(); - return true; + // The suggested functions above in the docs don't seem to validate, + // below code tries to mimic previous behaviour. + QString oldText = text(); + setText(newText); + if(!hasAcceptableInput()){ + setText(oldText); + return false; } - return false; + setCursorPosition(newPos); + setSelection(qMin(newMarkAnchor, newMarkDrag), qAbs(newMarkAnchor - newMarkDrag)); + return true; } #endif //QT3_SUPPORT @@ -868,15 +749,7 @@ void QLineEdit::setAlignment(Qt::Alignment alignment) void QLineEdit::cursorForward(bool mark, int steps) { Q_D(QLineEdit); - int cursor = d->cursor; - if (steps > 0) { - while(steps--) - cursor = d->textLayout.nextCursorPosition(cursor); - } else if (steps < 0) { - while (steps++) - cursor = d->textLayout.previousCursorPosition(cursor); - } - d->moveCursor(cursor, mark); + d->control->cursorForward(mark, steps); } @@ -901,7 +774,7 @@ void QLineEdit::cursorBackward(bool mark, int steps) void QLineEdit::cursorWordForward(bool mark) { Q_D(QLineEdit); - d->moveCursor(d->textLayout.nextCursorPosition(d->cursor, QTextLayout::SkipWords), mark); + d->control->cursorWordForward(mark); } /*! @@ -914,7 +787,7 @@ void QLineEdit::cursorWordForward(bool mark) void QLineEdit::cursorWordBackward(bool mark) { Q_D(QLineEdit); - d->moveCursor(d->textLayout.previousCursorPosition(d->cursor, QTextLayout::SkipWords), mark); + d->control->cursorWordBackward(mark); } @@ -929,26 +802,7 @@ void QLineEdit::cursorWordBackward(bool mark) void QLineEdit::backspace() { Q_D(QLineEdit); - int priorState = d->undoState; - if (d->hasSelectedText()) { - d->removeSelectedText(); - } else if (d->cursor) { - --d->cursor; - if (d->maskData) - d->cursor = d->prevMaskBlank(d->cursor); - QChar uc = d->text.at(d->cursor); - if (d->cursor > 0 && uc.unicode() >= 0xdc00 && uc.unicode() < 0xe000) { - // second half of a surrogate, check if we have the first half as well, - // if yes delete both at once - uc = d->text.at(d->cursor - 1); - if (uc.unicode() >= 0xd800 && uc.unicode() < 0xdc00) { - d->del(true); - --d->cursor; - } - } - d->del(true); - } - d->finishChange(priorState); + d->control->backspace(); } /*! @@ -962,15 +816,7 @@ void QLineEdit::backspace() void QLineEdit::del() { Q_D(QLineEdit); - int priorState = d->undoState; - if (d->hasSelectedText()) { - d->removeSelectedText(); - } else { - int n = d->textLayout.nextCursorPosition(d->cursor) - d->cursor; - while (n--) - d->del(); - } - d->finishChange(priorState); + d->control->del(); } /*! @@ -985,7 +831,7 @@ void QLineEdit::del() void QLineEdit::home(bool mark) { Q_D(QLineEdit); - d->moveCursor(0, mark); + d->control->home(mark); } /*! @@ -1000,7 +846,7 @@ void QLineEdit::home(bool mark) void QLineEdit::end(bool mark) { Q_D(QLineEdit); - d->moveCursor(d->text.length(), mark); + d->control->end(mark); } @@ -1025,16 +871,13 @@ void QLineEdit::end(bool mark) bool QLineEdit::isModified() const { Q_D(const QLineEdit); - return d->modifiedState != d->undoState; + return d->control->isModified(); } void QLineEdit::setModified(bool modified) { Q_D(QLineEdit); - if (modified) - d->modifiedState = -1; - else - d->modifiedState = d->undoState; + d->control->setModified(modified); } @@ -1062,7 +905,7 @@ Use setModified(false) instead. bool QLineEdit::hasSelectedText() const { Q_D(const QLineEdit); - return d->hasSelectedText(); + return d->control->hasSelectedText(); } /*! @@ -1080,9 +923,7 @@ bool QLineEdit::hasSelectedText() const QString QLineEdit::selectedText() const { Q_D(const QLineEdit); - if (d->hasSelectedText()) - return d->text.mid(d->selstart, d->selend - d->selstart); - return QString(); + return d->control->selectedText(); } /*! @@ -1095,7 +936,7 @@ QString QLineEdit::selectedText() const int QLineEdit::selectionStart() const { Q_D(const QLineEdit); - return d->hasSelectedText() ? d->selstart : -1; + return d->control->selectionStart(); } @@ -1125,9 +966,10 @@ void QLineEdit::setEdited(bool on) { setModified(on); } int QLineEdit::characterAt(int xpos, QChar *chr) const { Q_D(const QLineEdit); - int pos = d->xToPos(xpos + contentsRect().x() - d->hscroll + horizontalMargin); - if (chr && pos < (int) d->text.length()) - *chr = d->text.at(pos); + int pos = d->xToPos(xpos + contentsRect().x() - d->hscroll + d->horizontalMargin); + QString txt = d->control->text(); + if (chr && pos < (int) txt.length()) + *chr = txt.at(pos); return pos; } @@ -1138,9 +980,9 @@ int QLineEdit::characterAt(int xpos, QChar *chr) const bool QLineEdit::getSelection(int *start, int *end) { Q_D(QLineEdit); - if (d->hasSelectedText() && start && end) { - *start = d->selstart; - *end = d->selend; + if (d->control->hasSelectedText() && start && end) { + *start = selectionStart(); + *end = *start + selectedText().length(); return true; } return false; @@ -1158,30 +1000,19 @@ bool QLineEdit::getSelection(int *start, int *end) void QLineEdit::setSelection(int start, int length) { Q_D(QLineEdit); - if (start < 0 || start > (int)d->text.length()) { + if (start < 0 || start > (int)d->control->text().length()) { qWarning("QLineEdit::setSelection: Invalid start position (%d)", start); return; - } else { - if (length > 0) { - d->selstart = start; - d->selend = qMin(start + length, (int)d->text.length()); - d->cursor = d->selend; - } else { - d->selstart = qMax(start + length, 0); - d->selend = start; - d->cursor = d->selstart; - } } - if (d->hasSelectedText()){ + d->control->setSelection(start, length); + + if (d->control->hasSelectedText()){ QStyleOptionFrameV2 opt; initStyleOption(&opt); if (!style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, this)) d->setCursorVisible(false); } - - update(); - d->emitCursorPositionChanged(); } @@ -1197,7 +1028,7 @@ void QLineEdit::setSelection(int start, int length) bool QLineEdit::isUndoAvailable() const { Q_D(const QLineEdit); - return d->isUndoAvailable(); + return d->control->isUndoAvailable(); } /*! @@ -1213,7 +1044,7 @@ bool QLineEdit::isUndoAvailable() const bool QLineEdit::isRedoAvailable() const { Q_D(const QLineEdit); - return d->isRedoAvailable(); + return d->control->isRedoAvailable(); } /*! @@ -1249,7 +1080,7 @@ void QLineEdit::setDragEnabled(bool b) bool QLineEdit::hasAcceptableInput() const { Q_D(const QLineEdit); - return d->hasAcceptableInput(d->text); + return d->control->hasAcceptableInput(); } /*! @@ -1355,15 +1186,13 @@ void QLineEdit::getTextMargins(int *left, int *top, int *right, int *bottom) con QString QLineEdit::inputMask() const { Q_D(const QLineEdit); - return (d->maskData ? d->inputMask + QLatin1Char(';') + d->blank : QString()); + return d->control->inputMask(); } void QLineEdit::setInputMask(const QString &inputMask) { Q_D(QLineEdit); - d->parseInputMask(inputMask); - if (d->maskData) - d->moveCursor(d->nextMaskBlank(0)); + d->control->setInputMask(inputMask); } /*! @@ -1378,8 +1207,7 @@ void QLineEdit::setInputMask(const QString &inputMask) void QLineEdit::selectAll() { Q_D(QLineEdit); - d->selstart = d->selend = d->cursor = 0; - d->moveCursor(d->text.length(), true); + d->control->selectAll(); } /*! @@ -1391,8 +1219,7 @@ void QLineEdit::selectAll() void QLineEdit::deselect() { Q_D(QLineEdit); - d->deselect(); - d->finishChange(); + d->control->deselect(); } @@ -1407,10 +1234,7 @@ void QLineEdit::insert(const QString &newText) { // q->resetInputContext(); //#### FIX ME IN QT Q_D(QLineEdit); - int priorState = d->undoState; - d->removeSelectedText(); - d->insert(newText); - d->finishChange(priorState); + d->control->insert(newText); } /*! @@ -1421,13 +1245,8 @@ void QLineEdit::insert(const QString &newText) void QLineEdit::clear() { Q_D(QLineEdit); - int priorState = d->undoState; resetInputContext(); - d->selstart = 0; - d->selend = d->text.length(); - d->removeSelectedText(); - d->separate(); - d->finishChange(priorState, /*update*/false, /*edited*/false); + d->control->clear(); } /*! @@ -1440,8 +1259,7 @@ void QLineEdit::undo() { Q_D(QLineEdit); resetInputContext(); - d->undo(); - d->finishChange(-1, true); + d->control->undo(); } /*! @@ -1452,8 +1270,7 @@ void QLineEdit::redo() { Q_D(QLineEdit); resetInputContext(); - d->redo(); - d->finishChange(); + d->control->redo(); } @@ -1475,16 +1292,16 @@ void QLineEdit::redo() bool QLineEdit::isReadOnly() const { Q_D(const QLineEdit); - return d->readOnly; + return d->control->isReadOnly(); } void QLineEdit::setReadOnly(bool enable) { Q_D(QLineEdit); - if (d->readOnly != enable) { - d->readOnly = enable; - setAttribute(Qt::WA_MacShowFocusRect, !d->readOnly); - setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(this)); + if (d->control->isReadOnly() != enable) { + d->control->setReadOnly(enable); + setAttribute(Qt::WA_MacShowFocusRect, !enable); + setAttribute(Qt::WA_InputMethodEnabled, d->shouldEnableInputMethod()); #ifndef QT_NO_CURSOR setCursor(enable ? Qt::ArrowCursor : Qt::IBeamCursor); #endif @@ -1523,7 +1340,7 @@ void QLineEdit::cut() void QLineEdit::copy() const { Q_D(const QLineEdit); - d->copy(); + d->control->copy(); } /*! @@ -1540,23 +1357,7 @@ void QLineEdit::copy() const void QLineEdit::paste() { Q_D(QLineEdit); - if (echoMode() == PasswordEchoOnEdit && !d->passwordEchoEditing) { - // Clear the edit and reset to normal echo mode when pasting; the echo - // mode switches back when the edit loses focus. ### changes a public - // property, resets current content - d->updatePasswordEchoEditing(true); - clear(); - } - insert(QApplication::clipboard()->text(QClipboard::Clipboard)); -} - -void QLineEditPrivate::copy(bool clipboard) const -{ - Q_Q(const QLineEdit); - QString t = q->selectedText(); - if (!t.isEmpty() && echoMode == QLineEdit::Normal) { - QApplication::clipboard()->setText(t, clipboard ? QClipboard::Clipboard : QClipboard::Selection); - } + d->control->paste(); } #endif // !QT_NO_CLIPBOARD @@ -1566,57 +1367,10 @@ void QLineEditPrivate::copy(bool clipboard) const bool QLineEdit::event(QEvent * e) { Q_D(QLineEdit); -#ifndef QT_NO_SHORTCUT - if (e->type() == QEvent::ShortcutOverride && !d->readOnly) { - QKeyEvent* ke = (QKeyEvent*) e; - if (ke == QKeySequence::Copy - || ke == QKeySequence::Paste - || ke == QKeySequence::Cut - || ke == QKeySequence::Redo - || ke == QKeySequence::Undo - || ke == QKeySequence::MoveToNextWord - || ke == QKeySequence::MoveToPreviousWord - || ke == QKeySequence::MoveToStartOfDocument - || ke == QKeySequence::MoveToEndOfDocument - || ke == QKeySequence::SelectNextWord - || ke == QKeySequence::SelectPreviousWord - || ke == QKeySequence::SelectStartOfLine - || ke == QKeySequence::SelectEndOfLine - || ke == QKeySequence::SelectStartOfBlock - || ke == QKeySequence::SelectEndOfBlock - || ke == QKeySequence::SelectStartOfDocument - || ke == QKeySequence::SelectAll - || ke == QKeySequence::SelectEndOfDocument) { - ke->accept(); - } else if (ke->modifiers() == Qt::NoModifier || ke->modifiers() == Qt::ShiftModifier - || ke->modifiers() == Qt::KeypadModifier) { - if (ke->key() < Qt::Key_Escape) { - ke->accept(); - } else { - switch (ke->key()) { - case Qt::Key_Delete: - case Qt::Key_Home: - case Qt::Key_End: - case Qt::Key_Backspace: - case Qt::Key_Left: - case Qt::Key_Right: - ke->accept(); - default: - break; - } - } - } - } else -#endif - if (e->type() == QEvent::Timer) { + if (e->type() == QEvent::Timer) { // should be timerEvent, is here for binary compatibility int timerId = ((QTimerEvent*)e)->timerId(); - if (timerId == d->cursorTimer) { - QStyleOptionFrameV2 opt; - initStyleOption(&opt); - if(!hasSelectedText() - || style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, this)) - d->setCursorVisible(!d->cursorVisible); + if (false) { #ifndef QT_NO_DRAGANDDROP } else if (timerId == d->dndTimer.timerId()) { d->drag(); @@ -1624,60 +1378,31 @@ bool QLineEdit::event(QEvent * e) } else if (timerId == d->tripleClickTimer.timerId()) d->tripleClickTimer.stop(); -#ifdef QT_KEYPAD_NAVIGATION - else if (timerId == d->deleteAllTimer.timerId()) { - d->deleteAllTimer.stop(); - clear(); - } -#endif } else if (e->type() == QEvent::ContextMenu) { #ifndef QT_NO_IM - if (d->composeMode()) + if (d->control->composeMode()) return true; #endif - d->separate(); + //d->separate(); } else if (e->type() == QEvent::WindowActivate) { QTimer::singleShot(0, this, SLOT(_q_handleWindowActivate())); + }else if(e->type() == QEvent::ShortcutOverride){ + d->control->processEvent(e); } + #ifdef QT_KEYPAD_NAVIGATION if (QApplication::keypadNavigationEnabled()) { - if ((e->type() == QEvent::KeyPress) || (e->type() == QEvent::KeyRelease)) { - QKeyEvent *ke = (QKeyEvent *)e; - if (ke->key() == Qt::Key_Back) { - if (ke->isAutoRepeat()) { - // Swallow it. We don't want back keys running amok. - ke->accept(); - return true; - } - if ((e->type() == QEvent::KeyRelease) - && !isReadOnly() - && d->deleteAllTimer.isActive()) { - d->deleteAllTimer.stop(); - backspace(); - ke->accept(); - return true; - } - } - } else if (e->type() == QEvent::EnterEditFocus) { + if (e->type() == QEvent::EnterEditFocus) { end(false); - if (!d->cursorTimer) { - int cft = QApplication::cursorFlashTime(); - d->cursorTimer = cft ? startTimer(cft/2) : -1; - } + int cft = QApplication::cursorFlashTime(); + d->control->setCursorBlinkPeriod(cft/2); } else if (e->type() == QEvent::LeaveEditFocus) { d->setCursorVisible(false); - if (d->cursorTimer > 0) - killTimer(d->cursorTimer); - d->cursorTimer = 0; - - if (!d->emitingEditingFinished) { - if (hasAcceptableInput() || d->fixup()) { - d->emitingEditingFinished = true; - emit editingFinished(); - d->emitingEditingFinished = false; - } - } + d->control->setCursorBlinkPeriod(0); + if (d->control->hasAcceptableInput() || d->control->fixup()) + emit editingFinished(); } + return true; } #endif return QWidget::event(e); @@ -1689,15 +1414,15 @@ void QLineEdit::mousePressEvent(QMouseEvent* e) { Q_D(QLineEdit); if (d->sendMouseEventToInputContext(e)) - return; + return; if (e->button() == Qt::RightButton) return; #ifdef QT_KEYPAD_NAVIGATION if (QApplication::keypadNavigationEnabled() && !hasEditFocus()) { setEditFocus(true); // Get the completion list to pop up. - if (d->completer) - d->completer->complete(); + if (d->control->completer()) + d->control->completer()->complete(); } #endif if (d->tripleClickTimer.isActive() && (e->pos() - d->tripleClick).manhattanLength() < @@ -1708,18 +1433,16 @@ void QLineEdit::mousePressEvent(QMouseEvent* e) bool mark = e->modifiers() & Qt::ShiftModifier; int cursor = d->xToPos(e->pos().x()); #ifndef QT_NO_DRAGANDDROP - if (!mark && d->dragEnabled && d->echoMode == Normal && - e->button() == Qt::LeftButton && d->inSelection(e->pos().x())) { - d->cursor = cursor; - update(); + if (!mark && d->dragEnabled && d->control->echoMode() == Normal && + e->button() == Qt::LeftButton && d->control->inSelection(e->pos().x())) { + d->control->moveCursor(cursor); d->dndPos = e->pos(); if (!d->dndTimer.isActive()) d->dndTimer.start(QApplication::startDragTime(), this); - d->emitCursorPositionChanged(); } else #endif { - d->moveCursor(cursor, mark); + d->control->moveCursor(cursor, mark); } } @@ -1729,7 +1452,7 @@ void QLineEdit::mouseMoveEvent(QMouseEvent * e) { Q_D(QLineEdit); if (d->sendMouseEventToInputContext(e)) - return; + return; if (e->buttons() & Qt::LeftButton) { #ifndef QT_NO_DRAGANDDROP @@ -1739,7 +1462,7 @@ void QLineEdit::mouseMoveEvent(QMouseEvent * e) } else #endif { - d->moveCursor(d->xToPos(e->pos().x()), true); + d->control->moveCursor(d->xToPos(e->pos().x()), true); } } } @@ -1750,7 +1473,7 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e) { Q_D(QLineEdit); if (d->sendMouseEventToInputContext(e)) - return; + return; #ifndef QT_NO_DRAGANDDROP if (e->button() == Qt::LeftButton) { if (d->dndTimer.isActive()) { @@ -1763,9 +1486,9 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e) #ifndef QT_NO_CLIPBOARD if (QApplication::clipboard()->supportsSelection()) { if (e->button() == Qt::LeftButton) { - d->copy(false); - } else if (!d->readOnly && e->button() == Qt::MidButton) { - d->deselect(); + d->control->copy(QClipboard::Selection); + } else if (!d->control->isReadOnly() && e->button() == Qt::MidButton) { + deselect(); insert(QApplication::clipboard()->text(QClipboard::Selection)); } } @@ -1785,16 +1508,9 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e) { Q_D(QLineEdit); if (d->sendMouseEventToInputContext(e)) - return; + return; if (e->button() == Qt::LeftButton) { - deselect(); - d->cursor = d->xToPos(e->pos().x()); - d->cursor = d->textLayout.previousCursorPosition(d->cursor, QTextLayout::SkipWords); - // ## text layout should support end of words. - int end = d->textLayout.nextCursorPosition(d->cursor, QTextLayout::SkipWords); - while (end > d->cursor && d->text[end-1].isSpace()) - --end; - d->moveCursor(end, true); + d->control->selectWordAtPos(d->xToPos(e->pos().x())); d->tripleClickTimer.start(QApplication::doubleClickInterval(), this); d->tripleClick = e->pos(); } @@ -1834,65 +1550,15 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e) void QLineEdit::keyPressEvent(QKeyEvent *event) { Q_D(QLineEdit); - - bool inlineCompletionAccepted = false; - -#ifndef QT_NO_COMPLETER - if (d->completer) { - QCompleter::CompletionMode completionMode = d->completer->completionMode(); - if ((completionMode == QCompleter::PopupCompletion - || completionMode == QCompleter::UnfilteredPopupCompletion) - &&d->completer->popup() - && d->completer->popup()->isVisible()) { - // The following keys are forwarded by the completer to the widget - // Ignoring the events lets the completer provide suitable default behavior - switch (event->key()) { - case Qt::Key_Escape: - event->ignore(); - return; - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_F4: -#ifdef QT_KEYPAD_NAVIGATION - case Qt::Key_Select: - if (!QApplication::keypadNavigationEnabled()) - break; -#endif - d->completer->popup()->hide(); // just hide. will end up propagating to parent - default: - break; // normal key processing - } - } else if (completionMode == QCompleter::InlineCompletion) { - switch (event->key()) { - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_F4: -#ifdef QT_KEYPAD_NAVIGATION - case Qt::Key_Select: - if (!QApplication::keypadNavigationEnabled()) - break; -#endif - if (!d->completer->currentCompletion().isEmpty() && d->selend > d->selstart - && d->selend == d->text.length()) { - setText(d->completer->currentCompletion()); - inlineCompletionAccepted = true; - } - default: - break; // normal key processing - } - } - } -#endif // QT_NO_COMPLETER - -#ifdef QT_KEYPAD_NAVIGATION + #ifdef QT_KEYPAD_NAVIGATION bool select = false; switch (event->key()) { case Qt::Key_Select: if (QApplication::keypadNavigationEnabled()) { if (hasEditFocus()) { setEditFocus(false); - if (d->completer && d->completer->popup()->isVisible()) - d->completer->popup()->hide(); + if (d->control->completer() && d->control->completer()->popup()->isVisible()) + d->control->completer()->popup()->hide(); select = true; } } @@ -1928,273 +1594,7 @@ void QLineEdit::keyPressEvent(QKeyEvent *event) return; // Just start. No action. } #endif - - if (echoMode() == PasswordEchoOnEdit - && !d->passwordEchoEditing - && !isReadOnly() - && !event->text().isEmpty() -#ifdef QT_KEYPAD_NAVIGATION - && event->key() != Qt::Key_Select - && event->key() != Qt::Key_Up - && event->key() != Qt::Key_Down - && event->key() != Qt::Key_Back -#endif - && !(event->modifiers() & Qt::ControlModifier)) { - // Clear the edit and reset to normal echo mode while editing; the - // echo mode switches back when the edit loses focus. ### changes a - // public property, resets current content. dubious code; you can - // navigate with keys up, down, back, and select(?), but if you press - // "left" or "right" it clears? - d->updatePasswordEchoEditing(true); - clear(); - } - - d->setCursorVisible(true); - if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) { - if (hasAcceptableInput() || d->fixup()) { - emit returnPressed(); - d->emitingEditingFinished = true; - emit editingFinished(); - d->emitingEditingFinished = false; - } - if (inlineCompletionAccepted) - event->accept(); - else - event->ignore(); - return; - } - bool unknown = false; - - if (false) { - } -#ifndef QT_NO_SHORTCUT - else if (event == QKeySequence::Undo) { - if (!d->readOnly) - undo(); - } - else if (event == QKeySequence::Redo) { - if (!d->readOnly) - redo(); - } - else if (event == QKeySequence::SelectAll) { - selectAll(); - } -#ifndef QT_NO_CLIPBOARD - else if (event == QKeySequence::Copy) { - copy(); - } - else if (event == QKeySequence::Paste) { - if (!d->readOnly) - paste(); - } - else if (event == QKeySequence::Cut) { - if (!d->readOnly) { - cut(); - } - } - else if (event == QKeySequence::DeleteEndOfLine) { - if (!d->readOnly) { - setSelection(d->cursor, d->text.size()); - copy(); - del(); - } - } -#endif //QT_NO_CLIPBOARD - else if (event == QKeySequence::MoveToStartOfLine) { - home(0); - } - else if (event == QKeySequence::MoveToEndOfLine) { - end(0); - } - else if (event == QKeySequence::SelectStartOfLine) { - home(1); - } - else if (event == QKeySequence::SelectEndOfLine) { - end(1); - } - else if (event == QKeySequence::MoveToNextChar) { -#if !defined(Q_WS_WIN) || defined(QT_NO_COMPLETER) - if (d->hasSelectedText()) { -#else - if (d->hasSelectedText() && d->completer - && d->completer->completionMode() == QCompleter::InlineCompletion) { -#endif - d->moveCursor(d->selend, false); - } else { - cursorForward(0, layoutDirection() == Qt::LeftToRight ? 1 : -1); - } - } - else if (event == QKeySequence::SelectNextChar) { - cursorForward(1, layoutDirection() == Qt::LeftToRight ? 1 : -1); - } - else if (event == QKeySequence::MoveToPreviousChar) { -#if !defined(Q_WS_WIN) || defined(QT_NO_COMPLETER) - if (d->hasSelectedText()) { -#else - if (d->hasSelectedText() && d->completer - && d->completer->completionMode() == QCompleter::InlineCompletion) { -#endif - d->moveCursor(d->selstart, false); - } else { - cursorBackward(0, layoutDirection() == Qt::LeftToRight ? 1 : -1); - } - } - else if (event == QKeySequence::SelectPreviousChar) { - cursorBackward(1, layoutDirection() == Qt::LeftToRight ? 1 : -1); - } - else if (event == QKeySequence::MoveToNextWord) { - if (echoMode() == Normal) - layoutDirection() == Qt::LeftToRight ? cursorWordForward(0) : cursorWordBackward(0); - else - layoutDirection() == Qt::LeftToRight ? end(0) : home(0); - } - else if (event == QKeySequence::MoveToPreviousWord) { - if (echoMode() == Normal) - layoutDirection() == Qt::LeftToRight ? cursorWordBackward(0) : cursorWordForward(0); - else if (!d->readOnly) { - layoutDirection() == Qt::LeftToRight ? home(0) : end(0); - } - } - else if (event == QKeySequence::SelectNextWord) { - if (echoMode() == Normal) - layoutDirection() == Qt::LeftToRight ? cursorWordForward(1) : cursorWordBackward(1); - else - layoutDirection() == Qt::LeftToRight ? end(1) : home(1); - } - else if (event == QKeySequence::SelectPreviousWord) { - if (echoMode() == Normal) - layoutDirection() == Qt::LeftToRight ? cursorWordBackward(1) : cursorWordForward(1); - else - layoutDirection() == Qt::LeftToRight ? home(1) : end(1); - } - else if (event == QKeySequence::Delete) { - if (!d->readOnly) - del(); - } - else if (event == QKeySequence::DeleteEndOfWord) { - if (!d->readOnly) { - cursorWordForward(true); - del(); - } - } - else if (event == QKeySequence::DeleteStartOfWord) { - if (!d->readOnly) { - cursorWordBackward(true); - del(); - } - } -#endif // QT_NO_SHORTCUT - else { -#ifdef Q_WS_MAC - if (event->key() == Qt::Key_Up || event->key() == Qt::Key_Down) { - Qt::KeyboardModifiers myModifiers = (event->modifiers() & ~Qt::KeypadModifier); - if (myModifiers & Qt::ShiftModifier) { - if (myModifiers == (Qt::ControlModifier|Qt::ShiftModifier) - || myModifiers == (Qt::AltModifier|Qt::ShiftModifier) - || myModifiers == Qt::ShiftModifier) { - - event->key() == Qt::Key_Up ? home(1) : end(1); - } - } else { - if ((myModifiers == Qt::ControlModifier - || myModifiers == Qt::AltModifier - || myModifiers == Qt::NoModifier)) { - event->key() == Qt::Key_Up ? home(0) : end(0); - } - } - } -#endif - if (event->modifiers() & Qt::ControlModifier) { - switch (event->key()) { - case Qt::Key_Backspace: - if (!d->readOnly) { - cursorWordBackward(true); - del(); - } - break; -#ifndef QT_NO_COMPLETER - case Qt::Key_Up: - case Qt::Key_Down: - d->complete(event->key()); - break; -#endif -#if defined(Q_WS_X11) - case Qt::Key_E: - end(0); - break; - - case Qt::Key_U: - if (!d->readOnly) { - setSelection(0, d->text.size()); -#ifndef QT_NO_CLIPBOARD - copy(); -#endif - del(); - } - break; -#endif - default: - unknown = true; - } - } else { // ### check for *no* modifier - switch (event->key()) { - case Qt::Key_Backspace: - if (!d->readOnly) { - backspace(); -#ifndef QT_NO_COMPLETER - d->complete(Qt::Key_Backspace); -#endif - } - break; -#ifdef QT_KEYPAD_NAVIGATION - case Qt::Key_Back: - if (QApplication::keypadNavigationEnabled() && !event->isAutoRepeat() - && !isReadOnly()) { - if (text().length() == 0) { - setText(d->origText); - - if (d->passwordEchoEditing) - d->updatePasswordEchoEditing(false); - - setEditFocus(false); - } else if (!d->deleteAllTimer.isActive()) { - d->deleteAllTimer.start(750, this); - } - } else { - unknown = true; - } - break; -#endif - - default: - unknown = true; - } - } - } - - if (event->key() == Qt::Key_Direction_L || event->key() == Qt::Key_Direction_R) { - setLayoutDirection((event->key() == Qt::Key_Direction_L) ? Qt::LeftToRight : Qt::RightToLeft); - d->updateTextLayout(); - update(); - unknown = false; - } - - if (unknown && !d->readOnly) { - QString t = event->text(); - if (!t.isEmpty() && t.at(0).isPrint()) { - insert(t); -#ifndef QT_NO_COMPLETER - d->complete(event->key()); -#endif - event->accept(); - return; - } - } - - if (unknown) - event->ignore(); - else - event->accept(); + d->control->processKeyEvent(event); } /*! @@ -2208,50 +1608,17 @@ QRect QLineEdit::cursorRect() const return d->cursorRect(); } -/*! - This function is not intended as polymorphic usage. Just a shared code - fragment that calls QInputContext::mouseHandler for this - class. -*/ -bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e ) -{ -#if !defined QT_NO_IM - Q_Q(QLineEdit); - if ( composeMode() ) { - int tmp_cursor = xToPos(e->pos().x()); - int mousePos = tmp_cursor - cursor; - if ( mousePos < 0 || mousePos > textLayout.preeditAreaText().length() ) { - mousePos = -1; - // don't send move events outside the preedit area - if ( e->type() == QEvent::MouseMove ) - return true; - } - - QInputContext *qic = q->inputContext(); - if ( qic ) - // may be causing reset() in some input methods - qic->mouseHandler(mousePos, e); - if (!textLayout.preeditAreaText().isEmpty()) - return true; - } -#else - Q_UNUSED(e); -#endif - - return false; -} - /*! \reimp */ void QLineEdit::inputMethodEvent(QInputMethodEvent *e) { Q_D(QLineEdit); - if (d->readOnly) { + if (d->control->isReadOnly()) { e->ignore(); return; } - if (echoMode() == PasswordEchoOnEdit && !d->passwordEchoEditing) { + if (echoMode() == PasswordEchoOnEdit && !d->control->passwordEchoEditing()) { // Clear the edit and reset to normal echo mode while entering input // method data; the echo mode switches back when the edit loses focus. // ### changes a public property, resets current content. @@ -2271,85 +1638,11 @@ void QLineEdit::inputMethodEvent(QInputMethodEvent *e) } #endif - int priorState = 0; - bool isGettingInput = !e->commitString().isEmpty() || !e->preeditString().isEmpty() - || e->replacementLength() > 0; - bool cursorPositionChanged = false; - - if (isGettingInput) { - // If any text is being input, remove selected text. - priorState = d->undoState; - d->removeSelectedText(); - } - - int c = d->cursor; // cursor position after insertion of commit string - if (e->replacementStart() <= 0) - c += e->commitString().length() + qMin(-e->replacementStart(), e->replacementLength()); - - d->cursor += e->replacementStart(); - - // insert commit string - if (e->replacementLength()) { - d->selstart = d->cursor; - d->selend = d->selstart + e->replacementLength(); - d->removeSelectedText(); - } - if (!e->commitString().isEmpty()) { - d->insert(e->commitString()); - cursorPositionChanged = true; - } - - d->cursor = qMin(c, d->text.length()); - - for (int i = 0; i < e->attributes().size(); ++i) { - const QInputMethodEvent::Attribute &a = e->attributes().at(i); - if (a.type == QInputMethodEvent::Selection) { - d->cursor = qBound(0, a.start + a.length, d->text.length()); - if (a.length) { - d->selstart = qMax(0, qMin(a.start, d->text.length())); - d->selend = d->cursor; - if (d->selend < d->selstart) { - qSwap(d->selstart, d->selend); - } - } else { - d->selstart = d->selend = 0; - } - cursorPositionChanged = true; - } - } - - d->textLayout.setPreeditArea(d->cursor, e->preeditString()); - d->preeditCursor = e->preeditString().length(); - d->hideCursor = false; - QList<QTextLayout::FormatRange> formats; - for (int i = 0; i < e->attributes().size(); ++i) { - const QInputMethodEvent::Attribute &a = e->attributes().at(i); - if (a.type == QInputMethodEvent::Cursor) { - d->preeditCursor = a.start; - d->hideCursor = !a.length; - } else if (a.type == QInputMethodEvent::TextFormat) { - QTextCharFormat f = qvariant_cast<QTextFormat>(a.value).toCharFormat(); - if (f.isValid()) { - QTextLayout::FormatRange o; - o.start = a.start + d->cursor; - o.length = a.length; - o.format = f; - formats.append(o); - } - } - } - d->textLayout.setAdditionalFormats(formats); - d->updateTextLayout(); - update(); - if (cursorPositionChanged) - d->emitCursorPositionChanged(); - - if (isGettingInput) - d->finishChange(priorState); + d->control->processInputMethodEvent(e); #ifndef QT_NO_COMPLETER if (!e->commitString().isEmpty()) - d->complete(Qt::Key_unknown); + d->control->complete(Qt::Key_unknown); #endif } @@ -2364,9 +1657,9 @@ QVariant QLineEdit::inputMethodQuery(Qt::InputMethodQuery property) const case Qt::ImFont: return font(); case Qt::ImCursorPosition: - return QVariant(d->cursor); + return QVariant(d->control->hasSelectedText() ? d->control->selectionEnd() : d->control->cursor()); case Qt::ImSurroundingText: - return QVariant(d->text); + return QVariant(text()); case Qt::ImCurrentSelection: return QVariant(selectedText()); case Qt::ImMaximumTextLength: @@ -2392,9 +1685,9 @@ void QLineEdit::focusInEvent(QFocusEvent *e) if (e->reason() == Qt::TabFocusReason || e->reason() == Qt::BacktabFocusReason || e->reason() == Qt::ShortcutFocusReason) { - if (d->maskData) - d->moveCursor(d->nextMaskBlank(0)); - else if (!d->hasSelectedText()) + if (!d->control->inputMask().isEmpty()) + d->control->moveCursor(d->control->nextMaskBlank(0)); + else if (!d->control->hasSelectedText()) selectAll(); } else if (e->reason() == Qt::MouseFocusReason) { d->clickCausedFocus = 1; @@ -2402,28 +1695,26 @@ void QLineEdit::focusInEvent(QFocusEvent *e) #ifdef QT_KEYPAD_NAVIGATION if (!QApplication::keypadNavigationEnabled() || (hasEditFocus() && e->reason() == Qt::PopupFocusReason)) #endif - if (!d->cursorTimer) { - int cft = QApplication::cursorFlashTime(); - d->cursorTimer = cft ? startTimer(cft/2) : -1; - } + int cft = QApplication::cursorFlashTime(); + d->control->setCursorBlinkPeriod(cft/2); QStyleOptionFrameV2 opt; initStyleOption(&opt); - if((!hasSelectedText() && d->textLayout.preeditAreaText().isEmpty()) + if((!hasSelectedText() && d->control->preeditAreaText().isEmpty()) || style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, this)) d->setCursorVisible(true); #ifdef Q_WS_MAC - if (d->echoMode == Password || d->echoMode == NoEcho) + if (d->control->echoMode() == Password || d->control->echoMode() == NoEcho) qt_mac_secure_keyboard(true); #endif #ifdef QT_KEYPAD_NAVIGATION - d->origText = d->text; + d->control->setCancelText(d->text); #endif #ifndef QT_NO_COMPLETER - if (d->completer) { - d->completer->setWidget(this); - QObject::connect(d->completer, SIGNAL(activated(QString)), + if (d->control->completer()) { + d->control->completer()->setWidget(this); + QObject::connect(d->control->completer(), SIGNAL(activated(QString)), this, SLOT(setText(QString))); - QObject::connect(d->completer, SIGNAL(highlighted(QString)), + QObject::connect(d->control->completer(), SIGNAL(highlighted(QString)), this, SLOT(_q_completionHighlighted(QString))); } #endif @@ -2436,7 +1727,7 @@ void QLineEdit::focusInEvent(QFocusEvent *e) void QLineEdit::focusOutEvent(QFocusEvent *e) { Q_D(QLineEdit); - if (d->passwordEchoEditing) { + if (d->control->passwordEchoEditing()) { // Reset the echomode back to PasswordEchoOnEdit when the widget loses // focus. d->updatePasswordEchoEditing(false); @@ -2448,37 +1739,29 @@ void QLineEdit::focusOutEvent(QFocusEvent *e) deselect(); d->setCursorVisible(false); - if (d->cursorTimer > 0) - killTimer(d->cursorTimer); - d->cursorTimer = 0; - + d->control->setCursorBlinkPeriod(0); #ifdef QT_KEYPAD_NAVIGATION // editingFinished() is already emitted on LeaveEditFocus if (!QApplication::keypadNavigationEnabled()) #endif if (reason != Qt::PopupFocusReason || !(QApplication::activePopupWidget() && QApplication::activePopupWidget()->parentWidget() == this)) { - if (!d->emitingEditingFinished) { - if (hasAcceptableInput() || d->fixup()) { - d->emitingEditingFinished = true; + if (hasAcceptableInput() || d->control->fixup()) emit editingFinished(); - d->emitingEditingFinished = false; - } - } #ifdef QT3_SUPPORT emit lostFocus(); #endif } #ifdef Q_WS_MAC - if (d->echoMode == Password || d->echoMode == NoEcho) + if (d->control->echoMode() == Password || d->control->echoMode() == NoEcho) qt_mac_secure_keyboard(false); #endif #ifdef QT_KEYPAD_NAVIGATION - d->origText = QString(); + d->control->setCancelText(QString()); #endif #ifndef QT_NO_COMPLETER - if (d->completer) { - QObject::disconnect(d->completer, 0, this, 0); + if (d->control->completer()) { + QObject::disconnect(d->control->completer(), 0, this, 0); } #endif update(); @@ -2508,24 +1791,19 @@ void QLineEdit::paintEvent(QPaintEvent *) Qt::Alignment va = QStyle::visualAlignment(layoutDirection(), QFlag(d->alignment)); switch (va & Qt::AlignVertical_Mask) { case Qt::AlignBottom: - d->vscroll = r.y() + r.height() - fm.height() - verticalMargin; + d->vscroll = r.y() + r.height() - fm.height() - d->verticalMargin; break; case Qt::AlignTop: - d->vscroll = r.y() + verticalMargin; + d->vscroll = r.y() + d->verticalMargin; break; default: //center d->vscroll = r.y() + (r.height() - fm.height() + 1) / 2; break; } - QRect lineRect(r.x() + horizontalMargin, d->vscroll, r.width() - 2*horizontalMargin, fm.height()); - QTextLine line = d->textLayout.lineAt(0); + QRect lineRect(r.x() + d->horizontalMargin, d->vscroll, r.width() - 2*d->horizontalMargin, fm.height()); - int cursor = d->cursor; - if (d->preeditCursor != -1) - cursor += d->preeditCursor; - // locate cursor position - int cix = qRound(line.cursorToX(cursor)); + int cix = qRound(d->control->cursorToX()); // horizontal scrolling. d->hscroll is the left indent from the beginning // of the text line to the left edge of lineRect. we update this value @@ -2535,7 +1813,7 @@ void QLineEdit::paintEvent(QPaintEvent *) // (cix). int minLB = qMax(0, -fm.minLeftBearing()); int minRB = qMax(0, -fm.minRightBearing()); - int widthUsed = qRound(line.naturalTextWidth()) + 1 + minRB; + int widthUsed = d->control->width() + minRB; if ((minLB + widthUsed) <= lineRect.width()) { // text fits in lineRect; use hscroll for alignment switch (va & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) { @@ -2563,7 +1841,7 @@ void QLineEdit::paintEvent(QPaintEvent *) d->hscroll = widthUsed - lineRect.width() + 1; } // the y offset is there to keep the baseline constant in case we have script changes in the text. - QPoint topLeft = lineRect.topLeft() - QPoint(d->hscroll, d->ascent - fm.ascent()); + QPoint topLeft = lineRect.topLeft() - QPoint(d->hscroll, d->control->ascent() - fm.ascent()); // draw text, selections and cursors #ifndef QT_NO_STYLE_STYLESHEET @@ -2573,33 +1851,23 @@ void QLineEdit::paintEvent(QPaintEvent *) #endif p.setPen(pal.text().color()); - QVector<QTextLayout::FormatRange> selections; + int flags = QLineControl::DrawText; + #ifdef QT_KEYPAD_NAVIGATION if (!QApplication::keypadNavigationEnabled() || hasEditFocus()) #endif - if (d->selstart < d->selend || (d->cursorVisible && d->maskData && !d->readOnly)) { - QTextLayout::FormatRange o; - if (d->selstart < d->selend) { - o.start = d->selstart; - o.length = d->selend - d->selstart; - o.format.setBackground(pal.brush(QPalette::Highlight)); - o.format.setForeground(pal.brush(QPalette::HighlightedText)); - } else { - // mask selection - o.start = d->cursor; - o.length = 1; - o.format.setBackground(pal.brush(QPalette::Text)); - o.format.setForeground(pal.brush(QPalette::Window)); - } - selections.append(o); - } + if (d->control->hasSelectedText() || (d->cursorVisible && !d->control->inputMask().isEmpty() && !d->control->isReadOnly())) + flags |= QLineControl::DrawSelections; // Asian users see an IM selection text as cursor on candidate // selection phase of input method, so the ordinary cursor should be // invisible if we have a preedit string. - d->textLayout.draw(&p, topLeft, selections, r); - if (d->cursorVisible && !d->readOnly && !d->hideCursor) - d->textLayout.drawCursor(&p, topLeft, cursor, style()->pixelMetric(QStyle::PM_TextCursorWidth)); + if (d->cursorVisible && !d->control->isReadOnly()) + flags |= QLineControl::DrawCursor; + + d->control->setCursorWidth(style()->pixelMetric(QStyle::PM_TextCursorWidth)); + d->control->draw(&p, topLeft, r, flags); + } @@ -2609,12 +1877,11 @@ void QLineEdit::paintEvent(QPaintEvent *) void QLineEdit::dragMoveEvent(QDragMoveEvent *e) { Q_D(QLineEdit); - if (!d->readOnly && e->mimeData()->hasFormat(QLatin1String("text/plain"))) { + if (!d->control->isReadOnly() && e->mimeData()->hasFormat(QLatin1String("text/plain"))) { e->acceptProposedAction(); - d->cursor = d->xToPos(e->pos().x()); + d->control->moveCursor(d->xToPos(e->pos().x()), false); d->cursorVisible = true; update(); - d->emitCursorPositionChanged(); } } @@ -2640,13 +1907,14 @@ void QLineEdit::dropEvent(QDropEvent* e) Q_D(QLineEdit); QString str = e->mimeData()->text(); - if (!str.isNull() && !d->readOnly) { + if (!str.isNull() && !d->control->isReadOnly()) { if (e->source() == this && e->dropAction() == Qt::CopyAction) deselect(); - d->cursor =d->xToPos(e->pos().x()); - int selStart = d->cursor; - int oldSelStart = d->selstart; - int oldSelEnd = d->selend; + int cursorPos = d->xToPos(e->pos().x()); + int selStart = cursorPos; + int oldSelStart = d->control->selectionStart(); + int oldSelEnd = d->control->selectionEnd(); + d->control->moveCursor(cursorPos, false); d->cursorVisible = false; e->acceptProposedAction(); insert(str); @@ -2668,22 +1936,6 @@ void QLineEdit::dropEvent(QDropEvent* e) } } -void QLineEditPrivate::drag() -{ - Q_Q(QLineEdit); - dndTimer.stop(); - QMimeData *data = new QMimeData; - data->setText(q->selectedText()); - QDrag *drag = new QDrag(q); - drag->setMimeData(data); - Qt::DropAction action = drag->start(); - if (action == Qt::MoveAction && !readOnly && drag->target() != q) { - int priorState = undoState; - removeSelectedText(); - finishChange(priorState); - } -} - #endif // QT_NO_DRAGANDDROP #ifndef QT_NO_CONTEXTMENU @@ -2728,37 +1980,39 @@ QMenu *QLineEdit::createStandardContextMenu() popup->setObjectName(QLatin1String("qt_edit_menu")); QAction *action = popup->addAction(QLineEdit::tr("&Undo") + ACCEL_KEY(QKeySequence::Undo)); - action->setEnabled(d->isUndoAvailable()); + action->setEnabled(d->control->isUndoAvailable()); connect(action, SIGNAL(triggered()), SLOT(undo())); action = popup->addAction(QLineEdit::tr("&Redo") + ACCEL_KEY(QKeySequence::Redo)); - action->setEnabled(d->isRedoAvailable()); + action->setEnabled(d->control->isRedoAvailable()); connect(action, SIGNAL(triggered()), SLOT(redo())); popup->addSeparator(); #ifndef QT_NO_CLIPBOARD action = popup->addAction(QLineEdit::tr("Cu&t") + ACCEL_KEY(QKeySequence::Cut)); - action->setEnabled(!d->readOnly && d->hasSelectedText() && d->echoMode == QLineEdit::Normal); + action->setEnabled(!d->control->isReadOnly() && d->control->hasSelectedText() + && d->control->echoMode() == QLineEdit::Normal); connect(action, SIGNAL(triggered()), SLOT(cut())); action = popup->addAction(QLineEdit::tr("&Copy") + ACCEL_KEY(QKeySequence::Copy)); - action->setEnabled(d->hasSelectedText() && d->echoMode == QLineEdit::Normal); + action->setEnabled(d->control->hasSelectedText() + && d->control->echoMode() == QLineEdit::Normal); connect(action, SIGNAL(triggered()), SLOT(copy())); action = popup->addAction(QLineEdit::tr("&Paste") + ACCEL_KEY(QKeySequence::Paste)); - action->setEnabled(!d->readOnly && !QApplication::clipboard()->text().isEmpty()); + action->setEnabled(!d->control->isReadOnly() && !QApplication::clipboard()->text().isEmpty()); connect(action, SIGNAL(triggered()), SLOT(paste())); #endif action = popup->addAction(QLineEdit::tr("Delete")); - action->setEnabled(!d->readOnly && !d->text.isEmpty() && d->hasSelectedText()); + action->setEnabled(!d->control->isReadOnly() && !d->control->text().isEmpty() && d->control->hasSelectedText()); connect(action, SIGNAL(triggered()), SLOT(_q_deleteSelected())); popup->addSeparator(); action = popup->addAction(QLineEdit::tr("Select All") + ACCEL_KEY(QKeySequence::SelectAll)); - action->setEnabled(!d->text.isEmpty() && !d->allSelected()); + action->setEnabled(!d->control->text().isEmpty() && !d->control->allSelected()); d->selectAllAction = action; connect(action, SIGNAL(triggered()), SLOT(selectAll())); @@ -2772,9 +2026,9 @@ QMenu *QLineEdit::createStandardContextMenu() #endif #if defined(Q_WS_WIN) - if (!d->readOnly && qt_use_rtl_extensions) { + if (!d->control->isReadOnly() && qt_use_rtl_extensions) { #else - if (!d->readOnly) { + if (!d->control->isReadOnly()) { #endif popup->addSeparator(); QUnicodeControlCharacterMenu *ctrlCharacterMenu = new QUnicodeControlCharacterMenu(this, popup); @@ -2788,807 +2042,26 @@ QMenu *QLineEdit::createStandardContextMenu() void QLineEdit::changeEvent(QEvent *ev) { Q_D(QLineEdit); - if(ev->type() == QEvent::ActivationChange) { + switch(ev->type()) + { + case QEvent::ActivationChange: if (!palette().isEqual(QPalette::Active, QPalette::Inactive)) update(); - } else if (ev->type() == QEvent::FontChange - || ev->type() == QEvent::StyleChange - || ev->type() == QEvent::LayoutDirectionChange) { - d->updateTextLayout(); - } - QWidget::changeEvent(ev); -} - -void QLineEditPrivate::_q_handleWindowActivate() -{ - Q_Q(QLineEdit); - if (!q->hasFocus() && q->hasSelectedText()) - q->deselect(); -} - -void QLineEditPrivate::_q_deleteSelected() -{ - Q_Q(QLineEdit); - if (!hasSelectedText()) - return; - - int priorState = undoState; - q->resetInputContext(); - removeSelectedText(); - separate(); - finishChange(priorState); -} - -void QLineEditPrivate::init(const QString& txt) -{ - Q_Q(QLineEdit); -#ifndef QT_NO_CURSOR - q->setCursor(Qt::IBeamCursor); -#endif - q->setFocusPolicy(Qt::StrongFocus); - q->setAttribute(Qt::WA_InputMethodEnabled); - // Specifies that this widget can use more, but is able to survive on - // less, horizontal space; and is fixed vertically. - q->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed, QSizePolicy::LineEdit)); - q->setBackgroundRole(QPalette::Base); - q->setAttribute(Qt::WA_KeyCompression); - q->setMouseTracking(true); - q->setAcceptDrops(true); - text = txt; - updateTextLayout(); - cursor = text.length(); - - q->setAttribute(Qt::WA_MacShowFocusRect); -} - -void QLineEditPrivate::updatePasswordEchoEditing(bool editing) -{ - Q_Q(QLineEdit); - passwordEchoEditing = editing; - q->setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(q)); - updateTextLayout(); - q->update(); -} - -void QLineEditPrivate::updateTextLayout() -{ - // replace certain non-printable characters with spaces (to avoid - // drawing boxes when using fonts that don't have glyphs for such - // characters) - Q_Q(QLineEdit); - QString str = q->displayText(); - QChar* uc = str.data(); - for (int i = 0; i < (int)str.length(); ++i) { - if ((uc[i] < 0x20 && uc[i] != 0x09) - || uc[i] == QChar::LineSeparator - || uc[i] == QChar::ParagraphSeparator - || uc[i] == QChar::ObjectReplacementCharacter) - uc[i] = QChar(0x0020); - } - textLayout.setFont(q->font()); - textLayout.setText(str); - QTextOption option; - option.setTextDirection(q->layoutDirection()); - option.setFlags(QTextOption::IncludeTrailingSpaces); - textLayout.setTextOption(option); - - textLayout.beginLayout(); - QTextLine l = textLayout.createLine(); - textLayout.endLayout(); - ascent = qRound(l.ascent()); -} - -int QLineEditPrivate::xToPos(int x, QTextLine::CursorPosition betweenOrOn) const -{ - QRect cr = adjustedContentsRect(); - x-= cr.x() - hscroll + horizontalMargin; - QTextLine l = textLayout.lineAt(0); - return l.xToCursor(x, betweenOrOn); -} - -QRect QLineEditPrivate::cursorRect() const -{ - Q_Q(const QLineEdit); - QRect cr = adjustedContentsRect(); - int cix = cr.x() - hscroll + horizontalMargin; - QTextLine l = textLayout.lineAt(0); - int c = cursor; - if (preeditCursor != -1) - c += preeditCursor; - cix += qRound(l.cursorToX(c)); - int ch = qMin(cr.height(), q->fontMetrics().height() + 1); - int w = q->style()->pixelMetric(QStyle::PM_TextCursorWidth); - return QRect(cix-5, vscroll, w + 9, ch); -} - -QRect QLineEditPrivate::adjustedContentsRect() const -{ - Q_Q(const QLineEdit); - QStyleOptionFrameV2 opt; - q->initStyleOption(&opt); - QRect r = q->style()->subElementRect(QStyle::SE_LineEditContents, &opt, q); - r.setX(r.x() + leftTextMargin); - r.setY(r.y() + topTextMargin); - r.setRight(r.right() - rightTextMargin); - r.setBottom(r.bottom() - bottomTextMargin); - return r; -} - -bool QLineEditPrivate::fixup() // this function assumes that validate currently returns != Acceptable -{ -#ifndef QT_NO_VALIDATOR - if (validator) { - QString textCopy = text; - int cursorCopy = cursor; - validator->fixup(textCopy); - if (validator->validate(textCopy, cursorCopy) == QValidator::Acceptable) { - if (textCopy != text || cursorCopy != cursor) - setText(textCopy, cursorCopy); - return true; - } - } -#endif - return false; -} - -void QLineEditPrivate::moveCursor(int pos, bool mark) -{ - Q_Q(QLineEdit); - if (pos != cursor) { - separate(); - if (maskData) - pos = pos > cursor ? nextMaskBlank(pos) : prevMaskBlank(pos); - } - bool fullUpdate = mark || hasSelectedText(); - if (mark) { - int anchor; - if (selend > selstart && cursor == selstart) - anchor = selend; - else if (selend > selstart && cursor == selend) - anchor = selstart; - else - anchor = cursor; - selstart = qMin(anchor, pos); - selend = qMax(anchor, pos); - updateTextLayout(); - } else { - deselect(); - } - if (fullUpdate) { - cursor = pos; - q->update(); - } else { - setCursorVisible(false); - cursor = pos; - setCursorVisible(true); - if (!adjustedContentsRect().contains(cursorRect())) - q->update(); - } - QStyleOptionFrameV2 opt; - q->initStyleOption(&opt); - if (mark && !q->style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, q)) - setCursorVisible(false); - if (mark || selDirty) { - selDirty = false; - emit q->selectionChanged(); - } - q->updateMicroFocus(); - emitCursorPositionChanged(); -} - -void QLineEditPrivate::finishChange(int validateFromState, bool update, bool edited) -{ - Q_Q(QLineEdit); - bool lineDirty = selDirty; - if (textDirty) { - // do validation - bool wasValidInput = validInput; - validInput = true; -#ifndef QT_NO_VALIDATOR - if (validator) { - validInput = false; - QString textCopy = text; - int cursorCopy = cursor; - validInput = (validator->validate(textCopy, cursorCopy) != QValidator::Invalid); - if (validInput) { - if (text != textCopy) { - setText(textCopy, cursorCopy); - return; - } - cursor = cursorCopy; - } - } -#endif - if (validateFromState >= 0 && wasValidInput && !validInput) { - undo(validateFromState); - history.resize(undoState); - if (modifiedState > undoState) - modifiedState = -1; - validInput = true; - textDirty = false; - } - updateTextLayout(); - lineDirty |= textDirty; - if (textDirty) { - textDirty = false; - QString actualText = maskData ? stripString(text) : text; - if (edited) - emit q->textEdited(actualText); - q->updateMicroFocus(); -#ifndef QT_NO_COMPLETER - if (edited && completer && completer->completionMode() != QCompleter::InlineCompletion) - complete(-1); // update the popup on cut/paste/del -#endif - emit q->textChanged(actualText); - } -#ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(q, 0, QAccessible::ValueChanged); -#endif - } - if (selDirty) { - selDirty = false; - emit q->selectionChanged(); - } - if (lineDirty || update) - q->update(); - emitCursorPositionChanged(); -} - -void QLineEditPrivate::emitCursorPositionChanged() -{ - Q_Q(QLineEdit); - if (cursor != lastCursorPos) { - const int oldLast = lastCursorPos; - lastCursorPos = cursor; - emit q->cursorPositionChanged(oldLast, cursor); - } -} - -void QLineEditPrivate::setText(const QString& txt, int pos, bool edited) -{ - Q_Q(QLineEdit); - q->resetInputContext(); - deselect(); - QString oldText = text; - if (maskData) { - text = maskString(0, txt, true); - text += clearString(text.length(), maxLength - text.length()); - } else { - text = txt.isEmpty() ? txt : txt.left(maxLength); - } - history.clear(); - modifiedState = undoState = 0; - cursor = (pos < 0 || pos > text.length()) ? text.length() : pos; - textDirty = (oldText != text); - finishChange(-1, true, edited); -} - - -void QLineEditPrivate::setCursorVisible(bool visible) -{ - Q_Q(QLineEdit); - if ((bool)cursorVisible == visible) - return; - if (cursorTimer) - cursorVisible = visible; - QRect r = cursorRect(); - if (maskData) - q->update(); - else - q->update(r); -} - -void QLineEditPrivate::addCommand(const Command& cmd) -{ - if (separator && undoState && history[undoState-1].type != Separator) { - history.resize(undoState + 2); - history[undoState++] = Command(Separator, cursor, 0, selstart, selend); - } else { - history.resize(undoState + 1); - } - separator = false; - history[undoState++] = cmd; -} - -void QLineEditPrivate::insert(const QString& s) -{ - if (hasSelectedText()) - addCommand(Command(SetSelection, cursor, 0, selstart, selend)); - if (maskData) { - QString ms = maskString(cursor, s); - for (int i = 0; i < (int) ms.length(); ++i) { - addCommand (Command(DeleteSelection, cursor+i, text.at(cursor+i), -1, -1)); - addCommand(Command(Insert, cursor+i, ms.at(i), -1, -1)); - } - text.replace(cursor, ms.length(), ms); - cursor += ms.length(); - cursor = nextMaskBlank(cursor); - textDirty = true; - } else { - int remaining = maxLength - text.length(); - if (remaining != 0) { - text.insert(cursor, s.left(remaining)); - for (int i = 0; i < (int) s.left(remaining).length(); ++i) - addCommand(Command(Insert, cursor++, s.at(i), -1, -1)); - textDirty = true; - } - } -} - -void QLineEditPrivate::del(bool wasBackspace) -{ - if (cursor < (int) text.length()) { - if (hasSelectedText()) - addCommand(Command(SetSelection, cursor, 0, selstart, selend)); - addCommand (Command((CommandType)((maskData?2:0)+(wasBackspace?Remove:Delete)), cursor, text.at(cursor), -1, -1)); - if (maskData) { - text.replace(cursor, 1, clearString(cursor, 1)); - addCommand(Command(Insert, cursor, text.at(cursor), -1, -1)); - } else { - text.remove(cursor, 1); - } - textDirty = true; - } -} - -void QLineEditPrivate::removeSelectedText() -{ - if (selstart < selend && selend <= (int) text.length()) { - separate(); - int i ; - addCommand(Command(SetSelection, cursor, 0, selstart, selend)); - if (selstart <= cursor && cursor < selend) { - // cursor is within the selection. Split up the commands - // to be able to restore the correct cursor position - for (i = cursor; i >= selstart; --i) - addCommand (Command(DeleteSelection, i, text.at(i), -1, 1)); - for (i = selend - 1; i > cursor; --i) - addCommand (Command(DeleteSelection, i - cursor + selstart - 1, text.at(i), -1, -1)); - } else { - for (i = selend-1; i >= selstart; --i) - addCommand (Command(RemoveSelection, i, text.at(i), -1, -1)); - } - if (maskData) { - text.replace(selstart, selend - selstart, clearString(selstart, selend - selstart)); - for (int i = 0; i < selend - selstart; ++i) - addCommand(Command(Insert, selstart + i, text.at(selstart + i), -1, -1)); - } else { - text.remove(selstart, selend - selstart); - } - if (cursor > selstart) - cursor -= qMin(cursor, selend) - selstart; - deselect(); - textDirty = true; - - // adjust hscroll to avoid gap - const int minRB = qMax(0, -q_func()->fontMetrics().minRightBearing()); - updateTextLayout(); - const QTextLine line = textLayout.lineAt(0); - const int widthUsed = qRound(line.naturalTextWidth()) + 1 + minRB; - hscroll = qMin(hscroll, widthUsed); - } -} - -void QLineEditPrivate::parseInputMask(const QString &maskFields) -{ - int delimiter = maskFields.indexOf(QLatin1Char(';')); - if (maskFields.isEmpty() || delimiter == 0) { - if (maskData) { - delete [] maskData; - maskData = 0; - maxLength = 32767; - setText(QString()); - } - return; - } - - if (delimiter == -1) { - blank = QLatin1Char(' '); - inputMask = maskFields; - } else { - inputMask = maskFields.left(delimiter); - blank = (delimiter + 1 < maskFields.length()) ? maskFields[delimiter + 1] : QLatin1Char(' '); - } - - // calculate maxLength / maskData length - maxLength = 0; - QChar c = 0; - for (int i=0; i<inputMask.length(); i++) { - c = inputMask.at(i); - if (i > 0 && inputMask.at(i-1) == QLatin1Char('\\')) { - maxLength++; - continue; - } - if (c != QLatin1Char('\\') && c != QLatin1Char('!') && - c != QLatin1Char('<') && c != QLatin1Char('>') && - c != QLatin1Char('{') && c != QLatin1Char('}') && - c != QLatin1Char('[') && c != QLatin1Char(']')) - maxLength++; - } - - delete [] maskData; - maskData = new MaskInputData[maxLength]; - - MaskInputData::Casemode m = MaskInputData::NoCaseMode; - c = 0; - bool s; - bool escape = false; - int index = 0; - for (int i = 0; i < inputMask.length(); i++) { - c = inputMask.at(i); - if (escape) { - s = true; - maskData[index].maskChar = c; - maskData[index].separator = s; - maskData[index].caseMode = m; - index++; - escape = false; - } else if (c == QLatin1Char('<')) { - m = MaskInputData::Lower; - } else if (c == QLatin1Char('>')) { - m = MaskInputData::Upper; - } else if (c == QLatin1Char('!')) { - m = MaskInputData::NoCaseMode; - } else if (c != QLatin1Char('{') && c != QLatin1Char('}') && c != QLatin1Char('[') && c != QLatin1Char(']')) { - switch (c.unicode()) { - case 'A': - case 'a': - case 'N': - case 'n': - case 'X': - case 'x': - case '9': - case '0': - case 'D': - case 'd': - case '#': - case 'H': - case 'h': - case 'B': - case 'b': - s = false; - break; - case '\\': - escape = true; - default: - s = true; - break; - } - - if (!escape) { - maskData[index].maskChar = c; - maskData[index].separator = s; - maskData[index].caseMode = m; - index++; - } - } - } - setText(text); -} - - -/* checks if the key is valid compared to the inputMask */ -bool QLineEditPrivate::isValidInput(QChar key, QChar mask) const -{ - switch (mask.unicode()) { - case 'A': - if (key.isLetter()) - return true; break; - case 'a': - if (key.isLetter() || key == blank) - return true; - break; - case 'N': - if (key.isLetterOrNumber()) - return true; - break; - case 'n': - if (key.isLetterOrNumber() || key == blank) - return true; - break; - case 'X': - if (key.isPrint()) - return true; - break; - case 'x': - if (key.isPrint() || key == blank) - return true; - break; - case '9': - if (key.isNumber()) - return true; - break; - case '0': - if (key.isNumber() || key == blank) - return true; - break; - case 'D': - if (key.isNumber() && key.digitValue() > 0) - return true; + case QEvent::FontChange: + d->control->setFont(font()); break; - case 'd': - if ((key.isNumber() && key.digitValue() > 0) || key == blank) - return true; - break; - case '#': - if (key.isNumber() || key == QLatin1Char('+') || key == QLatin1Char('-') || key == blank) - return true; - break; - case 'B': - if (key == QLatin1Char('0') || key == QLatin1Char('1')) - return true; - break; - case 'b': - if (key == QLatin1Char('0') || key == QLatin1Char('1') || key == blank) - return true; - break; - case 'H': - if (key.isNumber() || (key >= QLatin1Char('a') && key <= QLatin1Char('f')) || (key >= QLatin1Char('A') && key <= QLatin1Char('F'))) - return true; + case QEvent::StyleChange: + d->control->setPasswordCharacter(style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter)); + update(); break; - case 'h': - if (key.isNumber() || (key >= QLatin1Char('a') && key <= QLatin1Char('f')) || (key >= QLatin1Char('A') && key <= QLatin1Char('F')) || key == blank) - return true; + case QEvent::LayoutDirectionChange: + d->control->setLayoutDirection(layoutDirection()); break; default: break; } - return false; -} - -bool QLineEditPrivate::hasAcceptableInput(const QString &str) const -{ -#ifndef QT_NO_VALIDATOR - QString textCopy = str; - int cursorCopy = cursor; - if (validator && validator->validate(textCopy, cursorCopy) - != QValidator::Acceptable) - return false; -#endif - - if (!maskData) - return true; - - if (str.length() != maxLength) - return false; - - for (int i=0; i < maxLength; ++i) { - if (maskData[i].separator) { - if (str.at(i) != maskData[i].maskChar) - return false; - } else { - if (!isValidInput(str.at(i), maskData[i].maskChar)) - return false; - } - } - return true; -} - -/* - Applies the inputMask on \a str starting from position \a pos in the mask. \a clear - specifies from where characters should be gotten when a separator is met in \a str - true means - that blanks will be used, false that previous input is used. - Calling this when no inputMask is set is undefined. -*/ -QString QLineEditPrivate::maskString(uint pos, const QString &str, bool clear) const -{ - if (pos >= (uint)maxLength) - return QString::fromLatin1(""); - - QString fill; - fill = clear ? clearString(0, maxLength) : text; - - int strIndex = 0; - QString s = QString::fromLatin1(""); - int i = pos; - while (i < maxLength) { - if (strIndex < str.length()) { - if (maskData[i].separator) { - s += maskData[i].maskChar; - if (str[(int)strIndex] == maskData[i].maskChar) - strIndex++; - ++i; - } else { - if (isValidInput(str[(int)strIndex], maskData[i].maskChar)) { - switch (maskData[i].caseMode) { - case MaskInputData::Upper: - s += str[(int)strIndex].toUpper(); - break; - case MaskInputData::Lower: - s += str[(int)strIndex].toLower(); - break; - default: - s += str[(int)strIndex]; - } - ++i; - } else { - // search for separator first - int n = findInMask(i, true, true, str[(int)strIndex]); - if (n != -1) { - if (str.length() != 1 || i == 0 || (i > 0 && (!maskData[i-1].separator || maskData[i-1].maskChar != str[(int)strIndex]))) { - s += fill.mid(i, n-i+1); - i = n + 1; // update i to find + 1 - } - } else { - // search for valid blank if not - n = findInMask(i, true, false, str[(int)strIndex]); - if (n != -1) { - s += fill.mid(i, n-i); - switch (maskData[n].caseMode) { - case MaskInputData::Upper: - s += str[(int)strIndex].toUpper(); - break; - case MaskInputData::Lower: - s += str[(int)strIndex].toLower(); - break; - default: - s += str[(int)strIndex]; - } - i = n + 1; // updates i to find + 1 - } - } - } - strIndex++; - } - } else - break; - } - - return s; -} - - - -/* - Returns a "cleared" string with only separators and blank chars. - Calling this when no inputMask is set is undefined. -*/ -QString QLineEditPrivate::clearString(uint pos, uint len) const -{ - if (pos >= (uint)maxLength) - return QString(); - - QString s; - int end = qMin((uint)maxLength, pos + len); - for (int i=pos; i<end; i++) - if (maskData[i].separator) - s += maskData[i].maskChar; - else - s += blank; - - return s; -} - -/* - Strips blank parts of the input in a QLineEdit when an inputMask is set, - separators are still included. Typically "127.0__.0__.1__" becomes "127.0.0.1". -*/ -QString QLineEditPrivate::stripString(const QString &str) const -{ - if (!maskData) - return str; - - QString s; - int end = qMin(maxLength, (int)str.length()); - for (int i=0; i < end; i++) - if (maskData[i].separator) - s += maskData[i].maskChar; - else - if (str[i] != blank) - s += str[i]; - - return s; -} - -/* searches forward/backward in maskData for either a separator or a blank */ -int QLineEditPrivate::findInMask(int pos, bool forward, bool findSeparator, QChar searchChar) const -{ - if (pos >= maxLength || pos < 0) - return -1; - - int end = forward ? maxLength : -1; - int step = forward ? 1 : -1; - int i = pos; - - while (i != end) { - if (findSeparator) { - if (maskData[i].separator && maskData[i].maskChar == searchChar) - return i; - } else { - if (!maskData[i].separator) { - if (searchChar.isNull()) - return i; - else if (isValidInput(searchChar, maskData[i].maskChar)) - return i; - } - } - i += step; - } - return -1; -} - -void QLineEditPrivate::undo(int until) -{ - if (!isUndoAvailable()) - return; - deselect(); - while (undoState && undoState > until) { - Command& cmd = history[--undoState]; - switch (cmd.type) { - case Insert: - text.remove(cmd.pos, 1); - cursor = cmd.pos; - break; - case SetSelection: - selstart = cmd.selStart; - selend = cmd.selEnd; - cursor = cmd.pos; - break; - case Remove: - case RemoveSelection: - text.insert(cmd.pos, cmd.uc); - cursor = cmd.pos + 1; - break; - case Delete: - case DeleteSelection: - text.insert(cmd.pos, cmd.uc); - cursor = cmd.pos; - break; - case Separator: - continue; - } - if (until < 0 && undoState) { - Command& next = history[undoState-1]; - if (next.type != cmd.type && next.type < RemoveSelection - && (cmd.type < RemoveSelection || next.type == Separator)) - break; - } - } - textDirty = true; - emitCursorPositionChanged(); -} - -void QLineEditPrivate::redo() { - if (!isRedoAvailable()) - return; - deselect(); - while (undoState < (int)history.size()) { - Command& cmd = history[undoState++]; - switch (cmd.type) { - case Insert: - text.insert(cmd.pos, cmd.uc); - cursor = cmd.pos + 1; - break; - case SetSelection: - selstart = cmd.selStart; - selend = cmd.selEnd; - cursor = cmd.pos; - break; - case Remove: - case Delete: - case RemoveSelection: - case DeleteSelection: - text.remove(cmd.pos, 1); - selstart = cmd.selStart; - selend = cmd.selEnd; - cursor = cmd.pos; - break; - case Separator: - selstart = cmd.selStart; - selend = cmd.selEnd; - cursor = cmd.pos; - break; - } - if (undoState < (int)history.size()) { - Command& next = history[undoState]; - if (next.type != cmd.type && cmd.type < RemoveSelection && next.type != Separator - && (next.type < RemoveSelection || cmd.type == Separator)) - break; - } - } - textDirty = true; - emitCursorPositionChanged(); + QWidget::changeEvent(ev); } /*! diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h index a97dc9a425..daac6a753c 100644 --- a/src/gui/widgets/qlineedit.h +++ b/src/gui/widgets/qlineedit.h @@ -268,6 +268,8 @@ private: Q_DECLARE_PRIVATE(QLineEdit) Q_PRIVATE_SLOT(d_func(), void _q_handleWindowActivate()) Q_PRIVATE_SLOT(d_func(), void _q_deleteSelected()) + Q_PRIVATE_SLOT(d_func(), void _q_textEdited(const QString &)) + Q_PRIVATE_SLOT(d_func(), void _q_cursorPositionChanged(int, int)) #ifndef QT_NO_COMPLETER Q_PRIVATE_SLOT(d_func(), void _q_completionHighlighted(QString)) #endif diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp new file mode 100644 index 0000000000..0e39304618 --- /dev/null +++ b/src/gui/widgets/qlineedit_p.cpp @@ -0,0 +1,253 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qlineedit.h" +#include "qlineedit_p.h" + +#ifndef QT_NO_LINEEDIT + +#include "qabstractitemview.h" +#include "qclipboard.h" +#ifndef QT_NO_ACCESSIBILITY +#include "qaccessible.h" +#endif +#ifndef QT_NO_IM +#include "qinputcontext.h" +#include "qlist.h" +#endif + +QT_BEGIN_NAMESPACE + +const int QLineEditPrivate::verticalMargin(1); +const int QLineEditPrivate::horizontalMargin(2); + +int QLineEditPrivate::xToPos(int x, QTextLine::CursorPosition betweenOrOn) const +{ + QRect cr = adjustedContentsRect(); + x-= cr.x() - hscroll + horizontalMargin; + return control->xToPos(x, betweenOrOn); +} + +QRect QLineEditPrivate::cursorRect() const +{ + QRect cr = adjustedContentsRect(); + int cix = cr.x() - hscroll + horizontalMargin; + QRect crect = control->cursorRect(); + crect.moveTo(crect.topLeft() + QPoint(cix, vscroll)); + return crect; +} + +#ifndef QT_NO_COMPLETER + +void QLineEditPrivate::_q_completionHighlighted(QString newText) +{ + Q_Q(QLineEdit); + if (control->completer()->completionMode() != QCompleter::InlineCompletion) { + q->setText(newText); + } else { + int c = control->cursor(); + QString text = control->text(); + q->setText(text.left(c) + newText.mid(c)); + control->moveCursor(control->end(), false); + control->moveCursor(c, true); + } +} + +#endif // QT_NO_COMPLETER + +void QLineEditPrivate::_q_clipboardChanged() +{ +} + +void QLineEditPrivate::_q_handleWindowActivate() +{ + Q_Q(QLineEdit); + if (!q->hasFocus() && control->hasSelectedText()) + control->deselect(); +} + +void QLineEditPrivate::_q_deleteSelected() +{ +} + +void QLineEditPrivate::_q_textEdited(const QString &text) +{ + Q_Q(QLineEdit); +#ifndef QT_NO_COMPLETER + if (control->completer() && + control->completer()->completionMode() != QCompleter::InlineCompletion) + control->complete(-1); // update the popup on cut/paste/del +#endif + emit q->textEdited(text); +} + +void QLineEditPrivate::_q_cursorPositionChanged(int from, int to) +{ + Q_Q(QLineEdit); + q->update(); + emit q->cursorPositionChanged(from, to); +} + +void QLineEditPrivate::init(const QString& txt) +{ + Q_Q(QLineEdit); + control = new QLineControl(txt); + QObject::connect(control, SIGNAL(textChanged(const QString &)), + q, SIGNAL(textChanged(const QString &))); + QObject::connect(control, SIGNAL(textEdited(const QString &)), + q, SLOT(_q_textEdited(const QString &))); + QObject::connect(control, SIGNAL(cursorPositionChanged(int, int)), + q, SLOT(_q_cursorPositionChanged(int, int))); + QObject::connect(control, SIGNAL(selectionChanged()), + q, SIGNAL(selectionChanged())); + QObject::connect(control, SIGNAL(accepted()), + q, SIGNAL(returnPressed())); + QObject::connect(control, SIGNAL(editingFinished()), + q, SIGNAL(editingFinished())); + + // for now, going completely overboard with updates. + QObject::connect(control, SIGNAL(selectionChanged()), + q, SLOT(update())); + + QObject::connect(control, SIGNAL(displayTextChanged(const QString &)), + q, SLOT(update())); + control->setPasswordCharacter(q->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter)); +#ifndef QT_NO_CURSOR + q->setCursor(Qt::IBeamCursor); +#endif + q->setFocusPolicy(Qt::StrongFocus); + q->setAttribute(Qt::WA_InputMethodEnabled); + // Specifies that this widget can use more, but is able to survive on + // less, horizontal space; and is fixed vertically. + q->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed, QSizePolicy::LineEdit)); + q->setBackgroundRole(QPalette::Base); + q->setAttribute(Qt::WA_KeyCompression); + q->setMouseTracking(true); + q->setAcceptDrops(true); + + q->setAttribute(Qt::WA_MacShowFocusRect); +} + +QRect QLineEditPrivate::adjustedContentsRect() const +{ + Q_Q(const QLineEdit); + QStyleOptionFrameV2 opt; + q->initStyleOption(&opt); + QRect r = q->style()->subElementRect(QStyle::SE_LineEditContents, &opt, q); + r.setX(r.x() + leftTextMargin); + r.setY(r.y() + topTextMargin); + r.setRight(r.right() - rightTextMargin); + r.setBottom(r.bottom() - bottomTextMargin); + return r; +} + +void QLineEditPrivate::setCursorVisible(bool visible) +{ + Q_Q(QLineEdit); + if ((bool)cursorVisible == visible) + return; + cursorVisible = visible; + QRect r = cursorRect(); + if (control->inputMask().isEmpty()) + q->update(r); + else + q->update(); +} + +void QLineEditPrivate::updatePasswordEchoEditing(bool editing) +{ + Q_Q(QLineEdit); + control->updatePasswordEchoEditing(editing); + q->setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod()); +} + +/*! + This function is not intended as polymorphic usage. Just a shared code + fragment that calls QInputContext::mouseHandler for this + class. +*/ +bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e ) +{ +#if !defined QT_NO_IM + Q_Q(QLineEdit); + if ( control->composeMode() ) { + int tmp_cursor = xToPos(e->pos().x()); + int mousePos = tmp_cursor - control->cursor(); + if ( mousePos < 0 || mousePos > control->preeditAreaText().length() ) { + mousePos = -1; + // don't send move events outside the preedit area + if ( e->type() == QEvent::MouseMove ) + return true; + } + + QInputContext *qic = q->inputContext(); + if ( qic ) + // may be causing reset() in some input methods + qic->mouseHandler(mousePos, e); + if (!control->preeditAreaText().isEmpty()) + return true; + } +#else + Q_UNUSED(e); +#endif + + return false; +} + +#ifndef QT_NO_DRAGANDDROP +void QLineEditPrivate::drag() +{ + Q_Q(QLineEdit); + dndTimer.stop(); + QMimeData *data = new QMimeData; + data->setText(control->selectedText()); + QDrag *drag = new QDrag(q); + drag->setMimeData(data); + Qt::DropAction action = drag->start(); + if (action == Qt::MoveAction && !control->isReadOnly() && drag->target() != q) + control->removeSelection(); +} + +#endif // QT_NO_DRAGANDDROP + +QT_END_NAMESPACE + +#endif diff --git a/src/gui/widgets/qlineedit_p.h b/src/gui/widgets/qlineedit_p.h index 03029f9dcf..230023de3a 100644 --- a/src/gui/widgets/qlineedit_p.h +++ b/src/gui/widgets/qlineedit_p.h @@ -65,6 +65,8 @@ #include "QtCore/qpointer.h" #include "QtGui/qlineedit.h" +#include "private/qlinecontrol_p.h" + QT_BEGIN_NAMESPACE class QLineEditPrivate : public QWidgetPrivate @@ -73,169 +75,64 @@ class QLineEditPrivate : public QWidgetPrivate public: QLineEditPrivate() - : cursor(0), preeditCursor(0), cursorTimer(0), frame(1), - cursorVisible(0), hideCursor(false), separator(0), readOnly(0), - dragEnabled(0), contextMenuEnabled(1), echoMode(0), textDirty(0), - selDirty(0), validInput(1), clickCausedFocus(0), - alignment(Qt::AlignLeading | Qt::AlignVCenter), ascent(0), - maxLength(32767), hscroll(0), vscroll(0), lastCursorPos(-1), maskData(0), - modifiedState(0), undoState(0), selstart(0), selend(0), userInput(false), - emitingEditingFinished(false), passwordEchoEditing(false) -#ifndef QT_NO_COMPLETER - , completer(0) -#endif - , leftTextMargin(0), topTextMargin(0), rightTextMargin(0), bottomTextMargin(0) - { - } + : control(0), frame(1), contextMenuEnabled(1), cursorVisible(0), + dragEnabled(0), hscroll(0), vscroll(0), + alignment(Qt::AlignLeading | Qt::AlignVCenter), + leftTextMargin(0), topTextMargin(0), rightTextMargin(0), bottomTextMargin(0) + { + } ~QLineEditPrivate() { - delete [] maskData; } + + QLineControl *control; + +#ifndef QT_NO_CONTEXTMENU + QPointer<QAction> selectAllAction; +#endif void init(const QString&); - QString text; - int cursor; - int preeditCursor; - int cursorTimer; // -1 for non blinking cursor. + int xToPos(int x, QTextLine::CursorPosition = QTextLine::CursorBetweenCharacters) const; + QRect cursorRect() const; + void setCursorVisible(bool visible); + + void updatePasswordEchoEditing(bool); + + inline bool shouldEnableInputMethod() const + { + return !control->isReadOnly() && (control->echoMode() == QLineEdit::Normal || control->echoMode() == QLineEdit::PasswordEchoOnEdit); + } + QPoint tripleClick; QBasicTimer tripleClickTimer; uint frame : 1; + uint contextMenuEnabled : 1; uint cursorVisible : 1; - uint hideCursor : 1; // used to hide the cursor inside preedit areas - uint separator : 1; - uint readOnly : 1; uint dragEnabled : 1; - uint contextMenuEnabled : 1; - uint echoMode : 2; - uint textDirty : 1; - uint selDirty : 1; - uint validInput : 1; - uint clickCausedFocus : 1; - uint alignment; - int ascent; - int maxLength; int hscroll; int vscroll; - int lastCursorPos; - -#ifndef QT_NO_CONTEXTMENU - QPointer<QAction> selectAllAction; -#endif + uint alignment; + static const int verticalMargin; + static const int horizontalMargin; - inline void emitCursorPositionChanged(); bool sendMouseEventToInputContext(QMouseEvent *e); - void finishChange(int validateFromState = -1, bool update = false, bool edited = true); - - QPointer<QValidator> validator; - struct MaskInputData { - enum Casemode { NoCaseMode, Upper, Lower }; - QChar maskChar; // either the separator char or the inputmask - bool separator; - Casemode caseMode; - }; - QString inputMask; - QChar blank; - MaskInputData *maskData; - inline int nextMaskBlank(int pos) { - int c = findInMask(pos, true, false); - separator |= (c != pos); - return (c != -1 ? c : maxLength); - } - inline int prevMaskBlank(int pos) { - int c = findInMask(pos, false, false); - separator |= (c != pos); - return (c != -1 ? c : 0); - } - - void setCursorVisible(bool visible); - - - // undo/redo handling - enum CommandType { Separator, Insert, Remove, Delete, RemoveSelection, DeleteSelection, SetSelection }; - struct Command { - inline Command() {} - inline Command(CommandType t, int p, QChar c, int ss, int se) : type(t),uc(c),pos(p),selStart(ss),selEnd(se) {} - uint type : 4; - QChar uc; - int pos, selStart, selEnd; - }; - int modifiedState; - int undoState; - QVector<Command> history; - void addCommand(const Command& cmd); - void insert(const QString& s); - void del(bool wasBackspace = false); - void remove(int pos); - - inline void separate() { separator = true; } - void undo(int until = -1); - void redo(); - inline bool isUndoAvailable() const { return !readOnly && undoState; } - inline bool isRedoAvailable() const { return !readOnly && undoState < (int)history.size(); } - - // selection - int selstart, selend; - inline bool allSelected() const { return !text.isEmpty() && selstart == 0 && selend == (int)text.length(); } - inline bool hasSelectedText() const { return !text.isEmpty() && selend > selstart; } - inline void deselect() { selDirty |= (selend > selstart); selstart = selend = 0; } - void removeSelectedText(); -#ifndef QT_NO_CLIPBOARD - void copy(bool clipboard = true) const; -#endif - inline bool inSelection(int x) const - { if (selstart >= selend) return false; - int pos = xToPos(x, QTextLine::CursorOnCharacter); return pos >= selstart && pos < selend; } - - // masking - void parseInputMask(const QString &maskFields); - bool isValidInput(QChar key, QChar mask) const; - bool hasAcceptableInput(const QString &text) const; - QString maskString(uint pos, const QString &str, bool clear = false) const; - QString clearString(uint pos, uint len) const; - QString stripString(const QString &str) const; - int findInMask(int pos, bool forward, bool findSeparator, QChar searchChar = QChar()) const; - - // input methods - bool composeMode() const { return !textLayout.preeditAreaText().isEmpty(); } - - // complex text layout - QTextLayout textLayout; - void updateTextLayout(); - void moveCursor(int pos, bool mark = false); - void setText(const QString& txt, int pos = -1, bool edited = true); - int xToPos(int x, QTextLine::CursorPosition = QTextLine::CursorBetweenCharacters) const; - QRect cursorRect() const; - bool fixup(); - QRect adjustedContentsRect() const; -#ifndef QT_NO_DRAGANDDROP - // drag and drop - QPoint dndPos; - QBasicTimer dndTimer; - void drag(); -#endif - + void _q_clipboardChanged(); void _q_handleWindowActivate(); void _q_deleteSelected(); - bool userInput; - bool emitingEditingFinished; - -#ifdef QT_KEYPAD_NAVIGATION - QBasicTimer deleteAllTimer; // keypad navigation - QString origText; -#endif - - bool passwordEchoEditing; - void updatePasswordEchoEditing(bool editing); + void _q_textEdited(const QString &); + void _q_cursorPositionChanged(int, int); #ifndef QT_NO_COMPLETER - QPointer<QCompleter> completer; - void complete(int key = -1); void _q_completionHighlighted(QString); - bool advanceToEnabledItem(int n); +#endif +#ifndef QT_NO_DRAGANDDROP + QPoint dndPos; + QBasicTimer dndTimer; + void drag(); #endif int leftTextMargin; diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 4a969dbf32..d0620af0d6 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -2748,7 +2748,7 @@ void QMenu::mouseMoveEvent(QMouseEvent *e) QAction *action = d->actionAt(e->pos()); if (!action) { - if (d->hasHadMouse && !rect().contains(e->pos())) + if (d->hasHadMouse) d->setCurrentAction(0); return; } else if(e->buttons()) { diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index 6be30cd1e3..eaf03b3727 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -716,7 +716,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti application examples} also provide menus using these classes. \sa QMenu, QShortcut, QAction, - {http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html}{Introduction to Apple Human Interface Guidelines}, + {http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGIntro/XHIGIntro.html}{Introduction to Apple Human Interface Guidelines}, {fowler}{GUI Design Handbook: Menu Bar}, {Menus Example} */ diff --git a/src/gui/widgets/qvalidator.h b/src/gui/widgets/qvalidator.h index ce78959c17..5c27d1d48e 100644 --- a/src/gui/widgets/qvalidator.h +++ b/src/gui/widgets/qvalidator.h @@ -61,7 +61,7 @@ class Q_GUI_EXPORT QValidator : public QObject { Q_OBJECT public: - explicit QValidator(QObject * parent); + explicit QValidator(QObject * parent=0); ~QValidator(); enum State { @@ -100,7 +100,7 @@ class Q_GUI_EXPORT QIntValidator : public QValidator Q_PROPERTY(int top READ top WRITE setTop) public: - explicit QIntValidator(QObject * parent); + explicit QIntValidator(QObject * parent=0); QIntValidator(int bottom, int top, QObject * parent); ~QIntValidator(); diff --git a/src/gui/widgets/widgets.pri b/src/gui/widgets/widgets.pri index cc0351306e..45679025b6 100644 --- a/src/gui/widgets/widgets.pri +++ b/src/gui/widgets/widgets.pri @@ -30,6 +30,7 @@ HEADERS += \ widgets/qlcdnumber.h \ widgets/qlineedit.h \ widgets/qlineedit_p.h \ + widgets/qlinecontrol_p.h \ widgets/qmainwindow.h \ widgets/qmainwindowlayout_p.h \ widgets/qmdiarea.h \ @@ -101,7 +102,9 @@ SOURCES += \ widgets/qgroupbox.cpp \ widgets/qlabel.cpp \ widgets/qlcdnumber.cpp \ + widgets/qlineedit_p.cpp \ widgets/qlineedit.cpp \ + widgets/qlinecontrol.cpp \ widgets/qmainwindow.cpp \ widgets/qmainwindowlayout.cpp \ widgets/qmdiarea.cpp \ diff --git a/src/network/access/access.pri b/src/network/access/access.pri index 3269b2eaf2..ab7b3a7e92 100644 --- a/src/network/access/access.pri +++ b/src/network/access/access.pri @@ -6,6 +6,7 @@ HEADERS += access/qftp.h \ access/qhttpnetworkrequest_p.h \ access/qhttpnetworkreply_p.h \ access/qhttpnetworkconnection_p.h \ + access/qhttpnetworkconnectionchannel_p.h \ access/qnetworkaccessmanager.h \ access/qnetworkaccessmanager_p.h \ access/qnetworkaccesscache_p.h \ @@ -18,6 +19,8 @@ HEADERS += access/qftp.h \ access/qnetworkaccessftpbackend_p.h \ access/qnetworkcookie.h \ access/qnetworkcookie_p.h \ + access/qnetworkcookiejar.h \ + access/qnetworkcookiejar_p.h \ access/qnetworkrequest.h \ access/qnetworkrequest_p.h \ access/qnetworkreply.h \ @@ -34,6 +37,7 @@ SOURCES += access/qftp.cpp \ access/qhttpnetworkrequest.cpp \ access/qhttpnetworkreply.cpp \ access/qhttpnetworkconnection.cpp \ + access/qhttpnetworkconnectionchannel.cpp \ access/qnetworkaccessmanager.cpp \ access/qnetworkaccesscache.cpp \ access/qnetworkaccessbackend.cpp \ @@ -44,6 +48,7 @@ SOURCES += access/qftp.cpp \ access/qnetworkaccessftpbackend.cpp \ access/qnetworkaccesshttpbackend.cpp \ access/qnetworkcookie.cpp \ + access/qnetworkcookiejar.cpp \ access/qnetworkrequest.cpp \ access/qnetworkreply.cpp \ access/qnetworkreplyimpl.cpp \ diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index e32c975f5a..20e4802011 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qhttpnetworkconnection_p.h" +#include "qhttpnetworkconnectionchannel_p.h" #include "private/qnoncontiguousbytedevice_p.h" #include <private/qnetworkrequest_p.h> #include <private/qobject_p.h> @@ -74,7 +75,7 @@ QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(const QString &host #endif { - channels = new Channel[channelCount]; + channels = new QHttpNetworkConnectionChannel[channelCount]; } QHttpNetworkConnectionPrivate::~QHttpNetworkConnectionPrivate() @@ -156,25 +157,25 @@ int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const bool QHttpNetworkConnectionPrivate::isSocketBusy(QAbstractSocket *socket) const { int i = indexOf(socket); - return (channels[i].state & BusyState); + return (channels[i].state & QHttpNetworkConnectionChannel::BusyState); } bool QHttpNetworkConnectionPrivate::isSocketWriting(QAbstractSocket *socket) const { int i = indexOf(socket); - return (i != -1 && (channels[i].state & WritingState)); + return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::WritingState)); } bool QHttpNetworkConnectionPrivate::isSocketWaiting(QAbstractSocket *socket) const { int i = indexOf(socket); - return (i != -1 && (channels[i].state & WaitingState)); + return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::WaitingState)); } bool QHttpNetworkConnectionPrivate::isSocketReading(QAbstractSocket *socket) const { int i = indexOf(socket); - return (i != -1 && (channels[i].state & ReadingState)); + return (i != -1 && (channels[i].state & QHttpNetworkConnectionChannel::ReadingState)); } void QHttpNetworkConnectionPrivate::appendUncompressedData(QHttpNetworkReply &reply, QByteArray &qba) @@ -312,7 +313,7 @@ bool QHttpNetworkConnectionPrivate::ensureConnection(QAbstractSocket *socket) channels[index].resendCurrent = true; return false; } - channels[index].state = ConnectingState; + channels[index].state = QHttpNetworkConnectionChannel::ConnectingState; channels[index].pendingEncrypt = encrypt; // This workaround is needed since we use QAuthenticator for NTLM authentication. The "phase == Done" @@ -363,7 +364,7 @@ bool QHttpNetworkConnectionPrivate::sendRequest(QAbstractSocket *socket) int i = indexOf(socket); switch (channels[i].state) { - case IdleState: { // write the header + case QHttpNetworkConnectionChannel::IdleState: { // write the header if (!ensureConnection(socket)) { // wait for the connection (and encryption) to be done // sendRequest will be called again from either @@ -377,7 +378,7 @@ bool QHttpNetworkConnectionPrivate::sendRequest(QAbstractSocket *socket) channels[i].reply->d_func()->connection = q; channels[i].reply->d_func()->autoDecompress = channels[i].request.d->autoDecompress; } - channels[i].state = WritingState; + channels[i].state = QHttpNetworkConnectionChannel::WritingState; channels[i].pendingEncrypt = false; // if the url contains authentication parameters, use the new ones // both channels will use the new authentication parameters @@ -412,20 +413,20 @@ bool QHttpNetworkConnectionPrivate::sendRequest(QAbstractSocket *socket) channels[i].bytesTotal = channels[i].request.contentLength(); } else { socket->flush(); // ### Remove this when pipelining is implemented. We want less TCP packets! - channels[i].state = WaitingState; + channels[i].state = QHttpNetworkConnectionChannel::WaitingState; break; } // write the initial chunk together with the headers // fall through } - case WritingState: + case QHttpNetworkConnectionChannel::WritingState: { // write the data QNonContiguousByteDevice* uploadByteDevice = channels[i].request.uploadByteDevice(); if (!uploadByteDevice || channels[i].bytesTotal == channels[i].written) { if (uploadByteDevice) emit channels[i].reply->dataSendProgress(channels[i].written, channels[i].bytesTotal); - channels[i].state = WaitingState; // now wait for response + channels[i].state = QHttpNetworkConnectionChannel::WaitingState; // now wait for response sendRequest(socket); break; } @@ -472,7 +473,7 @@ bool QHttpNetworkConnectionPrivate::sendRequest(QAbstractSocket *socket) if (channels[i].written == channels[i].bytesTotal) { // make sure this function is called once again - channels[i].state = WaitingState; + channels[i].state = QHttpNetworkConnectionChannel::WaitingState; sendRequest(socket); break; } @@ -482,7 +483,7 @@ bool QHttpNetworkConnectionPrivate::sendRequest(QAbstractSocket *socket) break; } - case WaitingState: + case QHttpNetworkConnectionChannel::WaitingState: { QNonContiguousByteDevice* uploadByteDevice = channels[i].request.uploadByteDevice(); if (uploadByteDevice) { @@ -494,8 +495,8 @@ bool QHttpNetworkConnectionPrivate::sendRequest(QAbstractSocket *socket) receiveReply(socket, channels[i].reply); break; } - case ReadingState: - case Wait4AuthState: + case QHttpNetworkConnectionChannel::ReadingState: + case QHttpNetworkConnectionChannel::Wait4AuthState: // ignore _q_bytesWritten in these states // fall through default: @@ -603,7 +604,7 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN if (!socket->bytesAvailable()) { if (reply && reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingDataState) { reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState; - channels[i].state = IdleState; + channels[i].state = QHttpNetworkConnectionChannel::IdleState; allDone(socket, reply); } else { // try to reconnect/resend before sending an error. @@ -654,7 +655,7 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN emit reply->headerChanged(); if (!expectContent(reply)) { reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState; - channels[i].state = IdleState; + channels[i].state = QHttpNetworkConnectionChannel::IdleState; allDone(socket, reply); return; } @@ -717,7 +718,7 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN // everything done, fall through } case QHttpNetworkReplyPrivate::AllDoneState: - channels[i].state = IdleState; + channels[i].state = QHttpNetworkConnectionChannel::IdleState; allDone(socket, reply); break; default: @@ -866,11 +867,11 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket eraseData(channels[i].reply); closeChannel(i); channels[i].lastStatus = 0; - channels[i].state = Wait4AuthState; + channels[i].state = QHttpNetworkConnectionChannel::Wait4AuthState; return false; } // cannot use this socket until the slot returns - channels[i].state = WaitingState; + channels[i].state = QHttpNetworkConnectionChannel::WaitingState; socket->blockSignals(true); if (!isProxy) { pendingAuthSignal = true; @@ -885,7 +886,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket } socket->blockSignals(false); // socket free to use - channels[i].state = IdleState; + channels[i].state = QHttpNetworkConnectionChannel::IdleState; if (priv->phase != QAuthenticatorPrivate::Done) { // send any pending requests copyCredentials(i, auth, isProxy); @@ -908,8 +909,8 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket socket->close(); // remove pending request on the other channels for (int j = 0; j < channelCount; ++j) { - if (j != i && channels[j].state == Wait4AuthState) - channels[j].state = IdleState; + if (j != i && channels[j].state == QHttpNetworkConnectionChannel::Wait4AuthState) + channels[j].state = QHttpNetworkConnectionChannel::IdleState; } return true; } @@ -1009,7 +1010,7 @@ void QHttpNetworkConnectionPrivate::closeChannel(int channel) socket->blockSignals(true); socket->close(); socket->blockSignals(false); - channels[channel].state = IdleState; + channels[channel].state = QHttpNetworkConnectionChannel::IdleState; } void QHttpNetworkConnectionPrivate::resendCurrentRequest(QAbstractSocket *socket) @@ -1112,7 +1113,7 @@ void QHttpNetworkConnectionPrivate::_q_readyRead() return; // ### error if (isSocketWaiting(socket) || isSocketReading(socket)) { int i = indexOf(socket); - channels[i].state = ReadingState; + channels[i].state = QHttpNetworkConnectionChannel::ReadingState; if (channels[i].reply) receiveReply(socket, channels[i].reply); } @@ -1141,14 +1142,14 @@ void QHttpNetworkConnectionPrivate::_q_disconnected() // read the available data before closing int i = indexOf(socket); if (isSocketWaiting(socket) || isSocketReading(socket)) { - channels[i].state = ReadingState; + channels[i].state = QHttpNetworkConnectionChannel::ReadingState; if (channels[i].reply) receiveReply(socket, channels[i].reply); - } else if (channels[i].state == IdleState && channels[i].resendCurrent) { + } else if (channels[i].state == QHttpNetworkConnectionChannel::IdleState && channels[i].resendCurrent) { // re-sending request because the socket was in ClosingState QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); } - channels[i].state = IdleState; + channels[i].state = QHttpNetworkConnectionChannel::IdleState; } void QHttpNetworkConnectionPrivate::_q_startNextRequest() @@ -1157,7 +1158,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() for (int i = 0; i < channelCount; ++i) { if (channels[i].resendCurrent) { channels[i].resendCurrent = false; - channels[i].state = IdleState; + channels[i].state = QHttpNetworkConnectionChannel::IdleState; if (channels[i].reply) sendRequest(channels[i].socket); } @@ -1181,8 +1182,8 @@ void QHttpNetworkConnectionPrivate::_q_restartAuthPendingRequests() // send the request using the idle socket for (int i = 0 ; i < channelCount; ++i) { QAbstractSocket *socket = channels[i].socket; - if (channels[i].state == Wait4AuthState) { - channels[i].state = IdleState; + if (channels[i].state == QHttpNetworkConnectionChannel::Wait4AuthState) { + channels[i].state = QHttpNetworkConnectionChannel::IdleState; if (channels[i].reply) sendRequest(socket); } @@ -1203,7 +1204,7 @@ void QHttpNetworkConnectionPrivate::_q_connected() // ### FIXME: if the server closes the connection unexpectedly, we shouldn't send the same broken request again! //channels[i].reconnectAttempts = 2; if (!channels[i].pendingEncrypt) { - channels[i].state = IdleState; + channels[i].state = QHttpNetworkConnectionChannel::IdleState; if (channels[i].reply) sendRequest(socket); else @@ -1232,7 +1233,7 @@ void QHttpNetworkConnectionPrivate::_q_error(QAbstractSocket::SocketError socket case QAbstractSocket::RemoteHostClosedError: // try to reconnect/resend before sending an error. // while "Reading" the _q_disconnected() will handle this. - if (channels[i].state != IdleState && channels[i].state != ReadingState) { + if (channels[i].state != QHttpNetworkConnectionChannel::IdleState && channels[i].state != QHttpNetworkConnectionChannel::ReadingState) { if (channels[i].reconnectAttempts-- > 0) { resendCurrentRequest(socket); return; @@ -1246,7 +1247,7 @@ void QHttpNetworkConnectionPrivate::_q_error(QAbstractSocket::SocketError socket break; case QAbstractSocket::SocketTimeoutError: // try to reconnect/resend before sending an error. - if (channels[i].state == WritingState && (channels[i].reconnectAttempts-- > 0)) { + if (channels[i].state == QHttpNetworkConnectionChannel::WritingState && (channels[i].reconnectAttempts-- > 0)) { resendCurrentRequest(socket); return; } @@ -1405,7 +1406,7 @@ void QHttpNetworkConnectionPrivate::_q_encrypted() if (!socket) return; // ### error int i = indexOf(socket); - channels[i].state = IdleState; + channels[i].state = QHttpNetworkConnectionChannel::IdleState; sendRequest(socket); } diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 52a73a7651..db6a1406f8 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -65,6 +65,7 @@ #include <private/qhttpnetworkrequest_p.h> #include <private/qhttpnetworkreply_p.h> +#include "qhttpnetworkconnectionchannel_p.h" #ifndef QT_NO_HTTP @@ -157,8 +158,6 @@ private: }; - - // private classes typedef QPair<QHttpNetworkRequest, QHttpNetworkReply*> HttpMessagePair; @@ -172,16 +171,6 @@ public: void init(); void connectSignals(QAbstractSocket *socket); - enum SocketState { - IdleState = 0, // ready to send request - ConnectingState = 1, // connecting to host - WritingState = 2, // writing the data - WaitingState = 4, // waiting for reply - ReadingState = 8, // reading the reply - Wait4AuthState = 0x10, // blocked for send till the current authentication slot is done - BusyState = (ConnectingState|WritingState|WaitingState|ReadingState|Wait4AuthState) - }; - enum { ChunkSize = 4096 }; int indexOf(QAbstractSocket *socket) const; @@ -226,35 +215,9 @@ public: quint16 port; bool encrypt; - struct Channel { - QAbstractSocket *socket; - SocketState state; - QHttpNetworkRequest request; // current request - QHttpNetworkReply *reply; // current reply for this request - qint64 written; - qint64 bytesTotal; - bool resendCurrent; - int lastStatus; // last status received on this channel - bool pendingEncrypt; // for https (send after encrypted) - int reconnectAttempts; // maximum 2 reconnection attempts - QAuthenticatorPrivate::Method authMehtod; - QAuthenticatorPrivate::Method proxyAuthMehtod; - QAuthenticator authenticator; - QAuthenticator proxyAuthenticator; -#ifndef QT_NO_OPENSSL - bool ignoreAllSslErrors; - QList<QSslError> ignoreSslErrorsList; -#endif - Channel() : socket(0), state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false), - lastStatus(0), pendingEncrypt(false), reconnectAttempts(2), - authMehtod(QAuthenticatorPrivate::None), proxyAuthMehtod(QAuthenticatorPrivate::None) -#ifndef QT_NO_OPENSSL - , ignoreAllSslErrors(false) -#endif - {} - }; static const int channelCount; - Channel *channels; // parallel connections to the server + QHttpNetworkConnectionChannel *channels; // parallel connections to the server + bool pendingAuthSignal; // there is an incomplete authentication signal bool pendingProxyAuthSignal; // there is an incomplete proxy authentication signal diff --git a/doc/src/obsoleteclasses.qdoc b/src/network/access/qhttpnetworkconnectionchannel.cpp index 3658dfcc4c..a04b53010e 100644 --- a/doc/src/obsoleteclasses.qdoc +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,21 +39,26 @@ ** ****************************************************************************/ -/*! - \page obsoleteclasses.html - \group obsolete - \title Obsolete Classes - \ingroup classlists - \ingroup groups +#include "qhttpnetworkconnection_p.h" +#include "qhttpnetworkconnectionchannel_p.h" - \brief Qt classes that are obsolete (deprecated). +#include <qpair.h> +#include <qdebug.h> - This is a list of Qt classes that are obsolete (deprecated). These - classes are provided to keep old source code working but they are - no longer maintained. We strongly advise against using these - classes in new code. +#ifndef QT_NO_HTTP - \generatelist obsoleteclasses +#ifndef QT_NO_OPENSSL +# include <QtNetwork/qsslkey.h> +# include <QtNetwork/qsslcipher.h> +# include <QtNetwork/qsslconfiguration.h> +#endif - \sa {Qt's Classes}, {Qt's Modules} -*/ +QT_BEGIN_NAMESPACE + +// TODO: Put channel specific stuff here so it does not polute qhttpnetworkconnection.cpp + +QT_END_NAMESPACE + +#include "moc_qhttpnetworkconnectionchannel_p.cpp" + +#endif // QT_NO_HTTP diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h new file mode 100644 index 0000000000..cbabc67477 --- /dev/null +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -0,0 +1,129 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QHTTPNETWORKCONNECTIONCHANNEL_H +#define QHTTPNETWORKCONNECTIONCHANNEL_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of the Network Access API. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// +#include <QtNetwork/qnetworkrequest.h> +#include <QtNetwork/qnetworkreply.h> +#include <QtNetwork/qabstractsocket.h> + +#include <private/qobject_p.h> +#include <qauthenticator.h> +#include <qnetworkproxy.h> +#include <qbuffer.h> + +#include <private/qhttpnetworkheader_p.h> +#include <private/qhttpnetworkrequest_p.h> +#include <private/qhttpnetworkreply_p.h> + + +#ifndef QT_NO_HTTP + +#ifndef QT_NO_OPENSSL +# include <QtNetwork/qsslsocket.h> +# include <QtNetwork/qsslerror.h> +#else +# include <QtNetwork/qtcpsocket.h> +#endif + +QT_BEGIN_NAMESPACE + +class QHttpNetworkRequest; +class QHttpNetworkReply; +class QByteArray; + +class QHttpNetworkConnectionChannel : public QObject { + Q_OBJECT +public: + enum ChannelState { + IdleState = 0, // ready to send request + ConnectingState = 1, // connecting to host + WritingState = 2, // writing the data + WaitingState = 4, // waiting for reply + ReadingState = 8, // reading the reply + Wait4AuthState = 0x10, // blocked for send till the current authentication slot is done + BusyState = (ConnectingState|WritingState|WaitingState|ReadingState|Wait4AuthState) + }; + QAbstractSocket *socket; + ChannelState state; + QHttpNetworkRequest request; // current request + QHttpNetworkReply *reply; // current reply for this request + qint64 written; + qint64 bytesTotal; + bool resendCurrent; + int lastStatus; // last status received on this channel + bool pendingEncrypt; // for https (send after encrypted) + int reconnectAttempts; // maximum 2 reconnection attempts + QAuthenticatorPrivate::Method authMehtod; + QAuthenticatorPrivate::Method proxyAuthMehtod; + QAuthenticator authenticator; + QAuthenticator proxyAuthenticator; +#ifndef QT_NO_OPENSSL + bool ignoreAllSslErrors; + QList<QSslError> ignoreSslErrorsList; +#endif + QHttpNetworkConnectionChannel() : socket(0), state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false), + lastStatus(0), pendingEncrypt(false), reconnectAttempts(2), + authMehtod(QAuthenticatorPrivate::None), proxyAuthMehtod(QAuthenticatorPrivate::None) +#ifndef QT_NO_OPENSSL + , ignoreAllSslErrors(false) +#endif + {} +}; + + + +QT_END_NAMESPACE + +#endif // QT_NO_HTTP + +#endif diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 802e603b79..8569ecd2e8 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -121,7 +121,9 @@ static void ensureInitialized() as well as meta-data (headers, etc.). \note After the request has finished, it is the responsibility of the user - to delete the QNetworkReply object at an appropriate time. + to delete the QNetworkReply object at an appropriate time. Do not directly + delete it inside the slot connected to finished(). You can use the + deleteLater() function. A more involved example, assuming the manager is already existent, can be: @@ -202,6 +204,9 @@ static void ensureInitialized() See QNetworkReply::finished() for information on the status that the object will be in. + \note Do not delete the \a reply object in the slot connected to this + signal. Use deleteLater(). + \sa QNetworkReply::finished(), QNetworkReply::error() */ diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index c0397036c9..dd5edb0bf2 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -1068,259 +1068,4 @@ QDebug operator<<(QDebug s, const QNetworkCookie &cookie) } #endif - - -class QNetworkCookieJarPrivate: public QObjectPrivate -{ -public: - QList<QNetworkCookie> allCookies; - - Q_DECLARE_PUBLIC(QNetworkCookieJar) -}; - -/*! - \class QNetworkCookieJar - \brief The QNetworkCookieJar class implements a simple jar of QNetworkCookie objects - \since 4.4 - - Cookies are small bits of information that stateless protocols - like HTTP use to maintain some persistent information across - requests. - - A cookie is set by a remote server when it replies to a request - and it expects the same cookie to be sent back when further - requests are sent. - - The cookie jar is the object that holds all cookies set in - previous requests. Web browsers save their cookie jars to disk in - order to conserve permanent cookies across invocations of the - application. - - QNetworkCookieJar does not implement permanent storage: it only - keeps the cookies in memory. Once the QNetworkCookieJar object is - deleted, all cookies it held will be discarded as well. If you - want to save the cookies, you should derive from this class and - implement the saving to disk to your own storage format. - - This class implements only the basic security recommended by the - cookie specifications and does not implement any cookie acceptance - policy (it accepts all cookies set by any requests). In order to - override those rules, you should reimplement the - cookiesForUrl() and setCookiesFromUrl() virtual - functions. They are called by QNetworkReply and - QNetworkAccessManager when they detect new cookies and when they - require cookies. - - \sa QNetworkCookie, QNetworkAccessManager, QNetworkReply, - QNetworkRequest, QNetworkAccessManager::setCookieJar() -*/ - -/*! - Creates a QNetworkCookieJar object and sets the parent object to - be \a parent. - - The cookie jar is initialized to empty. -*/ -QNetworkCookieJar::QNetworkCookieJar(QObject *parent) - : QObject(*new QNetworkCookieJarPrivate, parent) -{ -} - -/*! - Destroys this cookie jar object and discards all cookies stored in - it. Cookies are not saved to disk in the QNetworkCookieJar default - implementation. - - If you need to save the cookies to disk, you have to derive from - QNetworkCookieJar and save the cookies to disk yourself. -*/ -QNetworkCookieJar::~QNetworkCookieJar() -{ -} - -/*! - Returns all cookies stored in this cookie jar. This function is - suitable for derived classes to save cookies to disk, as well as - to implement cookie expiration and other policies. - - \sa setAllCookies(), cookiesForUrl() -*/ -QList<QNetworkCookie> QNetworkCookieJar::allCookies() const -{ - return d_func()->allCookies; -} - -/*! - Sets the internal list of cookies held by this cookie jar to be \a - cookieList. This function is suitable for derived classes to - implement loading cookies from permanent storage, or their own - cookie acceptance policies by reimplementing - setCookiesFromUrl(). - - \sa allCookies(), setCookiesFromUrl() -*/ -void QNetworkCookieJar::setAllCookies(const QList<QNetworkCookie> &cookieList) -{ - Q_D(QNetworkCookieJar); - d->allCookies = cookieList; -} - -static inline bool isParentPath(QString path, QString reference) -{ - if (!path.endsWith(QLatin1Char('/'))) - path += QLatin1Char('/'); - if (!reference.endsWith(QLatin1Char('/'))) - reference += QLatin1Char('/'); - return path.startsWith(reference); -} - -static inline bool isParentDomain(QString domain, QString reference) -{ - if (!reference.startsWith(QLatin1Char('.'))) - return domain == reference; - - return domain.endsWith(reference) || domain == reference.mid(1); -} - -/*! - Adds the cookies in the list \a cookieList to this cookie - jar. Default values for path and domain are taken from the \a - url object. - - Returns true if one or more cookes are set for url otherwise false. - - If a cookie already exists in the cookie jar, it will be - overridden by those in \a cookieList. - - The default QNetworkCookieJar class implements only a very basic - security policy (it makes sure that the cookies' domain and path - match the reply's). To enhance the security policy with your own - algorithms, override setCookiesFromUrl(). - - Also, QNetworkCookieJar does not have a maximum cookie jar - size. Reimplement this function to discard older cookies to create - room for new ones. - - \sa cookiesForUrl(), QNetworkAccessManager::setCookieJar() -*/ -bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, - const QUrl &url) -{ - Q_D(QNetworkCookieJar); - QString defaultDomain = url.host(); - QString pathAndFileName = url.path(); - QString defaultPath = pathAndFileName.left(pathAndFileName.lastIndexOf(QLatin1Char('/'))+1); - if (defaultPath.isEmpty()) - defaultPath = QLatin1Char('/'); - - int added = 0; - QDateTime now = QDateTime::currentDateTime(); - foreach (QNetworkCookie cookie, cookieList) { - bool isDeletion = !cookie.isSessionCookie() && - cookie.expirationDate() < now; - - // validate the cookie & set the defaults if unset - if (cookie.path().isEmpty()) - cookie.setPath(defaultPath); - else if (!isParentPath(pathAndFileName, cookie.path())) - continue; // not accepted - - if (cookie.domain().isEmpty()) { - cookie.setDomain(defaultDomain); - } else { - QString domain = cookie.domain(); - if (!(isParentDomain(domain, defaultDomain) - || isParentDomain(defaultDomain, domain))) { - continue; // not accepted - } - - // reject if domain is like ".com" - // (i.e., reject if domain does not contain embedded dots, see RFC 2109 section 4.3.2) - // this is just a rudimentary check and does not cover all cases - if (domain.lastIndexOf(QLatin1Char('.')) == 0) - continue; // not accepted - - } - - QList<QNetworkCookie>::Iterator it = d->allCookies.begin(), - end = d->allCookies.end(); - for ( ; it != end; ++it) - // does this cookie already exist? - if (cookie.name() == it->name() && - cookie.domain() == it->domain() && - cookie.path() == it->path()) { - // found a match - d->allCookies.erase(it); - break; - } - - // did not find a match - if (!isDeletion) { - d->allCookies += cookie; - ++added; - } - } - return (added > 0); -} - -/*! - Returns the cookies to be added to when a request is sent to - \a url. This function is called by the default - QNetworkAccessManager::createRequest(), which adds the - cookies returned by this function to the request being sent. - - If more than one cookie with the same name is found, but with - differing paths, the one with longer path is returned before the - one with shorter path. In other words, this function returns - cookies sorted by path length. - - The default QNetworkCookieJar class implements only a very basic - security policy (it makes sure that the cookies' domain and path - match the reply's). To enhance the security policy with your own - algorithms, override cookiesForUrl(). - - \sa setCookiesFromUrl(), QNetworkAccessManager::setCookieJar() -*/ -QList<QNetworkCookie> QNetworkCookieJar::cookiesForUrl(const QUrl &url) const -{ -// \b Warning! This is only a dumb implementation! -// It does NOT follow all of the recommendations from -// http://wp.netscape.com/newsref/std/cookie_spec.html -// It does not implement a very good cross-domain verification yet. - - Q_D(const QNetworkCookieJar); - QDateTime now = QDateTime::currentDateTime(); - QList<QNetworkCookie> result; - - // scan our cookies for something that matches - QList<QNetworkCookie>::ConstIterator it = d->allCookies.constBegin(), - end = d->allCookies.constEnd(); - for ( ; it != end; ++it) { - if (!isParentDomain(url.host(), it->domain())) - continue; - if (!isParentPath(url.path(), it->path())) - continue; - if (!(*it).isSessionCookie() && (*it).expirationDate() < now) - continue; - - // insert this cookie into result, sorted by path - QList<QNetworkCookie>::Iterator insertIt = result.begin(); - while (insertIt != result.end()) { - if (insertIt->path().length() < it->path().length()) { - // insert here - insertIt = result.insert(insertIt, *it); - break; - } else { - ++insertIt; - } - } - - // this is the shortest path yet, just append - if (insertIt == result.end()) - result += *it; - } - - return result; -} - QT_END_NAMESPACE diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h index c5f03fbf63..922a6f54f5 100644 --- a/src/network/access/qnetworkcookie.h +++ b/src/network/access/qnetworkcookie.h @@ -108,25 +108,8 @@ private: }; Q_DECLARE_TYPEINFO(QNetworkCookie, Q_MOVABLE_TYPE); -class QNetworkCookieJarPrivate; -class Q_NETWORK_EXPORT QNetworkCookieJar: public QObject -{ - Q_OBJECT -public: - QNetworkCookieJar(QObject *parent = 0); - virtual ~QNetworkCookieJar(); - - virtual QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const; - virtual bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url); - -protected: - QList<QNetworkCookie> allCookies() const; - void setAllCookies(const QList<QNetworkCookie> &cookieList); - -private: - Q_DECLARE_PRIVATE(QNetworkCookieJar) - Q_DISABLE_COPY(QNetworkCookieJar) -}; +// ### Qt5 remove this include +#include "qnetworkcookiejar.h" #ifndef QT_NO_DEBUG_STREAM class QDebug; diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp new file mode 100644 index 0000000000..03f7427dc2 --- /dev/null +++ b/src/network/access/qnetworkcookiejar.cpp @@ -0,0 +1,296 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qnetworkcookiejar.h" +#include "qnetworkcookiejar_p.h" + +#include "QtNetwork/qnetworkcookie.h" +#include "QtCore/qurl.h" +#include "QtCore/qdatetime.h" + +QT_BEGIN_NAMESPACE + +/*! + \class QNetworkCookieJar + \brief The QNetworkCookieJar class implements a simple jar of QNetworkCookie objects + \since 4.4 + + Cookies are small bits of information that stateless protocols + like HTTP use to maintain some persistent information across + requests. + + A cookie is set by a remote server when it replies to a request + and it expects the same cookie to be sent back when further + requests are sent. + + The cookie jar is the object that holds all cookies set in + previous requests. Web browsers save their cookie jars to disk in + order to conserve permanent cookies across invocations of the + application. + + QNetworkCookieJar does not implement permanent storage: it only + keeps the cookies in memory. Once the QNetworkCookieJar object is + deleted, all cookies it held will be discarded as well. If you + want to save the cookies, you should derive from this class and + implement the saving to disk to your own storage format. + + This class implements only the basic security recommended by the + cookie specifications and does not implement any cookie acceptance + policy (it accepts all cookies set by any requests). In order to + override those rules, you should reimplement the + cookiesForUrl() and setCookiesFromUrl() virtual + functions. They are called by QNetworkReply and + QNetworkAccessManager when they detect new cookies and when they + require cookies. + + \sa QNetworkCookie, QNetworkAccessManager, QNetworkReply, + QNetworkRequest, QNetworkAccessManager::setCookieJar() +*/ + +/*! + Creates a QNetworkCookieJar object and sets the parent object to + be \a parent. + + The cookie jar is initialized to empty. +*/ +QNetworkCookieJar::QNetworkCookieJar(QObject *parent) + : QObject(*new QNetworkCookieJarPrivate, parent) +{ +} + +/*! + Destroys this cookie jar object and discards all cookies stored in + it. Cookies are not saved to disk in the QNetworkCookieJar default + implementation. + + If you need to save the cookies to disk, you have to derive from + QNetworkCookieJar and save the cookies to disk yourself. +*/ +QNetworkCookieJar::~QNetworkCookieJar() +{ +} + +/*! + Returns all cookies stored in this cookie jar. This function is + suitable for derived classes to save cookies to disk, as well as + to implement cookie expiration and other policies. + + \sa setAllCookies(), cookiesForUrl() +*/ +QList<QNetworkCookie> QNetworkCookieJar::allCookies() const +{ + return d_func()->allCookies; +} + +/*! + Sets the internal list of cookies held by this cookie jar to be \a + cookieList. This function is suitable for derived classes to + implement loading cookies from permanent storage, or their own + cookie acceptance policies by reimplementing + setCookiesFromUrl(). + + \sa allCookies(), setCookiesFromUrl() +*/ +void QNetworkCookieJar::setAllCookies(const QList<QNetworkCookie> &cookieList) +{ + Q_D(QNetworkCookieJar); + d->allCookies = cookieList; +} + +static inline bool isParentPath(QString path, QString reference) +{ + if (!path.endsWith(QLatin1Char('/'))) + path += QLatin1Char('/'); + if (!reference.endsWith(QLatin1Char('/'))) + reference += QLatin1Char('/'); + return path.startsWith(reference); +} + +static inline bool isParentDomain(QString domain, QString reference) +{ + if (!reference.startsWith(QLatin1Char('.'))) + return domain == reference; + + return domain.endsWith(reference) || domain == reference.mid(1); +} + +/*! + Adds the cookies in the list \a cookieList to this cookie + jar. Default values for path and domain are taken from the \a + url object. + + Returns true if one or more cookes are set for url otherwise false. + + If a cookie already exists in the cookie jar, it will be + overridden by those in \a cookieList. + + The default QNetworkCookieJar class implements only a very basic + security policy (it makes sure that the cookies' domain and path + match the reply's). To enhance the security policy with your own + algorithms, override setCookiesFromUrl(). + + Also, QNetworkCookieJar does not have a maximum cookie jar + size. Reimplement this function to discard older cookies to create + room for new ones. + + \sa cookiesForUrl(), QNetworkAccessManager::setCookieJar() +*/ +bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, + const QUrl &url) +{ + Q_D(QNetworkCookieJar); + QString defaultDomain = url.host(); + QString pathAndFileName = url.path(); + QString defaultPath = pathAndFileName.left(pathAndFileName.lastIndexOf(QLatin1Char('/'))+1); + if (defaultPath.isEmpty()) + defaultPath = QLatin1Char('/'); + + int added = 0; + QDateTime now = QDateTime::currentDateTime(); + foreach (QNetworkCookie cookie, cookieList) { + bool isDeletion = !cookie.isSessionCookie() && + cookie.expirationDate() < now; + + // validate the cookie & set the defaults if unset + if (cookie.path().isEmpty()) + cookie.setPath(defaultPath); + else if (!isParentPath(pathAndFileName, cookie.path())) + continue; // not accepted + + if (cookie.domain().isEmpty()) { + cookie.setDomain(defaultDomain); + } else { + QString domain = cookie.domain(); + if (!(isParentDomain(domain, defaultDomain) + || isParentDomain(defaultDomain, domain))) { + continue; // not accepted + } + + // reject if domain is like ".com" + // (i.e., reject if domain does not contain embedded dots, see RFC 2109 section 4.3.2) + // this is just a rudimentary check and does not cover all cases + if (domain.lastIndexOf(QLatin1Char('.')) == 0) + continue; // not accepted + + } + + QList<QNetworkCookie>::Iterator it = d->allCookies.begin(), + end = d->allCookies.end(); + for ( ; it != end; ++it) + // does this cookie already exist? + if (cookie.name() == it->name() && + cookie.domain() == it->domain() && + cookie.path() == it->path()) { + // found a match + d->allCookies.erase(it); + break; + } + + // did not find a match + if (!isDeletion) { + d->allCookies += cookie; + ++added; + } + } + return (added > 0); +} + +/*! + Returns the cookies to be added to when a request is sent to + \a url. This function is called by the default + QNetworkAccessManager::createRequest(), which adds the + cookies returned by this function to the request being sent. + + If more than one cookie with the same name is found, but with + differing paths, the one with longer path is returned before the + one with shorter path. In other words, this function returns + cookies sorted by path length. + + The default QNetworkCookieJar class implements only a very basic + security policy (it makes sure that the cookies' domain and path + match the reply's). To enhance the security policy with your own + algorithms, override cookiesForUrl(). + + \sa setCookiesFromUrl(), QNetworkAccessManager::setCookieJar() +*/ +QList<QNetworkCookie> QNetworkCookieJar::cookiesForUrl(const QUrl &url) const +{ +// \b Warning! This is only a dumb implementation! +// It does NOT follow all of the recommendations from +// http://wp.netscape.com/newsref/std/cookie_spec.html +// It does not implement a very good cross-domain verification yet. + + Q_D(const QNetworkCookieJar); + QDateTime now = QDateTime::currentDateTime(); + QList<QNetworkCookie> result; + + // scan our cookies for something that matches + QList<QNetworkCookie>::ConstIterator it = d->allCookies.constBegin(), + end = d->allCookies.constEnd(); + for ( ; it != end; ++it) { + if (!isParentDomain(url.host(), it->domain())) + continue; + if (!isParentPath(url.path(), it->path())) + continue; + if (!(*it).isSessionCookie() && (*it).expirationDate() < now) + continue; + + // insert this cookie into result, sorted by path + QList<QNetworkCookie>::Iterator insertIt = result.begin(); + while (insertIt != result.end()) { + if (insertIt->path().length() < it->path().length()) { + // insert here + insertIt = result.insert(insertIt, *it); + break; + } else { + ++insertIt; + } + } + + // this is the shortest path yet, just append + if (insertIt == result.end()) + result += *it; + } + + return result; +} + +QT_END_NAMESPACE diff --git a/doc/src/functions.qdoc b/src/network/access/qnetworkcookiejar.h index e4c8c57776..fae08573ff 100644 --- a/doc/src/functions.qdoc +++ b/src/network/access/qnetworkcookiejar.h @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,25 +39,43 @@ ** ****************************************************************************/ -/**************************************************************************** -** -** Documentation for class overview. -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt GUI Toolkit. -** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE -** -****************************************************************************/ +#ifndef QNETWORKCOOKIEJAR_H +#define QNETWORKCOOKIEJAR_H + +#include <QtCore/QObject> +#include <QtCore/QUrl> + +// ### Qt5 remove this include +#include "qnetworkcookie.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Network) + +class QNetworkCookieJarPrivate; +class Q_NETWORK_EXPORT QNetworkCookieJar: public QObject +{ + Q_OBJECT +public: + QNetworkCookieJar(QObject *parent = 0); + virtual ~QNetworkCookieJar(); + + virtual QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const; + virtual bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url); + +protected: + QList<QNetworkCookie> allCookies() const; + void setAllCookies(const QList<QNetworkCookie> &cookieList); + +private: + Q_DECLARE_PRIVATE(QNetworkCookieJar) + Q_DISABLE_COPY(QNetworkCookieJar) +}; -/*! - \page functions.html - \title Member Function Index - \ingroup classlists +QT_END_NAMESPACE - Here is the list of all the documented member functions in the Qt - API with links to the class documentation for each function. +QT_END_HEADER - \generatelist functionindex -*/ +#endif diff --git a/src/network/access/qnetworkcookiejar_p.h b/src/network/access/qnetworkcookiejar_p.h new file mode 100644 index 0000000000..eea7eee773 --- /dev/null +++ b/src/network/access/qnetworkcookiejar_p.h @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QNETWORKCOOKIEJAR_P_H +#define QNETWORKCOOKIEJAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of the Network Access framework. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include "private/qobject_p.h" +#include "qnetworkcookie.h" + +QT_BEGIN_NAMESPACE + +class QNetworkCookieJarPrivate: public QObjectPrivate +{ +public: + QList<QNetworkCookie> allCookies; + + Q_DECLARE_PUBLIC(QNetworkCookieJar) +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index 3abf92789f..f6649b6c50 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -87,6 +87,9 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() indicates the progress of the upload for operations that have such content. + \note Do not delete the object in the slot connected to the + error() or finished() signal. Use deleteLater(). + \sa QNetworkRequest, QNetworkAccessManager */ @@ -232,6 +235,9 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() QNetworkAccessManager::finished() where that signal's reply parameter is this object. + \note Do not delete the object in the slot connected to this + signal. Use deleteLater(). + \sa QNetworkAccessManager::finished() */ @@ -246,6 +252,9 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() detected. Call errorString() to obtain a textual representation of the error condition. + \note Do not delete the object in the slot connected to this + signal. Use deleteLater(). + \sa error(), errorString() */ diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index af1eaf2bf4..a63659e4d9 100644 --- a/src/network/kernel/qhostinfo_unix.cpp +++ b/src/network/kernel/qhostinfo_unix.cpp @@ -55,7 +55,11 @@ #include <sys/types.h> #include <netdb.h> #include <arpa/inet.h> -#include <resolv.h> +#if defined(Q_OS_VXWORKS) +# include <hostLib.h> +#else +# include <resolv.h> +#endif #if defined (QT_NO_GETADDRINFO) #include <qmutex.h> @@ -273,10 +277,12 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) results.setError(QHostInfo::UnknownError); results.setErrorString(tr("Unknown address type")); } +#if !defined(Q_OS_VXWORKS) } else if (h_errno == HOST_NOT_FOUND || h_errno == NO_DATA || h_errno == NO_ADDRESS) { results.setError(QHostInfo::HostNotFound); results.setErrorString(tr("Host not found")); +#endif } else { results.setError(QHostInfo::UnknownError); results.setErrorString(tr("Unknown error")); @@ -313,6 +319,7 @@ QString QHostInfo::localHostName() QString QHostInfo::localDomainName() { +#if !defined(Q_OS_VXWORKS) resolveLibrary(); if (local_res_ninit) { // using thread-safe version @@ -343,7 +350,7 @@ QString QHostInfo::localDomainName() domainName = QUrl::fromAce(local_res->dnsrch[0]); return domainName; } - +#endif // nothing worked, try doing it by ourselves: QFile resolvconf; #if defined(_PATH_RESCONF) diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp index 01732e466e..14a0c7869e 100644 --- a/src/network/socket/qlocalserver_unix.cpp +++ b/src/network/socket/qlocalserver_unix.cpp @@ -54,6 +54,10 @@ #include <qdir.h> #include <qdatetime.h> +#ifdef Q_OS_VXWORKS +# include <selectLib.h> +#endif + QT_BEGIN_NAMESPACE void QLocalServerPrivate::init() diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp index 9f39bef3f4..835b922721 100644 --- a/src/network/socket/qlocalsocket_unix.cpp +++ b/src/network/socket/qlocalsocket_unix.cpp @@ -56,6 +56,10 @@ #include <qdir.h> #include <qdebug.h> +#ifdef Q_OS_VXWORKS +# include <selectLib.h> +#endif + #define QT_CONNECT_TIMEOUT 30000 QT_BEGIN_NAMESPACE diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h index 9136faa9a3..0a5c19d098 100644 --- a/src/network/socket/qnativesocketengine_p.h +++ b/src/network/socket/qnativesocketengine_p.h @@ -55,9 +55,9 @@ #include "QtNetwork/qhostaddress.h" #include "private/qabstractsocketengine_p.h" #ifndef Q_OS_WIN -# include "qplatformdefs.h" +# include "qplatformdefs.h" #else -# include <winsock2.h> +# include <winsock2.h> #endif #ifdef Q_OS_SYMBIAN diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index 67a6fdffe7..7584357461 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -282,6 +282,7 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt break; case QNativeSocketEngine::NonBlockingSocketOption: { // Make the socket nonblocking. +#if !defined(Q_OS_VXWORKS) int flags = qt_socket_fcntl(socketDescriptor, F_GETFL, 0); if (flags == -1) { #ifdef QNATIVESOCKETENGINE_DEBUG @@ -295,7 +296,15 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt #endif return false; } - +#else // Q_OS_VXWORKS + int onoff = 1; + if (qt_safe_ioctl(socketDescriptor, FIONBIO, &onoff) < 0) { +#ifdef QNATIVESOCKETENGINE_DEBUG + perror("QNativeSocketEnginePrivate::setOption(): ioctl(FIONBIO, 1) failed"); +#endif + return false; + } +#endif // Q_OS_VXWORKS return true; } case QNativeSocketEngine::AddressReusable: @@ -690,11 +699,8 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l // ignore the SIGPIPE signal qt_ignore_sigpipe(); - ssize_t sentBytes; - do { - sentBytes = qt_safe_sendto(socketDescriptor, data, len, - 0, sockAddrPtr, sockAddrSize); - } while (sentBytes == -1 && errno == EINTR); + ssize_t sentBytes = qt_safe_sendto(socketDescriptor, data, len, + 0, sockAddrPtr, sockAddrSize); if (sentBytes < 0) { switch (errno) { @@ -806,6 +812,7 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len) ssize_t writtenBytes; do { writtenBytes = qt_socket_write(socketDescriptor, data, len); + // writtenBytes = QT_WRITE(socketDescriptor, data, len); ### TODO S60: Should this line be removed or the one above it? } while (writtenBytes < 0 && errno == EINTR); if (writtenBytes < 0) { @@ -869,6 +876,9 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxSize) case EPIPE: #endif case ECONNRESET: +#if defined(Q_OS_VXWORKS) + case ESHUTDOWN: +#endif r = 0; break; default: diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h index 03ed3b4c96..f38c2fcfa4 100644 --- a/src/network/socket/qnet_unix_p.h +++ b/src/network/socket/qnet_unix_p.h @@ -59,11 +59,18 @@ #include <sys/socket.h> #include <netinet/in.h> +#if defined(Q_OS_VXWORKS) +# include <sockLib.h> +#endif + // for inet_addr #include <netdb.h> #include <arpa/inet.h> -#include <resolv.h> - +#if defined(Q_OS_VXWORKS) +# include <hostLib.h> +#else +# include <resolv.h> +#endif QT_BEGIN_NAMESPACE @@ -155,17 +162,28 @@ static inline int qt_safe_connect(int sockfd, const struct sockaddr *addr, QT_SO # undef listen #endif +// VxWorks' headers specify 'int' instead of '...' for the 3rd ioctl() parameter. template <typename T> static inline int qt_safe_ioctl(int sockfd, int request, T arg) { +#ifdef Q_OS_VXWORKS + return ::ioctl(sockfd, request, (int) arg); +#else return ::ioctl(sockfd, request, arg); +#endif } +// VxWorks' headers do not specify any const modifiers static inline in_addr_t qt_safe_inet_addr(const char *cp) { +#ifdef Q_OS_VXWORKS + return ::inet_addr((char *) cp); +#else return ::inet_addr(cp); +#endif } +// VxWorks' headers do not specify any const modifiers static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *to, QT_SOCKLEN_T tolen) { #ifdef MSG_NOSIGNAL @@ -173,7 +191,11 @@ static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int fl #endif register int ret; +#ifdef Q_OS_VXWORKS + EINTR_LOOP(ret, ::sendto(sockfd, (char *) buf, len, flags, (struct sockaddr *) to, tolen)); +#else EINTR_LOOP(ret, ::sendto(sockfd, buf, len, flags, to, tolen)); +#endif return ret; } diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 5c85b40068..62090a5719 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1343,10 +1343,30 @@ void QGL2PaintEngineExPrivate::updateDepthScissorTest() else glDisable(GL_DEPTH_TEST); - if (q->state()->scissorTestEnabled) + if (q->state()->scissorTestEnabled) { + QRect bounds = q->state()->rectangleClip; + if (bounds.isNull() || !q->painter()->hasClipping()) { + if (use_system_clip) + bounds = systemClip.boundingRect(); + else + bounds = QRect(0, 0, width, height); + } + glEnable(GL_SCISSOR_TEST); - else + setScissor(bounds); + } else { glDisable(GL_SCISSOR_TEST); + } +} + +void QGL2PaintEngineExPrivate::setScissor(const QRect &rect) +{ + const int left = rect.left(); + const int width = rect.width(); + const int bottom = height - (rect.top() + rect.height()); + const int height = rect.height(); + + glScissor(left, bottom, width, height); } void QGL2PaintEngineEx::clipEnabledChanged() @@ -1362,9 +1382,10 @@ void QGL2PaintEngineEx::clipEnabledChanged() if (d->use_system_clip) { state()->currentDepth = -0.5f; } else { - glDisable(GL_DEPTH_TEST); state()->depthTestEnabled = false; } + + d->updateDepthScissorTest(); } } @@ -1436,9 +1457,42 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op) if ((d->use_system_clip && rect.contains(d->systemClip.boundingRect())) || rect.contains(QRect(0, 0, d->width, d->height))) return; + + if (state()->rectangleClip.isValid()) { + state()->rectangleClip = state()->rectangleClip.intersected(rect.toRect()); + + state()->hasRectangleClip = true; + state()->scissorTestEnabled = true; + + glEnable(GL_SCISSOR_TEST); + d->setScissor(state()->rectangleClip); + + return; + } } } + if (!state()->hasRectangleClip) + state()->rectangleClip = QRect(); + + if (state()->rectangleClip.isValid() && op != Qt::NoClip && op != Qt::ReplaceClip) { + QPainterPath path; + path.addRect(state()->rectangleClip); + + state()->rectangleClip = QRect(); + d->updateDepthScissorTest(); + + glDepthFunc(GL_ALWAYS); + + state()->maxDepth = 0.5f; + d->writeClip(qtVectorPathForPath(path), state()->maxDepth); + state()->currentDepth = 0.25f; + state()->depthTestEnabled = true; + + glDepthFunc(GL_LEQUAL); + glEnable(GL_DEPTH_TEST); + } + switch (op) { case Qt::NoClip: if (d->use_system_clip) { @@ -1459,6 +1513,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op) break; case Qt::ReplaceClip: d->systemStateChanged(); + state()->rectangleClip = QRect(); state()->maxDepth = 0.5f; glDepthFunc(GL_ALWAYS); d->writeClip(path, state()->maxDepth); @@ -1497,27 +1552,30 @@ void QGL2PaintEngineExPrivate::systemStateChanged() q->state()->depthTestEnabled = false; q->state()->scissorTestEnabled = false; q->state()->needsDepthBufferClear = true; + q->state()->hasRectangleClip = false; glDisable(GL_SCISSOR_TEST); q->state()->currentDepth = -0.5f; q->state()->maxDepth = 0.5f; - if (use_system_clip) { - QRect bounds = systemClip.boundingRect(); - if (systemClip.numRects() == 1 - && bounds == QRect(0, 0, width, height)) - { - q->state()->needsDepthBufferClear = true; - } else { - glEnable(GL_SCISSOR_TEST); + q->state()->rectangleClip = QRect(0, 0, width, height); - const int left = bounds.left(); - const int width = bounds.width(); - const int bottom = height - (bounds.top() + bounds.height()); - const int height = bounds.height(); + if (use_system_clip) { + if (systemClip.numRects() == 1) { + QRect bounds = systemClip.boundingRect(); + if (bounds == QRect(0, 0, width, height)) { + use_system_clip = false; + return; + } - glScissor(left, bottom, width, height); + q->state()->rectangleClip = bounds; + q->state()->scissorTestEnabled = true; + updateDepthScissorTest(); + } else { + q->state()->rectangleClip = QRect(); + q->state()->scissorTestEnabled = true; + updateDepthScissorTest(); QTransform transform = q->state()->matrix; q->state()->matrix = QTransform(); @@ -1539,7 +1597,6 @@ void QGL2PaintEngineExPrivate::systemStateChanged() glEnable(GL_DEPTH_TEST); q->state()->depthTestEnabled = true; - q->state()->scissorTestEnabled = true; q->state()->matrix = transform; q->transformChanged(); @@ -1614,6 +1671,8 @@ QOpenGL2PaintEngineState::QOpenGL2PaintEngineState(QOpenGL2PaintEngineState &oth currentDepth = other.currentDepth; maxDepth = other.maxDepth; canRestoreClip = other.canRestoreClip; + rectangleClip = other.rectangleClip; + hasRectangleClip = other.hasRectangleClip; } QOpenGL2PaintEngineState::QOpenGL2PaintEngineState() @@ -1624,6 +1683,7 @@ QOpenGL2PaintEngineState::QOpenGL2PaintEngineState() currentDepth = -0.5f; maxDepth = 0.5f; canRestoreClip = true; + hasRectangleClip = false; } QOpenGL2PaintEngineState::~QOpenGL2PaintEngineState() diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index ec447a3e36..906817b5b8 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -86,6 +86,8 @@ public: qreal maxDepth; bool canRestoreClip; + QRect rectangleClip; + bool hasRectangleClip; }; @@ -217,6 +219,7 @@ public: void writeClip(const QVectorPath &path, float depth); void updateDepthScissorTest(); + void setScissor(const QRect &rect); void regenerateDepthClip(); void systemStateChanged(); uint use_system_clip : 1; diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index c92b8cf573..868484ee14 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -20,6 +20,7 @@ HEADERS += qgl.h \ qgl_p.h \ qglcolormap.h \ qglpixelbuffer.h \ + qglpixelbuffer_p.h \ qglframebufferobject.h \ qglextensions_p.h diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 721130929a..e124c2ede3 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -86,6 +86,7 @@ #include <private/qpixmapdata_gl_p.h> #include <private/qglpixelbuffer_p.h> #include <private/qwindowsurface_gl_p.h> +#include <private/qimagepixmapcleanuphooks_p.h> #include "qcolormap.h" #include "qfile.h" #include "qlibrary.h" @@ -526,7 +527,7 @@ void QGLFormat::setAccum(bool enable) \fn bool QGLFormat::stencil() const Returns true if the stencil buffer is enabled; otherwise returns - false. The stencil buffer is disabled by default. + false. The stencil buffer is enabled by default. \sa setStencil(), setStencilBufferSize() */ @@ -535,7 +536,7 @@ void QGLFormat::setAccum(bool enable) If \a enable is true enables the stencil buffer; otherwise disables the stencil buffer. - The stencil buffer is disabled by default. + The stencil buffer is enabled by default. The stencil buffer masks certain parts of the drawing area so that masked parts are not drawn on. @@ -1407,15 +1408,17 @@ QGLTextureCache::QGLTextureCache() { Q_ASSERT(qt_gl_texture_cache == 0); qt_gl_texture_cache = this; - qt_pixmap_cleanup_hook_64 = cleanupHook; - qt_image_cleanup_hook_64 = cleanupHook; + + QImagePixmapCleanupHooks::instance()->addPixmapHook(pixmapCleanupHook); + QImagePixmapCleanupHooks::instance()->addImageHook(imageCleanupHook); } QGLTextureCache::~QGLTextureCache() { qt_gl_texture_cache = 0; - qt_pixmap_cleanup_hook_64 = 0; - qt_image_cleanup_hook_64 = 0; + + QImagePixmapCleanupHooks::instance()->removePixmapHook(pixmapCleanupHook); + QImagePixmapCleanupHooks::instance()->removeImageHook(imageCleanupHook); } void QGLTextureCache::insert(QGLContext* ctx, qint64 key, QGLTexture* texture, int cost) @@ -1471,7 +1474,7 @@ QGLTextureCache* QGLTextureCache::instance() a hook that removes textures from the cache when a pixmap/image is deref'ed */ -void QGLTextureCache::cleanupHook(qint64 cacheKey) +void QGLTextureCache::imageCleanupHook(qint64 cacheKey) { // ### remove when the GL texture cache becomes thread-safe if (qApp->thread() != QThread::currentThread()) @@ -1481,6 +1484,24 @@ void QGLTextureCache::cleanupHook(qint64 cacheKey) instance()->remove(cacheKey); } + +void QGLTextureCache::pixmapCleanupHook(QPixmap* pixmap) +{ + // ### remove when the GL texture cache becomes thread-safe + if (qApp->thread() == QThread::currentThread()) { + const qint64 cacheKey = pixmap->cacheKey(); + QGLTexture *texture = instance()->getTexture(cacheKey); + if (texture && texture->clean) + instance()->remove(cacheKey); + } +#if defined(Q_WS_X11) + QPixmapData *pd = pixmap->data_ptr(); + // Only need to delete the gl surface if the pixmap is about to be deleted + if (pd->ref == 0) + QGLContextPrivate::destroyGlSurfaceForPixmap(pd); +#endif +} + void QGLTextureCache::deleteIfEmpty() { if (instance()->size() == 0) @@ -2020,11 +2041,11 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, #if defined(Q_WS_X11) // Try to use texture_from_pixmap if (pd->classId() == QPixmapData::X11Class) { - QPixmap *thatPixmap = const_cast<QPixmap*>(&pixmap); - texture = bindTextureFromNativePixmap(thatPixmap, key, canInvert); + texture = bindTextureFromNativePixmap(pd, key, canInvert); if (texture) { texture->clean = clean; - boundPixmaps.insert(thatPixmap->data_ptr(), QPixmap(pixmap)); + texture->boundPixmap = pd; + boundPixmaps.insert(pd, QPixmap(pixmap)); } } #endif diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 85dae0ddfa..f21ab93f4e 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -241,7 +241,9 @@ public: quint32 gpm; int screen; QHash<QPixmapData*, QPixmap> boundPixmaps; - QGLTexture *bindTextureFromNativePixmap(QPixmap *pm, const qint64 key, bool internal); + QGLTexture *bindTextureFromNativePixmap(QPixmapData*, const qint64 key, bool canInvert); + static void destroyGlSurfaceForPixmap(QPixmapData*); + static void unbindPixmapFromTexture(QPixmapData*); #endif #if defined(Q_WS_MAC) bool update; @@ -423,7 +425,8 @@ public: // is a current context - the context the pixmap was bound to a texture in. // Otherwise the release doesn't do anything and you get BadDrawable errors // when you come to delete the context. - deleteBoundPixmap(); + if (boundPixmap) + QGLContextPrivate::unbindPixmapFromTexture(boundPixmap); #endif glDeleteTextures(1, &id); if (switch_context && current) @@ -437,9 +440,9 @@ public: bool clean; bool yInverted; // NOTE: Y-Inverted textures are for internal use only! #if defined(Q_WS_X11) - Qt::HANDLE boundPixmap; - void deleteBoundPixmap(); // in qgl_x11.cpp/qgl_x11egl.cpp + QPixmapData* boundPixmap; #endif + }; class QGLTextureCache { @@ -458,7 +461,8 @@ public: static QGLTextureCache *instance(); static void deleteIfEmpty(); - static void cleanupHook(qint64 cacheKey); + static void imageCleanupHook(qint64 cacheKey); + static void pixmapCleanupHook(QPixmap* pixmap); private: QCache<qint64, QGLTexture> m_cache; diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 6381bc2152..4509a64502 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -58,14 +58,27 @@ #include <private/qglpixelbuffer_p.h> #endif +// We always define GLX_EXT_texture_from_pixmap ourselves because +// we can't trust system headers to do it properly +#define GLX_EXT_texture_from_pixmap 1 + #define INT8 dummy_INT8 #define INT32 dummy_INT32 #include <GL/glx.h> #undef INT8 #undef INT32 + #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xos.h> +#ifdef Q_OS_VXWORS +# ifdef open +# undef open +# endif +# ifdef getpid +# undef getpid +# endif +#endif // Q_OS_VXWORKS #include <X11/Xatom.h> #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) @@ -82,7 +95,7 @@ extern const QX11Info *qt_x11Info(const QPaintDevice *pd); #define GLX_SAMPLES_ARB 100001 #endif -#ifndef GLX_EXT_texture_from_pixmap +#ifndef GLX_TEXTURE_2D_BIT_EXT #define GLX_TEXTURE_2D_BIT_EXT 0x00000002 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 @@ -823,10 +836,12 @@ void QGLContext::swapBuffers() const if (!glXGetVideoSyncSGI) #endif { +#if !defined(QT_NO_LIBRARY) extern const QString qt_gl_library_name(); QLibrary lib(qt_gl_library_name()); glXGetVideoSyncSGI = (qt_glXGetVideoSyncSGI) lib.resolve("glXGetVideoSyncSGI"); glXWaitVideoSyncSGI = (qt_glXWaitVideoSyncSGI) lib.resolve("glXWaitVideoSyncSGI"); +#endif } } resolved = true; @@ -1067,9 +1082,11 @@ void *QGLContext::getProcAddress(const QString &proc) const if (!glXGetProcAddressARB) #endif { +#if !defined(QT_NO_LIBRARY) extern const QString qt_gl_library_name(); QLibrary lib(qt_gl_library_name()); glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); +#endif } } resolved = true; @@ -1536,38 +1553,26 @@ void QGLExtensions::init() } } -#if !defined(glXBindTexImageEXT) +// Solaris defines glXBindTexImageEXT as part of the GL library +#if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) typedef void (*qt_glXBindTexImageEXT)(Display*, GLXDrawable, int, const int*); -static qt_glXBindTexImageEXT glXBindTexImageEXT = 0; -#endif -#if !defined(glXReleaseTexImageEXT) typedef void (*qt_glXReleaseTexImageEXT)(Display*, GLXDrawable, int); +static qt_glXBindTexImageEXT glXBindTexImageEXT = 0; static qt_glXReleaseTexImageEXT glXReleaseTexImageEXT = 0; -#endif -static bool qt_resolved_texture_from_pixmap = false; -QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pm, const qint64 key, bool canInvert) +bool qt_resolveTextureFromPixmap() { -#if !defined(Q_OS_LINUX) - return 0; -#else - Q_Q(QGLContext); + static bool resolvedTextureFromPixmap = false; - if (pm->data_ptr()->classId() != QPixmapData::X11Class) - return 0; - QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pm->data_ptr()); - const QX11Info *x11Info = qt_x11Info(pm); + if (!resolvedTextureFromPixmap) { + resolvedTextureFromPixmap = true; - - // Check to see if we have NPOT texture support - // TODO: Use GLX_TEXTURE_RECTANGLE_EXT texture target on systems without npot textures - if ( !(QGLExtensions::glExtensions & QGLExtensions::NPOTTextures) && - !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0)) - return 0; - - - if (!qt_resolved_texture_from_pixmap) { - qt_resolved_texture_from_pixmap = true; + // Check to see if we have NPOT texture support + if ( !(QGLExtensions::glExtensions & QGLExtensions::NPOTTextures) && + !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0)) + { + return false; // Can't use TFP without NPOT + } QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); if (glxExt.contains(QLatin1String("GLX_EXT_texture_from_pixmap"))) { @@ -1589,81 +1594,139 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pm, const qi } } - if (!glXBindTexImageEXT) - return 0; + return glXBindTexImageEXT && glXReleaseTexImageEXT; +} +#endif //defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) + +QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, const qint64 key, bool canInvert) +{ #if !defined(GLX_VERSION_1_3) || defined(Q_OS_HPUX) return 0; #else - GLXFBConfig *configList = 0; - GLXFBConfig glxPixmapConfig; - int configCount = 0; - bool hasAlpha = pixmapData->hasAlphaChannel(); - - int configAttribs[] = { - hasAlpha ? GLX_BIND_TO_TEXTURE_RGBA_EXT : GLX_BIND_TO_TEXTURE_RGB_EXT, True, - GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, - GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT, - // QGLContext::bindTexture() can't return an inverted texture, but QPainter::drawPixmap() can: - GLX_Y_INVERTED_EXT, canInvert ? GLX_DONT_CARE : False, - XNone -// GLX_BIND_TO_MIPMAP_TEXTURE_EXT, False, -// GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_1D_BIT_EXT or GLX_TEXTURE_2D_BIT_EXT or GLX_TEXTURE_RECTANGLE_BIT_EXT - }; - configList = glXChooseFBConfig(x11Info->display(), x11Info->screen(), configAttribs, &configCount); - if (!configList) - return 0; - glxPixmapConfig = configList[0]; - XFree(configList); - - GLXPixmap glxPixmap; - int pixmapAttribs[] = { - GLX_TEXTURE_FORMAT_EXT, hasAlpha ? GLX_TEXTURE_FORMAT_RGBA_EXT : GLX_TEXTURE_FORMAT_RGB_EXT, - GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT, - GLX_MIPMAP_TEXTURE_EXT, False, - XNone -// GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGBA_EXT or GLX_TEXTURE_FORMAT_RGB_EXT or GLX_TEXTURE_FORMAT_NONE_EXT, -// GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT or GLX_TEXTURE_RECTANGLE_EXT, -// GLX_MIPMAP_TEXTURE_EXT, True or False, - }; + Q_Q(QGLContext); - // Wrap the X Pixmap into a GLXPixmap: - glxPixmap = glXCreatePixmap(x11Info->display(), glxPixmapConfig, pixmapData->handle(), pixmapAttribs); + Q_ASSERT(pmd->classId() == QPixmapData::X11Class); - if (!glxPixmap) + if (!qt_resolveTextureFromPixmap()) return 0; - int yInverted; - glXGetFBConfigAttrib(x11Info->display(), glxPixmapConfig, GLX_Y_INVERTED_EXT, &yInverted); + QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd); + const QX11Info &x11Info = pixmapData->xinfo; + + // Store the configs (Can be static because configs aren't dependent on current context) + static GLXFBConfig glxRGBPixmapConfig = 0; + static bool RGBConfigInverted = false; + static GLXFBConfig glxRGBAPixmapConfig = 0; + static bool RGBAConfigInverted = false; + + bool hasAlpha = pixmapData->hasAlphaChannel(); + + // Check to see if we need a config + if ( (hasAlpha && !glxRGBAPixmapConfig) || (!hasAlpha && !glxRGBPixmapConfig) ) { + GLXFBConfig *configList = 0; + int configCount = 0; + + int configAttribs[] = { + hasAlpha ? GLX_BIND_TO_TEXTURE_RGBA_EXT : GLX_BIND_TO_TEXTURE_RGB_EXT, True, + GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT, + GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT, + // QGLContext::bindTexture() can't return an inverted texture, but QPainter::drawPixmap() can: + GLX_Y_INVERTED_EXT, canInvert ? GLX_DONT_CARE : False, + XNone + }; + configList = glXChooseFBConfig(x11Info.display(), x11Info.screen(), configAttribs, &configCount); + if (!configList) + return 0; + + int yInv; + glXGetFBConfigAttrib(x11Info.display(), configList[0], GLX_Y_INVERTED_EXT, &yInv); + + if (hasAlpha) { + glxRGBAPixmapConfig = configList[0]; + RGBAConfigInverted = yInv; + } + else { + glxRGBPixmapConfig = configList[0]; + RGBConfigInverted = yInv; + } + + XFree(configList); + } + + // Check to see if the surface is still valid + if (pixmapData->gl_surface && + hasAlpha != (pixmapData->flags & QX11PixmapData::GlSurfaceCreatedWithAlpha)) + { + // Surface is invalid! + destroyGlSurfaceForPixmap(pixmapData); + } + + // Check to see if we need a surface + if (!pixmapData->gl_surface) { + GLXPixmap glxPixmap; + int pixmapAttribs[] = { + GLX_TEXTURE_FORMAT_EXT, hasAlpha ? GLX_TEXTURE_FORMAT_RGBA_EXT : GLX_TEXTURE_FORMAT_RGB_EXT, + GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT, + GLX_MIPMAP_TEXTURE_EXT, False, // Maybe needs to be don't care + XNone + }; + + // Wrap the X Pixmap into a GLXPixmap: + glxPixmap = glXCreatePixmap(x11Info.display(), + hasAlpha ? glxRGBAPixmapConfig : glxRGBPixmapConfig, + pixmapData->handle(), pixmapAttribs); + + if (!glxPixmap) + return 0; + + pixmapData->gl_surface = (Qt::HANDLE)glxPixmap; + + // Make sure the cleanup hook gets called so we can delete the glx pixmap + pixmapData->is_cached = true; + } GLuint textureId; glGenTextures(1, &textureId); glBindTexture(GL_TEXTURE_2D, textureId); - glXBindTexImageEXT(x11Info->display(), glxPixmap, GLX_FRONT_LEFT_EXT, 0); + glXBindTexImageEXT(x11Info.display(), (GLXPixmap)pixmapData->gl_surface, GLX_FRONT_LEFT_EXT, 0); glBindTexture(GL_TEXTURE_2D, textureId); - QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, canInvert, yInverted); - texture->boundPixmap = glxPixmap; + QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, canInvert, false); + texture->yInverted = (hasAlpha && RGBAConfigInverted) || (!hasAlpha && RGBConfigInverted); + if (texture->yInverted) + pixmapData->flags |= QX11PixmapData::InvertedWhenBoundToTexture; // We assume the cost of bound pixmaps is zero QGLTextureCache::instance()->insert(q, key, texture, 0); return texture; #endif //!defined(GLX_VERSION_1_3) || defined(Q_OS_HPUX) -#endif //!defined(Q_OS_LINUX } -void QGLTexture::deleteBoundPixmap() + +void QGLContextPrivate::destroyGlSurfaceForPixmap(QPixmapData* pmd) { -#if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) && defined(Q_OS_LINUX) - if (boundPixmap) { - glXReleaseTexImageEXT(QX11Info::display(), boundPixmap, GLX_FRONT_LEFT_EXT); - glXDestroyPixmap(QX11Info::display(), boundPixmap); - boundPixmap = 0; +#if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) + Q_ASSERT(pmd->classId() == QPixmapData::X11Class); + QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd); + if (pixmapData->gl_surface) { + glXDestroyPixmap(QX11Info::display(), (GLXPixmap)pixmapData->gl_surface); + pixmapData->gl_surface = 0; } #endif } +void QGLContextPrivate::unbindPixmapFromTexture(QPixmapData* pmd) +{ +#if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) + Q_ASSERT(pmd->classId() == QPixmapData::X11Class); + Q_ASSERT(QGLContext::currentContext()); + QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd); + if (pixmapData->gl_surface) + glXReleaseTexImageEXT(QX11Info::display(), (GLXPixmap)pixmapData->gl_surface, GLX_FRONT_LEFT_EXT); +#endif +} QT_END_NAMESPACE diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index c6904fe8d2..ed9930f8ad 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -41,15 +41,16 @@ #include "qgl.h" #include <private/qt_x11_p.h> +#include <private/qpixmap_x11_p.h> #include <private/qgl_p.h> #include <private/qpaintengine_opengl_p.h> #include "qgl_egl_p.h" #include "qcolormap.h" +#include <QDebug> QT_BEGIN_NAMESPACE - bool QGLFormat::hasOpenGL() { return true; @@ -298,6 +299,7 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, int matchingCount = 0; chosenVisualInfo = XGetVisualInfo(x11Info().display(), VisualIDMask, &vi, &matchingCount); if (chosenVisualInfo) { +#if !defined(QT_NO_XRENDER) if (useArgbVisual) { // Check to make sure the visual provided by EGL is ARGB XRenderPictFormat *format; @@ -311,8 +313,9 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, nativeVisualId, (int)qeglCtx->config()); vi.visualid = 0; } - } - else { + } else +#endif + { qDebug("Using opaque X Visual ID (%d) provided by EGL", (int)vi.visualid); vi = *chosenVisualInfo; } @@ -486,15 +489,175 @@ void QGLWidgetPrivate::recreateEglSurface(bool force) } } -QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pm, const qint64 key, bool canInvert) + +QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, const qint64 key, bool canInvert) { - // TODO - return 0; + Q_Q(QGLContext); + + Q_ASSERT(pd->classId() == QPixmapData::X11Class); + + static bool checkedForTFP = false; + static bool haveTFP = false; + + if (!checkedForTFP) { + // Check for texture_from_pixmap egl extension + checkedForTFP = true; + if (eglContext->hasExtension("EGL_NOKIA_texture_from_pixmap") || + eglContext->hasExtension("EGL_EXT_texture_from_pixmap")) + { + qDebug("Found texture_from_pixmap EGL extension!"); + haveTFP = true; + } + } + + if (!haveTFP) + return 0; + + QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pd); + + bool hasAlpha = pixmapData->hasAlphaChannel(); + + // Check to see if the surface is still valid + if (pixmapData->gl_surface && + hasAlpha != (pixmapData->flags & QX11PixmapData::GlSurfaceCreatedWithAlpha)) + { + // Surface is invalid! + destroyGlSurfaceForPixmap(pixmapData); + } + + EGLint pixmapAttribs[] = { + EGL_TEXTURE_TARGET, EGL_TEXTURE_2D, + EGL_TEXTURE_FORMAT, hasAlpha ? EGL_TEXTURE_RGBA : EGL_TEXTURE_RGB, + EGL_NONE + }; + Q_ASSERT(sizeof(Qt::HANDLE) >= sizeof(EGLSurface)); // Just to make totally sure! + if (pixmapData->gl_surface == 0) + pixmapData->gl_surface = (Qt::HANDLE)EGL_NO_SURFACE; + EGLSurface pixmapSurface = (EGLSurface)pixmapData->gl_surface; + static EGLConfig pixmapRGBConfig = 0; + static EGLConfig pixmapRGBAConfig = 0; + + // Check to see if we need to find a config + if ((hasAlpha && !pixmapRGBAConfig) || (!hasAlpha && !pixmapRGBConfig) ) { + const EGLint configAttribs[] = { + EGL_SURFACE_TYPE, EGL_PIXMAP_BIT, + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + EGL_DEPTH_SIZE, 0, + hasAlpha ? EGL_BIND_TO_TEXTURE_RGBA : EGL_BIND_TO_TEXTURE_RGB, EGL_TRUE, + EGL_NONE + }; + + EGLint configCount = 0; + eglChooseConfig(eglContext->display(), configAttribs, 0, 256, &configCount); + if (configCount == 0) { + haveTFP = false; + qWarning("bindTextureFromNativePixmap() - Couldn't find a suitable config"); + return 0; + } + + EGLConfig *configList = new EGLConfig[configCount]; + eglChooseConfig(eglContext->display(), configAttribs, configList, configCount, &configCount); + Q_ASSERT(configCount); + + // Try to create a pixmap surface for each config until one works + for (int i = 0; i < configCount; ++i) { + pixmapSurface = eglCreatePixmapSurface(eglContext->display(), configList[i], + (EGLNativePixmapType) pixmapData->handle(), + pixmapAttribs); + if (pixmapSurface != EGL_NO_SURFACE) { + // Got one! + qDebug() << "Found an" << (hasAlpha ? "ARGB" : "RGB") + << "config (" << int(configList[i]) << ") to create a pixmap surface"; + if (hasAlpha) + pixmapRGBAConfig = configList[i]; + else + pixmapRGBConfig = configList[i]; + pixmapData->gl_surface = (Qt::HANDLE)pixmapSurface; + break; + } + } + delete configList; + + if ((hasAlpha && !pixmapRGBAConfig) || (!hasAlpha && !pixmapRGBConfig) ) { + qDebug("Couldn't create a pixmap surface with any of the provided configs"); + haveTFP = false; + return 0; + } + } + + if (pixmapSurface == EGL_NO_SURFACE) { + pixmapSurface = eglCreatePixmapSurface(eglContext->display(), + hasAlpha? pixmapRGBAConfig : pixmapRGBConfig, + (EGLNativePixmapType) pixmapData->handle(), + pixmapAttribs); + if (pixmapSurface == EGL_NO_SURFACE) { + qWarning("Failed to create a pixmap surface using config %d", + (int)(hasAlpha? pixmapRGBAConfig : pixmapRGBConfig)); + haveTFP = false; + return 0; + } + pixmapData->gl_surface = (Qt::HANDLE)pixmapSurface; + } + + // Make sure the cleanup hook gets called so we can delete the glx pixmap + pixmapData->is_cached = true; + Q_ASSERT(pixmapData->gl_surface); + + GLuint textureId; + glGenTextures(1, &textureId); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, textureId); + + // bind the egl pixmap surface to a texture + EGLBoolean success; + success = eglBindTexImage(eglContext->display(), pixmapSurface, EGL_BACK_BUFFER); + if (success == EGL_FALSE) { + qWarning() << "eglBindTexImage() failed:" << eglContext->errorString(eglGetError()); + eglDestroySurface(eglContext->display(), pixmapSurface); + pixmapData->gl_surface = (Qt::HANDLE)EGL_NO_SURFACE; + haveTFP = false; + return 0; + } + + QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, canInvert, true); + pixmapData->flags |= QX11PixmapData::InvertedWhenBoundToTexture; + + // We assume the cost of bound pixmaps is zero + QGLTextureCache::instance()->insert(q, key, texture, 0); + + glBindTexture(GL_TEXTURE_2D, textureId); + return texture; +} + +void QGLContextPrivate::destroyGlSurfaceForPixmap(QPixmapData* pmd) +{ + Q_ASSERT(pmd->classId() == QPixmapData::X11Class); + QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd); + if (pixmapData->gl_surface) { + EGLBoolean success; + success = eglDestroySurface(QEglContext::defaultDisplay(0), (EGLSurface)pixmapData->gl_surface); + if (success == EGL_FALSE) { + qWarning() << "destroyGlSurfaceForPixmap() - Error deleting surface: " + << QEglContext::errorString(eglGetError()); + } + pixmapData->gl_surface = 0; + } } -void QGLTexture::deleteBoundPixmap() +void QGLContextPrivate::unbindPixmapFromTexture(QPixmapData* pmd) { - //TODO + Q_ASSERT(pmd->classId() == QPixmapData::X11Class); + QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd); + if (pixmapData->gl_surface) { + EGLBoolean success; + success = eglReleaseTexImage(QEglContext::defaultDisplay(0), + (EGLSurface)pixmapData->gl_surface, + EGL_BACK_BUFFER); + if (success == EGL_FALSE) { + qWarning() << "unbindPixmapFromTexture() - Unable to release bound texture: " + << QEglContext::errorString(eglGetError()); + } + } } QT_END_NAMESPACE diff --git a/src/opengl/qglcolormap.cpp b/src/opengl/qglcolormap.cpp index 426e090eb1..481089a61a 100644 --- a/src/opengl/qglcolormap.cpp +++ b/src/opengl/qglcolormap.cpp @@ -174,13 +174,14 @@ void QGLColormap::setEntry(int idx, QRgb color) detach(); if (!d->cells) d->cells = new QVector<QRgb>(256); - d->cells->insert(idx, color); + d->cells->replace(idx, color); } /*! Set an array of cells in this colormap. \a count is the number of colors that should be set, \a colors is the array of colors, and - \a base is the starting index. + \a base is the starting index. The first element in \a colors + is set at \a base in the colormap. */ void QGLColormap::setEntries(int count, const QRgb *colors, int base) { @@ -188,10 +189,10 @@ void QGLColormap::setEntries(int count, const QRgb *colors, int base) if (!d->cells) d->cells = new QVector<QRgb>(256); - Q_ASSERT_X(!colors || base >= 0 || base + count < d->cells->size(), "QGLColormap::setEntries", + Q_ASSERT_X(colors && base >= 0 && (base + count) <= d->cells->size(), "QGLColormap::setEntries", "preconditions not met"); - for (int i = base; i < base + count; ++i) - setEntry(i, colors[i]); + for (int i = 0; i < count; ++i) + setEntry(base + i, colors[i]); } /*! @@ -227,8 +228,17 @@ QColor QGLColormap::entryColor(int idx) const } /*! - Returns true if the colormap is empty; otherwise returns false. A - colormap with no color values set is considered to be empty. + Returns true if the colormap is empty or it is not in use + by a QGLWidget; otherwise returns false. + + A colormap with no color values set is considered to be empty. + For historical reasons, a colormap that has color values set + but which is not in use by a QGLWidget is also considered empty. + + Compare size() with zero to determine if the colormap is empty + regardless of whether it is in use by a QGLWidget or not. + + \sa size() */ bool QGLColormap::isEmpty() const { diff --git a/src/opengl/qglpixelbuffer_x11.cpp b/src/opengl/qglpixelbuffer_x11.cpp index 9e1f85d328..ac2e705d26 100644 --- a/src/opengl/qglpixelbuffer_x11.cpp +++ b/src/opengl/qglpixelbuffer_x11.cpp @@ -115,6 +115,7 @@ static bool qt_resolve_pbuffer_extensions() if (!qt_glXChooseFBConfig) #endif { +#if !defined(QT_NO_LIBRARY) extern const QString qt_gl_library_name(); QLibrary gl(qt_gl_library_name()); qt_glXChooseFBConfig = (_glXChooseFBConfig) gl.resolve("glXChooseFBConfig"); @@ -123,6 +124,7 @@ static bool qt_resolve_pbuffer_extensions() qt_glXDestroyPbuffer = (_glXDestroyPbuffer) gl.resolve("glXDestroyPbuffer"); qt_glXGetFBConfigAttrib = (_glXGetFBConfigAttrib) gl.resolve("glXGetFBConfigAttrib"); qt_glXMakeContextCurrent = (_glXMakeContextCurrent) gl.resolve("glXMakeContextCurrent"); +#endif } resolved = qt_glXMakeContextCurrent ? true : false; diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp index b5376b1427..13c4053c87 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp @@ -77,13 +77,15 @@ private: QSocketNotifier *keyboardNotifier; DFBEvent event; int bytesRead; - + int lastUnicode, lastKeycode; + Qt::KeyboardModifiers lastModifiers; private Q_SLOTS: void readKeyboardData(); }; QDirectFBKeyboardHandlerPrivate::QDirectFBKeyboardHandlerPrivate(QDirectFBKeyboardHandler *h) - : handler(h), eventBuffer(0) + : handler(h), eventBuffer(0), keyboardNotifier(0), bytesRead(0), + lastUnicode(0), lastKeycode(0), lastModifiers(0) { Q_ASSERT(qt_screen); @@ -114,8 +116,6 @@ QDirectFBKeyboardHandlerPrivate::QDirectFBKeyboardHandlerPrivate(QDirectFBKeyboa ::fcntl(fd, F_SETFL, flags | O_NONBLOCK); memset(&event, 0, sizeof(event)); - bytesRead = 0; - keyboardNotifier = new QSocketNotifier(fd, QSocketNotifier::Read, this); connect(keyboardNotifier, SIGNAL(activated(int)), @@ -213,8 +213,27 @@ void QDirectFBKeyboardHandlerPrivate::readKeyboardData() unicode = symbol; if (unicode != -1 || keycode != 0) { + bool autoRepeat = false; + if (press) { + if (unicode == lastUnicode && keycode == lastKeycode && modifiers == lastModifiers) { + autoRepeat = true; + } else { + lastUnicode = unicode; + lastKeycode = keycode; + lastModifiers = modifiers; + } + } else { + lastUnicode = lastKeycode = -1; + lastModifiers = 0; + } + if (autoRepeat) { + handler->processKeyEvent(unicode, keycode, + modifiers, false, autoRepeat); + + } + handler->processKeyEvent(unicode, keycode, - modifiers, press, false); + modifiers, press, autoRepeat); } } } diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp index 86e92f7b95..207579904c 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp @@ -43,10 +43,17 @@ #include "qdirectfbscreen.h" #include "qdirectfbpaintdevice.h" +#include "qdirectfbpaintengine.h" + +QDirectFBPaintDevice::QDirectFBPaintDevice(QDirectFBScreen *scr) + : QCustomRasterPaintDevice(0), dfbSurface(0), lockedImage(0), screen(scr), + lock(DFBSurfaceLockFlags(0)), mem(0), engine(0) +{} QDirectFBPaintDevice::~QDirectFBPaintDevice() { delete lockedImage; + delete engine; } @@ -164,4 +171,10 @@ int QDirectFBPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const } } +QPaintEngine *QDirectFBPaintDevice::paintEngine() const +{ + return engine; +} + #endif + diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h index 248a15b342..c4aeb702af 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h @@ -51,7 +51,8 @@ QT_BEGIN_HEADER QT_MODULE(Gui) // Inherited by both window surface and pixmap - class QDirectFBPaintDevice : public QCustomRasterPaintDevice +class QDirectFBPaintEngine; +class QDirectFBPaintDevice : public QCustomRasterPaintDevice { public: ~QDirectFBPaintDevice(); @@ -62,19 +63,16 @@ public: void unlockDirectFB(); // Reimplemented from QCustomRasterPaintDevice: - void* memory() const; + void *memory() const; QImage::Format format() const; int bytesPerLine() const; QSize size() const; int metric(QPaintDevice::PaintDeviceMetric metric) const; DFBSurfaceLockFlags lockFlags() const { return lock; } -protected: - // Shouldn't create QDirectFBPaintDevice by itself but only sub-class it: - QDirectFBPaintDevice(QDirectFBScreen *scr = QDirectFBScreen::instance()) - : QCustomRasterPaintDevice(0), dfbSurface(0), lockedImage(0), screen(scr), - lock(DFBSurfaceLockFlags(0)), mem(0) - {} + QPaintEngine *paintEngine() const; +protected: + QDirectFBPaintDevice(QDirectFBScreen *scr); inline int dotsPerMeterX() const { return (screen->deviceWidth() * 1000) / screen->physicalWidth(); @@ -83,16 +81,17 @@ protected: { return (screen->deviceHeight() * 1000) / screen->physicalHeight(); } - +protected: IDirectFBSurface *dfbSurface; QImage *lockedImage; QDirectFBScreen *screen; int bpl; DFBSurfaceLockFlags lock; uchar *mem; + QDirectFBPaintEngine *engine; private: - Q_DISABLE_COPY(QDirectFBPaintDevice) - }; + Q_DISABLE_COPY(QDirectFBPaintDevice); +}; QT_END_HEADER diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index b264ac0ced..58c8a581c1 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -53,16 +53,32 @@ #include <qmath.h> #include <private/qpixmapdata_p.h> #include <private/qpixmap_raster_p.h> +#include <private/qimagepixmapcleanuphooks_p.h> class SurfaceCache; class QDirectFBPaintEnginePrivate : public QRasterPaintEnginePrivate { public: enum TransformationTypeFlags { - NegativeScale = 0x100, - RectsUnsupported = (QTransform::TxRotate|QTransform::TxShear|QTransform::TxProject), - BlitUnsupported = (NegativeScale|RectsUnsupported) + Matrix_NegativeScale = 0x100, + Matrix_RectsUnsupported = (QTransform::TxRotate|QTransform::TxShear|QTransform::TxProject), + Matrix_BlitsUnsupported = (Matrix_NegativeScale|Matrix_RectsUnsupported) }; + + enum CompositionModeStatus { + PorterDuff_None = 0x0, + PorterDuff_SupportedBlits = 0x1, + PorterDuff_SupportedPrimitives = 0x2 + }; + + enum ClipType { + ClipUnset, + NoClip, + RectClip, + RegionClip, + ComplexClip + }; + QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p); ~QDirectFBPaintEnginePrivate(); @@ -76,9 +92,6 @@ public: inline void lock(); inline void unlock(); - inline bool dfbCanHandleClip(const QRect &rect) const; - inline bool dfbCanHandleClip(const QRectF &rect) const; - inline bool dfbCanHandleClip() const; inline bool isSimpleBrush(const QBrush &brush) const; void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos); @@ -100,19 +113,16 @@ private: bool antialiased; bool simplePen; - uint transformationType; // this is QTransform::type() + NegativeScale if qMin(transform.m11(), transform.m22()) < 0 + uint transformationType; // this is QTransform::type() + Matrix_NegativeScale if qMin(transform.m11(), transform.m22()) < 0 SurfaceCache *surfaceCache; - IDirectFB *fb; - quint8 opacity; bool dirtyClip; - bool dfbHandledClip; - bool ignoreSystemClip; + ClipType clipType; QDirectFBPaintDevice *dfbDevice; - bool unsupportedCompositionMode; + uint compositionModeStatus; QDirectFBPaintEngine *q; QRect currentClip; @@ -161,8 +171,12 @@ enum PaintOperation { #ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS template <typename device, typename T1, typename T2, typename T3> -static void rasterFallbackWarn(const char *msg, const char *, const device *, uint, bool, bool, bool, - const char *, const T1 &, const char *, const T2 &, const char *, const T3 &); +static void rasterFallbackWarn(const char *msg, const char *func, const device *dev, + uint transformationType, bool simplePen, + uint clipType, uint compositionModeStatus, + const char *nameOne, const T1 &one, + const char *nameTwo, const T2 &two, + const char *nameThree, const T3 &three); #endif #if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS && defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS @@ -172,8 +186,8 @@ static void rasterFallbackWarn(const char *msg, const char *, const device *, ui __FUNCTION__, state()->painter->device(), \ d_func()->transformationType, \ d_func()->simplePen, \ - d_func()->dfbCanHandleClip(), \ - d_func()->unsupportedCompositionMode, \ + d_func()->clipType, \ + d_func()->compositionModeStatus, \ #one, one, #two, two, #three, three); \ if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \ return; @@ -188,14 +202,13 @@ static void rasterFallbackWarn(const char *msg, const char *, const device *, ui __FUNCTION__, state()->painter->device(), \ d_func()->transformationType, \ d_func()->simplePen, \ - d_func()->dfbCanHandleClip(), \ - d_func()->unsupportedCompositionMode, \ + d_func()->clipType, \ + d_func()->compositionModeStatus, \ #one, one, #two, two, #three, three); #else #define RASTERFALLBACK(op, one, two, three) #endif - template <class T> static inline void drawLines(const T *lines, int n, const QTransform &transform, IDirectFBSurface *surface); template <class T> @@ -203,6 +216,36 @@ static inline void fillRects(const T *rects, int n, const QTransform &transform, template <class T> static inline void drawRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface); +#define CLIPPED_PAINT(operation) { \ + DFBRegion clipRegion; \ + switch (d->clipType) { \ + case QDirectFBPaintEnginePrivate::NoClip: \ + case QDirectFBPaintEnginePrivate::RectClip: \ + operation; \ + break; \ + case QDirectFBPaintEnginePrivate::RegionClip: { \ + Q_ASSERT(d->clip()); \ + const QVector<QRect> cr = d->clip()->clipRegion.rects(); \ + const int size = cr.size(); \ + for (int i=0; i<size; ++i) { \ + d->currentClip = cr.at(i); \ + clipRegion.x1 = d->currentClip.x(); \ + clipRegion.y1 = d->currentClip.y(); \ + clipRegion.x2 = d->currentClip.right(); \ + clipRegion.y2 = d->currentClip.bottom(); \ + d->surface->SetClip(d->surface, &clipRegion); \ + operation; \ + } \ + d->dirtyClip = true; \ + break; } \ + case QDirectFBPaintEnginePrivate::ComplexClip: \ + case QDirectFBPaintEnginePrivate::ClipUnset: \ + qFatal("CLIPPED_PAINT internal error %d", d->clipType); \ + break; \ + } \ + } + + QDirectFBPaintEngine::QDirectFBPaintEngine(QPaintDevice *device) : QRasterPaintEngine(*(new QDirectFBPaintEnginePrivate(this)), device) { @@ -233,7 +276,7 @@ bool QDirectFBPaintEngine::begin(QPaintDevice *device) } d->prepare(d->dfbDevice); - + d->setCompositionMode(state()->composition_mode); return QRasterPaintEngine::begin(device); } @@ -323,58 +366,60 @@ void QDirectFBPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount) { Q_D(QDirectFBPaintEngine); - d->updateClip(); + const QPen &pen = state()->pen; const QBrush &brush = state()->brush; - if (d->unsupportedCompositionMode - || (d->transformationType & QDirectFBPaintEnginePrivate::RectsUnsupported) + if (brush == Qt::NoBrush && pen == Qt::NoPen) + return; + + d->updateClip(); + if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives) + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported) || !d->simplePen - || !d->dfbCanHandleClip() + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip || !d->isSimpleBrush(brush)) { RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawRects(rects, rectCount); return; } - d->unlock(); - if (brush != Qt::NoBrush) { d->setDFBColor(brush.color()); - ::fillRects<QRect>(rects, rectCount, state()->matrix, d->surface); + CLIPPED_PAINT(::fillRects<QRect>(rects, rectCount, state()->matrix, d->surface)); } - const QPen &pen = state()->pen; if (pen != Qt::NoPen) { d->setDFBColor(pen.color()); - ::drawRects<QRect>(rects, rectCount, state()->matrix, d->surface); + CLIPPED_PAINT(::drawRects<QRect>(rects, rectCount, state()->matrix, d->surface)); } } void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount) { Q_D(QDirectFBPaintEngine); - d->updateClip(); + const QPen &pen = state()->pen; const QBrush &brush = state()->brush; - if (d->unsupportedCompositionMode - || (d->transformationType & QDirectFBPaintEnginePrivate::RectsUnsupported) + if (brush == Qt::NoBrush && pen == Qt::NoPen) + return; + + d->updateClip(); + if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives) + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported) || !d->simplePen - || !d->dfbCanHandleClip() + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip || !d->isSimpleBrush(brush)) { RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawRects(rects, rectCount); return; } - d->unlock(); - if (brush != Qt::NoBrush) { d->setDFBColor(brush.color()); - ::fillRects<QRectF>(rects, rectCount, state()->matrix, d->surface); + CLIPPED_PAINT(::fillRects<QRectF>(rects, rectCount, state()->matrix, d->surface)); } - const QPen &pen = state()->pen; if (pen != Qt::NoPen) { d->setDFBColor(pen.color()); - ::drawRects<QRectF>(rects, rectCount, state()->matrix, d->surface); + CLIPPED_PAINT(::drawRects<QRectF>(rects, rectCount, state()->matrix, d->surface)); } } @@ -382,7 +427,10 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (d->unsupportedCompositionMode || !d->simplePen || !d->dfbCanHandleClip()) { + + if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives) + || !d->simplePen + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) { RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawLines(lines, lineCount); @@ -393,7 +441,7 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount) if (pen != Qt::NoPen) { d->unlock(); d->setDFBColor(pen.color()); - ::drawLines<QLine>(lines, lineCount, state()->matrix, d->surface); + CLIPPED_PAINT(::drawLines<QLine>(lines, lineCount, state()->matrix, d->surface)); } } @@ -401,7 +449,10 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (d->unsupportedCompositionMode || !d->simplePen || !d->dfbCanHandleClip()) { + + if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives) + || !d->simplePen + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) { RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawLines(lines, lineCount); @@ -412,7 +463,7 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount) if (pen != Qt::NoPen) { d->unlock(); d->setDFBColor(pen.color()); - ::drawLines<QLineF>(lines, lineCount, state()->matrix, d->surface); + CLIPPED_PAINT(::drawLines<QLineF>(lines, lineCount, state()->matrix, d->surface)); } } @@ -442,9 +493,9 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image, d->updateClip(); #if !defined QT_NO_DIRECTFB_PREALLOCATED || defined QT_DIRECTFB_IMAGECACHE - if (d->unsupportedCompositionMode - || (d->transformationType & QDirectFBPaintEnginePrivate::BlitUnsupported) - || !d->dfbCanHandleClip(r) + if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits) + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported) + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip #ifndef QT_DIRECTFB_IMAGECACHE || QDirectFBScreen::getSurfacePixelFormat(image.format()) == DSPF_UNKNOWN #elif defined QT_NO_DIRECTFB_PREALLOCATED @@ -463,7 +514,7 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image, bool release; IDirectFBSurface *imgSurface = d->getSurface(image, &release); d->prepareForBlit(QDirectFBScreen::hasAlpha(imgSurface)); - d->blit(r, imgSurface, sr); + CLIPPED_PAINT(d->blit(r, imgSurface, sr)); if (release) { #if (Q_DIRECTFB_VERSION >= 0x010000) d->surface->ReleaseSource(d->surface); @@ -482,15 +533,15 @@ void QDirectFBPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap, const QRectF &sr) { Q_D(QDirectFBPaintEngine); - d->updateClip(); + d->updateClip(); if (pixmap.pixmapData()->classId() != QPixmapData::DirectFBClass) { RASTERFALLBACK(DRAW_PIXMAP, r, pixmap.size(), sr); d->lock(); QRasterPaintEngine::drawPixmap(r, pixmap, sr); - } else if (d->unsupportedCompositionMode - || (d->transformationType & QDirectFBPaintEnginePrivate::BlitUnsupported) - || !d->dfbCanHandleClip(r)) { + } else if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits) + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported) + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) { RASTERFALLBACK(DRAW_PIXMAP, r, pixmap.size(), sr); const QImage *img = static_cast<QDirectFBPixmapData*>(pixmap.pixmapData())->buffer(DSLF_READ); d->lock(); @@ -503,7 +554,8 @@ void QDirectFBPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap, QDirectFBPixmapData *dfbData = static_cast<QDirectFBPixmapData*>(data); dfbData->unlockDirectFB(); IDirectFBSurface *s = dfbData->directFBSurface(); - d->blit(r, s, sr); + + CLIPPED_PAINT(d->blit(r, s, sr)); } } @@ -522,9 +574,9 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r, RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), offset); d->lock(); QRasterPaintEngine::drawTiledPixmap(r, pixmap, offset); - } else if (d->unsupportedCompositionMode - || (d->transformationType & QDirectFBPaintEnginePrivate::BlitUnsupported) - || !d->dfbCanHandleClip(r)) { + } else if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits) + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported) + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) { RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), offset); const QImage *img = static_cast<QDirectFBPixmapData*>(pixmap.pixmapData())->buffer(DSLF_READ); d->lock(); @@ -623,30 +675,34 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) if (brush.style() == Qt::NoBrush) return; d->updateClip(); - if (!d->unsupportedCompositionMode - && !(d->transformationType & (QDirectFBPaintEnginePrivate::RectsUnsupported)) - && d->dfbCanHandleClip(rect)) { + if (d->clipType != QDirectFBPaintEnginePrivate::ComplexClip) { switch (brush.style()) { case Qt::SolidPattern: { + if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives) + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)) { + break; + } const QColor color = brush.color(); if (!color.isValid()) return; d->unlock(); d->setDFBColor(color); const QRect r = state()->matrix.mapRect(rect).toRect(); - d->surface->FillRectangle(d->surface, r.x(), r.y(), - r.width(), r.height()); + CLIPPED_PAINT(d->surface->FillRectangle(d->surface, r.x(), r.y(), r.width(), r.height())); return; } + case Qt::TexturePattern: { - if (d->transformationType & QDirectFBPaintEnginePrivate::NegativeScale) + if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits) + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)) { break; + } const QPixmap texture = brush.texture(); if (texture.pixmapData()->classId() != QPixmapData::DirectFBClass) break; d->unlock(); - d->drawTiledPixmap(rect, texture, rect.topLeft() - state()->brushOrigin); + CLIPPED_PAINT(d->drawTiledPixmap(rect, texture, rect.topLeft() - state()->brushOrigin)); return; } default: break; @@ -663,9 +719,9 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color) return; Q_D(QDirectFBPaintEngine); d->updateClip(); - if (d->unsupportedCompositionMode - || (d->transformationType & QDirectFBPaintEnginePrivate::RectsUnsupported) - || !d->dfbCanHandleClip()) { + if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives) + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported) + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) { RASTERFALLBACK(FILL_RECT, rect, color, VOID_ARG()); d->lock(); QRasterPaintEngine::fillRect(rect, color); @@ -699,9 +755,7 @@ void QDirectFBPaintEngine::initImageCache(int size) { Q_ASSERT(size >= 0); imageCache.setMaxCost(size); - typedef void (*_qt_image_cleanup_hook_64)(qint64); - extern Q_GUI_EXPORT _qt_image_cleanup_hook_64 qt_image_cleanup_hook_64; - qt_image_cleanup_hook_64 = ::cachedImageCleanupHook; + QImagePixmapCleanupHooks::instance()->addImageHook(cachedImageCleanupHook); } #endif // QT_DIRECTFB_IMAGECACHE @@ -712,11 +766,10 @@ void QDirectFBPaintEngine::initImageCache(int size) QDirectFBPaintEnginePrivate::QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p) : surface(0), antialiased(false), simplePen(false), transformationType(0), opacity(255), dirtyClip(true), - dfbHandledClip(false), dfbDevice(0), - unsupportedCompositionMode(false), q(p) + clipType(ClipUnset), dfbDevice(0), + compositionModeStatus(0), q(p) { fb = QDirectFBScreen::instance()->dfb(); - ignoreSystemClip = QDirectFBScreen::instance()->directFBFlags() & QDirectFBScreen::IgnoreSystemClip; surfaceCache = new SurfaceCache; } @@ -725,23 +778,6 @@ QDirectFBPaintEnginePrivate::~QDirectFBPaintEnginePrivate() delete surfaceCache; } -bool QDirectFBPaintEnginePrivate::dfbCanHandleClip(const QRect &) const -{ - // TODO: Check to see if DirectFB can handle the clip for the given rect - return dfbHandledClip; -} - -bool QDirectFBPaintEnginePrivate::dfbCanHandleClip(const QRectF &) const -{ - // TODO: Check to see if DirectFB can handle the clip for the given rect - return dfbHandledClip; -} - -bool QDirectFBPaintEnginePrivate::dfbCanHandleClip() const -{ - return dfbHandledClip; -} - bool QDirectFBPaintEnginePrivate::isSimpleBrush(const QBrush &brush) const { return (brush.style() == Qt::NoBrush) || (brush.style() == Qt::SolidPattern && !antialiased); @@ -769,7 +805,7 @@ void QDirectFBPaintEnginePrivate::setTransform(const QTransform &transform) { transformationType = transform.type(); if (qMin(transform.m11(), transform.m22()) < 0) { - transformationType |= QDirectFBPaintEnginePrivate::NegativeScale; + transformationType |= QDirectFBPaintEnginePrivate::Matrix_NegativeScale; } setPen(q->state()->pen); } @@ -791,7 +827,53 @@ void QDirectFBPaintEnginePrivate::setPen(const QPen &pen) void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode mode) { - unsupportedCompositionMode = (mode != QPainter::CompositionMode_SourceOver); + if (!surface) + return; + compositionModeStatus = PorterDuff_SupportedBlits; + switch (mode) { + case QPainter::CompositionMode_Clear: + surface->SetPorterDuff(surface, DSPD_CLEAR); + break; + case QPainter::CompositionMode_Source: + surface->SetPorterDuff(surface, DSPD_SRC); + break; + case QPainter::CompositionMode_SourceOver: + compositionModeStatus |= PorterDuff_SupportedPrimitives; + surface->SetPorterDuff(surface, DSPD_SRC_OVER); + break; + case QPainter::CompositionMode_DestinationOver: + surface->SetPorterDuff(surface, DSPD_DST_OVER); + break; + case QPainter::CompositionMode_SourceIn: + surface->SetPorterDuff(surface, DSPD_SRC_IN); + break; + case QPainter::CompositionMode_DestinationIn: + surface->SetPorterDuff(surface, DSPD_DST_IN); + break; + case QPainter::CompositionMode_SourceOut: + surface->SetPorterDuff(surface, DSPD_SRC_OUT); + break; + case QPainter::CompositionMode_DestinationOut: + surface->SetPorterDuff(surface, DSPD_DST_OUT); + break; +#if (Q_DIRECTFB_VERSION >= 0x010000) + case QPainter::CompositionMode_SourceAtop: + surface->SetPorterDuff(surface, DSPD_SRC_ATOP); + break; + case QPainter::CompositionMode_DestinationAtop: + surface->SetPorterDuff(surface, DSPD_DST_ATOP); + break; + case QPainter::CompositionMode_Plus: + surface->SetPorterDuff(surface, DSPD_ADD); + break; +#endif + case QPainter::CompositionMode_Xor: + surface->SetPorterDuff(surface, DSPD_XOR); + break; + default: + compositionModeStatus = 0; + break; + } } void QDirectFBPaintEnginePrivate::setRenderHints(QPainter::RenderHints hints) @@ -897,7 +979,7 @@ static inline qreal fixCoord(qreal rect_pos, qreal pixmapSize, qreal offset) void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &off) { Q_ASSERT(!dirtyClip); - Q_ASSERT(!(transformationType & BlitUnsupported)); + Q_ASSERT(!(transformationType & Matrix_BlitsUnsupported)); const QTransform &transform = q->state()->matrix; const QRect destinationRect = transform.mapRect(dest).toRect().normalized(); QRect newClip = destinationRect; @@ -910,8 +992,8 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix const DFBRegion clip = { newClip.x(), newClip.y(), - newClip.x() + newClip.width() - 1, - newClip.y() + newClip.height() - 1 + newClip.right(), + newClip.bottom() }; surface->SetClip(surface, &clip); @@ -980,8 +1062,8 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix const DFBRegion clip = { currentClip.x(), currentClip.y(), - currentClip.x() + currentClip.width(), - currentClip.y() + currentClip.height() + currentClip.right(), + currentClip.bottom() }; surface->SetClip(surface, &clip); } @@ -996,22 +1078,22 @@ void QDirectFBPaintEnginePrivate::updateClip() const QClipData *clipData = clip(); if (!clipData || !clipData->enabled) { surface->SetClip(surface, NULL); - dfbHandledClip = true; + clipType = NoClip; } else if (clipData->hasRectClip) { const DFBRegion r = { clipData->clipRect.x(), clipData->clipRect.y(), - clipData->clipRect.x() + clipData->clipRect.width(), - clipData->clipRect.y() + clipData->clipRect.height() + clipData->clipRect.right(), + clipData->clipRect.bottom() }; surface->SetClip(surface, &r); currentClip = clipData->clipRect.normalized(); // ### is this guaranteed to always be normalized? - dfbHandledClip = true; - } else if (clipData->hasRegionClip && ignoreSystemClip && clipData->clipRegion == systemClip) { - dfbHandledClip = true; + clipType = RectClip; + } else if (clipData->hasRegionClip) { + clipType = RegionClip; } else { - dfbHandledClip = false; + clipType = ComplexClip; } dirtyClip = false; @@ -1108,7 +1190,7 @@ template <> inline const bool* ptr<bool>(const bool &) { return 0; } template <typename device, typename T1, typename T2, typename T3> static void rasterFallbackWarn(const char *msg, const char *func, const device *dev, uint transformationType, bool simplePen, - bool dfbHandledClip, bool unsupportedCompositionMode, + uint clipType, uint compositionModeStatus, const char *nameOne, const T1 &one, const char *nameTwo, const T2 &two, const char *nameThree, const T3 &three) @@ -1124,8 +1206,8 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device * dbg << QString("transformationType 0x%1").arg(transformationType, 3, 16, QLatin1Char('0')) << "simplePen" << simplePen - << "dfbHandledClip" << dfbHandledClip - << "unsupportedCompositionMode" << unsupportedCompositionMode; + << "clipType" << clipType + << "compositionModeStatus" << compositionModeStatus; const T1 *t1 = ptr(one); const T2 *t2 = ptr(two); @@ -1142,7 +1224,6 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device * } qWarning("%s", qPrintable(out)); } -#endif - +#endif // QT_DIRECTFB_WARN_ON_RASTERFALLBACKS #endif // QT_NO_DIRECTFB diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 52e85ba3ac..bedd9e5a73 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -49,9 +49,9 @@ static int global_ser_no = 0; -QDirectFBPixmapData::QDirectFBPixmapData(PixelType pixelType) - : QPixmapData(pixelType, DirectFBClass), - engine(0), format(QImage::Format_Invalid), alpha(false) +QDirectFBPixmapData::QDirectFBPixmapData(QDirectFBScreen *screen, PixelType pixelType) + : QPixmapData(pixelType, DirectFBClass), QDirectFBPaintDevice(screen), + format(QImage::Format_Invalid), alpha(false) { setSerialNumber(0); } @@ -61,7 +61,6 @@ QDirectFBPixmapData::~QDirectFBPixmapData() unlockDirectFB(); if (dfbSurface && QDirectFBScreen::instance()) screen->releaseDFBSurface(dfbSurface); - delete engine; } void QDirectFBPixmapData::resize(int width, int height) @@ -304,7 +303,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, Q_ASSERT(image); const QImage transformed = image->transformed(transform, mode); that->unlockDirectFB(); - QDirectFBPixmapData *data = new QDirectFBPixmapData(QPixmapData::PixmapType); + QDirectFBPixmapData *data = new QDirectFBPixmapData(screen, QPixmapData::PixmapType); data->fromImage(transformed, Qt::AutoColor); return QPixmap(data); } @@ -314,7 +313,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, if (size.isEmpty()) return QPixmap(); - QDirectFBPixmapData *data = new QDirectFBPixmapData(QPixmapData::PixmapType); + QDirectFBPixmapData *data = new QDirectFBPixmapData(screen, QPixmapData::PixmapType); DFBSurfaceBlittingFlags flags = DSBLIT_NOFX; data->alpha = alpha; if (alpha) { @@ -373,6 +372,8 @@ QImage QDirectFBPixmapData::toImage() const return img->copy(); } +/* This is QPixmapData::paintEngine(), not QPaintDevice::paintEngine() */ + QPaintEngine *QDirectFBPixmapData::paintEngine() const { if (!engine) { diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h index 020406184e..df3c679a77 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h @@ -56,7 +56,7 @@ class QDirectFBPaintEngine; class QDirectFBPixmapData : public QPixmapData, public QDirectFBPaintDevice { public: - QDirectFBPixmapData(PixelType pixelType); + QDirectFBPixmapData(QDirectFBScreen *screen, PixelType pixelType); ~QDirectFBPixmapData(); // Re-implemented from QPixmapData: @@ -79,7 +79,6 @@ public: inline bool hasAlphaChannel() const { return alpha; } private: void invalidate(); - QDirectFBPaintEngine *engine; QImage::Format format; bool alpha; }; diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 030e51f7c0..4f8fa2f117 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -57,7 +57,7 @@ class QDirectFBScreenPrivate : public QObject, public QWSGraphicsSystem { public: - QDirectFBScreenPrivate(QDirectFBScreen*); + QDirectFBScreenPrivate(QDirectFBScreen *qptr); ~QDirectFBScreenPrivate(); void setFlipFlags(const QStringList &args); @@ -82,10 +82,11 @@ public: QDirectFBScreen::DirectFBFlags directFBFlags; QImage::Format alphaPixmapFormat; QColor backgroundColor; + QDirectFBScreen *q; }; -QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *screen) - : QWSGraphicsSystem(screen), dfb(0), dfbSurface(0), flipFlags(DSFLIP_NONE) +QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *qptr) + : QWSGraphicsSystem(qptr), dfb(0), dfbSurface(0), flipFlags(DSFLIP_NONE) #ifndef QT_NO_DIRECTFB_LAYER , dfbLayer(0) #endif @@ -98,6 +99,7 @@ QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *screen) #endif , directFBFlags(QDirectFBScreen::NoFlags) , alphaPixmapFormat(QImage::Format_Invalid) + , q(qptr) { #ifndef QT_NO_QWS_SIGNALHANDLER QWSSignalHandler::instance()->addObject(this); @@ -742,7 +744,7 @@ QPixmapData *QDirectFBScreenPrivate::createPixmapData(QPixmapData::PixelType typ if (type == QPixmapData::BitmapType) return QWSGraphicsSystem::createPixmapData(type); - return new QDirectFBPixmapData(type); + return new QDirectFBPixmapData(q, type); } #if (Q_DIRECTFB_VERSION >= 0x000923) @@ -914,9 +916,6 @@ bool QDirectFBScreen::connect(const QString &displaySpec) QDirectFBPaintEngine::initImageCache(imageCacheSize); #endif - if (displayArgs.contains(QLatin1String("ignoresystemclip"), Qt::CaseInsensitive)) - d_ptr->directFBFlags |= IgnoreSystemClip; - #ifndef QT_NO_DIRECTFB_WM if (displayArgs.contains(QLatin1String("fullscreen"))) #endif @@ -1328,15 +1327,15 @@ void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags for (int i=0; i<rects.size(); ++i) { const QRect &r = rects.at(i); const DFBRegion dfbReg = { r.x() + offset.x(), r.y() + offset.y(), - r.x() + r.width() + offset.x(), - r.y() + r.height() + offset.y() }; + r.right() + offset.x(), + r.bottom() + offset.y() }; surface->Flip(surface, &dfbReg, i + 1 < rects.size() ? nonWaitFlags : flipFlags); } } else { const QRect r = region.boundingRect(); const DFBRegion dfbReg = { r.x() + offset.x(), r.y() + offset.y(), - r.x() + r.width() + offset.x(), - r.y() + r.height() + offset.y() }; + r.right() + offset.x(), + r.bottom() + offset.y() }; surface->Flip(surface, &dfbReg, flipFlags); } } diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h index 63c608eec7..8884a06e01 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h @@ -79,8 +79,7 @@ public: NoFlags = 0x00, VideoOnly = 0x01, SystemOnly = 0x02, - IgnoreSystemClip = 0x04, - BoundingRectFlip = 0x08 + BoundingRectFlip = 0x04 }; Q_DECLARE_FLAGS(DirectFBFlags, DirectFBFlag); diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index a1009ac0dc..34168bc6b3 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -55,7 +55,7 @@ QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirect #ifndef QT_NO_DIRECTFB_WM , dfbWindow(0) #endif - , engine(0) + , engineHeight(-1) , flipFlags(flip) , boundingRectFlip(scr->directFBFlags() & QDirectFBScreen::BoundingRectFlip) { @@ -76,7 +76,7 @@ QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirect #ifndef QT_NO_DIRECTFB_WM , dfbWindow(0) #endif - , engine(0) + , engineHeight(-1) , flipFlags(flip) , boundingRectFlip(scr->directFBFlags() & QDirectFBScreen::BoundingRectFlip) { @@ -209,7 +209,6 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) if (!dfbWindow) createWindow(); ::setGeometry(dfbWindow, oldRect, rect); - // ### do I need to release and get the surface again here? #endif break; case Offscreen: { @@ -227,7 +226,10 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) if (result != DFB_OK) DirectFBErrorFatal("QDirectFBWindowSurface::setGeometry()", result); } - + if (engine) { + delete engine; + engine = 0; + } QWSWindowSurface::setGeometry(rect); } @@ -293,16 +295,6 @@ bool QDirectFBWindowSurface::move(const QPoint &moveBy) return true; } -QPaintEngine *QDirectFBWindowSurface::paintEngine() const -{ - if (!engine) { - QDirectFBWindowSurface *that = const_cast<QDirectFBWindowSurface*>(this); - that->engine = new QDirectFBPaintEngine(that); - return that->engine; - } - return engine; -} - // hw: XXX: copied from QWidgetPrivate::isOpaque() inline bool isWidgetOpaque(const QWidget *w) { @@ -427,6 +419,12 @@ void QDirectFBWindowSurface::flush(QWidget *, const QRegion ®ion, void QDirectFBWindowSurface::beginPaint(const QRegion &) { + const int h = height(); + if (h > engineHeight) { + engineHeight = h; + delete engine; + engine = new QDirectFBPaintEngine(this); + } } void QDirectFBWindowSurface::endPaint(const QRegion &) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h index c46d93bf40..fefe9f35a3 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h @@ -61,8 +61,8 @@ QT_MODULE(Gui) class QDirectFBWindowSurface : public QWSWindowSurface, public QDirectFBPaintDevice { public: - QDirectFBWindowSurface(DFBSurfaceFlipFlags flipFlags, QDirectFBScreen* scr); - QDirectFBWindowSurface(DFBSurfaceFlipFlags flipFlags, QDirectFBScreen* scr, QWidget *widget); + QDirectFBWindowSurface(DFBSurfaceFlipFlags flipFlags, QDirectFBScreen *scr); + QDirectFBWindowSurface(DFBSurfaceFlipFlags flipFlags, QDirectFBScreen *scr, QWidget *widget); ~QDirectFBWindowSurface(); bool isValid() const; @@ -79,7 +79,6 @@ public: QImage image() const { return QImage(); } QPaintDevice *paintDevice() { return this; } - QPaintEngine *paintEngine() const; void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset); @@ -92,7 +91,7 @@ private: void createWindow(); IDirectFBWindow *dfbWindow; #endif - QDirectFBPaintEngine *engine; + int engineHeight; enum Mode { Primary, diff --git a/src/script/qscriptbuffer_p.h b/src/script/qscriptbuffer_p.h index 9db32a869c..4b829ee24c 100644 --- a/src/script/qscriptbuffer_p.h +++ b/src/script/qscriptbuffer_p.h @@ -44,6 +44,11 @@ #include <QtCore/qglobal.h> +#if defined(Q_OS_VXWORKS) && defined(m_data) +# undef m_data +#endif + + QT_BEGIN_NAMESPACE // diff --git a/src/script/qscriptclassinfo_p.h b/src/script/qscriptclassinfo_p.h index fb40d15ea3..8f4d4fee81 100644 --- a/src/script/qscriptclassinfo_p.h +++ b/src/script/qscriptclassinfo_p.h @@ -53,6 +53,10 @@ // We mean it. // +#if defined(Q_OS_VXWORKS) && defined(m_type) +# undef m_type +#endif + #include "qscriptclassdata_p.h" #ifndef QT_NO_SCRIPT diff --git a/src/script/qscriptecmadate.cpp b/src/script/qscriptecmadate.cpp index 9b5372429b..8c91a25376 100644 --- a/src/script/qscriptecmadate.cpp +++ b/src/script/qscriptecmadate.cpp @@ -58,10 +58,14 @@ #include <math.h> #ifndef Q_WS_WIN -# include <time.h> -# include <sys/time.h> +# include <time.h> +# ifndef Q_OS_VXWORKS +# include <sys/time.h> +# else +# include "qplatformdefs.h" +# endif #else -# include <windows.h> +# include <windows.h> #endif QT_BEGIN_NAMESPACE diff --git a/src/script/qscriptextqobject.cpp b/src/script/qscriptextqobject.cpp index 88fd007a0a..3ea59638b4 100644 --- a/src/script/qscriptextqobject.cpp +++ b/src/script/qscriptextqobject.cpp @@ -736,7 +736,7 @@ static void callQtMethod(QScriptContextPrivate *context, QMetaMethod::MethodType meta->static_metacall(QMetaObject::CreateInstance, chosenIndex, params); } else { Q_ASSERT(thisQObject != 0); - thisQObject->qt_metacall(QMetaObject::InvokeMetaMethod, chosenIndex, params); + QMetaObject::metacall(thisQObject, QMetaObject::InvokeMetaMethod, chosenIndex, params); } if (scriptable) diff --git a/src/script/qscriptgc_p.h b/src/script/qscriptgc_p.h index 313519ab44..769e136b9b 100644 --- a/src/script/qscriptgc_p.h +++ b/src/script/qscriptgc_p.h @@ -53,6 +53,10 @@ // We mean it. // +#if defined(Q_OS_VXWORKS) && defined(m_free) +# undef m_free +#endif + #include <QtCore/qglobal.h> #ifndef QT_NO_SCRIPT diff --git a/src/script/qscriptmemberfwd_p.h b/src/script/qscriptmemberfwd_p.h index 056876b9ae..6c12feff10 100644 --- a/src/script/qscriptmemberfwd_p.h +++ b/src/script/qscriptmemberfwd_p.h @@ -53,6 +53,10 @@ // We mean it. // +#if defined(Q_OS_VXWORKS) && defined(m_flags) +# undef m_flags +#endif + #include <QtCore/qglobal.h> QT_BEGIN_NAMESPACE diff --git a/src/script/qscriptsyntaxcheckresult_p.h b/src/script/qscriptsyntaxcheckresult_p.h index d6049f8fcd..9b51f7deeb 100644 --- a/src/script/qscriptsyntaxcheckresult_p.h +++ b/src/script/qscriptsyntaxcheckresult_p.h @@ -53,6 +53,10 @@ // We mean it. // +#if defined(Q_OS_VXWORKS) && defined(m_type) +# undef m_type +#endif + #ifndef QT_NO_SCRIPT #include <QtCore/qatomic.h> diff --git a/src/script/qscriptvalueimplfwd_p.h b/src/script/qscriptvalueimplfwd_p.h index 5a98bf0fe8..ade23ada56 100644 --- a/src/script/qscriptvalueimplfwd_p.h +++ b/src/script/qscriptvalueimplfwd_p.h @@ -64,6 +64,10 @@ QT_BEGIN_NAMESPACE // We mean it. // +#if defined(Q_OS_VXWORKS) && defined(m_type) +# undef m_type +#endif + class QScriptValueImpl; typedef QList<QScriptValueImpl> QScriptValueImplList; diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index bfd65fcfe7..bd6f7b94bc 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -1338,8 +1338,8 @@ QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const if (!isOpen()) return idx; - prepQ = d->preparedQuerys; - d->preparedQuerys = false; + prepQ = d->preparedQuerysEnabled; + d->preparedQuerysEnabled = false; QSqlQuery i(createResult()); QString stmt(QLatin1String("show index from %1;")); @@ -1353,7 +1353,7 @@ QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const } } - d->preparedQuerys = prepQ; + d->preparedQuerysEnabled = prepQ; return idx; } diff --git a/src/src.pro b/src/src.pro index 317591695c..872dbef8f7 100644 --- a/src/src.pro +++ b/src/src.pro @@ -10,7 +10,7 @@ wince*:{ SRC_SUBDIRS += $$QT_SOURCE_TREE/src/s60installs/qt_libs.pro } else { SRC_SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic src_corelib src_xml src_network src_gui src_sql src_script src_testlib - contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support + !vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus !cross_compile { contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_tools_uic3 diff --git a/src/svg/qsvggraphics.cpp b/src/svg/qsvggraphics.cpp index e09f382f10..2be7559088 100644 --- a/src/svg/qsvggraphics.cpp +++ b/src/svg/qsvggraphics.cpp @@ -266,21 +266,23 @@ void QSvgRect::draw(QPainter *p, QSvgExtraStates &states) } } +QSvgTspan * const QSvgText::LINEBREAK = 0; + QSvgText::QSvgText(QSvgNode *parent, const QPointF &coord) : QSvgNode(parent) , m_coord(coord) - , m_textAlignment(Qt::AlignLeft) - , m_scale(1) - , m_appendSpace(false) , m_type(TEXT) , m_size(0, 0) + , m_mode(Default) { - m_paragraphs.push_back(QString()); - m_formatRanges.push_back(QList<QTextLayout::FormatRange>()); } QSvgText::~QSvgText() { + for (int i = 0; i < m_tspans.size(); ++i) { + if (m_tspans[i] != LINEBREAK) + delete m_tspans[i]; + } } void QSvgText::setTextArea(const QSizeF &size) @@ -295,175 +297,173 @@ void QSvgText::draw(QPainter *p, QSvgExtraStates &states) { applyStyle(p, states); - QSvgFontStyle *fontStyle = static_cast<QSvgFontStyle*>( - styleProperty(QSvgStyleProperty::FONT)); - if (fontStyle && fontStyle->svgFont()) { - // SVG fonts not fully supported... - QString text = m_paragraphs.front(); - for (int i = 1; i < m_paragraphs.size(); ++i) { - text.append(QLatin1Char('\n')); - text.append(m_paragraphs[i]); - } - fontStyle->svgFont()->draw(p, m_coord, text, fontStyle->pointSize(), m_textAlignment); - revertStyle(p, states); - return; - } + // Force the font to have a size of 100 pixels to avoid truncation problems + // when the font is very small. + qreal scale = 100.0 / p->font().pointSizeF(); + Qt::Alignment alignment = states.textAnchor; - // Scale the font to its correct size. QTransform oldTransform = p->worldTransform(); - p->scale(1 / m_scale, 1 / m_scale); + p->scale(1 / scale, 1 / scale); qreal y = 0; bool initial = true; - qreal px = m_coord.x() * m_scale; - qreal py = m_coord.y() * m_scale; - QSizeF scaledSize = m_size * m_scale; + qreal px = m_coord.x() * scale; + qreal py = m_coord.y() * scale; + QSizeF scaledSize = m_size * scale; if (m_type == TEXTAREA) { - if (m_textAlignment == Qt::AlignHCenter) + if (alignment == Qt::AlignHCenter) px += scaledSize.width() / 2; - else if (m_textAlignment == Qt::AlignRight) + else if (alignment == Qt::AlignRight) px += scaledSize.width(); } QRectF bounds; if (m_size.height() != 0) - bounds = QRectF(0, 0, 1, scaledSize.height()); - - for (int i = 0; i < m_paragraphs.size(); ++i) { - QTextLayout tl(m_paragraphs[i]); - QTextOption op = tl.textOption(); - op.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); - tl.setTextOption(op); - tl.setAdditionalFormats(m_formatRanges[i]); - tl.beginLayout(); - forever { - QTextLine line = tl.createLine(); - if (!line.isValid()) - break; - - if (m_size.width() != 0) - line.setLineWidth(scaledSize.width()); - } - tl.endLayout(); - - bool endOfBoundsReached = false; - for (int i = 0; i < tl.lineCount(); ++i) { - QTextLine line = tl.lineAt(i); - - qreal x = 0; - if (m_textAlignment == Qt::AlignHCenter) - x -= line.naturalTextWidth() / 2; - else if (m_textAlignment == Qt::AlignRight) - x -= line.naturalTextWidth(); - - if (initial && m_type == TEXT) - y -= line.ascent(); - initial = false; - - line.setPosition(QPointF(x, y)); - if ((m_size.width() != 0 && line.naturalTextWidth() > scaledSize.width()) - || (m_size.height() != 0 && y + line.height() > scaledSize.height())) { - bounds.setHeight(y); - endOfBoundsReached = true; - break; + bounds = QRectF(0, py, 1, scaledSize.height()); // x and width are not used. + + bool appendSpace = false; + QVector<QString> paragraphs; + QStack<QTextCharFormat> formats; + QVector<QList<QTextLayout::FormatRange> > formatRanges; + paragraphs.push_back(QString()); + formatRanges.push_back(QList<QTextLayout::FormatRange>()); + + for (int i = 0; i < m_tspans.size(); ++i) { + if (m_tspans[i] == LINEBREAK) { + if (m_type == TEXTAREA) { + if (paragraphs.back().isEmpty()) { + QFont font = p->font(); + font.setPixelSize(font.pointSizeF() * scale); + + QTextLayout::FormatRange range; + range.start = 0; + range.length = 1; + range.format.setFont(font); + formatRanges.back().append(range); + + paragraphs.back().append(QLatin1Char(' '));; + } + appendSpace = false; + paragraphs.push_back(QString()); + formatRanges.push_back(QList<QTextLayout::FormatRange>()); } + } else { + WhitespaceMode mode = m_tspans[i]->whitespaceMode(); + m_tspans[i]->applyStyle(p, states); - y += 1.1 * line.height(); - } - tl.draw(p, QPointF(px, py), QVector<QTextLayout::FormatRange>(), bounds); + QFont font = p->font(); + font.setPixelSize(font.pointSizeF() * scale); - if (endOfBoundsReached) - break; - } + QString newText(m_tspans[i]->text()); + newText.replace(QLatin1Char('\t'), QLatin1Char(' ')); + newText.replace(QLatin1Char('\n'), QLatin1Char(' ')); - p->setWorldTransform(oldTransform, false); - revertStyle(p, states); -} + bool prependSpace = !appendSpace && !m_tspans[i]->isTspan() && (mode == Default) && !paragraphs.back().isEmpty() && newText.startsWith(QLatin1Char(' ')); + if (appendSpace || prependSpace) + paragraphs.back().append(QLatin1Char(' ')); -void QSvgText::insertText(const QString &text, WhitespaceMode mode) -{ - bool isTSpan = (m_formats.count() == 2); - QString newText(text); - newText.replace(QLatin1Char('\t'), QLatin1Char(' ')); - newText.replace(QLatin1Char('\n'), QLatin1Char(' ')); + bool appendSpaceNext = (!m_tspans[i]->isTspan() && (mode == Default) && newText.endsWith(QLatin1Char(' '))); - bool prependSpace = !m_appendSpace && !isTSpan && (mode == Default) && !m_paragraphs.back().isEmpty() && newText.startsWith(QLatin1Char(' ')); - if (m_appendSpace || prependSpace) - m_paragraphs.back().append(QLatin1Char(' ')); + if (mode == Default) { + newText = newText.simplified(); + if (newText.isEmpty()) + appendSpaceNext = false; + } - bool appendSpaceNext = (!isTSpan && (mode == Default) && newText.endsWith(QLatin1Char(' '))); + QTextLayout::FormatRange range; + range.start = paragraphs.back().length(); + range.length = newText.length(); + range.format.setFont(font); + range.format.setTextOutline(p->pen()); + range.format.setForeground(p->brush()); + + if (appendSpace) { + Q_ASSERT(!formatRanges.back().isEmpty()); + ++formatRanges.back().back().length; + } else if (prependSpace) { + --range.start; + ++range.length; + } + formatRanges.back().append(range); - if (mode == Default) { - newText = newText.simplified(); - if (newText.isEmpty()) - appendSpaceNext = false; - } + appendSpace = appendSpaceNext; + paragraphs.back() += newText; - if (!m_formats.isEmpty()) { - QTextLayout::FormatRange range; - range.start = m_paragraphs.back().length(); - range.length = newText.length(); - range.format = m_formats.top(); - if (m_appendSpace) { - Q_ASSERT(!m_formatRanges.back().isEmpty()); - ++m_formatRanges.back().back().length; - } else if (prependSpace) { - --range.start; - ++range.length; + m_tspans[i]->revertStyle(p, states); } - m_formatRanges.back().append(range); } - m_appendSpace = appendSpaceNext; - m_paragraphs.back() += newText; -} - -void QSvgText::insertFormat(const QTextCharFormat &format) -{ - QTextCharFormat mergedFormat = format; - if (!m_formats.isEmpty()) { - mergedFormat = m_formats.top(); - mergedFormat.merge(format); - } - m_formats.push(mergedFormat); -} + if (states.svgFont) { + // SVG fonts not fully supported... + QString text = paragraphs.front(); + for (int i = 1; i < paragraphs.size(); ++i) { + text.append(QLatin1Char('\n')); + text.append(paragraphs[i]); + } + states.svgFont->draw(p, m_coord, text, p->font().pointSizeF() * scale, states.textAnchor); + } else { + for (int i = 0; i < paragraphs.size(); ++i) { + QTextLayout tl(paragraphs[i]); + QTextOption op = tl.textOption(); + op.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); + tl.setTextOption(op); + tl.setAdditionalFormats(formatRanges[i]); + tl.beginLayout(); + + forever { + QTextLine line = tl.createLine(); + if (!line.isValid()) + break; + if (m_size.width() != 0) + line.setLineWidth(scaledSize.width()); + } + tl.endLayout(); + + bool endOfBoundsReached = false; + for (int i = 0; i < tl.lineCount(); ++i) { + QTextLine line = tl.lineAt(i); + + qreal x = 0; + if (alignment == Qt::AlignHCenter) + x -= 0.5 * line.naturalTextWidth(); + else if (alignment == Qt::AlignRight) + x -= line.naturalTextWidth(); + + if (initial && m_type == TEXT) + y -= line.ascent(); + initial = false; + + line.setPosition(QPointF(x, y)); + + // Check if the current line fits into the bounding rectangle. + if ((m_size.width() != 0 && line.naturalTextWidth() > scaledSize.width()) + || (m_size.height() != 0 && y + line.height() > scaledSize.height())) { + // I need to set the bounds height to 'y-epsilon' to avoid drawing the current + // line. Since the font is scaled to 100 units, 1 should be a safe epsilon. + bounds.setHeight(y - 1); + endOfBoundsReached = true; + break; + } + + y += 1.1 * line.height(); + } + tl.draw(p, QPointF(px, py), QVector<QTextLayout::FormatRange>(), bounds); -void QSvgText::insertLineBreak() -{ - if (m_type == TEXTAREA) { - if (m_paragraphs.back().isEmpty()) - insertText(QLatin1String(" "), Preserve); - m_appendSpace = false; - m_paragraphs.push_back(QString()); - m_formatRanges.push_back(QList<QTextLayout::FormatRange>()); + if (endOfBoundsReached) + break; + } } -} -void QSvgText::popFormat() -{ - if (m_formats.count() > 1) - m_formats.pop(); -} - -qreal QSvgText::scale() const -{ - return m_scale; -} - -void QSvgText::setScale(qreal scale) -{ - m_scale = scale; -} - -const QTextCharFormat &QSvgText::topFormat() const -{ - return m_formats.top(); + p->setWorldTransform(oldTransform, false); + revertStyle(p, states); } -void QSvgText::setTextAlignment(const Qt::Alignment &alignment) +void QSvgText::addText(const QString &text) { - m_textAlignment = alignment; + m_tspans.append(new QSvgTspan(this, false)); + m_tspans.back()->setWhitespaceMode(m_mode); + m_tspans.back()->addText(text); } QSvgUse::QSvgUse(const QPointF &start, QSvgNode *parent, QSvgNode *node) diff --git a/src/svg/qsvggraphics_p.h b/src/svg/qsvggraphics_p.h index 4a19c7e123..345b90b3de 100644 --- a/src/svg/qsvggraphics_p.h +++ b/src/svg/qsvggraphics_p.h @@ -187,6 +187,8 @@ private: int m_rx, m_ry; }; +class QSvgTspan; + class QSvgText : public QSvgNode { public: @@ -202,26 +204,47 @@ public: virtual void draw(QPainter *p, QSvgExtraStates &states); virtual Type type() const; - void insertText(const QString &text, WhitespaceMode mode); - void insertFormat(const QTextCharFormat &format); - void insertLineBreak(); - void popFormat(); - void setTextAlignment(const Qt::Alignment &alignment); - const QTextCharFormat &topFormat() const; - qreal scale() const; - void setScale(qreal scale); + + void addTspan(QSvgTspan *tspan) {m_tspans.append(tspan);} + void addText(const QString &text); + void addLineBreak() {m_tspans.append(LINEBREAK);} + void setWhitespaceMode(WhitespaceMode mode) {m_mode = mode;} + //virtual QRectF bounds() const; private: + static QSvgTspan * const LINEBREAK; + QPointF m_coord; - QVector<QString> m_paragraphs; - QStack<QTextCharFormat> m_formats; - Qt::Alignment m_textAlignment; - QVector<QList<QTextLayout::FormatRange> > m_formatRanges; - qreal m_scale; - bool m_appendSpace; + // 'm_tspans' is also used to store characters outside tspans and line breaks. + // If a 'm_tspan' item is null, it indicates a line break. + QVector<QSvgTspan *> m_tspans; + Type m_type; QSizeF m_size; + WhitespaceMode m_mode; +}; + +class QSvgTspan : public QSvgNode +{ +public: + // tspans are also used to store normal text, so the 'isProperTspan' is used to separate text from tspan. + QSvgTspan(QSvgNode *parent, bool isProperTspan = true) + : QSvgNode(parent), m_mode(QSvgText::Default), m_isTspan(isProperTspan) + { + } + ~QSvgTspan() { }; + virtual Type type() const {return TSPAN;} + virtual void draw(QPainter *, QSvgExtraStates &) {Q_ASSERT(!"Tspans should be drawn through QSvgText::draw().");} + void addText(const QString &text) {m_text += text;} + const QString &text() const {return m_text;} + bool isTspan() const {return m_isTspan;} + void setWhitespaceMode(QSvgText::WhitespaceMode mode) {m_mode = mode;} + QSvgText::WhitespaceMode whitespaceMode() const {return m_mode;} +private: + QString m_text; + QSvgText::WhitespaceMode m_mode; + bool m_isTspan; }; class QSvgUse : public QSvgNode diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 5857e1c44f..73c8b01698 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -39,6 +39,8 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" + #include "qsvghandler_p.h" #ifndef QT_NO_SVG @@ -68,6 +70,8 @@ QT_BEGIN_NAMESPACE +static const char *qt_inherit_text = "inherit"; +#define QT_INHERIT QLatin1String(qt_inherit_text) double qstrtod(const char *s00, char const **se, bool *ok); @@ -354,7 +358,7 @@ static qreal toDouble(const QChar *&str) if (neg) val = -val; } else { -#ifdef Q_WS_QWS +#if defined(Q_WS_QWS) && !defined(Q_OS_VXWORKS) if(sizeof(qreal) == sizeof(float)) val = strtof(temp, 0); else @@ -490,7 +494,7 @@ static bool resolveColor(const QString &colorStr, QColor &color, QSvgHandler *ha int(compo[2])); return true; } else if (colorStr == QLatin1String("inherited") || - colorStr == QLatin1String("inherit")) { + colorStr == QT_INHERIT) { return false; } else if (colorStr == QLatin1String("currentColor")) { color = handler->currentColor(); @@ -644,138 +648,48 @@ static void parseBrush(QSvgNode *node, QString opacity = attributes.value(QLatin1String("fill-opacity")).toString(); QString myId = someId(attributes); - QSvgFillStyle *prop = new QSvgFillStyle(0); - - //fill-rule attribute handling - if (!fillRule.isEmpty() && fillRule != QLatin1String("inherit")) { - if (fillRule == QLatin1String("evenodd")) - prop->setFillRule(Qt::OddEvenFill); - else if (fillRule == QLatin1String("nonzero")) - prop->setFillRule(Qt::WindingFill); - } - - //fill-opacity atttribute handling - if (!opacity.isEmpty() && opacity != QLatin1String("inherit")) { - prop->setFillOpacity(qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity)))); - } + if (!value.isEmpty() || !fillRule.isEmpty() || !opacity.isEmpty()) { + QSvgFillStyle *prop = new QSvgFillStyle(0); - //fill attribute handling - if ((!value.isEmpty()) && (value != QLatin1String("inherit")) ) { - if (value.startsWith(QLatin1String("url"))) { - value = value.remove(0, 3); - QSvgStyleProperty *style = styleFromUrl(node, value); - if (style) { - prop->setFillStyle(style); - } else { - QString id = idFromUrl(value); - prop->setGradientId(id); - prop->setGradientResolved(false); - } - } else if (value != QLatin1String("none")) { - QColor color; - if (resolveColor(value, color, handler)) - prop->setBrush(QBrush(color)); - } else { - prop->setBrush(QBrush(Qt::NoBrush)); + //fill-rule attribute handling + if (!fillRule.isEmpty() && fillRule != QT_INHERIT) { + if (fillRule == QLatin1String("evenodd")) + prop->setFillRule(Qt::OddEvenFill); + else if (fillRule == QLatin1String("nonzero")) + prop->setFillRule(Qt::WindingFill); } - } - node->appendStyleProperty(prop,myId); -} + //fill-opacity atttribute handling + if (!opacity.isEmpty() && opacity != QT_INHERIT) { + prop->setFillOpacity(qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity)))); + } -static void parseQPen(QPen &pen, QSvgNode *node, - const QSvgAttributes &attributes, - QSvgHandler *handler) -{ - QString value = attributes.value(QLatin1String("stroke")).toString(); - QString dashArray = attributes.value(QLatin1String("stroke-dasharray")).toString(); - QString dashOffset = attributes.value(QLatin1String("stroke-dashoffset")).toString(); - QString linecap = attributes.value(QLatin1String("stroke-linecap")).toString(); - QString linejoin = attributes.value(QLatin1String("stroke-linejoin")).toString(); - QString miterlimit = attributes.value(QLatin1String("stroke-miterlimit")).toString(); - QString opacity = attributes.value(QLatin1String("stroke-opacity")).toString(); - QString width = attributes.value(QLatin1String("stroke-width")).toString(); - QString myId = someId(attributes); - - if (!value.isEmpty() || !width.isEmpty()) { - if (value != QLatin1String("none")) { - if (!value.isEmpty()) { - if (node && value.startsWith(QLatin1String("url"))) { - value = value.remove(0, 3); - QSvgStyleProperty *style = styleFromUrl(node, value); - if (style) { - if (style->type() == QSvgStyleProperty::GRADIENT) { - QBrush b(*((QSvgGradientStyle*)style)->qgradient()); - pen.setBrush(b); - } else if (style->type() == QSvgStyleProperty::SOLID_COLOR) { - pen.setColor( - ((QSvgSolidColorStyle*)style)->qcolor()); - } - } else { - qWarning()<<"QSvgHandler::parsePen could not resolve property" << idFromUrl(value); - } + //fill attribute handling + if ((!value.isEmpty()) && (value != QT_INHERIT) ) { + if (value.startsWith(QLatin1String("url"))) { + value = value.remove(0, 3); + QSvgStyleProperty *style = styleFromUrl(node, value); + if (style) { + prop->setFillStyle(style); } else { - QColor color; - if (constructColor(value, opacity, color, handler)) - pen.setColor(color); + QString id = idFromUrl(value); + prop->setGradientId(id); + prop->setGradientResolved(false); } - //since we could inherit stroke="none" - //we need to reset the style of our stroke to something - pen.setStyle(Qt::SolidLine); - } - if (!width.isEmpty()) { - QSvgHandler::LengthType lt; - qreal widthF = parseLength(width, lt, handler); - //### fixme - if (!widthF) { - pen.setStyle(Qt::NoPen); - return; - } - pen.setWidthF(widthF); - } - qreal penw = pen.widthF(); - - if (!linejoin.isEmpty()) { - if (linejoin == QLatin1String("miter")) - pen.setJoinStyle(Qt::SvgMiterJoin); - else if (linejoin == QLatin1String("round")) - pen.setJoinStyle(Qt::RoundJoin); - else if (linejoin == QLatin1String("bevel")) - pen.setJoinStyle(Qt::BevelJoin); - } - if (!miterlimit.isEmpty()) - pen.setMiterLimit(toDouble(miterlimit)); - - if (!linecap.isEmpty()) { - if (linecap == QLatin1String("butt")) - pen.setCapStyle(Qt::FlatCap); - else if (linecap == QLatin1String("round")) - pen.setCapStyle(Qt::RoundCap); - else if (linecap == QLatin1String("square")) - pen.setCapStyle(Qt::SquareCap); - } - - if (!dashArray.isEmpty()) { - const QChar *s = dashArray.constData(); - QVector<qreal> dashes = parseNumbersList(s); - qreal *d = dashes.data(); - if (penw != 0) - for (int i = 0; i < dashes.size(); ++i) { - *d /= penw; - ++d; - } - pen.setDashPattern(dashes); - } - if (!dashOffset.isEmpty()) { - pen.setDashOffset(toDouble(dashOffset)); + } else if (value != QLatin1String("none")) { + QColor color; + if (resolveColor(value, color, handler)) + prop->setBrush(QBrush(color)); + } else { + prop->setBrush(QBrush(Qt::NoBrush)); } - - } else { - pen.setStyle(Qt::NoPen); } + node->appendStyleProperty(prop, myId); } } + + static QMatrix parseTransformationMatrix(const QString &value) { QMatrix matrix; @@ -915,18 +829,15 @@ static void parsePen(QSvgNode *node, QString miterlimit = attributes.value(QLatin1String("stroke-miterlimit")).toString(); QString opacity = attributes.value(QLatin1String("stroke-opacity")).toString(); QString width = attributes.value(QLatin1String("stroke-width")).toString(); + QString vectorEffect = attributes.value(QLatin1String("vector-effect")).toString(); QString myId = someId(attributes); //qDebug()<<"Node "<<node->type()<<", attrs are "<<value<<width; - /* All the below checks needed because g (or any container element) can have only one of these attributes. - * If it doesn't has any one of these, then processing below not needed */ - if (!value.isEmpty() || !width.isEmpty() || !dashArray.isEmpty() || !linecap.isEmpty() || - !linejoin.isEmpty() || !miterlimit.isEmpty() || !opacity.isEmpty() || !dashOffset.isEmpty() ) { - //if (value != QLatin1String("none")) { - /* If stroke = "none" then also, we need to parse below, because elements like 'g' may - have other defined stroke attributes, which will be inherited by its children */ + !linejoin.isEmpty() || !miterlimit.isEmpty() || !opacity.isEmpty() || + !dashOffset.isEmpty() || !vectorEffect.isEmpty()) { + QSvgStrokeStyle *inherited = static_cast<QSvgStrokeStyle*>(node->parent()->styleProperty( QSvgStyleProperty::STROKE)); @@ -940,14 +851,14 @@ static void parsePen(QSvgNode *node, // stroke-opacity attribute handling qreal strokeAlpha; - if (!opacity.isEmpty() && opacity != QLatin1String("inherit")) { + if (!opacity.isEmpty() && opacity != QT_INHERIT) { strokeAlpha = qMin(qreal(1.0), qMax(qreal(0.0), toDouble(opacity))); } else { strokeAlpha = pen.color().alphaF(); } //stroke attribute handling - if (!value.isEmpty() && value != QLatin1String("inherit")) { + if (!value.isEmpty() && value != QT_INHERIT) { if (value.startsWith(QLatin1String("url"))) { value = value.remove(0, 3); QSvgStyleProperty *style = styleFromUrl(node, value); @@ -959,8 +870,7 @@ static void parsePen(QSvgNode *node, pen.setColor( ((QSvgSolidColorStyle*)style)->qcolor()); } - pen.setStyle(Qt::SolidLine); - stroke = true; + stroke = true; } else { qWarning() << "QSvgHandler::parsePen could not resolve property" << idFromUrl(value); } @@ -984,14 +894,11 @@ static void parsePen(QSvgNode *node, } //stroke-width handling - if (!width.isEmpty() && width != QLatin1String("inherit")) { + if (!width.isEmpty() && width != QT_INHERIT) { qreal widthF; QSvgHandler::LengthType lt; widthF = parseLength(width, lt, handler); pen.setWidthF(widthF); - } else if (inherited){ - qreal widthF = inherited->qpen().widthF(); - pen.setWidthF(widthF); } //stroke-linejoin attribute handling @@ -1016,7 +923,7 @@ static void parsePen(QSvgNode *node, //strok-dasharray attribute handling qreal penw = pen.widthF(); - if (!dashArray.isEmpty() && dashArray != QLatin1String("inherit")) { + if (!dashArray.isEmpty() && dashArray != QT_INHERIT) { const QChar *s = dashArray.constData(); QVector<qreal> dashes = parseNumbersList(s); qreal *d = dashes.data(); @@ -1046,7 +953,7 @@ static void parsePen(QSvgNode *node, //stroke-dashoffset attribute handling - if (!dashOffset.isEmpty() && dashOffset != QLatin1String("inherit")) { + if (!dashOffset.isEmpty() && dashOffset != QT_INHERIT) { qreal doffset = toDouble(dashOffset); if (penw != 0) doffset /= penw; @@ -1062,7 +969,15 @@ static void parsePen(QSvgNode *node, pen.setDashOffset(doffset); } - if (!miterlimit.isEmpty() && miterlimit != QLatin1String("inherit")) + //vector-effect attribute handling + if (!vectorEffect.isEmpty()) { + if (vectorEffect == QLatin1String("non-scaling-stroke")) + pen.setCosmetic(true); + else if (vectorEffect == QLatin1String("none")) + pen.setCosmetic(false); + } + + if (!miterlimit.isEmpty() && miterlimit != QT_INHERIT) pen.setMiterLimit(toDouble(miterlimit)); QSvgStrokeStyle *prop = new QSvgStrokeStyle(pen); @@ -1071,182 +986,84 @@ static void parsePen(QSvgNode *node, } } - -static bool parseQBrush(const QSvgAttributes &attributes, QSvgNode *node, - QBrush &brush, QSvgHandler *handler) -{ - QString value = attributes.value(QLatin1String("fill")).toString(); - QString opacity = attributes.value(QLatin1String("fill-opacity")).toString(); - - QColor color; - if (!value.isEmpty() || !opacity.isEmpty()) { - if (value.startsWith(QLatin1String("url"))) { - value = value.remove(0, 3); - QSvgStyleProperty *style = styleFromUrl(node, value); - if (style) { - switch (style->type()) { - case QSvgStyleProperty::FILL: - { - brush = static_cast<QSvgFillStyle*>(style)->qbrush(); - break; - } - case QSvgStyleProperty::SOLID_COLOR: - { - brush = QBrush(static_cast<QSvgSolidColorStyle*>(style)->qcolor()); - break; - } - case QSvgStyleProperty::GRADIENT: - { - brush = QBrush(*static_cast<QSvgGradientStyle*>(style)->qgradient()); - break; - } - default: - qWarning("Cannot use property \"%s\" as brush.", qPrintable(idFromUrl(value))); - } - } else { - qWarning("Couldn't resolve property: %s", qPrintable(idFromUrl(value))); - } - } else if (value != QLatin1String("none")) { - if (constructColor(value, opacity, color, handler)) { - brush.setStyle(Qt::SolidPattern); - brush.setColor(color); - } - } else { - brush = QBrush(Qt::NoBrush); - } - return true; - } - return false; -} - -static bool parseQFont(const QSvgAttributes &attributes, - QFont &font, qreal &fontSize, QSvgHandler *handler) +static void parseFont(QSvgNode *node, + const QSvgAttributes &attributes, + QSvgHandler *handler) { QString family = attributes.value(QLatin1String("font-family")).toString(); QString size = attributes.value(QLatin1String("font-size")).toString(); QString style = attributes.value(QLatin1String("font-style")).toString(); QString weight = attributes.value(QLatin1String("font-weight")).toString(); + QString variant = attributes.value(QLatin1String("font-variant")).toString(); + QString anchor = attributes.value(QLatin1String("text-anchor")).toString(); - if (!family.isEmpty() || !size.isEmpty() || - !style.isEmpty() || !weight.isEmpty()) { + if (family.isEmpty() && size.isEmpty() && style.isEmpty() && weight.isEmpty() && variant.isEmpty() && anchor.isEmpty()) + return; - if (!family.isEmpty()) { - font.setFamily(family.trimmed()); - } - if (!size.isEmpty()) { - if (size == QLatin1String("inherit")) { - //inherited already - } else { - QSvgHandler::LengthType dummy; // should always be pixel size - fontSize = parseLength(size, dummy, handler); - if (fontSize <= 0) - fontSize = 1; - } - font.setPixelSize(qMax(1, int(fontSize))); - } - if (!style.isEmpty()) { - if (style == QLatin1String("normal")) { - font.setStyle(QFont::StyleNormal); - } else if (style == QLatin1String("italic")) { - font.setStyle(QFont::StyleItalic); - } else if (style == QLatin1String("oblique")) { - font.setStyle(QFont::StyleOblique); - } else if (style == QLatin1String("inherit")) { - //inherited already - } - } - if (!weight.isEmpty()) { - bool ok = false; - int weightNum = weight.toInt(&ok); - if (ok) { - switch (weightNum) { - case 100: - case 200: - font.setWeight(QFont::Light); - break; - case 300: - case 400: - font.setWeight(QFont::Normal); - break; - case 500: - case 600: - font.setWeight(QFont::DemiBold); - break; - case 700: - case 800: - font.setWeight(QFont::Bold); - break; - case 900: - font.setWeight(QFont::Black); - break; - default: - break; - } - } else { - if (weight == QLatin1String("normal")) { - font.setWeight(QFont::Normal); - } else if (weight == QLatin1String("bold")) { - font.setWeight(QFont::Bold); - } else if (weight == QLatin1String("bolder")) { - font.setWeight(QFont::DemiBold); - } else if (weight == QLatin1String("lighter")) { - font.setWeight(QFont::Light); - } - } - } - // QFontInfo fi(font); - // font.setPointSize(fi.pointSize()); - return true; + QString id = someId(attributes); + QSvgTinyDocument *doc = node->document(); + QSvgFontStyle *fontStyle = 0; + if (!family.isEmpty()) { + QSvgFont *svgFont = doc->svgFont(family); + if (svgFont) + fontStyle = new QSvgFontStyle(svgFont, doc); } + if (!fontStyle) + fontStyle = new QSvgFontStyle; - return false; -} + if (!family.isEmpty() && family != QT_INHERIT) + fontStyle->setFamily(family.trimmed()); -static void parseFont(QSvgNode *node, - const QSvgAttributes &attributes, - QSvgHandler *handler) -{ - QFont font; - font.setPixelSize(12); - qreal fontSize = font.pixelSize(); - - QSvgFontStyle *inherited = - static_cast<QSvgFontStyle*>(node->styleProperty( - QSvgStyleProperty::FONT)); - if (!inherited) - inherited = - static_cast<QSvgFontStyle*>(node->parent()->styleProperty( - QSvgStyleProperty::FONT)); - if (inherited) { - font = inherited->qfont(); - fontSize = inherited->pointSize(); - } - // group or any container element can have only text-anchor and should - // be processed, because its children can inherit from it. - // So checking for text-anchor before parseQfont() - QString anchor = attributes.value(QLatin1String("text-anchor")).toString(); - if (parseQFont(attributes, font, fontSize, handler) || (!anchor.isEmpty())) { - QString myId = someId(attributes); - //QString anchor = attributes.value(QLatin1String("text-anchor")).toString(); - QSvgTinyDocument *doc = node->document(); - QSvgFontStyle *fontStyle = 0; - QString family = (font.family().isEmpty())?myId:font.family(); - if (!family.isEmpty()) { - QSvgFont *svgFont = doc->svgFont(family); - if (svgFont) { - fontStyle = new QSvgFontStyle(svgFont, doc); - fontStyle->setPointSize(fontSize); - } + if (!size.isEmpty() && size != QT_INHERIT) { + QSvgHandler::LengthType dummy; // should always be pixel size + fontStyle->setSize(parseLength(size, dummy, handler)); + } + + if (!style.isEmpty() && style != QT_INHERIT) { + if (style == QLatin1String("normal")) { + fontStyle->setStyle(QFont::StyleNormal); + } else if (style == QLatin1String("italic")) { + fontStyle->setStyle(QFont::StyleItalic); + } else if (style == QLatin1String("oblique")) { + fontStyle->setStyle(QFont::StyleOblique); } - if (!fontStyle) { - fontStyle = new QSvgFontStyle(font, node->document()); - fontStyle->setPointSize(fontSize); + } + + if (!weight.isEmpty() && weight != QT_INHERIT) { + bool ok = false; + int weightNum = weight.toInt(&ok); + if (ok) { + fontStyle->setWeight(weightNum); + } else { + if (weight == QLatin1String("normal")) { + fontStyle->setWeight(400); + } else if (weight == QLatin1String("bold")) { + fontStyle->setWeight(700); + } else if (weight == QLatin1String("bolder")) { + fontStyle->setWeight(QSvgFontStyle::BOLDER); + } else if (weight == QLatin1String("lighter")) { + fontStyle->setWeight(QSvgFontStyle::LIGHTER); + } } - if (!anchor.isEmpty()) - fontStyle->setTextAnchor(anchor); + } - node->appendStyleProperty(fontStyle, myId); + if (!variant.isEmpty() && variant != QT_INHERIT) { + if (variant == QLatin1String("normal")) + fontStyle->setVariant(QFont::MixedCase); + else if (variant == QLatin1String("small-caps")) + fontStyle->setVariant(QFont::SmallCaps); } + + if (!anchor.isEmpty() && anchor != QT_INHERIT) { + if (anchor == QLatin1String("start")) + fontStyle->setTextAnchor(Qt::AlignLeft); + if (anchor == QLatin1String("middle")) + fontStyle->setTextAnchor(Qt::AlignHCenter); + else if (anchor == QLatin1String("end")) + fontStyle->setTextAnchor(Qt::AlignRight); + } + + node->appendStyleProperty(fontStyle, id); } static void parseTransform(QSvgNode *node, @@ -1273,7 +1090,7 @@ static void parseVisibility(QSvgNode *node, QString value = attributes.value(QLatin1String("visibility")).toString(); QSvgNode *parent = node->parent(); - if (parent && (value.isEmpty() || value == QLatin1String("inherit"))) + if (parent && (value.isEmpty() || value == QT_INHERIT)) node->setVisible(parent->isVisible()); else if (value == QLatin1String("hidden") || value == QLatin1String("collapse")) { node->setVisible(false); @@ -1884,105 +1701,6 @@ static void cssStyleLookup(QSvgNode *node, parseStyle(node, attributes, handler); } -static bool parseDefaultTextStyle(QSvgNode *node, - const QXmlStreamAttributes &attributes, - bool initial, - QSvgHandler *handler) -{ - Q_ASSERT(node->type() == QSvgText::TEXT || node->type() == QSvgNode::TEXTAREA); - QSvgText *textNode = static_cast<QSvgText*>(node); - - QSvgAttributes attrs(attributes, handler); - - QString fontFamily = attrs.value(QString(), QLatin1String("font-family")).toString(); - - QString anchor = attrs.value(QString(), QLatin1String("text-anchor")).toString(); - - QSvgFontStyle *fontStyle = static_cast<QSvgFontStyle*>( - node->styleProperty(QSvgStyleProperty::FONT)); - if (fontStyle) { - QSvgTinyDocument *doc = fontStyle->doc(); - if (doc && fontStyle->svgFont()) { - cssStyleLookup(node, handler, handler->selector()); - parseStyle(node, attrs, handler); - return true; - } - } else if (!fontFamily.isEmpty()) { - QSvgTinyDocument *doc = node->document(); - QSvgFont *svgFont = doc->svgFont(fontFamily); - if (svgFont) { - cssStyleLookup(node, handler, handler->selector()); - parseStyle(node, attrs, handler); - return true; - } - } - - QTextCharFormat format; - QBrush brush(QColor(0, 0, 0)); - QFont font; - font.setPixelSize(12); - qreal fontSize = font.pixelSize(); - - if (!initial) { - font = textNode->topFormat().font(); - fontSize = font.pixelSize() / textNode->scale(); - brush = textNode->topFormat().foreground(); - } else { - QSvgFontStyle *fontStyle = static_cast<QSvgFontStyle*>( - node->styleProperty(QSvgStyleProperty::FONT)); - if (!fontStyle) - fontStyle = static_cast<QSvgFontStyle*>( - node->parent()->styleProperty(QSvgStyleProperty::FONT)); - if (fontStyle) { - font = fontStyle->qfont(); - fontSize = fontStyle->pointSize(); - if (anchor.isEmpty() || anchor == QLatin1String("inherit")) - anchor = fontStyle->textAnchor(); - } - - Qt::Alignment align = Qt::AlignLeft; - if (anchor == QLatin1String("middle")) - align = Qt::AlignHCenter; - else if (anchor == QLatin1String("end")) - align = Qt::AlignRight; - textNode->setTextAlignment(align); - - QSvgFillStyle *fillStyle = static_cast<QSvgFillStyle*>( - node->styleProperty(QSvgStyleProperty::FILL)); - if (fillStyle) - brush = fillStyle->qbrush(); - } - - if (parseQFont(attrs, font, fontSize, handler) || initial) { - if (initial) - textNode->setScale(100 / fontSize); - font.setPixelSize(qMax(1, int(fontSize * textNode->scale()))); - format.setFont(font); - } - - if (parseQBrush(attrs, node, brush, handler) || initial) { - if (brush.style() != Qt::NoBrush || initial) - format.setForeground(brush); - } - - QPen pen(Qt::NoPen); -// QSvgStrokeStyle *inherited = -// static_cast<QSvgStrokeStyle*>(node->parent()->styleProperty( -// QSvgStyleProperty::STROKE)); -// if (inherited) -// pen = inherited->qpen(); - parseQPen(pen, node, attrs, handler); - if (pen.style() != Qt::NoPen) { - format.setTextOutline(pen); - } - - parseTransform(node, attrs, handler); - - textNode->insertFormat(format); - - return true; -} - static inline QStringList stringToList(const QString &str) { QStringList lst = str.split(QLatin1Char(','), QString::SkipEmptyParts); @@ -2141,7 +1859,7 @@ static inline QSvgNode::DisplayMode displayStringToEnum(const QString &str) return QSvgNode::TableCaptionMode; } else if (str == QLatin1String("none")) { return QSvgNode::NoneMode; - } else if (str == QLatin1String("inherit")) { + } else if (str == QT_INHERIT) { return QSvgNode::InheritMode; } return QSvgNode::BlockMode; @@ -3105,7 +2823,6 @@ static QSvgNode *createSvgNode(QSvgNode *parent, node->setHeight(int(height), type == QSvgHandler::LT_PERCENT); } - if (!viewBoxStr.isEmpty()) { QStringList lst = viewBoxStr.split(QLatin1Char(' '), QString::SkipEmptyParts); if (lst.count() != 4) @@ -3155,7 +2872,7 @@ static bool parseTbreakNode(QSvgNode *parent, { if (parent->type() != QSvgNode::TEXTAREA) return false; - static_cast<QSvgText*>(parent)->insertLineBreak(); + static_cast<QSvgText*>(parent)->addLineBreak(); return true; } @@ -3170,12 +2887,6 @@ static QSvgNode *createTextNode(QSvgNode *parent, qreal nx = parseLength(x, type, handler); qreal ny = parseLength(y, type, handler); - //### not to pixels but to the default coordinate system - // and text should be already in the correct coordinate - // system here - //nx = convertToPixels(nx, true, type); - //ny = convertToPixels(ny, true, type); - QSvgNode *text = new QSvgText(parent, QPointF(nx, ny)); return text; } @@ -3194,6 +2905,13 @@ static QSvgNode *createTextAreaNode(QSvgNode *parent, return node; } +static QSvgNode *createTspanNode(QSvgNode *parent, + const QXmlStreamAttributes &, + QSvgHandler *) +{ + return new QSvgTspan(parent); +} + static bool parseTitleNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *) @@ -3202,15 +2920,6 @@ static bool parseTitleNode(QSvgNode *parent, return true; } -static bool parseTspanNode(QSvgNode *parent, - const QXmlStreamAttributes &attributes, - QSvgHandler *handler) -{ - - cssStyleLookup(parent, handler, handler->selector()); - return parseDefaultTextStyle(parent, attributes, false, handler); -} - static QSvgNode *createUseNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler) @@ -3324,6 +3033,7 @@ static FactoryMethod findGraphicsFactory(const QString &name) case 't': if (ref == QLatin1String("ext")) return createTextNode; if (ref == QLatin1String("extArea")) return createTextAreaNode; + if (ref == QLatin1String("span")) return createTspanNode; break; case 'u': if (ref == QLatin1String("se")) return createUseNode; @@ -3380,7 +3090,6 @@ static ParseMethod findUtilFactory(const QString &name) case 't': if (ref == QLatin1String("break")) return parseTbreakNode; if (ref == QLatin1String("itle")) return parseTitleNode; - if (ref == QLatin1String("span")) return parseTspanNode; break; default: break; @@ -3589,16 +3298,33 @@ bool QSvgHandler::startElement(const QString &localName, group->addChild(node, someId(attributes)); } break; + case QSvgNode::TEXT: + case QSvgNode::TEXTAREA: + if (node->type() == QSvgNode::TSPAN) { + static_cast<QSvgText *>(m_nodes.top())->addTspan(static_cast<QSvgTspan *>(node)); + } else { + qWarning("\'text\' or \'textArea\' element contains invalid element type."); + delete node; + node = 0; + } + break; default: - Q_ASSERT(!"not a grouping element is the parent"); + qWarning("Could not add child element to parent element because the types are incorrect."); + delete node; + node = 0; + break; } - parseCoreNode(node, attributes); - cssStyleLookup(node, this, m_selector); - if (node->type() != QSvgNode::TEXT && node->type() != QSvgNode::TEXTAREA) + if (node) { + parseCoreNode(node, attributes); + cssStyleLookup(node, this, m_selector); parseStyle(node, attributes, this); - else - parseDefaultTextStyle(node, attributes, true, this); + if (node->type() == QSvgNode::TEXT || node->type() == QSvgNode::TEXTAREA) { + static_cast<QSvgText *>(node)->setWhitespaceMode(m_whitespaceMode.top()); + } else if (node->type() == QSvgNode::TSPAN) { + static_cast<QSvgTspan *>(node)->setWhitespaceMode(m_whitespaceMode.top()); + } + } } } else if (ParseMethod method = findUtilFactory(localName)) { Q_ASSERT(!m_nodes.isEmpty()); @@ -3655,13 +3381,8 @@ bool QSvgHandler::endElement(const QStringRef &localName) return true; } - if (m_inStyle && localName == QLatin1String("style")) { + if (m_inStyle && localName == QLatin1String("style")) m_inStyle = false; - } else if (m_nodes.top()->type() == QSvgNode::TEXT || m_nodes.top()->type() == QSvgNode::TEXTAREA) { - QSvgText *node = static_cast<QSvgText*>(m_nodes.top()); - if (localName == QLatin1String("tspan")) - node->popFormat(); - } if (node == Graphics) { // Iterate through the m_renderers to resolve any unresolved gradients. @@ -3709,8 +3430,9 @@ bool QSvgHandler::characters(const QStringRef &str) return true; if (m_nodes.top()->type() == QSvgNode::TEXT || m_nodes.top()->type() == QSvgNode::TEXTAREA) { - QSvgText *node = static_cast<QSvgText*>(m_nodes.top()); - node->insertText(str.toString(), m_whitespaceMode.top()); + static_cast<QSvgText*>(m_nodes.top())->addText(str.toString()); + } else if (m_nodes.top()->type() == QSvgNode::TSPAN) { + static_cast<QSvgTspan*>(m_nodes.top())->addText(str.toString()); } return true; diff --git a/src/svg/qsvgnode_p.h b/src/svg/qsvgnode_p.h index f203ea7b85..315f2287ce 100644 --- a/src/svg/qsvgnode_p.h +++ b/src/svg/qsvgnode_p.h @@ -86,6 +86,7 @@ public: RECT, TEXT, TEXTAREA, + TSPAN, USE, VIDEO }; diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index c3c0a683c5..6ed3dc2db4 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -59,6 +59,9 @@ QT_BEGIN_NAMESPACE QSvgExtraStates::QSvgExtraStates() : fillOpacity(1.0) + , svgFont(0) + , textAnchor(Qt::AlignLeft) + , fontWeight(400) { } @@ -191,39 +194,94 @@ void QSvgViewportFillStyle::revert(QPainter *p, QSvgExtraStates &) } QSvgFontStyle::QSvgFontStyle(QSvgFont *font, QSvgTinyDocument *doc) - : m_font(font), m_pointSize(24), m_doc(doc) -{ -} - -QSvgFontStyle::QSvgFontStyle(const QFont &font, QSvgTinyDocument *doc) - : m_font(0), m_pointSize(24), m_doc(doc), m_qfont(font) -{ -} - - -void QSvgFontStyle::setPointSize(qreal size) -{ - m_pointSize = size; -} - -qreal QSvgFontStyle::pointSize() const -{ - return m_pointSize; -} - -void QSvgFontStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &) -{ - if (!m_font) { - m_oldFont = p->font(); - p->setFont(m_qfont); + : m_svgFont(font) + , m_doc(doc) + , m_familySet(0) + , m_sizeSet(0) + , m_styleSet(0) + , m_variantSet(0) + , m_weightSet(0) + , m_textAnchorSet(0) +{ +} + +QSvgFontStyle::QSvgFontStyle() + : m_svgFont(0) + , m_doc(0) + , m_familySet(0) + , m_sizeSet(0) + , m_styleSet(0) + , m_variantSet(0) + , m_weightSet(0) + , m_textAnchorSet(0) +{ +} + +int QSvgFontStyle::SVGToQtWeight(int weight) { + switch (weight) { + case 100: + case 200: + return QFont::Light; + case 300: + case 400: + return QFont::Normal; + case 500: + case 600: + return QFont::DemiBold; + case 700: + case 800: + return QFont::Bold; + case 900: + return QFont::Black; + } + return QFont::Normal; +} + +void QSvgFontStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &states) +{ + m_oldQFont = p->font(); + m_oldSvgFont = states.svgFont; + m_oldTextAnchor = states.textAnchor; + m_oldWeight = states.fontWeight; + + if (m_textAnchorSet) + states.textAnchor = m_textAnchor; + + QFont font = m_oldQFont; + if (m_familySet) { + states.svgFont = m_svgFont; + font.setFamily(m_qfont.family()); + } + + if (m_sizeSet) + font.setPointSize(m_qfont.pointSizeF()); + + if (m_styleSet) + font.setStyle(m_qfont.style()); + + if (m_variantSet) + font.setCapitalization(m_qfont.capitalization()); + + if (m_weightSet) { + if (m_weight == BOLDER) { + states.fontWeight = qMin(states.fontWeight + 100, 900); + } else if (m_weight == LIGHTER) { + states.fontWeight = qMax(states.fontWeight - 100, 100); + } else { + states.fontWeight = m_weight; + } + font.setWeight(SVGToQtWeight(states.fontWeight)); } + + p->setFont(font); } -void QSvgFontStyle::revert(QPainter *p, QSvgExtraStates &) +void QSvgFontStyle::revert(QPainter *p, QSvgExtraStates &states) { - if (!m_font) { - p->setFont(m_oldFont); - } + p->setFont(m_oldQFont); + states.svgFont = m_oldSvgFont; + states.textAnchor = m_oldTextAnchor; + states.fontWeight = m_oldWeight; } QSvgStrokeStyle::QSvgStrokeStyle(const QPen &pen) @@ -799,16 +857,6 @@ QSvgStyleProperty::Type QSvgAnimateColor::type() const return ANIMATE_COLOR; } -QString QSvgFontStyle::textAnchor() const -{ - return m_textAnchor; -} - -void QSvgFontStyle::setTextAnchor(const QString &anchor) -{ - m_textAnchor = anchor; -} - QSvgOpacityStyle::QSvgOpacityStyle(qreal opacity) : m_opacity(opacity) { diff --git a/src/svg/qsvgstyle_p.h b/src/svg/qsvgstyle_p.h index 70ecf5b499..bd28bb6604 100644 --- a/src/svg/qsvgstyle_p.h +++ b/src/svg/qsvgstyle_p.h @@ -141,7 +141,11 @@ private: struct QSvgExtraStates { QSvgExtraStates(); + qreal fillOpacity; + QSvgFont *svgFont; + Qt::Alignment textAnchor; + int fontWeight; }; class QSvgStyleProperty : public QSvgRefCounted @@ -307,41 +311,85 @@ private: class QSvgFontStyle : public QSvgStyleProperty { public: + static const int LIGHTER = -1; + static const int BOLDER = 1; + QSvgFontStyle(QSvgFont *font, QSvgTinyDocument *doc); - QSvgFontStyle(const QFont &font, QSvgTinyDocument *doc); + QSvgFontStyle(); virtual void apply(QPainter *p, const QRectF &, QSvgNode *node, QSvgExtraStates &states); virtual void revert(QPainter *p, QSvgExtraStates &states); virtual Type type() const; - void setPointSize(qreal size); - qreal pointSize() const; + void setSize(qreal size) + { + // Store the _pixel_ size in the font. Since QFont::setPixelSize() only takes an int, call + // QFont::SetPointSize() instead. Set proper font size just before rendering. + m_qfont.setPointSize(size); + m_sizeSet = 1; + } - //### hack to avoid having a separate style element for text-anchor - QString textAnchor() const; - void setTextAnchor(const QString &anchor); + void setTextAnchor(Qt::Alignment anchor) + { + m_textAnchor = anchor; + m_textAnchorSet = 1; + } - QSvgFont * svgFont() const + void setFamily(const QString &family) { - return m_font; + m_qfont.setFamily(family); + m_familySet = 1; + } + + void setStyle(QFont::Style fontStyle) { + m_qfont.setStyle(fontStyle); + m_styleSet = 1; } - QSvgTinyDocument *doc() const + + void setVariant(QFont::Capitalization fontVariant) { - return m_doc; + m_qfont.setCapitalization(fontVariant); + m_variantSet = 1; } - const QFont & qfont() const + static int SVGToQtWeight(int weight); + + void setWeight(int weight) + { + m_weight = weight; + m_weightSet = 1; + } + + QSvgFont * svgFont() const + { + return m_svgFont; + } + + const QFont &qfont() const { return m_qfont; } + + QSvgTinyDocument *doc() const {return m_doc;} + private: - QSvgFont *m_font; - qreal m_pointSize; + QSvgFont *m_svgFont; QSvgTinyDocument *m_doc; + QFont m_qfont; - QString m_textAnchor; + int m_weight; + Qt::Alignment m_textAnchor; - QFont m_qfont; - QFont m_oldFont; + QSvgFont *m_oldSvgFont; + QFont m_oldQFont; + Qt::Alignment m_oldTextAnchor; + int m_oldWeight; + + unsigned m_familySet : 1; + unsigned m_sizeSet : 1; + unsigned m_styleSet : 1; + unsigned m_variantSet : 1; + unsigned m_weightSet : 1; + unsigned m_textAnchorSet : 1; }; class QSvgStrokeStyle : public QSvgStyleProperty diff --git a/src/testlib/qabstracttestlogger_p.h b/src/testlib/qabstracttestlogger_p.h index a0e8a1e616..588184e45d 100644 --- a/src/testlib/qabstracttestlogger_p.h +++ b/src/testlib/qabstracttestlogger_p.h @@ -99,6 +99,42 @@ public: static bool isTtyOutput(); }; +struct QTestCharBuffer +{ + inline QTestCharBuffer() + : buf(0) + {} + + inline ~QTestCharBuffer() + { + delete[] buf; + buf = 0; + } + + inline operator void*() + { + return buf; + } + + inline operator char*() + { + return buf; + } + + inline operator char**() + { + return &buf; + } + + inline const char* constData() const + { + return buf; + } + +private: + char* buf; +}; + QT_END_NAMESPACE #endif diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp index 35603312c0..db221dd34a 100644 --- a/src/testlib/qplaintestlogger.cpp +++ b/src/testlib/qplaintestlogger.cpp @@ -178,7 +178,7 @@ namespace QTest { QTEST_ASSERT(type); QTEST_ASSERT(msg); - char buf[1024]; + QTestCharBuffer buf; const char *fn = QTestResult::currentTestFunction() ? QTestResult::currentTestFunction() : "UnknownTestFunc"; @@ -188,7 +188,7 @@ namespace QTest { : ""; const char *filler = (tag[0] && gtag[0]) ? ":" : ""; if (file) { - QTest::qt_snprintf(buf, sizeof(buf), "%s: %s::%s(%s%s%s)%s%s\n" + QTest::qt_asprintf(buf, "%s: %s::%s(%s%s%s)%s%s\n" #ifdef Q_OS_WIN "%s(%d) : failure location\n" #else @@ -197,10 +197,12 @@ namespace QTest { , type, QTestResult::currentTestObjectName(), fn, gtag, filler, tag, msg[0] ? " " : "", msg, file, line); } else { - QTest::qt_snprintf(buf, sizeof(buf), "%s: %s::%s(%s%s%s)%s%s\n", + QTest::qt_asprintf(buf, "%s: %s::%s(%s%s%s)%s%s\n", type, QTestResult::currentTestObjectName(), fn, gtag, filler, tag, msg[0] ? " " : "", msg); } + // In colored mode, printf above stripped our nonprintable control characters. + // Put them back. memcpy(buf, type, strlen(type)); outputMessage(buf); } diff --git a/src/testlib/qtest_global.h b/src/testlib/qtest_global.h index 5bb2e43200..24dae2e45c 100644 --- a/src/testlib/qtest_global.h +++ b/src/testlib/qtest_global.h @@ -83,6 +83,7 @@ namespace QTest enum TestFailMode { Abort = 1, Continue = 2 }; int Q_TESTLIB_EXPORT qt_snprintf(char *str, int size, const char *format, ...); + int qt_asprintf(char **str, const char *format, ...); } QT_END_NAMESPACE diff --git a/src/testlib/qtestbasicstreamer.cpp b/src/testlib/qtestbasicstreamer.cpp index 5fe9d4d837..aac57bad8d 100644 --- a/src/testlib/qtestbasicstreamer.cpp +++ b/src/testlib/qtestbasicstreamer.cpp @@ -68,39 +68,39 @@ QTestBasicStreamer::QTestBasicStreamer() QTestBasicStreamer::~QTestBasicStreamer() {} -void QTestBasicStreamer::formatStart(const QTestElement *element, char *formatted) const +void QTestBasicStreamer::formatStart(const QTestElement *element, char **formatted) const { if(!element || !formatted ) return; - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } -void QTestBasicStreamer::formatEnd(const QTestElement *element, char *formatted) const +void QTestBasicStreamer::formatEnd(const QTestElement *element, char **formatted) const { if(!element || !formatted ) return; - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } -void QTestBasicStreamer::formatBeforeAttributes(const QTestElement *element, char *formatted) const +void QTestBasicStreamer::formatBeforeAttributes(const QTestElement *element, char **formatted) const { if(!element || !formatted ) return; - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } -void QTestBasicStreamer::formatAfterAttributes(const QTestElement *element, char *formatted) const +void QTestBasicStreamer::formatAfterAttributes(const QTestElement *element, char **formatted) const { if(!element || !formatted ) return; - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } -void QTestBasicStreamer::formatAttributes(const QTestElement *, const QTestElementAttribute *attribute, char *formatted) const +void QTestBasicStreamer::formatAttributes(const QTestElement *, const QTestElementAttribute *attribute, char **formatted) const { if(!attribute || !formatted ) return; - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } void QTestBasicStreamer::output(QTestElement *element) const @@ -113,7 +113,7 @@ void QTestBasicStreamer::output(QTestElement *element) const void QTestBasicStreamer::outputElements(QTestElement *element, bool) const { - char buf[1024]; + QTestCharBuffer buf; bool hasChildren; /* Elements are in reverse order of occurrence, so start from the end and work @@ -148,7 +148,7 @@ void QTestBasicStreamer::outputElements(QTestElement *element, bool) const void QTestBasicStreamer::outputElementAttributes(const QTestElement* element, QTestElementAttribute *attribute) const { - char buf[1024]; + QTestCharBuffer buf; while(attribute){ formatAttributes(element, attribute, buf); outputString(buf); diff --git a/src/testlib/qtestbasicstreamer.h b/src/testlib/qtestbasicstreamer.h index 84d1bcedc2..432dd223a8 100644 --- a/src/testlib/qtestbasicstreamer.h +++ b/src/testlib/qtestbasicstreamer.h @@ -71,11 +71,11 @@ class QTestBasicStreamer const QTestLogger *logger() const; protected: - virtual void formatStart(const QTestElement *element = 0, char *formatted = 0) const; - virtual void formatEnd(const QTestElement *element = 0, char *formatted = 0) const; - virtual void formatBeforeAttributes(const QTestElement *element = 0, char *formatted = 0) const; - virtual void formatAfterAttributes(const QTestElement *element = 0, char *formatted = 0) const; - virtual void formatAttributes(const QTestElement *element = 0, const QTestElementAttribute *attribute = 0, char *formatted = 0) const; + virtual void formatStart(const QTestElement *element, char **formatted) const; + virtual void formatEnd(const QTestElement *element, char **formatted) const; + virtual void formatBeforeAttributes(const QTestElement *element, char **formatted) const; + virtual void formatAfterAttributes(const QTestElement *element, char **formatted) const; + virtual void formatAttributes(const QTestElement *element, const QTestElementAttribute *attribute, char **formatted) const; virtual void outputElements(QTestElement *element, bool isChildElement = false) const; virtual void outputElementAttributes(const QTestElement *element, QTestElementAttribute *attribute) const; diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index e2e385a57e..e6508f2478 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -690,6 +690,13 @@ QT_BEGIN_NAMESPACE Returns a textual representation of the given \a rectangle. */ +/*! + \fn char *QTest::toString(const QVariant &variant) + \overload + + Returns a textual representation of the given \a variant. +*/ + /*! \fn void QTest::qWait(int ms) Waits for \a ms milliseconds. While waiting, events will be processed and @@ -806,6 +813,53 @@ namespace QTest static int eventDelay = -1; static int keyVerbose = -1; +void filter_unprintable(char *str) +{ + char *idx = str; + while (*idx) { + if (((*idx < 0x20 && *idx != '\n' && *idx != '\t') || *idx > 0x7e)) + *idx = '?'; + ++idx; + } +} + +/*! \internal + */ +int qt_asprintf(char **str, const char *format, ...) +{ + static const int MAXSIZE = 1024*1024*2; + + int size = 32; + delete[] *str; + *str = new char[size]; + + va_list ap; + int res = 0; + + for (;;) { + va_start(ap, format); + res = qvsnprintf(*str, size, format, ap); + va_end(ap); + (*str)[size - 1] = '\0'; + if (res >= 0 && res < size) { + // We succeeded + break; + } + // buffer wasn't big enough, try again. + // Note, we're assuming that a result of -1 is always due to running out of space. + size *= 2; + if (size > MAXSIZE) { + break; + } + delete[] *str; + *str = new char[size]; + } + + filter_unprintable(*str); + + return res; +} + /*! \internal */ int qt_snprintf(char *str, int size, const char *format, ...) @@ -818,12 +872,8 @@ int qt_snprintf(char *str, int size, const char *format, ...) va_end(ap); str[size - 1] = '\0'; - char *idx = str; - while (*idx) { - if (((*idx < 0x20 && *idx != '\n' && *idx != '\t') || *idx > 0x7e)) - *idx = '?'; - ++idx; - } + filter_unprintable(str); + return res; } diff --git a/src/testlib/qtestlightxmlstreamer.cpp b/src/testlib/qtestlightxmlstreamer.cpp index 170938a8ca..e176201242 100644 --- a/src/testlib/qtestlightxmlstreamer.cpp +++ b/src/testlib/qtestlightxmlstreamer.cpp @@ -59,61 +59,55 @@ QTestLightXmlStreamer::QTestLightXmlStreamer() QTestLightXmlStreamer::~QTestLightXmlStreamer() {} -void QTestLightXmlStreamer::formatStart(const QTestElement *element, char *formatted) const +void QTestLightXmlStreamer::formatStart(const QTestElement *element, char **formatted) const { if(!element || !formatted) return; switch(element->elementType()){ case QTest::LET_TestCase: { - char quotedTf[950]; - QXmlTestLogger::xmlQuote(quotedTf, element->attributeValue(QTest::AI_Name), - sizeof(quotedTf)); + QTestCharBuffer quotedTf; + QXmlTestLogger::xmlQuote(quotedTf, element->attributeValue(QTest::AI_Name)); - QTest::qt_snprintf(formatted, 1024, "<TestFunction name=\"%s\">\n", quotedTf); + QTest::qt_asprintf(formatted, "<TestFunction name=\"%s\">\n", quotedTf.constData()); break; } case QTest::LET_Failure: { - char cdataDesc[900]; - QXmlTestLogger::xmlCdata(cdataDesc, element->attributeValue(QTest::AI_Description), - sizeof(cdataDesc)); + QTestCharBuffer cdataDesc; + QXmlTestLogger::xmlCdata(cdataDesc, element->attributeValue(QTest::AI_Description)); - QTest::qt_snprintf(formatted, 1024, " <Description><![CDATA[%s]]></Description>\n", - cdataDesc); + QTest::qt_asprintf(formatted, " <Description><![CDATA[%s]]></Description>\n", + cdataDesc.constData()); break; } case QTest::LET_Error: { // assuming type and attribute names don't need quoting - char quotedFile[128]; - char cdataDesc[700]; - QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File), - sizeof(quotedFile)); - QXmlTestLogger::xmlCdata(cdataDesc, element->attributeValue(QTest::AI_Description), - sizeof(cdataDesc)); - - QTest::qt_snprintf(formatted, 1024, "<Message type=\"%s\" %s=\"%s\" %s=\"%s\">\n <Description><![CDATA[%s]]></Description>\n</Message>\n", + QTestCharBuffer quotedFile; + QTestCharBuffer cdataDesc; + QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File)); + QXmlTestLogger::xmlCdata(cdataDesc, element->attributeValue(QTest::AI_Description)); + + QTest::qt_asprintf(formatted, "<Message type=\"%s\" %s=\"%s\" %s=\"%s\">\n <Description><![CDATA[%s]]></Description>\n</Message>\n", element->attributeValue(QTest::AI_Type), element->attributeName(QTest::AI_File), - quotedFile, + quotedFile.constData(), element->attributeName(QTest::AI_Line), element->attributeValue(QTest::AI_Line), - cdataDesc); + cdataDesc.constData()); break; } case QTest::LET_Benchmark: { // assuming value and iterations don't need quoting - char quotedMetric[256]; - char quotedTag[256]; - QXmlTestLogger::xmlQuote(quotedMetric, element->attributeValue(QTest::AI_Metric), - sizeof(quotedMetric)); - QXmlTestLogger::xmlQuote(quotedTag, element->attributeValue(QTest::AI_Tag), - sizeof(quotedTag)); - - QTest::qt_snprintf(formatted, 1024, "<BenchmarkResult %s=\"%s\" %s=\"%s\" %s=\"%s\" %s=\"%s\" />\n", + QTestCharBuffer quotedMetric; + QTestCharBuffer quotedTag; + QXmlTestLogger::xmlQuote(quotedMetric, element->attributeValue(QTest::AI_Metric)); + QXmlTestLogger::xmlQuote(quotedTag, element->attributeValue(QTest::AI_Tag)); + + QTest::qt_asprintf(formatted, "<BenchmarkResult %s=\"%s\" %s=\"%s\" %s=\"%s\" %s=\"%s\" />\n", element->attributeName(QTest::AI_Metric), - quotedMetric, + quotedMetric.constData(), element->attributeName(QTest::AI_Tag), - quotedTag, + quotedTag.constData(), element->attributeName(QTest::AI_Value), element->attributeValue(QTest::AI_Value), element->attributeName(QTest::AI_Iterations), @@ -121,61 +115,60 @@ void QTestLightXmlStreamer::formatStart(const QTestElement *element, char *forma break; } default: - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } } -void QTestLightXmlStreamer::formatEnd(const QTestElement *element, char *formatted) const +void QTestLightXmlStreamer::formatEnd(const QTestElement *element, char **formatted) const { if(!element || !formatted) return; if (element->elementType() == QTest::LET_TestCase) { if( element->attribute(QTest::AI_Result) && element->childElements()) - QTest::qt_snprintf(formatted, 1024, "</Incident>\n</TestFunction>\n"); + QTest::qt_asprintf(formatted, "</Incident>\n</TestFunction>\n"); else - QTest::qt_snprintf(formatted, 1024, "</TestFunction>\n"); + QTest::qt_asprintf(formatted, "</TestFunction>\n"); } else - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } -void QTestLightXmlStreamer::formatBeforeAttributes(const QTestElement *element, char *formatted) const +void QTestLightXmlStreamer::formatBeforeAttributes(const QTestElement *element, char **formatted) const { if(!element || !formatted) return; if (element->elementType() == QTest::LET_TestCase && element->attribute(QTest::AI_Result)){ - char buf[900]; - char quotedFile[700]; - QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File), - sizeof(quotedFile)); + QTestCharBuffer buf; + QTestCharBuffer quotedFile; + QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File)); - QTest::qt_snprintf(buf, sizeof(buf), "%s=\"%s\" %s=\"%s\"", + QTest::qt_asprintf(buf, "%s=\"%s\" %s=\"%s\"", element->attributeName(QTest::AI_File), - quotedFile, + quotedFile.constData(), element->attributeName(QTest::AI_Line), element->attributeValue(QTest::AI_Line)); if( !element->childElements() ) - QTest::qt_snprintf(formatted, 1024, "<Incident type=\"%s\" %s/>\n", - element->attributeValue(QTest::AI_Result), buf); + QTest::qt_asprintf(formatted, "<Incident type=\"%s\" %s/>\n", + element->attributeValue(QTest::AI_Result), buf.constData()); else - QTest::qt_snprintf(formatted, 1024, "<Incident type=\"%s\" %s>\n", - element->attributeValue(QTest::AI_Result), buf); + QTest::qt_asprintf(formatted, "<Incident type=\"%s\" %s>\n", + element->attributeValue(QTest::AI_Result), buf.constData()); }else{ - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } } void QTestLightXmlStreamer::output(QTestElement *element) const { - char buf[1024]; - QTest::qt_snprintf(buf, sizeof(buf), "<Environment>\n <QtVersion>%s</QtVersion>\n <QTestVersion>%s</QTestVersion>\n", + QTestCharBuffer buf; + QTest::qt_asprintf(buf, "<Environment>\n <QtVersion>%s</QtVersion>\n <QTestVersion>%s</QTestVersion>\n", qVersion(), QTEST_VERSION_STR ); outputString(buf); - QTest::qt_snprintf(buf, sizeof(buf), "</Environment>\n"); + QTest::qt_asprintf(buf, "</Environment>\n"); outputString(buf); QTestBasicStreamer::output(element); diff --git a/src/testlib/qtestlightxmlstreamer.h b/src/testlib/qtestlightxmlstreamer.h index 5a16327d4c..6dafdcc0f2 100644 --- a/src/testlib/qtestlightxmlstreamer.h +++ b/src/testlib/qtestlightxmlstreamer.h @@ -59,9 +59,9 @@ class QTestLightXmlStreamer: public QTestBasicStreamer QTestLightXmlStreamer(); ~QTestLightXmlStreamer(); - void formatStart(const QTestElement *element = 0, char *formatted = 0) const; - void formatEnd(const QTestElement *element = 0, char *formatted = 0) const; - void formatBeforeAttributes(const QTestElement *element = 0, char *formatted = 0) const; + void formatStart(const QTestElement *element, char **formatted) const; + void formatEnd(const QTestElement *element, char **formatted) const; + void formatBeforeAttributes(const QTestElement *element, char **formatted) const; void output(QTestElement *element) const; }; diff --git a/src/testlib/qtestxmlstreamer.cpp b/src/testlib/qtestxmlstreamer.cpp index 5172bcdf35..1b6e674e8f 100644 --- a/src/testlib/qtestxmlstreamer.cpp +++ b/src/testlib/qtestxmlstreamer.cpp @@ -60,86 +60,78 @@ QTestXmlStreamer::QTestXmlStreamer() QTestXmlStreamer::~QTestXmlStreamer() {} -void QTestXmlStreamer::formatStart(const QTestElement *element, char *formatted) const +void QTestXmlStreamer::formatStart(const QTestElement *element, char **formatted) const { if(!element || !formatted) return; switch(element->elementType()){ case QTest::LET_TestCase: { - char quotedTf[950]; - QXmlTestLogger::xmlQuote(quotedTf, element->attributeValue(QTest::AI_Name), - sizeof(quotedTf)); + QTestCharBuffer quotedTf; + QXmlTestLogger::xmlQuote(quotedTf, element->attributeValue(QTest::AI_Name)); - QTest::qt_snprintf(formatted, 1024, "<TestFunction name=\"%s\">\n", quotedTf); + QTest::qt_asprintf(formatted, "<TestFunction name=\"%s\">\n", quotedTf.constData()); break; } case QTest::LET_Failure: { - char cdataDesc[800]; - QXmlTestLogger::xmlCdata(cdataDesc, element->attributeValue(QTest::AI_Description), - sizeof(cdataDesc)); + QTestCharBuffer cdataDesc; + QXmlTestLogger::xmlCdata(cdataDesc, element->attributeValue(QTest::AI_Description)); - char location[100]; - char quotedFile[70]; - QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File), - sizeof(quotedFile)); + QTestCharBuffer location; + QTestCharBuffer quotedFile; + QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File)); - QTest::qt_snprintf(location, sizeof(location), "%s=\"%s\" %s=\"%s\"", + QTest::qt_asprintf(location, "%s=\"%s\" %s=\"%s\"", element->attributeName(QTest::AI_File), - quotedFile, + quotedFile.constData(), element->attributeName(QTest::AI_Line), element->attributeValue(QTest::AI_Line)); if (element->attribute(QTest::AI_Tag)) { - char cdataTag[100]; - QXmlTestLogger::xmlCdata(cdataTag, element->attributeValue(QTest::AI_Tag), - sizeof(cdataTag)); - QTest::qt_snprintf(formatted, 1024, "<Incident type=\"%s\" %s>\n" + QTestCharBuffer cdataTag; + QXmlTestLogger::xmlCdata(cdataTag, element->attributeValue(QTest::AI_Tag)); + QTest::qt_asprintf(formatted, "<Incident type=\"%s\" %s>\n" " <DataTag><![CDATA[%s]]></DataTag>\n" " <Description><![CDATA[%s]]></Description>\n" "</Incident>\n", element->attributeValue(QTest::AI_Result), - location, cdataTag, cdataDesc); + location.constData(), cdataTag.constData(), cdataDesc.constData()); } else { - QTest::qt_snprintf(formatted, 1024, "<Incident type=\"%s\" %s>\n" + QTest::qt_asprintf(formatted, "<Incident type=\"%s\" %s>\n" " <Description><![CDATA[%s]]></Description>\n" "</Incident>\n", element->attributeValue(QTest::AI_Result), - location, cdataDesc); + location.constData(), cdataDesc.constData()); } break; } case QTest::LET_Error: { // assuming type and attribute names don't need quoting - char quotedFile[128]; - char cdataDesc[700]; - QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File), - sizeof(quotedFile)); - QXmlTestLogger::xmlCdata(cdataDesc, element->attributeValue(QTest::AI_Description), - sizeof(cdataDesc)); - - QTest::qt_snprintf(formatted, 1024, "<Message type=\"%s\" %s=\"%s\" %s=\"%s\">\n <Description><![CDATA[%s]]></Description>\n</Message>\n", + QTestCharBuffer quotedFile; + QTestCharBuffer cdataDesc; + QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File)); + QXmlTestLogger::xmlCdata(cdataDesc, element->attributeValue(QTest::AI_Description)); + + QTest::qt_asprintf(formatted, "<Message type=\"%s\" %s=\"%s\" %s=\"%s\">\n <Description><![CDATA[%s]]></Description>\n</Message>\n", element->attributeValue(QTest::AI_Type), element->attributeName(QTest::AI_File), - quotedFile, + quotedFile.constData(), element->attributeName(QTest::AI_Line), element->attributeValue(QTest::AI_Line), - cdataDesc); + cdataDesc.constData()); break; } case QTest::LET_Benchmark: { // assuming value and iterations don't need quoting - char quotedMetric[256]; - char quotedTag[256]; - QXmlTestLogger::xmlQuote(quotedMetric, element->attributeValue(QTest::AI_Metric), - sizeof(quotedMetric)); - QXmlTestLogger::xmlQuote(quotedTag, element->attributeValue(QTest::AI_Tag), - sizeof(quotedTag)); - - QTest::qt_snprintf(formatted, 1024, "<BenchmarkResult %s=\"%s\" %s=\"%s\" %s=\"%s\" %s=\"%s\" />\n", + QTestCharBuffer quotedMetric; + QTestCharBuffer quotedTag; + QXmlTestLogger::xmlQuote(quotedMetric, element->attributeValue(QTest::AI_Metric)); + QXmlTestLogger::xmlQuote(quotedTag, element->attributeValue(QTest::AI_Tag)); + + QTest::qt_asprintf(formatted, "<BenchmarkResult %s=\"%s\" %s=\"%s\" %s=\"%s\" %s=\"%s\" />\n", element->attributeName(QTest::AI_Metric), - quotedMetric, + quotedMetric.constData(), element->attributeName(QTest::AI_Tag), - quotedTag, + quotedTag.constData(), element->attributeName(QTest::AI_Value), element->attributeValue(QTest::AI_Value), element->attributeName(QTest::AI_Iterations), @@ -147,71 +139,70 @@ void QTestXmlStreamer::formatStart(const QTestElement *element, char *formatted) break; } default: - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } } -void QTestXmlStreamer::formatEnd(const QTestElement *element, char *formatted) const +void QTestXmlStreamer::formatEnd(const QTestElement *element, char **formatted) const { if(!element || !formatted) return; if (element->elementType() == QTest::LET_TestCase) { - QTest::qt_snprintf(formatted, 1024, "</TestFunction>\n"); + QTest::qt_asprintf(formatted, "</TestFunction>\n"); } else - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } -void QTestXmlStreamer::formatBeforeAttributes(const QTestElement *element, char *formatted) const +void QTestXmlStreamer::formatBeforeAttributes(const QTestElement *element, char **formatted) const { if(!element || !formatted) return; if (element->elementType() == QTest::LET_TestCase && element->attribute(QTest::AI_Result)){ - char buf[900]; - char quotedFile[700]; - QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File), - sizeof(quotedFile)); + QTestCharBuffer buf; + QTestCharBuffer quotedFile; + QXmlTestLogger::xmlQuote(quotedFile, element->attributeValue(QTest::AI_File)); - QTest::qt_snprintf(buf, sizeof(buf), "%s=\"%s\" %s=\"%s\"", + QTest::qt_asprintf(buf, "%s=\"%s\" %s=\"%s\"", element->attributeName(QTest::AI_File), - quotedFile, + quotedFile.constData(), element->attributeName(QTest::AI_Line), element->attributeValue(QTest::AI_Line)); if( !element->childElements() ) { - QTest::qt_snprintf(formatted, 1024, "<Incident type=\"%s\" %s/>\n", - element->attributeValue(QTest::AI_Result), buf); + QTest::qt_asprintf(formatted, "<Incident type=\"%s\" %s/>\n", + element->attributeValue(QTest::AI_Result), buf.constData()); } else { - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } }else{ - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } } void QTestXmlStreamer::output(QTestElement *element) const { - char buf[1024]; - char quotedTc[800]; - QXmlTestLogger::xmlQuote(quotedTc, QTestResult::currentTestObjectName(), sizeof(quotedTc)); + QTestCharBuffer buf; + QTestCharBuffer quotedTc; + QXmlTestLogger::xmlQuote(quotedTc, QTestResult::currentTestObjectName()); - QTest::qt_snprintf(buf, sizeof(buf), "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<TestCase name=\"%s\">\n", - quotedTc); + QTest::qt_asprintf(buf, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<TestCase name=\"%s\">\n", + quotedTc.constData()); outputString(buf); - QTest::qt_snprintf(buf, sizeof(buf), "<Environment>\n <QtVersion>%s</QtVersion>\n <QTestVersion>%s</QTestVersion>\n", + QTest::qt_asprintf(buf, "<Environment>\n <QtVersion>%s</QtVersion>\n <QTestVersion>%s</QTestVersion>\n", qVersion(), QTEST_VERSION_STR ); outputString(buf); - QTest::qt_snprintf(buf, sizeof(buf), "</Environment>\n"); + QTest::qt_asprintf(buf, "</Environment>\n"); outputString(buf); QTestBasicStreamer::output(element); - QTest::qt_snprintf(buf, sizeof(buf), "</TestCase>\n"); + QTest::qt_asprintf(buf, "</TestCase>\n"); outputString(buf); } diff --git a/src/testlib/qtestxmlstreamer.h b/src/testlib/qtestxmlstreamer.h index 3cb1c60744..a601f6034a 100644 --- a/src/testlib/qtestxmlstreamer.h +++ b/src/testlib/qtestxmlstreamer.h @@ -59,9 +59,9 @@ class QTestXmlStreamer: public QTestBasicStreamer QTestXmlStreamer(); ~QTestXmlStreamer(); - void formatStart(const QTestElement *element = 0, char *formatted = 0) const; - void formatEnd(const QTestElement *element = 0, char *formatted = 0) const; - void formatBeforeAttributes(const QTestElement *element = 0, char *formatted = 0) const; + void formatStart(const QTestElement *element, char **formatted) const; + void formatEnd(const QTestElement *element, char **formatted) const; + void formatBeforeAttributes(const QTestElement *element, char **formatted) const; void output(QTestElement *element) const; }; diff --git a/src/testlib/qtestxunitstreamer.cpp b/src/testlib/qtestxunitstreamer.cpp index 6690cecfb3..d5d2631bf1 100644 --- a/src/testlib/qtestxunitstreamer.cpp +++ b/src/testlib/qtestxunitstreamer.cpp @@ -73,7 +73,7 @@ void QTestXunitStreamer::indentForElement(const QTestElement* element, char* buf } } -void QTestXunitStreamer::formatStart(const QTestElement *element, char *formatted) const +void QTestXunitStreamer::formatStart(const QTestElement *element, char **formatted) const { if(!element || !formatted ) return; @@ -84,34 +84,34 @@ void QTestXunitStreamer::formatStart(const QTestElement *element, char *formatte // Errors are written as CDATA within system-err, comments elsewhere if (element->elementType() == QTest::LET_Error) { if (element->parentElement()->elementType() == QTest::LET_SystemError) { - QTest::qt_snprintf(formatted, 1024, "<![CDATA["); + QTest::qt_asprintf(formatted, "<![CDATA["); } else { - QTest::qt_snprintf(formatted, 1024, "%s<!--", indent); + QTest::qt_asprintf(formatted, "%s<!--", indent); } return; } - QTest::qt_snprintf(formatted, 1024, "%s<%s", indent, element->elementName()); + QTest::qt_asprintf(formatted, "%s<%s", indent, element->elementName()); } -void QTestXunitStreamer::formatEnd(const QTestElement *element, char *formatted) const +void QTestXunitStreamer::formatEnd(const QTestElement *element, char **formatted) const { if(!element || !formatted ) return; if(!element->childElements()){ - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); return; } char indent[20]; indentForElement(element, indent, sizeof(indent)); - QTest::qt_snprintf(formatted, 1024, "%s</%s>\n", indent, element->elementName()); + QTest::qt_asprintf(formatted, "%s</%s>\n", indent, element->elementName()); } -void QTestXunitStreamer::formatAttributes(const QTestElement* element, const QTestElementAttribute *attribute, char *formatted) const +void QTestXunitStreamer::formatAttributes(const QTestElement* element, const QTestElementAttribute *attribute, char **formatted) const { if(!attribute || !formatted ) return; @@ -124,7 +124,7 @@ void QTestXunitStreamer::formatAttributes(const QTestElement* element, const QTe if (attrindex != QTest::AI_Description) return; - QXmlTestLogger::xmlCdata(formatted, attribute->value(), 1024); + QXmlTestLogger::xmlCdata(formatted, attribute->value()); return; } @@ -135,16 +135,16 @@ void QTestXunitStreamer::formatAttributes(const QTestElement* element, const QTe key = attribute->name(); if (key) { - char quotedValue[900]; - QXmlTestLogger::xmlQuote(quotedValue, attribute->value(), sizeof(quotedValue)); - QTest::qt_snprintf(formatted, 1024, " %s=\"%s\"", key, quotedValue); + QTestCharBuffer quotedValue; + QXmlTestLogger::xmlQuote(quotedValue, attribute->value()); + QTest::qt_asprintf(formatted, " %s=\"%s\"", key, quotedValue.constData()); } else { - QTest::qt_snprintf(formatted, 10, ""); + QTest::qt_asprintf(formatted, ""); } } -void QTestXunitStreamer::formatAfterAttributes(const QTestElement *element, char *formatted) const +void QTestXunitStreamer::formatAfterAttributes(const QTestElement *element, char **formatted) const { if(!element || !formatted ) return; @@ -152,31 +152,29 @@ void QTestXunitStreamer::formatAfterAttributes(const QTestElement *element, char // Errors are written as CDATA within system-err, comments elsewhere if (element->elementType() == QTest::LET_Error) { if (element->parentElement()->elementType() == QTest::LET_SystemError) { - QTest::qt_snprintf(formatted, 1024, "]]>\n"); + QTest::qt_asprintf(formatted, "]]>\n"); } else { - QTest::qt_snprintf(formatted, 1024, " -->\n"); + QTest::qt_asprintf(formatted, " -->\n"); } return; } if(!element->childElements()) - QTest::qt_snprintf(formatted, 10, "/>\n"); + QTest::qt_asprintf(formatted, "/>\n"); else - QTest::qt_snprintf(formatted, 10, ">\n"); + QTest::qt_asprintf(formatted, ">\n"); } void QTestXunitStreamer::output(QTestElement *element) const { - char buf[1024]; - QTest::qt_snprintf(buf, sizeof(buf), "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); - outputString(buf); + outputString("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); QTestBasicStreamer::output(element); } void QTestXunitStreamer::outputElements(QTestElement *element, bool) const { - char buf[1024]; + QTestCharBuffer buf; bool hasChildren; /* Elements are in reverse order of occurrence, so start from the end and work diff --git a/src/testlib/qtestxunitstreamer.h b/src/testlib/qtestxunitstreamer.h index 9817fd3b03..044307f9ee 100644 --- a/src/testlib/qtestxunitstreamer.h +++ b/src/testlib/qtestxunitstreamer.h @@ -58,10 +58,10 @@ class QTestXunitStreamer: public QTestBasicStreamer QTestXunitStreamer(); ~QTestXunitStreamer(); - void formatStart(const QTestElement *element = 0, char *formatted = 0) const; - void formatEnd(const QTestElement *element = 0, char *formatted = 0) const; - void formatAfterAttributes(const QTestElement *element = 0, char *formatted = 0) const; - void formatAttributes(const QTestElement *element = 0, const QTestElementAttribute *attribute = 0, char *formatted = 0) const; + void formatStart(const QTestElement *element, char **formatted) const; + void formatEnd(const QTestElement *element, char **formatted) const; + void formatAfterAttributes(const QTestElement *element, char **formatted) const; + void formatAttributes(const QTestElement *element, const QTestElementAttribute *attribute, char **formatted) const; void output(QTestElement *element) const; void outputElements(QTestElement *element, bool isChildElement = false) const; diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp index 85eb0ddded..fca7bfc1e6 100644 --- a/src/testlib/qxmltestlogger.cpp +++ b/src/testlib/qxmltestlogger.cpp @@ -104,18 +104,18 @@ QXmlTestLogger::~QXmlTestLogger() void QXmlTestLogger::startLogging() { QAbstractTestLogger::startLogging(); - char buf[1024]; + QTestCharBuffer buf; if (xmlmode == QXmlTestLogger::Complete) { - char quotedTc[900]; - xmlQuote(quotedTc, QTestResult::currentTestObjectName(), sizeof(quotedTc)); - QTest::qt_snprintf(buf, sizeof(buf), + QTestCharBuffer quotedTc; + xmlQuote(quotedTc, QTestResult::currentTestObjectName()); + QTest::qt_asprintf(buf, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" - "<TestCase name=\"%s\">\n", quotedTc); + "<TestCase name=\"%s\">\n", quotedTc.constData()); outputString(buf); } - QTest::qt_snprintf(buf, sizeof(buf), + QTest::qt_asprintf(buf, "<Environment>\n" " <QtVersion>%s</QtVersion>\n" " <QTestVersion>"QTEST_VERSION_STR"</QTestVersion>\n" @@ -134,10 +134,10 @@ void QXmlTestLogger::stopLogging() void QXmlTestLogger::enterTestFunction(const char *function) { - char buf[1024]; - char quotedFunction[950]; - xmlQuote(quotedFunction, function, sizeof(quotedFunction)); - QTest::qt_snprintf(buf, sizeof(buf), "<TestFunction name=\"%s\">\n", quotedFunction); + QTestCharBuffer buf; + QTestCharBuffer quotedFunction; + xmlQuote(quotedFunction, function); + QTest::qt_asprintf(buf, "<TestFunction name=\"%s\">\n", quotedFunction.constData()); outputString(buf); } @@ -208,51 +208,49 @@ static const char *messageFormatString(bool noDescription, bool noTag) void QXmlTestLogger::addIncident(IncidentTypes type, const char *description, const char *file, int line) { - // buffer must be large enough to hold all quoted/cdata buffers plus the format string itself - char buf[5000]; + QTestCharBuffer buf; const char *tag = QTestResult::currentDataTag(); const char *gtag = QTestResult::currentGlobalDataTag(); const char *filler = (tag && gtag) ? ":" : ""; const bool notag = QTest::isEmpty(tag) && QTest::isEmpty(gtag); - char quotedFile[1024]; - char cdataGtag[1024]; - char cdataTag[1024]; - char cdataDescription[1024]; + QTestCharBuffer quotedFile; + QTestCharBuffer cdataGtag; + QTestCharBuffer cdataTag; + QTestCharBuffer cdataDescription; - xmlQuote(quotedFile, file, sizeof(quotedFile)); - xmlCdata(cdataGtag, gtag, sizeof(cdataGtag)); - xmlCdata(cdataTag, tag, sizeof(cdataTag)); - xmlCdata(cdataDescription, description, sizeof(cdataDescription)); + xmlQuote(quotedFile, file); + xmlCdata(cdataGtag, gtag); + xmlCdata(cdataTag, tag); + xmlCdata(cdataDescription, description); - QTest::qt_snprintf(buf, sizeof(buf), + QTest::qt_asprintf(buf, QTest::incidentFormatString(QTest::isEmpty(description), notag), QTest::xmlIncidentType2String(type), - quotedFile, line, - cdataGtag, + quotedFile.constData(), line, + cdataGtag.constData(), filler, - cdataTag, - cdataDescription); + cdataTag.constData(), + cdataDescription.constData()); outputString(buf); } void QXmlTestLogger::addBenchmarkResult(const QBenchmarkResult &result) { - char buf[1536]; - char quotedMetric[64]; - char quotedTag[1024]; + QTestCharBuffer buf; + QTestCharBuffer quotedMetric; + QTestCharBuffer quotedTag; xmlQuote(quotedMetric, - QBenchmarkGlobalData::current->measurer->metricText().toAscii().constData(), - sizeof(quotedMetric)); - xmlQuote(quotedTag, result.context.tag.toAscii().constData(), sizeof(quotedTag)); + QBenchmarkGlobalData::current->measurer->metricText().toAscii().constData()); + xmlQuote(quotedTag, result.context.tag.toAscii().constData()); - QTest::qt_snprintf( - buf, sizeof(buf), + QTest::qt_asprintf( + buf, QTest::benchmarkResultFormatString(), - quotedMetric, - quotedTag, + quotedMetric.constData(), + quotedTag.constData(), QByteArray::number(result.value).constData(), //no 64-bit qt_snprintf support result.iterations); outputString(buf); @@ -261,30 +259,30 @@ void QXmlTestLogger::addBenchmarkResult(const QBenchmarkResult &result) void QXmlTestLogger::addMessage(MessageTypes type, const char *message, const char *file, int line) { - char buf[5000]; + QTestCharBuffer buf; const char *tag = QTestResult::currentDataTag(); const char *gtag = QTestResult::currentGlobalDataTag(); const char *filler = (tag && gtag) ? ":" : ""; const bool notag = QTest::isEmpty(tag) && QTest::isEmpty(gtag); - char quotedFile[1024]; - char cdataGtag[1024]; - char cdataTag[1024]; - char cdataDescription[1024]; + QTestCharBuffer quotedFile; + QTestCharBuffer cdataGtag; + QTestCharBuffer cdataTag; + QTestCharBuffer cdataDescription; - xmlQuote(quotedFile, file, sizeof(quotedFile)); - xmlCdata(cdataGtag, gtag, sizeof(cdataGtag)); - xmlCdata(cdataTag, tag, sizeof(cdataTag)); - xmlCdata(cdataDescription, message, sizeof(cdataDescription)); + xmlQuote(quotedFile, file); + xmlCdata(cdataGtag, gtag); + xmlCdata(cdataTag, tag); + xmlCdata(cdataDescription, message); - QTest::qt_snprintf(buf, sizeof(buf), + QTest::qt_asprintf(buf, QTest::messageFormatString(QTest::isEmpty(message), notag), QTest::xmlMessageType2String(type), - quotedFile, line, - cdataGtag, + quotedFile.constData(), line, + cdataGtag.constData(), filler, - cdataTag, - cdataDescription); + cdataTag.constData(), + cdataDescription.constData()); outputString(buf); } @@ -294,29 +292,30 @@ void QXmlTestLogger::addMessage(MessageTypes type, const char *message, XML characters as necessary so that dest is suitable for use in an XML quoted attribute string. */ -void QXmlTestLogger::xmlQuote(char* dest, char const* src, size_t n) +int QXmlTestLogger::xmlQuote(char* dest, char const* src, size_t n) { - if (n == 0) return; + if (n == 0) return 0; *dest = 0; - if (!src) return; + if (!src) return 0; + char* begin = dest; char* end = dest + n; while (dest < end) { switch (*src) { #define MAP_ENTITY(chr, ent) \ - case chr: \ - if (dest + sizeof(ent) < end) { \ - strcpy(dest, ent); \ - dest += sizeof(ent) - 1; \ - } \ - else { \ - *dest = 0; \ - return; \ - } \ - ++src; \ + case chr: \ + if (dest + sizeof(ent) < end) { \ + strcpy(dest, ent); \ + dest += sizeof(ent) - 1; \ + } \ + else { \ + *dest = 0; \ + return (dest+sizeof(ent)-begin); \ + } \ + ++src; \ break; MAP_ENTITY('>', ">"); @@ -333,7 +332,7 @@ void QXmlTestLogger::xmlQuote(char* dest, char const* src, size_t n) case 0: *dest = 0; - return; + return (dest-begin); default: *dest = *src; @@ -345,29 +344,31 @@ void QXmlTestLogger::xmlQuote(char* dest, char const* src, size_t n) // If we get here, dest was completely filled (dest == end) *(dest-1) = 0; + return (dest-begin); } /* Copy up to n characters from the src string into dest, escaping any special strings such that dest is suitable for use in an XML CDATA section. */ -void QXmlTestLogger::xmlCdata(char* dest, char const* src, size_t n) +int QXmlTestLogger::xmlCdata(char* dest, char const* src, size_t n) { - if (!n) return; + if (!n) return 0; if (!src || n == 1) { *dest = 0; - return; + return 0; } - char const CDATA_END[] = "]]>"; - char const CDATA_END_ESCAPED[] = "]]]><![CDATA[]>"; + static char const CDATA_END[] = "]]>"; + static char const CDATA_END_ESCAPED[] = "]]]><![CDATA[]>"; + char* begin = dest; char* end = dest + n; while (dest < end) { if (!*src) { *dest = 0; - return; + return (dest-begin); } if (!strncmp(src, CDATA_END, sizeof(CDATA_END)-1)) { @@ -378,7 +379,7 @@ void QXmlTestLogger::xmlCdata(char* dest, char const* src, size_t n) } else { *dest = 0; - return; + return (dest+sizeof(CDATA_END_ESCAPED)-begin); } continue; } @@ -390,6 +391,52 @@ void QXmlTestLogger::xmlCdata(char* dest, char const* src, size_t n) // If we get here, dest was completely filled (dest == end) *(dest-1) = 0; + return (dest-begin); +} + +typedef int (*StringFormatFunction)(char*,char const*,size_t); + +/* + A wrapper for string functions written to work with a fixed size buffer so they can be called + with a dynamically allocated buffer. +*/ +int allocateStringFn(char** str, char const* src, StringFormatFunction func) +{ + static const int MAXSIZE = 1024*1024*2; + + int size = 32; + delete[] *str; + *str = new char[size]; + + int res = 0; + + for (;;) { + res = func(*str, src, size); + (*str)[size - 1] = '\0'; + if (res < size) { + // We succeeded or fatally failed + break; + } + // buffer wasn't big enough, try again + size *= 2; + if (size > MAXSIZE) { + break; + } + delete[] *str; + *str = new char[size]; + } + + return res; +} + +int QXmlTestLogger::xmlQuote(char** str, char const* src) +{ + return allocateStringFn(str, src, QXmlTestLogger::xmlQuote); +} + +int QXmlTestLogger::xmlCdata(char** str, char const* src) +{ + return allocateStringFn(str, src, QXmlTestLogger::xmlCdata); } QT_END_NAMESPACE diff --git a/src/testlib/qxmltestlogger_p.h b/src/testlib/qxmltestlogger_p.h index 526b47106c..a7cc00a34c 100644 --- a/src/testlib/qxmltestlogger_p.h +++ b/src/testlib/qxmltestlogger_p.h @@ -79,8 +79,10 @@ public: void addMessage(MessageTypes type, const char *message, const char *file = 0, int line = 0); - static void xmlCdata(char* dest, char const* src, size_t n); - static void xmlQuote(char* dest, char const* src, size_t n); + static int xmlCdata(char** dest, char const* src); + static int xmlQuote(char** dest, char const* src); + static int xmlCdata(char* dest, char const* src, size_t n); + static int xmlQuote(char* dest, char const* src, size_t n); private: XmlMode xmlmode; diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index b872dfd6fe..e3ce2ec1f2 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -56,6 +56,8 @@ enum PropertyFlags { EnumOrFlag = 0x00000008, StdCppSet = 0x00000100, // Override = 0x00000200, + Constant = 0x00000400, + Final = 0x00000800, Designable = 0x00001000, ResolveDesignable = 0x00002000, Scriptable = 0x00004000, @@ -68,6 +70,7 @@ enum PropertyFlags { ResolveUser = 0x00200000, Notify = 0x00400000 }; + enum MethodFlags { AccessPrivate = 0x00, AccessProtected = 0x01, @@ -202,10 +205,10 @@ void Generator::generateCode() QByteArray qualifiedClassNameIdentifier = cdef->qualified; qualifiedClassNameIdentifier.replace(':', '_'); - int index = 12; + int index = 13; fprintf(out, "static const uint qt_meta_data_%s[] = {\n", qualifiedClassNameIdentifier.constData()); fprintf(out, "\n // content:\n"); - fprintf(out, " %4d, // revision\n", 2); + fprintf(out, " %4d, // revision\n", 3); fprintf(out, " %4d, // classname\n", strreg(cdef->qualified)); fprintf(out, " %4d, %4d, // classinfo\n", cdef->classInfoList.count(), cdef->classInfoList.count() ? index : 0); index += cdef->classInfoList.count() * 2; @@ -225,6 +228,9 @@ void Generator::generateCode() fprintf(out, " %4d, %4d, // constructors\n", isConstructible ? cdef->constructorList.count() : 0, isConstructible ? index : 0); + fprintf(out, " %4d, // flags\n", 0); + + // // Build classinfo array // @@ -379,7 +385,7 @@ void Generator::generateCode() if (isQt || !cdef->hasQObject) return; - fprintf(out, "\nconst QMetaObject *%s::metaObject() const\n{\n return &staticMetaObject;\n}\n", + fprintf(out, "\nconst QMetaObject *%s::metaObject() const\n{\n return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;\n}\n", cdef->qualified.constData()); // // Generate smart cast function @@ -597,6 +603,11 @@ void Generator::generateProperties() if (p.notifyId != -1) flags |= Notify; + if (p.constant) + flags |= Constant; + if (p.final) + flags |= Final; + fprintf(out, " %4d, %4d, ", strreg(p.name), strreg(p.type)); diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 797595f839..74b1a67d16 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -429,7 +429,7 @@ bool Moc::parseMaybeFunction(const ClassDef *cdef, FunctionDef *def) { def->isVirtual = false; //skip modifiers and attributes - while (test(INLINE) || test(STATIC) || + while (test(EXPLICIT) || test(INLINE) || test(STATIC) || (test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual || testFunctionAttribute(def)) {} bool tilde = test(TILDE); @@ -908,6 +908,15 @@ void Moc::parseProperty(ClassDef *def) propDef.name = lexem(); while (test(IDENTIFIER)) { QByteArray l = lexem(); + + if (l[0] == 'C' && l == "CONSTANT") { + propDef.constant = true; + continue; + } else if(l[0] == 'F' && l == "FINAL") { + propDef.final = true; + continue; + } + QByteArray v, v2; if (test(LPAREN)) { v = lexemUntil(RPAREN); @@ -963,6 +972,23 @@ void Moc::parseProperty(ClassDef *def) msg += " has no READ accessor function. The property will be invalid."; warning(msg.constData()); } + if (propDef.constant && !propDef.write.isNull()) { + QByteArray msg; + msg += "Property declaration "; + msg += propDef.name; + msg += " is both WRITEable and CONSTANT. CONSTANT will be ignored."; + propDef.constant = false; + warning(msg.constData()); + } + if (propDef.constant && !propDef.notify.isNull()) { + QByteArray msg; + msg += "Property declaration "; + msg += propDef.name; + msg += " is both NOTIFYable and CONSTANT. CONSTANT will be ignored."; + propDef.constant = false; + warning(msg.constData()); + } + if(!propDef.notify.isEmpty()) def->notifyableProperties++; diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index 9fa9ac2e28..767f84e90d 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -115,9 +115,11 @@ struct FunctionDef struct PropertyDef { - PropertyDef():notifyId(-1), gspec(ValueSpec){} + PropertyDef():notifyId(-1), constant(false), final(false), gspec(ValueSpec){} QByteArray name, type, read, write, reset, designable, scriptable, editable, stored, user, notify; int notifyId; + bool constant; + bool final; enum Specification { ValueSpec, ReferenceSpec, PointerSpec }; Specification gspec; bool stdCppSet() const { diff --git a/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp b/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp index 1cd84db832..801955146a 100644 --- a/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp +++ b/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp @@ -125,7 +125,7 @@ QNetworkReply *AccelTreeResourceLoader::load(const QUrl &uri, networkLoop.connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(error(QNetworkReply::NetworkError))); networkLoop.connect(reply, SIGNAL(finished()), SLOT(finished())); - if(networkLoop.exec()) + if(networkLoop.exec(QEventLoop::ExcludeUserInputEvents)) { const QString errorMessage(escape(reply->errorString())); diff --git a/src/xmlpatterns/parser/qquerytransformparser_p.h b/src/xmlpatterns/parser/qquerytransformparser_p.h index bb017882e0..06953d042c 100644 --- a/src/xmlpatterns/parser/qquerytransformparser_p.h +++ b/src/xmlpatterns/parser/qquerytransformparser_p.h @@ -154,6 +154,18 @@ #ifdef SELF # undef SELF #endif +/* These tokens are defined in VxWorks kernel mode + * + * Hence this un-break fix. Note that this file was auto generated. */ +#ifdef ERROR +# undef ERROR +#endif +#ifdef IMPORT +# undef IMPORT +#endif +#ifdef MAP +# undef MAP +#endif /* These tokens are defined to nothing on Windows because they're * used in their documentation parser, for use in things like: diff --git a/src/xmlpatterns/parser/winCEWorkaround.sed b/src/xmlpatterns/parser/winCEWorkaround.sed index d1c09e83e5..46f18aeb7e 100644 --- a/src/xmlpatterns/parser/winCEWorkaround.sed +++ b/src/xmlpatterns/parser/winCEWorkaround.sed @@ -17,4 +17,16 @@ \#ifdef SELF\ \# undef SELF\ \#endif\ +\/\* These tokens are defined in VxWorks kernel mode\ + \*\ + \* Hence this un-break fix. Note that this file was auto generated. *\/\ +\#ifdef ERROR\ +\# undef ERROR\ +\#endif\ +\#ifdef IMPORT\ +\# undef IMPORT\ +\#endif\ +\#ifdef MAP\ +\# undef MAP\ +\#endif\ diff --git a/tests/arthur/data/1.2/textArea01.svg b/tests/arthur/data/1.2/textArea01.svg index 79fcd0ac2c..945c34c47f 100644 --- a/tests/arthur/data/1.2/textArea01.svg +++ b/tests/arthur/data/1.2/textArea01.svg @@ -6,5 +6,5 @@ height="300">Tomorrow, and tomorrow, and tomorrow; creeps in this petty pace from day to day, until the last syll­able of recorded time. And all our yesterdays have lighted fools the way to dusty death.</textArea> - <rect x="5" y="5" width="210" height="310" stroke-width="3" stroke="#777"/> + <rect x="5" y="5" width="210" height="310" stroke-width="3" stroke="#777" fill="none"/> </svg> diff --git a/tests/arthur/data/qps/linear_gradients_perspectives_qps.png b/tests/arthur/data/qps/linear_gradients_perspectives_qps.png Binary files differindex 42ba872229..3315ebe498 100644 --- a/tests/arthur/data/qps/linear_gradients_perspectives_qps.png +++ b/tests/arthur/data/qps/linear_gradients_perspectives_qps.png diff --git a/tests/arthur/data/qps/linear_gradients_qps.png b/tests/arthur/data/qps/linear_gradients_qps.png Binary files differindex dc5223baff..a4cdc436a7 100644 --- a/tests/arthur/data/qps/linear_gradients_qps.png +++ b/tests/arthur/data/qps/linear_gradients_qps.png diff --git a/tests/arthur/data/qps/lineconsistency_qps.png b/tests/arthur/data/qps/lineconsistency_qps.png Binary files differindex 48768ef833..9d19a5dffa 100644 --- a/tests/arthur/data/qps/lineconsistency_qps.png +++ b/tests/arthur/data/qps/lineconsistency_qps.png diff --git a/tests/arthur/data/qps/linedashes2_aa_qps.png b/tests/arthur/data/qps/linedashes2_aa_qps.png Binary files differindex 0cb5b40084..54c84b3ea9 100644 --- a/tests/arthur/data/qps/linedashes2_aa_qps.png +++ b/tests/arthur/data/qps/linedashes2_aa_qps.png diff --git a/tests/arthur/data/qps/paths_aa_qps.png b/tests/arthur/data/qps/paths_aa_qps.png Binary files differindex 45b4b74603..e51a4ac400 100644 --- a/tests/arthur/data/qps/paths_aa_qps.png +++ b/tests/arthur/data/qps/paths_aa_qps.png diff --git a/tests/arthur/data/qps/paths_qps.png b/tests/arthur/data/qps/paths_qps.png Binary files differindex a9a8743ab1..094a84f167 100644 --- a/tests/arthur/data/qps/paths_qps.png +++ b/tests/arthur/data/qps/paths_qps.png diff --git a/tests/arthur/data/qps/pixmap_scaling.qps b/tests/arthur/data/qps/pixmap_scaling.qps index 81b8faec51..c5053adc0a 100644 --- a/tests/arthur/data/qps/pixmap_scaling.qps +++ b/tests/arthur/data/qps/pixmap_scaling.qps @@ -3,8 +3,8 @@ translate 5 25 setFont "arial" 8 -save - drawText 15 0 "opaque image" +save + drawText 15 0 "opaque image" translate 50 50 save translate 1 1 @@ -16,23 +16,23 @@ save scale -20 20 drawImage solid2x2.png 0 0 restore - save + save translate 1 -1 scale 20 -20 drawImage solid2x2.png 0 0 restore - save + save translate -1 -1 scale -20 -20 drawImage solid2x2.png 0 0 restore - -restore + +restore save translate 150 0 - drawText 15 0 "alpha image" + drawText 15 0 "alpha image" translate 50 50 save translate 1 1 @@ -44,12 +44,12 @@ save scale -20 20 drawImage alpha2x2.png 0 0 restore - save + save translate 1 -1 scale 20 -20 drawImage alpha2x2.png 0 0 restore - save + save translate -1 -1 scale -20 -20 drawImage alpha2x2.png 0 0 @@ -59,7 +59,7 @@ restore save translate 0 150 - drawText 15 0 "solid pixmap" + drawText 15 0 "solid pixmap" translate 50 50 save translate 1 1 @@ -71,12 +71,12 @@ save scale -20 20 drawPixmap solid2x2.png 0 0 restore - save + save translate 1 -1 scale 20 -20 drawPixmap solid2x2.png 0 0 restore - save + save translate -1 -1 scale -20 -20 drawPixmap solid2x2.png 0 0 @@ -85,9 +85,9 @@ restore save - translate 150 150 + translate 150 150 drawText 15 0 "alpha pixmap" - translate 50 50 + translate 50 50 save translate 1 1 scale 20 20 @@ -98,12 +98,12 @@ save scale -20 20 drawPixmap alpha2x2.png 0 0 restore - save + save translate 1 -1 scale 20 -20 drawPixmap alpha2x2.png 0 0 restore - save + save translate -1 -1 scale -20 -20 drawPixmap alpha2x2.png 0 0 @@ -111,7 +111,7 @@ save restore -save +save translate 300 10 save drawText 0 -10 "subrect solid image" @@ -138,7 +138,7 @@ save drawImage solid2x2.png 45 0 5 50 1.8 0 0.2 2 restore - save + save translate 150 0 drawText 0 -10 "subrect solid image" drawImage alpha2x2.png 0 0 50 5 0 0.0 2 0.2 @@ -151,7 +151,7 @@ save drawImage alpha2x2.png 0 35 50 5 0 1.4 2 0.2 drawImage alpha2x2.png 0 40 50 5 0 1.6 2 0.2 drawImage alpha2x2.png 0 45 50 5 0 1.8 2 0.2 - translate 60 0 + translate 60 0 drawImage alpha2x2.png 0 0 5 50 0.0 0 0.2 2 drawImage alpha2x2.png 5 0 5 50 0.2 0 0.2 2 drawImage alpha2x2.png 10 0 5 50 0.4 0 0.2 2 @@ -217,3 +217,311 @@ save restore restore + + +
+image_load alpha2x2.png alpha2x2
+image_convertToFormat alpha2x2 alpha2x2_argb32 ARGB32
+image_convertToFormat alpha2x2 alpha2x2_argb32pre ARGB32_Premultiplied
+image_convertToFormat alpha2x2 alpha2x2_rgb888 Format_RGB888
+image_convertToFormat alpha2x2 alpha2x2_rgb32 RGB32
+image_convertToFormat alpha2x2 alpha2x2_rgb16 Format_RGB16
+
+save
+ translate 0 300
+ drawText 15 0 "drawImage - argb32"
+ translate 50 50
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_argb32 0 0
+ restore
+restore
+
+save
+ translate 150 300
+ drawText 15 0 "drawImage - argb32premul"
+ translate 50 50
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+restore
+
+
+
+save
+ translate 0 450
+ drawText 15 0 "drawImage - rgb888"
+ translate 50 50
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_rgb888 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_rgb888 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_rgb888 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_rgb888 0 0
+ restore
+restore
+
+save
+ translate 150 450
+ drawText 15 0 "drawImage - rgb32"
+ translate 50 50
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_rgb32 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_rgb32 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_rgb32 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_rgb32 0 0
+ restore
+restore
+
+save
+ translate 300 450
+ drawText 15 0 "drawImage - rgb16"
+ translate 50 50
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+restore
+
+
+
+save
+ translate 0 600
+ drawText 15 0 "clipping - argb32"
+ translate 50 50
+ setClipRect -30 -30 60 60 ReplaceClip
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_argb32 0 0
+ restore
+restore
+
+save
+ translate 150 600
+ drawText 15 0 "clipping - argb32premul"
+ translate 50 50
+ setClipRect -30 -30 60 60 ReplaceClip
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+restore
+
+save
+ translate 300 600
+ drawText 15 0 "clipping - rgb16"
+ translate 50 50
+ setClipRect -30 -30 60 60 ReplaceClip
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+restore
+
+
+path_addEllipse ellipse -30 -30 60 60
+
+save
+ translate 0 750
+ drawText 15 0 "clipping - argb32"
+ translate 50 50
+ setClipPath ellipse ReplaceClip
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_argb32 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_argb32 0 0
+ restore
+restore
+
+save
+ translate 150 750
+ drawText 15 0 "clipping - argb32premul"
+ translate 50 50
+ setClipPath ellipse ReplaceClip
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_argb32pre 0 0
+ restore
+restore
+
+save
+ translate 300 750
+ drawText 15 0 "clipping - rgb16"
+ translate 50 50
+ setClipPath ellipse ReplaceClip
+ save
+ translate 0.5 0.5
+ scale 20 20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate -0.5 0.5
+ scale -20 20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate 0.5 -0.5
+ scale 20 -20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+ save
+ translate -0.5 -0.5
+ scale -20 -20
+ drawImage alpha2x2_rgb16 0 0
+ restore
+restore
diff --git a/tests/arthur/data/qps/radial_gradients_perspectives_qps.png b/tests/arthur/data/qps/radial_gradients_perspectives_qps.png Binary files differindex 0e28aae621..d8332508f0 100644 --- a/tests/arthur/data/qps/radial_gradients_perspectives_qps.png +++ b/tests/arthur/data/qps/radial_gradients_perspectives_qps.png diff --git a/tests/arthur/data/qps/radial_gradients_qps.png b/tests/arthur/data/qps/radial_gradients_qps.png Binary files differindex 66fcfc446b..11043e80d3 100644 --- a/tests/arthur/data/qps/radial_gradients_qps.png +++ b/tests/arthur/data/qps/radial_gradients_qps.png diff --git a/tests/arthur/data/qps/rasterops.qps b/tests/arthur/data/qps/rasterops.qps index b79ec0da97..ee3decaf00 100644 --- a/tests/arthur/data/qps/rasterops.qps +++ b/tests/arthur/data/qps/rasterops.qps @@ -1,83 +1,84 @@ -setPen NoPen - -setBrush black -drawRect 10 10 1200 140 - -setCompositionMode SourceOrDestination -translate 20 20 -begin_block drawShape -setBrush 0xffff0000 -drawEllipse 10 10 80 80 -setBrush 0xff00ff00 -drawRect 0 0 50 50 -setBrush 0xff0000ff -drawRect 50 50 50 50 -end_block - -begin_block loop -setCompositionMode SourceAndDestination -translate 120 0 -repeat_block drawShape - -setCompositionMode SourceXorDestination -translate 120 0 -repeat_block drawShape - -setCompositionMode NotSourceAndNotDestination -translate 120 0 -repeat_block drawShape - -setCompositionMode NotSourceOrNotDestination -translate 120 0 -repeat_block drawShape - -setCompositionMode NotSourceXorDestination -translate 120 0 -repeat_block drawShape - -setCompositionMode NotSource -translate 120 0 -repeat_block drawShape - -setCompositionMode NotSourceAndDestination -translate 120 0 -repeat_block drawShape - -setCompositionMode SourceAndNotDestination -translate 120 0 -repeat_block drawShape -end_block - -resetMatrix -setCompositionMode Source -setBrush white -drawRect 10 160 1200 140 -translate 20 170 -repeat_block loop - -resetMatrix -setCompositionMode Source -translate 20 320 -repeat_block loop - -resetMatrix -setPen black -setCompositionMode SourceOver -translate 20 470 -drawText 20 0 "Or ROP" -translate 120 0 -drawText 20 0 "And ROP" -translate 120 0 -drawText 20 0 "Xor ROP" -translate 120 0 -drawText 20 0 "Nor ROP" -translate 120 0 -drawText 20 0 "Nand ROP" -translate 120 0 -drawText 0 0 "NSrcXorDst ROP" -translate 120 0 -drawText 20 0 "NSrc ROP" -translate 120 0 -drawText 0 0 "NSrcAndDst ROP" -translate 120 0 -drawText 0 0 "SrcAndNDst ROP" +setPen NoPen
+
+setBrush black
+drawRect 10 10 60 500
+
+setCompositionMode SourceOrDestination
+translate 20 20
+
+begin_block drawShape
+ setBrush 0xffff0000
+ drawEllipse 5 5 30 30
+ setBrush 0xff00ff00
+ drawRect 0 0 20 20
+ setBrush 0xff0000ff
+ drawRect 20 20 20 20
+end_block
+
+begin_block loop
+ setCompositionMode SourceAndDestination
+ translate 0 50
+repeat_block drawShape
+
+setCompositionMode SourceXorDestination
+translate 0 50
+repeat_block drawShape
+
+setCompositionMode NotSourceAndNotDestination
+translate 0 50
+repeat_block drawShape
+
+setCompositionMode NotSourceOrNotDestination
+translate 0 50
+repeat_block drawShape
+
+setCompositionMode NotSourceXorDestination
+translate 0 50
+repeat_block drawShape
+
+setCompositionMode NotSource
+translate 0 50
+repeat_block drawShape
+
+setCompositionMode NotSourceAndDestination
+translate 0 50
+repeat_block drawShape
+
+setCompositionMode SourceAndNotDestination
+translate 0 50
+repeat_block drawShape
+end_block
+
+resetMatrix
+setCompositionMode Source
+setBrush white
+drawRect 100 10 60 500
+translate 110 20
+repeat_block loop
+
+resetMatrix
+setCompositionMode Source
+translate 190 20
+repeat_block loop
+
+resetMatrix
+setPen black
+setCompositionMode SourceOver
+translate 250 45
+drawText 20 0 "Or ROP"
+translate 0 50
+drawText 20 0 "And ROP"
+translate 0 50
+drawText 20 0 "Xor ROP"
+translate 0 50
+drawText 20 0 "Nor ROP"
+translate 0 50
+drawText 20 0 "Nand ROP"
+translate 0 50
+drawText 0 0 "NSrcXorDst ROP"
+translate 0 50
+drawText 20 0 "NSrc ROP"
+translate 0 50
+drawText 0 0 "NSrcAndDst ROP"
+translate 0 50
+drawText 0 0 "SrcAndNDst ROP"
diff --git a/tests/arthur/data/qps/rasterops_qps.png b/tests/arthur/data/qps/rasterops_qps.png Binary files differindex 80ca8ae074..7b93001cd5 100644 --- a/tests/arthur/data/qps/rasterops_qps.png +++ b/tests/arthur/data/qps/rasterops_qps.png diff --git a/tests/arthur/data/qps/text_perspectives_qps.png b/tests/arthur/data/qps/text_perspectives_qps.png Binary files differindex 483ccc0f95..183ad6ff31 100644 --- a/tests/arthur/data/qps/text_perspectives_qps.png +++ b/tests/arthur/data/qps/text_perspectives_qps.png diff --git a/tests/arthur/data/qps/text_qps.png b/tests/arthur/data/qps/text_qps.png Binary files differindex 2c2ebf266b..9a954938cf 100644 --- a/tests/arthur/data/qps/text_qps.png +++ b/tests/arthur/data/qps/text_qps.png diff --git a/tests/arthur/lance/interactivewidget.cpp b/tests/arthur/lance/interactivewidget.cpp index 0febbed4d2..0c2c7a6062 100644 --- a/tests/arthur/lance/interactivewidget.cpp +++ b/tests/arthur/lance/interactivewidget.cpp @@ -43,7 +43,7 @@ InteractiveWidget::InteractiveWidget() { - m_onScreenWidget = new OnScreenWidget<QWidget>(); + m_onScreenWidget = new OnScreenWidget<QWidget>(""); m_onScreenWidget->setMinimumSize(320, 240); setCentralWidget(m_onScreenWidget); diff --git a/tests/arthur/lance/lance.pro b/tests/arthur/lance/lance.pro index 341eabcaf3..3692f21afa 100644 --- a/tests/arthur/lance/lance.pro +++ b/tests/arthur/lance/lance.pro @@ -6,7 +6,7 @@ INCLUDEPATH += . # Input HEADERS += widgets.h interactivewidget.h -SOURCES += interactivewidget.cpp main.cpp +SOURCES += interactivewidget.cpp main.cpp RESOURCES += icons.qrc contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2):QT += opengl diff --git a/tests/arthur/lance/main.cpp b/tests/arthur/lance/main.cpp index 4e5437e4de..b199cd50b8 100644 --- a/tests/arthur/lance/main.cpp +++ b/tests/arthur/lance/main.cpp @@ -66,7 +66,7 @@ extern bool qt_show_painter_debug_output = false; //#define CONSOLE_APPLICATION -static const struct { +static const struct { const char *name; QImage::Format format; } imageFormats[] = { @@ -281,7 +281,7 @@ int main(int argc, char **argv) if (imageFormat == QImage::Format_Invalid) { printf("Invalid image format. Available formats are:\n"); - for (int ff = 0; ff < formatCount; ++ff) + for (int ff = 0; ff < formatCount; ++ff) printf("\t%s\n", imageFormats[ff].name); return -1; } @@ -402,12 +402,10 @@ int main(int argc, char **argv) case WidgetType: { OnScreenWidget<QWidget> *qWidget = - new OnScreenWidget<QWidget>; + new OnScreenWidget<QWidget>(files.at(j)); qWidget->setVerboseMode(verboseMode); qWidget->setType(type); qWidget->setCheckersBackground(checkers_background); - qWidget->m_filename = files.at(j); - qWidget->setWindowTitle(fileinfo.filePath()); qWidget->m_commands = content; qWidget->resize(width, height); qWidget->show(); @@ -417,12 +415,10 @@ int main(int argc, char **argv) case ImageWidgetType: { - OnScreenWidget<QWidget> *qWidget = new OnScreenWidget<QWidget>; + OnScreenWidget<QWidget> *qWidget = new OnScreenWidget<QWidget>(files.at(j)); qWidget->setVerboseMode(verboseMode); qWidget->setType(type); qWidget->setCheckersBackground(checkers_background); - qWidget->m_filename = files.at(j); - qWidget->setWindowTitle(fileinfo.filePath()); qWidget->m_commands = content; qWidget->resize(width, height); qWidget->show(); @@ -451,12 +447,10 @@ int main(int argc, char **argv) } case OpenGLType: { - OnScreenWidget<QGLWidget> *qGLWidget = new OnScreenWidget<QGLWidget>; + OnScreenWidget<QGLWidget> *qGLWidget = new OnScreenWidget<QGLWidget>(files.at(j)); qGLWidget->setVerboseMode(verboseMode); qGLWidget->setType(type); qGLWidget->setCheckersBackground(checkers_background); - qGLWidget->m_filename = files.at(j); - qGLWidget->setWindowTitle(fileinfo.filePath()); qGLWidget->m_commands = content; qGLWidget->resize(width, height); qGLWidget->show(); diff --git a/tests/arthur/lance/widgets.h b/tests/arthur/lance/widgets.h index 271c18aac6..72476084fc 100644 --- a/tests/arthur/lance/widgets.h +++ b/tests/arthur/lance/widgets.h @@ -57,15 +57,47 @@ #include <QTextStream> #include <QPaintEngine> +#include <private/qwindowsurface_p.h> + #include <qmath.h> const int CP_RADIUS = 10; +class StupidWorkaround : public QObject +{ + Q_OBJECT +public: + StupidWorkaround(QWidget *widget, int *value) + : QObject(widget), w(widget), mode(value) + { + } + +public slots: + void setViewMode(int m) { + *mode = m; + w->update(); + } + +private: + QWidget *w; + int *mode; +}; + template <class T> class OnScreenWidget : public T { public: - OnScreenWidget(QWidget *parent = 0) : T(parent) + + enum ViewMode { + RenderView, + BaselineView, + DifferenceView + }; + + OnScreenWidget(const QString &file, QWidget *parent = 0) + : T(parent), + m_view_mode(RenderView), + m_filename(file) { QSettings settings("Trolltech", "lance"); for (int i=0; i<10; ++i) { @@ -78,11 +110,47 @@ public: m_deviceType = WidgetType; m_checkersBackground = true; m_verboseMode = false; - } - void setVerboseMode(bool v) { m_verboseMode = v; } - void setCheckersBackground(bool b) { m_checkersBackground = b; } - void setType(DeviceType t) { m_deviceType = t; } + m_baseline_name = QString(m_filename).replace(".qps", "_qps") + ".png"; + if (QFileInfo(m_baseline_name).exists()) { + m_baseline = QPixmap(m_baseline_name); + } + + if (m_baseline.isNull()) { + setWindowTitle("Rendering: '" + file + "'. No baseline available"); + } else { + setWindowTitle("Rendering: '" + file + "'. Shortcuts: 1=render, 2=baseline, 3=difference"); + + StupidWorkaround *workaround = new StupidWorkaround(this, &m_view_mode); + + QSignalMapper *mapper = new QSignalMapper(this); + connect(mapper, SIGNAL(mapped(int)), workaround, SLOT(setViewMode(int))); + connect(mapper, SIGNAL(mapped(QString)), this, SLOT(setWindowTitle(QString))); + + QAction *renderViewAction = new QAction("Render View", this); + renderViewAction->setShortcut(Qt::Key_1); + connect(renderViewAction, SIGNAL(triggered()), mapper, SLOT(map())); + mapper->setMapping(renderViewAction, RenderView); + mapper->setMapping(renderViewAction, "Render View: " + file); + addAction(renderViewAction); + + QAction *baselineAction = new QAction("Baseline", this); + baselineAction->setShortcut(Qt::Key_2); + connect(baselineAction, SIGNAL(triggered()), mapper, SLOT(map())); + mapper->setMapping(baselineAction, BaselineView); + mapper->setMapping(baselineAction, "Baseline View: " + file); + addAction(baselineAction); + + QAction *differenceAction = new QAction("Differenfe View", this); + differenceAction->setShortcut(Qt::Key_3); + connect(differenceAction, SIGNAL(triggered()), mapper, SLOT(map())); + mapper->setMapping(differenceAction, DifferenceView); + mapper->setMapping(differenceAction, "Difference View" + file); + addAction(differenceAction); + + } + + } ~OnScreenWidget() { @@ -93,12 +161,24 @@ public: settings.sync(); } + void setVerboseMode(bool v) { m_verboseMode = v; } + void setCheckersBackground(bool b) { m_checkersBackground = b; } + void setType(DeviceType t) { m_deviceType = t; } + void resizeEvent(QResizeEvent *e) { m_image = QImage(); T::resizeEvent(e); } - void paintEvent(QPaintEvent *) + void paintEvent(QPaintEvent *) { + switch (m_view_mode) { + case RenderView: paintRenderView(); break; + case BaselineView: paintBaselineView(); break; + case DifferenceView: paintDifferenceView(); break; + } + } + + void OnScreenWidget<T>::paintRenderView() { QPainter pt; QPaintDevice *dev = this; @@ -152,6 +232,57 @@ public: } } + if (m_render_view.isNull()) { + m_render_view = window()->windowSurface()->grabWidget(this); + m_render_view.save("renderView.png"); + } + } + + void paintBaselineView() { + QPainter p(this); + + if (m_baseline.isNull()) { + p.drawText(rect(), Qt::AlignCenter, + "No baseline found\n" + "file '" + m_baseline_name + "' does not exist..."); + return; + } + + p.drawPixmap(0, 0, m_baseline); + + p.setPen(QColor::fromRgb(0, 0, 0, 0.1)); + p.setFont(QFont("Arial", 128)); + p.rotate(45); + p.drawText(100, 0, "BASELINE"); + } + + QPixmap generateDifference() + { + QImage img(size(), QImage::Format_RGB32); + img.fill(0); + + QPainter p(&img); + p.drawPixmap(0, 0, m_render_view); + + p.setCompositionMode(QPainter::RasterOp_SourceXorDestination); + p.drawPixmap(0, 0, m_baseline); + + p.end(); + + return QPixmap::fromImage(img); + } + + void paintDifferenceView() { + QPainter p(this); + if (m_baseline.isNull()) { + p.drawText(rect(), Qt::AlignCenter, + "No baseline found\n" + "file '" + m_baseline_name + "' does not exist..."); + return; + } + + p.fillRect(rect(), Qt::black); + p.drawPixmap(0, 0, generateDifference()); } @@ -190,8 +321,6 @@ public: T::update(); } - - QSize sizeHint() const { return QSize(800, 800); } QVector<QPointF> m_controlPoints; @@ -200,12 +329,18 @@ public: QStringList m_commands; QString m_filename; + QString m_baseline_name; bool m_verboseMode; bool m_checkersBackground; DeviceType m_deviceType; + int m_view_mode; + QImage m_image; + + QPixmap m_baseline; + QPixmap m_render_view; }; #endif diff --git a/tests/auto/math3d/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/math3d/qmatrixnxn/tst_qmatrixnxn.cpp index d799c1b5c7..fe1d0dbd51 100644 --- a/tests/auto/math3d/qmatrixnxn/tst_qmatrixnxn.cpp +++ b/tests/auto/math3d/qmatrixnxn/tst_qmatrixnxn.cpp @@ -170,6 +170,9 @@ private slots: void mapRect_data(); void mapRect(); + void properties(); + void metaTypes(); + private: static void setMatrix(QMatrix2x2& m, const qreal *values); static void setMatrixDirect(QMatrix2x2& m, const qreal *values); @@ -3331,6 +3334,50 @@ void tst_QMatrix::mapRect() QVERIFY(mri == tri); } +class tst_QMatrix4x4Properties : public QObject +{ + Q_OBJECT + Q_PROPERTY(QMatrix4x4 matrix READ matrix WRITE setMatrix) +public: + tst_QMatrix4x4Properties(QObject *parent = 0) : QObject(parent) {} + + QMatrix4x4 matrix() const { return m; } + void setMatrix(const QMatrix4x4& value) { m = value; } + +private: + QMatrix4x4 m; +}; + +// Test getting and setting matrix properties via the metaobject system. +void tst_QMatrix::properties() +{ + tst_QMatrix4x4Properties obj; + + QMatrix4x4 m1(uniqueValues4); + obj.setMatrix(m1); + + QMatrix4x4 m2 = qVariantValue<QMatrix4x4>(obj.property("matrix")); + QVERIFY(isSame(m2, uniqueValues4)); + + QMatrix4x4 m3(transposedValues4); + obj.setProperty("matrix", qVariantFromValue(m3)); + + m2 = qVariantValue<QMatrix4x4>(obj.property("matrix")); + QVERIFY(isSame(m2, transposedValues4)); +} + +void tst_QMatrix::metaTypes() +{ + QVERIFY(QMetaType::type("QMatrix4x4") == QMetaType::QMatrix4x4); + + QCOMPARE(QByteArray(QMetaType::typeName(QMetaType::QMatrix4x4)), + QByteArray("QMatrix4x4")); + + QVERIFY(QMetaType::isRegistered(QMetaType::QMatrix4x4)); + + QVERIFY(qMetaTypeId<QMatrix4x4>() == QMetaType::QMatrix4x4); +} + QTEST_APPLESS_MAIN(tst_QMatrix) #include "tst_qmatrixnxn.moc" diff --git a/tests/auto/math3d/qquaternion/tst_qquaternion.cpp b/tests/auto/math3d/qquaternion/tst_qquaternion.cpp index 16b87a101d..369f5ac196 100644 --- a/tests/auto/math3d/qquaternion/tst_qquaternion.cpp +++ b/tests/auto/math3d/qquaternion/tst_qquaternion.cpp @@ -93,6 +93,9 @@ private slots: void nlerp_data(); void nlerp(); + + void properties(); + void metaTypes(); }; // qFuzzyCompare isn't always "fuzzy" enough to handle conversion @@ -825,6 +828,55 @@ void tst_QQuaternion::nlerp() QVERIFY(fuzzyCompare(result.scalar(), q3.scalar())); } +class tst_QQuaternionProperties : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuaternion quaternion READ quaternion WRITE setQuaternion) +public: + tst_QQuaternionProperties(QObject *parent = 0) : QObject(parent) {} + + QQuaternion quaternion() const { return q; } + void setQuaternion(const QQuaternion& value) { q = value; } + +private: + QQuaternion q; +}; + +// Test getting and setting quaternion properties via the metaobject system. +void tst_QQuaternion::properties() +{ + tst_QQuaternionProperties obj; + + obj.setQuaternion(QQuaternion(6.0f, 7.0f, 8.0f, 9.0f)); + + QQuaternion q = qVariantValue<QQuaternion>(obj.property("quaternion")); + QCOMPARE(q.scalar(), (qreal)6.0f); + QCOMPARE(q.x(), (qreal)7.0f); + QCOMPARE(q.y(), (qreal)8.0f); + QCOMPARE(q.z(), (qreal)9.0f); + + obj.setProperty("quaternion", + qVariantFromValue(QQuaternion(-6.0f, -7.0f, -8.0f, -9.0f))); + + q = qVariantValue<QQuaternion>(obj.property("quaternion")); + QCOMPARE(q.scalar(), (qreal)-6.0f); + QCOMPARE(q.x(), (qreal)-7.0f); + QCOMPARE(q.y(), (qreal)-8.0f); + QCOMPARE(q.z(), (qreal)-9.0f); +} + +void tst_QQuaternion::metaTypes() +{ + QVERIFY(QMetaType::type("QQuaternion") == QMetaType::QQuaternion); + + QCOMPARE(QByteArray(QMetaType::typeName(QMetaType::QQuaternion)), + QByteArray("QQuaternion")); + + QVERIFY(QMetaType::isRegistered(QMetaType::QQuaternion)); + + QVERIFY(qMetaTypeId<QQuaternion>() == QMetaType::QQuaternion); +} + QTEST_APPLESS_MAIN(tst_QQuaternion) #include "tst_qquaternion.moc" diff --git a/tests/auto/math3d/qvectornd/tst_qvectornd.cpp b/tests/auto/math3d/qvectornd/tst_qvectornd.cpp index 9c1ea83f5f..6368874f78 100644 --- a/tests/auto/math3d/qvectornd/tst_qvectornd.cpp +++ b/tests/auto/math3d/qvectornd/tst_qvectornd.cpp @@ -137,6 +137,9 @@ private slots: void dotProduct3(); void dotProduct4_data(); void dotProduct4(); + + void properties(); + void metaTypes(); }; // qFuzzyCompare isn't always "fuzzy" enough to handle conversion @@ -2040,6 +2043,99 @@ void tst_QVector::dotProduct4() QCOMPARE(QVector4D::dotProduct(v1, v2), d); } +class tst_QVectorProperties : public QObject +{ + Q_OBJECT + Q_PROPERTY(QVector2D vector2D READ vector2D WRITE setVector2D) + Q_PROPERTY(QVector3D vector3D READ vector3D WRITE setVector3D) + Q_PROPERTY(QVector4D vector4D READ vector4D WRITE setVector4D) +public: + tst_QVectorProperties(QObject *parent = 0) : QObject(parent) {} + + QVector2D vector2D() const { return v2; } + void setVector2D(const QVector2D& value) { v2 = value; } + + QVector3D vector3D() const { return v3; } + void setVector3D(const QVector3D& value) { v3 = value; } + + QVector4D vector4D() const { return v4; } + void setVector4D(const QVector4D& value) { v4 = value; } + +private: + QVector2D v2; + QVector3D v3; + QVector4D v4; +}; + +// Test getting and setting vector properties via the metaobject system. +void tst_QVector::properties() +{ + tst_QVectorProperties obj; + + obj.setVector2D(QVector2D(1.0f, 2.0f)); + obj.setVector3D(QVector3D(3.0f, 4.0f, 5.0f)); + obj.setVector4D(QVector4D(6.0f, 7.0f, 8.0f, 9.0f)); + + QVector2D v2 = qVariantValue<QVector2D>(obj.property("vector2D")); + QCOMPARE(v2.x(), (qreal)1.0f); + QCOMPARE(v2.y(), (qreal)2.0f); + + QVector3D v3 = qVariantValue<QVector3D>(obj.property("vector3D")); + QCOMPARE(v3.x(), (qreal)3.0f); + QCOMPARE(v3.y(), (qreal)4.0f); + QCOMPARE(v3.z(), (qreal)5.0f); + + QVector4D v4 = qVariantValue<QVector4D>(obj.property("vector4D")); + QCOMPARE(v4.x(), (qreal)6.0f); + QCOMPARE(v4.y(), (qreal)7.0f); + QCOMPARE(v4.z(), (qreal)8.0f); + QCOMPARE(v4.w(), (qreal)9.0f); + + obj.setProperty("vector2D", + qVariantFromValue(QVector2D(-1.0f, -2.0f))); + obj.setProperty("vector3D", + qVariantFromValue(QVector3D(-3.0f, -4.0f, -5.0f))); + obj.setProperty("vector4D", + qVariantFromValue(QVector4D(-6.0f, -7.0f, -8.0f, -9.0f))); + + v2 = qVariantValue<QVector2D>(obj.property("vector2D")); + QCOMPARE(v2.x(), (qreal)-1.0f); + QCOMPARE(v2.y(), (qreal)-2.0f); + + v3 = qVariantValue<QVector3D>(obj.property("vector3D")); + QCOMPARE(v3.x(), (qreal)-3.0f); + QCOMPARE(v3.y(), (qreal)-4.0f); + QCOMPARE(v3.z(), (qreal)-5.0f); + + v4 = qVariantValue<QVector4D>(obj.property("vector4D")); + QCOMPARE(v4.x(), (qreal)-6.0f); + QCOMPARE(v4.y(), (qreal)-7.0f); + QCOMPARE(v4.z(), (qreal)-8.0f); + QCOMPARE(v4.w(), (qreal)-9.0f); +} + +void tst_QVector::metaTypes() +{ + QVERIFY(QMetaType::type("QVector2D") == QMetaType::QVector2D); + QVERIFY(QMetaType::type("QVector3D") == QMetaType::QVector3D); + QVERIFY(QMetaType::type("QVector4D") == QMetaType::QVector4D); + + QCOMPARE(QByteArray(QMetaType::typeName(QMetaType::QVector2D)), + QByteArray("QVector2D")); + QCOMPARE(QByteArray(QMetaType::typeName(QMetaType::QVector3D)), + QByteArray("QVector3D")); + QCOMPARE(QByteArray(QMetaType::typeName(QMetaType::QVector4D)), + QByteArray("QVector4D")); + + QVERIFY(QMetaType::isRegistered(QMetaType::QVector2D)); + QVERIFY(QMetaType::isRegistered(QMetaType::QVector3D)); + QVERIFY(QMetaType::isRegistered(QMetaType::QVector4D)); + + QVERIFY(qMetaTypeId<QVector2D>() == QMetaType::QVector2D); + QVERIFY(qMetaTypeId<QVector3D>() == QMetaType::QVector3D); + QVERIFY(qMetaTypeId<QVector4D>() == QMetaType::QVector4D); +} + QTEST_APPLESS_MAIN(tst_QVector) #include "tst_qvectornd.moc" diff --git a/tests/auto/moc/os9-newlines.h b/tests/auto/moc/os9-newlines.h index fb9bbe4247..85fa6713a0 100644 --- a/tests/auto/moc/os9-newlines.h +++ b/tests/auto/moc/os9-newlines.h @@ -1 +1 @@ -/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QObject>
class Os9Newlines : public QObject
{
Q_OBJECT
public Q_SLOTS:
inline void testSlot() {}
};
+/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QObject>
class Os9Newlines : public QObject
{
Q_OBJECT
public Q_SLOTS:
inline void testSlot() {}
};
\ No newline at end of file diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp index d66791f17a..488f068e20 100644 --- a/tests/auto/moc/tst_moc.cpp +++ b/tests/auto/moc/tst_moc.cpp @@ -1157,6 +1157,13 @@ void tst_Moc::constructors() QObject *o3 = mo->newInstance(Q_ARG(QString, str)); QVERIFY(o3 != 0); QCOMPARE(qobject_cast<CtorTestClass*>(o3)->m_str, str); + + { + //explicit constructor + QObject *o = QObject::staticMetaObject.newInstance(); + QVERIFY(o); + delete o; + } } #include "task234909.h" diff --git a/tests/auto/q3socket/tst_qsocket.cpp b/tests/auto/q3socket/tst_qsocket.cpp index b07fa2fa45..854cc75273 100644 --- a/tests/auto/q3socket/tst_qsocket.cpp +++ b/tests/auto/q3socket/tst_qsocket.cpp @@ -124,8 +124,10 @@ void tst_Q3Socket::peerAddress_data() QTest::addColumn<bool>("peerClosesConnection"); QTest::addColumn<QString>("peerAddr"); - QTest::newRow( "echo" ) << QString("qt-test-server.troll.no") << (uint)7 << false << QString("10.3.3.69"); - QTest::newRow( "daytime" ) << QString("qt-test-server.troll.no") << (uint)13 << true << QString("10.3.3.69"); + QTest::newRow( "echo" ) << QtNetworkSettings::serverLocalName() << (uint)7 << false + << QtNetworkSettings::serverIP().toString(); + QTest::newRow( "daytime" ) << QtNetworkSettings::serverLocalName() << (uint)13 << true + << QtNetworkSettings::serverIP().toString(); } void tst_Q3Socket::peerAddress() @@ -191,7 +193,7 @@ void tst_Q3Socket::emitConnectionRefused() { Q3Socket sock; connect( &sock, SIGNAL(error(int)), SLOT(emitConnectionRefused_error(int)) ); - sock.connectToHost( "ares.troll.no", 12331 ); + sock.connectToHost( QtNetworkSettings::serverLocalName(), 12331 ); emitConnectionRefused_errorReceived = false; QTestEventLoop::instance().enterLoop( 30 ); @@ -225,8 +227,8 @@ void tst_Q3Socket::connectionAttempts_data() QTest::addColumn<int>("port"); QTest::addColumn<bool>("expectedResult"); - QTest::newRow("fluke port 80") << QString("qt-test-server.troll.no") << 80 << true; - QTest::newRow("fluke port 79") << QString("qt-test-server.troll.no") << 79 << false; + QTest::newRow("fluke port 80") << QtNetworkSettings::serverLocalName() << 80 << true; + QTest::newRow("fluke port 79") << QtNetworkSettings::serverLocalName() << 79 << false; } void tst_Q3Socket::connectionAttempts() @@ -266,7 +268,7 @@ void tst_Q3Socket::canReadLine() connect(&socket, SIGNAL(connected()), &loop, SLOT(quit())); // timeout error will fail in #238 connect(&socket, SIGNAL(error(int)), &loop, SLOT(quit())); - socket.connectToHost("qt-test-server.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverLocalName(), 143); loop.exec(); diff --git a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp index e4b1a55ecd..e5a9b012cd 100644 --- a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp +++ b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp @@ -548,7 +548,7 @@ void tst_Q3SqlCursor::unicode() else QFAIL( QString( "Strings differ at position %1: orig: %2, db: %3" ).arg( i ).arg( utf8str[ i ].unicode(), 0, 16 ).arg( res[ i ].unicode(), 0, 16 ) ); } - if(db.driverName().startsWith("QMYSQL") || db.driverName().startsWith("QDB2")) + if((db.driverName().startsWith("QMYSQL") || db.driverName().startsWith("QDB2")) && res != utf8str) QEXPECT_FAIL("", "See above message", Continue); QVERIFY( res == utf8str ); } @@ -721,7 +721,9 @@ void tst_Q3SqlCursor::updateNoPK() // Sqlite returns 2, don't ask why. QVERIFY(cur.update() != 0); QString expect = "update " + qTableName("qtestPK") + - " set id = 1 , name = NULL , num = NULL where " + qTableName("qtestPK") + ".id" + " set "+db.driver()->escapeIdentifier("id", QSqlDriver::FieldName)+" = 1 , " + +db.driver()->escapeIdentifier("name", QSqlDriver::FieldName)+" = NULL , " + +db.driver()->escapeIdentifier("num", QSqlDriver::FieldName)+" = NULL where " + qTableName("qtestPK") + ".id" " IS NULL and " + qTableName("qtestPK") + ".name IS NULL and " + qTableName("qtestPK") + ".num IS NULL"; if (!db.driver()->hasFeature(QSqlDriver::PreparedQueries)) { diff --git a/tests/auto/q3urloperator/tst_q3urloperator.cpp b/tests/auto/q3urloperator/tst_q3urloperator.cpp index f1e1059c58..a9e5096318 100644 --- a/tests/auto/q3urloperator/tst_q3urloperator.cpp +++ b/tests/auto/q3urloperator/tst_q3urloperator.cpp @@ -55,6 +55,8 @@ #include <q3valuelist.h> #include <qlist.h> +#include "../network-settings.h" + //TESTED_CLASS= //TESTED_FILES= @@ -150,7 +152,7 @@ void tst_Q3UrlOperator::initTestCase() // prepare: make sure that there is a unique directory for FTP upload // testing (to avoid parallel executed tests interfere with each other) - ftpQtestUpload = "ftp://qt-test-server.troll.no/"; + ftpQtestUpload = QString("ftp://%1/").arg(QtNetworkSettings::serverLocalName()); QString dir = QString( "qtest/upload/%1" ).arg( (ulong)this ); Q3UrlOperator opMkdir( ftpQtestUpload ); @@ -218,8 +220,8 @@ void tst_Q3UrlOperator::cleanup() void tst_Q3UrlOperator::copy_data() { - const QString ftpQtest( "ftp://qt-test-server.troll.no/qtest" ); - const QString httpQtest( "http://qt-test-server.troll.no/qtest" ); + const QString ftpQtest( QString("ftp://%1/qtest").arg(QtNetworkSettings::serverLocalName()) ); + const QString httpQtest( QString("http://%1/qtest").arg(QtNetworkSettings::serverLocalName()) ); // argument for the constructor QTest::addColumn<QString>("url"); @@ -339,8 +341,8 @@ void tst_Q3UrlOperator::slotFinished_copy( Q3NetworkOperation *op ) void tst_Q3UrlOperator::put_data() { - const QString httpQtest( "http://qt-test-server.troll.no/qtest/cgi-bin" ); - const QString httpQtestGet( "http://qt-test-server.troll.no/qtest/cgi-bin/retrieve_testfile.cgi" ); + const QString httpQtest( QString("http://%1/qtest/cgi-bin").arg(QtNetworkSettings::serverLocalName()) ); + const QString httpQtestGet( QString("http://%1/qtest/cgi-bin/retrieve_testfile.cgi").arg(QtNetworkSettings::serverLocalName()) ); QByteArray putData_1( 5 ); putData_1[0] = 'a'; diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp index 5daaffd671..e3380284bd 100644 --- a/tests/auto/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/qbytearray/tst_qbytearray.cpp @@ -240,7 +240,7 @@ void tst_QByteArray::qUncompress() #elif defined Q_OS_SOLARIS QSKIP("Corrupt data causes this tests to lock up on Solaris", SkipAll); #elif defined Q_OS_QNX - QSKIP("Currupt data cuases this test to lock up on QNX", SkipAll); + QSKIP("Corrupt data causes this test to lock up on QNX", SkipAll); #endif QTEST(::qUncompress(in), "out"); diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index 46d78c42df..8ce59a4374 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -138,6 +138,7 @@ private slots: void setters(); void dynamicSortOrder(); + void disabledItems(); // task-specific tests below me void task178797_activatedOnReturn(); @@ -147,7 +148,6 @@ private slots: void task253125_lineEditCompletion_data(); void task253125_lineEditCompletion(); - void task247560_keyboardNavigation(); private: @@ -1109,6 +1109,31 @@ void tst_QCompleter::dynamicSortOrder() QCOMPARE(completer.completionCount(), 12); } +void tst_QCompleter::disabledItems() +{ + QLineEdit lineEdit; + QStandardItemModel *model = new QStandardItemModel(&lineEdit); + QStandardItem *suggestions = new QStandardItem("suggestions"); + suggestions->setEnabled(false); + model->appendRow(suggestions); + model->appendRow(new QStandardItem("suggestions Enabled")); + QCompleter *completer = new QCompleter(model, &lineEdit); + QSignalSpy spy(completer, SIGNAL(activated(const QString &))); + lineEdit.setCompleter(completer); + lineEdit.show(); + + QTest::keyPress(&lineEdit, Qt::Key_S); + QTest::keyPress(&lineEdit, Qt::Key_U); + QAbstractItemView *view = lineEdit.completer()->popup(); + QVERIFY(view->isVisible()); + QTest::mouseClick(view->viewport(), Qt::LeftButton, 0, view->visualRect(view->model()->index(0, 0)).center()); + QCOMPARE(spy.count(), 0); + QVERIFY(view->isVisible()); + QTest::mouseClick(view->viewport(), Qt::LeftButton, 0, view->visualRect(view->model()->index(1, 0)).center()); + QCOMPARE(spy.count(), 1); + QVERIFY(!view->isVisible()); +} + void tst_QCompleter::task178797_activatedOnReturn() { QStringList words; diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp index 771b0c60d3..60bb1775b3 100644 --- a/tests/auto/qdir/tst_qdir.cpp +++ b/tests/auto/qdir/tst_qdir.cpp @@ -56,6 +56,10 @@ # define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/" #endif +#if defined(Q_OS_VXWORKS) +#define Q_NO_SYMLINKS +#endif + //TESTED_CLASS= //TESTED_FILES= @@ -374,6 +378,20 @@ void tst_QDir::compare() QVERIFY(dir == QDir::currentPath()); } +static QStringList filterLinks(const QStringList &list) +{ +#ifndef Q_NO_SYMLINKS + return list; +#else + QStringList result; + foreach (QString str, list) { + if (!str.endsWith(QLatin1String(".lnk"))) + result.append(str); + } + return result; +#endif +} + void tst_QDir::entryList_data() { QTest::addColumn<QString>("dirName"); // relative from current path or abs @@ -415,94 +433,95 @@ void tst_QDir::entryList_data() QTest::newRow("nofilter") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::NoFilter) << int(QDir::Name) - << QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(','); + << filterLinks(QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::AllEntries") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllEntries) << int(QDir::Name) - << QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(','); + << filterLinks(QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::Files") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::Files) << int(QDir::Name) - << QString("file,linktofile.lnk,writable").split(','); + << filterLinks(QString("file,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::Dirs") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::Dirs) << int(QDir::Name) - << QString(".,..,directory,linktodirectory.lnk").split(','); + << filterLinks(QString(".,..,directory,linktodirectory.lnk").split(',')); QTest::newRow("QDir::Dirs | QDir::NoDotAndDotDot") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::Dirs | QDir::NoDotAndDotDot) << int(QDir::Name) - << QString("directory,linktodirectory.lnk").split(','); + << filterLinks(QString("directory,linktodirectory.lnk").split(',')); QTest::newRow("QDir::AllDirs") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllDirs) << int(QDir::Name) - << QString(".,..,directory,linktodirectory.lnk").split(','); + << filterLinks(QString(".,..,directory,linktodirectory.lnk").split(',')); QTest::newRow("QDir::AllDirs | QDir::Dirs") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllDirs | QDir::Dirs) << int(QDir::Name) - << QString(".,..,directory,linktodirectory.lnk").split(','); + << filterLinks(QString(".,..,directory,linktodirectory.lnk").split(',')); QTest::newRow("QDir::AllDirs | QDir::Files") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllDirs | QDir::Files) << int(QDir::Name) - << QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(','); + << filterLinks(QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::AllEntries | QDir::NoSymLinks") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllEntries | QDir::NoSymLinks) << int(QDir::Name) - << QString(".,..,directory,file,writable").split(','); + << filterLinks(QString(".,..,directory,file,writable").split(',')); QTest::newRow("QDir::AllEntries | QDir::NoSymLinks | QDir::NoDotAndDotDot") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllEntries | QDir::NoSymLinks | QDir::NoDotAndDotDot) << int(QDir::Name) - << QString("directory,file,writable").split(','); + << filterLinks(QString("directory,file,writable").split(',')); QTest::newRow("QDir::Files | QDir::NoSymLinks") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::Files | QDir::NoSymLinks) << int(QDir::Name) - << QString("file,writable").split(','); + << filterLinks(QString("file,writable").split(',')); QTest::newRow("QDir::Dirs | QDir::NoSymLinks") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::Dirs | QDir::NoSymLinks) << int(QDir::Name) - << QString(".,..,directory").split(','); + << filterLinks(QString(".,..,directory").split(',')); QTest::newRow("QDir::Drives | QDir::Files | QDir::NoDotAndDotDot") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::Drives | QDir::Files | QDir::NoDotAndDotDot) << int(QDir::Name) - << QString("file,linktofile.lnk,writable").split(','); + << filterLinks(QString("file,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::System") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::System) << int(QDir::Name) - << QStringList("brokenlink.lnk"); + << filterLinks(QStringList("brokenlink.lnk")); QTest::newRow("QDir::Hidden") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::Hidden) << int(QDir::Name) << QStringList(); QTest::newRow("QDir::System | QDir::Hidden") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::System | QDir::Hidden) << int(QDir::Name) - << QStringList("brokenlink.lnk"); + << filterLinks(QStringList("brokenlink.lnk")); QTest::newRow("QDir::AllDirs | QDir::NoSymLinks") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllDirs | QDir::NoSymLinks) << int(QDir::Name) - << QString(".,..,directory").split(','); + << filterLinks(QString(".,..,directory").split(',')); #ifdef QT3_SUPPORT QTest::newRow("QDir::All | QDir::Hidden | QDir::System") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::All | QDir::Hidden | QDir::System) << int(QDir::Name) - << QString(".,..,brokenlink.lnk,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(','); + << filterLinks(QString(".,..,brokenlink.lnk,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::All | QDir::Readable") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::All | QDir::Readable) << int(QDir::Name) - << QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(','); + << filterLinks(QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::All | QDir::Writable") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::All | QDir::Writable) << int(QDir::Name) - << QString(".,..,directory,linktodirectory.lnk,writable").split(','); + << filterLinks(QString(".,..,directory,linktodirectory.lnk,writable").split(',')); #else QTest::newRow("QDir::AllEntries | QDir::Hidden | QDir::System") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllEntries | QDir::Hidden | QDir::System) << int(QDir::Name) - << QString(".,..,brokenlink.lnk,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(','); + << filterLinks(QString(".,..,brokenlink.lnk,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::AllEntries | QDir::Readable") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllEntries | QDir::Readable) << int(QDir::Name) - << QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(','); + << filterLinks(QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); QTest::newRow("QDir::AllEntries | QDir::Writable") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::AllEntries | QDir::Writable) << int(QDir::Name) - << QString(".,..,directory,linktodirectory.lnk,writable").split(','); + << filterLinks(QString(".,..,directory,linktodirectory.lnk,writable").split(',')); #endif QTest::newRow("Namefilters b*") << SRCDIR "entrylist/" << QStringList("d*") << int(QDir::NoFilter) << int(QDir::Name) - << QString("directory").split(','); + << filterLinks(QString("directory").split(',')); QTest::newRow("Namefilters f*") << SRCDIR "entrylist/" << QStringList("f*") << int(QDir::NoFilter) << int(QDir::Name) - << QString("file").split(','); + << filterLinks(QString("file").split(',')); QTest::newRow("Namefilters link*") << SRCDIR "entrylist/" << QStringList("link*") << int(QDir::NoFilter) << int(QDir::Name) - << QString("linktodirectory.lnk,linktofile.lnk").split(','); + << filterLinks(QString("linktodirectory.lnk,linktofile.lnk").split(',')); QTest::newRow("Namefilters *to*") << SRCDIR "entrylist/" << QStringList("*to*") << int(QDir::NoFilter) << int(QDir::Name) - << QString("directory,linktodirectory.lnk,linktofile.lnk").split(','); + << filterLinks(QString("directory,linktodirectory.lnk,linktofile.lnk").split(',')); QTest::newRow("Sorting QDir::Name") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::NoFilter) << int(QDir::Name) - << QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(','); + << filterLinks(QString(".,..,directory,file,linktodirectory.lnk,linktofile.lnk,writable").split(',')); QTest::newRow("Sorting QDir::Name | QDir::Reversed") << SRCDIR "entrylist/" << QStringList("*") << int(QDir::NoFilter) << int(QDir::Name | QDir::Reversed) - << QString("writable,linktofile.lnk,linktodirectory.lnk,file,directory,..,.").split(','); + << filterLinks(QString("writable,linktofile.lnk,linktodirectory.lnk,file,directory,..,.").split(',')); + QTest::newRow("Sorting QDir::Type") << SRCDIR "types/" << QStringList("*") << int(QDir::NoFilter) << int(QDir::Type) << QString(".,..,a,b,c,d,e,f,a.a,b.a,c.a,d.a,e.a,f.a,a.b,b.b,c.b,d.b,e.b,f.b,a.c,b.c,c.c,d.c,e.c,f.c").split(','); @@ -687,6 +706,7 @@ void tst_QDir::entryListSimple() void tst_QDir::entryListWithSymLinks() { +#ifndef Q_NO_SYMLINKS QFile::remove("myLinkToDir.lnk"); QFile::remove("myLinkToFile.lnk"); QFile::remove("testfile.cpp"); @@ -728,6 +748,7 @@ void tst_QDir::entryListWithSymLinks() QFile::remove("myLinkToFile.lnk"); QFile::remove("testfile.cpp"); dir.rmdir("myDir"); +#endif } void tst_QDir::canonicalPath_data() diff --git a/tests/auto/qdiriterator/tst_qdiriterator.cpp b/tests/auto/qdiriterator/tst_qdiriterator.cpp index c821623c3e..5708b50a49 100644 --- a/tests/auto/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/qdiriterator/tst_qdiriterator.cpp @@ -48,6 +48,10 @@ #include <qfileinfo.h> #include <qstringlist.h> +#if defined(Q_OS_VXWORKS) +#define Q_NO_SYMLINKS +#endif + Q_DECLARE_METATYPE(QDirIterator::IteratorFlags) Q_DECLARE_METATYPE(QDir::Filters) @@ -87,7 +91,8 @@ tst_QDirIterator::tst_QDirIterator() QFile::remove("entrylist/directory/entrylist3.lnk"); QFile::remove("entrylist/directory/entrylist4.lnk"); -#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#ifndef Q_NO_SYMLINKS +#ifdef Q_OS_WIN || defined(Q_OS_SYMBIAN) // ### Sadly, this is a platform difference right now. QFile::link("entrylist/file", "entrylist/linktofile.lnk"); QFile::link("entrylist/directory", "entrylist/linktodirectory.lnk"); @@ -97,6 +102,7 @@ tst_QDirIterator::tst_QDirIterator() QFile::link("directory", "entrylist/linktodirectory.lnk"); QFile::link("nothing", "entrylist/brokenlink.lnk"); #endif +#endif QFile("entrylist/writable").open(QIODevice::ReadWrite); } @@ -135,9 +141,13 @@ void tst_QDirIterator::iterateRelativeDirectory_data() "entrylist/..," #endif "entrylist/file," +#ifndef Q_NO_SYMLINKS "entrylist/linktofile.lnk," +#endif "entrylist/directory," +#ifndef Q_NO_SYMLINKS "entrylist/linktodirectory.lnk," +#endif "entrylist/writable").split(','); QTest::newRow("QDir::Subdirectories | QDir::FollowSymlinks") @@ -151,10 +161,14 @@ void tst_QDirIterator::iterateRelativeDirectory_data() "entrylist/directory/..," #endif "entrylist/file," +#ifndef Q_NO_SYMLINKS "entrylist/linktofile.lnk," +#endif "entrylist/directory," "entrylist/directory/dummy," +#ifndef Q_NO_SYMLINKS "entrylist/linktodirectory.lnk," +#endif "entrylist/writable").split(','); QTest::newRow("QDir::Subdirectories / QDir::Files") @@ -162,14 +176,18 @@ void tst_QDirIterator::iterateRelativeDirectory_data() << QDir::Filters(QDir::Files) << QStringList("*") << QString("entrylist/directory/dummy," "entrylist/file," +#ifndef Q_NO_SYMLINKS "entrylist/linktofile.lnk," +#endif "entrylist/writable").split(','); QTest::newRow("QDir::Subdirectories | QDir::FollowSymlinks / QDir::Files") << QString("entrylist") << QDirIterator::IteratorFlags(QDirIterator::Subdirectories | QDirIterator::FollowSymlinks) << QDir::Filters(QDir::Files) << QStringList("*") << QString("entrylist/file," +#ifndef Q_NO_SYMLINKS "entrylist/linktofile.lnk," +#endif "entrylist/directory/dummy," "entrylist/writable").split(','); } diff --git a/tests/auto/qdom/qdom.pro b/tests/auto/qdom/qdom.pro index 9a9bcbbea7..84b721e454 100644 --- a/tests/auto/qdom/qdom.pro +++ b/tests/auto/qdom/qdom.pro @@ -10,6 +10,10 @@ wince*|symbian*: { DEPLOYMENT += addFiles DEPLOYMENT_PLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs + DEFINES += SRCDIR=\\\"\\\" +} +else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" } symbian: TARGET.EPOCHEAPSIZE="0x100000 0x1000000" diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp index cea0bfb047..5b4787fe8c 100644 --- a/tests/auto/qdom/tst_qdom.cpp +++ b/tests/auto/qdom/tst_qdom.cpp @@ -290,17 +290,17 @@ void tst_QDom::toString_01_data() { QTest::addColumn<QString>("fileName"); - QTest::newRow( "01" ) << QString("testdata/toString_01/doc01.xml"); - QTest::newRow( "02" ) << QString("testdata/toString_01/doc02.xml"); - QTest::newRow( "03" ) << QString("testdata/toString_01/doc03.xml"); - QTest::newRow( "04" ) << QString("testdata/toString_01/doc04.xml"); - QTest::newRow( "05" ) << QString("testdata/toString_01/doc05.xml"); + QTest::newRow( "01" ) << QString(SRCDIR "testdata/toString_01/doc01.xml"); + QTest::newRow( "02" ) << QString(SRCDIR "testdata/toString_01/doc02.xml"); + QTest::newRow( "03" ) << QString(SRCDIR "testdata/toString_01/doc03.xml"); + QTest::newRow( "04" ) << QString(SRCDIR "testdata/toString_01/doc04.xml"); + QTest::newRow( "05" ) << QString(SRCDIR "testdata/toString_01/doc05.xml"); - QTest::newRow( "euc-jp" ) << QString("testdata/toString_01/doc_euc-jp.xml"); - QTest::newRow( "iso-2022-jp" ) << QString("testdata/toString_01/doc_iso-2022-jp.xml"); - QTest::newRow( "little-endian" ) << QString("testdata/toString_01/doc_little-endian.xml"); - QTest::newRow( "utf-16" ) << QString("testdata/toString_01/doc_utf-16.xml"); - QTest::newRow( "utf-8" ) << QString("testdata/toString_01/doc_utf-8.xml"); + QTest::newRow( "euc-jp" ) << QString(SRCDIR "testdata/toString_01/doc_euc-jp.xml"); + QTest::newRow( "iso-2022-jp" ) << QString(SRCDIR "testdata/toString_01/doc_iso-2022-jp.xml"); + QTest::newRow( "little-endian" ) << QString(SRCDIR "testdata/toString_01/doc_little-endian.xml"); + QTest::newRow( "utf-16" ) << QString(SRCDIR "testdata/toString_01/doc_utf-16.xml"); + QTest::newRow( "utf-8" ) << QString(SRCDIR "testdata/toString_01/doc_utf-8.xml"); } @@ -474,7 +474,7 @@ void tst_QDom::initTestCase() QSKIP("Our current test machine, arsia, is too slow for this auto test.", SkipAll); #endif - QFile file("testdata/excludedCodecs.txt"); + QFile file(SRCDIR "testdata/excludedCodecs.txt"); QVERIFY(file.open(QIODevice::ReadOnly|QIODevice::Text)); QByteArray codecName; @@ -550,18 +550,18 @@ void tst_QDom::saveWithSerialization_data() const { QTest::addColumn<QString>("fileName"); - QTest::newRow("doc01.xml") << QString("testdata/toString_01/doc01.xml"); - QTest::newRow("doc01.xml") << QString("testdata/toString_01/doc01.xml"); - QTest::newRow("doc02.xml") << QString("testdata/toString_01/doc02.xml"); - QTest::newRow("doc03.xml") << QString("testdata/toString_01/doc03.xml"); - QTest::newRow("doc04.xml") << QString("testdata/toString_01/doc04.xml"); - QTest::newRow("doc05.xml") << QString("testdata/toString_01/doc05.xml"); + QTest::newRow("doc01.xml") << QString(SRCDIR "testdata/toString_01/doc01.xml"); + QTest::newRow("doc01.xml") << QString(SRCDIR "testdata/toString_01/doc01.xml"); + QTest::newRow("doc02.xml") << QString(SRCDIR "testdata/toString_01/doc02.xml"); + QTest::newRow("doc03.xml") << QString(SRCDIR "testdata/toString_01/doc03.xml"); + QTest::newRow("doc04.xml") << QString(SRCDIR "testdata/toString_01/doc04.xml"); + QTest::newRow("doc05.xml") << QString(SRCDIR "testdata/toString_01/doc05.xml"); - QTest::newRow("doc_euc-jp.xml") << QString("testdata/toString_01/doc_euc-jp.xml"); - QTest::newRow("doc_iso-2022-jp.xml") << QString("testdata/toString_01/doc_iso-2022-jp.xml"); - QTest::newRow("doc_little-endian.xml") << QString("testdata/toString_01/doc_little-endian.xml"); - QTest::newRow("doc_utf-16.xml") << QString("testdata/toString_01/doc_utf-16.xml"); - QTest::newRow("doc_utf-8.xml") << QString("testdata/toString_01/doc_utf-8.xml"); + QTest::newRow("doc_euc-jp.xml") << QString(SRCDIR "testdata/toString_01/doc_euc-jp.xml"); + QTest::newRow("doc_iso-2022-jp.xml") << QString(SRCDIR "testdata/toString_01/doc_iso-2022-jp.xml"); + QTest::newRow("doc_little-endian.xml") << QString(SRCDIR "testdata/toString_01/doc_little-endian.xml"); + QTest::newRow("doc_utf-16.xml") << QString(SRCDIR "testdata/toString_01/doc_utf-16.xml"); + QTest::newRow("doc_utf-8.xml") << QString(SRCDIR "testdata/toString_01/doc_utf-8.xml"); } void tst_QDom::cloneNode_data() @@ -1386,7 +1386,7 @@ void tst_QDom::roundTripAttributes() const doc.save(stream, 0); stream.flush(); - const QByteArray expected("<localName xmlns=\"\" attr=\" 
	 \" />\n"); + const QByteArray expected("<localName xmlns=\"\" attr=\" 
	 \"/>\n"); QCOMPARE(QString::fromLatin1(serialized.constData()), QString::fromLatin1(expected.constData())); } @@ -1671,7 +1671,7 @@ void tst_QDom::appendDocumentNode() const doc.appendChild(elem); Q_ASSERT(!xml.isNull()); - const QString expected(QLatin1String("<document>\n<test_elem name=\"value\" />\n</document>\n")); + const QString expected(QLatin1String("<document>\n<test_elem name=\"value\"/>\n</document>\n")); elem.appendChild(xml); QCOMPARE(doc.childNodes().count(), 1); @@ -1780,7 +1780,7 @@ void tst_QDom::doubleNamespaceDeclarations() const { QDomDocument doc; - QFile file("doubleNamespaces.xml" ); + QFile file(SRCDIR "doubleNamespaces.xml" ); QVERIFY(file.open(QIODevice::ReadOnly)); QXmlSimpleReader reader; @@ -1788,8 +1788,8 @@ void tst_QDom::doubleNamespaceDeclarations() const QXmlInputSource source(&file); QVERIFY(doc.setContent(&source, &reader)); - QVERIFY(doc.toString(0) == QString::fromLatin1("<a>\n<b p:c=\"\" xmlns:p=\"NS\" p:d=\"\" />\n</a>\n") || - doc.toString(0) == QString::fromLatin1("<a>\n<b p:c=\"\" p:d=\"\" xmlns:p=\"NS\" />\n</a>\n")); + QVERIFY(doc.toString(0) == QString::fromLatin1("<a>\n<b p:c=\"\" xmlns:p=\"NS\" p:d=\"\"/>\n</a>\n") || + doc.toString(0) == QString::fromLatin1("<a>\n<b p:c=\"\" p:d=\"\" xmlns:p=\"NS\"/>\n</a>\n")); } void tst_QDom::setContentQXmlReaderOverload() const diff --git a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro index e9d7272305..8701318528 100644 --- a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro +++ b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro @@ -3,6 +3,8 @@ CONFIG += qttest_p4 include(../../src/qfiledialog.pri) include(../../../../modeltest/modeltest.pri) +QT = core gui + SOURCES += tst_qfilesystemmodel.cpp TARGET = tst_qfilesystemmodel diff --git a/tests/auto/qformlayout/tst_qformlayout.cpp b/tests/auto/qformlayout/tst_qformlayout.cpp index 74384a9757..9806557c99 100644 --- a/tests/auto/qformlayout/tst_qformlayout.cpp +++ b/tests/auto/qformlayout/tst_qformlayout.cpp @@ -125,7 +125,6 @@ private slots: Qt::Orientations expandingDirections() const; */ - void fieldMinimumSize(); }; tst_QFormLayout::tst_QFormLayout() @@ -906,35 +905,6 @@ void tst_QFormLayout::layoutAlone() QTest::qWait(500); } - -void tst_QFormLayout::fieldMinimumSize() -{ - //check that the field with is bigger than its minimumSizeHint for any size of the widget - // even if the label with is not fixed - QWidget w; - QFormLayout layout; - layout.setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - w.setLayout(&layout); - QLabel label1("Here is a strange test case"); - label1.setWordWrap(true); - QLabel label2("Here is another label"); - label2.setWordWrap(true); - QLabel shortLabel("short"); - QLabel longLabel("Quite long label"); - layout.addRow(&label1, &shortLabel); - layout.addRow(&label2, &longLabel); - w.show(); - int width = w.size().width() + 9; - - do { - w.resize(width, w.size().height()); - layout.activate(); - QVERIFY(shortLabel.size().width() >= shortLabel.minimumSizeHint().width()); - QVERIFY(longLabel.size().width() >= longLabel.minimumSizeHint().width()); - width -= 3; - } while(width >= w.minimumSizeHint().width()); -} - QTEST_MAIN(tst_QFormLayout) #include "tst_qformlayout.moc" diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index 96f5ddd297..31c4a3cb79 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -45,6 +45,7 @@ #include <qcoreapplication.h> #include <qdebug.h> #include <qgl.h> +#include <qglcolormap.h> #include <QGraphicsView> #include <QGraphicsProxyWidget> @@ -66,6 +67,7 @@ private slots: void graphicsViewClipping(); void partialGLWidgetUpdates_data(); void partialGLWidgetUpdates(); + void colormap(); }; tst_QGL::tst_QGL() @@ -94,6 +96,11 @@ public: void setAutoBufferSwap(bool on) { QGLWidget::setAutoBufferSwap(on); } }; +// Using INT_MIN and INT_MAX will cause failures on systems +// where "int" is 64-bit, so use the explicit values instead. +#define TEST_INT_MIN (-2147483647 - 1) +#define TEST_INT_MAX 2147483647 + // Testing get/set functions void tst_QGL::getSetCheck() { @@ -103,120 +110,286 @@ void tst_QGL::getSetCheck() QGLFormat obj1; // int QGLFormat::depthBufferSize() // void QGLFormat::setDepthBufferSize(int) + QCOMPARE(-1, obj1.depthBufferSize()); obj1.setDepthBufferSize(0); QCOMPARE(0, obj1.depthBufferSize()); - obj1.setDepthBufferSize(INT_MIN); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setDepthBufferSize: Cannot set negative depth buffer size -2147483648"); + obj1.setDepthBufferSize(TEST_INT_MIN); QCOMPARE(0, obj1.depthBufferSize()); // Makes no sense with a negative buffer size - obj1.setDepthBufferSize(INT_MAX); - QCOMPARE(INT_MAX, obj1.depthBufferSize()); + obj1.setDepthBufferSize(3); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setDepthBufferSize: Cannot set negative depth buffer size -1"); + obj1.setDepthBufferSize(-1); + QCOMPARE(3, obj1.depthBufferSize()); + obj1.setDepthBufferSize(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.depthBufferSize()); // int QGLFormat::accumBufferSize() // void QGLFormat::setAccumBufferSize(int) + QCOMPARE(-1, obj1.accumBufferSize()); obj1.setAccumBufferSize(0); QCOMPARE(0, obj1.accumBufferSize()); - obj1.setAccumBufferSize(INT_MIN); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAccumBufferSize: Cannot set negative accumulate buffer size -2147483648"); + obj1.setAccumBufferSize(TEST_INT_MIN); QCOMPARE(0, obj1.accumBufferSize()); // Makes no sense with a negative buffer size - obj1.setAccumBufferSize(INT_MAX); - QCOMPARE(INT_MAX, obj1.accumBufferSize()); + obj1.setAccumBufferSize(3); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAccumBufferSize: Cannot set negative accumulate buffer size -1"); + obj1.setAccumBufferSize(-1); + QCOMPARE(3, obj1.accumBufferSize()); + obj1.setAccumBufferSize(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.accumBufferSize()); + + // int QGLFormat::redBufferSize() + // void QGLFormat::setRedBufferSize(int) + QCOMPARE(-1, obj1.redBufferSize()); + obj1.setRedBufferSize(0); + QCOMPARE(0, obj1.redBufferSize()); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setRedBufferSize: Cannot set negative red buffer size -2147483648"); + obj1.setRedBufferSize(TEST_INT_MIN); + QCOMPARE(0, obj1.redBufferSize()); // Makes no sense with a negative buffer size + obj1.setRedBufferSize(3); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setRedBufferSize: Cannot set negative red buffer size -1"); + obj1.setRedBufferSize(-1); + QCOMPARE(3, obj1.redBufferSize()); + obj1.setRedBufferSize(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.redBufferSize()); + + // int QGLFormat::greenBufferSize() + // void QGLFormat::setGreenBufferSize(int) + QCOMPARE(-1, obj1.greenBufferSize()); + obj1.setGreenBufferSize(0); + QCOMPARE(0, obj1.greenBufferSize()); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setGreenBufferSize: Cannot set negative green buffer size -2147483648"); + obj1.setGreenBufferSize(TEST_INT_MIN); + QCOMPARE(0, obj1.greenBufferSize()); // Makes no sense with a negative buffer size + obj1.setGreenBufferSize(3); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setGreenBufferSize: Cannot set negative green buffer size -1"); + obj1.setGreenBufferSize(-1); + QCOMPARE(3, obj1.greenBufferSize()); + obj1.setGreenBufferSize(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.greenBufferSize()); + + // int QGLFormat::blueBufferSize() + // void QGLFormat::setBlueBufferSize(int) + QCOMPARE(-1, obj1.blueBufferSize()); + obj1.setBlueBufferSize(0); + QCOMPARE(0, obj1.blueBufferSize()); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setBlueBufferSize: Cannot set negative blue buffer size -2147483648"); + obj1.setBlueBufferSize(TEST_INT_MIN); + QCOMPARE(0, obj1.blueBufferSize()); // Makes no sense with a negative buffer size + obj1.setBlueBufferSize(3); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setBlueBufferSize: Cannot set negative blue buffer size -1"); + obj1.setBlueBufferSize(-1); + QCOMPARE(3, obj1.blueBufferSize()); + obj1.setBlueBufferSize(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.blueBufferSize()); // int QGLFormat::alphaBufferSize() // void QGLFormat::setAlphaBufferSize(int) + QCOMPARE(-1, obj1.alphaBufferSize()); + QCOMPARE(false, obj1.alpha()); + QVERIFY(!obj1.testOption(QGL::AlphaChannel)); + QVERIFY(obj1.testOption(QGL::NoAlphaChannel)); obj1.setAlphaBufferSize(0); + QCOMPARE(true, obj1.alpha()); // setAlphaBufferSize() enables alpha. QCOMPARE(0, obj1.alphaBufferSize()); - obj1.setAlphaBufferSize(INT_MIN); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size -2147483648"); + obj1.setAlphaBufferSize(TEST_INT_MIN); QCOMPARE(0, obj1.alphaBufferSize()); // Makes no sense with a negative buffer size - obj1.setAlphaBufferSize(INT_MAX); - QCOMPARE(INT_MAX, obj1.alphaBufferSize()); + obj1.setAlphaBufferSize(3); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size -1"); + obj1.setAlphaBufferSize(-1); + QCOMPARE(3, obj1.alphaBufferSize()); + obj1.setAlphaBufferSize(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.alphaBufferSize()); // int QGLFormat::stencilBufferSize() // void QGLFormat::setStencilBufferSize(int) + QCOMPARE(-1, obj1.stencilBufferSize()); obj1.setStencilBufferSize(0); QCOMPARE(0, obj1.stencilBufferSize()); - obj1.setStencilBufferSize(INT_MIN); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size -2147483648"); + obj1.setStencilBufferSize(TEST_INT_MIN); QCOMPARE(0, obj1.stencilBufferSize()); // Makes no sense with a negative buffer size - obj1.setStencilBufferSize(INT_MAX); - QCOMPARE(INT_MAX, obj1.stencilBufferSize()); + obj1.setStencilBufferSize(3); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size -1"); + obj1.setStencilBufferSize(-1); + QCOMPARE(3, obj1.stencilBufferSize()); + obj1.setStencilBufferSize(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.stencilBufferSize()); // bool QGLFormat::sampleBuffers() // void QGLFormat::setSampleBuffers(bool) + QCOMPARE(false, obj1.sampleBuffers()); + QVERIFY(!obj1.testOption(QGL::SampleBuffers)); + QVERIFY(obj1.testOption(QGL::NoSampleBuffers)); obj1.setSampleBuffers(false); QCOMPARE(false, obj1.sampleBuffers()); + QVERIFY(obj1.testOption(QGL::NoSampleBuffers)); obj1.setSampleBuffers(true); QCOMPARE(true, obj1.sampleBuffers()); + QVERIFY(obj1.testOption(QGL::SampleBuffers)); // int QGLFormat::samples() // void QGLFormat::setSamples(int) + QCOMPARE(-1, obj1.samples()); obj1.setSamples(0); QCOMPARE(0, obj1.samples()); - obj1.setSamples(INT_MIN); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setSamples: Cannot have negative number of samples per pixel -2147483648"); + obj1.setSamples(TEST_INT_MIN); QCOMPARE(0, obj1.samples()); // Makes no sense with a negative sample size - obj1.setSamples(INT_MAX); - QCOMPARE(INT_MAX, obj1.samples()); + obj1.setSamples(3); + QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setSamples: Cannot have negative number of samples per pixel -1"); + obj1.setSamples(-1); + QCOMPARE(3, obj1.samples()); + obj1.setSamples(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.samples()); + + // int QGLFormat::swapInterval() + // void QGLFormat::setSwapInterval(int) + QCOMPARE(-1, obj1.swapInterval()); + obj1.setSwapInterval(0); + QCOMPARE(0, obj1.swapInterval()); + obj1.setSwapInterval(TEST_INT_MIN); + QCOMPARE(TEST_INT_MIN, obj1.swapInterval()); + obj1.setSwapInterval(-1); + QCOMPARE(-1, obj1.swapInterval()); + obj1.setSwapInterval(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.swapInterval()); // bool QGLFormat::doubleBuffer() // void QGLFormat::setDoubleBuffer(bool) + QCOMPARE(true, obj1.doubleBuffer()); + QVERIFY(obj1.testOption(QGL::DoubleBuffer)); + QVERIFY(!obj1.testOption(QGL::SingleBuffer)); obj1.setDoubleBuffer(false); QCOMPARE(false, obj1.doubleBuffer()); + QVERIFY(!obj1.testOption(QGL::DoubleBuffer)); + QVERIFY(obj1.testOption(QGL::SingleBuffer)); obj1.setDoubleBuffer(true); QCOMPARE(true, obj1.doubleBuffer()); + QVERIFY(obj1.testOption(QGL::DoubleBuffer)); + QVERIFY(!obj1.testOption(QGL::SingleBuffer)); // bool QGLFormat::depth() // void QGLFormat::setDepth(bool) + QCOMPARE(true, obj1.depth()); + QVERIFY(obj1.testOption(QGL::DepthBuffer)); + QVERIFY(!obj1.testOption(QGL::NoDepthBuffer)); obj1.setDepth(false); QCOMPARE(false, obj1.depth()); + QVERIFY(!obj1.testOption(QGL::DepthBuffer)); + QVERIFY(obj1.testOption(QGL::NoDepthBuffer)); obj1.setDepth(true); QCOMPARE(true, obj1.depth()); + QVERIFY(obj1.testOption(QGL::DepthBuffer)); + QVERIFY(!obj1.testOption(QGL::NoDepthBuffer)); // bool QGLFormat::rgba() // void QGLFormat::setRgba(bool) + QCOMPARE(true, obj1.rgba()); + QVERIFY(obj1.testOption(QGL::Rgba)); + QVERIFY(!obj1.testOption(QGL::ColorIndex)); obj1.setRgba(false); QCOMPARE(false, obj1.rgba()); + QVERIFY(!obj1.testOption(QGL::Rgba)); + QVERIFY(obj1.testOption(QGL::ColorIndex)); obj1.setRgba(true); QCOMPARE(true, obj1.rgba()); + QVERIFY(obj1.testOption(QGL::Rgba)); + QVERIFY(!obj1.testOption(QGL::ColorIndex)); // bool QGLFormat::alpha() // void QGLFormat::setAlpha(bool) + QVERIFY(obj1.testOption(QGL::AlphaChannel)); + QVERIFY(!obj1.testOption(QGL::NoAlphaChannel)); obj1.setAlpha(false); QCOMPARE(false, obj1.alpha()); + QVERIFY(!obj1.testOption(QGL::AlphaChannel)); + QVERIFY(obj1.testOption(QGL::NoAlphaChannel)); obj1.setAlpha(true); QCOMPARE(true, obj1.alpha()); + QVERIFY(obj1.testOption(QGL::AlphaChannel)); + QVERIFY(!obj1.testOption(QGL::NoAlphaChannel)); // bool QGLFormat::accum() // void QGLFormat::setAccum(bool) + QCOMPARE(false, obj1.accum()); + QVERIFY(!obj1.testOption(QGL::AccumBuffer)); + QVERIFY(obj1.testOption(QGL::NoAccumBuffer)); obj1.setAccum(false); QCOMPARE(false, obj1.accum()); + QVERIFY(!obj1.testOption(QGL::AccumBuffer)); + QVERIFY(obj1.testOption(QGL::NoAccumBuffer)); obj1.setAccum(true); QCOMPARE(true, obj1.accum()); + QVERIFY(obj1.testOption(QGL::AccumBuffer)); + QVERIFY(!obj1.testOption(QGL::NoAccumBuffer)); // bool QGLFormat::stencil() // void QGLFormat::setStencil(bool) + QCOMPARE(true, obj1.stencil()); + QVERIFY(obj1.testOption(QGL::StencilBuffer)); + QVERIFY(!obj1.testOption(QGL::NoStencilBuffer)); obj1.setStencil(false); QCOMPARE(false, obj1.stencil()); + QVERIFY(!obj1.testOption(QGL::StencilBuffer)); + QVERIFY(obj1.testOption(QGL::NoStencilBuffer)); obj1.setStencil(true); QCOMPARE(true, obj1.stencil()); + QVERIFY(obj1.testOption(QGL::StencilBuffer)); + QVERIFY(!obj1.testOption(QGL::NoStencilBuffer)); // bool QGLFormat::stereo() // void QGLFormat::setStereo(bool) + QCOMPARE(false, obj1.stereo()); + QVERIFY(!obj1.testOption(QGL::StereoBuffers)); + QVERIFY(obj1.testOption(QGL::NoStereoBuffers)); obj1.setStereo(false); QCOMPARE(false, obj1.stereo()); + QVERIFY(!obj1.testOption(QGL::StereoBuffers)); + QVERIFY(obj1.testOption(QGL::NoStereoBuffers)); obj1.setStereo(true); QCOMPARE(true, obj1.stereo()); + QVERIFY(obj1.testOption(QGL::StereoBuffers)); + QVERIFY(!obj1.testOption(QGL::NoStereoBuffers)); // bool QGLFormat::directRendering() // void QGLFormat::setDirectRendering(bool) + QCOMPARE(true, obj1.directRendering()); + QVERIFY(obj1.testOption(QGL::DirectRendering)); + QVERIFY(!obj1.testOption(QGL::IndirectRendering)); obj1.setDirectRendering(false); QCOMPARE(false, obj1.directRendering()); + QVERIFY(!obj1.testOption(QGL::DirectRendering)); + QVERIFY(obj1.testOption(QGL::IndirectRendering)); obj1.setDirectRendering(true); QCOMPARE(true, obj1.directRendering()); + QVERIFY(obj1.testOption(QGL::DirectRendering)); + QVERIFY(!obj1.testOption(QGL::IndirectRendering)); + + // bool QGLFormat::overlay() + // void QGLFormat::setOverlay(bool) + QCOMPARE(false, obj1.hasOverlay()); + QVERIFY(!obj1.testOption(QGL::HasOverlay)); + QVERIFY(obj1.testOption(QGL::NoOverlay)); + obj1.setOverlay(false); + QCOMPARE(false, obj1.hasOverlay()); + QVERIFY(!obj1.testOption(QGL::HasOverlay)); + QVERIFY(obj1.testOption(QGL::NoOverlay)); + obj1.setOverlay(true); + QCOMPARE(true, obj1.hasOverlay()); + QVERIFY(obj1.testOption(QGL::HasOverlay)); + QVERIFY(!obj1.testOption(QGL::NoOverlay)); // int QGLFormat::plane() // void QGLFormat::setPlane(int) + QCOMPARE(0, obj1.plane()); obj1.setPlane(0); QCOMPARE(0, obj1.plane()); - obj1.setPlane(INT_MIN); - QCOMPARE(INT_MIN, obj1.plane()); - obj1.setPlane(INT_MAX); - QCOMPARE(INT_MAX, obj1.plane()); + obj1.setPlane(TEST_INT_MIN); + QCOMPARE(TEST_INT_MIN, obj1.plane()); + obj1.setPlane(TEST_INT_MAX); + QCOMPARE(TEST_INT_MAX, obj1.plane()); MyGLContext obj2(obj1); // bool QGLContext::windowCreated() @@ -452,5 +625,124 @@ void tst_QGL::partialGLWidgetUpdates() QCOMPARE(widget.paintEventRegion, QRegion(widget.rect())); } +class ColormapExtended : public QGLColormap +{ +public: + ColormapExtended() {} + + Qt::HANDLE handle() { return QGLColormap::handle(); } + void setHandle(Qt::HANDLE handle) { QGLColormap::setHandle(handle); } +}; + +void tst_QGL::colormap() +{ + // Check the properties of the default empty colormap. + QGLColormap cmap1; + QVERIFY(cmap1.isEmpty()); + QCOMPARE(cmap1.size(), 0); + QVERIFY(cmap1.entryRgb(0) == 0); + QVERIFY(cmap1.entryRgb(-1) == 0); + QVERIFY(cmap1.entryRgb(100) == 0); + QVERIFY(!cmap1.entryColor(0).isValid()); + QVERIFY(!cmap1.entryColor(-1).isValid()); + QVERIFY(!cmap1.entryColor(100).isValid()); + QCOMPARE(cmap1.find(qRgb(255, 0, 0)), -1); + QCOMPARE(cmap1.findNearest(qRgb(255, 0, 0)), -1); + + // Set an entry and re-test. + cmap1.setEntry(56, qRgb(255, 0, 0)); + // The colormap is still considered "empty" even though it + // has entries in it now. The isEmpty() method is used to + // detect when the colormap is in use by a GL widget, + // not to detect when it is empty! + QVERIFY(cmap1.isEmpty()); + QCOMPARE(cmap1.size(), 256); + QVERIFY(cmap1.entryRgb(0) == 0); + QVERIFY(cmap1.entryColor(0) == QColor(0, 0, 0, 255)); + QVERIFY(cmap1.entryRgb(56) == qRgb(255, 0, 0)); + QVERIFY(cmap1.entryColor(56) == QColor(255, 0, 0, 255)); + QCOMPARE(cmap1.find(qRgb(255, 0, 0)), 56); + QCOMPARE(cmap1.findNearest(qRgb(255, 0, 0)), 56); + + // Set some more entries. + static QRgb const colors[] = { + qRgb(255, 0, 0), + qRgb(0, 255, 0), + qRgb(255, 255, 255), + qRgb(0, 0, 255), + qRgb(0, 0, 0) + }; + cmap1.setEntry(57, QColor(0, 255, 0)); + cmap1.setEntries(3, colors + 2, 58); + cmap1.setEntries(5, colors, 251); + int idx; + for (idx = 0; idx < 5; ++idx) { + QVERIFY(cmap1.entryRgb(56 + idx) == colors[idx]); + QVERIFY(cmap1.entryColor(56 + idx) == QColor(colors[idx])); + QVERIFY(cmap1.entryRgb(251 + idx) == colors[idx]); + QVERIFY(cmap1.entryColor(251 + idx) == QColor(colors[idx])); + } + QCOMPARE(cmap1.size(), 256); + + // Perform color lookups. + QCOMPARE(cmap1.find(qRgb(255, 0, 0)), 56); + QCOMPARE(cmap1.find(qRgb(0, 0, 0)), 60); // Actually finds 0, 0, 0, 255. + QCOMPARE(cmap1.find(qRgba(0, 0, 0, 0)), 0); + QCOMPARE(cmap1.find(qRgb(0, 255, 0)), 57); + QCOMPARE(cmap1.find(qRgb(255, 255, 255)), 58); + QCOMPARE(cmap1.find(qRgb(0, 0, 255)), 59); + QCOMPARE(cmap1.find(qRgb(140, 0, 0)), -1); + QCOMPARE(cmap1.find(qRgb(0, 140, 0)), -1); + QCOMPARE(cmap1.find(qRgb(0, 0, 140)), -1); + QCOMPARE(cmap1.find(qRgb(64, 0, 0)), -1); + QCOMPARE(cmap1.find(qRgb(0, 64, 0)), -1); + QCOMPARE(cmap1.find(qRgb(0, 0, 64)), -1); + QCOMPARE(cmap1.findNearest(qRgb(255, 0, 0)), 56); + QCOMPARE(cmap1.findNearest(qRgb(0, 0, 0)), 60); + QCOMPARE(cmap1.findNearest(qRgba(0, 0, 0, 0)), 0); + QCOMPARE(cmap1.findNearest(qRgb(0, 255, 0)), 57); + QCOMPARE(cmap1.findNearest(qRgb(255, 255, 255)), 58); + QCOMPARE(cmap1.findNearest(qRgb(0, 0, 255)), 59); + QCOMPARE(cmap1.findNearest(qRgb(140, 0, 0)), 56); + QCOMPARE(cmap1.findNearest(qRgb(0, 140, 0)), 57); + QCOMPARE(cmap1.findNearest(qRgb(0, 0, 140)), 59); + QCOMPARE(cmap1.findNearest(qRgb(64, 0, 0)), 0); + QCOMPARE(cmap1.findNearest(qRgb(0, 64, 0)), 0); + QCOMPARE(cmap1.findNearest(qRgb(0, 0, 64)), 0); + + // Make some copies of the colormap and check that they are the same. + QGLColormap cmap2(cmap1); + QGLColormap cmap3; + cmap3 = cmap1; + QVERIFY(cmap2.isEmpty()); + QVERIFY(cmap3.isEmpty()); + QCOMPARE(cmap2.size(), 256); + QCOMPARE(cmap3.size(), 256); + for (idx = 0; idx < 256; ++idx) { + QCOMPARE(cmap1.entryRgb(idx), cmap2.entryRgb(idx)); + QCOMPARE(cmap1.entryRgb(idx), cmap3.entryRgb(idx)); + } + + // Modify an entry in one of the copies and recheck the original. + cmap2.setEntry(45, qRgb(255, 0, 0)); + for (idx = 0; idx < 256; ++idx) { + if (idx != 45) + QCOMPARE(cmap1.entryRgb(idx), cmap2.entryRgb(idx)); + else + QCOMPARE(cmap2.entryRgb(45), qRgb(255, 0, 0)); + QCOMPARE(cmap1.entryRgb(idx), cmap3.entryRgb(idx)); + } + + // Check that setting the handle will cause isEmpty() to work right. + ColormapExtended cmap4; + cmap4.setEntry(56, qRgb(255, 0, 0)); + QVERIFY(cmap4.isEmpty()); + QCOMPARE(cmap4.size(), 256); + cmap4.setHandle(Qt::HANDLE(42)); + QVERIFY(cmap4.handle() == Qt::HANDLE(42)); + QVERIFY(!cmap4.isEmpty()); + QCOMPARE(cmap4.size(), 256); +} + QTEST_MAIN(tst_QGL) #include "tst_qgl.moc" diff --git a/tests/auto/qguard/qguard.pro b/tests/auto/qguard/qguard.pro new file mode 100644 index 0000000000..f249dde3bb --- /dev/null +++ b/tests/auto/qguard/qguard.pro @@ -0,0 +1,2 @@ +load(qttest_p4) +SOURCES += tst_qguard.cpp diff --git a/tests/auto/qguard/tst_qguard.cpp b/tests/auto/qguard/tst_qguard.cpp new file mode 100644 index 0000000000..96d1b60e94 --- /dev/null +++ b/tests/auto/qguard/tst_qguard.cpp @@ -0,0 +1,350 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// NOTE: This is identical to the QPointer autotest + +#include <QtTest/QtTest> + +#include <QApplication> +#include <QDebug> +#include <QWidget> +#include <private/qguard_p.h> + +class tst_QGuard : public QObject +{ + Q_OBJECT +public: + tst_QGuard(); + ~tst_QGuard(); + + inline tst_QGuard *me() const + { return const_cast<tst_QGuard *>(this); } + +public slots: + void initTestCase(); + void cleanupTestCase(); + void init(); + void cleanup(); +private slots: + void constructors(); + void destructor(); + void assignment_operators(); + void equality_operators(); + void isNull(); + void dereference_operators(); + void disconnect(); + void castDuringDestruction(); + void data() const; + void dataSignature() const; +}; + +tst_QGuard::tst_QGuard() +{ } + +tst_QGuard::~tst_QGuard() +{ } + +void tst_QGuard::initTestCase() +{ } + +void tst_QGuard::cleanupTestCase() +{ } + +void tst_QGuard::init() +{ } + +void tst_QGuard::cleanup() +{ } + +void tst_QGuard::constructors() +{ + QGuard<QObject> p1; + QGuard<QObject> p2(this); + QGuard<QObject> p3(p2); + QCOMPARE(p1, QGuard<QObject>(0)); + QCOMPARE(p2, QGuard<QObject>(this)); + QCOMPARE(p3, QGuard<QObject>(this)); +} + +void tst_QGuard::destructor() +{ + QObject *object = new QObject; + QGuard<QObject> p = object; + QCOMPARE(p, QGuard<QObject>(object)); + delete object; + QCOMPARE(p, QGuard<QObject>(0)); +} + +void tst_QGuard::assignment_operators() +{ + QGuard<QObject> p1; + QGuard<QObject> p2; + + p1 = this; + p2 = p1; + + QCOMPARE(p1, QGuard<QObject>(this)); + QCOMPARE(p2, QGuard<QObject>(this)); + QCOMPARE(p1, QGuard<QObject>(p2)); + + p1 = 0; + p2 = p1; + QCOMPARE(p1, QGuard<QObject>(0)); + QCOMPARE(p2, QGuard<QObject>(0)); + QCOMPARE(p1, QGuard<QObject>(p2)); + + QObject *object = new QObject; + + p1 = object; + p2 = p1; + QCOMPARE(p1, QGuard<QObject>(object)); + QCOMPARE(p2, QGuard<QObject>(object)); + QCOMPARE(p1, QGuard<QObject>(p2)); + + delete object; + QCOMPARE(p1, QGuard<QObject>(0)); + QCOMPARE(p2, QGuard<QObject>(0)); + QCOMPARE(p1, QGuard<QObject>(p2)); +} + +void tst_QGuard::equality_operators() +{ + QGuard<QObject> p1; + QGuard<QObject> p2; + + QVERIFY(p1 == p2); + + QObject *object = 0; + QWidget *widget = 0; + + p1 = object; + QVERIFY(p1 == p2); + QVERIFY(p1 == object); + p2 = object; + QVERIFY(p2 == p1); + QVERIFY(p2 == object); + + p1 = this; + QVERIFY(p1 != p2); + p2 = p1; + QVERIFY(p1 == p2); + + // compare to zero + p1 = 0; + QVERIFY(p1 == 0); + QVERIFY(0 == p1); + QVERIFY(p2 != 0); + QVERIFY(0 != p2); + QVERIFY(p1 == object); + QVERIFY(object == p1); + QVERIFY(p2 != object); + QVERIFY(object != p2); + QVERIFY(p1 == widget); + QVERIFY(widget == p1); + QVERIFY(p2 != widget); + QVERIFY(widget != p2); +} + +void tst_QGuard::isNull() +{ + QGuard<QObject> p1; + QVERIFY(p1.isNull()); + p1 = this; + QVERIFY(!p1.isNull()); + p1 = 0; + QVERIFY(p1.isNull()); +} + +void tst_QGuard::dereference_operators() +{ + QGuard<tst_QGuard> p1 = this; + + QObject *object = p1->me(); + QVERIFY(object == this); + + QObject &ref = *p1; + QVERIFY(&ref == this); + + object = static_cast<QObject *>(p1); + QVERIFY(object == this); +} + +void tst_QGuard::disconnect() +{ + QGuard<QObject> p1 = new QObject; + QVERIFY(!p1.isNull()); + p1->disconnect(); + QVERIFY(!p1.isNull()); + delete static_cast<QObject *>(p1); + QVERIFY(p1.isNull()); +} + +class ChildObject : public QObject +{ + QGuard<QObject> guardedPointer; + +public: + ChildObject(QObject *parent) + : QObject(parent), guardedPointer(parent) + { } + ~ChildObject(); +}; + +ChildObject::~ChildObject() +{ + QCOMPARE(static_cast<QObject *>(guardedPointer), static_cast<QObject *>(0)); + QCOMPARE(qobject_cast<QObject *>(guardedPointer), static_cast<QObject *>(0)); +} + +class ChildWidget : public QWidget +{ + QGuard<QWidget> guardedPointer; + +public: + ChildWidget(QWidget *parent) + : QWidget(parent), guardedPointer(parent) + { } + ~ChildWidget(); +}; + +ChildWidget::~ChildWidget() +{ + QCOMPARE(static_cast<QWidget *>(guardedPointer), static_cast<QWidget *>(0)); + QCOMPARE(qobject_cast<QWidget *>(guardedPointer), static_cast<QWidget *>(0)); +} + +class DerivedChild; + +class DerivedParent : public QObject +{ + Q_OBJECT + + DerivedChild *derivedChild; + +public: + DerivedParent(); + ~DerivedParent(); +}; + +class DerivedChild : public QObject +{ + Q_OBJECT + + DerivedParent *parentPointer; + QGuard<DerivedParent> guardedParentPointer; + +public: + DerivedChild(DerivedParent *parent) + : QObject(parent), parentPointer(parent), guardedParentPointer(parent) + { } + ~DerivedChild(); +}; + +DerivedParent::DerivedParent() + : QObject() +{ + derivedChild = new DerivedChild(this); +} + +DerivedParent::~DerivedParent() +{ + delete derivedChild; +} + +DerivedChild::~DerivedChild() +{ + QCOMPARE(static_cast<DerivedParent *>(guardedParentPointer), parentPointer); + QCOMPARE(qobject_cast<DerivedParent *>(guardedParentPointer), parentPointer); +} + +void tst_QGuard::castDuringDestruction() +{ + { + QObject *parentObject = new QObject(); + (void) new ChildObject(parentObject); + delete parentObject; + } + + { + QWidget *parentWidget = new QWidget(); + (void) new ChildWidget(parentWidget); + delete parentWidget; + } + + { + delete new DerivedParent(); + } +} + +void tst_QGuard::data() const +{ + /* Check value of a default constructed object. */ + { + QGuard<QObject> p; + QCOMPARE(p.data(), static_cast<QObject *>(0)); + } + + /* Check value of a default constructed object. */ + { + QObject *const object = new QObject(); + QGuard<QObject> p(object); + QCOMPARE(p.data(), object); + } +} + +void tst_QGuard::dataSignature() const +{ + /* data() should be const. */ + { + const QGuard<QObject> p; + p.data(); + } + + /* The return type should be T. */ + { + const QGuard<QWidget> p; + /* If the types differs, the QCOMPARE will fail to instansiate. */ + QCOMPARE(p.data(), static_cast<QWidget *>(0)); + } +} + +QTEST_MAIN(tst_QGuard) +#include "tst_qguard.moc" diff --git a/tests/auto/qhelpenginecore/data/collection.qhc b/tests/auto/qhelpenginecore/data/collection.qhc Binary files differindex 6fb8abb685..bd2f37c17e 100644 --- a/tests/auto/qhelpenginecore/data/collection.qhc +++ b/tests/auto/qhelpenginecore/data/collection.qhc diff --git a/tests/auto/qhelpenginecore/data/collection1.qhc b/tests/auto/qhelpenginecore/data/collection1.qhc Binary files differindex 45acf33b77..de310ea24b 100644 --- a/tests/auto/qhelpenginecore/data/collection1.qhc +++ b/tests/auto/qhelpenginecore/data/collection1.qhc diff --git a/tests/auto/qhelpenginecore/data/linguist-3.3.8.qch b/tests/auto/qhelpenginecore/data/linguist-3.3.8.qch Binary files differindex 0b53cd8393..ed9a89c6c1 100644 --- a/tests/auto/qhelpenginecore/data/linguist-3.3.8.qch +++ b/tests/auto/qhelpenginecore/data/linguist-3.3.8.qch diff --git a/tests/auto/qhelpenginecore/data/qmake-3.3.8.qch b/tests/auto/qhelpenginecore/data/qmake-3.3.8.qch Binary files differindex a3ca18ad7d..0e95c142cc 100644 --- a/tests/auto/qhelpenginecore/data/qmake-3.3.8.qch +++ b/tests/auto/qhelpenginecore/data/qmake-3.3.8.qch diff --git a/tests/auto/qhelpenginecore/data/qmake-4.3.0.qch b/tests/auto/qhelpenginecore/data/qmake-4.3.0.qch Binary files differindex 8f76134e6e..337d7a110e 100644 --- a/tests/auto/qhelpenginecore/data/qmake-4.3.0.qch +++ b/tests/auto/qhelpenginecore/data/qmake-4.3.0.qch diff --git a/tests/auto/qhelpenginecore/data/test.qch b/tests/auto/qhelpenginecore/data/test.qch Binary files differindex 8a8f7a1d79..06b789a0e0 100644 --- a/tests/auto/qhelpenginecore/data/test.qch +++ b/tests/auto/qhelpenginecore/data/test.qch diff --git a/tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp b/tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp index d62c8e51c3..f9aa653bab 100644 --- a/tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp +++ b/tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp @@ -130,7 +130,7 @@ void tst_QHelpEngineCore::setCollectionFile() QStringList docs = help.registeredDocumentations(); QCOMPARE(docs.count(), 1); - QCOMPARE(docs.first(), QLatin1String("trolltech.com.1_0_0.test")); + QCOMPARE(docs.first(), QLatin1String("trolltech.com.1-0-0.test")); } void tst_QHelpEngineCore::copyCollectionFile() @@ -177,7 +177,7 @@ void tst_QHelpEngineCore::copyCollectionFile() i = 0; while (m_query->next()) { if (i == 0) { - QCOMPARE(m_query->value(0).toString(), QString("trolltech.com.3_3_8.qmake")); + QCOMPARE(m_query->value(0).toString(), QString("trolltech.com.3-3-8.qmake")); QCOMPARE(m_query->value(1).toString(), QString("data/qmake-3.3.8.qch")); } ++i; @@ -193,9 +193,9 @@ void tst_QHelpEngineCore::copyCollectionFile() void tst_QHelpEngineCore::namespaceName() { QCOMPARE(QHelpEngineCore::namespaceName(m_path + "/data/qmake-3.3.8.qch"), - QString("trolltech.com.3_3_8.qmake")); + QString("trolltech.com.3-3-8.qmake")); QCOMPARE(QHelpEngineCore::namespaceName(m_path + "/data/linguist-3.3.8.qch"), - QString("trolltech.com.3_3_8.linguist")); + QString("trolltech.com.3-3-8.linguist")); } void tst_QHelpEngineCore::registeredDocumentations() @@ -205,8 +205,8 @@ void tst_QHelpEngineCore::registeredDocumentations() QStringList docs = help.registeredDocumentations(); QCOMPARE(docs.count(), 3); QStringList lst; - lst << "trolltech.com.3_3_8.qmake" << "trolltech.com.4_3_0.qmake" - << "trolltech.com.1_0_0.test"; + lst << "trolltech.com.3-3-8.qmake" << "trolltech.com.4-3-0.qmake" + << "trolltech.com.1-0-0.test"; foreach (QString s, docs) lst.removeAll(s); QCOMPARE(lst.isEmpty(), true); @@ -236,7 +236,7 @@ void tst_QHelpEngineCore::registerDocumentation() } QSqlQuery query(db); query.exec("SELECT FilePath FROM NamespaceTable WHERE " - "Name=\'trolltech.com.3_3_8.linguist\'"); + "Name=\'trolltech.com.3-3-8.linguist\'"); if (query.next()) QCOMPARE(query.value(0).toString(), QString("linguist-3.3.8.qch")); @@ -251,7 +251,7 @@ void tst_QHelpEngineCore::unregisterDocumentation() QHelpEngineCore c(m_colFile); QCOMPARE(c.setupData(), true); QCOMPARE(c.registeredDocumentations().count(), 3); - c.unregisterDocumentation("trolltech.com.3_3_8.qmake"); + c.unregisterDocumentation("trolltech.com.3-3-8.qmake"); QCOMPARE(c.registeredDocumentations().count(), 2); QCOMPARE(c.unregisterDocumentation("noexisting"), false); } @@ -260,9 +260,9 @@ void tst_QHelpEngineCore::documentationFileName() { QHelpEngineCore c(m_colFile); QCOMPARE(c.setupData(), true); - QCOMPARE(c.documentationFileName(QLatin1String("trolltech.com.3_3_8.qmake")), + QCOMPARE(c.documentationFileName(QLatin1String("trolltech.com.3-3-8.qmake")), QString(m_path + "/data/qmake-3.3.8.qch")); - QCOMPARE(c.documentationFileName(QLatin1String("trolltech.com.1_0_0.test")), + QCOMPARE(c.documentationFileName(QLatin1String("trolltech.com.1-0-0.test")), QString(m_path + "/data/test.qch")); QCOMPARE(c.documentationFileName(QLatin1String("trolltech.com.empty")), QString()); @@ -337,7 +337,7 @@ void tst_QHelpEngineCore::filterAttributeSets() { QHelpEngineCore help(m_colFile, 0); QCOMPARE(help.setupData(), true); - QList<QStringList> lst = help.filterAttributeSets("trolltech.com.1_0_0.test"); + QList<QStringList> lst = help.filterAttributeSets("trolltech.com.1-0-0.test"); QCOMPARE(lst.count(), 2); QCOMPARE(lst.first().count(), 2); QCOMPARE((bool)lst.first().contains("filter1"), true); @@ -348,22 +348,22 @@ void tst_QHelpEngineCore::files() { QHelpEngineCore help(m_colFile, 0); QCOMPARE(help.setupData(), true); - QList<QUrl> lst = help.files("trolltech.com.4_3_0.qmake", + QList<QUrl> lst = help.files("trolltech.com.4-3-0.qmake", QStringList()); QCOMPARE(lst.count(), 16); - lst = help.files("trolltech.com.4_3_0.qmake", + lst = help.files("trolltech.com.4-3-0.qmake", QStringList(), "png"); QCOMPARE(lst.count(), 2); - lst = help.files("trolltech.com.4_3_0.qmake", + lst = help.files("trolltech.com.4-3-0.qmake", QStringList() << "qt", "html"); QCOMPARE(lst.count(), 13); - lst = help.files("trolltech.com.4_3_0.qmake", + lst = help.files("trolltech.com.4-3-0.qmake", QStringList() << "qt" << "qmake", "html"); QCOMPARE(lst.count(), 13); - lst = help.files("trolltech.com.4_3_0.qmake", + lst = help.files("trolltech.com.4-3-0.qmake", QStringList() << "qt" << "qmake" << "bla", "html"); QCOMPARE(lst.count(), 0); - lst = help.files("trolltech.com.4_3_0.qmake", + lst = help.files("trolltech.com.4-3-0.qmake", QStringList() << "qt" << "qmake", "foo"); QCOMPARE(lst.count(), 0); @@ -378,7 +378,7 @@ void tst_QHelpEngineCore::fileData() QCOMPARE(help.setupData(), true); QByteArray ba = help.fileData(QUrl("NotExisting")); QCOMPARE(ba.size(), 0); - ba = help.fileData(QUrl("qthelp://trolltech.com.1_0_0.test/testFolder/test.html")); + ba = help.fileData(QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/test.html")); QTextStream s(ba, QIODevice::ReadOnly|QIODevice::Text); QFile f(m_path + "/data/test.html"); if (!f.open(QIODevice::ReadOnly|QIODevice::Text)) @@ -396,7 +396,7 @@ void tst_QHelpEngineCore::linksForIdentifier() QCOMPARE(map.contains("Test Manual"), true); QCOMPARE(map.count(), 1); QCOMPARE(map.value("Test Manual"), - QUrl("qthelp://trolltech.com.1_0_0.test/testFolder/test.html#foo")); + QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/test.html#foo")); help.setCurrentFilter("Custom Filter 2"); map = help.linksForIdentifier("People::newton"); @@ -405,7 +405,7 @@ void tst_QHelpEngineCore::linksForIdentifier() QCOMPARE(map.contains("Fancy"), true); QCOMPARE(map.count(), 1); QCOMPARE(map.value("Fancy"), - QUrl("qthelp://trolltech.com.1_0_0.test/testFolder/fancy.html#foobar")); + QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/fancy.html#foobar")); } void tst_QHelpEngineCore::customValue() diff --git a/tests/auto/qhelpindexmodel/data/collection.qhc b/tests/auto/qhelpindexmodel/data/collection.qhc Binary files differindex 6fb8abb685..bd2f37c17e 100644 --- a/tests/auto/qhelpindexmodel/data/collection.qhc +++ b/tests/auto/qhelpindexmodel/data/collection.qhc diff --git a/tests/auto/qhelpindexmodel/data/collection1.qhc b/tests/auto/qhelpindexmodel/data/collection1.qhc Binary files differindex 45acf33b77..de310ea24b 100644 --- a/tests/auto/qhelpindexmodel/data/collection1.qhc +++ b/tests/auto/qhelpindexmodel/data/collection1.qhc diff --git a/tests/auto/qhelpindexmodel/data/linguist-3.3.8.qch b/tests/auto/qhelpindexmodel/data/linguist-3.3.8.qch Binary files differindex 0b53cd8393..ed9a89c6c1 100644 --- a/tests/auto/qhelpindexmodel/data/linguist-3.3.8.qch +++ b/tests/auto/qhelpindexmodel/data/linguist-3.3.8.qch diff --git a/tests/auto/qhelpindexmodel/data/qmake-3.3.8.qch b/tests/auto/qhelpindexmodel/data/qmake-3.3.8.qch Binary files differindex a3ca18ad7d..0e95c142cc 100644 --- a/tests/auto/qhelpindexmodel/data/qmake-3.3.8.qch +++ b/tests/auto/qhelpindexmodel/data/qmake-3.3.8.qch diff --git a/tests/auto/qhelpindexmodel/data/qmake-4.3.0.qch b/tests/auto/qhelpindexmodel/data/qmake-4.3.0.qch Binary files differindex 8f76134e6e..337d7a110e 100644 --- a/tests/auto/qhelpindexmodel/data/qmake-4.3.0.qch +++ b/tests/auto/qhelpindexmodel/data/qmake-4.3.0.qch diff --git a/tests/auto/qhelpindexmodel/data/test.qch b/tests/auto/qhelpindexmodel/data/test.qch Binary files differindex 1d6c1a801a..4ea9847a67 100644 --- a/tests/auto/qhelpindexmodel/data/test.qch +++ b/tests/auto/qhelpindexmodel/data/test.qch diff --git a/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp b/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp index 9482def1b3..3adb894ca7 100644 --- a/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp +++ b/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp @@ -185,11 +185,11 @@ void tst_QHelpIndexModel::linksForIndex() QCOMPARE(map.count(), 2); QCOMPARE(map.contains("Test Manual"), true); QCOMPARE(map.value("Test Manual"), - QUrl("qthelp://trolltech.com.1_0_0.test/testFolder/test.html#foo")); + QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/test.html#foo")); QCOMPARE(map.contains("Fancy"), true); QCOMPARE(map.value("Fancy"), - QUrl("qthelp://trolltech.com.1_0_0.test/testFolder/fancy.html#foo")); + QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/fancy.html#foo")); map = m->linksForKeyword("foobar"); QCOMPARE(map.count(), 1); @@ -208,7 +208,7 @@ void tst_QHelpIndexModel::linksForIndex() QCOMPARE(map.count(), 1); QCOMPARE(map.contains("Test Manual"), true); QCOMPARE(map.value("Test Manual"), - QUrl("qthelp://trolltech.com.1_0_0.test/testFolder/test.html#foo")); + QUrl("qthelp://trolltech.com.1-0-0.test/testFolder/test.html#foo")); } QTEST_MAIN(tst_QHelpIndexModel) diff --git a/tests/auto/qhttp/qhttp.pro b/tests/auto/qhttp/qhttp.pro index 38569ba026..8678a19652 100644 --- a/tests/auto/qhttp/qhttp.pro +++ b/tests/auto/qhttp/qhttp.pro @@ -21,6 +21,8 @@ wince*: { addFiles.sources = rfc3252.txt trolltech addFiles.path = . DEPLOYMENT = addFiles webFiles cgi +} else:vxworks*: { + DEFINES += SRCDIR=\\\"\\\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qline/qline.pro b/tests/auto/qline/qline.pro index 1c4f21a6a0..715774ae6b 100644 --- a/tests/auto/qline/qline.pro +++ b/tests/auto/qline/qline.pro @@ -1,4 +1,7 @@ load(qttest_p4) SOURCES += tst_qline.cpp QT -= gui -unix:!mac:!symbian*:LIBS+=-lm +SOURCES += tst_qline.cpp +unix:!mac:!symbian*:!vxworks:LIBS+=-lm + + diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp index c65908a1d5..6301d40120 100644 --- a/tests/auto/qlocale/tst_qlocale.cpp +++ b/tests/auto/qlocale/tst_qlocale.cpp @@ -335,9 +335,8 @@ void tst_QLocale::emptyCtor() { \ /* Test constructor without arguments. Needs separate process */ \ /* because of caching of the system locale. */ \ - QString oldEnv = QString::fromLocal8Bit(qgetenv("LANG")); \ - qputenv("LANG", QString(req_lc).toLocal8Bit()); \ QProcess process; \ + process.setEnvironment(QStringList(env) << QString("LANG=%1").arg(req_lc)); \ process.start("syslocaleapp/syslocaleapp"); \ process.waitForReadyRead(); \ QString ret = QString(process.readAll()); \ @@ -345,18 +344,23 @@ void tst_QLocale::emptyCtor() QVERIFY2(!ret.isEmpty(), "Cannot launch external process"); \ QVERIFY2(QString(exp_str) == ret, QString("Expected: " + QString(exp_str) + ", got: " \ + ret + ". Requested: " + QString(req_lc)).toLatin1().constData()); \ - qputenv("LANG", oldEnv.toLocal8Bit()); \ + } + + // Get an environment free of any locale-related variables + QStringList env; + foreach (QString const& entry, QProcess::systemEnvironment()) { + if (entry.startsWith("LANG=") || entry.startsWith("LC_")) + continue; + env << entry; } // Get default locale. - QString old = QString::fromLocal8Bit(qgetenv("LANG")); - qputenv("LANG", ""); QProcess p; + p.setEnvironment(env); p.start("syslocaleapp/syslocaleapp"); p.waitForReadyRead(); QString defaultLoc = QString(p.readAll()); p.waitForFinished(); - qputenv("LANG", old.toLocal8Bit()); TEST_CTOR("C", "C") TEST_CTOR("bla", "C") diff --git a/tests/auto/qmake/testdata/simple_app_build/README b/tests/auto/qmake/testdata/simple_app_build/README new file mode 100644 index 0000000000..81dc596e5b --- /dev/null +++ b/tests/auto/qmake/testdata/simple_app_build/README @@ -0,0 +1 @@ +Placeholder file to ensure this directory exists diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index ce6afa1941..3ce7f7f0b6 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -95,6 +95,7 @@ private slots: void task250673_activeMultiColumnSubMenuPosition(); void task256918_setFont(); void menuSizeHint(); + void task258920_mouseBorder(); protected slots: void onActivated(QAction*); void onHighlighted(QAction*); @@ -770,5 +771,40 @@ void tst_QMenu::menuSizeHint() QCOMPARE(resSize, menu.sizeHint()); } +class Menu258920 : public QMenu +{ + Q_OBJECT +public slots: + void paintEvent(QPaintEvent *e) + { + QMenu::paintEvent(e); + painted = true; + } + +public: + bool painted; +}; + +void tst_QMenu::task258920_mouseBorder() +{ + Menu258920 menu; + QAction *action = menu.addAction("test"); + + menu.popup(QPoint()); + QTest::qWait(100); + QRect actionRect = menu.actionGeometry(action); + QTest::mouseMove(&menu, actionRect.center()); + QTest::qWait(30); + QTest::mouseMove(&menu, actionRect.center() + QPoint(10, 0)); + QTest::qWait(30); + QCOMPARE(action, menu.activeAction()); + menu.painted = false; + QTest::mouseMove(&menu, QPoint(actionRect.center().x(), actionRect.bottom() + 1)); + QTest::qWait(30); + QCOMPARE(static_cast<QAction*>(0), menu.activeAction()); + QVERIFY(menu.painted); +} + + QTEST_MAIN(tst_QMenu) #include "tst_qmenu.moc" diff --git a/tests/auto/qmetaobject/qmetaobject.pro b/tests/auto/qmetaobject/qmetaobject.pro index 22119bc7bb..1df54f73bf 100644 --- a/tests/auto/qmetaobject/qmetaobject.pro +++ b/tests/auto/qmetaobject/qmetaobject.pro @@ -1,4 +1,7 @@ load(qttest_p4) + +QT = core gui + SOURCES += tst_qmetaobject.cpp diff --git a/tests/auto/qmetaobject/tst_qmetaobject.cpp b/tests/auto/qmetaobject/tst_qmetaobject.cpp index dea0ffbab2..ac2858ce12 100644 --- a/tests/auto/qmetaobject/tst_qmetaobject.cpp +++ b/tests/auto/qmetaobject/tst_qmetaobject.cpp @@ -108,6 +108,8 @@ class tst_QMetaObject : public QObject Q_PROPERTY(int value6 READ value6 NOTIFY value6Changed) Q_PROPERTY(MyStruct value7 READ value7 WRITE setVal7 NOTIFY value7Changed) Q_PROPERTY(int value8 READ value8 NOTIFY value8Changed) + Q_PROPERTY(int value9 READ value9 CONSTANT) + Q_PROPERTY(int value10 READ value10 FINAL) public: enum EnumType { EnumType1 }; @@ -137,6 +139,10 @@ public: int value8() const { return 1; } + int value9() const { return 1; } + + int value10() const { return 1; } + QList<QVariant> value4; QVariantList value5; @@ -159,6 +165,8 @@ private slots: void customPropertyType(); void checkScope(); void propertyNotify(); + void propertyConstant(); + void propertyFinal(); void stdSet(); void classInfo(); @@ -785,6 +793,32 @@ void tst_QMetaObject::propertyNotify() QCOMPARE(signal.signature(), (const char *)0); } +void tst_QMetaObject::propertyConstant() +{ + const QMetaObject *mo = metaObject(); + + QMetaProperty prop = mo->property(mo->indexOfProperty("value8")); + QVERIFY(prop.isValid()); + QVERIFY(!prop.isConstant()); + + prop = mo->property(mo->indexOfProperty("value9")); + QVERIFY(prop.isValid()); + QVERIFY(prop.isConstant()); +} + +void tst_QMetaObject::propertyFinal() +{ + const QMetaObject *mo = metaObject(); + + QMetaProperty prop = mo->property(mo->indexOfProperty("value10")); + QVERIFY(prop.isValid()); + QVERIFY(prop.isFinal()); + + prop = mo->property(mo->indexOfProperty("value9")); + QVERIFY(prop.isValid()); + QVERIFY(!prop.isFinal()); +} + class ClassInfoTestObjectA : public QObject { Q_OBJECT diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 18bd8037f8..a4c3b80ac8 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -232,8 +232,10 @@ private Q_SLOTS: void rateControl(); void downloadPerformance(); void uploadPerformance(); - void httpUploadPerformance(); void performanceControlRate(); + void httpUploadPerformance(); + void httpDownloadPerformance_data(); + void httpDownloadPerformance(); void downloadProgress_data(); void downloadProgress(); @@ -257,8 +259,6 @@ private Q_SLOTS: void authorizationError(); void httpConnectionCount(); - void httpDownloadPerformance_data(); - void httpDownloadPerformance(); #ifndef QT_NO_OPENSSL void ignoreSslErrorsList_data(); @@ -523,10 +523,10 @@ public: QTcpSocket *active = new QTcpSocket(this); active->connectToHost("127.0.0.1", server.serverPort()); #ifndef Q_OS_SYMBIAN - if (!active->waitForConnected(10)) + if (!active->waitForConnected(100)) return false; - if (!server.waitForNewConnection(10)) + if (!server.waitForNewConnection(100)) return false; #else if (!active->waitForConnected(5000)) @@ -853,6 +853,92 @@ protected: } }; +class HttpDownloadPerformanceClient : QObject { + Q_OBJECT; + QIODevice *device; + public: + HttpDownloadPerformanceClient (QIODevice *dev) : device(dev){ + connect(dev, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); + } + + public slots: + void readyReadSlot() { + device->readAll(); + } + +}; + +class HttpDownloadPerformanceServer : QObject { + Q_OBJECT; + qint64 dataSize; + qint64 dataSent; + QTcpServer server; + QTcpSocket *client; + bool serverSendsContentLength; + bool chunkedEncoding; + +public: + HttpDownloadPerformanceServer (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0), + client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) { + server.listen(); + connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot())); + } + + int serverPort() { + return server.serverPort(); + } + +public slots: + + void newConnectionSlot() { + client = server.nextPendingConnection(); + client->setParent(this); + connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); + connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64))); + } + + void readyReadSlot() { + client->readAll(); + client->write("HTTP/1.0 200 OK\n"); + if (serverSendsContentLength) + client->write(QString("Content-Length: " + QString::number(dataSize) + "\n").toAscii()); + if (chunkedEncoding) + client->write(QString("Transfer-Encoding: chunked\n").toAscii()); + client->write("Connection: close\n\n"); + } + + void bytesWrittenSlot(qint64 amount) { + Q_UNUSED(amount); + if (dataSent == dataSize && client) { + // close eventually + + // chunked encoding: we have to send a last "empty" chunk + if (chunkedEncoding) + client->write(QString("0\r\n\r\n").toAscii()); + + client->disconnectFromHost(); + server.close(); + client = 0; + return; + } + + // send data + if (client && client->bytesToWrite() < 100*1024 && dataSent < dataSize) { + qint64 amount = qMin(qint64(16*1024), dataSize - dataSent); + QByteArray data(amount, '@'); + + if (chunkedEncoding) { + client->write(QString(QString("%1").arg(amount,0,16).toUpper() + "\r\n").toAscii()); + client->write(data.constData(), amount); + client->write(QString("\r\n").toAscii()); + } else { + client->write(data.constData(), amount); + } + + dataSent += amount; + } + } +}; tst_QNetworkReply::tst_QNetworkReply() @@ -3228,7 +3314,7 @@ void tst_QNetworkReply::uploadPerformance() void tst_QNetworkReply::httpUploadPerformance() { - enum {UploadSize = 1000*1024*1024}; // 1000 MB + enum {UploadSize = 128*1024*1024}; // 128 MB ThreadedDataReaderHttpServer reader; FixedSizeDataGenerator generator(UploadSize); @@ -3250,7 +3336,7 @@ void tst_QNetworkReply::httpUploadPerformance() << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec"; reader.exit(); - reader.wait(3000); + reader.wait(); } @@ -3278,6 +3364,41 @@ void tst_QNetworkReply::performanceControlRate() << elapsedTime << "ms"; } +void tst_QNetworkReply::httpDownloadPerformance_data() +{ + QTest::addColumn<bool>("serverSendsContentLength"); + QTest::addColumn<bool>("chunkedEncoding"); + + QTest::newRow("Server sends no Content-Length") << false << false; + QTest::newRow("Server sends Content-Length") << true << false; + QTest::newRow("Server uses chunked encoding") << false << true; + +} + +void tst_QNetworkReply::httpDownloadPerformance() +{ + QFETCH(bool, serverSendsContentLength); + QFETCH(bool, chunkedEncoding); + + enum {UploadSize = 128*1024*1024}; // 128 MB + HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding); + + QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1")); + QNetworkReplyPtr reply = manager.get(request); + + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); + HttpDownloadPerformanceClient client(reply); + + QTime time; + time.start(); + QTestEventLoop::instance().enterLoop(40); + QVERIFY(!QTestEventLoop::instance().timeout()); + + qint64 elapsed = time.elapsed(); + qDebug() << "tst_QNetworkReply::httpDownloadPerformance" << elapsed << "msec, " + << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec"; +} + void tst_QNetworkReply::downloadProgress_data() { QTest::addColumn<int>("loopCount"); @@ -3788,130 +3909,6 @@ void tst_QNetworkReply::httpConnectionCount() QCOMPARE(pendingConnectionCount, 6); } -class HttpDownloadPerformanceClient : QObject { - Q_OBJECT; - QIODevice *device; - public: - HttpDownloadPerformanceClient (QIODevice *dev) : device(dev){ - connect(dev, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); - } - - public slots: - void readyReadSlot() { - device->readAll(); - } - -}; - -class HttpDownloadPerformanceServer : QObject { - Q_OBJECT; - qint64 dataSize; - qint64 dataSent; - QTcpServer server; - QTcpSocket *client; - bool serverSendsContentLength; - bool chunkedEncoding; - -public: - HttpDownloadPerformanceServer (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0), - client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) { - server.listen(); - connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot())); - } - - int serverPort() { - return server.serverPort(); - } - -public slots: - - void newConnectionSlot() { - client = server.nextPendingConnection(); - client->setParent(this); - connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); - connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64))); - } - - void readyReadSlot() { - client->readAll(); - client->write("HTTP/1.0 200 OK\n"); - if (serverSendsContentLength) - client->write(QString("Content-Length: " + QString::number(dataSize) + "\n").toAscii()); - if (chunkedEncoding) - client->write(QString("Transfer-Encoding: chunked\n").toAscii()); - client->write("Connection: close\n\n"); - } - - void bytesWrittenSlot(qint64 amount) { - Q_UNUSED(amount); - if (dataSent == dataSize && client) { - // close eventually - - // chunked encoding: we have to send a last "empty" chunk - if (chunkedEncoding) - client->write(QString("0\r\n\r\n").toAscii()); - - client->disconnectFromHost(); - server.close(); - client = 0; - return; - } - - // send data - if (client && client->bytesToWrite() < 100*1024 && dataSent < dataSize) { - qint64 amount = qMin(qint64(16*1024), dataSize - dataSent); - QByteArray data(amount, '@'); - - if (chunkedEncoding) { - client->write(QString(QString("%1").arg(amount,0,16).toUpper() + "\r\n").toAscii()); - client->write(data.constData(), amount); - client->write(QString("\r\n").toAscii()); - } else { - client->write(data.constData(), amount); - } - - dataSent += amount; - } - } -}; - -void tst_QNetworkReply::httpDownloadPerformance_data() -{ - QTest::addColumn<bool>("serverSendsContentLength"); - QTest::addColumn<bool>("chunkedEncoding"); - - QTest::newRow("Server sends no Content-Length") << false << false; - QTest::newRow("Server sends Content-Length") << true << false; - QTest::newRow("Server uses chunked encoding") << false << true; - -} - -void tst_QNetworkReply::httpDownloadPerformance() -{ - QFETCH(bool, serverSendsContentLength); - QFETCH(bool, chunkedEncoding); - - enum {UploadSize = 1000*1024*1024}; // 1000 MB - HttpDownloadPerformanceServer server(UploadSize, serverSendsContentLength, chunkedEncoding); - - QNetworkRequest request(QUrl("http://127.0.0.1:" + QString::number(server.serverPort()) + "/?bare=1")); - QNetworkReply* reply = manager.get(request); - - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); - HttpDownloadPerformanceClient client(reply); - - QTime time; - time.start(); - QTestEventLoop::instance().enterLoop(40); - QVERIFY(!QTestEventLoop::instance().timeout()); - - qint64 elapsed = time.elapsed(); - qDebug() << "tst_QNetworkReply::httpDownloadPerformance" << elapsed << "msec, " - << ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec"; - - delete reply; -} - #ifndef QT_NO_OPENSSL void tst_QNetworkReply::ignoreSslErrorsList_data() { @@ -3940,7 +3937,7 @@ void tst_QNetworkReply::ignoreSslErrorsList() { QFETCH(QString, url); QNetworkRequest request(url); - QNetworkReply *reply = manager.get(request); + QNetworkReplyPtr reply = manager.get(request); QFETCH(QList<QSslError>, expectedSslErrors); reply->ignoreSslErrors(expectedSslErrors); @@ -3969,7 +3966,7 @@ void tst_QNetworkReply::ignoreSslErrorsListWithSlot() { QFETCH(QString, url); QNetworkRequest request(url); - QNetworkReply *reply = manager.get(request); + QNetworkReplyPtr reply = manager.get(request); QFETCH(QList<QSslError>, expectedSslErrors); // store the errors to ignore them later in the slot connected below diff --git a/tests/auto/qnumeric/tst_qnumeric.cpp b/tests/auto/qnumeric/tst_qnumeric.cpp index fb01e1b1ea..0c83db4733 100644 --- a/tests/auto/qnumeric/tst_qnumeric.cpp +++ b/tests/auto/qnumeric/tst_qnumeric.cpp @@ -41,6 +41,7 @@ #include <QtTest/QtTest> +#include <QtGlobal> #include <math.h> @@ -97,8 +98,12 @@ void tst_QNumeric::qNan() if (0 > nan) QFAIL("compiler thinks 0 > nan"); +# if defined(Q_CC_DIAB) + QWARN("!(0 < nan) would fail due to a bug in dcc"); +# else if (0 < nan) QFAIL("compiler thinks 0 < nan"); +# endif #endif QVERIFY(qIsNaN(nan)); QVERIFY(qIsNaN(nan + 1)); diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp index dd2567d767..2627b8dca6 100644 --- a/tests/auto/qobject/tst_qobject.cpp +++ b/tests/auto/qobject/tst_qobject.cpp @@ -118,6 +118,7 @@ private slots: void connectToSender(); void qobjectConstCast(); void uniqConnection(); + void interfaceIid(); protected: }; @@ -2899,5 +2900,15 @@ void tst_QObject::uniqConnection() delete r2; } +void tst_QObject::interfaceIid() +{ + QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bleh *>()), + QByteArray(Bleh_iid)); + QCOMPARE(QByteArray(qobject_interface_iid<Foo::Bar *>()), + QByteArray("com.qtest.foobar")); + QCOMPARE(QByteArray(qobject_interface_iid<FooObject *>()), + QByteArray()); +} + QTEST_MAIN(tst_QObject) #include "tst_qobject.moc" diff --git a/tests/auto/qobjectrace/tst_qobjectrace.cpp b/tests/auto/qobjectrace/tst_qobjectrace.cpp index b3052e00ac..1bd09cdfb2 100644 --- a/tests/auto/qobjectrace/tst_qobjectrace.cpp +++ b/tests/auto/qobjectrace/tst_qobjectrace.cpp @@ -124,10 +124,10 @@ signals: private slots: void checkStopWatch() { -#ifndef Q_OS_WINCE - if (stopWatch.elapsed() >= OneMinute) -#else +#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS) if (stopWatch.elapsed() >= OneMinute / 2) +#else + if (stopWatch.elapsed() >= OneMinute) #endif quit(); @@ -146,7 +146,7 @@ void tst_QObjectRace::moveToThreadRace() #endif RaceObject *object = new RaceObject; - enum { ThreadCount = 10 }; + enum { ThreadCount = 6 }; RaceThread *threads[ThreadCount]; for (int i = 0; i < ThreadCount; ++i) { threads[i] = new RaceThread; diff --git a/tests/auto/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/qreadwritelock/tst_qreadwritelock.cpp index 78ddc9954f..f2988120f1 100644 --- a/tests/auto/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/auto/qreadwritelock/tst_qreadwritelock.cpp @@ -719,6 +719,8 @@ void tst_QReadWriteLock::multipleReadersLoop() int wait=0; #if defined (Q_OS_HPUX) const int numthreads=50; +#elif defined(Q_OS_VXWORKS) + const int numthreads=40; #else const int numthreads=75; #endif diff --git a/tests/auto/qregexp/qregexp.pro b/tests/auto/qregexp/qregexp.pro index ac1cdea0ca..80b6827101 100644 --- a/tests/auto/qregexp/qregexp.pro +++ b/tests/auto/qregexp/qregexp.pro @@ -2,4 +2,7 @@ load(qttest_p4) QT = core + +QT = core + SOURCES += tst_qregexp.cpp diff --git a/tests/auto/qresourceengine/qresourceengine.pro b/tests/auto/qresourceengine/qresourceengine.pro index d98c2db790..c06a5eb87f 100644 --- a/tests/auto/qresourceengine/qresourceengine.pro +++ b/tests/auto/qresourceengine/qresourceengine.pro @@ -19,6 +19,7 @@ runtime_resource.commands = $$QMAKE_RCC -root /runtime_resource/ -binary $${runt QMAKE_EXTRA_TARGETS = runtime_resource PRE_TARGETDEPS += $${runtime_resource.target} +QT = core wince*|symbian*:{ deploy.sources += runtime_resource.rcc parentdir.txt test.sources = testqrc/* diff --git a/tests/auto/qresourceengine/tst_resourceengine.cpp b/tests/auto/qresourceengine/tst_resourceengine.cpp index f349eaca67..dfdc4549a1 100644 --- a/tests/auto/qresourceengine/tst_resourceengine.cpp +++ b/tests/auto/qresourceengine/tst_resourceengine.cpp @@ -112,7 +112,7 @@ void tst_ResourceEngine::checkStructure_data() << QLatin1String("runtime_resource") << QLatin1String("searchpath1") << QLatin1String("searchpath2") << QLatin1String("secondary_root") - << QLatin1String("test") << QLatin1String("trolltech") + << QLatin1String("test") << QLatin1String("withoutslashes")) << QLocale::c() << qlonglong(0); diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index d96006dd37..3c9ea4c9a7 100644 --- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp +++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp @@ -72,6 +72,7 @@ private slots: void scopeChain(); void pushAndPopScope(); void getSetActivationObject(); + void inheritActivationAndThisObject(); void toString(); }; @@ -689,6 +690,35 @@ void tst_QScriptContext::getSetActivationObject() } } +static QScriptValue myEval(QScriptContext *ctx, QScriptEngine *eng) +{ + QString code = ctx->argument(0).toString(); + ctx->setActivationObject(ctx->parentContext()->activationObject()); + ctx->setThisObject(ctx->parentContext()->thisObject()); + return eng->evaluate(code); +} + +void tst_QScriptContext::inheritActivationAndThisObject() +{ + QScriptEngine eng; + eng.globalObject().setProperty("myEval", eng.newFunction(myEval)); + { + QScriptValue ret = eng.evaluate("var a = 123; myEval('a')"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } + { + QScriptValue ret = eng.evaluate("(function() { return myEval('this'); }).call(Number)"); + QVERIFY(ret.isFunction()); + QVERIFY(ret.equals(eng.globalObject().property("Number"))); + } + { + QScriptValue ret = eng.evaluate("(function(a) { return myEval('a'); })(123)"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } +} + static QScriptValue parentContextToString(QScriptContext *ctx, QScriptEngine *) { return ctx->parentContext()->toString(); diff --git a/tests/auto/qscriptengine/qscriptengine.pro b/tests/auto/qscriptengine/qscriptengine.pro index 6ff7b533ce..39484bd5cd 100644 --- a/tests/auto/qscriptengine/qscriptengine.pro +++ b/tests/auto/qscriptengine/qscriptengine.pro @@ -1,5 +1,5 @@ load(qttest_p4) -QT += script +QT = core gui script SOURCES += tst_qscriptengine.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index e9d9747ff3..ab4364ec24 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -122,6 +122,8 @@ private slots: void reentrancy(); void incDecNonObjectProperty(); void installTranslatorFunctions(); + void functionScopes(); + void nativeFunctionScopes(); }; tst_QScriptEngine::tst_QScriptEngine() @@ -891,6 +893,35 @@ void tst_QScriptEngine::getSetGlobalObject() QVERIFY(eng.globalObject().strictlyEquals(obj)); QVERIFY(eng.currentContext()->thisObject().strictlyEquals(obj)); QVERIFY(eng.currentContext()->activationObject().strictlyEquals(obj)); + + QVERIFY(!obj.property("foo").isValid()); + eng.evaluate("var foo = 123"); + { + QScriptValue ret = obj.property("foo"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } + + QVERIFY(!obj.property("bar").isValid()); + eng.evaluate("bar = 456"); + { + QScriptValue ret = obj.property("bar"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 456); + } + + QVERIFY(!obj.property("baz").isValid()); + eng.evaluate("this['baz'] = 789"); + { + QScriptValue ret = obj.property("baz"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 789); + } + + { + QScriptValue ret = eng.evaluate("(function() { return this; })()"); + QVERIFY(ret.strictlyEquals(obj)); + } } void tst_QScriptEngine::checkSyntax_data() @@ -3578,5 +3609,108 @@ void tst_QScriptEngine::installTranslatorFunctions() } } +void tst_QScriptEngine::functionScopes() +{ + QScriptEngine eng; + { + // top-level functions have only the global object in their scope + QScriptValue fun = eng.evaluate("(function() {})"); + QVERIFY(fun.isFunction()); + QVERIFY(fun.scope().isObject()); + QVERIFY(fun.scope().strictlyEquals(eng.globalObject())); + QVERIFY(!eng.globalObject().scope().isValid()); + } + { + QScriptValue fun = eng.globalObject().property("Object"); + QVERIFY(fun.isFunction()); + // native built-in functions don't have scope + QVERIFY(!fun.scope().isValid()); + } + { + // closure + QScriptValue fun = eng.evaluate("(function(arg) { var foo = arg; return function() { return foo; }; })(123)"); + QVERIFY(fun.isFunction()); + { + QScriptValue ret = fun.call(); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } + QScriptValue scope = fun.scope(); + QVERIFY(scope.isObject()); + { + QScriptValue ret = scope.property("foo"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + QCOMPARE(scope.propertyFlags("foo"), QScriptValue::Undeletable); + } + { + QScriptValue ret = scope.property("arg"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + QCOMPARE(scope.propertyFlags("arg"), QScriptValue::Undeletable | QScriptValue::SkipInEnumeration); + } + + scope.setProperty("foo", 456); + { + QScriptValue ret = fun.call(); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 456); + } + + scope = scope.scope(); + QVERIFY(scope.isObject()); + QVERIFY(scope.strictlyEquals(eng.globalObject())); + } +} + +static QScriptValue counter_inner(QScriptContext *ctx, QScriptEngine *) +{ + QScriptValue outerAct = ctx->callee().scope(); + double count = outerAct.property("count").toNumber(); + outerAct.setProperty("count", count+1); + return count; +} + +static QScriptValue counter(QScriptContext *ctx, QScriptEngine *eng) +{ + QScriptValue act = ctx->activationObject(); + act.setProperty("count", ctx->argument(0).toInt32()); + QScriptValue result = eng->newFunction(counter_inner); + result.setScope(act); + return result; +} + +static QScriptValue counter_hybrid(QScriptContext *ctx, QScriptEngine *eng) +{ + QScriptValue act = ctx->activationObject(); + act.setProperty("count", ctx->argument(0).toInt32()); + return eng->evaluate("function() { return count++; }"); +} + +void tst_QScriptEngine::nativeFunctionScopes() +{ + QScriptEngine eng; + { + QScriptValue fun = eng.newFunction(counter); + QScriptValue cnt = fun.call(QScriptValue(), QScriptValueList() << 123); + QVERIFY(cnt.isFunction()); + { + QScriptValue ret = cnt.call(); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } + } + { + QScriptValue fun = eng.newFunction(counter_hybrid); + QScriptValue cnt = fun.call(QScriptValue(), QScriptValueList() << 123); + QVERIFY(cnt.isFunction()); + { + QScriptValue ret = cnt.call(); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } + } +} + QTEST_MAIN(tst_QScriptEngine) #include "tst_qscriptengine.moc" diff --git a/tests/auto/qscriptqobject/qscriptqobject.pro b/tests/auto/qscriptqobject/qscriptqobject.pro index 57eacfe187..d28fbef055 100644 --- a/tests/auto/qscriptqobject/qscriptqobject.pro +++ b/tests/auto/qscriptqobject/qscriptqobject.pro @@ -1,5 +1,5 @@ load(qttest_p4) -QT += script +QT = core gui script SOURCES += tst_qscriptqobject.cpp symbian: { diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro index 98fd63d0e2..9efde800d6 100644 --- a/tests/auto/qscriptvalue/qscriptvalue.pro +++ b/tests/auto/qscriptvalue/qscriptvalue.pro @@ -1,5 +1,5 @@ load(qttest_p4) -QT += script +QT = core gui script SOURCES += tst_qscriptvalue.cpp diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index ff2df7a762..7939b4cb07 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -2148,6 +2148,14 @@ void tst_QScriptValue::getSetScope() QCOMPARE(object2.scope().strictlyEquals(object), true); + object.setProperty("foo", 123); + QVERIFY(!object2.property("foo").isValid()); + { + QScriptValue ret = object2.property("foo", QScriptValue::ResolveScope); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } + QScriptValue inv; inv.setScope(object); QCOMPARE(inv.scope().isValid(), false); diff --git a/tests/auto/qsharedpointer/qsharedpointer.pro b/tests/auto/qsharedpointer/qsharedpointer.pro index 6814786f51..bbd31d7c7a 100644 --- a/tests/auto/qsharedpointer/qsharedpointer.pro +++ b/tests/auto/qsharedpointer/qsharedpointer.pro @@ -1,9 +1,14 @@ load(qttest_p4) + SOURCES += tst_qsharedpointer.cpp \ forwarddeclaration.cpp \ - forwarddeclared.cpp + forwarddeclared.cpp \ + wrapper.cpp + +HEADERS += forwarddeclared.h \ + wrapper.h + QT = core !symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" -requires(contains(QT_CONFIG,private_tests)) + include(externaltests.pri) -HEADERS += forwarddeclared.h diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 65be4fe7c5..98fbeb53e4 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -41,8 +41,19 @@ #define QT_SHAREDPOINTER_TRACK_POINTERS #include "qsharedpointer.h" -#include "externaltests.h" #include <QtTest/QtTest> +#include <QtCore/QThread> +#include <QtCore/QVector> + +#include "externaltests.h" +#include "wrapper.h" + +#include <stdlib.h> +#include <time.h> + +namespace QtSharedPointer { + Q_CORE_EXPORT void internalSafetyCheckCleanCheck(); +} #ifdef Q_OS_SYMBIAN #define SRCDIR "." @@ -72,10 +83,34 @@ private slots: void constCorrectness(); void customDeleter(); void creating(); + void mixTrackingPointerCode(); + void threadStressTest_data(); + void threadStressTest(); void validConstructs(); void invalidConstructs_data(); void invalidConstructs(); + +public slots: + void cleanup() { check(); } + +public: + inline void check() + { +#ifdef QT_BUILD_INTERNAL + QtSharedPointer::internalSafetyCheckCleanCheck(); +#endif + } +}; + +template <typename Base> +class RefCountHack: public Base +{ +public: + using Base::d; }; +template<typename Base> static inline +QtSharedPointer::ExternalRefCountData *refCountData(const Base &b) +{ return static_cast<const RefCountHack<Base> *>(&b)->d; } class Data { @@ -160,8 +195,8 @@ void tst_QSharedPointer::basics() QVERIFY(! (ptr == otherData)); QVERIFY(! (otherData == ptr)); } - QVERIFY(!ptr.d || ptr.d->weakref == 1); - QVERIFY(!ptr.d || ptr.d->strongref == 1); + QVERIFY(!refCountData(ptr) || refCountData(ptr)->weakref == 1); + QVERIFY(!refCountData(ptr) || refCountData(ptr)->strongref == 1); { // create another object: @@ -173,8 +208,8 @@ void tst_QSharedPointer::basics() // otherData is deleted here } - QVERIFY(!ptr.d || ptr.d->weakref == 1); - QVERIFY(!ptr.d || ptr.d->strongref == 1); + QVERIFY(!refCountData(ptr) || refCountData(ptr)->weakref == 1); + QVERIFY(!refCountData(ptr) || refCountData(ptr)->strongref == 1); { // create a copy: @@ -190,8 +225,8 @@ void tst_QSharedPointer::basics() QCOMPARE(copy.data(), aData); QVERIFY(copy == aData); } - QVERIFY(!ptr.d || ptr.d->weakref == 1); - QVERIFY(!ptr.d || ptr.d->strongref == 1); + QVERIFY(!refCountData(ptr) || refCountData(ptr)->weakref == 1); + QVERIFY(!refCountData(ptr) || refCountData(ptr)->strongref == 1); { // create a weak reference: @@ -222,8 +257,8 @@ void tst_QSharedPointer::basics() QVERIFY(strong == ptr); QCOMPARE(strong.data(), aData); } - QVERIFY(!ptr.d || ptr.d->weakref == 1); - QVERIFY(!ptr.d || ptr.d->strongref == 1); + QVERIFY(!refCountData(ptr) || refCountData(ptr)->weakref == 1); + QVERIFY(!refCountData(ptr) || refCountData(ptr)->strongref == 1); // aData is deleted here } @@ -439,15 +474,15 @@ void tst_QSharedPointer::upCast() QVERIFY(baseptr == derivedptr); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QWeakPointer<DerivedData> derivedptr = qWeakPointerCast<DerivedData>(baseptr); QVERIFY(baseptr == derivedptr); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QWeakPointer<Data> weakptr = baseptr; @@ -455,16 +490,16 @@ void tst_QSharedPointer::upCast() QVERIFY(baseptr == derivedptr); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QSharedPointer<DerivedData> derivedptr = baseptr.staticCast<DerivedData>(); QVERIFY(baseptr == derivedptr); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); } class OtherObject: public QObject @@ -500,6 +535,7 @@ void tst_QSharedPointer::objectCast() QVERIFY(ptr == data); #endif } + check(); { const OtherObject *data = new OtherObject; @@ -527,6 +563,7 @@ void tst_QSharedPointer::objectCast() QVERIFY(ptr == data); #endif } + check(); { OtherObject *data = new OtherObject; @@ -568,6 +605,7 @@ void tst_QSharedPointer::objectCast() QVERIFY(otherptr.isNull()); #endif } + check(); } void tst_QSharedPointer::differentPointers() @@ -587,6 +625,7 @@ void tst_QSharedPointer::differentPointers() QVERIFY(baseptr == aData); QVERIFY(baseptr == aBase); } + check(); { DiffPtrDerivedData *aData = new DiffPtrDerivedData; @@ -601,6 +640,7 @@ void tst_QSharedPointer::differentPointers() QVERIFY(ptr == aBase); QVERIFY(baseptr == aData); } + check(); { DiffPtrDerivedData *aData = new DiffPtrDerivedData; @@ -617,6 +657,7 @@ void tst_QSharedPointer::differentPointers() QVERIFY(baseptr == aData); QVERIFY(baseptr == aBase); } + check(); } void tst_QSharedPointer::virtualBaseDifferentPointers() @@ -636,6 +677,7 @@ void tst_QSharedPointer::virtualBaseDifferentPointers() QVERIFY(baseptr == aData); QVERIFY(baseptr == aBase); } + check(); { VirtualDerived *aData = new VirtualDerived; @@ -652,6 +694,7 @@ void tst_QSharedPointer::virtualBaseDifferentPointers() QVERIFY(baseptr == aData); QVERIFY(baseptr == aBase); } + check(); } #ifndef QTEST_NO_RTTI @@ -666,8 +709,8 @@ void tst_QSharedPointer::dynamicCast() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QWeakPointer<Data> weakptr = baseptr; @@ -676,8 +719,8 @@ void tst_QSharedPointer::dynamicCast() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QSharedPointer<DerivedData> derivedptr = baseptr.dynamicCast<DerivedData>(); @@ -685,8 +728,8 @@ void tst_QSharedPointer::dynamicCast() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); } void tst_QSharedPointer::dynamicCastDifferentPointers() @@ -701,8 +744,8 @@ void tst_QSharedPointer::dynamicCastDifferentPointers() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QWeakPointer<Data> weakptr = baseptr; @@ -711,8 +754,8 @@ void tst_QSharedPointer::dynamicCastDifferentPointers() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QSharedPointer<DiffPtrDerivedData> derivedptr = baseptr.dynamicCast<DiffPtrDerivedData>(); @@ -720,8 +763,8 @@ void tst_QSharedPointer::dynamicCastDifferentPointers() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { Stuffing *nakedptr = dynamic_cast<Stuffing *>(baseptr.data()); @@ -746,8 +789,8 @@ void tst_QSharedPointer::dynamicCastVirtualBase() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QWeakPointer<Data> weakptr = baseptr; @@ -756,8 +799,8 @@ void tst_QSharedPointer::dynamicCastVirtualBase() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QSharedPointer<VirtualDerived> derivedptr = baseptr.dynamicCast<VirtualDerived>(); @@ -765,8 +808,8 @@ void tst_QSharedPointer::dynamicCastVirtualBase() QCOMPARE(derivedptr.data(), aData); QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); } void tst_QSharedPointer::dynamicCastFailure() @@ -778,15 +821,15 @@ void tst_QSharedPointer::dynamicCastFailure() QSharedPointer<DerivedData> derivedptr = qSharedPointerDynamicCast<DerivedData>(baseptr); QVERIFY(derivedptr.isNull()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); { QSharedPointer<DerivedData> derivedptr = baseptr.dynamicCast<DerivedData>(); QVERIFY(derivedptr.isNull()); } - QCOMPARE(int(baseptr.d->weakref), 1); - QCOMPARE(int(baseptr.d->strongref), 1); + QCOMPARE(int(refCountData(baseptr)->weakref), 1); + QCOMPARE(int(refCountData(baseptr)->strongref), 1); } #endif @@ -818,6 +861,7 @@ void tst_QSharedPointer::constCorrectness() ptr = cvptr.constCast<Data>(); #endif } + check(); { Data *aData = new Data; @@ -831,6 +875,7 @@ void tst_QSharedPointer::constCorrectness() QCOMPARE(cptr.data(), aData); QCOMPARE(cptr.operator->(), aData); } + check(); } static int customDeleterFnCallCount; @@ -840,9 +885,14 @@ void customDeleterFn(Data *ptr) delete ptr; } +static int refcount; + template <typename T> struct CustomDeleter { + CustomDeleter() { ++refcount; } + CustomDeleter(const CustomDeleter &) { ++refcount; } + ~CustomDeleter() { --refcount; } inline void operator()(T *ptr) { delete ptr; @@ -859,11 +909,13 @@ void tst_QSharedPointer::customDeleter() QSharedPointer<Data> ptr2(new Data, &Data::alsoDelete); QSharedPointer<Data> ptr3(new Data, &Data::virtualDelete); } + check(); { QSharedPointer<DerivedData> ptr(new DerivedData, &Data::doDelete); QSharedPointer<DerivedData> ptr2(new DerivedData, &Data::alsoDelete); QSharedPointer<DerivedData> ptr3(new DerivedData, &Data::virtualDelete); } + check(); customDeleterFnCallCount = 0; { @@ -872,6 +924,7 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(customDeleterFnCallCount, 0); } QCOMPARE(customDeleterFnCallCount, 1); + check(); customDeleterFnCallCount = 0; { @@ -881,6 +934,7 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(customDeleterFnCallCount, 1); } QCOMPARE(customDeleterFnCallCount, 1); + check(); customDeleterFnCallCount = 0; { @@ -890,6 +944,7 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(customDeleterFnCallCount, 1); } QCOMPARE(customDeleterFnCallCount, 1); + check(); customDeleterFnCallCount = 0; { @@ -898,6 +953,7 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(customDeleterFnCallCount, 0); } QCOMPARE(customDeleterFnCallCount, 1); + check(); customDeleterFnCallCount = 0; { @@ -906,6 +962,7 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(customDeleterFnCallCount, 0); } QCOMPARE(customDeleterFnCallCount, 1); + check(); customDeleterFnCallCount = 0; { @@ -918,6 +975,7 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(customDeleterFnCallCount, 0); } QCOMPARE(customDeleterFnCallCount, 1); + check(); customDeleterFnCallCount = 0; { @@ -930,7 +988,9 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(customDeleterFnCallCount, 0); } QCOMPARE(customDeleterFnCallCount, 1); + check(); + refcount = 0; CustomDeleter<Data> dataDeleter; dataDeleter.callCount = 0; { @@ -939,6 +999,8 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(dataDeleter.callCount, 0); } QCOMPARE(dataDeleter.callCount, 1); + QCOMPARE(refcount, 1); + check(); dataDeleter.callCount = 0; { @@ -948,6 +1010,8 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(dataDeleter.callCount, 0); } QCOMPARE(dataDeleter.callCount, 1); + QCOMPARE(refcount, 1); + check(); dataDeleter.callCount = 0; { @@ -960,6 +1024,8 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(dataDeleter.callCount, 0); } QCOMPARE(dataDeleter.callCount, 1); + QCOMPARE(refcount, 1); + check(); dataDeleter.callCount = 0; { @@ -968,6 +1034,8 @@ void tst_QSharedPointer::customDeleter() QCOMPARE(dataDeleter.callCount, 0); } QCOMPARE(dataDeleter.callCount, 1); + QCOMPARE(refcount, 1); + check(); CustomDeleter<DerivedData> derivedDataDeleter; derivedDataDeleter.callCount = 0; @@ -980,6 +1048,8 @@ void tst_QSharedPointer::customDeleter() } QCOMPARE(dataDeleter.callCount, 0); QCOMPARE(derivedDataDeleter.callCount, 1); + QCOMPARE(refcount, 2); + check(); derivedDataDeleter.callCount = 0; dataDeleter.callCount = 0; @@ -996,6 +1066,8 @@ void tst_QSharedPointer::customDeleter() } QCOMPARE(dataDeleter.callCount, 1); QCOMPARE(derivedDataDeleter.callCount, 0); + QCOMPARE(refcount, 2); + check(); derivedDataDeleter.callCount = 0; dataDeleter.callCount = 0; @@ -1012,6 +1084,7 @@ void tst_QSharedPointer::customDeleter() } QCOMPARE(dataDeleter.callCount, 0); QCOMPARE(derivedDataDeleter.callCount, 1); + QCOMPARE(refcount, 2); } void tst_QSharedPointer::creating() @@ -1029,12 +1102,13 @@ void tst_QSharedPointer::creating() ptr.clear(); QCOMPARE(Data::destructorCounter, 1); } + check(); Data::generationCounter = Data::destructorCounter = 0; { QSharedPointer<Data> ptr = QSharedPointer<Data>::create(); QWeakPointer<Data> weakptr = ptr; - QtSharedPointer::ExternalRefCountData *d = ptr.d; + QtSharedPointer::ExternalRefCountData *d = refCountData(ptr); ptr.clear(); QVERIFY(ptr.isNull()); @@ -1044,6 +1118,7 @@ void tst_QSharedPointer::creating() QVERIFY(d->weakref == 1); QVERIFY(d->strongref == 0); } + check(); Data::generationCounter = Data::destructorCounter = 0; DerivedData::derivedDestructorCounter = 0; @@ -1056,6 +1131,7 @@ void tst_QSharedPointer::creating() QCOMPARE(Data::destructorCounter, 1); QCOMPARE(DerivedData::derivedDestructorCounter, 1); } + check(); { QSharedPointer<Data> ptr = QSharedPointer<DiffPtrDerivedData>::create(); @@ -1064,6 +1140,7 @@ void tst_QSharedPointer::creating() QCOMPARE(ptr.staticCast<DiffPtrDerivedData>()->buffer[3]+0, 16-3); QCOMPARE(ptr.staticCast<DiffPtrDerivedData>()->buffer[0]+0, 16); } + check(); { QSharedPointer<VirtualDerived> ptr = QSharedPointer<VirtualDerived>::create(); @@ -1073,6 +1150,7 @@ void tst_QSharedPointer::creating() QSharedPointer<Data> baseptr = ptr; QCOMPARE(baseptr->classLevel(), 4); } + check(); { QSharedPointer<QObject> ptr = QSharedPointer<QObject>::create(); @@ -1083,11 +1161,148 @@ void tst_QSharedPointer::creating() QVERIFY(qptr.isNull()); } + check(); { QSharedPointer<QObject> ptr = QSharedPointer<OtherObject>::create(); QCOMPARE(ptr->metaObject(), &OtherObject::staticMetaObject); } + check(); +} + +void tst_QSharedPointer::mixTrackingPointerCode() +{ + { + // pointer created with tracking + // deleted in code without tracking + QSharedPointer<int> ptr = QSharedPointer<int>(new int(42)); + Wrapper w(ptr); + ptr.clear(); + } + check(); + + { + // pointer created without tracking + // deleted in code with tracking + Wrapper w = Wrapper::create(); + w.ptr.clear(); + } +} + +class ThreadData +{ + QAtomicInt * volatile ptr; +public: + ThreadData(QAtomicInt *p) : ptr(p) { } + ~ThreadData() { ++ptr; } + void ref() + { + // if we're called after the destructor, we'll crash + ptr->ref(); + } +}; + +class StrongThread: public QThread +{ +protected: + void run() + { + usleep(rand() % 2000); + ptr->ref(); + ptr.clear(); + } +public: + QSharedPointer<ThreadData> ptr; +}; + +class WeakThread: public QThread +{ +protected: + void run() + { + usleep(rand() % 2000); + QSharedPointer<ThreadData> ptr = weak; + if (ptr) + ptr->ref(); + ptr.clear(); + } +public: + QWeakPointer<ThreadData> weak; +}; + +void tst_QSharedPointer::threadStressTest_data() +{ + QTest::addColumn<int>("strongThreadCount"); + QTest::addColumn<int>("weakThreadCount"); + + QTest::newRow("0+0") << 0 << 0; + QTest::newRow("1+0") << 1 << 0; + QTest::newRow("2+0") << 2 << 0; + QTest::newRow("10+0") << 10 << 0; + + QTest::newRow("0+1") << 0 << 1; + QTest::newRow("1+1") << 1 << 1; + + QTest::newRow("2+10") << 2 << 10; + QTest::newRow("5+10") << 5 << 10; + QTest::newRow("5+30") << 5 << 30; + + QTest::newRow("100+100") << 100 << 100; +} + +void tst_QSharedPointer::threadStressTest() +{ + QFETCH(int, strongThreadCount); + QFETCH(int, weakThreadCount); + + int guard1[128]; + QAtomicInt counter; + int guard2[128]; + + memset(guard1, 0, sizeof guard1); + memset(guard2, 0, sizeof guard2); + + for (int r = 0; r < 5; ++r) { + QVector<QThread*> allThreads(6 * qMax(strongThreadCount, weakThreadCount) + 3, 0); + QSharedPointer<ThreadData> base = QSharedPointer<ThreadData>(new ThreadData(&counter)); + counter = 0; + + // set the pointers + for (int i = 0; i < strongThreadCount; ++i) { + StrongThread *t = new StrongThread; + t->ptr = base; + allThreads[2 * i] = t; + } + for (int i = 0; i < weakThreadCount; ++i) { + WeakThread *t = new WeakThread; + t->weak = base; + allThreads[6 * i + 3] = t; + } + + base.clear(); + + srand(time(NULL)); + // start threads + for (int i = 0; i < allThreads.count(); ++i) + if (allThreads[i]) allThreads[i]->start(); + + // wait for them to finish + for (int i = 0; i < allThreads.count(); ++i) + if (allThreads[i]) allThreads[i]->wait(); + qDeleteAll(allThreads); + + // ensure the guards aren't touched + for (uint i = 0; i < sizeof guard1 / sizeof guard1[0]; ++i) + QVERIFY(!guard1[i]); + for (uint i = 0; i < sizeof guard2 / sizeof guard2[0]; ++i) + QVERIFY(!guard2[i]); + + // verify that the count is the right range + int minValue = strongThreadCount; + int maxValue = strongThreadCount + weakThreadCount; + QVERIFY(counter >= minValue); + QVERIFY(counter <= maxValue); + } } void tst_QSharedPointer::validConstructs() @@ -1199,6 +1414,7 @@ void tst_QSharedPointer::invalidConstructs_data() "QSharedPointer<Data> b;\n" "if (a + b) return;"; +#if QT_VERSION >= 0x040600 // two objects with the same pointer QTest::newRow("same-pointer") << &QTest::QExternalTest::tryRunFail @@ -1212,6 +1428,7 @@ void tst_QSharedPointer::invalidConstructs_data() << "Data *aData = new Data;\n" "QSharedPointer<Data> ptr1 = QSharedPointer<Data>(aData);" "ptr1 = QSharedPointer<Data>(aData);"; +#endif // any type of cast for unrelated types: // (we have no reinterpret_cast) diff --git a/doc/src/compatclasses.qdoc b/tests/auto/qsharedpointer/wrapper.cpp index cb6d7dd9c7..7640e6846a 100644 --- a/doc/src/compatclasses.qdoc +++ b/tests/auto/qsharedpointer/wrapper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,16 +39,22 @@ ** ****************************************************************************/ -/*! - \page compatclasses.html - \title Qt 3 Compatibility Classes - \ingroup classlists +#ifdef QT_SHAREDPOINTER_TRACK_POINTERS +# undef QT_SHAREDPOINTER_TRACK_POINTERS +#endif +#include <QtCore/qsharedpointer.h> +#include "wrapper.h" - This is a list of the classes that Qt provides for compatibility - with Qt 3. The vast majority of these are provided by the - Qt3Support module. +Wrapper::Wrapper(const QSharedPointer<int> &value) + : ptr(value) +{ +} - \generatelist compatclasses +Wrapper::~Wrapper() +{ +} - \sa {Qt's Classes}, {Qt's Modules} -*/ +Wrapper Wrapper::create() +{ + return Wrapper(QSharedPointer<int>(new int(-47))); +} diff --git a/doc/src/mainclasses.qdoc b/tests/auto/qsharedpointer/wrapper.h index 33bb91a8f9..a888063ed5 100644 --- a/doc/src/mainclasses.qdoc +++ b/tests/auto/qsharedpointer/wrapper.h @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -38,14 +38,18 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#ifndef WRAPPER_H +#define WRAPPER_H -/*! - \page mainclasses.html - \title Qt's Main Classes - \ingroup classlists +template <class T> class QSharedPointer; +class Wrapper +{ +public: + QSharedPointer<int> ptr; + Wrapper(const QSharedPointer<int> &); + ~Wrapper(); - These are the most frequently used Qt classes. For the complete - list see \link classes.html Qt's Classes \endlink. + static Wrapper create(); +}; - \generatelist mainclasses -*/ +#endif // WRAPPER_H diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index e1f1d3c1b6..4cf8d562a6 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -2028,8 +2028,8 @@ void tst_QSqlDatabase::mysql_multiselect() QVERIFY_SQL(q, exec("select version()")); QVERIFY_SQL(q, next()); QString version=tst_Databases::getMySqlVersion( db ); - int ver=version.section(QChar::fromLatin1('.'),0,1).toDouble(); - if (ver >= 4.1) + double ver=version.section(QChar::fromLatin1('.'),0,1).toDouble(); + if (ver < 4.1) QSKIP("Test requires MySQL >= 4.1", SkipSingle); QVERIFY_SQL(q, exec("SELECT * FROM " + qTableName("qtest") + "; SELECT * FROM " + qTableName("qtest"))); diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp index 1e23d3d9ab..d836486a1f 100644 --- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp +++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp @@ -930,13 +930,15 @@ void tst_QSqlRelationalTableModel::casing() QSqlQuery q(db); QVERIFY_SQL( q, exec("create table " + qTableName("CASETEST1", db.driver()).toUpper() + " (id int not null primary key, name varchar(20), title_key int, another_title_key int)")); + + if( !q.exec("create table " + qTableName("casetest1", db.driver()) + + " (ident int not null primary key, name varchar(20), title_key int)")) + QSKIP("The casing test for this database is irrelevant since this database does not treat different cases as separate entities", SkipAll); + QVERIFY_SQL( q, exec("insert into " + qTableName("CASETEST1", db.driver()).toUpper() + " values(1, 'harry', 1, 2)")); QVERIFY_SQL( q, exec("insert into " + qTableName("CASETEST1", db.driver()).toUpper() + " values(2, 'trond', 2, 1)")); QVERIFY_SQL( q, exec("insert into " + qTableName("CASETEST1", db.driver()).toUpper() + " values(3, 'vohi', 1, 2)")); QVERIFY_SQL( q, exec("insert into " + qTableName("CASETEST1", db.driver()).toUpper() + " values(4, 'boris', 2, 2)")); - - QVERIFY_SQL( q, exec("create table " + qTableName("casetest1", db.driver()) + - " (ident int not null primary key, name varchar(20), title_key int)")); QVERIFY_SQL( q, exec("insert into " + qTableName("casetest1", db.driver()) + " values(1, 'jerry', 1)")); QVERIFY_SQL( q, exec("insert into " + qTableName("casetest1", db.driver()) + " values(2, 'george', 2)")); QVERIFY_SQL( q, exec("insert into " + qTableName("casetest1", db.driver()) + " values(4, 'kramer', 2)")); diff --git a/tests/auto/qstate/tst_qstate.cpp b/tests/auto/qstate/tst_qstate.cpp index 78b98530d2..43ea7fe56b 100644 --- a/tests/auto/qstate/tst_qstate.cpp +++ b/tests/auto/qstate/tst_qstate.cpp @@ -250,8 +250,9 @@ class EventTestTransition: public QAbstractTransition { public: EventTestTransition(QEvent::Type type, QState *targetState) - : QAbstractTransition(QList<QAbstractState*>() << targetState), m_type(type) - { + : QAbstractTransition(), m_type(type) + { + setTargetState(targetState); } protected: diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index 7f4d9f55c6..97115bbad6 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -192,6 +192,7 @@ private slots: // void overrideDefaultTargetAnimationWithSource(); void nestedStateMachines(); + void goToState(); }; tst_QStateMachine::tst_QStateMachine() @@ -225,7 +226,8 @@ class TestTransition : public QAbstractTransition { public: TestTransition(QAbstractState *target) - : QAbstractTransition(QList<QAbstractState*>() << target) {} + : QAbstractTransition() + { setTargetState(target); } QList<int> triggers; protected: virtual bool eventTest(QEvent *) { @@ -248,7 +250,8 @@ class EventTransition : public QAbstractTransition { public: EventTransition(QEvent::Type type, QAbstractState *target, QState *parent = 0) - : QAbstractTransition(QList<QAbstractState*>() << target, parent), m_type(type) {} + : QAbstractTransition(parent), m_type(type) + { setTargetState(target); } protected: virtual bool eventTest(QEvent *e) { return (e->type() == m_type); @@ -1513,7 +1516,8 @@ class StringTransition : public QAbstractTransition { public: StringTransition(const QString &value, QAbstractState *target) - : QAbstractTransition(QList<QAbstractState*>() << target), m_value(value) {} + : QAbstractTransition(), m_value(value) + { setTargetState(target); } protected: virtual bool eventTest(QEvent *e) @@ -1736,7 +1740,8 @@ public: : QSignalTransition(sourceState) {} TestSignalTransition(QObject *sender, const char *signal, QAbstractState *target) - : QSignalTransition(sender, signal, QList<QAbstractState*>() << target) {} + : QSignalTransition(sender, signal) + { setTargetState(target); } QVariantList argumentsReceived() const { return m_args; } @@ -2021,20 +2026,15 @@ void tst_QStateMachine::signalTransitions() void tst_QStateMachine::eventTransitions() { QPushButton button; - for (int x = 0; x < 2; ++x) { + { QStateMachine machine; QState *s0 = new QState(&machine); QFinalState *s1 = new QFinalState(&machine); QMouseEventTransition *trans; - if (x == 0) { - trans = new QMouseEventTransition(&button, QEvent::MouseButtonPress, Qt::LeftButton); - QCOMPARE(trans->targetState(), (QAbstractState*)0); - trans->setTargetState(s1); - } else { - trans = new QMouseEventTransition(&button, QEvent::MouseButtonPress, - Qt::LeftButton, QList<QAbstractState*>() << s1); - } + trans = new QMouseEventTransition(&button, QEvent::MouseButtonPress, Qt::LeftButton); + QCOMPARE(trans->targetState(), (QAbstractState*)0); + trans->setTargetState(s1); QCOMPARE(trans->eventType(), QEvent::MouseButtonPress); QCOMPARE(trans->button(), Qt::LeftButton); QCOMPARE(trans->targetState(), (QAbstractState*)s1); @@ -2070,7 +2070,7 @@ void tst_QStateMachine::eventTransitions() QTest::mousePress(&button2, Qt::LeftButton); QTRY_COMPARE(finishedSpy.count(), 4); } - for (int x = 0; x < 3; ++x) { + for (int x = 0; x < 2; ++x) { QStateMachine machine; QState *s0 = new QState(&machine); QFinalState *s1 = new QFinalState(&machine); @@ -2086,9 +2086,6 @@ void tst_QStateMachine::eventTransitions() } else if (x == 1) { trans = new QEventTransition(&button, QEvent::MouseButtonPress); trans->setTargetState(s1); - } else { - trans = new QEventTransition(&button, QEvent::MouseButtonPress, - QList<QAbstractState*>() << s1); } QCOMPARE(trans->eventObject(), (QObject*)&button); QCOMPARE(trans->eventType(), QEvent::MouseButtonPress); @@ -3900,5 +3897,45 @@ void tst_QStateMachine::nestedStateMachines() QTRY_COMPARE(finishedSpy.count(), 1); } +void tst_QStateMachine::goToState() +{ + QStateMachine machine; + QState *s1 = new QState(&machine); + QState *s2 = new QState(&machine); + machine.setInitialState(s1); + QSignalSpy startedSpy(&machine, SIGNAL(started())); + machine.start(); + QTRY_COMPARE(startedSpy.count(), 1); + + QStateMachinePrivate::get(&machine)->goToState(s2); + QCoreApplication::processEvents(); + QCOMPARE(machine.configuration().size(), 1); + QVERIFY(machine.configuration().contains(s2)); + + QStateMachinePrivate::get(&machine)->goToState(s2); + QCoreApplication::processEvents(); + QCOMPARE(machine.configuration().size(), 1); + QVERIFY(machine.configuration().contains(s2)); + + QStateMachinePrivate::get(&machine)->goToState(s1); + QStateMachinePrivate::get(&machine)->goToState(s2); + QStateMachinePrivate::get(&machine)->goToState(s1); + QCOMPARE(machine.configuration().size(), 1); + QVERIFY(machine.configuration().contains(s2)); + + QCoreApplication::processEvents(); + QCOMPARE(machine.configuration().size(), 1); + QVERIFY(machine.configuration().contains(s1)); + + // go to state in group + QState *s2_1 = new QState(s2); + s2->setInitialState(s2_1); + QStateMachinePrivate::get(&machine)->goToState(s2_1); + QCoreApplication::processEvents(); + QCOMPARE(machine.configuration().size(), 2); + QVERIFY(machine.configuration().contains(s2)); + QVERIFY(machine.configuration().contains(s2_1)); +} + QTEST_MAIN(tst_QStateMachine) #include "tst_qstatemachine.moc" diff --git a/tests/auto/qtcpsocket/qtcpsocket.pro b/tests/auto/qtcpsocket/qtcpsocket.pro index f18b471747..4bbec23dc2 100644 --- a/tests/auto/qtcpsocket/qtcpsocket.pro +++ b/tests/auto/qtcpsocket/qtcpsocket.pro @@ -2,4 +2,4 @@ TEMPLATE = subdirs !wince*: SUBDIRS = test stressTest -wince* | symbian* : SUBDIRS = test +wince*|symbian*|vxworks* : SUBDIRS = test diff --git a/tests/auto/qtcpsocket/test/test.pro b/tests/auto/qtcpsocket/test/test.pro index 5d6c3b1ca2..0f93deffe0 100644 --- a/tests/auto/qtcpsocket/test/test.pro +++ b/tests/auto/qtcpsocket/test/test.pro @@ -9,6 +9,7 @@ wince*: { } } QT += network +vxworks:QT -= gui symbian: TARGET.EPOCHEAPSIZE="0x100 0x1000000" diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index ed842731d8..44e655053c 100644 --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp @@ -63,10 +63,12 @@ #include <QHostAddress> #include <QHostInfo> #include <QMap> +#ifndef Q_OS_VXWORKS #include <QMessageBox> +#include <QPushButton> +#endif #include <QPointer> #include <QProcess> -#include <QPushButton> #include <QStringList> #include <QTcpServer> #include <QTcpSocket> @@ -174,9 +176,7 @@ private slots: void connectToLocalHostNoService(); #endif void waitForConnectedInHostLookupSlot(); -#ifndef Q_OS_WIN void waitForConnectedInHostLookupSlot2(); -#endif void readyReadSignalsAfterWaitForReadyRead(); #ifdef Q_OS_LINUX void linuxKernelBugLocalSocket(); @@ -1599,6 +1599,7 @@ void tst_QTcpSocket::remoteCloseErrorSlot() void tst_QTcpSocket::messageBoxSlot() { +#if !defined(Q_OS_VXWORKS) // no gui QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender()); socket->deleteLater(); QMessageBox box; @@ -1609,10 +1610,14 @@ void tst_QTcpSocket::messageBoxSlot() // Fire a non-0 singleshot to leave time for the delete QTimer::singleShot(250, this, SLOT(exitLoopSlot())); +#endif } //---------------------------------------------------------------------------------- void tst_QTcpSocket::openMessageBoxInErrorSlot() { +#if defined(Q_OS_VXWORKS) // no gui + QSKIP("no default gui available on VxWorks", SkipAll); +#else QTcpSocket *socket = newSocket(); QPointer<QTcpSocket> p(socket); connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(messageBoxSlot())); @@ -1620,6 +1625,7 @@ void tst_QTcpSocket::openMessageBoxInErrorSlot() socket->connectToHost("hostnotfoundhostnotfound.troll.no", 9999); // Host not found, fyi enterLoop(30); QVERIFY(!p); +#endif } //---------------------------------------------------------------------------------- @@ -1738,9 +1744,12 @@ public slots: }; //---------------------------------------------------------------------------------- -#ifndef Q_OS_WIN void tst_QTcpSocket::waitForConnectedInHostLookupSlot2() { +#if defined(Q_OS_WIN) || defined(Q_OS_VXWORKS) + QSKIP("waitForConnectedInHostLookupSlot2 is not run on Windows and VxWorks", SkipAll); +#else + Foo foo; QPushButton top("Go", 0); top.show(); @@ -1754,9 +1763,9 @@ void tst_QTcpSocket::waitForConnectedInHostLookupSlot2() QFAIL("Network timeout"); QVERIFY(foo.attemptedToConnect); - QCOMPARE(foo.count, 1); -} + QCOMPARE(foo.count, 1); #endif +} //---------------------------------------------------------------------------------- void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead() @@ -1999,7 +2008,7 @@ void tst_QTcpSocket::suddenRemoteDisconnect_data() void tst_QTcpSocket::suddenRemoteDisconnect() { -#if defined(Q_OS_WINCE) +#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS) QSKIP("stressTest subprocess needs Qt3Support", SkipAll); #elif defined( Q_OS_SYMBIAN ) QSKIP("Symbian: QProcess IO is not yet supported, fix when supported", SkipAll); @@ -2058,6 +2067,9 @@ void tst_QTcpSocket::connectToMultiIP() { QSKIP("TODO: setup DNS in the new network", SkipAll); +#if defined(Q_OS_VXWORKS) + QSKIP("VxSim in standard config doesn't even run a DNS resolver", SkipAll); +#else QFETCH_GLOBAL(bool, ssl); if (ssl) return; @@ -2085,6 +2097,7 @@ void tst_QTcpSocket::connectToMultiIP() QCOMPARE(socket->error(), QAbstractSocket::SocketTimeoutError); delete socket; +#endif } //---------------------------------------------------------------------------------- diff --git a/tests/auto/qthreadonce/tst_qthreadonce.cpp b/tests/auto/qthreadonce/tst_qthreadonce.cpp index 590de0fb22..5d9062d6d5 100644 --- a/tests/auto/qthreadonce/tst_qthreadonce.cpp +++ b/tests/auto/qthreadonce/tst_qthreadonce.cpp @@ -134,7 +134,7 @@ void tst_QThreadOnce::sameThread() void tst_QThreadOnce::multipleThreads() { -#ifdef Q_OS_WINCE +#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS) const int NumberOfThreads = 20; #else const int NumberOfThreads = 100; diff --git a/tests/auto/qthreadpool/tst_qthreadpool.cpp b/tests/auto/qthreadpool/tst_qthreadpool.cpp index 1111ecc9a0..d4c131d01a 100644 --- a/tests/auto/qthreadpool/tst_qthreadpool.cpp +++ b/tests/auto/qthreadpool/tst_qthreadpool.cpp @@ -205,7 +205,8 @@ void tst_QThreadPool::runTask() ran = false; manager.start(new TestTask()); // Hang if task is not runned. - while (ran == false); + while (ran == false) + QTest::qSleep(100); // no busy loop - this doesn't work with FIFO schedulers } /* @@ -215,7 +216,8 @@ void tst_QThreadPool::singleton() { ran = false; QThreadPool::globalInstance()->start(new TestTask()); - while (ran == false); + while (ran == false) + QTest::qSleep(100); // no busy loop - this doesn't work with FIFO schedulers } int *value = 0; diff --git a/tests/auto/qxmlsimplereader/parser/main.cpp b/tests/auto/qxmlsimplereader/parser/main.cpp index 4834428a2f..ffb2ecdc40 100644 --- a/tests/auto/qxmlsimplereader/parser/main.cpp +++ b/tests/auto/qxmlsimplereader/parser/main.cpp @@ -42,6 +42,7 @@ #include <string.h> #include <errno.h> +#include <stdlib.h> #include <qfile.h> #include <qstring.h> diff --git a/tests/auto/selftests/expected_longstring.txt b/tests/auto/selftests/expected_longstring.txt new file mode 100644 index 0000000000..4abdb23e70 --- /dev/null +++ b/tests/auto/selftests/expected_longstring.txt @@ -0,0 +1,16 @@ +********* Start testing of tst_LongString ********* +Config: Using QTest library 4.6.0, Qt 4.6.0 +PASS : tst_LongString::initTestCase() +FAIL! : tst_LongString::failWithLongString() Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. + +Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. + +Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. + +Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. Phasellus consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent turpis. + +Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis. Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus. Ut varius tincidunt libero. Phasellus dolor. Maecenas vestibulum mollis diam. Pellentesque ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + Loc: [/home/rmcgover/depot/qt/master/tests/auto/selftests/longstring/tst_longstring.cpp(67)] +PASS : tst_LongString::cleanupTestCase() +Totals: 2 passed, 1 failed, 0 skipped +********* Finished testing of tst_LongString ********* diff --git a/tests/auto/selftests/longstring/longstring.pro b/tests/auto/selftests/longstring/longstring.pro new file mode 100644 index 0000000000..b917481764 --- /dev/null +++ b/tests/auto/selftests/longstring/longstring.pro @@ -0,0 +1,10 @@ +load(qttest_p4) +SOURCES += tst_longstring.cpp +QT = core + +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target + + +TARGET = longstring + diff --git a/tests/auto/selftests/longstring/tst_longstring.cpp b/tests/auto/selftests/longstring/tst_longstring.cpp new file mode 100644 index 0000000000..a708fa7827 --- /dev/null +++ b/tests/auto/selftests/longstring/tst_longstring.cpp @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include <QtCore> +#include <QtTest/QtTest> + +char const lipsum[] = +"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.\n\n" +"Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia.\n\n" +"Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi.\n\n" +"Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. Phasellus consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent turpis.\n\n" +"Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis. Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus. Ut varius tincidunt libero. Phasellus dolor. Maecenas vestibulum mollis diam. Pellentesque ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas." +; + +/*! + \internal + */ +class tst_LongString: public QObject +{ + Q_OBJECT + +private slots: + void failWithLongString() const; +}; + +void tst_LongString::failWithLongString() const +{ + QFAIL(lipsum); +} + +QTEST_MAIN(tst_LongString) + +#include "tst_longstring.moc" diff --git a/tests/auto/selftests/selftests.pro b/tests/auto/selftests/selftests.pro index 45de658fa5..d854b5e5b5 100644 --- a/tests/auto/selftests/selftests.pro +++ b/tests/auto/selftests/selftests.pro @@ -5,7 +5,7 @@ SUBDIRS = subtest test warnings maxwarnings cmptest globaldata skipglobal skip \ skipinit skipinitdata datetime singleskip assert waitwithoutgui differentexec \ exceptionthrow qexecstringlist datatable commandlinedata\ benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \ - benchliboptions xunit badxml + benchliboptions xunit badxml longstring INSTALLS = diff --git a/tests/auto/selftests/selftests.qrc b/tests/auto/selftests/selftests.qrc index 3d78bf55a2..4b754058d2 100644 --- a/tests/auto/selftests/selftests.qrc +++ b/tests/auto/selftests/selftests.qrc @@ -36,5 +36,6 @@ <file>expected_benchliboptions.txt</file> <file>expected_benchlibtickcounter.txt</file> <file>expected_xunit.txt</file> + <file>expected_longstring.txt</file> </qresource> </RCC> diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp index 8eb7fe1e72..76a005bd32 100644 --- a/tests/auto/selftests/tst_selftests.cpp +++ b/tests/auto/selftests/tst_selftests.cpp @@ -184,13 +184,15 @@ void tst_Selftests::runSubTest_data() QTest::newRow("benchliboptions") << "benchliboptions" << QStringList("-eventcounter"); QTest::newRow("benchlibwalltime") << "benchlibwalltime" << QStringList(); - //### QWS tests are currently run on a virtual machine, where ticks are not - //### monotonously increasing -#if defined(HAVE_TICK_COUNTER) && !defined(Q_WS_QWS) + //### This test is affected by the speed of the CPU and whether the tick counter is + //### monotonically increasing. It won't work on some machines so leave it off by default. + //### Feel free to uncomment for your own testing. +#if 0 QTest::newRow("benchlibtickcounter") << "benchlibtickcounter" << QStringList("-tickcounter"); #endif QTest::newRow("xunit") << "xunit" << QStringList("-xunitxml"); + QTest::newRow("longstring") << "longstring" << QStringList(); } diff --git a/tests/auto/uic3/uic3.pro b/tests/auto/uic3/uic3.pro index 520f95a2f7..72a1304f01 100644 --- a/tests/auto/uic3/uic3.pro +++ b/tests/auto/uic3/uic3.pro @@ -6,3 +6,6 @@ TARGET = tst_uic3 # This test is not run on wince (I think) DEFINES += SRCDIR=\\\"$$PWD\\\" + +requires(contains(QT_CONFIG,qt3support)) + diff --git a/tests/manual/qdesktopwidget/main.cpp b/tests/manual/qdesktopwidget/main.cpp index 1afc82eeff..2cbdfb9dda 100644 --- a/tests/manual/qdesktopwidget/main.cpp +++ b/tests/manual/qdesktopwidget/main.cpp @@ -130,7 +130,7 @@ private slots: screenNumber->setBrush(fillBrush); screenNumber->setFont(QFont("Arial Black", 18)); screenNumber->setTransform(QTransform().scale(10, 10)); - screenNumber->setTransformOrigin(screenNumber->boundingRect().center()); + screenNumber->setTransformOriginPoint(screenNumber->boundingRect().center()); QSizeF center = (workRect.size() - screenNumber->boundingRect().size()) / 2; screenNumber->setPos(center.width(), center.height()); diff --git a/tests/manual/windowflags/controllerwindow.cpp b/tests/manual/windowflags/controllerwindow.cpp new file mode 100644 index 0000000000..055ff40517 --- /dev/null +++ b/tests/manual/windowflags/controllerwindow.cpp @@ -0,0 +1,263 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui> + +#include "controllerwindow.h" + +//! [0] +ControllerWindow::ControllerWindow() +{ + parentWindow = new QMainWindow; + parentWindow->setWindowTitle(tr("Preview parent window")); + QLabel *label = new QLabel(tr("Parent window")); + parentWindow->setCentralWidget(label); + + previewWindow = new PreviewWindow; + previewDialog = new PreviewDialog; + + createTypeGroupBox(); + createHintsGroupBox(); + + quitButton = new QPushButton(tr("&Quit")); + connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); + + QHBoxLayout *bottomLayout = new QHBoxLayout; + bottomLayout->addStretch(); + bottomLayout->addWidget(quitButton); + + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(widgetTypeGroupBox); + mainLayout->addWidget(additionalOptionsGroupBox); + mainLayout->addWidget(typeGroupBox); + mainLayout->addWidget(hintsGroupBox); + mainLayout->addLayout(bottomLayout); + setLayout(mainLayout); + + setWindowTitle(tr("Window Flags")); + updatePreview(); +} + +void ControllerWindow::updatePreview() +{ + Qt::WindowFlags flags = 0; + + if (windowRadioButton->isChecked()) { + flags = Qt::Window; + } else if (dialogRadioButton->isChecked()) { + flags = Qt::Dialog; + } else if (sheetRadioButton->isChecked()) { + flags = Qt::Sheet; + } else if (drawerRadioButton->isChecked()) { + flags = Qt::Drawer; + } else if (popupRadioButton->isChecked()) { + flags = Qt::Popup; + } else if (toolRadioButton->isChecked()) { + flags = Qt::Tool; + } else if (toolTipRadioButton->isChecked()) { + flags = Qt::ToolTip; + } else if (splashScreenRadioButton->isChecked()) { + flags = Qt::SplashScreen; + } + + if (msWindowsFixedSizeDialogCheckBox->isChecked()) + flags |= Qt::MSWindowsFixedSizeDialogHint; + if (x11BypassWindowManagerCheckBox->isChecked()) + flags |= Qt::X11BypassWindowManagerHint; + if (framelessWindowCheckBox->isChecked()) + flags |= Qt::FramelessWindowHint; + if (windowTitleCheckBox->isChecked()) + flags |= Qt::WindowTitleHint; + if (windowSystemMenuCheckBox->isChecked()) + flags |= Qt::WindowSystemMenuHint; + if (windowMinimizeButtonCheckBox->isChecked()) + flags |= Qt::WindowMinimizeButtonHint; + if (windowMaximizeButtonCheckBox->isChecked()) + flags |= Qt::WindowMaximizeButtonHint; + if (windowCloseButtonCheckBox->isChecked()) + flags |= Qt::WindowCloseButtonHint; + if (windowContextHelpButtonCheckBox->isChecked()) + flags |= Qt::WindowContextHelpButtonHint; + if (windowShadeButtonCheckBox->isChecked()) + flags |= Qt::WindowShadeButtonHint; + if (windowStaysOnTopCheckBox->isChecked()) + flags |= Qt::WindowStaysOnTopHint; + if (windowStaysOnBottomCheckBox->isChecked()) + flags |= Qt::WindowStaysOnBottomHint; + if (customizeWindowHintCheckBox->isChecked()) + flags |= Qt::CustomizeWindowHint; + + previewWindow->hide(); + previewDialog->hide(); + QWidget *widget = 0; + if (previewWidgetButton->isChecked()) + widget = previewWindow; + else + widget = previewDialog; + + if (modalWindowCheckBox->isChecked()) { + parentWindow->show(); + widget->setWindowModality(Qt::WindowModal); + widget->setParent(parentWindow); + } else { + widget->setWindowModality(Qt::NonModal); + widget->setParent(0); + parentWindow->hide(); + } + + widget->setWindowFlags(flags); + + if (fixedSizeWindowCheckBox->isChecked()) { + widget->setFixedSize(300, 300); + } else { + widget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + } + + QPoint pos = widget->pos(); + if (pos.x() < 0) + pos.setX(0); + if (pos.y() < 0) + pos.setY(0); + widget->move(pos); + widget->show(); +} + +void ControllerWindow::createTypeGroupBox() +{ + widgetTypeGroupBox = new QGroupBox(tr("Widget Type")); + previewWidgetButton = createRadioButton(tr("QWidget")); + previewWidgetButton->setChecked(true); + previewDialogButton = createRadioButton(tr("QDialog")); + QHBoxLayout *l = new QHBoxLayout; + l->addWidget(previewWidgetButton); + l->addWidget(previewDialogButton); + widgetTypeGroupBox->setLayout(l); + + additionalOptionsGroupBox = new QGroupBox(tr("Additional options")); + l = new QHBoxLayout; + modalWindowCheckBox = createCheckBox(tr("Modal window")); + fixedSizeWindowCheckBox = createCheckBox(tr("Fixed size window")); + l->addWidget(modalWindowCheckBox); + l->addWidget(fixedSizeWindowCheckBox); + additionalOptionsGroupBox->setLayout(l); + + typeGroupBox = new QGroupBox(tr("Type")); + + windowRadioButton = createRadioButton(tr("Window")); + dialogRadioButton = createRadioButton(tr("Dialog")); + sheetRadioButton = createRadioButton(tr("Sheet")); + drawerRadioButton = createRadioButton(tr("Drawer")); + popupRadioButton = createRadioButton(tr("Popup")); + toolRadioButton = createRadioButton(tr("Tool")); + toolTipRadioButton = createRadioButton(tr("Tooltip")); + splashScreenRadioButton = createRadioButton(tr("Splash screen")); + windowRadioButton->setChecked(true); + + QGridLayout *layout = new QGridLayout; + layout->addWidget(windowRadioButton, 0, 0); + layout->addWidget(dialogRadioButton, 1, 0); + layout->addWidget(sheetRadioButton, 2, 0); + layout->addWidget(drawerRadioButton, 3, 0); + layout->addWidget(popupRadioButton, 0, 1); + layout->addWidget(toolRadioButton, 1, 1); + layout->addWidget(toolTipRadioButton, 2, 1); + layout->addWidget(splashScreenRadioButton, 3, 1); + typeGroupBox->setLayout(layout); +} +//! [5] + +//! [6] +void ControllerWindow::createHintsGroupBox() +{ + hintsGroupBox = new QGroupBox(tr("Hints")); + + msWindowsFixedSizeDialogCheckBox = + createCheckBox(tr("MS Windows fixed size dialog")); + x11BypassWindowManagerCheckBox = + createCheckBox(tr("X11 bypass window manager")); + framelessWindowCheckBox = createCheckBox(tr("Frameless window")); + windowTitleCheckBox = createCheckBox(tr("Window title")); + windowSystemMenuCheckBox = createCheckBox(tr("Window system menu")); + windowMinimizeButtonCheckBox = createCheckBox(tr("Window minimize button")); + windowMaximizeButtonCheckBox = createCheckBox(tr("Window maximize button")); + windowCloseButtonCheckBox = createCheckBox(tr("Window close button")); + windowContextHelpButtonCheckBox = + createCheckBox(tr("Window context help button")); + windowShadeButtonCheckBox = createCheckBox(tr("Window shade button")); + windowStaysOnTopCheckBox = createCheckBox(tr("Window stays on top")); + windowStaysOnBottomCheckBox = createCheckBox(tr("Window stays on bottom")); + customizeWindowHintCheckBox= createCheckBox(tr("Customize window")); + + QGridLayout *layout = new QGridLayout; + layout->addWidget(msWindowsFixedSizeDialogCheckBox, 0, 0); + layout->addWidget(x11BypassWindowManagerCheckBox, 1, 0); + layout->addWidget(framelessWindowCheckBox, 2, 0); + layout->addWidget(windowTitleCheckBox, 3, 0); + layout->addWidget(windowSystemMenuCheckBox, 4, 0); + layout->addWidget(windowMinimizeButtonCheckBox, 0, 1); + layout->addWidget(windowMaximizeButtonCheckBox, 1, 1); + layout->addWidget(windowCloseButtonCheckBox, 2, 1); + layout->addWidget(windowContextHelpButtonCheckBox, 3, 1); + layout->addWidget(windowShadeButtonCheckBox, 4, 1); + layout->addWidget(windowStaysOnTopCheckBox, 5, 1); + layout->addWidget(windowStaysOnBottomCheckBox, 6, 1); + layout->addWidget(customizeWindowHintCheckBox, 5, 0); + hintsGroupBox->setLayout(layout); +} +//! [6] + +//! [7] +QCheckBox *ControllerWindow::createCheckBox(const QString &text) +{ + QCheckBox *checkBox = new QCheckBox(text); + connect(checkBox, SIGNAL(clicked()), this, SLOT(updatePreview())); + return checkBox; +} +//! [7] + +//! [8] +QRadioButton *ControllerWindow::createRadioButton(const QString &text) +{ + QRadioButton *button = new QRadioButton(text); + connect(button, SIGNAL(clicked()), this, SLOT(updatePreview())); + return button; +} +//! [8] diff --git a/src/gui/painting/qregion_wince.cpp b/tests/manual/windowflags/controllerwindow.h index 9c3312325a..3d315becd1 100644 --- a/src/gui/painting/qregion_wince.cpp +++ b/tests/manual/windowflags/controllerwindow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,81 +39,77 @@ ** ****************************************************************************/ -#include "qatomic.h" -#include "qbitmap.h" -#include "qbuffer.h" -#include "qimage.h" -#include "qpolygon.h" -#include "qregion.h" -#include "qt_windows.h" -#include "qpainterpath.h" -#include "qguifunctions_wince.h" +#ifndef CONTROLLERWINDOW_H +#define CONTROLLERWINDOW_H -QT_BEGIN_NAMESPACE +#include <QWidget> -QRegion::QRegionData QRegion::shared_empty = { Q_BASIC_ATOMIC_INITIALIZER(1), 0, 0 }; +#include "previewwindow.h" -HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int right, int bottom) -{ - const int tries = 10; - for (int i = 0; i < tries; ++i) { - HRGN region; - switch (type) { - case QRegion::Rectangle: - region = CreateRectRgn(left, top, right, bottom); - break; - case QRegion::Ellipse: -#ifndef Q_OS_WINCE - region = CreateEllipticRgn(left, top, right, bottom); -#endif - break; - } - if (region) { - if (GetRegionData(region, 0, 0)) - return region; - else - DeleteObject(region); - } - } - return 0; -} +QT_BEGIN_NAMESPACE +class QCheckBox; +class QGroupBox; +class QLabel; +class QPushButton; +class QRadioButton; +class QMainWindow; +QT_END_NAMESPACE -void qt_win_dispose_rgn(HRGN r) +//! [0] +class ControllerWindow : public QWidget { - if (r) - DeleteObject(r); -} + Q_OBJECT -static void qt_add_rect(HRGN &winRegion, QRect r) -{ - HRGN rgn = CreateRectRgn(r.left(), r.top(), r.x() + r.width(), r.y() + r.height()); - if (rgn) { - HRGN dest = CreateRectRgn(0,0,0,0); - int result = CombineRgn(dest, winRegion, rgn, RGN_OR); - if (result) { - DeleteObject(winRegion); - winRegion = dest; - } - } -} +public: + ControllerWindow(); -void QRegion::ensureHandle() const -{ - if (d->rgn) - DeleteObject(d->rgn); - d->rgn = CreateRectRgn(0,0,0,0); - if (d->qt_rgn) { - if (d->qt_rgn->numRects == 1) { - QRect r = d->qt_rgn->extents; - qt_add_rect(d->rgn, r); - return; - } - for (int i = 0;i < d->qt_rgn->numRects;i++) { - QRect r = d->qt_rgn->rects.at(i); - qt_add_rect(d->rgn, r); - } - } -} +private slots: + void updatePreview(); +private: + void createTypeGroupBox(); + void createHintsGroupBox(); + QCheckBox *createCheckBox(const QString &text); + QRadioButton *createRadioButton(const QString &text); -QT_END_NAMESPACE + QMainWindow *parentWindow; + PreviewWindow *previewWindow; + PreviewDialog *previewDialog; + + QGroupBox *widgetTypeGroupBox; + QGroupBox *additionalOptionsGroupBox; + QGroupBox *typeGroupBox; + QGroupBox *hintsGroupBox; + QPushButton *quitButton; + + QRadioButton *previewWidgetButton; + QRadioButton *previewDialogButton; + QCheckBox *modalWindowCheckBox; + QCheckBox *fixedSizeWindowCheckBox; + + QRadioButton *windowRadioButton; + QRadioButton *dialogRadioButton; + QRadioButton *sheetRadioButton; + QRadioButton *drawerRadioButton; + QRadioButton *popupRadioButton; + QRadioButton *toolRadioButton; + QRadioButton *toolTipRadioButton; + QRadioButton *splashScreenRadioButton; + + QCheckBox *msWindowsFixedSizeDialogCheckBox; + QCheckBox *x11BypassWindowManagerCheckBox; + QCheckBox *framelessWindowCheckBox; + QCheckBox *windowTitleCheckBox; + QCheckBox *windowSystemMenuCheckBox; + QCheckBox *windowMinimizeButtonCheckBox; + QCheckBox *windowMaximizeButtonCheckBox; + QCheckBox *windowCloseButtonCheckBox; + QCheckBox *windowContextHelpButtonCheckBox; + QCheckBox *windowShadeButtonCheckBox; + QCheckBox *windowStaysOnTopCheckBox; + QCheckBox *windowStaysOnBottomCheckBox; + QCheckBox *customizeWindowHintCheckBox; +}; +//! [0] + +#endif diff --git a/doc/src/hierarchy.qdoc b/tests/manual/windowflags/main.cpp index 4a278dceab..011ca3f86b 100644 --- a/doc/src/hierarchy.qdoc +++ b/tests/manual/windowflags/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,14 +39,14 @@ ** ****************************************************************************/ -/*! - \page hierarchy.html +#include <QApplication> - \title Class Inheritance Hierarchy - \ingroup classlists +#include "controllerwindow.h" - This list shows the C++ class inheritance relations between the - classes in the Qt API. - - \generatelist classhierarchy -*/ +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + ControllerWindow controller; + controller.show(); + return app.exec(); +} diff --git a/tests/manual/windowflags/previewwindow.cpp b/tests/manual/windowflags/previewwindow.cpp new file mode 100644 index 0000000000..796bdb972a --- /dev/null +++ b/tests/manual/windowflags/previewwindow.cpp @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui> + +#include "previewwindow.h" + +static QString windowFlagsToString(Qt::WindowFlags flags) +{ + QString text; + + Qt::WindowFlags type = (flags & Qt::WindowType_Mask); + if (type == Qt::Window) { + text = "Qt::Window"; + } else if (type == Qt::Dialog) { + text = "Qt::Dialog"; + } else if (type == Qt::Sheet) { + text = "Qt::Sheet"; + } else if (type == Qt::Drawer) { + text = "Qt::Drawer"; + } else if (type == Qt::Popup) { + text = "Qt::Popup"; + } else if (type == Qt::Tool) { + text = "Qt::Tool"; + } else if (type == Qt::ToolTip) { + text = "Qt::ToolTip"; + } else if (type == Qt::SplashScreen) { + text = "Qt::SplashScreen"; + } + + if (flags & Qt::MSWindowsFixedSizeDialogHint) + text += "\n| Qt::MSWindowsFixedSizeDialogHint"; + if (flags & Qt::X11BypassWindowManagerHint) + text += "\n| Qt::X11BypassWindowManagerHint"; + if (flags & Qt::FramelessWindowHint) + text += "\n| Qt::FramelessWindowHint"; + if (flags & Qt::WindowTitleHint) + text += "\n| Qt::WindowTitleHint"; + if (flags & Qt::WindowSystemMenuHint) + text += "\n| Qt::WindowSystemMenuHint"; + if (flags & Qt::WindowMinimizeButtonHint) + text += "\n| Qt::WindowMinimizeButtonHint"; + if (flags & Qt::WindowMaximizeButtonHint) + text += "\n| Qt::WindowMaximizeButtonHint"; + if (flags & Qt::WindowCloseButtonHint) + text += "\n| Qt::WindowCloseButtonHint"; + if (flags & Qt::WindowContextHelpButtonHint) + text += "\n| Qt::WindowContextHelpButtonHint"; + if (flags & Qt::WindowShadeButtonHint) + text += "\n| Qt::WindowShadeButtonHint"; + if (flags & Qt::WindowStaysOnTopHint) + text += "\n| Qt::WindowStaysOnTopHint"; + if (flags & Qt::CustomizeWindowHint) + text += "\n| Qt::CustomizeWindowHint"; + return text; +} + +PreviewWindow::PreviewWindow(QWidget *parent) + : QWidget(parent) +{ + textEdit = new QTextEdit; + textEdit->setReadOnly(true); + textEdit->setLineWrapMode(QTextEdit::NoWrap); + + closeButton = new QPushButton(tr("&Close")); + connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); + + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(textEdit); + layout->addWidget(closeButton); + setLayout(layout); + + setWindowTitle(tr("Preview <QWidget>")); +} + +void PreviewWindow::setWindowFlags(Qt::WindowFlags flags) +{ + QWidget::setWindowFlags(flags); + + QString text = windowFlagsToString(flags); + textEdit->setPlainText(text); +} + +PreviewDialog::PreviewDialog(QWidget *parent) + : QDialog(parent) +{ + textEdit = new QTextEdit; + textEdit->setReadOnly(true); + textEdit->setLineWrapMode(QTextEdit::NoWrap); + + closeButton = new QPushButton(tr("&Close")); + connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); + + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(textEdit); + layout->addWidget(closeButton); + setLayout(layout); + + setWindowTitle(tr("Preview <QDialog>")); +} + +void PreviewDialog::setWindowFlags(Qt::WindowFlags flags) +{ + QWidget::setWindowFlags(flags); + + QString text = windowFlagsToString(flags); + textEdit->setPlainText(text); +} diff --git a/doc/src/annotated.qdoc b/tests/manual/windowflags/previewwindow.h index a817df656b..90ed8ba1fd 100644 --- a/doc/src/annotated.qdoc +++ b/tests/manual/windowflags/previewwindow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -39,24 +39,43 @@ ** ****************************************************************************/ -/**************************************************************************** -** -** Documentation for class overview. -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt GUI Toolkit. -** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE -** -****************************************************************************/ +#ifndef PREVIEWWINDOW_H +#define PREVIEWWINDOW_H + +#include <QWidget> +#include <QDialog> + +QT_BEGIN_NAMESPACE +class QPushButton; +class QTextEdit; +QT_END_NAMESPACE + +class PreviewWindow : public QWidget +{ + Q_OBJECT + +public: + PreviewWindow(QWidget *parent = 0); + + void setWindowFlags(Qt::WindowFlags flags); + +private: + QTextEdit *textEdit; + QPushButton *closeButton; +}; + +class PreviewDialog : public QDialog +{ + Q_OBJECT + +public: + PreviewDialog(QWidget *parent = 0); -/*! - \page annotated.html - \title Annotated Class Index - \ingroup classlists + void setWindowFlags(Qt::WindowFlags flags); - Qt's classes with brief descriptions: +private: + QTextEdit *textEdit; + QPushButton *closeButton; +}; - \generatelist annotatedclasses -*/ +#endif diff --git a/tests/manual/windowflags/windowflags.pro b/tests/manual/windowflags/windowflags.pro new file mode 100644 index 0000000000..1b45d0d867 --- /dev/null +++ b/tests/manual/windowflags/windowflags.pro @@ -0,0 +1,5 @@ +HEADERS = controllerwindow.h \ + previewwindow.h +SOURCES = controllerwindow.cpp \ + previewwindow.cpp \ + main.cpp diff --git a/tools/assistant/lib/qhelpprojectdata.cpp b/tools/assistant/lib/qhelpprojectdata.cpp index 55b4ea755e..9412f1c524 100644 --- a/tools/assistant/lib/qhelpprojectdata.cpp +++ b/tools/assistant/lib/qhelpprojectdata.cpp @@ -45,6 +45,7 @@ #include <QtCore/QFileInfo> #include <QtCore/QStack> #include <QtCore/QMap> +#include <QtCore/QRegExp> #include <QtCore/QVariant> #include <QtXml/QXmlStreamReader> @@ -75,6 +76,8 @@ private: void readFiles(); void raiseUnknownTokenError(); void addMatchingFiles(const QString &pattern); + + QMap<QString, QStringList> dirEntriesCache; }; void QHelpProjectDataPrivate::raiseUnknownTokenError() @@ -265,14 +268,40 @@ void QHelpProjectDataPrivate::readFiles() // meaningful warning later. void QHelpProjectDataPrivate::addMatchingFiles(const QString &pattern) { + // The pattern matching is expensive, so we skip it if no + // wildcard symbols occur in the string. + if (!pattern.contains('?') && !pattern.contains('*') + && !pattern.contains('[') && !pattern.contains(']')) { + filterSectionList.last().addFile(pattern); + return; + } + QFileInfo fileInfo(rootPath + '/' + pattern); - const QStringList &matches = - fileInfo.dir().entryList(QStringList(fileInfo.fileName())); - for (QStringList::ConstIterator it = matches.constBegin(); - it != matches.constEnd(); - ++it) - filterSectionList.last().addFile(QFileInfo(pattern).dir().path() + '/' + *it); - if (matches.empty()) + const QDir &dir = fileInfo.dir(); + const QString &path = dir.canonicalPath(); + + // QDir::entryList() is expensive, so we cache the results. + QMap<QString, QStringList>::ConstIterator it = dirEntriesCache.find(path); + const QStringList &entries = it != dirEntriesCache.constEnd() ? + it.value() : dir.entryList(QDir::Files); + if (it == dirEntriesCache.constEnd()) + dirEntriesCache.insert(path, entries); + + bool matchFound = false; +#ifdef Q_OS_WIN + Qt::CaseSensitivity cs = Qt::CaseInsensitive; +#else + Qt::CaseSensitivity cs = Qt::CaseSensitive; +#endif + QRegExp regExp(fileInfo.fileName(), cs, QRegExp::Wildcard); + foreach (const QString &file, entries) { + if (regExp.exactMatch(file)) { + matchFound = true; + filterSectionList.last(). + addFile(QFileInfo(pattern).dir().path() + '/' + file); + } + } + if (!matchFound) filterSectionList.last().addFile(pattern); } diff --git a/tools/assistant/tools/assistant/assistant.qch b/tools/assistant/tools/assistant/assistant.qch Binary files differindex 99687ed1f6..3e66bd9249 100644 --- a/tools/assistant/tools/assistant/assistant.qch +++ b/tools/assistant/tools/assistant/assistant.qch diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index a38454453c..23562db639 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -43,6 +43,7 @@ #include "helpviewer.h" #include "searchwidget.h" #include "mainwindow.h" +#include "preferencesdialog.h" #include <QtCore/QDir> #include <QtCore/QEvent> @@ -423,6 +424,27 @@ void CentralWidget::setSource(const QUrl &url) tabWidget->setTabText(lastTabPage, quoteTabTitle(viewer->documentTitle())); } +void CentralWidget::setupWidget() +{ + int option = helpEngine->customValue(QLatin1String("StartOption"), + ShowLastPages).toInt(); + + if (option != ShowLastPages) { + QString homePage; + if (option == ShowHomePage) { + homePage = helpEngine->customValue(QLatin1String("defaultHomepage"), + QLatin1String("help")).toString(); + homePage = helpEngine->customValue(QLatin1String("homepage"), + homePage).toString(); + } + if (option == ShowBlankPage) + homePage = QLatin1String("about:blank"); + setSource(homePage); + } else { + setLastShownPages(); + } +} + void CentralWidget::setLastShownPages() { const QLatin1String key("LastShownPages"); @@ -739,8 +761,10 @@ void CentralWidget::setTabTitle(const QUrl &url) QTabBar *tabBar = qFindChild<QTabBar*>(tabWidget); for (int tab = 0; tab < tabBar->count(); ++tab) { HelpViewer *viewer = qobject_cast<HelpViewer*>(tabWidget->widget(tab)); - if (viewer) - tabWidget->setTabText(tab, viewer->documentTitle().trimmed()); + if (viewer) { + tabWidget->setTabText(tab, + quoteTabTitle(viewer->documentTitle().trimmed())); + } } #else HelpViewer *viewer = currentHelpViewer(); diff --git a/tools/assistant/tools/assistant/centralwidget.h b/tools/assistant/tools/assistant/centralwidget.h index ca9caaf0db..f7ce1d53ce 100644 --- a/tools/assistant/tools/assistant/centralwidget.h +++ b/tools/assistant/tools/assistant/centralwidget.h @@ -111,7 +111,7 @@ public: CentralWidget(QHelpEngine *engine, MainWindow *parent); ~CentralWidget(); - void setLastShownPages(); + void setupWidget(); bool hasSelection() const; QUrl currentSource() const; QString currentTitle() const; @@ -188,6 +188,7 @@ private: void initPrinter(); QString quoteTabTitle(const QString &title) const; void highlightSearchTerms(); + void setLastShownPages(); private: int lastTabPage; diff --git a/tools/assistant/tools/assistant/doc/assistant.qhp b/tools/assistant/tools/assistant/doc/assistant.qhp index 7a26101859..7ea4cdd467 100644 --- a/tools/assistant/tools/assistant/doc/assistant.qhp +++ b/tools/assistant/tools/assistant/doc/assistant.qhp @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <QtHelpProject version="1.0"> <virtualFolder>assistant</virtualFolder> - <namespace>com.trolltech.com.assistantinternal_1.0.0</namespace> + <namespace>com.trolltech.com.assistantinternal-1.0.0</namespace> <filterSection> <files> <file>assistant.html</file> diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp index 6799db3c34..5422bf4604 100644 --- a/tools/assistant/tools/assistant/helpviewer.cpp +++ b/tools/assistant/tools/assistant/helpviewer.cpp @@ -306,7 +306,7 @@ void HelpViewer::setSource(const QUrl &url) loadFinished = false; if (url.toString() == QLatin1String("help")) { load(QUrl(QLatin1String("qthelp://com.trolltech.com." - "assistantinternal_1.0.0/assistant/assistant.html"))); + "assistantinternal-1.0.0/assistant/assistant.html"))); } else { load(url); } @@ -425,7 +425,7 @@ void HelpViewer::setSource(const QUrl &url) if (help) { QTextBrowser::setSource(QUrl(QLatin1String("qthelp://com.trolltech.com." - "assistantinternal_1.0.0/assistant/assistant.html"))); + "assistantinternal-1.0.0/assistant/assistant.html"))); } else { QTextBrowser::setSource(url); setHtml(tr("<title>Error 404...</title><div align=\"center\"><br><br>" diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp index 05355d906c..a0a5a0dfae 100644 --- a/tools/assistant/tools/assistant/main.cpp +++ b/tools/assistant/tools/assistant/main.cpp @@ -306,7 +306,7 @@ int main(int argc, char *argv[]) } } - QLatin1String intern("com.trolltech.com.assistantinternal_"); + QLatin1String intern("com.trolltech.com.assistantinternal-"); foreach (const QString &doc, userDocs) { if (!callerDocs.contains(doc) && !doc.startsWith(intern)) user.unregisterDocumentation(doc); diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index 7926020d57..bc73b80d6c 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -274,7 +274,7 @@ bool MainWindow::initHelpDB() return false; bool assistantInternalDocRegistered = false; - QString intern(QLatin1String("com.trolltech.com.assistantinternal_")); + QString intern(QLatin1String("com.trolltech.com.assistantinternal-")); foreach (const QString &ns, m_helpEngine->registeredDocumentations()) { if (ns.startsWith(intern)) { intern = ns; @@ -407,7 +407,7 @@ void MainWindow::insertLastPages() if (m_cmdLine->url().isValid()) m_centralWidget->setSource(m_cmdLine->url()); else - m_centralWidget->setLastShownPages(); + m_centralWidget->setupWidget(); if (m_cmdLine->search() == CmdLineParser::Activate) showSearch(); diff --git a/tools/assistant/tools/assistant/preferencesdialog.cpp b/tools/assistant/tools/assistant/preferencesdialog.cpp index fa70196405..2b58c649f7 100644 --- a/tools/assistant/tools/assistant/preferencesdialog.cpp +++ b/tools/assistant/tools/assistant/preferencesdialog.cpp @@ -146,10 +146,13 @@ PreferencesDialog::~PreferencesDialog() emit updateBrowserFont(); } - if (!m_ui.homePageLineEdit->text().isEmpty()) { - key = QLatin1String("homepage"); - m_helpEngine->setCustomValue(key, m_ui.homePageLineEdit->text()); - } + QString homePage = m_ui.homePageLineEdit->text(); + if (homePage.isEmpty()) + homePage = QLatin1String("help"); + m_helpEngine->setCustomValue(QLatin1String("homepage"), homePage); + + int option = m_ui.helpStartComboBox->currentIndex(); + m_helpEngine->setCustomValue(QLatin1String("StartOption"), option); } void PreferencesDialog::showDialog() @@ -379,6 +382,8 @@ void PreferencesDialog::applyChanges() CentralWidget* widget = CentralWidget::instance(); for (int i = m_TabsToClose.count(); --i >= 0;) widget->closeTabAt(m_TabsToClose.at(i)); + if (widget->availableHelpViewer()== 0) + widget->setSource(QUrl(QLatin1String("about:blank"))); if (m_unregDocs.count()) { foreach (const QString &doc, m_unregDocs) @@ -483,22 +488,23 @@ void PreferencesDialog::updateOptionsPage() homepage = m_helpEngine->customValue(QLatin1String("defaultHomepage"), QLatin1String("help")).toString(); } - m_ui.homePageLineEdit->setText(homepage); - connect(m_ui.currentPageButton, SIGNAL(pressed()), this, - SLOT(currentHomepageChanged())); - connect(m_ui.restoreDefaultHomePageButton, SIGNAL(pressed()), this, - SLOT(restoreDefaultHomepage())); + + int option = m_helpEngine->customValue(QLatin1String("StartOption"), + ShowLastPages).toInt(); + m_ui.helpStartComboBox->setCurrentIndex(option); + + connect(m_ui.blankPageButton, SIGNAL(clicked()), this, SLOT(setBlankPage())); + connect(m_ui.currentPageButton, SIGNAL(clicked()), this, SLOT(setCurrentPage())); + connect(m_ui.defaultPageButton, SIGNAL(clicked()), this, SLOT(setDefaultPage())); } -void PreferencesDialog::restoreDefaultHomepage() +void PreferencesDialog::setBlankPage() { - QString homepage = m_helpEngine->customValue(QLatin1String("defaultHomepage"), - QLatin1String("help")).toString(); - m_ui.homePageLineEdit->setText(homepage); + m_ui.homePageLineEdit->setText(QLatin1String("about:blank")); } -void PreferencesDialog::currentHomepageChanged() +void PreferencesDialog::setCurrentPage() { QString homepage = CentralWidget::instance()->currentSource().toString(); if (homepage.isEmpty()) @@ -507,4 +513,11 @@ void PreferencesDialog::currentHomepageChanged() m_ui.homePageLineEdit->setText(homepage); } +void PreferencesDialog::setDefaultPage() +{ + QString homepage = m_helpEngine->customValue(QLatin1String("defaultHomepage"), + QLatin1String("help")).toString(); + m_ui.homePageLineEdit->setText(homepage); +} + QT_END_NAMESPACE diff --git a/tools/assistant/tools/assistant/preferencesdialog.h b/tools/assistant/tools/assistant/preferencesdialog.h index 5b8ffe8c8c..4471b5f6c2 100644 --- a/tools/assistant/tools/assistant/preferencesdialog.h +++ b/tools/assistant/tools/assistant/preferencesdialog.h @@ -50,6 +50,12 @@ QT_BEGIN_NAMESPACE class FontPanel; class QHelpEngineCore; +enum { + ShowHomePage = 0, + ShowBlankPage = 1, + ShowLastPages = 2 +}; + class PreferencesDialog : public QDialog { Q_OBJECT @@ -72,8 +78,10 @@ private slots: void appFontSettingChanged(int index); void browserFontSettingToggled(bool on); void browserFontSettingChanged(int index); - void restoreDefaultHomepage(); - void currentHomepageChanged(); + + void setBlankPage(); + void setCurrentPage(); + void setDefaultPage(); signals: void updateBrowserFont(); diff --git a/tools/assistant/tools/assistant/preferencesdialog.ui b/tools/assistant/tools/assistant/preferencesdialog.ui index d848b498d2..279084d1ea 100644 --- a/tools/assistant/tools/assistant/preferencesdialog.ui +++ b/tools/assistant/tools/assistant/preferencesdialog.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>359</width> + <width>375</width> <height>266</height> </rect> </property> @@ -187,19 +187,90 @@ <attribute name="title"> <string>Options</string> </attribute> - <layout class="QVBoxLayout" name="verticalLayout_3"> + <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <widget class="QGroupBox" name="groupBox"> + <widget class="QGroupBox" name="groupBox_2"> <property name="title"> - <string>Homepage</string> + <string/> </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> <item> - <widget class="QLineEdit" name="homePageLineEdit"/> + <widget class="QLabel" name="label_5"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>On help start:</string> + </property> + </widget> </item> <item> + <widget class="QComboBox" name="helpStartComboBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <item> + <property name="text"> + <string>Show my home page</string> + </property> + </item> + <item> + <property name="text"> + <string>Show a blank page</string> + </property> + </item> + <item> + <property name="text"> + <string>Show my tabs from last session</string> + </property> + </item> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>54</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string/> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>Homepage</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="homePageLineEdit"/> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -213,22 +284,25 @@ </spacer> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QPushButton" name="currentPageButton"> - <property name="text"> - <string>Current Page</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="restoreDefaultHomePageButton"> - <property name="text"> - <string>Restore to default</string> - </property> - </widget> - </item> - </layout> + <widget class="QPushButton" name="currentPageButton"> + <property name="text"> + <string>Current Page</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="blankPageButton"> + <property name="text"> + <string>Blank Page</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="defaultPageButton"> + <property name="text"> + <string>Restore to default</string> + </property> + </widget> </item> </layout> </item> diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index dedee59e5f..510e3660e7 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2201,8 +2201,6 @@ void Configure::generateBuildKey() QStringList build_options; if (!dictionary["QCONFIG"].isEmpty()) build_options += dictionary["QCONFIG"] + "-config "; - if (dictionary["STL"] == "no") - build_options += "no-stl"; build_options.sort(); // Sorted defines that start with QT_NO_ diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index 58e094bbd0..21b230e883 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -1676,7 +1676,9 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions) case Tok_trid: if (!results->tor) goto case_default; - if (!sourcetext.isEmpty()) { + if (sourcetext.isEmpty()) { + yyTok = getToken(); + } else { if (!msgid.isEmpty()) qWarning("%s:%d: //= cannot be used with qtTrId() / QT_TRID_NOOP(). Ignoring\n", qPrintable(yyFileName), yyLineNo); diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp index 796d012ead..a6795cb7c0 100644 --- a/tools/linguist/shared/po.cpp +++ b/tools/linguist/shared/po.cpp @@ -359,7 +359,7 @@ bool loadPO(Translator &translator, QIODevice &dev, ConversionData &cd) const QChar quote = QLatin1Char('"'); const QChar newline = QLatin1Char('\n'); QTextStream in(&dev); - in.setCodec(cd.m_codecForSource.isEmpty() ? "UTF-8" : cd.m_codecForSource); + in.setCodec(cd.m_codecForSource.isEmpty() ? QByteArray("UTF-8") : cd.m_codecForSource); bool error = false; // format of a .po file entry: @@ -555,7 +555,7 @@ bool savePO(const Translator &translator, QIODevice &dev, ConversionData &cd) { bool ok = true; QTextStream out(&dev); - out.setCodec(cd.m_outputCodec.isEmpty() ? "UTF-8" : cd.m_outputCodec); + out.setCodec(cd.m_outputCodec.isEmpty() ? QByteArray("UTF-8") : cd.m_outputCodec); bool first = true; if (translator.messages().isEmpty() || !translator.messages().first().sourceText().isEmpty()) { diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp index 638e9972f6..dc681f54d0 100644 --- a/tools/linguist/shared/qm.cpp +++ b/tools/linguist/shared/qm.cpp @@ -553,7 +553,7 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) //qDebug() << "NUMITEMS: " << numItems; QTextCodec *codec = QTextCodec::codecForName( - cd.m_codecForSource.isEmpty() ? "Latin1" : cd.m_codecForSource); + cd.m_codecForSource.isEmpty() ? QByteArray("Latin1") : cd.m_codecForSource); QTextCodec *utf8Codec = 0; if (codec->name() != "UTF-8") utf8Codec = QTextCodec::codecForName("UTF-8"); diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp index e95153d528..4c018d1df8 100644 --- a/tools/qdoc3/codemarker.cpp +++ b/tools/qdoc3/codemarker.cpp @@ -168,7 +168,8 @@ const Node *CodeMarker::nodeForString(const QString& string) { if (sizeof(const Node *) == sizeof(uint)) { return reinterpret_cast<const Node *>(string.toUInt()); - } else { + } + else { return reinterpret_cast<const Node *>(string.toULongLong()); } } @@ -177,7 +178,8 @@ QString CodeMarker::stringForNode(const Node *node) { if (sizeof(const Node *) == sizeof(ulong)) { return QString::number(reinterpret_cast<ulong>(node)); - } else { + } + else { return QString::number(reinterpret_cast<qulonglong>(node)); } } @@ -220,7 +222,8 @@ QString CodeMarker::typified(const QString &string) || ch.digitValue() >= 0 || ch == QLatin1Char('_') || ch == QLatin1Char(':')) { pendingWord += ch; - } else { + } + else { if (!pendingWord.isEmpty()) { bool isProbablyType = (pendingWord != QLatin1String("const")); if (isProbablyType) @@ -251,7 +254,7 @@ QString CodeMarker::typified(const QString &string) return result; } -QString CodeMarker::taggedNode(const Node *node) +QString CodeMarker::taggedNode(const Node* node) { QString tag; @@ -276,10 +279,34 @@ QString CodeMarker::taggedNode(const Node *node) break; default: tag = QLatin1String("@unknown"); + break; + } + return QLatin1Char('<') + tag + QLatin1Char('>') + protect(node->name()) + + QLatin1String("</") + tag + QLatin1Char('>'); +} + +#ifdef QDOC_QML +QString CodeMarker::taggedQmlNode(const Node* node) +{ + QString tag; + switch (node->type()) { + case Node::QmlProperty: + tag = QLatin1String("@property"); + break; + case Node::QmlSignal: + tag = QLatin1String("@signal"); + break; + case Node::QmlMethod: + tag = QLatin1String("@method"); + break; + default: + tag = QLatin1String("@unknown"); + break; } return QLatin1Char('<') + tag + QLatin1Char('>') + protect(node->name()) + QLatin1String("</") + tag + QLatin1Char('>'); } +#endif QString CodeMarker::linkTag(const Node *node, const QString& body) { @@ -308,9 +335,11 @@ QString CodeMarker::sortName(const Node *node) QString sortNo; if (func->metaness() == FunctionNode::Ctor) { sortNo = QLatin1String("C"); - } else if (func->metaness() == FunctionNode::Dtor) { + } + else if (func->metaness() == FunctionNode::Dtor) { sortNo = QLatin1String("D"); - } else { + } + else { if (nodeName.startsWith(QLatin1String("operator")) && nodeName.length() > 8 && !nodeName[8].isLetterOrNumber()) @@ -336,9 +365,14 @@ void CodeMarker::insert(FastSection &fastSection, SynopsisStyle style, Status status) { - bool inheritedMember = (!node->relates() && - (node->parent() != (const InnerNode *)fastSection.innerNode)); bool irrelevant = false; + bool inheritedMember = false; + if (!node->relates()) { + if (node->parent() != (const InnerNode*)fastSection.innerNode) { + if (node->type() != Node::QmlProperty) + inheritedMember = true; + } + } if (node->access() == Node::Private) { irrelevant = true; @@ -462,7 +496,8 @@ QStringList CodeMarker::macRefsForNode(const Node *node) #if 0 if (!classe->templateStuff().isEmpty()) { result += QLatin1String("tmplt/"); - } else + } + else #endif { result += QLatin1String("cl/"); @@ -499,14 +534,18 @@ QStringList CodeMarker::macRefsForNode(const Node *node) result += QLatin1String("macro/"); isMacro = true; #if 0 - } else if (!func->templateStuff().isEmpty()) { + } + else if (!func->templateStuff().isEmpty()) { result += QLatin1String("ftmplt/"); #endif - } else if (func->isStatic()) { + } + else if (func->isStatic()) { result += QLatin1String("clm/"); - } else if (!func->parent()->name().isEmpty()) { + } + else if (!func->parent()->name().isEmpty()) { result += QLatin1String("instm/"); - } else { + } + else { result += QLatin1String("func/"); } @@ -520,7 +559,8 @@ QStringList CodeMarker::macRefsForNode(const Node *node) result += "/" + QLatin1String(QMetaObject::normalizedSignature(func->returnType().toLatin1().constData())) + "/("; const QList<Parameter> ¶ms = func->parameters(); for (int i = 0; i < params.count(); ++i) { - QString type = params.at(i).leftType() + params.at(i).rightType(); + QString type = params.at(i).leftType() + + params.at(i).rightType(); type = QLatin1String(QMetaObject::normalizedSignature(type.toLatin1().constData())); if (i != 0) result += ","; @@ -563,10 +603,21 @@ QString CodeMarker::macName(const Node *node, const QString &name) if (node->name().isEmpty()) { return QLatin1Char('/') + myName; - } else { + } + else { return plainFullName(node) + QLatin1Char('/') + myName; } } +#ifdef QDOC_QML +/*! + Get the list of documentation sections for the children of + the specified QmlClassNode. + */ +QList<Section> CodeMarker::qmlSections(const QmlClassNode* , SynopsisStyle ) +{ + return QList<Section>(); +} +#endif QT_END_NAMESPACE diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h index 67b1064af0..91dc8b0967 100644 --- a/tools/qdoc3/codemarker.h +++ b/tools/qdoc3/codemarker.h @@ -121,6 +121,9 @@ class CodeMarker virtual QString markedUpSynopsis(const Node *node, const Node *relative, SynopsisStyle style) = 0; +#ifdef QDOC_QML + virtual QString markedUpQmlItem(const Node* , bool) { return QString(); } +#endif virtual QString markedUpName(const Node *node) = 0; virtual QString markedUpFullName(const Node *node, const Node *relative = 0) = 0; @@ -132,6 +135,10 @@ class CodeMarker virtual QList<Section> sections(const InnerNode *inner, SynopsisStyle style, Status status) = 0; +#ifdef QDOC_QML + virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode, + SynopsisStyle style); +#endif virtual const Node *resolveTarget(const QString& target, const Tree *tree, const Node *relative) = 0; @@ -151,7 +158,10 @@ class CodeMarker virtual QString sortName(const Node *node); QString protect(const QString &string); QString typified(const QString &string); - QString taggedNode(const Node *node); + QString taggedNode(const Node* node); +#ifdef QDOC_QML + QString taggedQmlNode(const Node* node); +#endif QString linkTag(const Node *node, const QString& body); void insert(FastSection &fastSection, Node *node, diff --git a/tools/qdoc3/command.cpp b/tools/qdoc3/command.cpp index e51e23563e..bce262bea5 100644 --- a/tools/qdoc3/command.cpp +++ b/tools/qdoc3/command.cpp @@ -49,44 +49,46 @@ QT_BEGIN_NAMESPACE -void executeCommand( const Location& location, const QString& format, - const QStringList& args ) +void executeCommand(const Location& location, + const QString& format, + const QStringList& args) { QString actualCommand; - for ( int i = 0; i < (int) format.length(); i++ ) { + for (int i = 0; i < (int) format.length(); i++) { int ch = format[i].unicode(); - if ( ch > 0 && ch < 8 ) { + if (ch > 0 && ch < 8) { actualCommand += args[ch - 1]; - } else { + } + else { actualCommand += format[i]; } } QString toolName = actualCommand; - int space = toolName.indexOf( QLatin1Char(' ') ); - if ( space != -1 ) - toolName.truncate( space ); + int space = toolName.indexOf(QLatin1Char(' ')); + if (space != -1) + toolName.truncate(space); QProcess process; process.start(QLatin1String("sh"), - QStringList() << QLatin1String("-c") << actualCommand ); + QStringList() << QLatin1String("-c") << actualCommand); process.waitForFinished(); if (process.exitCode() == 127) - location.fatal( tr("Couldn't launch the '%1' tool") - .arg(toolName), - tr("Make sure the tool is installed and in the" - " path.") ); + location.fatal(tr("Couldn't launch the '%1' tool") + .arg(toolName), + tr("Make sure the tool is installed and in the" + " path.")); QString errors = QString::fromLocal8Bit(process.readAllStandardError()); - while ( errors.endsWith(QLatin1Char('\n')) ) - errors.truncate( errors.length() - 1 ); - if ( !errors.isEmpty() ) - location.fatal( tr("The '%1' tool encountered some problems") - .arg(toolName), - tr("The tool was invoked like this:\n%1\n" - "It emitted these errors:\n%2") - .arg(actualCommand).arg(errors) ); + while (errors.endsWith(QLatin1Char('\n'))) + errors.truncate(errors.length() - 1); + if (!errors.isEmpty()) + location.fatal(tr("The '%1' tool encountered some problems") + .arg(toolName), + tr("The tool was invoked like this:\n%1\n" + "It emitted these errors:\n%2") + .arg(actualCommand).arg(errors)); } QT_END_NAMESPACE diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index 4e97d9f955..22cb671189 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -140,6 +140,7 @@ class Config #define CONFIG_INDEXES "indexes" #define CONFIG_LANGUAGE "language" #define CONFIG_MACRO "macro" +#define CONFIG_OBSOLETELINKS "obsoletelinks" #define CONFIG_OUTPUTDIR "outputdir" #define CONFIG_OUTPUTLANGUAGE "outputlanguage" #define CONFIG_OUTPUTFORMATS "outputformats" diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index f807609eb1..0f8d1b7d31 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -284,7 +284,7 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, } else { for (int i = 0; i < documentedItems.size(); ++i) { - if (i < MaxEnumValues - 2 || i == documentedItems.size() - 1) { + if (i < MaxEnumValues-2 || i == documentedItems.size()-1) { if (i != 0) synopsis += ", "; synopsis += documentedItems.at(i); @@ -345,6 +345,43 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, return synopsis + extra; } +#ifdef QDOC_QML +/*! + */ +QString CppCodeMarker::markedUpQmlItem(const Node* node, bool summary) +{ + QString name = taggedQmlNode(node); + if (summary) { + name = linkTag(node,name); + } + name = "<@name>" + name + "</@name>"; + QString synopsis = name; + if (node->type() == Node::QmlProperty) { + const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(node); + synopsis += " : " + typified(pn->dataType()); + } + + QString extra; + if (summary) { + if (node->status() == Node::Preliminary) { + extra += " (preliminary)"; + } + else if (node->status() == Node::Deprecated) { + extra += " (deprecated)"; + } + else if (node->status() == Node::Obsolete) { + extra += " (obsolete)"; + } + } + + if (!extra.isEmpty()) { + extra.prepend("<@extra>"); + extra.append("</@extra>"); + } + return synopsis + extra; +} +#endif + QString CppCodeMarker::markedUpName(const Node *node) { QString name = linkTag(node, taggedNode(node)); @@ -537,7 +574,7 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, else if (isStatic) { if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty()) - insert(staticPublicMembers, *c, style, status); + insert(staticPublicMembers,*c,style,status); } else if ((*c)->type() == Node::Property) { insert(properties, *c, style, status); @@ -561,11 +598,11 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, else if (isStatic) { if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty()) - insert(staticProtectedMembers, *c, style, status); + insert(staticProtectedMembers,*c,style,status); } else if ((*c)->type() == Node::Variable) { if (!(*c)->doc().isEmpty()) - insert(protectedVariables, *c, style, status); + insert(protectedVariables,*c,style,status); } else if ((*c)->type() == Node::Function) { if (!insertReimpFunc(protectedFunctions,*c,status)) @@ -582,14 +619,14 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, else if (isStatic) { if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty()) - insert(staticPrivateMembers, *c, style, status); + insert(staticPrivateMembers,*c,style,status); } else if ((*c)->type() == Node::Function) { if (!insertReimpFunc(privateFunctions,*c,status)) insert(privateFunctions, *c, style, status); } else { - insert(privateTypes, *c, style, status); + insert(privateTypes,*c,style,status); } } ++c; @@ -706,17 +743,23 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, "Namespaces", "namespace", "namespaces"); - FastSection classes(inner, "Classes", "class", "classes"); + FastSection classes(inner, + "Classes", + "class", + "classes"); FastSection types(inner, - style == Summary ? "Types" : "Type Documentation", + style == Summary ? + "Types" : "Type Documentation", "type", "types"); FastSection functions(inner, - style == Summary ? "Functions" : "Function Documentation", + style == Summary ? + "Functions" : "Function Documentation", "function", "functions"); FastSection macros(inner, - style == Summary ? "Macros" : "Macro Documentation", + style == Summary ? + "Macros" : "Macro Documentation", "macro", "macros"); @@ -1051,4 +1094,82 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode, return result; } +#ifdef QDOC_QML +/*! + This function is for documenting QML properties. It returns + the list of documentation sections for the children of the + \a qmlClassNode. + + Currently, it only handles QML property groups. + */ +QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, + SynopsisStyle style) +{ + QList<Section> sections; + if (qmlClassNode) { + if (style == Summary) { + FastSection qmlproperties(qmlClassNode, + "QML Properties", + "property", + "properties"); + FastSection qmlsignals(qmlClassNode, + "QML Signals", + "signal", + "signals"); + FastSection qmlmethods(qmlClassNode, + "QML Methods", + "method", + "methods"); + + NodeList::ConstIterator c = qmlClassNode->childNodes().begin(); + while (c != qmlClassNode->childNodes().end()) { + if ((*c)->subType() == Node::QmlPropertyGroup) { + const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(*c); + NodeList::ConstIterator p = qpgn->childNodes().begin(); + while (p != qpgn->childNodes().end()) { + if ((*p)->type() == Node::QmlProperty) { + insert(qmlproperties,*p,style,Okay); + } + ++p; + } + } + else if ((*c)->type() == Node::QmlSignal) { + insert(qmlsignals,*c,style,Okay); + } + else if ((*c)->type() == Node::QmlMethod) { + insert(qmlmethods,*c,style,Okay); + } + ++c; + } + append(sections,qmlproperties); + append(sections,qmlsignals); + append(sections,qmlmethods); + } + else if (style == Detailed) { + FastSection qmlproperties(qmlClassNode,"QML Property Documentation"); + FastSection qmlsignals(qmlClassNode,"QML Signal Documentation"); + FastSection qmlmethods(qmlClassNode,"QML Method Documentation"); + NodeList::ConstIterator c = qmlClassNode->childNodes().begin(); + while (c != qmlClassNode->childNodes().end()) { + if ((*c)->subType() == Node::QmlPropertyGroup) { + insert(qmlproperties,*c,style,Okay); + } + else if ((*c)->type() == Node::QmlSignal) { + insert(qmlsignals,*c,style,Okay); + } + else if ((*c)->type() == Node::QmlMethod) { + insert(qmlmethods,*c,style,Okay); + } + ++c; + } + append(sections,qmlproperties); + append(sections,qmlsignals); + append(sections,qmlmethods); + } + } + + return sections; +} +#endif + QT_END_NAMESPACE diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h index 2967dfe215..fa3cb78095 100644 --- a/tools/qdoc3/cppcodemarker.h +++ b/tools/qdoc3/cppcodemarker.h @@ -67,6 +67,9 @@ class CppCodeMarker : public CodeMarker QString markedUpSynopsis(const Node *node, const Node *relative, SynopsisStyle style); +#ifdef QDOC_QML + QString markedUpQmlItem(const Node *node, bool summary); +#endif QString markedUpName(const Node *node); QString markedUpFullName(const Node *node, const Node *relative); QString markedUpEnumValue(const QString &enumValue, const Node *relative); @@ -76,6 +79,8 @@ class CppCodeMarker : public CodeMarker QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status); + QList<Section> qmlSections(const QmlClassNode* qmlClassNode, + SynopsisStyle style); const Node *resolveTarget(const QString& target, const Tree *tree, const Node *relative); diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index dd10c1cdda..4563f6560a 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -87,6 +87,10 @@ QT_BEGIN_NAMESPACE #ifdef QDOC_QML #define COMMAND_QMLCLASS Doc::alias("qmlclass") #define COMMAND_QMLPROPERTY Doc::alias("qmlproperty") +#define COMMAND_QMLINHERITS Doc::alias("inherits") +#define COMMAND_QMLSIGNAL Doc::alias("qmlsignal") +#define COMMAND_QMLMETHOD Doc::alias("qmlmethod") +#define COMMAND_QMLDEFAULT Doc::alias("default") #endif QStringList CppCodeParser::exampleFiles; @@ -109,7 +113,8 @@ static void extractPageLinkAndDesc(const QString &arg, if (arg.contains(".html") && spaceAt != -1) { *link = arg.left(spaceAt).trimmed(); *desc = arg.mid(spaceAt).trimmed(); - } else { + } + else { *link = arg; *desc = arg; } @@ -202,11 +207,6 @@ void CppCodeParser::initializeParser(const Config &config) nodeTypeMap.insert(COMMAND_PROPERTY, Node::Property); nodeTypeMap.insert(COMMAND_VARIABLE, Node::Variable); -#ifdef QDOC_QML - // nodeTypeMap.insert(COMMAND_QMLCLASS, Node::Class); - nodeTypeMap.insert(COMMAND_QMLPROPERTY, Node::Property); -#endif - exampleFiles = config.getStringList(CONFIG_EXAMPLES); exampleDirs = config.getStringList(CONFIG_EXAMPLEDIRS); QStringList exampleFilePatterns = config.getStringList( @@ -477,13 +477,15 @@ QSet<QString> CppCodeParser::topicCommands() << COMMAND_PROPERTY << COMMAND_SERVICE << COMMAND_TYPEDEF -#ifdef QDOC_QML +#ifdef QDOC_QML << COMMAND_VARIABLE << COMMAND_QMLCLASS - << COMMAND_QMLPROPERTY; -#else + << COMMAND_QMLPROPERTY + << COMMAND_QMLSIGNAL + << COMMAND_QMLMETHOD; +#else << COMMAND_VARIABLE; -#endif +#endif } /*! @@ -587,7 +589,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, The command was neither "fn" nor "macro" . */ // ### split(" ") hack is there to support header file syntax - QStringList paths = arg.split(" "); + QStringList paths = arg.split(" "); QStringList path = paths[0].split("::"); Node *node = 0; if (!usedNamespaces.isEmpty()) { @@ -627,49 +629,169 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, } } + if (command == COMMAND_CLASS) { + if (paths.size() > 1) { + if (!paths[1].endsWith(".h")) { + ClassNode*cnode = static_cast<ClassNode*>(node); + cnode->setQmlElement(paths[1]); + } + } + } return node; } else if (command == COMMAND_EXAMPLE) { - FakeNode *fake = new FakeNode(tre->root(), arg, FakeNode::Example); + FakeNode *fake = new FakeNode(tre->root(), arg, Node::Example); createExampleFileNodes(fake); return fake; } else if (command == COMMAND_EXTERNALPAGE) { - return new FakeNode(tre->root(), arg, FakeNode::ExternalPage); + return new FakeNode(tre->root(), arg, Node::ExternalPage); } else if (command == COMMAND_FILE) { - return new FakeNode(tre->root(), arg, FakeNode::File); + return new FakeNode(tre->root(), arg, Node::File); } else if (command == COMMAND_GROUP) { - return new FakeNode(tre->root(), arg, FakeNode::Group); + return new FakeNode(tre->root(), arg, Node::Group); } else if (command == COMMAND_HEADERFILE) { - return new FakeNode(tre->root(), arg, FakeNode::HeaderFile); + return new FakeNode(tre->root(), arg, Node::HeaderFile); } else if (command == COMMAND_MODULE) { - return new FakeNode(tre->root(), arg, FakeNode::Module); + return new FakeNode(tre->root(), arg, Node::Module); } else if (command == COMMAND_PAGE) { - return new FakeNode(tre->root(), arg, FakeNode::Page); + return new FakeNode(tre->root(), arg, Node::Page); } -#ifdef QDOC_QML +#ifdef QDOC_QML else if (command == COMMAND_QMLCLASS) { const ClassNode* classNode = 0; - QStringList names = arg.split(" "); - //qDebug() << "QMLCLASS" << names; + QStringList names = arg.split(" "); if (names.size() > 1) { Node* n = tre->findNode(names[1].split("::"),Node::Class); - if (n) { + if (n) classNode = static_cast<const ClassNode*>(n); - //qDebug() << "FOUND IT!" << classNode->name(); + } + return new QmlClassNode(tre->root(), names[0], classNode); + } + else if ((command == COMMAND_QMLSIGNAL) || + (command == COMMAND_QMLMETHOD)) { + QString element; + QString name; + QmlClassNode* qmlClass = 0; + if (splitQmlArg(doc,arg,element,name)) { + Node* n = tre->findNode(QStringList(element),Node::Fake); + if (n && n->subType() == Node::QmlClass) { + qmlClass = static_cast<QmlClassNode*>(n); + if (command == COMMAND_QMLSIGNAL) + return new QmlSignalNode(qmlClass,name); + else + return new QmlMethodNode(qmlClass,name); } } - return new QmlNode(tre->root(), names[0], classNode); } -#endif +#endif return 0; } +#ifdef QDOC_QML + +/*! + A QML property argument has the form... + + <type> <element>::<name> + + This function splits the argument into those three + parts, sets \a type, \a element, and \a property, + and returns true. If any of the parts isn't found, + a debug message is output and false is returned. + */ +bool CppCodeParser::splitQmlPropertyArg(const Doc& doc, + const QString& arg, + QString& type, + QString& element, + QString& property) +{ + QStringList blankSplit = arg.split(" "); + if (blankSplit.size() > 1) { + type = blankSplit[0]; + QStringList colonSplit(blankSplit[1].split("::")); + if (colonSplit.size() > 1) { + element = colonSplit[0]; + property = colonSplit[1]; + return true; + } + else + doc.location().warning(tr("Missing QML element name or property name")); + } + else + doc.location().warning(tr("Missing QML property type or property path")); + return false; +} + +/*! + A QML signal or method argument has the form... + + <element>::<name> + + This function splits the argument into those two + parts, sets \a element, and \a name, and returns + true. If either of the parts isn't found, a debug + message is output and false is returned. + */ +bool CppCodeParser::splitQmlArg(const Doc& doc, + const QString& arg, + QString& element, + QString& name) +{ + QStringList colonSplit(arg.split("::")); + if (colonSplit.size() > 1) { + element = colonSplit[0]; + name = colonSplit[1]; + return true; + } + else + doc.location().warning(tr("Missing QML element name or signal/method name")); + return false; +} + +/*! + Process the topic \a command group with arguments \a args. + + Currently, this function is called only for \e{qmlproperty}. + */ +Node *CppCodeParser::processTopicCommandGroup(const Doc& doc, + const QString& command, + const QStringList& args) +{ + QmlPropGroupNode* qmlPropGroup = 0; + if (command == COMMAND_QMLPROPERTY) { + QString type; + QString element; + QString property; + QStringList::ConstIterator arg = args.begin(); + if (splitQmlPropertyArg(doc,(*arg),type,element,property)) { + Node* n = tre->findNode(QStringList(element),Node::Fake); + if (n && n->subType() == Node::QmlClass) { + QmlClassNode* qmlClass = static_cast<QmlClassNode*>(n); + if (qmlClass) + qmlPropGroup = new QmlPropGroupNode(qmlClass,property); + } + } + if (qmlPropGroup) { + new QmlPropertyNode(qmlPropGroup,property,type); + ++arg; + while (arg != args.end()) { + if (splitQmlPropertyArg(doc,(*arg),type,element,property)) { + new QmlPropertyNode(qmlPropGroup,property,type); + } + ++arg; + } + } + } + return qmlPropGroup; +} +#endif + /*! Returns the set of strings representing the common metacommands plus some other metacommands. @@ -684,7 +806,13 @@ QSet<QString> CppCodeParser::otherMetaCommands() << COMMAND_NEXTPAGE << COMMAND_PREVIOUSPAGE << COMMAND_INDEXPAGE +#ifdef QDOC_QML + << COMMAND_STARTPAGE + << COMMAND_QMLINHERITS + << COMMAND_QMLDEFAULT; +#else << COMMAND_STARTPAGE; +#endif } /*! @@ -759,14 +887,19 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, else if (command == COMMAND_RELATES) { InnerNode *pseudoParent; if (arg.startsWith("<") || arg.startsWith("\"")) { - pseudoParent = static_cast<InnerNode *>(tre->findNode(QStringList(arg), Node::Fake)); + pseudoParent = + static_cast<InnerNode *>(tre->findNode(QStringList(arg), + Node::Fake)); } else { QStringList newPath = arg.split("::"); - pseudoParent = static_cast<InnerNode *>(tre->findNode(QStringList(newPath), Node::Class)); + pseudoParent = + static_cast<InnerNode*>(tre->findNode(QStringList(newPath), + Node::Class)); if (!pseudoParent) - pseudoParent = static_cast<InnerNode *>(tre->findNode(QStringList(newPath), - Node::Namespace)); + pseudoParent = + static_cast<InnerNode*>(tre->findNode(QStringList(newPath), + Node::Namespace)); } if (!pseudoParent) { doc.location().warning(tr("Cannot find '%1' in '\\%2'") @@ -791,6 +924,15 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, else if (command == COMMAND_STARTPAGE) { setLink(node, Node::StartLink, arg); } +#ifdef QDOC_QML + else if (command == COMMAND_QMLINHERITS) { + setLink(node, Node::InheritsLink, arg); + } + else if (command == COMMAND_QMLDEFAULT) { + QmlPropGroupNode* qpgn = static_cast<QmlPropGroupNode*>(node); + qpgn->setDefault(); + } +#endif else { processCommonMetaCommand(doc.location(),command,arg,node,tre); } @@ -870,9 +1012,8 @@ bool CppCodeParser::match(int target) readToken(); return true; } - else { + else return false; - } } /*! @@ -907,11 +1048,14 @@ bool CppCodeParser::matchTemplateAngles(CodeChunk *dataType) do { if (tok == Tok_LeftAngle) { leftAngleDepth++; - } else if (tok == Tok_RightAngle) { + } + else if (tok == Tok_RightAngle) { leftAngleDepth--; - } else if (tok == Tok_LeftParen || tok == Tok_LeftBrace) { + } + else if (tok == Tok_LeftParen || tok == Tok_LeftBrace) { ++parenAndBraceDepth; - } else if (tok == Tok_RightParen || tok == Tok_RightBrace) { + } + else if (tok == Tok_RightParen || tok == Tok_RightBrace) { if (--parenAndBraceDepth < 0) return false; } @@ -974,7 +1118,8 @@ bool CppCodeParser::matchDataType(CodeChunk *dataType, QString *var) dataType->append(previousLexeme()); else return false; - } else if (match(Tok_int) || match(Tok_char) || match(Tok_double)) { + } + else if (match(Tok_int) || match(Tok_char) || match(Tok_double)) { dataType->append(previousLexeme()); } @@ -1074,8 +1219,10 @@ bool CppCodeParser::matchParameter(FunctionNode *func) readToken(); } } - func->addParameter(Parameter(dataType.toString(), "", name, - defaultValue.toString())); // ### + func->addParameter(Parameter(dataType.toString(), + "", + name, + defaultValue.toString())); // ### return true; } @@ -1123,7 +1270,8 @@ bool CppCodeParser::matchFunctionDecl(InnerNode *parent, compat = true; if (tok == Tok_operator && - (returnType.toString().isEmpty() || returnType.toString().endsWith("::"))) { + (returnType.toString().isEmpty() || + returnType.toString().endsWith("::"))) { // 'QString::operator const char *()' parentPath = returnType.toString().split(sep); parentPath.removeAll(QString()); @@ -1159,11 +1307,10 @@ bool CppCodeParser::matchFunctionDecl(InnerNode *parent, name = previousLexeme(); matchTemplateAngles(); - if (match(Tok_Gulbrandsen)) { + if (match(Tok_Gulbrandsen)) parentPath.append(name); - } else { + else break; - } } if (tok == Tok_operator) { @@ -1176,7 +1323,9 @@ bool CppCodeParser::matchFunctionDecl(InnerNode *parent, break; } } - if (parent && (tok == Tok_Semicolon || tok == Tok_LeftBracket || tok == Tok_Colon) + if (parent && (tok == Tok_Semicolon || + tok == Tok_LeftBracket || + tok == Tok_Colon) && access != Node::Private) { if (tok == Tok_LeftBracket) { returnType.appendHotspot(); @@ -1190,7 +1339,8 @@ bool CppCodeParser::matchFunctionDecl(InnerNode *parent, } if (tok != Tok_Semicolon) return false; - } else if (tok == Tok_Colon) { + } + else if (tok == Tok_Colon) { returnType.appendHotspot(); while (tok != Tok_Semicolon && tok != Tok_Eoi) { @@ -1382,7 +1532,7 @@ bool CppCodeParser::matchNamespaceDecl(InnerNode *parent) QString namespaceName = previousLexeme(); NamespaceNode *namespasse = 0; if (parent) - namespasse = static_cast<NamespaceNode *>(parent->findNode(namespaceName, Node::Namespace)); + namespasse = static_cast<NamespaceNode*>(parent->findNode(namespaceName, Node::Namespace)); if (!namespasse) { namespasse = new NamespaceNode(parent, namespaceName); namespasse->setAccess(access); @@ -1448,7 +1598,8 @@ bool CppCodeParser::matchEnumItem(InnerNode *parent, EnumNode *enume) if (strVal.isEmpty()) { if (enume->items().isEmpty()) { strVal = "0"; - } else { + } + else { QString last = enume->items().last().value(); bool ok; int n = last.toInt(&ok); @@ -1458,15 +1609,16 @@ bool CppCodeParser::matchEnumItem(InnerNode *parent, EnumNode *enume) strVal = last.left(2) + QString::number(n + 1, 16); else strVal = "0" + QString::number(n + 1, 8); - } else { - strVal = QString::number(n + 1); } + else + strVal = QString::number(n + 1); } } } enume->addItem(EnumItem(name, strVal)); - } else { + } + else { VariableNode *var = new VariableNode(parent, name); var->setAccess(access); var->setLocation(location()); @@ -1554,7 +1706,8 @@ bool CppCodeParser::matchProperty(InnerNode *parent) if (match(Tok_Ident)) { value = previousLexeme(); - } else if (match(Tok_LeftParen)) { + } + else if (match(Tok_LeftParen)) { int depth = 1; while (tok != Tok_Eoi) { if (tok == Tok_LeftParen) { @@ -1807,6 +1960,28 @@ bool CppCodeParser::matchDocsAndStuff() /* There is a topic command. Process it. */ +#ifdef QDOC_QML + if (topic == COMMAND_QMLPROPERTY) { + Doc nodeDoc = doc; + Node *node = processTopicCommandGroup(nodeDoc,topic,args); + if (node != 0) { + nodes.append(node); + docs.append(nodeDoc); + } + } + else { + QStringList::ConstIterator a = args.begin(); + while (a != args.end()) { + Doc nodeDoc = doc; + Node *node = processTopicCommand(nodeDoc,topic,*a); + if (node != 0) { + nodes.append(node); + docs.append(nodeDoc); + } + ++a; + } + } +#else QStringList::ConstIterator a = args.begin(); while (a != args.end()) { Doc nodeDoc = doc; @@ -1817,6 +1992,7 @@ bool CppCodeParser::matchDocsAndStuff() } ++a; } +#endif } NodeList::Iterator n = nodes.begin(); @@ -1824,7 +2000,8 @@ bool CppCodeParser::matchDocsAndStuff() while (n != nodes.end()) { processOtherMetaCommands(*d, *n); (*n)->setDoc(*d); - if ((*n)->isInnerNode() && ((InnerNode *)*n)->includes().isEmpty()) { + if ((*n)->isInnerNode() && + ((InnerNode *)*n)->includes().isEmpty()) { InnerNode *m = static_cast<InnerNode *>(*n); while (m->parent() != tre->root()) m = m->parent(); @@ -1912,7 +2089,8 @@ void CppCodeParser::parseQiteratorDotH(const Location &location, mutableSequentialIteratorDefinition = lines[1]; associativeIteratorDefinition = lines[2]; mutableAssociativeIteratorDefinition = lines[3]; - } else { + } + else { location.warning(tr("The qiterator.h hack failed")); } } @@ -1994,7 +2172,7 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) foreach (const QString &exampleFile, exampleFiles) (void) new FakeNode(fake, exampleFile.mid(sizeOfBoringPartOfName), - FakeNode::File); + Node::File); } QT_END_NAMESPACE diff --git a/tools/qdoc3/cppcodeparser.h b/tools/qdoc3/cppcodeparser.h index 1f4131894d..cbb01498fc 100644 --- a/tools/qdoc3/cppcodeparser.h +++ b/tools/qdoc3/cppcodeparser.h @@ -90,6 +90,21 @@ class CppCodeParser : public CodeParser virtual Node *processTopicCommand(const Doc& doc, const QString& command, const QString& arg); +#ifdef QDOC_QML + // might need to implement this in QsCodeParser as well. + virtual Node *processTopicCommandGroup(const Doc& doc, + const QString& command, + const QStringList& args); + bool splitQmlPropertyArg(const Doc& doc, + const QString& arg, + QString& type, + QString& element, + QString& property); + bool splitQmlArg(const Doc& doc, + const QString& arg, + QString& element, + QString& name); +#endif virtual QSet<QString> otherMetaCommands(); virtual void processOtherMetaCommand(const Doc& doc, const QString& command, diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index e97b7f275b..e92f53b454 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -42,7 +42,7 @@ /* generator.cpp */ - +#include <QtCore> #include <qdir.h> #include <qdebug.h> #include "codemarker.h" @@ -77,7 +77,11 @@ static void singularPlural(Text& text, const NodeList& nodes) } Generator::Generator() - : amp("&"), lt("<"), gt(">"), quot("""), tag("</?@[^>]*>") + : amp("&"), + lt("<"), + gt(">"), + quot("""), + tag("</?@[^>]*>") { generators.prepend(this); } @@ -125,7 +129,8 @@ void Generator::initialize(const Config &config) QSet<QString> formats = config.subVars(imagesDotFileExtensions); QSet<QString>::ConstIterator f = formats.begin(); while (f != formats.end()) { - imgFileExts[*f] = config.getStringList(imagesDotFileExtensions + Config::dot + *f); + imgFileExts[*f] = config.getStringList(imagesDotFileExtensions + + Config::dot + *f); ++f; } @@ -133,16 +138,22 @@ void Generator::initialize(const Config &config) while (g != generators.end()) { if (outputFormats.contains((*g)->format())) { (*g)->initializeGenerator(config); - QStringList extraImages = config.getStringList(CONFIG_EXTRAIMAGES + Config::dot - + (*g)->format()); + QStringList extraImages = config.getStringList(CONFIG_EXTRAIMAGES + + Config::dot + + (*g)->format()); QStringList::ConstIterator e = extraImages.begin(); while (e != extraImages.end()) { QString userFriendlyFilePath; - QString filePath = Config::findFile(config.lastLocation(), imageFiles, imageDirs, *e, - imgFileExts[(*g)->format()], userFriendlyFilePath); + QString filePath = Config::findFile(config.lastLocation(), + imageFiles, imageDirs, *e, + imgFileExts[(*g)->format()], + userFriendlyFilePath); if (!filePath.isEmpty()) - Config::copyFile(config.lastLocation(), filePath, userFriendlyFilePath, - (*g)->outputDir() + "/images"); + Config::copyFile(config.lastLocation(), + filePath, + userFriendlyFilePath, + (*g)->outputDir() + + "/images"); ++e; } } @@ -158,20 +169,23 @@ void Generator::initialize(const Config &config) QSet<QString> formats = config.subVars(formattingDotName); QSet<QString>::ConstIterator f = formats.begin(); while (f != formats.end()) { - QString def = config.getString(formattingDotName + Config::dot + - *f); + QString def = config.getString(formattingDotName + + Config::dot + *f); if (!def.isEmpty()) { int numParams = Config::numParams(def); int numOccs = def.count("\1"); if (numParams != 1) { - config.lastLocation().warning(tr("Formatting '%1' must have exactly one" - " parameter (found %2)") - .arg(*n).arg(numParams)); + config.lastLocation().warning(tr("Formatting '%1' must " + "have exactly one " + "parameter (found %2)") + .arg(*n).arg(numParams)); } else if (numOccs > 1) { - config.lastLocation().fatal(tr("Formatting '%1' must contain exactly one" - " occurrence of '\\1' (found %2)") + config.lastLocation().fatal(tr("Formatting '%1' must " + "contain exactly one " + "occurrence of '\\1' " + "(found %2)") .arg(*n).arg(numOccs)); } else { @@ -262,9 +276,14 @@ bool Generator::generateText(const Text& text, } #ifdef QDOC_QML +/*! + Extract sections of markup text surrounded by \e qmltext + and \e endqmltext and output them. + */ bool Generator::generateQmlText(const Text& text, const Node *relative, - CodeMarker *marker) + CodeMarker *marker, + const QString& qmlName) { const Atom* atom = text.firstAtom(); if (atom == 0) @@ -301,9 +320,9 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) } else if (node->type() == Node::Fake) { const FakeNode *fake = static_cast<const FakeNode *>(node); - if (fake->subType() == FakeNode::Example) + if (fake->subType() == Node::Example) generateExampleFiles(fake, marker); - else if (fake->subType() == FakeNode::File) + else if (fake->subType() == Node::File) quiet = true; } @@ -395,7 +414,8 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) FunctionNode *primaryFunc = func->parent()->findFunctionNode(func->name()); if (primaryFunc) { - foreach (const Parameter ¶m, primaryFunc->parameters()) { + foreach (const Parameter ¶m, + primaryFunc->parameters()) { if (param.name() == *a) { needWarning = false; break; @@ -405,7 +425,8 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) } if (needWarning && !func->isReimp()) node->doc().location().warning( - tr("Undocumented parameter '%1' in %2").arg(*a).arg(marker->plainFullName(node))); + tr("Undocumented parameter '%1' in %2") + .arg(*a).arg(marker->plainFullName(node))); } ++a; } @@ -427,7 +448,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) if (node->type() == Node::Fake) { const FakeNode *fake = static_cast<const FakeNode *>(node); - if (fake->subType() == FakeNode::File) { + if (fake->subType() == Node::File) { Text text; Quoter quoter; Doc::quoteFromFile(fake->doc().location(), quoter, fake->name()); @@ -474,7 +495,8 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker) if ((*r).access == Node::Protected) { text << " (protected)"; - } else if ((*r).access == Node::Private) { + } + else if ((*r).access == Node::Private) { text << " (private)"; } text << separator(index++, classe->baseClasses().count()); @@ -485,6 +507,15 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker) } } +#ifdef QDOC_QML +/*! + */ +void Generator::generateQmlInherits(const QmlClassNode* , CodeMarker* ) +{ + // stub. +} +#endif + void Generator::generateInheritedBy(const ClassNode *classe, CodeMarker *marker) { @@ -512,18 +543,21 @@ void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker) QString exampleFile = child->name(); openedList.next(); text << Atom(Atom::ListItemNumber, openedList.numberString()) - << Atom(Atom::ListItemLeft, openedList.styleString()) << Atom::ParaLeft + << Atom(Atom::ListItemLeft, openedList.styleString()) + << Atom::ParaLeft << Atom(Atom::Link, exampleFile) << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << exampleFile << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) - << Atom::ParaRight << Atom(Atom::ListItemRight, openedList.styleString()); + << Atom::ParaRight + << Atom(Atom::ListItemRight, openedList.styleString()); } text << Atom(Atom::ListRight, openedList.styleString()); generateText(text, fake, marker); } -void Generator::generateModuleWarning(const ClassNode *classe, CodeMarker *marker) +void Generator::generateModuleWarning(const ClassNode *classe, + CodeMarker *marker) { QString module = classe->moduleName(); if (!module.isEmpty()) { @@ -544,8 +578,10 @@ void Generator::generateModuleWarning(const ClassNode *classe, CodeMarker *marke << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) << Atom::ParaRight; } - else if (module == "Qt3Support" && Tokenizer::isTrue("defined(opensourceedition)")) { - text << Atom::ParaLeft << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) + else if (module == "Qt3Support" && + Tokenizer::isTrue("defined(opensourceedition)")) { + text << Atom::ParaLeft + << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) << "Note to Qt Desktop Light Edition users:" << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) << " This class is only available in the " @@ -573,10 +609,12 @@ QString Generator::indent(int level, const QString& markedCode) if (markedCode.at(i - 1) == QLatin1Char('>')) break; } - } else { + } + else { if (markedCode.at(i) == QLatin1Char('\n')) { column = 0; - } else { + } + else { if (column == 0) { for (int j = 0; j < level; j++) t += QLatin1Char(' '); @@ -645,7 +683,7 @@ void Generator::setImageFileExtensions(const QStringList& extensions) void Generator::unknownAtom(const Atom *atom) { Location::internalError(tr("unknown atom type '%1' in %2 generator") - .arg(atom->typeString()).arg(format())); + .arg(atom->typeString()).arg(format())); } bool Generator::matchAhead(const Atom *atom, Atom::Type expectedAtomType) @@ -674,7 +712,8 @@ void Generator::supplementAlsoList(const Node *node, QList<Text> &alsoList) alternateFunc = func->parent()->findFunctionNode(alternateName); } } - } else if (!func->name().isEmpty()) { + } + else if (!func->name().isEmpty()) { alternateName = "set"; alternateName += func->name()[0].toUpper(); alternateName += func->name().mid(1); @@ -730,9 +769,13 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker) case Node::Main: break; case Node::Preliminary: - text << Atom::ParaLeft << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) << "This " - << typeString(node) << " is under development and is subject to change." - << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) << Atom::ParaRight; + text << Atom::ParaLeft + << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) + << "This " + << typeString(node) + << " is under development and is subject to change." + << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) + << Atom::ParaRight; break; case Node::Deprecated: text << Atom::ParaLeft; @@ -750,16 +793,21 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker) text << "This " << typeString(node) << " is obsolete."; if (node->isInnerNode()) text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD); - text << " It is provided to keep old source code working. We strongly advise against " + text << " It is provided to keep old source code working. " + << "We strongly advise against " << "using it in new code." << Atom::ParaRight; break; case Node::Compat: // reimplemented in HtmlGenerator subclass if (node->isInnerNode()) { - text << Atom::ParaLeft << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) << "This " - << typeString(node) << " is part of the Qt 3 compatibility layer." + text << Atom::ParaLeft + << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) + << "This " + << typeString(node) + << " is part of the Qt 3 compatibility layer." << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) - << " It is provided to keep old source code working. We strongly advise against " + << " It is provided to keep old source code working. " + << "We strongly advise against " << "using it in new code. See " << Atom(Atom::AutoLink, "Porting to Qt 4") << " for more information." @@ -915,7 +963,9 @@ void Generator::generateSince(const Node *node, CodeMarker *marker) { if (!node->since().isEmpty()) { Text text; - text << Atom::ParaLeft << "This " << typeString(node) + text << Atom::ParaLeft + << "This " + << typeString(node) << " was introduced in "; if (project.isEmpty()) text << "version"; @@ -945,7 +995,8 @@ void Generator::generateReimplementedFrom(const FunctionNode *func, { if (func->reimplementedFrom() != 0) { const FunctionNode *from = func->reimplementedFrom(); - if (from->access() != Node::Private && from->parent()->access() != Node::Private) { + if (from->access() != Node::Private && + from->parent()->access() != Node::Private) { Text text; text << Atom::ParaLeft << "Reimplemented from "; QString fullName = from->parent()->name() + "::" + from->name() + "()"; @@ -987,8 +1038,8 @@ const Atom *Generator::generateAtomList(const Atom *atom, if (atom->type() == Atom::FormatEndif) { if (generate && numAtoms0 == numAtoms) { - relative->location().warning(tr("Output format %1 not handled"). - arg(format())); + relative->location().warning(tr("Output format %1 not handled") + .arg(format())); Atom unhandledFormatAtom(Atom::UnhandledFormat, format()); generateAtomList(&unhandledFormatAtom, relative, @@ -999,7 +1050,8 @@ const Atom *Generator::generateAtomList(const Atom *atom, atom = atom->next(); } } - else if (atom->type() == Atom::FormatElse || atom->type() == Atom::FormatEndif) { + else if (atom->type() == Atom::FormatElse || + atom->type() == Atom::FormatEndif) { return atom; } else { @@ -1067,7 +1119,8 @@ void Generator::appendSortedNames(Text& text, r = classes.begin(); while (r != classes.end()) { - if ((*r).node->access() == Node::Public && (*r).node->status() != Node::Internal + if ((*r).node->access() == Node::Public && + (*r).node->status() != Node::Internal && !(*r).node->doc().isEmpty()) { Text className; appendFullName(className, (*r).node, classe, marker); diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index cdc4c293fd..8e3c57e21d 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -99,7 +99,10 @@ class Generator #ifdef QDOC_QML virtual bool generateQmlText(const Text& text, const Node *relative, - CodeMarker *marker); + CodeMarker *marker, + const QString& qmlName); + virtual void generateQmlInherits(const QmlClassNode* cn, + CodeMarker* marker); #endif virtual void generateBody(const Node *node, CodeMarker *marker); virtual void generateAlsoList(const Node *node, CodeMarker *marker); diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index cf7c6180aa..f862e556a0 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -118,16 +118,19 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList typeHash["variable"] = Node::Variable; typeHash["target"] = Node::Target; - QHash<QString, FakeNode::SubType> subTypeHash; - subTypeHash["example"] = FakeNode::Example; - subTypeHash["headerfile"] = FakeNode::HeaderFile; - subTypeHash["file"] = FakeNode::File; - subTypeHash["group"] = FakeNode::Group; - subTypeHash["module"] = FakeNode::Module; - subTypeHash["page"] = FakeNode::Page; - subTypeHash["externalpage"] = FakeNode::ExternalPage; - - QSet<FakeNode::SubType> allSubTypes = QSet<FakeNode::SubType>::fromList(subTypeHash.values()); + QHash<QString, Node::SubType> subTypeHash; + subTypeHash["example"] = Node::Example; + subTypeHash["headerfile"] = Node::HeaderFile; + subTypeHash["file"] = Node::File; + subTypeHash["group"] = Node::Group; + subTypeHash["module"] = Node::Module; + subTypeHash["page"] = Node::Page; + subTypeHash["externalpage"] = Node::ExternalPage; +#ifdef QDOC_QML + subTypeHash["qmlclass"] = Node::QmlClass; +#endif + + QSet<Node::SubType> allSubTypes = QSet<Node::SubType>::fromList(subTypeHash.values()); foreach (const QString &selector, selectors) { QStringList pieces = selector.split(":"); @@ -139,7 +142,7 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList QString lower = pieces[0].toLower(); pieces = pieces[1].split(","); if (typeHash.contains(lower)) { - QSet<FakeNode::SubType> subTypes; + QSet<Node::SubType> subTypes; for (int i = 0; i < pieces.size(); ++i) { QString lower = pieces[i].toLower(); if (subTypeHash.contains(lower)) @@ -235,7 +238,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, // mask. const FakeNode *fakeNode = static_cast<const FakeNode *>(node); if (subproject.selectors[node->type()].contains(fakeNode->subType()) && - fakeNode->subType() != FakeNode::ExternalPage && + fakeNode->subType() != Node::ExternalPage && !fakeNode->fullTitle().isEmpty()) project.subprojects[name].nodes[objName] = node; @@ -324,10 +327,10 @@ bool HelpProjectWriter::generateSection(HelpProject &project, // attributes. case Node::Fake: { const FakeNode *fakeNode = static_cast<const FakeNode*>(node); - if (fakeNode->subType() != FakeNode::ExternalPage && + if (fakeNode->subType() != Node::ExternalPage && !fakeNode->fullTitle().isEmpty()) { - if (fakeNode->subType() != FakeNode::File) { + if (fakeNode->subType() != Node::File) { if (fakeNode->doc().hasKeywords()) { foreach (const Atom *keyword, fakeNode->doc().keywords()) { if (!keyword->string().isEmpty()) { @@ -485,7 +488,7 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer writer.writeAttribute("title", fakeNode->fullTitle()); // qDebug() << "Title:" << fakeNode->fullTitle(); - if (fakeNode->subType() == FakeNode::HeaderFile) { + if (fakeNode->subType() == Node::HeaderFile) { // Write subsections for all members, obsolete members and Qt 3 // members. @@ -609,7 +612,7 @@ void HelpProjectWriter::generateProject(HelpProject &project) while (nextPage) { writeNode(project, writer, nextPage); nextTitle = nextPage->links().value(Node::NextLink).first; - if (nextTitle.isEmpty()) + if(nextTitle.isEmpty()) break; nextPage = const_cast<FakeNode *>(tree->findFakeNodeByTitle(nextTitle)); } diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index f92391e0d1..659011473c 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -186,7 +186,7 @@ HtmlGenerator::HtmlGenerator() : helpProjectWriter(0), inLink(false), inContents(false), inSectionHeading(false), inTableHeader(false), numTableRows(0), threeColumnEnumValueTable(true), funcLeftParen("\\S(\\()"), - tre(0), slow(false) + tre(0), slow(false), obsoleteLinks(false) { } @@ -215,6 +215,7 @@ void HtmlGenerator::initializeGenerator(const Config &config) }; Generator::initializeGenerator(config); + obsoleteLinks = config.getBool(QLatin1String(CONFIG_OBSOLETELINKS)); setImageFileExtensions(QStringList() << "png" << "jpg" << "jpeg" << "gif"); int i = 0; while (defaults[i].key) { @@ -223,11 +224,21 @@ void HtmlGenerator::initializeGenerator(const Config &config) i++; } - style = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_STYLE); - postHeader = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_POSTHEADER); - footer = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_FOOTER); - address = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_ADDRESS); - pleaseGenerateMacRef = config.getBool(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_GENERATEMACREFS); + style = config.getString(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_STYLE); + postHeader = config.getString(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_POSTHEADER); + footer = config.getString(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_FOOTER); + address = config.getString(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_ADDRESS); + pleaseGenerateMacRef = config.getBool(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_GENERATEMACREFS); project = config.getString(CONFIG_PROJECT); @@ -241,10 +252,16 @@ void HtmlGenerator::initializeGenerator(const Config &config) QSet<QString>::ConstIterator edition = editionNames.begin(); while (edition != editionNames.end()) { QString editionName = *edition; - QStringList editionModules = config.getStringList( - CONFIG_EDITION + Config::dot + editionName + Config::dot + "modules"); - QStringList editionGroups = config.getStringList( - CONFIG_EDITION + Config::dot + editionName + Config::dot + "groups"); + QStringList editionModules = config.getStringList(CONFIG_EDITION + + Config::dot + + editionName + + Config::dot + + "modules"); + QStringList editionGroups = config.getStringList(CONFIG_EDITION + + Config::dot + + editionName + + Config::dot + + "groups"); if (!editionModules.isEmpty()) editionModuleMap[editionName] = editionModules; @@ -256,11 +273,17 @@ void HtmlGenerator::initializeGenerator(const Config &config) slow = config.getBool(CONFIG_SLOW); - stylesheets = config.getStringList(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_STYLESHEETS); - customHeadElements = config.getStringList(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_CUSTOMHEADELEMENTS); + stylesheets = config.getStringList(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_STYLESHEETS); + customHeadElements = config.getStringList(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_CUSTOMHEADELEMENTS); codeIndent = config.getInt(CONFIG_CODEINDENT); - helpProjectWriter = new HelpProjectWriter(config, project.toLower() + ".qhp"); + helpProjectWriter = new HelpProjectWriter(config, + project.toLower() + + ".qhp"); } void HtmlGenerator::terminateGenerator() @@ -304,9 +327,9 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) findAllFunctions(tree->root()); findAllLegaleseTexts(tree->root()); findAllNamespaces(tree->root()); -#ifdef ZZZ_QDOC_QML +#ifdef ZZZ_QDOC_QML findAllQmlClasses(tree->root()); -#endif +#endif PageGenerator::generateTree(tree, marker); @@ -410,7 +433,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, QString str; atom = atom->next(); while (atom != 0 && atom->type() != Atom::BriefRight) { - if (atom->type() == Atom::String || atom->type() == Atom::AutoLink) + if (atom->type() == Atom::String || + atom->type() == Atom::AutoLink) str += atom->string(); skipAhead++; atom = atom->next(); @@ -453,14 +477,14 @@ int HtmlGenerator::generateAtom(const Atom *atom, marker,relative)) << "</pre>\n"; break; -#ifdef QDOC_QML +#ifdef QDOC_QML case Atom::Qml: out() << "<pre>" << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()), marker,relative)) << "</pre>\n"; break; -#endif +#endif case Atom::CodeNew: out() << "<p>you can rewrite it as</p>\n" << "<pre>" @@ -976,7 +1000,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, case Atom::EndQmlText: // don't do anything with these. They are just tags. break; -#endif +#endif default: unknownAtom(atom); } @@ -1042,6 +1066,12 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, generateHeader(title, inner, marker, true); generateTitle(title, subtitleText, SmallSubTitle, inner, marker); +#ifdef QDOC_QML + if (classe && !classe->qmlElement().isEmpty()) { + generateInstantiatedBy(classe,marker); + } +#endif + generateBrief(inner, marker); generateIncludes(inner, marker); generateStatus(inner, marker); @@ -1225,16 +1255,19 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) QList<Section>::const_iterator s; QString htmlTitle = fake->fullTitle(); - if (fake->subType() == FakeNode::File && !fake->subTitle().isEmpty()) { + if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) { subTitleSize = SmallSubTitle; htmlTitle += " (" + fake->subTitle() + ")"; } generateHeader(htmlTitle, fake, marker, true); - generateTitle(fake->fullTitle(), Text() << fake->subTitle(), subTitleSize, - fake, marker); + generateTitle(fake->fullTitle(), + Text() << fake->subTitle(), + subTitleSize, + fake, + marker); - if (fake->subType() == FakeNode::Module) { + if (fake->subType() == Node::Module) { // Generate brief text and status for modules. generateBrief(fake, marker); generateStatus(fake, marker); @@ -1248,7 +1281,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]); } } - else if (fake->subType() == FakeNode::HeaderFile) { + else if (fake->subType() == Node::HeaderFile) { // Generate brief text and status for modules. generateBrief(fake, marker); generateStatus(fake, marker); @@ -1295,7 +1328,49 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) appendDcfSubSection(&fakeSection, compatSection); } } +#ifdef QDOC_QML + else if (fake->subType() == Node::QmlClass) { + const QmlClassNode* qml_cn = static_cast<const QmlClassNode*>(fake); + const ClassNode* cn = qml_cn->classNode(); + generateQmlInherits(qml_cn, marker); + generateQmlInstantiates(qml_cn, marker); + generateBrief(qml_cn, marker); + sections = marker->qmlSections(qml_cn,CodeMarker::Summary); + s = sections.begin(); + while (s != sections.end()) { + out() << "<a name=\"" << registerRef((*s).name) << "\"></a>\n"; + out() << "<h2>" << protect((*s).name) << "</h2>\n"; + generateQmlSummary(*s,fake,marker); + ++s; + } + out() << "<a name=\"" << registerRef("details") << "\"></a>\n"; + out() << "<h2>" << "Detailed Description" << "</h2>\n"; + generateBody(fake, marker); + if (cn) + generateQmlText(cn->doc().body(), cn, marker, fake->name()); + generateAlsoList(fake, marker); + out() << "<hr />\n"; + + sections = marker->qmlSections(qml_cn,CodeMarker::Detailed); + s = sections.begin(); + while (s != sections.end()) { + out() << "<h2>" << protect((*s).name) << "</h2>\n"; + NodeList::ConstIterator m = (*s).members.begin(); + while (m != (*s).members.end()) { + generateDetailedQmlMember(*m, fake, marker); + out() << "<br />\n"; + fakeSection.keywords += qMakePair((*m)->name(), + linkForNode(*m,0)); + ++m; + } + ++s; + } + generateFooter(fake); + return; + } +#endif + sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { @@ -1306,24 +1381,12 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) } Text brief = fake->doc().briefText(); - if (fake->subType() == FakeNode::Module && !brief.isEmpty()) { + if (fake->subType() == Node::Module && !brief.isEmpty()) { out() << "<a name=\"" << registerRef("details") << "\"></a>\n"; out() << "<h2>" << "Detailed Description" << "</h2>\n"; } generateBody(fake, marker); -#ifdef QDOC_QML - if (fake->subType() == FakeNode::QmlClass) { - //qDebug() << "generateFakeNode(): QML CLASS" << fake->name(); - const QmlNode* qmlNode = static_cast<const QmlNode*>(fake); - const ClassNode* cn = qmlNode->classNode(); - if (cn) { - //qDebug() << " CPP CLASS" << cn->name(); - generateQmlText(cn->doc().body(), cn, marker); - } - } -#endif - generateAlsoList(fake, marker); if (!fake->groupMembers().isEmpty()) { @@ -1353,10 +1416,10 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) } generateFooter(fake); - if (fake->subType() == FakeNode::Example) { + if (fake->subType() == Node::Example) { appendDcfSubSection(&dcfExamplesRoot, fakeSection); } - else if (fake->subType() != FakeNode::File) { + else if (fake->subType() != Node::File) { QString contentsPage = fake->links().value(Node::ContentsLink).first; if (contentsPage == "Qt Designer Manual") { @@ -1643,7 +1706,10 @@ void HtmlGenerator::generateTableOfContents(const Node *node, columnSize = 0; } out() << "<li>"; - out() << "<a href=\"" << nodeName << "#" << Doc::canonicalTitle(headingText.toString()) + out() << "<a href=\"" + << nodeName + << "#" + << Doc::canonicalTitle(headingText.toString()) << "\">"; generateAtomList(headingText.firstAtom(), node, marker, true, numAtoms); out() << "</a></li>\n"; @@ -1693,7 +1759,8 @@ void HtmlGenerator::generateNavigationBar(const NavigationBar& bar, } #endif -QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker) +QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, + CodeMarker *marker) { QList<Section> sections; QList<Section>::ConstIterator s; @@ -1744,7 +1811,8 @@ QString HtmlGenerator::generateLowStatusMemberFile(const InnerNode *inner, if (status == CodeMarker::Compat) { title = "Qt 3 Support Members for " + inner->name(); fileName = fileBase(inner) + "-qt3." + fileExtension(inner); - } else { + } + else { title = "Obsolete Members for " + inner->name(); fileName = fileBase(inner) + "-obsolete." + fileExtension(inner); } @@ -1758,10 +1826,11 @@ QString HtmlGenerator::generateLowStatusMemberFile(const InnerNode *inner, "<a href=\"qt3support.html\">Qt 3 support layer</a>.</b> " "They are provided to help you port old code to Qt 4. We advise against " "using them in new code.</p>\n"; - } else { - out() << "<p><b>The following class members are obsolete.</b> They are provided to keep " - "old source code working. We strongly advise against using them in new " - "code.</p>\n"; + } + else { + out() << "<p><b>The following class members are obsolete.</b> " + << "They are provided to keep old source code working. " + << "We strongly advise against using them in new code.</p>\n"; } out() << "<p><ul><li><a href=\"" @@ -1816,8 +1885,10 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative, if (stack.top().isEmpty()) { stack.pop(); out() << "</ul>\n"; - } else { - const ClassNode *child = static_cast<const ClassNode *>(*stack.top().begin()); + } + else { + const ClassNode *child = + static_cast<const ClassNode *>(*stack.top().begin()); out() << "<li>"; generateFullName(child, relative, marker); out() << "</li>\n"; @@ -1836,10 +1907,9 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative, } } -void -HtmlGenerator::generateAnnotatedList(const Node *relative, - CodeMarker *marker, - const QMap<QString,const Node *>&nodeMap) +void HtmlGenerator::generateAnnotatedList(const Node *relative, + CodeMarker *marker, + const QMap<QString, const Node *> &nodeMap) { out() << "<p><table width=\"100%\" class=\"annotated\" cellpadding=\"2\" " << "cellspacing=\"1\" border=\"0\">\n"; @@ -1866,7 +1936,8 @@ HtmlGenerator::generateAnnotatedList(const Node *relative, generateText(brief, node, marker); out() << "</td>"; } - } else { + } + else { out() << "<td>"; out() << protect(node->doc().briefText().toString()); out() << "</td>"; @@ -1876,10 +1947,9 @@ HtmlGenerator::generateAnnotatedList(const Node *relative, out() << "</table></p>\n"; } -void -HtmlGenerator::generateCompactList(const Node *relative, - CodeMarker *marker, - const QMap<QString,const Node*> &classMap) +void HtmlGenerator::generateCompactList(const Node *relative, + CodeMarker *marker, + const QMap<QString, const Node *> &classMap) { const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_' const int NumColumns = 4; // number of columns in the result @@ -1922,8 +1992,9 @@ HtmlGenerator::generateCompactList(const Node *relative, last = classMap.begin().key(); if (classMap.size() > 1) { - while (commonPrefixLen < first.length() + 1 && commonPrefixLen < last.length() + 1 - && first[commonPrefixLen] == last[commonPrefixLen]) + while (commonPrefixLen < first.length() + 1 && + commonPrefixLen < last.length() + 1 && + first[commonPrefixLen] == last[commonPrefixLen]) ++commonPrefixLen; } @@ -1952,7 +2023,8 @@ HtmlGenerator::generateCompactList(const Node *relative, if (key[0].digitValue() != -1) { paragraphNo = key[0].digitValue(); - } else if (key[0] >= QLatin1Char('a') && key[0] <= QLatin1Char('z')) { + } + else if (key[0] >= QLatin1Char('a') && key[0] <= QLatin1Char('z')) { paragraphNo = 10 + key[0].unicode() - 'a'; } @@ -2105,7 +2177,8 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative, #endif } -void HtmlGenerator::generateLegaleseList(const Node *relative, CodeMarker *marker) +void HtmlGenerator::generateLegaleseList(const Node *relative, + CodeMarker *marker) { QMap<Text, const Node *>::ConstIterator it = legaleseTexts.begin(); while (it != legaleseTexts.end()) { @@ -2123,6 +2196,77 @@ void HtmlGenerator::generateLegaleseList(const Node *relative, CodeMarker *marke } } +/*void HtmlGenerator::generateSynopsis(const Node *node, + const Node *relative, + CodeMarker *marker, + CodeMarker::SynopsisStyle style) +{ + QString marked = marker->markedUpSynopsis(node, relative, style); + QRegExp templateTag("(<[^@>]*>)"); + if (marked.indexOf(templateTag) != -1) { + QString contents = protect(marked.mid(templateTag.pos(1), + templateTag.cap(1).length())); + marked.replace(templateTag.pos(1), templateTag.cap(1).length(), + contents); + } + marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])</@param>"), + "<i>\\1<sub>\\2</sub></i>"); + marked.replace("<@param>", "<i>"); + marked.replace("</@param>", "</i>"); + + if (style == CodeMarker::Summary) + marked.replace("@name>", "b>"); + + if (style == CodeMarker::SeparateList) { + QRegExp extraRegExp("<@extra>.*</@extra>"); + extraRegExp.setMinimal(true); + marked.replace(extraRegExp, ""); + } + else { + marked.replace("<@extra>", " <tt>"); + marked.replace("</@extra>", "</tt>"); + } + + if (style != CodeMarker::Detailed) { + marked.replace("<@type>", ""); + marked.replace("</@type>", ""); + } + out() << highlightedCode(marked, marker, relative); +}*/ + +#ifdef QDOC_QML +void HtmlGenerator::generateQmlItem(const Node *node, + const Node *relative, + CodeMarker *marker, + bool summary) +{ + QString marked = marker->markedUpQmlItem(node,summary); + QRegExp templateTag("(<[^@>]*>)"); + if (marked.indexOf(templateTag) != -1) { + QString contents = protect(marked.mid(templateTag.pos(1), + templateTag.cap(1).length())); + marked.replace(templateTag.pos(1), templateTag.cap(1).length(), + contents); + } + marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])</@param>"), + "<i>\\1<sub>\\2</sub></i>"); + marked.replace("<@param>", "<i>"); + marked.replace("</@param>", "</i>"); + + if (summary) + marked.replace("@name>", "b>"); + + marked.replace("<@extra>", " <tt>"); + marked.replace("</@extra>", "</tt>"); + + if (summary) { + marked.replace("<@type>", ""); + marked.replace("</@type>", ""); + } + out() << highlightedCode(marked, marker, relative); +} +#endif + void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* marker */) { QMap<const FakeNode *, QMap<QString, FakeNode *> > fakeNodeMap; @@ -2145,7 +2289,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m } // there are too many examples; they would clutter the list - if (fakeNode->subType() == FakeNode::Example) + if (fakeNode->subType() == Node::Example) continue; // not interested either in individual (Qt Designer etc.) manual chapters @@ -2153,7 +2297,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m continue; // Discard external nodes. - if (fakeNode->subType() == FakeNode::ExternalPage) + if (fakeNode->subType() == Node::ExternalPage) continue; QString sortKey = fakeNode->fullTitle().toLower(); @@ -2178,7 +2322,8 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m groupTitlesMap[fakeNode->fullTitle()] = const_cast<const FakeNode *>(fakeNode); } } - } else if (!isGroupPage) { + } + else if (!isGroupPage) { // If we encounter a page that belongs to a group then // we add that page to the list for that group. const FakeNode *groupNode = static_cast<const FakeNode *>(tre->root()->findNode(group, Node::Fake)); @@ -2737,8 +2882,8 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, if (src.at(i) == charLangle && src.at(i + 1) == charAt) { i += 2; if (parseArg(src, linkTag, &i, n, &arg, &par1)) { - QString link = linkForNode( - CodeMarker::nodeForString(par1.toString()), relative); + const Node* node = CodeMarker::nodeForString(par1.toString()); + QString link = linkForNode(node, relative); addLink(link, arg, &html); } else { @@ -2751,7 +2896,6 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, } } - if (slow) { // is this block ever used at all? // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)(</@func>)" @@ -3076,10 +3220,9 @@ QString HtmlGenerator::fileBase(const Node *node, QString HtmlGenerator::fileName(const Node *node) { if (node->type() == Node::Fake) { - if (static_cast<const FakeNode *>(node)->subType() == FakeNode::ExternalPage) + if (static_cast<const FakeNode *>(node)->subType() == Node::ExternalPage) return node->name(); } - return PageGenerator::fileName(node); } @@ -3101,7 +3244,8 @@ QString HtmlGenerator::refForNode(const Node *node) typedeffe = static_cast<const TypedefNode *>(node); if (typedeffe->associatedEnum()) { return refForNode(typedeffe->associatedEnum()); - } else { + } + else { ref = node->name() + "-typedef"; } break; @@ -3109,15 +3253,27 @@ QString HtmlGenerator::refForNode(const Node *node) func = static_cast<const FunctionNode *>(node); if (func->associatedProperty()) { return refForNode(func->associatedProperty()); - } else { + } + else { ref = func->name(); if (func->overloadNumber() != 1) ref += "-" + QString::number(func->overloadNumber()); } break; case Node::Property: +#ifdef QDOC_QML + case Node::QmlProperty: +#endif ref = node->name() + "-prop"; break; +#ifdef QDOC_QML + case Node::QmlSignal: + ref = node->name() + "-signal"; + break; + case Node::QmlMethod: + ref = node->name() + "-method"; + break; +#endif case Node::Variable: ref = node->name() + "-var"; break; @@ -3166,9 +3322,11 @@ QString HtmlGenerator::refForAtom(Atom *atom, const Node * /* node */) { if (atom->type() == Atom::SectionLeft) { return Doc::canonicalTitle(Text::sectionHeading(atom).toString()); - } else if (atom->type() == Atom::Target) { + } + else if (atom->type() == Atom::Target) { return Doc::canonicalTitle(atom->string()); - } else { + } + else { return QString(); } } @@ -3212,7 +3370,10 @@ void HtmlGenerator::generateDetailedMember(const Node *node, out() << "<a name=\"" + refForNode(node) + "\"></a>"; generateSynopsis(enume, relative, marker, CodeMarker::Detailed); out() << "<br />"; - generateSynopsis(enume->flagsType(), relative, marker, CodeMarker::Detailed); + generateSynopsis(enume->flagsType(), + relative, + marker, + CodeMarker::Detailed); out() << "</h3>\n"; } else { @@ -3364,7 +3525,7 @@ void HtmlGenerator::findAllNamespaces(const InnerNode *node) } } -#ifdef ZZZ_QDOC_QML +#ifdef ZZZ_QDOC_QML /*! This function finds all the qml element nodes and stores them in a map for later use. @@ -3375,24 +3536,16 @@ void HtmlGenerator::findAllQmlClasses(const InnerNode *node) while (c != node->childNodes().constEnd()) { if ((*c)->type() == Node::Fake) { const FakeNode* fakeNode = static_cast<const FakeNode *>(*c); - if (fakeNode->subType() == FakeNode::QmlClass) { - const QmlNode* qmlNode = static_cast<const QmlNode*>(fakeNode); - //qDebug() << "HtmlGenerator: QML CLASS" << qmlNode->name(); + if (fakeNode->subType() == Node::QmlClass) { + const QmlClassNode* qmlNode = + static_cast<const QmlClassNode*>(fakeNode); const Node* n = qmlNode->classNode(); - if (n) - //qDebug() << " FOUND IT!" << n->name(); } qmlClasses.insert(fakeNode->name(),*c); } ++c; } } -#endif - -#if 0 - else if ((*c)->isInnerNode()) { - findAllClasses(static_cast<InnerNode *>(*c)); - } #endif int HtmlGenerator::hOffset(const Node *node) @@ -3534,9 +3687,11 @@ QString HtmlGenerator::getLink(const Atom *atom, } QString name = marker->plainFullName(relative); if (!porting && !name.startsWith("Q3")) { - relative->doc().location().warning(tr("Link to obsolete item '%1' in %2") - .arg(atom->string()) - .arg(name)); + if (obsoleteLinks) { + relative->doc().location().warning(tr("Link to obsolete item '%1' in %2") + .arg(atom->string()) + .arg(name)); + } inObsoleteLink = true; } #if 0 @@ -3705,3 +3860,214 @@ void HtmlGenerator::endLink() } QT_END_NAMESPACE + +#ifdef QDOC_QML + +/*! + Generates the summary for for the \a section. Only used for + sections of QML element documentation. + + Currently handles only the QML property group. + */ +void HtmlGenerator::generateQmlSummary(const Section& section, + const Node *relative, + CodeMarker *marker) +{ + if (!section.members.isEmpty()) { + NodeList::ConstIterator m; + int count = section.members.size(); + bool twoColumn = false; + if (section.members.first()->type() == Node::QmlProperty) { + twoColumn = (count >= 5); + } + if (twoColumn) + out() << "<p><table width=\"100%\" border=\"0\" cellpadding=\"0\"" + " cellspacing=\"0\">\n" + << "<tr><td width=\"45%\" valign=\"top\">"; + out() << "<ul>\n"; + + int row = 0; + m = section.members.begin(); + while (m != section.members.end()) { + if (twoColumn && row == (int) (count + 1) / 2) + out() << "</ul></td><td valign=\"top\"><ul>\n"; + out() << "<li><div class=\"fn\"></div>"; + generateQmlItem(*m,relative,marker,true); + out() << "</li>\n"; + row++; + ++m; + } + out() << "</ul>\n"; + if (twoColumn) + out() << "</td></tr>\n</table></p>\n"; + } +} + +/*! + Outputs the html detailed documentation for a section + on a QML element reference page. + */ +void HtmlGenerator::generateDetailedQmlMember(const Node *node, + const InnerNode *relative, + CodeMarker *marker) +{ + const QmlPropertyNode* qpn = 0; + generateMacRef(node, marker); + out() << "<div class=\"qmlitem\">"; + if (node->subType() == Node::QmlPropertyGroup) { + const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node); + NodeList::ConstIterator p = qpgn->childNodes().begin(); + out() << "<div class=\"qmlproto\">"; + out() << "<table class=\"qmlname\">"; + + while (p != qpgn->childNodes().end()) { + if ((*p)->type() == Node::QmlProperty) { + qpn = static_cast<const QmlPropertyNode*>(*p); + out() << "<tr><td>"; + out() << "<a name=\"" + refForNode(qpn) + "\"></a>"; + generateQmlItem(qpn, relative, marker, false); + out() << "</td></tr>"; + if (qpgn->isDefault()) { + out() << "</table>" + << "</div></div>" + << "<div class=\"qmlitem\">" + << "<div class=\"qmlproto\">" + << "<table class=\"qmlname\">" + << "<tr><td><font color=\"green\">" + << "default</font></td></tr>"; + } + } + ++p; + } + out() << "</table>"; + out() << "</div>"; + } + else if (node->type() == Node::QmlSignal) { + const QmlSignalNode* qsn = static_cast<const QmlSignalNode*>(node); + out() << "<div class=\"qmlproto\">"; + out() << "<table class=\"qmlname\">"; + out() << "<tr><td>"; + out() << "<a name=\"" + refForNode(qsn) + "\"></a>"; + generateQmlItem(qsn,relative,marker,false); + out() << "</td></tr>"; + out() << "</table>"; + out() << "</div>"; + } + else if (node->type() == Node::QmlMethod) { + const QmlMethodNode* qmn = static_cast<const QmlMethodNode*>(node); + out() << "<div class=\"qmlproto\">"; + out() << "<table class=\"qmlname\">"; + out() << "<tr><td>"; + out() << "<a name=\"" + refForNode(qmn) + "\"></a>"; + generateQmlItem(qmn,relative,marker,false); + out() << "</td></tr>"; + out() << "</table>"; + out() << "</div>"; + } + out() << "<div class=\"qmldoc\">"; + generateStatus(node, marker); + generateBody(node, marker); + generateThreadSafeness(node, marker); + generateSince(node, marker); + generateAlsoList(node, marker); + out() << "</div>"; + out() << "</div>"; +} + +/*! + Output the "Inherits" line for the QML element, + if there should be one. + */ +void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn, + CodeMarker* marker) +{ + if (cn && !cn->links().empty()) { + if (cn->links().contains(Node::InheritsLink)) { + QPair<QString,QString> linkPair; + linkPair = cn->links()[Node::InheritsLink]; + QStringList strList(linkPair.first); + const Node* n = tre->findNode(strList,Node::Fake); + if (n && n->subType() == Node::QmlClass) { + const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n); + out() << "<p style=\"text-align: center\">"; + Text text; + text << "[Inherits "; + text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); + text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); + text << Atom(Atom::String, linkPair.second); + text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); + text << "]"; + generateText(text, cn, marker); + out() << "</p>"; + } +// else +// qDebug() << "generateQmlInherits(): " +// << "Inherited element not documented -->" +// << linkPair.first; + } + } +} + +/*! + Output the "[Xxx instantiates the C++ class QFxXxx]" + line for the QML element, if there should be one. + + If there is no class node, or if the class node status + is set to Node::Internal, do nothing. + */ +void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, + CodeMarker* marker) +{ + const ClassNode* cn = qcn->classNode(); + if (cn && (cn->status() != Node::Internal)) { + out() << "<p style=\"text-align: center\">"; + Text text; + text << "["; + text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); + text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); + text << Atom(Atom::String, qcn->name()); + text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); + text << " instantiates the C++ class "; + text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn)); + text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); + text << Atom(Atom::String, cn->name()); + text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); + text << "]"; + generateText(text, qcn, marker); + out() << "</p>"; + } +} + +/*! + Output the "[QFxXxx is instantiated by QML element Xxx]" + line for the class, if there should be one. + + If there is no QML element, or if the class node status + is set to Node::Internal, do nothing. + */ +void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn, + CodeMarker* marker) +{ + if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) { + const Node* n = tre->root()->findNode(cn->qmlElement(),Node::Fake); + if (n && n->subType() == Node::QmlClass) { + out() << "<p style=\"text-align: center\">"; + Text text; + text << "["; + text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn)); + text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); + text << Atom(Atom::String, cn->name()); + text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); + text << " is instantiated by QML element "; + text << Atom(Atom::LinkNode,CodeMarker::stringForNode(n)); + text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); + text << Atom(Atom::String, n->name()); + text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); + text << "]"; + generateText(text, cn, marker); + out() << "</p>"; + } + } +} + +#endif diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index a7632cdfe9..c22fe20b29 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -145,6 +145,21 @@ class HtmlGenerator : public PageGenerator const Node *relative, CodeMarker *marker, CodeMarker::SynopsisStyle style); +#ifdef QDOC_QML + void generateQmlSummary(const Section& section, + const Node *relative, + CodeMarker *marker); + void generateQmlItem(const Node *node, + const Node *relative, + CodeMarker *marker, + bool summary); + void generateDetailedQmlMember(const Node *node, + const InnerNode *relative, + CodeMarker *marker); + void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker); + void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker); + void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker); +#endif #ifdef QDOC_NAME_ALIGNMENT void generateSection(const NodeList& nl, const Node *relative, @@ -180,8 +195,12 @@ class HtmlGenerator : public PageGenerator const Node *relative, CodeMarker *marker, const Node *actualNode = 0); - void generateDetailedMember(const Node *node, const InnerNode *relative, CodeMarker *marker); - void generateLink(const Atom *atom, const Node *relative, CodeMarker *marker); + void generateDetailedMember(const Node *node, + const InnerNode *relative, + CodeMarker *marker); + void generateLink(const Atom *atom, + const Node *relative, + CodeMarker *marker); void generateStatus(const Node *node, CodeMarker *marker); QString registerRef(const QString& ref); @@ -252,6 +271,7 @@ class HtmlGenerator : public PageGenerator QStringList customHeadElements; const Tree *tre; bool slow; + bool obsoleteLinks; QMap<QString, QMap<QString, const Node *> > moduleClassMap; QMap<QString, QMap<QString, const Node *> > moduleNamespaceMap; QMap<QString, const Node *> nonCompatClasses; diff --git a/tools/qdoc3/jambiapiparser.cpp b/tools/qdoc3/jambiapiparser.cpp index f981e6d4f3..70e9260aa8 100644 --- a/tools/qdoc3/jambiapiparser.cpp +++ b/tools/qdoc3/jambiapiparser.cpp @@ -234,8 +234,9 @@ void JambiApiParser::doneParsingSourceFiles(Tree * /* tree */) foreach (Node *cppNode, cppTre->root()->childNodes()) { if (cppNode->type() == Node::Fake) { FakeNode *cppFake = static_cast<FakeNode *>(cppNode); - if (cppFake->subType() == FakeNode::Page) { - FakeNode *javaFake = new FakeNode(javaTre->root(), cppFake->name(), + if (cppFake->subType() == Node::Page) { + FakeNode *javaFake = new FakeNode(javaTre->root(), + cppFake->name(), cppFake->subType()); javaFake->setModuleName("com.trolltech.qt"); // ### hard-coded javaFake->setTitle(cppFake->title()); diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 6425765b78..9338203dc3 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -96,6 +96,7 @@ static const struct { static bool slow = false; static bool showInternal = false; +static bool obsoleteLinks = false; static QStringList defines; static QHash<QString, Tree *> trees; @@ -130,7 +131,9 @@ static void printHelp() " -slow " "Turn on features that slow down qdoc\n" " -showinternal " - "Include stuff marked internal") ); + "Include stuff marked internal\n" + " -obsoletelinks " + "Report links from obsolete items to non-obsolete items") ); } /*! @@ -165,6 +168,8 @@ static void processQdocconfFile(const QString &fileName) config.setStringList(CONFIG_SLOW, QStringList(slow ? "true" : "false")); config.setStringList(CONFIG_SHOWINTERNAL, QStringList(showInternal ? "true" : "false")); + config.setStringList(CONFIG_OBSOLETELINKS, + QStringList(obsoleteLinks ? "true" : "false")); /* With the default configuration values in place, load @@ -434,6 +439,9 @@ int main(int argc, char **argv) else if (opt == "-showinternal") { showInternal = true; } + else if (opt == "-obsoletelinks") { + obsoleteLinks = true; + } else { qdocFiles.append(opt); } diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index b2e53ab82f..610249d9be 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -43,6 +43,7 @@ node.cpp */ +#include <QtCore> #include "node.h" QT_BEGIN_NAMESPACE @@ -113,6 +114,9 @@ void Node::setRelates(InnerNode *pseudoParent) } /*! + This function creates a pair that describes a link. + The pair is composed from \a link and \a desc. The + \a linkType is the map index the pair is filed under. */ void Node::setLink(LinkType linkType, const QString &link, const QString &desc) { @@ -623,7 +627,7 @@ void InnerNode::removeRelated(Node *pseudoChild) */ /*! - Returns false because this is an InnerNode. + Returns false because this is a LeafNode. */ bool LeafNode::isInnerNode() const { @@ -713,9 +717,11 @@ void ClassNode::fixBaseClasses() */ /*! + The type of a FakeNode is Fake, and it has a \a subtype, + which specifies the type of FakeNode. */ -FakeNode::FakeNode(InnerNode *parent, const QString& name, SubType subType) - : InnerNode(Fake, parent, name), sub(subType) +FakeNode::FakeNode(InnerNode *parent, const QString& name, SubType subtype) + : InnerNode(Fake, parent, name), sub(subtype) { } @@ -1033,4 +1039,98 @@ bool TargetNode::isInnerNode() const return false; } +#ifdef QDOC_QML +/*! + Constructor for the Qml class node. + */ +QmlClassNode::QmlClassNode(InnerNode *parent, + const QString& name, + const ClassNode* cn) + : FakeNode(parent, name, QmlClass), cnode(cn) +{ + setTitle("QML " + name + " Element Reference"); +} + +/*! + The base file name for this kind of node has "qml_" + prepended to it. + + But not yet. Still testing. + */ +QString QmlClassNode::fileBase() const +{ +#if 0 + if (Node::fileBase() == "item") + qDebug() << "FILEBASE: qmlitem" << name(); + return "qml_" + Node::fileBase(); +#endif + return Node::fileBase(); +} + +/*! + Constructor for the Qml property group node. \a parent is + always a QmlClassNode. + */ +QmlPropGroupNode::QmlPropGroupNode(QmlClassNode* parent, const QString& name) + : FakeNode(parent, name, QmlPropertyGroup), isdefault(false) +{ + // nothing. +} + +/*! + Constructor for the QML property node. + */ +QmlPropertyNode::QmlPropertyNode(QmlPropGroupNode *parent, + const QString& name, + const QString& type) + : LeafNode(QmlProperty, parent, name), + dt(type), + sto(Trool_Default), + des(Trool_Default) +{ + // nothing. +} + +/*! + I don't know what this is. + */ +QmlPropertyNode::Trool QmlPropertyNode::toTrool(bool boolean) +{ + return boolean ? Trool_True : Trool_False; +} + +/*! + I don't know what this is either. + */ +bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue) +{ + switch (troolean) { + case Trool_True: + return true; + case Trool_False: + return false; + default: + return defaultValue; + } +} + +/*! + Constructor for the QML signal node. + */ +QmlSignalNode::QmlSignalNode(QmlClassNode *parent, const QString& name) + : LeafNode(QmlSignal, parent, name) +{ + // nothing. +} + +/*! + Constructor for the QML method node. + */ +QmlMethodNode::QmlMethodNode(QmlClassNode *parent, const QString& name) + : LeafNode(QmlMethod, parent, name) +{ + // nothing. +} +#endif + QT_END_NAMESPACE diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index a35bc17ab4..17ec4479ce 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -72,7 +72,31 @@ class Node Function, Property, Variable, +#ifdef QDOC_QML + Target, + QmlProperty, + QmlSignal, + QmlMethod +#else Target +#endif + }; + + enum SubType { + NoSubType, + Example, + HeaderFile, + File, + Group, + Module, + Page, +#ifdef QDOC_QML + ExternalPage, + QmlClass, + QmlPropertyGroup +#else + ExternalPage +#endif }; enum Access { Public, Protected, Private }; @@ -99,7 +123,8 @@ class Node NextLink, PreviousLink, ContentsLink, - IndexLink /*, + IndexLink, + InheritsLink /*, GlossaryLink, CopyrightLink, ChapterLink, @@ -125,6 +150,7 @@ class Node virtual bool isInnerNode() const = 0; virtual bool isReimp() const { return false; } Type type() const { return typ; } + virtual SubType subType() const { return NoSubType; } InnerNode *parent() const { return par; } InnerNode *relates() const { return rel; } const QString& name() const { return nam; } @@ -144,7 +170,7 @@ class Node void clearRelated() { rel = 0; } - QString fileBase() const; + virtual QString fileBase() const; protected: Node(Type type, InnerNode *parent, const QString& name); @@ -181,7 +207,7 @@ typedef QList<Node *> NodeList; class InnerNode : public Node { public: - ~InnerNode(); + virtual ~InnerNode(); Node *findNode(const QString& name); Node *findNode(const QString& name, Type type); @@ -203,6 +229,7 @@ class InnerNode : public Node const EnumNode *findEnumNodeForValue(const QString &enumValue) const; const NodeList & childNodes() const { return children; } const NodeList & relatedNodes() const { return related; } + int count() const { return children.size(); } int overloadNumber(const FunctionNode *func) const; int numOverloads(const QString& funcName) const; NodeList overloads(const QString &funcName) const; @@ -232,17 +259,19 @@ class LeafNode : public Node { public: LeafNode(); + virtual ~LeafNode() { } virtual bool isInnerNode() const; protected: - LeafNode(Type type, InnerNode *parent, const QString& name); + LeafNode(Type type, InnerNode* parent, const QString& name); }; class NamespaceNode : public InnerNode { public: NamespaceNode(InnerNode *parent, const QString& name); + virtual ~NamespaceNode() { } }; class ClassNode; @@ -266,6 +295,7 @@ class ClassNode : public InnerNode { public: ClassNode(InnerNode *parent, const QString& name); + virtual ~ClassNode() { } void addBaseClass(Access access, ClassNode *node, @@ -280,29 +310,23 @@ class ClassNode : public InnerNode QString serviceName() const { return sname; } void setServiceName(const QString& value) { sname = value; } + QString qmlElement() const { return qmlelement; } + void setQmlElement(const QString& value) { qmlelement = value; } private: QList<RelatedClass> bas; QList<RelatedClass> der; bool hidden; QString sname; + QString qmlelement; }; class FakeNode : public InnerNode { public: - enum SubType { - Example, - HeaderFile, - File, - Group, - Module, - Page, - ExternalPage, - QmlClass - }; FakeNode(InnerNode *parent, const QString& name, SubType subType); + virtual ~FakeNode() { } void setTitle(const QString &title) { tle = title; } void setSubTitle(const QString &subTitle) { stle = subTitle; } @@ -321,18 +345,85 @@ class FakeNode : public InnerNode NodeList gr; }; -class QmlNode : public FakeNode +#ifdef QDOC_QML +class QmlClassNode : public FakeNode { public: - QmlNode(InnerNode *parent, const QString& name, const ClassNode* cn) - : FakeNode(parent, name, QmlClass), cnode(cn) { } + QmlClassNode(InnerNode *parent, + const QString& name, + const ClassNode* cn); + virtual ~QmlClassNode() { } const ClassNode* classNode() const { return cnode; } + virtual QString fileBase() const; private: const ClassNode* cnode; }; +class QmlPropGroupNode : public FakeNode +{ + public: + QmlPropGroupNode(QmlClassNode* parent, const QString& name); + virtual ~QmlPropGroupNode() { } + + const QString& element() const { return name(); } + void setDefault() { isdefault = true; } + bool isDefault() const { return isdefault; } + + private: + bool isdefault; +}; + +class QmlPropertyNode : public LeafNode +{ + public: + QmlPropertyNode(QmlPropGroupNode* parent, + const QString& name, + const QString& type); + virtual ~QmlPropertyNode() { } + + void setDataType(const QString& dataType) { dt = dataType; } + void setStored(bool stored) { sto = toTrool(stored); } + void setDesignable(bool designable) { des = toTrool(designable); } + + const QString &dataType() const { return dt; } + QString qualifiedDataType() const { return dt; } + bool isStored() const { return fromTrool(sto,true); } + bool isDesignable() const { return fromTrool(des,false); } + + const QString& element() const { return parent()->name(); } + + private: + enum Trool { Trool_True, Trool_False, Trool_Default }; + + static Trool toTrool(bool boolean); + static bool fromTrool(Trool troolean, bool defaultValue); + + QString dt; + Trool sto; + Trool des; +}; + +class QmlSignalNode : public LeafNode +{ + public: + QmlSignalNode(QmlClassNode* parent, const QString& name); + virtual ~QmlSignalNode() { } + + const QString& element() const { return parent()->name(); } +}; + +class QmlMethodNode : public LeafNode +{ + public: + QmlMethodNode(QmlClassNode* parent, const QString& name); + virtual ~QmlMethodNode() { } + + const QString& element() const { return parent()->name(); } +}; +#endif + class EnumItem { public: @@ -358,6 +449,7 @@ class EnumNode : public LeafNode { public: EnumNode(InnerNode *parent, const QString& name); + virtual ~EnumNode() { } void addItem(const EnumItem& item); void setFlagsType(TypedefNode *typedeff); @@ -378,6 +470,7 @@ class TypedefNode : public LeafNode { public: TypedefNode(InnerNode *parent, const QString& name); + virtual ~TypedefNode() { } const EnumNode *associatedEnum() const { return ae; } @@ -438,6 +531,7 @@ class FunctionNode : public LeafNode enum Virtualness { NonVirtual, ImpureVirtual, PureVirtual }; FunctionNode(InnerNode *parent, const QString &name); + virtual ~FunctionNode() { } void setReturnType(const QString& returnType) { rt = returnType; } void setMetaness(Metaness metaness) { met = metaness; } @@ -500,6 +594,7 @@ class PropertyNode : public LeafNode enum { NumFunctionRoles = Resetter + 1 }; PropertyNode(InnerNode *parent, const QString& name); + virtual ~PropertyNode() { } void setDataType(const QString& dataType) { dt = dataType; } void addFunction(FunctionNode *function, FunctionRole role); @@ -557,6 +652,7 @@ class VariableNode : public LeafNode { public: VariableNode(InnerNode *parent, const QString &name); + virtual ~VariableNode() { } void setLeftType(const QString &leftType) { lt = leftType; } void setRightType(const QString &rightType) { rt = rightType; } @@ -582,6 +678,7 @@ class TargetNode : public LeafNode { public: TargetNode(InnerNode *parent, const QString& name); + virtual ~TargetNode() { } virtual bool isInnerNode() const; }; diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 06ff398028..8715f4aefd 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -81,30 +81,50 @@ QString PageGenerator::fileBase(const Node *node) { if (node->relates()) node = node->relates(); - else if (!node->isInnerNode()) + else if (!node->isInnerNode()) { node = node->parent(); +#ifdef QDOC_QML + if (node->subType() == Node::QmlPropertyGroup) { + node = node->parent(); + } +#endif + } QString base = node->doc().baseName(); if (!base.isEmpty()) return base; - const Node *p = node; - - forever { - base.prepend(p->name()); + const Node *p = node; + + forever { + base.prepend(p->name()); +#ifdef QDOC_QML + /* + To avoid file name conflicts in the html directory, + we prepend "qml-" to the file name of QML element doc + files. + */ + if ((p->subType() == Node::QmlClass) || + (p->subType() == Node::QmlPropertyGroup)) + base.prepend("qml-"); + else if ((p->type() == Node::QmlProperty) || + (p->type() == Node::QmlSignal) || + (p->type() == Node::QmlMethod)) + base.prepend("qml-"); +#endif const Node *pp = p->parent(); if (!pp || pp->name().isEmpty() || pp->type() == Node::Fake) - break; + break; base.prepend(QLatin1Char('-')); p = pp; - } - - if (node->type() == Node::Fake) { + } + + if (node->type() == Node::Fake) { #ifdef QDOC2_COMPAT - if (base.endsWith(".html")) - base.truncate(base.length() - 5); + if (base.endsWith(".html")) + base.truncate(base.length() - 5); #endif - } + } // the code below is effectively equivalent to: // base.replace(QRegExp("[^A-Za-z0-9]+"), " "); @@ -126,7 +146,8 @@ QString PageGenerator::fileBase(const Node *node) if ((u >= 'a' && u <= 'z') || (u >= '0' && u <= '9')) { res += QLatin1Char(u); begun = true; - } else if (begun) { + } + else if (begun) { res += QLatin1Char('-'); begun = false; } @@ -187,8 +208,12 @@ void PageGenerator::generateInnerNode(const InnerNode *node, if (node->type() == Node::Fake) { const FakeNode *fakeNode = static_cast<const FakeNode *>(node); - if (fakeNode->subType() == FakeNode::ExternalPage) + if (fakeNode->subType() == Node::ExternalPage) + return; +#ifdef QDOC_QML + if (fakeNode->subType() == Node::QmlPropertyGroup) return; +#endif } if (node->parent() != 0) { @@ -197,12 +222,6 @@ void PageGenerator::generateInnerNode(const InnerNode *node, generateClassLikeNode(node, marker); } else if (node->type() == Node::Fake) { - const FakeNode* fakeNode = static_cast<const FakeNode *>(node); -#ifdef QDOC_QML - if (fakeNode->subType() == FakeNode::QmlClass) { - //qDebug() << "FILENAME:" << fileName(node); - } -#endif generateFakeNode(static_cast<const FakeNode *>(node), marker); } endSubPage(); diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css index 3816164988..4225a1b76d 100644 --- a/tools/qdoc3/test/classic.css +++ b/tools/qdoc3/test/classic.css @@ -225,3 +225,52 @@ span.string,span.char { font-size: 0.65em } + +.qmlitem { + padding: 0; +} + +.qmlname { + white-space: nowrap; + font-weight: bold; + font-size: 125%; +} + +.qmltype { + font-weight: bold; + font-size: 125%; +} + +.qmlproto, .qmldoc { + // border-top: 1px solid #84b0c7; +} + +.qmlproto { + padding: 0; + //background-color: #e4e4e4;//#d5e1e8; + //font-weight: bold; + //-webkit-border-top-left-radius: 8px; + //-webkit-border-top-right-radius: 8px; + //-moz-border-radius-topleft: 8px; + //-moz-border-radius-topright: 8px; +} + +.qmldoc { + border-top: 1px solid #e4e4e4; + //padding: 2px 5px; + //background-color: #eef3f5; + //border-top-width: 0; + //-webkit-border-bottom-left-radius: 8px; + //-webkit-border-bottom-right-radius: 8px; + //-moz-border-radius-bottomleft: 8px; + //-moz-border-radius-bottomright: 8px; +} + +.qmldoc p, .qmldoc dl, .qmldoc ul { + //margin: 6px 0; +} + +*.qmlitem p { + //margin-top: 0px; + //margin-bottom: 0px; +} diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 308ba0e789..e6dd084484 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -176,6 +176,8 @@ const Node *Tree::findNode(const QStringList &path, } /*! + Find the node with the specified \a path name of the + specified \a type. */ Node *Tree::findNode(const QStringList &path, Node::Type type, @@ -189,6 +191,8 @@ Node *Tree::findNode(const QStringList &path, } /*! + Find the node with the specified \a path name of the + specified \a type. */ const Node *Tree::findNode(const QStringList &path, Node::Type type, @@ -208,7 +212,9 @@ FunctionNode *Tree::findFunctionNode(const QStringList& path, int findFlags) { return const_cast<FunctionNode *>( - const_cast<const Tree *>(this)->findFunctionNode(path, relative, findFlags)); + const_cast<const Tree *>(this)->findFunctionNode(path, + relative, + findFlags)); } /*! @@ -233,7 +239,8 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path, else next = ((InnerNode *) node)->findNode(path.at(i)); - if (!next && node->type() == Node::Class && (findFlags & SearchBaseClasses)) { + if (!next && node->type() == Node::Class && + (findFlags & SearchBaseClasses)) { NodeList baseClasses = allBaseClasses(static_cast<const ClassNode *>(node)); foreach (const Node *baseClass, baseClasses) { if (i == path.size() - 1) @@ -563,7 +570,7 @@ void Tree::resolveGroups() FakeNode *fake = static_cast<FakeNode*>(findNode(QStringList(i.key()),Node::Fake)); - if (fake && fake->subType() == FakeNode::Group) { + if (fake && fake->subType() == Node::Group) { fake->addGroupMember(i.value()); } else { @@ -770,21 +777,21 @@ void Tree::readIndexSection(const QDomElement &element, } else if (element.nodeName() == "page") { - FakeNode::SubType subtype; + Node::SubType subtype; if (element.attribute("subtype") == "example") - subtype = FakeNode::Example; + subtype = Node::Example; else if (element.attribute("subtype") == "header") - subtype = FakeNode::HeaderFile; + subtype = Node::HeaderFile; else if (element.attribute("subtype") == "file") - subtype = FakeNode::File; + subtype = Node::File; else if (element.attribute("subtype") == "group") - subtype = FakeNode::Group; + subtype = Node::Group; else if (element.attribute("subtype") == "module") - subtype = FakeNode::Module; + subtype = Node::Module; else if (element.attribute("subtype") == "page") - subtype = FakeNode::Page; + subtype = Node::Page; else if (element.attribute("subtype") == "externalpage") - subtype = FakeNode::ExternalPage; + subtype = Node::ExternalPage; else return; @@ -1226,25 +1233,25 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, const FakeNode *fakeNode = static_cast<const FakeNode*>(node); switch (fakeNode->subType()) { - case FakeNode::Example: + case Node::Example: writer.writeAttribute("subtype", "example"); break; - case FakeNode::HeaderFile: + case Node::HeaderFile: writer.writeAttribute("subtype", "header"); break; - case FakeNode::File: + case Node::File: writer.writeAttribute("subtype", "file"); break; - case FakeNode::Group: + case Node::Group: writer.writeAttribute("subtype", "group"); break; - case FakeNode::Module: + case Node::Module: writer.writeAttribute("subtype", "module"); break; - case FakeNode::Page: + case Node::Page: writer.writeAttribute("subtype", "page"); break; - case FakeNode::ExternalPage: + case Node::ExternalPage: writer.writeAttribute("subtype", "externalpage"); break; default: @@ -1383,7 +1390,7 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, bool external = false; if (inner->type() == Node::Fake) { const FakeNode *fakeNode = static_cast<const FakeNode *>(inner); - if (fakeNode->subType() == FakeNode::ExternalPage) + if (fakeNode->subType() == Node::ExternalPage) external = true; } @@ -1863,7 +1870,7 @@ void Tree::generateTagFile(const QString &fileName) const */ void Tree::addExternalLink(const QString &url, const Node *relative) { - FakeNode *fakeNode = new FakeNode(root(), url, FakeNode::ExternalPage); + FakeNode *fakeNode = new FakeNode(root(), url, Node::ExternalPage); fakeNode->setAccess(Node::Public); // Create some content for the node. @@ -1898,6 +1905,11 @@ QString Tree::fullDocumentLocation(const Node *node) const return ""; } else if (node->type() == Node::Fake) { +#ifdef QDOC_QML + if (node->subType() == Node::QmlClass) + return "qml-" + node->fileBase() + ".html"; + else +#endif parentName = node->fileBase() + ".html"; } else if (node->fileBase().isEmpty()) diff --git a/tools/qdoc3/webxmlgenerator.cpp b/tools/qdoc3/webxmlgenerator.cpp index c5209b88a3..e87e812d20 100644 --- a/tools/qdoc3/webxmlgenerator.cpp +++ b/tools/qdoc3/webxmlgenerator.cpp @@ -191,7 +191,7 @@ void WebXMLGenerator::generateIndexSections(QXmlStreamWriter &writer, generateRelations(writer, node, marker); - if (fake->subType() == FakeNode::Module) { + if (fake->subType() == Node::Module) { writer.writeStartElement("generatedlist"); writer.writeAttribute("contents", "classesbymodule"); @@ -264,7 +264,7 @@ void WebXMLGenerator::generateInnerNode(const InnerNode *node, CodeMarker *marke if (node->type() == Node::Fake) { const FakeNode *fakeNode = static_cast<const FakeNode *>(node); - if (fakeNode->subType() == FakeNode::ExternalPage) + if (fakeNode->subType() == Node::ExternalPage) return; } diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit index f4b36d0f02..c601f76f20 100755 --- a/util/webkit/mkdist-webkit +++ b/util/webkit/mkdist-webkit @@ -5,7 +5,7 @@ die() { exit 1 } -default_tag="qtwebkit-4.6-snapshot-13072009" +default_tag="qtwebkit-4.6-snapshot-29072009" if [ $# -eq 0 ]; then tag="$default_tag" |