From 5e4035ede6505f638f4741dcebbf19e485a1b993 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 29 Oct 2009 14:50:51 +0100 Subject: qdoc3: Fixed a linking error for qml properties. This: https://qtmetrics.europe.nokia.com/kinetic-declarativeui/qml-item.html#rotation-prop should now be this: https://qtmetrics.europe.nokia.com/kinetic-declarativeui/qml-item.html#transformOrigin-prop) --- tools/qdoc3/htmlgenerator.cpp | 11 +++++++---- tools/qdoc3/pagegenerator.cpp | 19 +++++++------------ 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 18c7916..eaf4b2e 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -3467,10 +3467,13 @@ QString HtmlGenerator::refForNode(const Node *node) ref += "-" + QString::number(func->overloadNumber()); } break; - case Node::Property: -#ifdef QDOC_QML +#ifdef QDOC_QML + case Node::Fake: + if (node->subType() != Node::QmlPropertyGroup) + break; case Node::QmlProperty: #endif + case Node::Property: ref = node->name() + "-prop"; break; #ifdef QDOC_QML @@ -3512,9 +3515,9 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative) // ### reintroduce this test, without breaking .dcf files if (fn != outFileName()) #endif - link += fn; + link += fn; - if (!node->isInnerNode()) { + if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) { ref = refForNode(node); if (relative && fn == fileName(relative) && ref == refForNode(relative)) return QString(); diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 83ea561..7d9fbee 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -81,14 +81,13 @@ 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 + if (node->subType() == Node::QmlPropertyGroup) { + node = node->parent(); } +#endif QString base = node->doc().baseName(); if (!base.isEmpty()) @@ -97,6 +96,7 @@ QString PageGenerator::fileBase(const Node *node) const Node *p = node; forever { + const Node *pp = p->parent(); base.prepend(p->name()); #ifdef QDOC_QML /* @@ -104,15 +104,10 @@ QString PageGenerator::fileBase(const Node *node) 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)) + if (p->subType() == Node::QmlClass) { base.prepend("qml-"); + } #endif - const Node *pp = p->parent(); if (!pp || pp->name().isEmpty() || pp->type() == Node::Fake) break; base.prepend(QLatin1Char('-')); -- cgit v0.12 From 9f2a0c09a90daa46b7432037595b750406bbd506 Mon Sep 17 00:00:00 2001 From: Peter Yard Date: Mon, 2 Nov 2009 11:44:21 +1000 Subject: Added documentation of RPATH defines. --- doc/src/development/qmake-manual.qdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index 6c53242..352db75 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -2342,6 +2342,8 @@ For example: \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. \section1 QMAKE_LFLAGS_RPATH + + \e {This is used on Unix platforms only.} Library paths in this definition are added to the executable at link time so that the added paths will be preferentially searched at runtime. @@ -2673,11 +2675,15 @@ For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 45 \section1 QMAKE_RPATH + + \e {This is used on Unix platforms only.} Is equivalent to \l QMAKE_LFLAGS_RPATH. \section1 QMAKE_RPATHDIR + \e {This is used on Unix platforms only.} + A list of library directory paths, these paths are added to the executable at link time so that the paths will be preferentially searched at runtime. -- cgit v0.12 From c55c08b38dd902765f476f62369378813c8e804f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 2 Nov 2009 15:27:59 +0100 Subject: Doc: i18n overhaul for QObject::tr() and the Qt Linguist manual. Reviewed-by: Trust Me --- doc/src/internationalization/i18n.qdoc | 267 ++++++++++++++- doc/src/internationalization/linguist-manual.qdoc | 368 ++------------------- doc/src/snippets/code/doc_src_i18n.qdoc | 2 +- .../snippets/code/src_corelib_kernel_qobject.cpp | 3 +- examples/mainwindows/sdi/mainwindow.h | 2 + src/corelib/kernel/qobject.cpp | 146 +------- 6 files changed, 310 insertions(+), 478 deletions(-) diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc index e873f4e..1a2839d 100644 --- a/doc/src/internationalization/i18n.qdoc +++ b/doc/src/internationalization/i18n.qdoc @@ -51,6 +51,7 @@ \page internationalization.html \title Internationalization with Qt \brief Information about Qt's support for internationalization and multiple languages. + \nextpage Writing Source Code for Translation \keyword internationalization \keyword i18n @@ -59,11 +60,11 @@ the application usable by people in countries other than one's own. \tableofcontents - + \section1 Relevant Qt Classes and APIs These classes support internationalizing of Qt applications. - + \annotatedlist i18n \section1 Languages and Writing Systems @@ -516,3 +517,265 @@ For details on Mac-specific translation, refer to the Qt/Mac Specific Issues document \l{Qt for Mac OS X - Specific Issues#Translating the Application Menu and Native Dialogs}{here}. */ + +/*! + \page i18n-source-translation.html + \title Writing Source Code for Translation + \ingroup i18n + \previouspage Internationalization with Qt + \contentspage Internationalization with Qt + \nextpage Translation Rules for Plurals + \brief How to write source code in a way that makes it possible for user-visible text to be translated. + + \tableofcontents + + \section1 The Basics + + Developers use the \l{QObject::}{tr()} function to obtain translated text + for their classes, typically for display purposes. This function is also + used to indicate which text strings in an application are translatable. + + Qt indexes each translatable string by the \e{translation context} it is + associated with; this is generally the name of the QObject subclass it is + used in. + + Translation contexts are defined for new QObject-based classes by the use + of the Q_OBJECT macro in each new class definition. + + When tr() is called, it looks up the translatable string using a QTranslator + object. For translation to work, one or more of these must have been + installed on the application object in the way described in the + \l{#Enabling Translation}{Enabling Translation} section below. + + \section1 Defining a Translation Context + + The translation context for QObject and each QObject subclass is the + class name itself. Developers subclassing QObject must use the + Q_OBJECT macro in their class definition to override the translation + context. This macro sets the context to the name of the subclass. + + For example, the following class definition includes the Q_OBJECT macro, + implementing a new tr() that uses the \c MainWindow context: + + \snippet mainwindows/sdi/mainwindow.h class definition with macro + \dots + + If Q_OBJECT is not used in a class definition, the context will be + inherited from the base class. For example, since all QObject-based + classes in Qt provide a context, a new QWidget subclass defined without + a Q_OBJECT macro will use the \c QWidget context if its tr() function + is invoked. + + \section1 Using tr() to Obtain a Translation + + The following example shows how a translation is obtained for the + class shown in the previous section: + + \snippet mainwindows/sdi/mainwindow.cpp implicit tr context + \dots + + Here, the translation context is \c MainWindow because it is the + \c MainWindow::tr() function that is invoked. The text returned + by the tr() function is a translation of "&File" obtained from + the \c MainWindow context. + + When Qt's translation tool, \l lupdate, is used to process a set of source + files, the text wrapped in tr() calls is stored in a section of the translation + file that corresponds to its translation context. + + In some situations, it is useful to give a translation context explicitly + by fully qualifying the call to tr(); for example: + + \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp explicit tr context + + This call obtains the translated text for "Page up" from the \c QScrollBar + context. Developers can also use the QCoreApplication::translate() function + to obtain a translation for a particular translation context. + + \section1 Translator Comments + + Developers can include information about each translatable string to + help translators with the translation process. These are extracted + when \l lupdate is used to process the source files. The recommended + way to add comments is to annotate the tr() calls in your code with + comments of the form: + + \tt{//: ...} + + or + + \tt{\begincomment: ... \endcomment} + + Examples: + + \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 40 + + In these examples, the comments will be associated with the strings + passed to tr() in the context of each call. + + \section1 Adding Meta-Data to Strings + + Additional data can be attached to each translatable message. These are + extracted when \l lupdate is used to process the source files. The + recommended way to add meta-data is to annotate the tr() calls in your code + with comments of the form: + + \tt{//= } + + This can be used to give the message a unique identifier to support tools + which need it. + + An alternative way to attach meta-data is to use the following syntax: + + \tt{//~ } + + This can be used to attach meta-data to the message. The field name should + consist of a domain prefix (possibly the conventional file extension of the + file format the field is inspired by), a hyphen and the actual field name + in underscore-delimited notation. For storage in TS files, the field name + together with the prefix "extra-" will form an XML element name. The field + contents will be XML-escaped, but otherwise appear verbatim as the + element's contents. Any number of unique fields can be added to each + message. + + Example: + + \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp meta data + + Meta-data appearing right in front of a magic TRANSLATOR comment applies to + the whole TS file. + + \section1 Disambiguation + + If the same translatable string is used in different roles within the same + translation context, an additional identifying string may be passed in + the call to \l{QObject::}{tr()}. This optional disambiguation argument + is used to distinguish between otherwise identical strings. + + Example: + + \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 17 + \dots + + In Qt 4.4 and earlier, this disambiguation parameter was the preferred + way to specify comments to translators. + + \section1 Character Encodings + + You can set the encoding for the source text by calling QTextCodec::setCodecForTr(). + By default, the source text is assumed to be in Latin-1 encoding. + + \section1 Handling Plurals + + Some translatable strings contain placeholders for integer values and need + to be translated differently depending on the values in use. + + To help with this problem, developers pass an additional integer argument + to the \l{QObject::}{tr()} function, and typically use a special notation + for plurals in each translatable string. + + If this argument is equal or greater than zero, all occurrences of + \c %n in the resulting string are replaced with a decimal representation + of the value supplied. In addition, the translation used will adapt to the + value according to the rules for each language. + + Example: + + \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 18 + + The table below shows what string is returned depending on the + active translation: + + \table + \header \o \o{3,1} Active Translation + \header \o \a n \o No Translation \o French \o English + \row \o 0 \o "0 message(s) saved" \o "0 message sauvegard\unicode{0xE9}" \o "0 message\bold{s} saved" + \row \o 1 \o "1 message(s) saved" \o "1 message sauvegard\unicode{0xE9}" \o "1 message saved" + \row \o 2 \o "2 message(s) saved" \o "2 message\bold{s} sauvegard\unicode{0xE9}\bold{s}" \o "2 message\bold{s} saved" + \row \o 37 \o "37 message(s) saved" \o "37 message\bold{s} sauvegard\unicode{0xE9}\bold{s}" \o "37 message\bold{s} saved" + \endtable + + This idiom is more flexible than the traditional approach; e.g., + + \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 19 + + because it also works with target languages that have several + plural forms (e.g., Irish has a special "dual" form that should + be used when \c n is 2), and it handles the \e n == 0 case + correctly for languages such as French that require the singular. + See the \l{Qt Linguist Manual} for details. + + Instead of \c %n, you can use \c %Ln to produce a localized + representation of \a n. The conversion uses the default locale, + set using QLocale::setDefault(). (If no default locale was + specified, the "C" locale is used.) + + A summary of the rules used to translate strings containing plurals can be + found in the \l{Translation Rules for Plurals} document. + + \section1 Enabling Translation + + Typically, your application's \c main() function will look like + this: + + \snippet doc/src/snippets/code/doc_src_i18n.qdoc 8 + + Note the use of QLibraryInfo::location() to locate the Qt translations. + Developers should request the path to the translations at run-time by + passing QLibraryInfo::TranslationsPath to this function instead of + using the \c QTDIR environment variable in their applications. + + \section1 Further Reading + + \l{Qt Linguist Manual}, \l{Hello tr Example}, \l{Translation Rules for Plurals} +*/ + +/*! + \page i18n-plural-rules.html + \title Translation Rules for Plurals + \ingroup i18n + \previouspage Writing Source Code for Translation + \contentspage Internationalization with Qt + \brief A summary of the translation rules for plurals produced by Qt's i18n tools. + + The table below shows the specific rules that are produced by Qt Linguist + and \c lrelease for a selection of languages. Cells marked \e otherwise + indicate the form used when none of the other rules are appropriate for a + specific language. + + \table 80% + \header \o Language \o Rule 1 \o Rule 2 \o Rule 3 + \row \o English \o \c{n == 1} + \o \e{otherwise} \o N/A + \row \o French \o \c{n < 2} + \o \e{otherwise} \o N/A + \row \o Czech \o \c{n % 100 == 1} + \o \c{n % 100 >= 2 && n % 100 <= 4} + \o \e{otherwise} + \row \o Irish \o \c{n == 1} + \o \c{n == 2} \o \e{otherwise} + \row \o Latvian \o \c{n % 10 == 1&& n % 100 != 11} + \o \c{n != 0} \o \e{otherwise} + \row \o Lithuanian \o \c{n % 10 == 1&& n % 100 != 11} + \o \c{n % 100 != 12 && n % 10 == 2} + \o \e{otherwise} + \row \o Macedonian \o \c{n % 10 == 1} + \o \c{n % 10 == 2} \o \e{otherwise} + \row \o Polish \o \c{n == 1} + \o \c{n % 10 >= 2 && n % 10 <= 4 + && (n % 100 < 10 || n % 100 > 20)} + \o \e{otherwise} + \row \o Romanian \o \c{n == 1} + \o \c{n == 0|| (n % 100 >= 1 && n % 100 <= 20)} + \o \e{otherwise} + \row \o Russian \o \c{n % 10 == 1&& n % 100 != 11} + \o \c{n % 10 >= 2 && n % 10 <= 4 + && (n % 100 < 10 || n % 100 > 20)} + \o \e{otherwise} + \row \o Slovak \o \c{n == 1} \o \c{n >= 2 && n <= 4} + \o \e{otherwise} + \row \o Japanese \o \e{otherwise} \o N/A \o N/A + \endtable + + The rules themselves are not documented and are internal to Qt Linguist and \c lrelease. +*/ diff --git a/doc/src/internationalization/linguist-manual.qdoc b/doc/src/internationalization/linguist-manual.qdoc index 5d388f1..3e06a2f 100644 --- a/doc/src/internationalization/linguist-manual.qdoc +++ b/doc/src/internationalization/linguist-manual.qdoc @@ -62,7 +62,7 @@ software engineers and the translator. The chapter describes the use of two tools. The \l{lupdate} tool is used to synchronize source code and translations. The \l{lrelease} tool is used to - create runtime translation files for use by the released + create run-time translation files for use by the released application. The \l{linguist-translators.html}{Translators} chapter is for @@ -119,7 +119,7 @@ \o Phrases that contain variables, for example, "The 25 files selected will take 63 seconds to process", where the two numbers - are inserted programmatically at runtime may need to be reworded + are inserted programmatically at run-time may need to be reworded because in a different language the word order and therefore the placement of the variables may have to change. @@ -147,7 +147,7 @@ \row \o{1,2} \inlineimage wVista-Cert-border-small.png \o \e{Qt Linguist 4.3 is Certified for Windows Vista} - + \row \o Windows Vista and the Windows Vista Start button are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. @@ -508,7 +508,7 @@ translation. The state is reset to \inlineimage linguist-danger.png , and the number of accepted translations in the \e{Items} column of the \l{Context Window} {context list} is decremented by 1. - + \row \o Not Accepted \o \inlineimage linguist-check-off.png @@ -781,7 +781,7 @@ changed. Whichever character (alpha or digit) is chosen, the translation must be in the form "Ctrl+" followed by the upper case character. \e{Qt} will automatically display the correct name at - runtime. As with Alt key accelerators, if the translator changes + run-time. As with Alt key accelerators, if the translator changes the character, the new character must not conflict with any other Ctrl key accelerator. @@ -790,14 +790,14 @@ supported languages, \e {Qt} automatically translates these strings. - \section2 Handling Numbered Arguments + \section2 Handling Numbered Arguments and Plurals Some phrases contain numbered arguments. A numbered argument is a - placeholder that will be replaced with text at runtime. A numbered + placeholder that will be replaced with text at run-time. A numbered argument appears in a source string as a percent sign followed by a digit. Consider an example: \c{After processing file %1, file %2 is next in line}. In this string to be translated, \c{%1} and - \c{%2} are numbered arguments. At runtime, \c{%1} and \c{%2} will + \c{%2} are numbered arguments. At run-time, \c{%1} and \c{%2} will be replaced with the first and next file names respectively. The same numbered arguments must appear in the translation, but not necessarily in the same order. A German translation of the string @@ -808,336 +808,14 @@ of where argument \e{i} appears in the argument sequence in the source string. - \section2 Plurals - - The problem of plurals in output is resolved by using an overload of - the \c tr() function with the signature - \code - QString tr(const char *text, const char *comment, int n); - \endcode - Using built in comparisons for the value of \c n the tr() function will - translate the phrase to the plural form for the target language. - - Different languages have various forms for plurals beyond simply - \e singular and \e plural. The rules for determining which form of the - plural to use are encoded as conditional tests. Below is a table - representing the numbers associated with the forms rather than the - conditional tests themselves. - - - - \table 90% - \header - \o Language - \o Form 1 - \o Form 2 - \o Form 3 - \o Form 4 - \row - \o Arabic - \o 0, 1, 11-102, 111-202... - \o 2 - \o 3-10, 103-110, 203-210... - \o - \row - \o Basque - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Bulgarian - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Catalan - \o 1 - \o 11, 11 000-11 999, 11 000 000-11 999 999... - \o 0, 2-10, 12-10 999, 12-10 999 999... - \o - \row - \o Chinese-CN - \o 0- - \o - \o - \o - \row - \o Chinese-HK - \o 0- - \o - \o - \o - \row - \o Chinese-TW - \o 0- - \o - \o - \o - \row - \o Croation - \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101... - \o 2-4, 22-24, 32-34, 42-44... - \o 0, 5-20, 25-30, 35-40... - \o - \row - \o Czech - \o 1 - \o 2-4 - \o 0, 5- - \o - \row - \o Danish - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Dutch - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o English - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o English-US - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Estonian - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Finnish - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o French-CA - \o 0, 1 - \o 2-100, 101- - \o - \o - \row - \o French-FR - \o 0, 1 - \o 2-100, 101- - \o - \o - \row - \o Galician - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o German - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Greek - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Hebrew - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Hungarian - \o 0- - \o - \o - \o - \row - \o Icelandic - \o 1, 21, 31, 41, 51....101, 121, 131... - \o 0, 2-20, 22-30, 32-40...102-120... - \o - \o - \row - \o Indonesian - \o 0- - \o - \o - \o - \row - \o Italian - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Japanese - \o 0- - \o - \o - \o - \row - \o Korean - \o 0- - \o - \o - \o - \row - \o Latvian - \o 0 - \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101, 131, 141... - \o 2-20, 22-30, 32-40, 42-50...202-220, 222-230... - \o - \row - \o Lithuanian - \o 1, 21, 31, 41, 51...101, 121, 131... - \o 2-9, 22-29, 32-39...102-109, 122-129, 132-139... - \o 0, 10-20, 30, 40, 50...110-120, 130, 140... - \o - \row - \o Malay - \o 0- - \o - \o - \o - \row - \o Norwegian - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Persian - \o 0- - \o - \o - \o - \row - \o Polish - \o 1 - \o 2-4, 22-24, 32-34... - \o 5-21, 25-31, 35-41... - \o - \row - \o Portugese-BR - \o 0, 1 - \o 2-100, 101- - \o - \o - \row - \o Portugese-PT - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Romanian - \o 1 - \o 0, 2-19, 101-119, 201-219... - \o 20-100, 120-200, 220-300... - \o - \row - \o Russian - \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101... - \o 2-4, 22-24, 32-34... - \o 0, 5-20, 25-30, 35-40... - \o - \row - \o Serbian - \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101... - \o 2-4, 22-24, 32-34... - \o 0, 5-20, 25-30, 35-40... - \o - \row - \o Slovak - \o 1 - \o 2-4 - \o 0, 5-20, 25-30, 35-40... - \o - \row - \o Slovene - \o 1, 101, 201, 301... - \o 2, 102, 202, 302... - \o 3, 4, 103, 104, 203, 204, 303, 304... - \o 0, 5-100, 105-200, 205-300... - \row - \o Spanish-US - \o 1 - \o 0, 2- - \o - \o - \row - \o Spanish-ES - \o 1 - \o 0, 2- - \o - \o - \row - \o Swedish - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Tagalog - \o 0, 1 - \o 2, 3, 5, 7-8, 10-13, 15, 17-18, 20-23...101...1001 - \o 4, 6, 9, 14, 16, 19, 24, 26, 29...104, 106, 109... - \o - \row - \o Thai - \o 0- - \o - \o - \o - \row - \o Turkish - \o 0- - \o - \o - \o - \row - \o Ukrainian - \o 1, 21, 31, 41, 51, 61, 71, 81, 91, 101... - \o 2-4, 22-24, 32-34... - \o 0, 5-20, 25-30, 35-40... - \o - \row - \o Urdu - \o 1 - \o 0, 2-100, 101- - \o - \o - \row - \o Vietnamese - \o 0- - \o - \o - \o - \endtable - - These rules are embedded within the Qt libraries, there is no need for - the developer to know them. Merely to use the correct \c tr() call. - + The use of numbered arguments is often accompanied by the use of + plurals in the source text. In many languages, the form of the + text will depend on the value shown, and more than one translation + is required. If the developers have marked up the source text in + correct way, fields for each of the possible plural forms will be + available in the translation area. (The + \l{Writing Source Code for Translation#Handling Plurals}{Writing Source Code for Translation} + document contains details about this feature for developers.) \section2 Reusing Translations @@ -1157,7 +835,7 @@ {translation area}, and adapts the number of input fields for plural forms accordingly. If not explicitly set, \QL guesses the target language and country by evaluating the translation source - file name: E.g. \c app_de.ts sets the target language to German, + file name. For example, \c app_de.ts sets the target language to German, and \c app_de_ch.ts sets the target language to German and the target country to Switzerland (this also helps loading translations for the current locale automatically; see @@ -1287,7 +965,7 @@ can be used to edit XLIFF files generated by other programs. For standard Qt projects, however, only the TS file format is used. \o QM \e {Qt message files} \BR are binary files that contain - translations used by an application at runtime. These files are + translations used by an application at run-time. These files are generated by \l lrelease, but can also be generated by \QL. \o \c .qph \e {Qt phrase book files} \BR are human-readable XML files containing standard phrases and their translations. These files @@ -1416,7 +1094,7 @@ \endlist - \o \gui {Tools} + \o \gui {Tools} \list \o \gui {Batch Translation...} \BR Opens a \l{Batch @@ -1427,7 +1105,7 @@ Preview}. This window let you instantly see translations for forms created with \QD. \endlist - \o \gui {View} + \o \gui {View} \list \o \gui {Revert Sorting} \BR puts the items in the \l{Context @@ -1449,7 +1127,7 @@ \endlist - \o \gui {Help} + \o \gui {Help} \list \o \gui {Manual F1} \BR opens this manual. \o \gui {About Qt Linguist} \BR Shows information about \QL. @@ -1621,7 +1299,7 @@ \code CODECFORTR = UTF-8 \endcode - + See the \l lupdate and \l lrelease sections. \section2 Loading Translations @@ -1683,7 +1361,7 @@ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 9 - \section2 Distinguishing Identical Strings That Require Different Translations + \section2 Distinguishing Between Identical Translatable Strings The \l lupdate program automatically provides a \e context for every source text. This context is the class name of the class that contains diff --git a/doc/src/snippets/code/doc_src_i18n.qdoc b/doc/src/snippets/code/doc_src_i18n.qdoc index eca2868..80faabc 100644 --- a/doc/src/snippets/code/doc_src_i18n.qdoc +++ b/doc/src/snippets/code/doc_src_i18n.qdoc @@ -184,7 +184,7 @@ void Clock::setTime(const QTime &time) //! [12] -void QWidget::changeEvent(QEvent *event) +void MyWidget::changeEvent(QEvent *event) { if (e->type() == QEvent::LanguageChange) { titleLabel->setText(tr("Document Title")); diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp index 4c64374..88d8025 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp @@ -235,9 +235,8 @@ MyWindow::MyWindow() { QLabel *senderLabel = new QLabel(tr("Name:")); QLabel *recipientLabel = new QLabel(tr("Name:", "recipient")); - ... -} //! [17] +} //! [18] diff --git a/examples/mainwindows/sdi/mainwindow.h b/examples/mainwindows/sdi/mainwindow.h index ca478df..a925e2f 100644 --- a/examples/mainwindows/sdi/mainwindow.h +++ b/examples/mainwindows/sdi/mainwindow.h @@ -50,12 +50,14 @@ class QMenu; class QTextEdit; QT_END_NAMESPACE +//! [class definition with macro] class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(); +//! [class definition with macro] MainWindow(const QString &fileName); protected: diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 7be19b3..7031957 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -582,7 +582,7 @@ int QMetaCallEvent::placeMetaCall(QObject *object) QObjects organize themselves in object trees. When you create a QObject with another object as parent, the object will automatically add itself to the parent's children() list. The - parent takes ownership of the object i.e. it will automatically + parent takes ownership of the object; i.e., it will automatically delete its children in its destructor. You can look for an object by name and optionally type using findChild() or findChildren(). @@ -646,7 +646,7 @@ int QMetaCallEvent::placeMetaCall(QObject *object) to be stored in one of the container classes. You must store pointers. - \section2 Auto-Connection + \section1 Auto-Connection Qt's meta-object system provides a mechanism to automatically connect signals and slots between QObject subclasses and their children. As long @@ -660,7 +660,7 @@ int QMetaCallEvent::placeMetaCall(QObject *object) given in the \l{Using a Designer UI File in Your Application} section of the \QD manual. - \section2 Dynamic Properties + \section1 Dynamic Properties From Qt 4.2, dynamic properties can be added to and removed from QObject instances at run-time. Dynamic properties do not need to be declared at @@ -673,6 +673,15 @@ int QMetaCallEvent::placeMetaCall(QObject *object) and both standard Qt widgets and user-created forms can be given dynamic properties. + \section1 Internationalization (i18n) + + All QObject subclasses support Qt's translation features, making it possible + to translate an application's user interface into different languages. + + To make user-visible text translatable, it must be wrapped in calls to + the tr() function. This is explained in detail in the + \l{Writing Source Code for Translation} document. + \sa QMetaObject, QPointer, QObjectCleanupHandler, Q_DISABLE_COPY() {Object Trees and Object Ownership} */ @@ -2157,65 +2166,10 @@ void QObject::deleteLater() otherwise returns \a sourceText itself if no appropriate translated string is available. - See the sections below on Disambiguation and Handling Plurals for more - information about the optional \a disambiguation and \a n parameters. - - QObject and its subclasses obtain translated strings from any translator - objects that have been installed on the application object; see the - QTranslator documentation for details about this mechanism. - - A translatable string is referenced by its translation context; - this is the name of the QObject subclass whose tr() function is invoked, - as in the following example: - + Example: \snippet mainwindows/sdi/mainwindow.cpp implicit tr context \dots - Here, the context is \c MainWindow because it is the \c MainWindow::tr() - function that is invoked. Translation contexts can be given explicitly - by fully qualifying the call to tr(); for example: - - \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp explicit tr context - - This call obtains the translated text for "Page up" from the \c QScrollBar - context. - - \section1 Defining Translation Contexts - - The translation context for QObject and each QObject subclass is the - class name itself. Developers subclassing QObject must use the - Q_OBJECT macro in their class definition to override the translation - context. This macro sets the context to the name of the subclass. - - If Q_OBJECT is not used in a class definition, the context will be - inherited from the base class. For example, since all QObject-based - classes in Qt provide a context, a new QWidget subclass defined without - a Q_OBJECT macro will use the "QWidget" context if its tr() function - is invoked. - - \section1 Translator Comments - - Developers can include information about each translatable string to - help translators with the translation process. These are extracted - when \l lupdate is used to process the source files. The recommended - way to add comments is to annotate the tr() calls in your code with - comments of the form: - - \tt{//: ...} - - or - - \tt{\begincomment: ... \endcomment} - - Examples: - - \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 40 - - In these examples, the comments will be associated with the strings - passed to tr() in the context of each call. - - \section1 Disambiguation - If the same \a sourceText is used in different roles within the same context, an additional identifying string may be passed in \a disambiguation (0 by default). In Qt 4.4 and earlier, this was @@ -2224,76 +2178,12 @@ void QObject::deleteLater() Example: \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 17 + \dots - \section1 Meta Data - - Additional data can be attached to each translatable message. - The syntax: - - \tt{//= } - - can be used to give the message a unique identifier to support tools - which need it. - The syntax: - - \tt{//~ } - - can be used to attach meta data to the message. The field name should consist - of a domain prefix (possibly the conventional file extension of the file format - the field is inspired by), a hyphen and the actual field name in - underscore-delimited notation. For storage in TS files, the field name together - with the prefix "extra-" will form an XML element name. The field contents will - be XML-escaped, but otherwise appear verbatim as the element's contents. - Any number of unique fields can be added to each message. - - Example: - - \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp meta data - - Meta data appearing right in front of a magic TRANSLATOR comment applies to the - whole TS file. - - \section1 Character Encodings - - You can set the encoding for \a sourceText by calling QTextCodec::setCodecForTr(). - By default \a sourceText is assumed to be in Latin-1 encoding. - - \section1 Handling Plurals - - If \a n >= 0, all occurrences of \c %n in the resulting string - are replaced with a decimal representation of \a n. In addition, - depending on \a n's value, the translation text may vary. - - Example: - - \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 18 - - The table below shows what string is returned depending on the - active translation: - - \table - \header \o \o{3,1} Active Translation - \header \o \a n \o No Translation \o French \o English - \row \o 0 \o "0 message(s) saved" \o "0 message sauvegard\unicode{0xE9}" \o "0 message\bold{s} saved" - \row \o 1 \o "1 message(s) saved" \o "1 message sauvegard\unicode{0xE9}" \o "1 message saved" - \row \o 2 \o "2 message(s) saved" \o "2 message\bold{s} sauvegard\unicode{0xE9}\bold{s}" \o "2 message\bold{s} saved" - \row \o 37 \o "37 message(s) saved" \o "37 message\bold{s} sauvegard\unicode{0xE9}\bold{s}" \o "37 message\bold{s} saved" - \endtable - - This idiom is more flexible than the traditional approach; e.g., - - \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 19 - - because it also works with target languages that have several - plural forms (e.g., Irish has a special "dual" form that should - be used when \c n is 2), and it handles the \e n == 0 case - correctly for languages such as French that require the singular. - See the \l{Qt Linguist Manual} for details. - - Instead of \c %n, you can use \c %Ln to produce a localized - representation of \a n. The conversion uses the default locale, - set using QLocale::setDefault(). (If no default locale was - specified, the "C" locale is used.) + See \l{Writing Source Code for Translation} for a detailed description of + Qt's translation mechanisms in general, and the + \l{Writing Source Code for Translation#Disambiguation}{Disambiguation} + section for information on disambiguation. \warning This method is reentrant only if all translators are installed \e before calling this method. Installing or removing -- cgit v0.12 From 50a745d31e348c113d42444d527b4286b7064e3e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 2 Nov 2009 15:30:15 +0100 Subject: Doc: Fixed qdoc warnings. Reviewed-by: Trust Me --- src/gui/kernel/qevent.cpp | 2 +- src/gui/symbian/qsymbianevent.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 065bd09..617d016 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -4330,7 +4330,7 @@ bool QGestureEvent::isAccepted(QGesture *gesture) const } /*! - Sets the widget for this event. + Sets the widget for this event to the \a widget specified. */ void QGestureEvent::setWidget(QWidget *widget) { diff --git a/src/gui/symbian/qsymbianevent.cpp b/src/gui/symbian/qsymbianevent.cpp index af2c861..2799e6f 100644 --- a/src/gui/symbian/qsymbianevent.cpp +++ b/src/gui/symbian/qsymbianevent.cpp @@ -66,13 +66,13 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QSymbianEvent::type() + \fn QSymbianEvent::type() const Returns the event type contained in the QSymbianEvent instance. */ /*! - \fn QSymbianEvent::isValid() + \fn QSymbianEvent::isValid() const Returns whether this QSymbianEvent instance contains a valid event. */ -- cgit v0.12 From c4ce16e1eaa4504787f4cc739f3af7d1fdea8351 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 2 Nov 2009 16:11:49 +0100 Subject: Fixed main window closing when subwindows cancel their close events. Reviewed-by: Trust Me Reported-here: http://lists.trolltech.com/pipermail/qt4-preview-feedback /2009-October/001023.html --- examples/mainwindows/mdi/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mainwindows/mdi/mainwindow.cpp b/examples/mainwindows/mdi/mainwindow.cpp index 712d91f..edb33b7 100644 --- a/examples/mainwindows/mdi/mainwindow.cpp +++ b/examples/mainwindows/mdi/mainwindow.cpp @@ -71,7 +71,7 @@ MainWindow::MainWindow() void MainWindow::closeEvent(QCloseEvent *event) { mdiArea->closeAllSubWindows(); - if (activeMdiChild()) { + if (mdiArea->currentSubWindow()) { event->ignore(); } else { writeSettings(); -- cgit v0.12 From 803fb60b1e98beddf4ebb8ea1a9224889c392e4e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 2 Nov 2009 17:34:41 +0100 Subject: Doc: Added a note about QApplication::installTranslator(). Reviewed-by: Alessandro Portale --- doc/src/internationalization/i18n.qdoc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc index 1a2839d..2d1b8cc 100644 --- a/doc/src/internationalization/i18n.qdoc +++ b/doc/src/internationalization/i18n.qdoc @@ -439,9 +439,13 @@ application language. The default event handler for QWidget subclasses responds to the - QEvent::LanguageChange event, and will call this function when necessary; - other application components can also force widgets to update themselves - by posting the \l{QEvent::LanguageChange}{LanguageChange} event to them. + QEvent::LanguageChange event, and will call this function when necessary. + + \l{QEvent::LanguageChange}{LanguageChange} events are posted when a new + translation is installed using the QCoreApplication::installTranslator() + function. Additionally, other application components can also force + widgets to update themselves by posting LanguageChange events to them. + \section1 Translating Non-Qt Classes -- cgit v0.12 From 04d5735a608aeeab259463b1bc80842b5134ede6 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Mon, 2 Nov 2009 16:36:41 +0100 Subject: Prepend qt_instdate when using configure.exe as well. Rebuilt configure.exe Rebuilt using VS2008. Reviewed-By: Alessandro Portale --- configure.exe | Bin 1169408 -> 1171968 bytes tools/configure/configureapp.cpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.exe b/configure.exe index f433888..7c11fec 100755 Binary files a/configure.exe and b/configure.exe differ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 28645a0..3f891f6 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3032,7 +3032,7 @@ void Configure::generateConfigfiles() << "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl << endl << "/* Build date */" << endl - << "static const char qt_configure_installation [11 + 12] = \"" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl + << "static const char qt_configure_installation [11 + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl << endl; if(!dictionary[ "QT_HOST_PREFIX" ].isNull()) tmpStream << "#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)" << endl; -- cgit v0.12 From 93ec4104781d7f9929b8b8a05dee3d94f8cd4b17 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Tue, 3 Nov 2009 12:06:00 +0100 Subject: Revert "Compile fix until configure.exe is rebuilt for Windows" since the required changes to configure.exe have been added. You will need to run configure after updating! Reviewed-By: Alessandro Portale This reverts commit 94be7bf47fe93ca4fa6ae90f5906f6ef711f558e. --- src/corelib/global/qlibraryinfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 32693e0..15a06d7 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -215,8 +215,7 @@ QLibraryInfo::buildKey() QDate QLibraryInfo::buildDate() { - return QDate(); - //return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate); + return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate); } /*! -- cgit v0.12 From edec363cd4dfcb01c488be7f66bdfa2ca93f48bf Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 3 Nov 2009 14:53:19 +0100 Subject: Doc: Added links to the SQL documentation and corrected license info. Reviewed-by: Trust Me --- doc/src/modules.qdoc | 5 ++++- doc/src/sql-programming/sql-programming.qdoc | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index 9c92a31..ea5a9dc 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -367,6 +367,9 @@ The QtSql module is part of the \l{Qt Full Framework Edition} and the \l{Open Source Versions of Qt}. + + See the \l{SQL Programming} guide for information about using this + module in your applications. */ /*! @@ -576,7 +579,7 @@ the module under the appropriate version of the GNU LGPL; version 2.1 for applications and libraries licensed under the GNU GPL version 2, or version 3 for applications and libraries licensed under the GNU - GPL version 2. + GPL version 3. \legalese This file is part of the KDE project diff --git a/doc/src/sql-programming/sql-programming.qdoc b/doc/src/sql-programming/sql-programming.qdoc index d0b6776..3aceb17 100644 --- a/doc/src/sql-programming/sql-programming.qdoc +++ b/doc/src/sql-programming/sql-programming.qdoc @@ -49,6 +49,7 @@ /*! \page sql-programming.html \title SQL Programming + \nextpage Connecting to Databases \brief Database integration for Qt applications. @@ -95,7 +96,7 @@ and the SQL API layer. See \l{SQL Database Drivers} for more information. \section2 SQL API Layer - + These classes provide access to databases. Connections are made using the QSqlDatabase class. Database interaction is achieved by using the QSqlQuery class. @@ -119,6 +120,7 @@ \title Connecting to Databases \contentspage SQL Programming + \previouspage SQL Programming \nextpage Executing SQL Statements To access a database with QSqlQuery or QSqlQueryModel, create and -- cgit v0.12 From 86e074f47848955cd0ffbc78112493af46c2ed12 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 3 Nov 2009 15:45:32 +0100 Subject: Doc: Fixed license information. Reviewed-by: Trust Me --- src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc index 09dfae5..408478c 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc @@ -31,7 +31,7 @@ the module under the appropriate version of the GNU LGPL; version 2.1 for applications and libraries licensed under the GNU GPL version 2, or version 3 for applications and libraries licensed under the GNU - GPL version 2. + GPL version 3. \legalese WebKit is licensed under the GNU Library General Public License. -- cgit v0.12 From c95a0e6e8eb8ba5fd2a4412b318ad998b3ccb4fc Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 3 Nov 2009 16:06:05 +0100 Subject: Doc/i18n: Fixed source strings for translation. Reviewed-by: Oswald Buddenhagen --- src/3rdparty/phonon/gstreamer/mediaobject.cpp | 2 +- src/3rdparty/phonon/mmf/effectfactory.cpp | 4 ++-- .../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp | 4 ++-- src/gui/itemviews/qdirmodel.cpp | 2 +- src/network/ssl/qsslerror.cpp | 4 ++-- src/network/ssl/qsslsocket_openssl.cpp | 2 +- src/xmlpatterns/expr/qncnameconstructor_p.h | 2 +- src/xmlpatterns/parser/qquerytransformparser.cpp | 18 +++++++++--------- src/xmlpatterns/schema/qxsdschemahelper.cpp | 2 +- src/xmlpatterns/schema/qxsdschemaparser.cpp | 2 +- .../schema/qxsdvalidatinginstancereader.cpp | 4 ++-- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp index 5dcbd42..0eb34b0 100644 --- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp +++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp @@ -87,7 +87,7 @@ MediaObject::MediaObject(Backend *backend, QObject *parent) m_name = "MediaObject" + QString::number(count++); if (!m_backend->isValid()) { - setError(tr("Cannot start playback. \n\nCheck your Gstreamer installation and make sure you " + setError(tr("Cannot start playback. \n\nCheck your GStreamer installation and make sure you " "\nhave libgstreamer-plugins-base installed."), Phonon::FatalError); } else { m_root = this; diff --git a/src/3rdparty/phonon/mmf/effectfactory.cpp b/src/3rdparty/phonon/mmf/effectfactory.cpp index 214baa0..e9c5e27 100644 --- a/src/3rdparty/phonon/mmf/effectfactory.cpp +++ b/src/3rdparty/phonon/mmf/effectfactory.cpp @@ -62,9 +62,9 @@ QHash EffectFactory::audioEffectDescriptions(AbstractAudio switch (type) { case AbstractAudioEffect::EffectAudioEqualizer: - return constructEffectDescription(QCoreApplication::translate("Phonon::MMF::EffectFactory", "audio equalizer"), "Audio equalizer."); + return constructEffectDescription(QCoreApplication::translate("Phonon::MMF::EffectFactory", "Audio Equalizer"), "Audio equalizer."); case AbstractAudioEffect::EffectBassBoost: - return constructEffectDescription(QCoreApplication::translate("Phonon::MMF::EffectFactory", "Bass boost"), "Bass boost."); + return constructEffectDescription(QCoreApplication::translate("Phonon::MMF::EffectFactory", "Bass Boost"), "Bass boost."); case AbstractAudioEffect::EffectDistanceAttenuation: return constructEffectDescription(QCoreApplication::translate("Phonon::MMF::EffectFactory", "Distance Attenuation"), "Distance Attenuation."); case AbstractAudioEffect::EffectEnvironmentalReverb: diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 81ccbe8..1ed9b21 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -708,7 +708,7 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c WebCore::ResourceError FrameLoaderClientQt::cancelledError(const WebCore::ResourceRequest& request) { ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(), - QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8)); + QCoreApplication::translate("QWebFrame", "Request canceled", 0, QCoreApplication::UnicodeUTF8)); error.setIsCancellation(true); return error; } @@ -746,7 +746,7 @@ WebCore::ResourceError FrameLoaderClientQt::interruptForPolicyChangeError(const WebCore::ResourceError FrameLoaderClientQt::cannotShowMIMETypeError(const WebCore::ResourceResponse& response) { return ResourceError("WebKit", WebKitErrorCannotShowMIMEType, response.url().string(), - QCoreApplication::translate("QWebFrame", "Cannot show mimetype", 0, QCoreApplication::UnicodeUTF8)); + QCoreApplication::translate("QWebFrame", "Cannot show MIME type", 0, QCoreApplication::UnicodeUTF8)); } WebCore::ResourceError FrameLoaderClientQt::fileDoesNotExistError(const WebCore::ResourceResponse& response) diff --git a/src/gui/itemviews/qdirmodel.cpp b/src/gui/itemviews/qdirmodel.cpp index 2973741..942cfd7 100644 --- a/src/gui/itemviews/qdirmodel.cpp +++ b/src/gui/itemviews/qdirmodel.cpp @@ -1351,7 +1351,7 @@ QString QDirModelPrivate::size(const QModelIndex &index) const return QFileSystemModel::tr("%1 MB").arg(QLocale().toString(qreal(bytes) / mb, 'f', 1)); if (bytes >= kb) return QFileSystemModel::tr("%1 KB").arg(QLocale().toString(bytes / kb)); - return QFileSystemModel::tr("%1 bytes").arg(QLocale().toString(bytes)); + return QFileSystemModel::tr("%1 byte(s)").arg(QLocale().toString(bytes)); } QString QDirModelPrivate::type(const QModelIndex &index) const diff --git a/src/network/ssl/qsslerror.cpp b/src/network/ssl/qsslerror.cpp index 62fcd4c..8fb605c 100644 --- a/src/network/ssl/qsslerror.cpp +++ b/src/network/ssl/qsslerror.cpp @@ -251,10 +251,10 @@ QString QSslError::errorString() const errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "One of the CA certificates is invalid")); break; case PathLengthExceeded: - errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The basicConstraints pathlength parameter has been exceeded")); + errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The basicConstraints path length parameter has been exceeded")); break; case InvalidPurpose: - errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The supplied certificate is unsuited for this purpose")); + errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The supplied certificate is unsuitable for this purpose")); break; case CertificateUntrusted: errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The root CA certificate is not trusted for this purpose")); diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 6f7e55a..743722f 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -324,7 +324,7 @@ init_context: // Check if the certificate matches the private key. if (!q_SSL_CTX_check_private_key(ctx)) { - q->setErrorString(QSslSocket::tr("Private key does not certificate public key, %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Private key does not certify public key, %1").arg(SSL_ERRORSTR())); emit q->error(QAbstractSocket::UnknownSocketError); return false; } diff --git a/src/xmlpatterns/expr/qncnameconstructor_p.h b/src/xmlpatterns/expr/qncnameconstructor_p.h index 6875c48..bbf9726 100644 --- a/src/xmlpatterns/expr/qncnameconstructor_p.h +++ b/src/xmlpatterns/expr/qncnameconstructor_p.h @@ -112,7 +112,7 @@ namespace QPatternist { return QtXmlPatterns::tr("The target name in a processing instruction " "cannot be %1 in any combination of upper " - "and lower case. Therefore, is %2 invalid.") + "and lower case. Therefore, %2 is invalid.") .arg(formatKeyword("xml"), formatKeyword(lexTarget)); } }; diff --git a/src/xmlpatterns/parser/qquerytransformparser.cpp b/src/xmlpatterns/parser/qquerytransformparser.cpp index 5894b83..c250d0c 100644 --- a/src/xmlpatterns/parser/qquerytransformparser.cpp +++ b/src/xmlpatterns/parser/qquerytransformparser.cpp @@ -418,7 +418,7 @@ static void registerNamedTemplate(const QXmlName &name, if(e) { - parseInfo->staticContext->error(QtXmlPatterns::tr("A template by name %1 " + parseInfo->staticContext->error(QtXmlPatterns::tr("A template with name %1 " "has already been declared.") .arg(formatKeyword(parseInfo->staticContext->namePool(), name)), @@ -882,7 +882,7 @@ static void variableUnavailable(const QXmlName &variableName, const ParserContext *const parseInfo, const YYLTYPE &location) { - parseInfo->staticContext->error(QtXmlPatterns::tr("No variable by name %1 exists") + parseInfo->staticContext->error(QtXmlPatterns::tr("No variable with name %1 exists") .arg(formatKeyword(parseInfo->staticContext->namePool(), variableName)), ReportContext::XPST0008, fromYYLTYPE(location, parseInfo)); } @@ -4028,7 +4028,7 @@ yyreduce: const AtomicValue::Ptr val(Decimal::fromLexical((yyvsp[(2) - (2)].sval))); if(val->hasError()) { - parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must of type %2, which %3 isn't.") + parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must be of type %2, which %3 isn't.") .arg(formatKeyword(QLatin1String("priority")), formatType(parseInfo->staticContext->namePool(), BuiltinTypes::xsDecimal), formatData((yyvsp[(2) - (2)].sval))), @@ -4104,7 +4104,7 @@ yyreduce: else if ((yyvsp[(5) - (7)].sval) == CommonNamespaces::XML || (yyvsp[(3) - (7)].sval) == QLatin1String("xml")) { parseInfo->staticContext->error(QtXmlPatterns::tr( - "The prefix %1 can not be bound. By default, it is already bound " + "The prefix %1 cannot be bound. By default, it is already bound " "to the namespace %2.") .arg(formatKeyword("xml")) .arg(formatURI(CommonNamespaces::XML)), @@ -4415,7 +4415,7 @@ yyreduce: allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(3) - (9)].enums.Bool)); if(variableByName((yyvsp[(5) - (9)].qName), parseInfo)) { - parseInfo->staticContext->error(QtXmlPatterns::tr("A variable by name %1 has already " + parseInfo->staticContext->error(QtXmlPatterns::tr("A variable with name %1 has already " "been declared.") .arg(formatKeyword(parseInfo->staticContext->namePool()->toLexical((yyvsp[(5) - (9)].qName)))), parseInfo->isXSLT() ? ReportContext::XTSE0630 : ReportContext::XQST0049, @@ -4455,7 +4455,7 @@ yyreduce: else { parseInfo->staticContext->error(QtXmlPatterns::tr("No value is available for the external " - "variable by name %1.") + "variable with name %1.") .arg(formatKeyword(parseInfo->staticContext->namePool(), (yyvsp[(5) - (9)].qName))), parseInfo->isXSLT() ? ReportContext::XTDE0050 : ReportContext::XPDY0002, fromYYLTYPE((yyloc), parseInfo)); @@ -4674,7 +4674,7 @@ yyreduce: { if((*it)->name() == (yyvsp[(3) - (3)].functionArgument)->name()) { - parseInfo->staticContext->error(QtXmlPatterns::tr("An argument by name %1 has already " + parseInfo->staticContext->error(QtXmlPatterns::tr("An argument with name %1 has already " "been declared. Every argument name " "must be unique.") .arg(formatKeyword(parseInfo->staticContext->namePool(), (yyvsp[(3) - (3)].functionArgument)->name())), @@ -6679,7 +6679,7 @@ yyreduce: (yyval.expr) = create(func, (yyloc), parseInfo); else { - parseInfo->staticContext->error(QtXmlPatterns::tr("No function by name %1 is available.") + parseInfo->staticContext->error(QtXmlPatterns::tr("No function with name %1 is available.") .arg(formatKeyword(parseInfo->staticContext->namePool(), (yyvsp[(1) - (4)].qName))), ReportContext::XPST0017, fromYYLTYPE((yyloc), parseInfo)); } @@ -6929,7 +6929,7 @@ yyreduce: &ryy, true); if(declaredAttributes.contains(att)) { - parseInfo->staticContext->error(QtXmlPatterns::tr("An attribute by name %1 has already appeared on this element.") + parseInfo->staticContext->error(QtXmlPatterns::tr("An attribute with name %1 has already appeared on this element.") .arg(formatKeyword(parseInfo->staticContext->namePool(), att)), ReportContext::XQST0040, fromYYLTYPE((yyloc), parseInfo)); diff --git a/src/xmlpatterns/schema/qxsdschemahelper.cpp b/src/xmlpatterns/schema/qxsdschemahelper.cpp index e9f32c2..7813808 100644 --- a/src/xmlpatterns/schema/qxsdschemahelper.cpp +++ b/src/xmlpatterns/schema/qxsdschemahelper.cpp @@ -727,7 +727,7 @@ bool XsdSchemaHelper::isValidAttributeUsesRestriction(const XsdAttributeUse::Lis } } else { if (!wildcard) { - errorMsg = QtXmlPatterns::tr("Derived attribute %1 does not exists in the base definition.").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Derived attribute %1 does not exist in the base definition.").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); return false; } diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp index 41c6b82..beb28bb 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp @@ -5959,7 +5959,7 @@ void XsdSchemaParser::validateIdAttribute(const char *elementName) attributeContentError("id", elementName, value, BuiltinTypes::xsID); } else { if (m_idCache->hasId(value)) { - error(QtXmlPatterns::tr("Component with id %1 has been defined previously.").arg(formatData(value))); + error(QtXmlPatterns::tr("Component with ID %1 has been defined previously.").arg(formatData(value))); } else { m_idCache->addId(value); } diff --git a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp index fda3548..622a39f 100644 --- a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp +++ b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp @@ -469,7 +469,7 @@ bool XsdValidatingInstanceReader::validateElement(const XsdElement::Ptr &declara // 3.2.3.2 if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) { - error(QtXmlPatterns::tr("Fixed value constrained not allowed if element is nillable.")); + error(QtXmlPatterns::tr("Fixed value constraint not allowed if element is nillable.")); return false; } } @@ -699,7 +699,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P if (complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed) { if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) { if (hasChildElement()) { - error(QtXmlPatterns::tr("Element %1 can not contain other elements, as it has a fixed content.").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 cannot contain other elements, as it has a fixed content.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } -- cgit v0.12 From 66056ead409d4ba79b2b7dd08d12332ba47f5307 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 2 Nov 2009 17:42:17 +0100 Subject: Make the QDataStream autotest much more robust In the old version, we'd read all the types, then start comparing. If an operator left the stream in a bogus state, funny things would happen (e.g. crashes). Now, we test the value instantly before reading the next one, thus preventing reading bogus. --- tests/auto/qdatastream/tst_qdatastream.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/tests/auto/qdatastream/tst_qdatastream.cpp b/tests/auto/qdatastream/tst_qdatastream.cpp index add0945..bb59809 100644 --- a/tests/auto/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/qdatastream/tst_qdatastream.cpp @@ -3180,28 +3180,31 @@ void tst_QDataStream::streamRealDataTypes() QDataStream stream(&file); stream.setVersion(QDataStream::Qt_4_2); - stream >> a >> b >> c >> d >> e >> f >> point - >> rect >> polygon >> matrix >> p; - if (i == 1) - stream >> pict; - stream >> textLength >> col >> rGrad >> cGrad - >> pen; - - QCOMPARE(stream.status(), QDataStream::Ok); - + stream >> a; QCOMPARE(a, qreal(0)); + stream >> b; QCOMPARE(b, qreal(1.0)); + stream >> c; QCOMPARE(c, qreal(1.1)); + stream >> d; QCOMPARE(d, qreal(3.14)); + stream >> e; QCOMPARE(e, qreal(-3.14)); + stream >> f; QCOMPARE(f, qreal(-1)); + stream >> point; QCOMPARE(point, QPointF(3, 5)); + stream >> rect; QCOMPARE(rect, QRectF(-1, -2, 3, 4)); + stream >> polygon; QCOMPARE((QVector &)polygon, (QPolygonF() << QPointF(0, 0) << QPointF(1, 2))); + stream >> matrix; QCOMPARE(matrix, QMatrix().rotate(90).scale(2, 2)); + stream >> p; QCOMPARE(p, path); + if (i == 1) { + stream >> pict; - if (i == 0) { QByteArray pictA, pictB; QBuffer bufA, bufB; QVERIFY(bufA.open(QIODevice::ReadWrite)); @@ -3212,8 +3215,11 @@ void tst_QDataStream::streamRealDataTypes() QCOMPARE(pictA, pictB); } + stream >> textLength; QCOMPARE(textLength, QTextLength(QTextLength::VariableLength, 1.5)); + stream >> col; QCOMPARE(col, color); + stream >> rGrad; QCOMPARE(rGrad.style(), radialBrush.style()); QCOMPARE(rGrad.matrix(), radialBrush.matrix()); QCOMPARE(rGrad.gradient()->type(), radialBrush.gradient()->type()); @@ -3222,6 +3228,7 @@ void tst_QDataStream::streamRealDataTypes() QCOMPARE(((QRadialGradient *)rGrad.gradient())->center(), ((QRadialGradient *)radialBrush.gradient())->center()); QCOMPARE(((QRadialGradient *)rGrad.gradient())->focalPoint(), ((QRadialGradient *)radialBrush.gradient())->focalPoint()); QCOMPARE(((QRadialGradient *)rGrad.gradient())->radius(), ((QRadialGradient *)radialBrush.gradient())->radius()); + stream >> cGrad; QCOMPARE(cGrad.style(), conicalBrush.style()); QCOMPARE(cGrad.matrix(), conicalBrush.matrix()); QCOMPARE(cGrad.gradient()->type(), conicalBrush.gradient()->type()); @@ -3231,7 +3238,10 @@ void tst_QDataStream::streamRealDataTypes() QCOMPARE(((QConicalGradient *)cGrad.gradient())->angle(), ((QConicalGradient *)conicalBrush.gradient())->angle()); QCOMPARE(cGrad, conicalBrush); + stream >> pen; QCOMPARE(pen.widthF(), qreal(1.5)); + + QCOMPARE(stream.status(), QDataStream::Ok); } #if defined(Q_OS_SYMBIAN) #undef qreal -- cgit v0.12 From 18b072835e3f726a1d2d7604b0dc98cd420d3088 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 2 Nov 2009 17:57:54 +0100 Subject: fix test for real - if the reference stream contains doubles, we must read doubles, and not qreals --- tests/auto/qdatastream/tst_qdatastream.cpp | 63 +++++++++++++++--------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/tests/auto/qdatastream/tst_qdatastream.cpp b/tests/auto/qdatastream/tst_qdatastream.cpp index bb59809..56fc53a 100644 --- a/tests/auto/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/qdatastream/tst_qdatastream.cpp @@ -3100,22 +3100,6 @@ void tst_QDataStream::streamToAndFromQByteArray() void tst_QDataStream::streamRealDataTypes() { -#if defined(Q_OS_WINCE) - // Note: Probably actually same 'qreal being typedeffed as float instead of double' issue as in Symbian - // instead of what CE skip message says. - QSKIP("Skipped on CE as it demands too much memory and fragments", SkipAll); -#elif defined(Q_OS_SYMBIAN) - // qreal is typedeffed float in symbian instead of double like in most platforms, so reference stream - // gets corrupted. Basically this test is flawed, as one shouldn't use naked typedeffed types in - // streams that are meant to work cross-platform. - // As this test also tests other floating point using classes, we do not simply skip it, but work around - // the qreal issue by redefining qreal as double for the duration of this function. - // Note that streaming classes works because they do explicitly use double instead of qreal when - // writing/reading to/from stream. -# define qreal double - qWarning("Note: streamRealDataTypes test redefines qreal as double in symbian!!!"); -#endif - // Generate QPicture from SVG. QSvgRenderer renderer(svgFile); QVERIFY(renderer.isValid()); @@ -3163,7 +3147,6 @@ void tst_QDataStream::streamRealDataTypes() file.close(); } - qreal a, b, c, d, e, f; QPointF point; QRectF rect; QPolygonF polygon; @@ -3180,18 +3163,37 @@ void tst_QDataStream::streamRealDataTypes() QDataStream stream(&file); stream.setVersion(QDataStream::Qt_4_2); - stream >> a; - QCOMPARE(a, qreal(0)); - stream >> b; - QCOMPARE(b, qreal(1.0)); - stream >> c; - QCOMPARE(c, qreal(1.1)); - stream >> d; - QCOMPARE(d, qreal(3.14)); - stream >> e; - QCOMPARE(e, qreal(-3.14)); - stream >> f; - QCOMPARE(f, qreal(-1)); + if (i == 0) { + // the reference stream for 4.2 contains doubles, + // so we must read them out as doubles! + double a, b, c, d, e, f; + stream >> a; + QCOMPARE(a, 0.0); + stream >> b; + QCOMPARE(b, 1.0); + stream >> c; + QCOMPARE(c, 1.1); + stream >> d; + QCOMPARE(d, 3.14); + stream >> e; + QCOMPARE(e, -3.14); + stream >> f; + QCOMPARE(f, -1.0); + } else { + qreal a, b, c, d, e, f; + stream >> a; + QCOMPARE(a, qreal(0)); + stream >> b; + QCOMPARE(b, qreal(1.0)); + stream >> c; + QCOMPARE(c, qreal(1.1)); + stream >> d; + QCOMPARE(d, qreal(3.14)); + stream >> e; + QCOMPARE(e, qreal(-3.14)); + stream >> f; + QCOMPARE(f, qreal(-1)); + } stream >> point; QCOMPARE(point, QPointF(3, 5)); stream >> rect; @@ -3243,9 +3245,6 @@ void tst_QDataStream::streamRealDataTypes() QCOMPARE(stream.status(), QDataStream::Ok); } -#if defined(Q_OS_SYMBIAN) - #undef qreal -#endif } #ifdef QT3_SUPPORT -- cgit v0.12 From 4c1ac09381a259e96a1774a5c931c55e8393813f Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 3 Nov 2009 17:02:58 +0100 Subject: Update mkdist-webkit script: - Use newest qtwebkit tag - Keep BitmapInfo.h and BitmalInfo.cpp in src/3rdparty Reviewed-by: TrustMe --- util/webkit/mkdist-webkit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit index f88f10e..ddf74bb 100755 --- a/util/webkit/mkdist-webkit +++ b/util/webkit/mkdist-webkit @@ -5,7 +5,7 @@ die() { exit 1 } -default_tag="qtwebkit-4.6-snapshot-22102009" +default_tag="qtwebkit-4.6-snapshot-20091003" if [ $# -eq 0 ]; then tag="$default_tag" @@ -155,7 +155,7 @@ excluded_directories="$excluded_directories WebKit/chromium" excluded_directories="$excluded_directories WebKit/English.lproj WebKit/WebKit.xcodeproj" excluded_directories="$excluded_directories WebCore/English.lproj" -exclude_with_exceptions_list="WebCore/platform/win/:WebCore/platform/win/SystemTimeWin.cpp" +exclude_with_exceptions_list="WebCore/platform/win/:WebCore/platform/win/SystemTimeWin.cpp\\|WebCore/platform/win/BitmapInfo.*" excluded_directories="$excluded_directories WebKit/mac/Carbon" excluded_directories="$excluded_directories WebKit/mac/ChangeLog" -- cgit v0.12 From 33eefe549f4570a79d2531bad82698f7109ab687 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 3 Nov 2009 17:12:30 +0100 Subject: Updated WebKit from /home/jturcott/dev/webkit/ to qtwebkit-4.6-snapshot-20091003 ( 8f810287200d21aded375664cc0a6ac0476dbdea ) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2009-10-29 Kenneth Rohde Christiansen Reviewed by Tor Arne Vestbø. Remove QWebView::guessUrlFromString() and replace its use with the new QUrl::fromUserInput() if using Qt 4.6 or newer. * Api/qwebview.cpp: * Api/qwebview.h: * QGVLauncher/main.cpp: (urlFromUserInput): (WebPage::applyProxy): (MainWindow::load): * QtLauncher/main.cpp: (urlFromUserInput): (MainWindow::MainWindow): (MainWindow::changeLocation): * tests/qwebview/tst_qwebview.cpp: 2009-10-28 Kenneth Rohde Christiansen Reviewed by Tor Arne Vestbø. Serialize directly to the stream, and not first to an QByteArray, that is later serialized. That is slower and also uses more bytes. * Api/qwebhistory.cpp: (operator<<): (operator>>): 2009-10-28 Shinichiro Hamaji Reviewed by Eric Seidel. [Qt] WebFrame::counterValueForElementById must not be exposed https://bugs.webkit.org/show_bug.cgi?id=30882 * Api/qwebframe.cpp: (qt_drt_counterValueForElementById): * Api/qwebframe.h: 2009-10-27 Shinichiro Hamaji Reviewed by Darin Adler. Provide a way to get counter values with layoutTestContoller https://bugs.webkit.org/show_bug.cgi?id=30555 * Api/qwebframe.cpp: (QWebFrame::counterValueForElementById): (QWebHitTestResult::frame): * Api/qwebframe.h: 2009-10-28 Antonio Gomes Pushing missing WebKit/qt/tests/qwebframe/resources/ dir from bug 29248. [Qt] [API] Make it possible to have 'invisible' loads https://bugs.webkit.org/show_bug.cgi?id=29248 * tests/qwebframe/resources/image2.png: Copied from WebKit/qt/tests/qwebelement/image.png. 2009-10-28 Kenneth Rohde Christiansen Reviewed by Tor Arne Vestbø. [Qt] QWebHistory::saveState() is inconsistent with the Qt API https://bugs.webkit.org/show_bug.cgi?id=30710 Make the versioning internal and enforce it in the WebCore part. Adjust the comments, as well as remove now dead code. * Api/qwebhistory.cpp: (operator<<): (operator>>): * Api/qwebhistory.h: 2009-10-28 Kenneth Rohde Christiansen Reviewed by Holger Freyther. [Qt] QWebHistory::saveState() is inconsistent with the Qt API https://bugs.webkit.org/show_bug.cgi?id=30710 Remove the QWebHistory::saveState() and ::restoreState() as they are inconsistent with the Qt API. Update unittests to reflect the change. * Api/qwebhistory.cpp: (operator<<): (operator>>): * Api/qwebhistory.h: * tests/qwebhistory/tst_qwebhistory.cpp: (saveHistory): (restoreHistory): (tst_QWebHistory::saveAndRestore_crash_1): (tst_QWebHistory::saveAndRestore_crash_2): (tst_QWebHistory::saveAndRestore_crash_3): (tst_QWebHistory::clear): 2009-10-27 Antonio Gomes Reviewed by Holger Freyther. Complementary fix to bug 30779. By mistake I used QWeakPointer's toStrongRef() method which docs explicitly say to not be used in this situation (when the tracked pointer is devired from QObject). Instead QWeakPointer's data() is recommended. * Api/qwebpage.cpp: (QWebPage::view): 2009-10-27 Holger Hans Peter Freyther Reviewed by Simon Fraser. Change HitTestResult methods to use (3d) transformation aware methods https://bugs.webkit.org/show_bug.cgi?id=27347 The HitTestResult::boundingBox method was removed. The RenderObject must be used directly. In contrast to the old HitTestResult::boundingBox method this code must use a (3d) transformation aware method to not run into an assert in SVGRenderBase::mapLocalToContainer. * Api/qwebframe.cpp: (QWebHitTestResultPrivate::QWebHitTestResultPrivate): 2009-10-27 Kenneth Rohde Christiansen Rubberstamped by Oliver Hunt. Change two methods to be internal for DRT use only. Part of [Qt] Review all new API in Qt 4.6 https://bugs.webkit.org/show_bug.cgi?id=29843#c11 * Api/qwebsecurityorigin.cpp: (qt_drt_whiteListAccessFromOrigin): (qt_drt_resetOriginAccessWhiteLists): (QWebSecurityOrigin::localSchemes): * Api/qwebsecurityorigin.h: 2009-10-27 Kenneth Rohde Christiansen Reviewed by Tor Arne Vestbø. Make sure that initiating a rotation while rotating won't make it end up at rotation positions that are not a multiply of 180 degrees. * QGVLauncher/main.cpp: (MainView::animatedFlip): 2009-10-27 Kenneth Rohde Christiansen Unreviewed Qt build fix. Update the tests as well to the new API change. * tests/qwebelement/tst_qwebelement.cpp: (tst_QWebElement::clear): 2009-10-27 Kenneth Rohde Christiansen Rubberstamped by Tor Arne Vestbø. [Qt] QWebElement::removeChildren() should be QWebElement::removeAllChildren() https://bugs.webkit.org/show_bug.cgi?id=30630 * Api/qwebelement.cpp: (QWebElement::removeAllChildren): * Api/qwebelement.h: 2009-10-27 Antonio Gomes Reviewed by Antti Koivisto and Holger Freyther. Make QWebPagePrivate's (QWidget) view to be a QWeakPointer. https://bugs.webkit.org/show_bug.cgi?id=30779 The fact that it was been set from external objects of qwebpage and not being deleted internally can lead to dangling references. * Api/qgraphicswebview.cpp: (QGraphicsWebView::~QGraphicsWebView): * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): (QWebPagePrivate::createContextMenu): (QWebPagePrivate::handleSoftwareInputPanel): (QWebPagePrivate::keyPressEvent): (QWebPage::setView): (QWebPage::view): (QWebPage::javaScriptAlert): (QWebPage::javaScriptConfirm): (QWebPage::javaScriptPrompt): (QWebPage::shouldInterruptJavaScript): (QWebPage::createWindow): (QWebPage::extension): (QWebPage::chooseFile): (QWebPage::userAgentForUrl): * Api/qwebpage_p.h: * Api/qwebview.cpp: (QWebView::~QWebView): 2009-10-26 Kenneth Rohde Christiansen Unreviewed documentation fix from David Boddie (Qt Doc Team) Removes the check around the RenderHints property documentation that was clearly added to synchronize the source and header files when the #if !defined(Q_OS_SYMBIAN) guards was added to the property. The documentation has also been updated to ensure that Symbian users know that there is no actual RenderHints property on their platform. * Api/qwebview.cpp: 2009-10-26 Kenneth Rohde Christiansen Unreviewed documentation fix from David Boddie (Qt Doc Team) Ensure that qdoc will always see the RenderHints property. The property was only defined in the header file if the Q_OS_SYMBIAN symbol was not defined, resulting in the property not showing up in the Qt documentation just because one platform doesn't support it. A follow up commit will improve the documentation for the property and note that it is not supported on the Symbiam platform. * Api/qwebview.h: 2009-10-26 Benjamin Poulain Reviewed by Tor Arne Vestbø. [Qt] Reintroduce QWebElementCollection Revert the patch that has replaced QWebElementCollection with QList. Update the tests accordingly. Remove the constness of the return type of QWebElement operator[]. https://bugs.webkit.org/show_bug.cgi?id=30767 * Api/qwebelement.cpp: (QWebElement::findAll): (QWebElementCollectionPrivate::QWebElementCollectionPrivate): (QWebElementCollectionPrivate::create): (QWebElementCollection::QWebElementCollection): (QWebElementCollection::operator=): (QWebElementCollection::~QWebElementCollection): (QWebElementCollection::operator+): (QWebElementCollection::append): (QWebElementCollection::count): (QWebElementCollection::at): (QWebElementCollection::toList): * Api/qwebelement.h: (const_iterator::begin): (const_iterator::end): (const_iterator::operator[]): * Api/qwebframe.cpp: (QWebFrame::findAllElements): * Api/qwebframe.h: * QtLauncher/main.cpp: (MainWindow::selectElements): * tests/qwebelement/tst_qwebelement.cpp: (tst_QWebElement::simpleCollection): (tst_QWebElement::iteration): (tst_QWebElement::emptyCollection): (tst_QWebElement::appendCollection): (tst_QWebElement::nullSelect): (tst_QWebElement::hasSetFocus): (tst_QWebElement::render): * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::inputMethods): 2009-10-24 Laszlo Gombos Reviewed by Holger Freyther. [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian https://bugs.webkit.org/show_bug.cgi?id=30476 Assign ReadUserData WriteUserData NetworkServices Symbian capabilities to all QtWebkit executables. * QGVLauncher/QGVLauncher.pro: * QtLauncher/QtLauncher.pro: * tests/benchmarks/loading/tst_loading.pro: * tests/benchmarks/painting/tst_painting.pro: * tests/qgraphicswebview/qgraphicswebview.pro: * tests/qwebelement/qwebelement.pro: * tests/qwebframe/qwebframe.pro: * tests/qwebhistory/qwebhistory.pro: * tests/qwebhistoryinterface/qwebhistoryinterface.pro: * tests/qwebpage/qwebpage.pro: * tests/qwebplugindatabase/qwebplugindatabase.pro: * tests/qwebview/qwebview.pro: 2009-10-22 Gavin Barraclough Reviewed by NOBODY (speculative build fix - qt is currently already broken!) Build fix following bug #30696. * Api/qwebelement.cpp: (setupScriptContext): * Api/qwebframe.cpp: (QWebFrame::evaluateJavaScript): 2009-10-22 Shu Chang Reviewed by Eric Seidel. [Qt] Enable track visited links in QWebPage https://bugs.webkit.org/show_bug.cgi?id=30574 Test: fast/history/clicked-link-is-visited.html * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): 2009-10-22 Girish Ramakrishnan Reviewed by Eric Seidel. [Qt] Add Print Shortcut to QtLauncher https://bugs.webkit.org/show_bug.cgi?id=30682 * QtLauncher/main.cpp: (MainWindow::setupUI): 2009-10-22 Antonio Gomes Rubberstamped by Tor Arne Vestbø. Code standarlization for QGVLauncher. 1) Made member initilization lists in constructors to be per line. 2) Made applyProxy method inline as all other methods in WebPage class. * QGVLauncher/main.cpp: (WebPage::WebPage): (WebPage::applyProxy): (MainView::MainView): (MainWindow::MainWindow): (MainWindow::init): 2009-10-22 Antonio Gomes Reviewed by Tor Arne Vestbø. Add a Y-Axis rotation to QGVLauncher. It uses the QStateMachine API from Qt 4.6. * QGVLauncher/main.cpp: (WebView::WebView): (WebView::setYRotation): (WebView::yRotation): (MainView::flip): (MainView::animatedYFlip): (SharedScene::SharedScene): (SharedScene::webView): (MainWindow::init): (MainWindow::animatedYFlip): (MainWindow::buildUI): 2009-10-20 Kenneth Rohde Christiansen Reviewed By Adam Barth. Add some actions to the menu for cursor debugging. GraphicsView based launcher only. * QGVLauncher/main.cpp: (MainView::setWaitCursor): (MainView::resetCursor): (MainView::flip): (MainWindow::setWaitCursor): (MainWindow::resetCursor): (MainWindow::buildUI): 2009-10-20 Kenneth Rohde Christiansen Rubberstamped by Adam Barth. Remove clipRenderToViewport as agreed upon in https://bugs.webkit.org/show_bug.cgi?id=29843 * Api/qwebframe.cpp: * Api/qwebframe.h: * Api/qwebframe_p.h: (QWebFramePrivate::QWebFramePrivate): 2009-10-20 Kenneth Rohde Christiansen Reviewed by Adam Barth. Update the tests to test the new render functionality, and take into consideration that render() clips to the frame itself as well as the viewport. QWebFrame::render() now always clips, so the old tests were bogus. Rendering pure contents (no scrollbars etc) without clipping can now be accomplished using QWebFrame::documentElement()->render(...) * Api/qwebframe.cpp: * Api/qwebframe.h: * Api/qwebframe_p.h: (QWebFramePrivate::QWebFramePrivate): * tests/qwebframe/tst_qwebframe.cpp: 2009-10-20 Kenneth Rohde Christiansen Rubberstamped by Adam Barth. As we do not support rendering a QWebFrame without it being clipped the the frame as well as the viewport, we now set the viewport size to the size of the contents. Rendering pure contents (no scrollbars etc) without clipping can be acomplished using QWebFrame::documentElement()->render(...) * tests/qwebelement/tst_qwebelement.cpp: (tst_QWebElement::render): 2009-10-20 Kenneth Rohde Christiansen Reviewed by Tor Arne Vestbø. Add menu item to dump the plugin list to the console, which can be handy for debugging. * QtLauncher/main.cpp: (MainWindow::dumpPlugins): (MainWindow::setupUI): 2009-10-19 Kenneth Rohde Christiansen Reviewed by Tor Arne Vestbø. Introduce new render method on QWebFrame, which supports specifying which layers to render (scrollbars, contents, pan-icon). * Api/qwebframe.cpp: (QWebFramePrivate::renderPrivate): (QWebFrame::render): * Api/qwebframe.h: * Api/qwebframe_p.h: 2009-10-19 Antonio Gomes Reviewed by Ariya Hidayat. [Qt] Infinite loop (leading to crash) when setting cursor in QGraphicsWebView https://bugs.webkit.org/show_bug.cgi?id=30549 Patch reimplements QGraphicsItem's itemChange method, and make CursorChange event to be emitted after cursor has already been set. QWidget::setCursor send the event just after it sets the cursor, then patch makes both behaviors compatible. * Api/qgraphicswebview.cpp: (QGraphicsWebView::itemChange): * Api/qgraphicswebview.h: --- src/3rdparty/webkit/ChangeLog | 42 + src/3rdparty/webkit/JavaScriptCore/ChangeLog | 524 +++ .../webkit/JavaScriptCore/JavaScriptCore.gypi | 1 + .../webkit/JavaScriptCore/JavaScriptCore.pri | 2 + .../JavaScriptCore/assembler/ARMv7Assembler.h | 168 +- .../JavaScriptCore/assembler/MacroAssemblerARM.h | 9 +- .../JavaScriptCore/assembler/MacroAssemblerARMv7.h | 8 +- .../webkit/JavaScriptCore/bytecode/CodeBlock.cpp | 21 +- .../webkit/JavaScriptCore/bytecode/Opcode.h | 1 + .../bytecompiler/BytecodeGenerator.cpp | 13 + .../bytecompiler/BytecodeGenerator.h | 19 + .../JavaScriptCore/interpreter/Interpreter.cpp | 27 + .../JavaScriptCore/jit/ExecutableAllocator.h | 16 + src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp | 2 + src/3rdparty/webkit/JavaScriptCore/jit/JIT.h | 31 +- src/3rdparty/webkit/JavaScriptCore/jit/JITCall.cpp | 2 +- .../webkit/JavaScriptCore/jit/JITInlineMethods.h | 9 +- .../webkit/JavaScriptCore/jit/JITOpcodes.cpp | 7 +- .../JavaScriptCore/jit/JITPropertyAccess.cpp | 148 +- .../webkit/JavaScriptCore/jit/JITStubs.cpp | 78 +- src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h | 6 +- .../webkit/JavaScriptCore/parser/Nodes.cpp | 9 + .../webkit/JavaScriptCore/runtime/Collector.cpp | 12 +- .../JavaScriptCore/runtime/DateConstructor.cpp | 4 +- .../webkit/JavaScriptCore/runtime/DateInstance.cpp | 84 +- .../webkit/JavaScriptCore/runtime/DateInstance.h | 23 +- .../JavaScriptCore/runtime/DateInstanceCache.h | 89 + .../JavaScriptCore/runtime/DatePrototype.cpp | 235 +- .../webkit/JavaScriptCore/runtime/DatePrototype.h | 2 +- .../webkit/JavaScriptCore/runtime/JSCell.h | 1 + .../webkit/JavaScriptCore/runtime/JSFunction.h | 8 +- .../webkit/JavaScriptCore/runtime/JSGlobalData.h | 4 +- .../webkit/JavaScriptCore/runtime/JSObject.h | 4 +- .../runtime/JSPropertyNameIterator.cpp | 7 +- .../runtime/JSPropertyNameIterator.h | 18 +- .../webkit/JavaScriptCore/runtime/Structure.cpp | 9 + .../webkit/JavaScriptCore/runtime/Structure.h | 11 +- .../webkit/JavaScriptCore/wtf/CurrentTime.cpp | 4 + .../webkit/JavaScriptCore/wtf/DateMath.cpp | 11 +- .../webkit/JavaScriptCore/wtf/FastMalloc.h | 14 +- .../webkit/JavaScriptCore/wtf/MessageQueue.h | 17 +- src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h | 13 +- .../webkit/JavaScriptCore/wtf/StdLibExtras.h | 2 + .../webkit/JavaScriptCore/wtf/Threading.cpp | 2 +- src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h | 4 + .../JavaScriptCore/wtf/ThreadingPthreads.cpp | 4 +- .../JavaScriptCore/yarr/RegexInterpreter.cpp | 8 +- .../webkit/JavaScriptCore/yarr/RegexJIT.cpp | 5 +- src/3rdparty/webkit/VERSION | 4 +- src/3rdparty/webkit/WebCore/ChangeLog | 4258 +++++++++++++++++++- src/3rdparty/webkit/WebCore/DerivedSources.cpp | 1 + .../ForwardingHeaders/wtf/DateInstanceCache.h | 4 + src/3rdparty/webkit/WebCore/LICENSE-APPLE | 33 +- src/3rdparty/webkit/WebCore/WebCore.gypi | 35 +- src/3rdparty/webkit/WebCore/WebCore.pro | 35 +- .../accessibility/AccessibilityAllInOne.cpp | 44 + .../accessibility/AccessibilityListBoxOption.h | 1 + .../WebCore/accessibility/AccessibilityObject.h | 14 + .../accessibility/AccessibilityRenderObject.cpp | 42 +- .../accessibility/AccessibilityRenderObject.h | 1 + .../accessibility/qt/AccessibilityObjectQt.cpp | 5 + .../WebCore/bindings/ScriptControllerBase.cpp | 4 + .../WebCore/bindings/js/JSAbstractWorkerCustom.cpp | 4 +- .../WebCore/bindings/js/JSBindingsAllInOne.cpp | 150 + .../webkit/WebCore/bindings/js/JSCallbackData.cpp | 9 +- .../webkit/WebCore/bindings/js/JSCallbackData.h | 3 + .../bindings/js/JSCustomXPathNSResolver.cpp | 2 +- .../bindings/js/JSDOMApplicationCacheCustom.cpp | 4 +- .../webkit/WebCore/bindings/js/JSDOMBinding.cpp | 356 +- .../webkit/WebCore/bindings/js/JSDOMBinding.h | 110 +- .../WebCore/bindings/js/JSDOMGlobalObject.cpp | 29 +- .../webkit/WebCore/bindings/js/JSDOMGlobalObject.h | 8 +- .../webkit/WebCore/bindings/js/JSDOMWindowBase.cpp | 32 +- .../webkit/WebCore/bindings/js/JSDOMWindowBase.h | 5 +- .../WebCore/bindings/js/JSDOMWindowCustom.cpp | 15 +- .../WebCore/bindings/js/JSDOMWindowShell.cpp | 8 +- .../webkit/WebCore/bindings/js/JSDOMWindowShell.h | 2 +- .../bindings/js/JSDesktopNotificationsCustom.cpp | 4 +- .../webkit/WebCore/bindings/js/JSEventListener.cpp | 20 +- .../webkit/WebCore/bindings/js/JSEventListener.h | 7 +- .../WebCore/bindings/js/JSEventSourceCustom.cpp | 4 +- .../webkit/WebCore/bindings/js/JSEventTarget.cpp | 4 +- .../webkit/WebCore/bindings/js/JSExceptionBase.cpp | 128 +- .../webkit/WebCore/bindings/js/JSExceptionBase.h | 86 +- .../WebCore/bindings/js/JSHTMLAllCollection.cpp | 35 - .../WebCore/bindings/js/JSHTMLAllCollection.h | 58 - .../bindings/js/JSHTMLAllCollectionCustom.cpp | 135 + .../WebCore/bindings/js/JSHTMLCollectionCustom.cpp | 2 +- .../WebCore/bindings/js/JSHTMLDocumentCustom.cpp | 5 +- .../bindings/js/JSHTMLFrameSetElementCustom.cpp | 4 +- .../bindings/js/JSInspectorBackendCustom.cpp | 7 +- .../WebCore/bindings/js/JSLazyEventListener.cpp | 6 +- .../WebCore/bindings/js/JSLazyEventListener.h | 6 +- .../WebCore/bindings/js/JSMessageChannelCustom.cpp | 14 +- .../WebCore/bindings/js/JSMessagePortCustom.cpp | 11 +- .../webkit/WebCore/bindings/js/JSNodeCustom.cpp | 10 +- .../WebCore/bindings/js/JSNodeFilterCondition.cpp | 2 +- .../bindings/js/JSQuarantinedObjectWrapper.cpp | 8 +- .../bindings/js/JSSVGElementInstanceCustom.cpp | 4 +- .../WebCore/bindings/js/JSSharedWorkerCustom.cpp | 7 +- .../WebCore/bindings/js/JSWebSocketCustom.cpp | 4 +- .../WebCore/bindings/js/JSWorkerContextCustom.cpp | 8 +- .../WebCore/bindings/js/JSXMLHttpRequestCustom.cpp | 11 +- .../bindings/js/JSXMLHttpRequestUploadCustom.cpp | 11 +- .../webkit/WebCore/bindings/js/ScheduledAction.cpp | 15 +- .../webkit/WebCore/bindings/js/ScheduledAction.h | 9 +- .../WebCore/bindings/js/ScriptCachedFrameData.cpp | 13 +- .../WebCore/bindings/js/ScriptController.cpp | 193 +- .../webkit/WebCore/bindings/js/ScriptController.h | 43 +- .../WebCore/bindings/js/ScriptControllerMac.mm | 2 +- .../WebCore/bindings/js/ScriptEventListener.cpp | 4 +- .../WebCore/bindings/js/ScriptFunctionCall.cpp | 6 +- .../WebCore/bindings/js/ScriptObjectQuarantine.cpp | 6 +- .../webkit/WebCore/bindings/js/ScriptSourceCode.h | 8 + .../webkit/WebCore/bindings/js/ScriptState.cpp | 5 +- .../webkit/WebCore/bindings/js/ScriptState.h | 1 + .../WebCore/bindings/js/WorkerScriptController.cpp | 3 +- .../WebCore/bindings/js/WorkerScriptController.h | 3 + .../WebCore/bindings/scripts/CodeGeneratorJS.pm | 40 +- .../WebCore/bindings/scripts/CodeGeneratorV8.pm | 67 +- src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp | 9 +- .../webkit/WebCore/bridge/jni/jni_jsobject.mm | 5 +- src/3rdparty/webkit/WebCore/bridge/npapi.h | 25 +- .../webkit/WebCore/bridge/qt/qt_runtime.cpp | 6 +- .../WebCore/css/CSSComputedStyleDeclaration.cpp | 49 +- .../WebCore/css/CSSComputedStyleDeclaration.h | 3 + src/3rdparty/webkit/WebCore/css/CSSParser.cpp | 48 +- src/3rdparty/webkit/WebCore/css/CSSParser.h | 2 +- src/3rdparty/webkit/WebCore/css/CSSParserValues.h | 2 +- .../webkit/WebCore/css/CSSPrimitiveValueMappings.h | 5 +- src/3rdparty/webkit/WebCore/css/CSSProperty.h | 2 +- .../webkit/WebCore/css/CSSPropertyNames.in | 4 + .../webkit/WebCore/css/CSSStyleSelector.cpp | 1 + .../WebCore/css/SVGCSSComputedStyleDeclaration.cpp | 2 + src/3rdparty/webkit/WebCore/css/SVGCSSParser.cpp | 5 + .../webkit/WebCore/css/SVGCSSPropertyNames.in | 2 + .../webkit/WebCore/css/SVGCSSStyleSelector.cpp | 30 + src/3rdparty/webkit/WebCore/dom/Document.cpp | 19 +- src/3rdparty/webkit/WebCore/dom/Document.h | 17 +- src/3rdparty/webkit/WebCore/dom/Element.cpp | 2 +- src/3rdparty/webkit/WebCore/dom/EventTarget.cpp | 35 +- src/3rdparty/webkit/WebCore/dom/EventTarget.h | 20 +- .../webkit/WebCore/dom/HTMLAllCollection.idl | 40 - .../webkit/WebCore/dom/ScriptExecutionContext.cpp | 20 + .../webkit/WebCore/dom/ScriptExecutionContext.h | 4 + src/3rdparty/webkit/WebCore/dom/SelectElement.cpp | 22 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp | 49 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h | 7 +- .../webkit/WebCore/dom/XMLTokenizerLibxml2.cpp | 26 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp | 25 +- .../webkit/WebCore/editing/ApplyStyleCommand.cpp | 36 +- .../WebCore/editing/CompositeEditCommand.cpp | 177 +- .../webkit/WebCore/editing/CompositeEditCommand.h | 3 + .../webkit/WebCore/editing/EditorCommand.cpp | 4 +- .../WebCore/editing/IndentOutdentCommand.cpp | 63 +- .../webkit/WebCore/editing/IndentOutdentCommand.h | 1 - .../WebCore/editing/ReplaceNodeWithSpanCommand.cpp | 4 +- .../webkit/WebCore/editing/SelectionController.cpp | 2 + .../webkit/WebCore/generated/CSSPropertyNames.cpp | 428 +- .../webkit/WebCore/generated/CSSPropertyNames.h | 256 +- .../webkit/WebCore/generated/JSAbstractWorker.cpp | 4 +- .../webkit/WebCore/generated/JSBarInfo.cpp | 2 +- .../webkit/WebCore/generated/JSCSSRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSRuleList.cpp | 2 +- .../WebCore/generated/JSCSSStyleDeclaration.cpp | 2 +- .../webkit/WebCore/generated/JSCSSValue.cpp | 2 +- .../generated/JSCSSVariablesDeclaration.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasArray.cpp | 2 +- .../WebCore/generated/JSCanvasArrayBuffer.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasGradient.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasPattern.cpp | 2 +- .../WebCore/generated/JSCanvasRenderingContext.cpp | 2 +- .../webkit/WebCore/generated/JSClientRect.cpp | 2 +- .../webkit/WebCore/generated/JSClientRectList.cpp | 2 +- .../webkit/WebCore/generated/JSClipboard.cpp | 2 +- .../webkit/WebCore/generated/JSConsole.cpp | 2 +- .../webkit/WebCore/generated/JSCoordinates.cpp | 2 +- .../webkit/WebCore/generated/JSCounter.cpp | 2 +- .../WebCore/generated/JSDOMApplicationCache.cpp | 18 +- .../WebCore/generated/JSDOMCoreException.cpp | 2 +- .../WebCore/generated/JSDOMImplementation.cpp | 2 +- .../webkit/WebCore/generated/JSDOMParser.cpp | 2 +- .../webkit/WebCore/generated/JSDOMSelection.cpp | 2 +- .../webkit/WebCore/generated/JSDOMWindow.cpp | 21 +- .../webkit/WebCore/generated/JSDOMWindow.h | 2 + .../webkit/WebCore/generated/JSDataGridColumn.cpp | 2 +- .../WebCore/generated/JSDataGridColumnList.cpp | 2 +- .../webkit/WebCore/generated/JSDatabase.cpp | 2 +- .../webkit/WebCore/generated/JSDocument.cpp | 80 +- .../webkit/WebCore/generated/JSElement.cpp | 78 +- src/3rdparty/webkit/WebCore/generated/JSEvent.cpp | 2 +- .../webkit/WebCore/generated/JSEventException.cpp | 2 +- .../webkit/WebCore/generated/JSEventSource.cpp | 8 +- src/3rdparty/webkit/WebCore/generated/JSFile.cpp | 2 +- .../webkit/WebCore/generated/JSFileList.cpp | 2 +- .../webkit/WebCore/generated/JSGeolocation.cpp | 2 +- .../webkit/WebCore/generated/JSGeoposition.cpp | 2 +- .../WebCore/generated/JSHTMLAllCollection.cpp | 292 ++ .../webkit/WebCore/generated/JSHTMLAllCollection.h | 104 + .../webkit/WebCore/generated/JSHTMLBodyElement.cpp | 16 +- .../webkit/WebCore/generated/JSHTMLCollection.cpp | 24 +- .../webkit/WebCore/generated/JSHTMLCollection.h | 1 - .../WebCore/generated/JSHTMLFrameSetElement.cpp | 16 +- .../webkit/WebCore/generated/JSHistory.cpp | 2 +- .../webkit/WebCore/generated/JSImageData.cpp | 2 +- .../WebCore/generated/JSInspectorBackend.cpp | 2 +- .../WebCore/generated/JSJavaScriptCallFrame.cpp | 2 +- .../webkit/WebCore/generated/JSLocation.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSMedia.cpp | 2 +- .../webkit/WebCore/generated/JSMediaError.cpp | 2 +- .../webkit/WebCore/generated/JSMediaList.cpp | 2 +- .../webkit/WebCore/generated/JSMessageChannel.cpp | 2 +- .../webkit/WebCore/generated/JSMessagePort.cpp | 4 +- .../webkit/WebCore/generated/JSMimeType.cpp | 2 +- .../webkit/WebCore/generated/JSMimeTypeArray.cpp | 2 +- .../webkit/WebCore/generated/JSNamedNodeMap.cpp | 2 +- .../webkit/WebCore/generated/JSNavigator.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSNode.cpp | 2 +- .../webkit/WebCore/generated/JSNodeFilter.cpp | 2 +- .../webkit/WebCore/generated/JSNodeIterator.cpp | 2 +- .../webkit/WebCore/generated/JSNodeList.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp | 2 +- .../webkit/WebCore/generated/JSPluginArray.cpp | 2 +- .../webkit/WebCore/generated/JSPositionError.cpp | 2 +- .../webkit/WebCore/generated/JSRGBColor.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSRange.cpp | 2 +- .../webkit/WebCore/generated/JSRangeException.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSRect.cpp | 2 +- .../webkit/WebCore/generated/JSSQLError.cpp | 2 +- .../webkit/WebCore/generated/JSSQLResultSet.cpp | 2 +- .../WebCore/generated/JSSQLResultSetRowList.cpp | 2 +- .../webkit/WebCore/generated/JSSQLTransaction.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAngle.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedAngle.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedBoolean.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedEnumeration.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedInteger.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedLength.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedLengthList.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedNumber.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedNumberList.cpp | 2 +- .../generated/JSSVGAnimatedPreserveAspectRatio.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAnimatedRect.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedString.cpp | 2 +- .../generated/JSSVGAnimatedTransformList.cpp | 2 +- .../WebCore/generated/JSSVGElementInstance.cpp | 82 +- .../WebCore/generated/JSSVGElementInstanceList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGException.cpp | 2 +- .../webkit/WebCore/generated/JSSVGLength.cpp | 2 +- .../webkit/WebCore/generated/JSSVGLengthList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGMatrix.cpp | 2 +- .../webkit/WebCore/generated/JSSVGNumber.cpp | 2 +- .../webkit/WebCore/generated/JSSVGNumberList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathSeg.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathSegList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPoint.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPointList.cpp | 2 +- .../WebCore/generated/JSSVGPreserveAspectRatio.cpp | 2 +- .../webkit/WebCore/generated/JSSVGRect.cpp | 2 +- .../WebCore/generated/JSSVGRenderingIntent.cpp | 2 +- .../webkit/WebCore/generated/JSSVGStringList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGTransform.cpp | 2 +- .../WebCore/generated/JSSVGTransformList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGUnitTypes.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSScreen.cpp | 2 +- .../webkit/WebCore/generated/JSStorage.cpp | 2 +- .../webkit/WebCore/generated/JSStyleSheet.cpp | 2 +- .../webkit/WebCore/generated/JSStyleSheetList.cpp | 2 +- .../webkit/WebCore/generated/JSTextMetrics.cpp | 2 +- .../webkit/WebCore/generated/JSTimeRanges.cpp | 2 +- .../webkit/WebCore/generated/JSTreeWalker.cpp | 2 +- .../webkit/WebCore/generated/JSValidityState.cpp | 2 +- .../webkit/WebCore/generated/JSVoidCallback.cpp | 2 +- .../webkit/WebCore/generated/JSWebKitCSSMatrix.cpp | 2 +- .../webkit/WebCore/generated/JSWebKitPoint.cpp | 2 +- .../webkit/WebCore/generated/JSWebSocket.cpp | 8 +- src/3rdparty/webkit/WebCore/generated/JSWorker.cpp | 2 +- .../webkit/WebCore/generated/JSWorkerContext.cpp | 1 - .../webkit/WebCore/generated/JSWorkerLocation.cpp | 2 +- .../webkit/WebCore/generated/JSWorkerNavigator.cpp | 2 +- .../webkit/WebCore/generated/JSXMLHttpRequest.cpp | 14 +- .../generated/JSXMLHttpRequestException.cpp | 2 +- .../WebCore/generated/JSXMLHttpRequestUpload.cpp | 12 +- .../webkit/WebCore/generated/JSXMLSerializer.cpp | 2 +- .../webkit/WebCore/generated/JSXPathEvaluator.cpp | 2 +- .../webkit/WebCore/generated/JSXPathException.cpp | 2 +- .../webkit/WebCore/generated/JSXPathExpression.cpp | 2 +- .../webkit/WebCore/generated/JSXPathNSResolver.cpp | 2 +- .../webkit/WebCore/generated/JSXPathResult.cpp | 2 +- .../webkit/WebCore/generated/JSXSLTProcessor.cpp | 2 +- .../webkit/WebCore/generated/WebKitVersion.h | 2 +- .../webkit/WebCore/history/qt/HistoryItemQt.cpp | 17 +- .../webkit/WebCore/html/HTMLAllCollection.cpp | 47 + .../webkit/WebCore/html/HTMLAllCollection.h | 44 + .../webkit/WebCore/html/HTMLAllCollection.idl | 43 + .../webkit/WebCore/html/HTMLCanvasElement.cpp | 9 +- src/3rdparty/webkit/WebCore/html/HTMLCollection.h | 3 +- .../webkit/WebCore/html/HTMLCollection.idl | 3 +- src/3rdparty/webkit/WebCore/html/HTMLDocument.idl | 2 +- .../webkit/WebCore/html/HTMLInputElement.cpp | 26 +- .../webkit/WebCore/html/HTMLInputElement.h | 2 + .../webkit/WebCore/html/HTMLMediaElement.cpp | 11 +- .../webkit/WebCore/html/HTMLMediaElement.h | 1 - .../webkit/WebCore/html/HTMLOptionsCollection.idl | 7 +- src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp | 21 +- .../WebCore/html/canvas/CanvasRenderingContext.h | 3 +- .../html/canvas/CanvasRenderingContext2D.cpp | 80 +- .../html/canvas/CanvasRenderingContext3D.cpp | 359 +- .../WebCore/html/canvas/CanvasRenderingContext3D.h | 13 +- .../webkit/WebCore/inspector/ConsoleMessage.cpp | 7 +- .../webkit/WebCore/inspector/ConsoleMessage.h | 1 + .../WebCore/inspector/DOMDispatchTimelineItem.cpp | 58 - .../WebCore/inspector/DOMDispatchTimelineItem.h | 58 - .../WebCore/inspector/InspectorController.cpp | 47 +- .../webkit/WebCore/inspector/InspectorController.h | 3 +- .../webkit/WebCore/inspector/InspectorDOMAgent.h | 5 + .../webkit/WebCore/inspector/InspectorFrontend.cpp | 17 +- .../webkit/WebCore/inspector/InspectorFrontend.h | 5 +- .../webkit/WebCore/inspector/InspectorResource.cpp | 20 +- .../webkit/WebCore/inspector/InspectorResource.h | 2 + .../WebCore/inspector/InspectorTimelineAgent.cpp | 126 +- .../WebCore/inspector/InspectorTimelineAgent.h | 70 +- .../WebCore/inspector/JavaScriptCallFrame.cpp | 3 +- .../webkit/WebCore/inspector/TimelineItem.cpp | 81 - .../webkit/WebCore/inspector/TimelineItem.h | 88 - .../WebCore/inspector/TimelineRecordFactory.cpp | 116 + .../WebCore/inspector/TimelineRecordFactory.h | 63 + .../inspector/front-end/AbstractTimelinePanel.js | 548 +++ .../front-end/BottomUpProfileDataGridTree.js | 214 +- .../webkit/WebCore/inspector/front-end/Color.js | 8 +- .../WebCore/inspector/front-end/ConsoleView.js | 183 +- .../inspector/front-end/DatabaseQueryView.js | 7 +- .../WebCore/inspector/front-end/ElementsPanel.js | 7 +- .../inspector/front-end/ElementsTreeOutline.js | 26 +- .../front-end/EventListenersSidebarPane.js | 11 +- .../inspector/front-end/Images/timelineBarBlue.png | Bin 0 -> 419 bytes .../inspector/front-end/Images/timelineBarGray.png | Bin 0 -> 378 bytes .../front-end/Images/timelineBarGreen.png | Bin 0 -> 414 bytes .../front-end/Images/timelineBarOrange.png | Bin 0 -> 394 bytes .../front-end/Images/timelineBarPurple.png | Bin 0 -> 420 bytes .../inspector/front-end/Images/timelineBarRed.png | Bin 0 -> 408 bytes .../front-end/Images/timelineBarYellow.png | Bin 0 -> 400 bytes .../front-end/Images/timelineCheckmarks.png | Bin 0 -> 3528 bytes .../inspector/front-end/Images/timelineDots.png | Bin 0 -> 2436 bytes .../inspector/front-end/Images/timelineIcon.png | Bin 0 -> 4419 bytes .../WebCore/inspector/front-end/InjectedScript.js | 60 +- .../inspector/front-end/InspectorControllerStub.js | 291 ++ .../webkit/WebCore/inspector/front-end/Panel.js | 99 + .../inspector/front-end/ProfileDataGridTree.js | 36 +- .../WebCore/inspector/front-end/ProfileView.js | 23 +- .../WebCore/inspector/front-end/ProfilesPanel.js | 91 +- .../inspector/front-end/ResourceCategory.js | 11 +- .../WebCore/inspector/front-end/ResourceView.js | 2 +- .../WebCore/inspector/front-end/ResourcesPanel.js | 647 +-- .../WebCore/inspector/front-end/SourceFrame.js | 459 ++- .../WebCore/inspector/front-end/StoragePanel.js | 68 +- .../inspector/front-end/StylesSidebarPane.js | 15 +- .../WebCore/inspector/front-end/SummaryBar.js | 3 +- .../WebCore/inspector/front-end/TestController.js | 10 + .../WebCore/inspector/front-end/TimelineAgent.js | 29 +- .../WebCore/inspector/front-end/TimelinePanel.js | 362 ++ .../front-end/TopDownProfileDataGridTree.js | 9 +- .../webkit/WebCore/inspector/front-end/WebKit.qrc | 2 + .../WebCore/inspector/front-end/inspector.css | 224 +- .../WebCore/inspector/front-end/inspector.html | 7 +- .../WebCore/inspector/front-end/inspector.js | 96 +- .../WebCore/inspector/front-end/utilities.js | 5 + src/3rdparty/webkit/WebCore/loader/Cache.cpp | 6 + .../webkit/WebCore/loader/CachedResource.cpp | 6 + src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp | 52 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.h | 5 + .../webkit/WebCore/loader/RedirectScheduler.cpp | 13 +- .../webkit/WebCore/loader/ResourceLoadNotifier.h | 7 +- .../webkit/WebCore/loader/icon/IconDatabase.cpp | 4 +- .../WebCore/notifications/NotificationCenter.cpp | 14 + .../WebCore/notifications/NotificationCenter.h | 6 +- src/3rdparty/webkit/WebCore/page/Console.cpp | 4 +- src/3rdparty/webkit/WebCore/page/Console.h | 3 +- src/3rdparty/webkit/WebCore/page/DOMTimer.cpp | 27 + src/3rdparty/webkit/WebCore/page/DOMTimer.h | 1 + src/3rdparty/webkit/WebCore/page/DOMWindow.idl | 9 +- src/3rdparty/webkit/WebCore/page/Geolocation.cpp | 128 +- src/3rdparty/webkit/WebCore/page/Geolocation.h | 25 +- src/3rdparty/webkit/WebCore/page/SecurityOrigin.h | 5 +- .../WebCore/page/android/EventHandlerAndroid.cpp | 8 +- .../WebCore/page/animation/AnimationBase.cpp | 2 + src/3rdparty/webkit/WebCore/platform/FileSystem.h | 64 +- .../webkit/WebCore/platform/SSLKeyGenerator.h | 9 +- .../WebCore/platform/android/ClipboardAndroid.h | 44 +- .../WebCore/platform/android/CursorAndroid.cpp | 7 +- .../platform/android/FileChooserAndroid.cpp | 5 +- .../WebCore/platform/android/FileSystemAndroid.cpp | 10 +- .../WebCore/platform/android/KeyEventAndroid.cpp | 288 +- .../WebCore/platform/android/ScreenAndroid.cpp | 32 +- .../platform/android/TemporaryLinkStubs.cpp | 33 +- .../webkit/WebCore/platform/graphics/BitmapImage.h | 4 +- .../WebCore/platform/graphics/GraphicsContext3D.h | 8 +- .../WebCore/platform/graphics/GraphicsLayer.cpp | 6 - .../WebCore/platform/graphics/GraphicsLayer.h | 8 - .../platform/graphics/filters/FEColorMatrix.cpp | 5 +- .../graphics/filters/FEComponentTransfer.cpp | 10 +- .../platform/graphics/filters/FEGaussianBlur.cpp | 9 +- .../WebCore/platform/graphics/qt/ImageQt.cpp | 39 + .../webkit/WebCore/platform/network/Credential.cpp | 3 +- .../webkit/WebCore/platform/network/Credential.h | 2 +- .../WebCore/platform/network/FormDataBuilder.cpp | 38 +- .../platform/network/ResourceRequestBase.cpp | 22 +- .../WebCore/platform/network/ResourceRequestBase.h | 4 +- .../platform/network/qt/QNetworkReplyHandler.cpp | 3 +- .../webkit/WebCore/platform/qt/CursorQt.cpp | 18 +- .../webkit/WebCore/platform/qt/WheelEventQt.cpp | 4 +- .../webkit/WebCore/platform/text/String.cpp | 4 +- .../webkit/WebCore/platform/win/BitmapInfo.cpp | 66 + .../webkit/WebCore/platform/win/BitmapInfo.h | 43 + .../webkit/WebCore/plugins/PluginDatabase.cpp | 4 +- .../webkit/WebCore/plugins/PluginPackage.cpp | 11 +- src/3rdparty/webkit/WebCore/plugins/PluginView.cpp | 2 +- src/3rdparty/webkit/WebCore/plugins/PluginView.h | 8 +- .../webkit/WebCore/plugins/qt/PluginViewQt.cpp | 33 +- .../WebCore/plugins/win/PluginPackageWin.cpp | 11 - .../webkit/WebCore/plugins/win/PluginViewWin.cpp | 128 +- .../webkit/WebCore/rendering/HitTestResult.cpp | 13 +- .../webkit/WebCore/rendering/HitTestResult.h | 1 - .../WebCore/rendering/MediaControlElements.cpp | 9 + .../WebCore/rendering/MediaControlElements.h | 1 + src/3rdparty/webkit/WebCore/rendering/RenderBox.h | 2 +- .../webkit/WebCore/rendering/RenderInline.cpp | 87 + .../webkit/WebCore/rendering/RenderInline.h | 5 + .../webkit/WebCore/rendering/RenderMedia.cpp | 1 + .../rendering/RenderMediaControlsChromium.cpp | 23 +- .../WebCore/rendering/RenderThemeChromiumWin.cpp | 51 +- .../WebCore/rendering/RenderThemeChromiumWin.h | 2 +- .../webkit/WebCore/rendering/RenderTreeAsText.cpp | 28 + .../webkit/WebCore/rendering/RenderTreeAsText.h | 17 +- .../webkit/WebCore/rendering/SVGRenderSupport.cpp | 3 + .../WebCore/rendering/style/SVGRenderStyle.cpp | 5 +- .../WebCore/rendering/style/SVGRenderStyle.h | 4 + .../WebCore/rendering/style/SVGRenderStyleDefs.cpp | 19 + .../WebCore/rendering/style/SVGRenderStyleDefs.h | 28 + src/3rdparty/webkit/WebCore/storage/Database.cpp | 57 +- src/3rdparty/webkit/WebCore/storage/Database.h | 15 +- .../webkit/WebCore/storage/DatabaseThread.cpp | 22 +- .../webkit/WebCore/storage/DatabaseTracker.cpp | 23 +- .../webkit/WebCore/storage/DatabaseTracker.h | 2 + .../webkit/WebCore/storage/OriginQuotaManager.cpp | 3 +- .../webkit/WebCore/storage/SQLTransaction.cpp | 1 - .../WebCore/storage/SQLTransactionClient.cpp | 8 +- .../WebCore/storage/StorageEventDispatcher.cpp | 4 +- .../webkit/WebCore/svg/SVGStyledElement.cpp | 15 +- .../svg/SynchronizablePropertyController.cpp | 128 +- .../WebCore/svg/SynchronizablePropertyController.h | 68 +- .../webkit/WebCore/websockets/WebSocket.cpp | 10 +- .../webkit/WebCore/websockets/WebSocketChannel.cpp | 31 +- .../webkit/WebCore/websockets/WebSocketChannel.h | 4 +- .../webkit/WebCore/workers/WorkerContext.cpp | 1 + .../webkit/WebCore/workers/WorkerContext.idl | 2 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp | 33 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h | 2 +- src/3rdparty/webkit/WebCore/xml/XPathFunctions.cpp | 9 +- src/3rdparty/webkit/WebKit.pri | 4 + src/3rdparty/webkit/WebKit/ChangeLog | 16 + src/3rdparty/webkit/WebKit/LICENSE | 22 +- .../WebKit/mac/Configurations/Version.xcconfig | 3 +- .../webkit/WebKit/qt/Api/qgraphicswebview.cpp | 122 +- .../webkit/WebKit/qt/Api/qgraphicswebview.h | 1 + src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp | 414 +- src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h | 76 +- src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 119 +- src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h | 19 +- src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h | 4 +- src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp | 149 +- src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.h | 15 - src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 58 +- src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h | 5 + .../webkit/WebKit/qt/Api/qwebsecurityorigin.cpp | 28 +- .../webkit/WebKit/qt/Api/qwebsecurityorigin.h | 2 - src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 109 +- src/3rdparty/webkit/WebKit/qt/Api/qwebview.h | 5 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 481 +++ .../qt/tests/benchmarks/loading/tst_loading.pro | 5 +- .../qt/tests/benchmarks/painting/tst_painting.pro | 5 +- .../qt/tests/qgraphicswebview/qgraphicswebview.pro | 4 + .../WebKit/qt/tests/qwebelement/qwebelement.pro | 5 +- .../qt/tests/qwebelement/tst_qwebelement.cpp | 91 +- .../webkit/WebKit/qt/tests/qwebframe/qwebframe.pro | 5 +- .../WebKit/qt/tests/qwebframe/resources/image2.png | Bin 0 -> 14743 bytes .../WebKit/qt/tests/qwebframe/tst_qwebframe.cpp | 47 +- .../WebKit/qt/tests/qwebhistory/qwebhistory.pro | 5 +- .../qt/tests/qwebhistory/tst_qwebhistory.cpp | 80 +- .../qwebhistoryinterface/qwebhistoryinterface.pro | 5 +- .../webkit/WebKit/qt/tests/qwebpage/qwebpage.pro | 5 +- .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 2 +- .../qwebplugindatabase/qwebplugindatabase.pro | 5 +- .../webkit/WebKit/qt/tests/qwebview/qwebview.pro | 5 +- .../WebKit/qt/tests/qwebview/tst_qwebview.cpp | 64 - 495 files changed, 14556 insertions(+), 4934 deletions(-) create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/DateInstanceCache.h create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/DateInstanceCache.h create mode 100755 src/3rdparty/webkit/WebCore/accessibility/AccessibilityAllInOne.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSBindingsAllInOne.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollection.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollection.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/dom/HTMLAllCollection.idl create mode 100644 src/3rdparty/webkit/WebCore/generated/JSHTMLAllCollection.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSHTMLAllCollection.h create mode 100644 src/3rdparty/webkit/WebCore/html/HTMLAllCollection.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/HTMLAllCollection.h create mode 100644 src/3rdparty/webkit/WebCore/html/HTMLAllCollection.idl delete mode 100644 src/3rdparty/webkit/WebCore/inspector/DOMDispatchTimelineItem.cpp delete mode 100644 src/3rdparty/webkit/WebCore/inspector/DOMDispatchTimelineItem.h delete mode 100644 src/3rdparty/webkit/WebCore/inspector/TimelineItem.cpp delete mode 100644 src/3rdparty/webkit/WebCore/inspector/TimelineItem.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/TimelineRecordFactory.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/TimelineRecordFactory.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/AbstractTimelinePanel.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineBarBlue.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineBarGray.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineBarGreen.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineBarOrange.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineBarPurple.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineBarRed.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineBarYellow.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineCheckmarks.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineDots.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineIcon.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/InspectorControllerStub.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/TimelinePanel.js create mode 100644 src/3rdparty/webkit/WebCore/platform/win/BitmapInfo.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/win/BitmapInfo.h create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image2.png diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index fb7dddf..dc43e0e 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,45 @@ +2009-10-26 Holger Hans Peter Freyther + + Rubber-stamped by Darin Adler. + + Export fastMalloc, fastCalloc, fastRealloc and fastFree + https://bugs.webkit.org/show_bug.cgi?id=30769 + + Export the FastMalloc functions outside of the libwebkit library + to be able to instrument memory allocations. These are C++ symbols + but do not require the C++ runtime to be useful and should be of + no harm to plain C code. + + * autotools/symbols.filter: + +2009-10-26 Gustavo Noronha Silva + + Reviewed by Jan Alonzo. + + Alternative solution to regression introduced in r48672. + + * GNUmakefile.am: + +2009-10-26 Xan Lopez + + Reviewed by Gustavo Noronha. + + Update for 1.1.16 release. + + * configure.ac: + +2009-10-24 Laszlo Gombos + + Reviewed by Holger Freyther. + + [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian + https://bugs.webkit.org/show_bug.cgi?id=30476 + + Set the stack size to 80 Kb and heap size to the 128kB - 32MB range + to all executables linking against WebKit library. + + * WebKit.pri: + 2009-10-18 Jan Michael Alonzo Reviewed by Holger Freyther. diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index 8d6c2df..e6ab073 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,527 @@ +2009-10-29 Gabor Loki + + Reviewed by Gavin Barraclough. + + Add cacheFlush support for Thumb-2 on Linux + https://bugs.webkit.org/show_bug.cgi?id=30865 + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2009-10-28 Gavin Barraclough + + Reviewed by Oliver Hunt. + + JSC JIT on ARMv7 cannot link jumps >16Mb range + https://bugs.webkit.org/show_bug.cgi?id=30891 + + Start planing all relative jumps as move-32-bit-immediate-to-register-BX. + In the cases where the jump would fall within a relative jump range, use a relative jump. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::~ARMv7Assembler): + (JSC::ARMv7Assembler::LinkRecord::LinkRecord): + (JSC::ARMv7Assembler::): + (JSC::ARMv7Assembler::executableCopy): + (JSC::ARMv7Assembler::linkJump): + (JSC::ARMv7Assembler::relinkJump): + (JSC::ARMv7Assembler::setInt32): + (JSC::ARMv7Assembler::isB): + (JSC::ARMv7Assembler::isBX): + (JSC::ARMv7Assembler::isMOV_imm_T3): + (JSC::ARMv7Assembler::isMOVT): + (JSC::ARMv7Assembler::isNOP_T1): + (JSC::ARMv7Assembler::isNOP_T2): + (JSC::ARMv7Assembler::linkJumpAbsolute): + (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst): + (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond): + (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::makeJump): + (JSC::MacroAssemblerARMv7::makeBranch): + * jit/JIT.h: + * wtf/Platform.h: + +2009-10-28 Oliver Hunt + + Reviewed by Geoff Garen. + + Improve for..in enumeration performance + https://bugs.webkit.org/show_bug.cgi?id=30887 + + Improve indexing of an object with a for..in iterator by + identifying cases where get_by_val is being used with a iterator + as the subscript and replace it with a new get_by_pname + bytecode. get_by_pname then optimizes lookups that directly access + the base object. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitGetByVal): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::pushOptimisedForIn): + (JSC::BytecodeGenerator::popOptimisedForIn): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::emit_op_get_by_pname): + (JSC::JIT::emitSlow_op_get_by_pname): + * parser/Nodes.cpp: + (JSC::ForInNode::emitBytecode): + * runtime/JSObject.h: + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::create): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::getOffset): + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): + * runtime/JSValue.h: + (JSC::JSValue::): + * runtime/Structure.cpp: + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::addAnonymousSlotsTransition): + (JSC::Structure::getterSetterTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::addPropertyWithoutTransition): + Track the existence (or not) of non-enumerable properties. + * runtime/Structure.h: + (JSC::Structure::propertyStorageCapacity): + (JSC::Structure::propertyStorageSize): + (JSC::Structure::hasNonEnumerableProperties): + (JSC::Structure::hasAnonymousSlots): + +2009-10-28 Dmitry Titov + + Not reviewed, attemp to fix Windows build. + + Touch the cpp file to cause recompile. + + * wtf/Threading.cpp: + (WTF::threadEntryPoint): + +2009-10-28 Dmitry Titov + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=30805 + Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue. + Existing Database tests cover this since Database removes tasks when it is stopped. + + * wtf/MessageQueue.h: + (WTF::::removeIf): + +2009-10-28 Afonso R. Costa Jr. + + Reviewed by Oliver Hunt. + + [Qt] Enable YARR when YARR_JIT is enabled + https://bugs.webkit.org/show_bug.cgi?id=30730 + + When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should + be toggled also. + + * JavaScriptCore.pri: + +2009-10-24 Martin Robinson + + Reviewed by Oliver Hunt. + + Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast. + + strict-aliasing warnings in JSFunction.h + https://bugs.webkit.org/show_bug.cgi?id=27869 + + * runtime/JSFunction.h: + (JSC::JSFunction::nativeFunction): + (JSC::JSFunction::scopeChain): + (JSC::JSFunction::setScopeChain): + (JSC::JSFunction::setNativeFunction): + +2009-10-28 Jan-Arve Sæther + + Reviewed by Tor Arne Vestbø. + + Build-fix for 64-bit Windows + + * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64 + +2009-10-28 Gavin Barraclough + + Reviewed by NOBODY (build fix!). + + * jit/JIT.h: + +2009-10-26 Holger Hans Peter Freyther + + Rubber-stamped by Darin Adler. + + Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix + https://bugs.webkit.org/show_bug.cgi?id=30769 + + When using -fvisibility=hidden to hide all internal symbols by default + the malloc symbols will be hidden as well. For memory instrumentation + it is needed to provide an instrumented version of these symbols and + override the normal routines and by changing the visibility back to + default this becomes possible. + + The only other solution would be to use system malloc instead of the + TCmalloc implementation but this will not allow to analyze memory + behavior with the default allocator. + + * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin + +2009-10-27 Gavin Barraclough + + Rubber Stamped by Samuel Q. Weinig. + + Make the asserts protecting the offsets in the JIT more descriptive. + + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_method_check): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::emit_op_put_by_id): + +2009-10-27 Geoffrey Garen + + Reviewed by Sam Weinig. + + A little bit of refactoring in the date code. + + * JavaScriptCore.exp: Don't export this unused symbol. + + * runtime/DateConstructor.cpp: + (JSC::constructDate): + + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DateInstance.h: Removed some unused functions. Changed the default + constructor to ensure that a DateInstance is always initialized. + + * runtime/DatePrototype.cpp: + (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor, + since it now requires one. + + * wtf/DateMath.cpp: + (WTF::msToGregorianDateTime): Only compute our offset from UTC if our + output will require it. Otherwise, our offset is 0. + +2009-10-27 Geoffrey Garen + + Build fix: Mark DateInstaceCache.h private, so other frameworks can see it. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-10-27 Geoffrey Garen + + Build fix: re-readded this file. + + * runtime/DateInstanceCache.h: Added. + (JSC::DateInstanceData::create): + (JSC::DateInstanceData::DateInstanceData): + (JSC::DateInstanceCache::DateInstanceCache): + (JSC::DateInstanceCache::add): + (JSC::DateInstanceCache::lookup): + +2009-10-27 Geoffrey Garen + + Reviewed by Darin Adler and Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=30800 + Cache recently computed date data. + + SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: Added new file. + + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + (JSC::DateInstance::getGregorianDateTime): Use the shared cache. + + * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion + of a "cache cache". + + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they + can access the DateInstanceCache. + + * runtime/JSGlobalData.h: Keep a DateInstanceCache. + +2009-10-27 James Robinson + + Reviewed by Darin Fisher. + + Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds. + + Chromium uses a different method to calculate the current time than is used in + JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time + function are mixed. In particular, timers can get scheduled in the past which leads to 100% CPU use. + See http://code.google.com/p/chromium/issues/detail?id=25892 for an example. + + https://bugs.webkit.org/show_bug.cgi?id=30833 + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + * wtf/CurrentTime.cpp: + +2009-10-27 Peter Varga + + Rubber-stamped by Tor Arne Vestbø. + + Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to + alternative. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction): + (JSC::Yarr::ByteCompiler::alternativeDisjunction): + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): + +2009-10-26 Laszlo Gombos + + Reviewed by Darin Adler. + + Make .rc files compile on Windows without depending on MFC headers + https://bugs.webkit.org/show_bug.cgi?id=30750 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use + winresrc.h because it exists even when MFC is not installed, and is + all that's needed here. + +2009-10-26 Gabor Loki + + Reviewed by Gavin Barraclough. + + The thunkReturnAddress is on JITStackFrame on ARM JIT as well + https://bugs.webkit.org/show_bug.cgi?id=30782 + + Move the thunkReturnAddress from top of the stack into the JITStackFrame + structure. This is a requirement for JSValue32_64 support on ARM. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::ret): Return with link register + (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register + * jit/JIT.h: Remove unused ctiReturnRegister + * jit/JITInlineMethods.h: Same as ARMv7 + (JSC::JIT::restoreArgumentReference): Ditto. + (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto. + * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction + * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use + small trampoline functions which handle return addresses for each + CTI_STUB_FUNCTION. + * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame + (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction + +2009-10-26 Steve Block + + Reviewed by Darin Adler. + + Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock. + https://bugs.webkit.org/show_bug.cgi?id=30713 + + * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads. + * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined. + * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined. + +2009-10-24 Laszlo Gombos + + Reviewed by Holger Freyther. + + [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian + https://bugs.webkit.org/show_bug.cgi?id=30476 + + Assign ReadUserData WriteUserData NetworkServices Symbian capabilities + to jsc.exe. + + * jsc.pro: + +2009-10-23 Steve Block + + Reviewed by Dmitry Titov. + + Fixes a leak in createThreadInternal on Android. + https://bugs.webkit.org/show_bug.cgi?id=30698 + + * wtf/ThreadingPthreads.cpp: Modified. + (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure. + +2009-10-22 Geoffrey Garen + + Reviewed by Alexey Proskuryakov. + + Fixed ASSERT when opening Safari's Caches window while the Web Inspector + is open. + + * runtime/Collector.cpp: + (JSC::typeName): Added two new types to the type name list in the Collector. + These types have been around for a while, but nobody remembered to consider them here. + + * runtime/JSCell.h: + (JSC::JSCell::isPropertyNameIterator): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector + a way to tell if a cell is a JSPropertyNameIterator. + +2009-10-22 Steve Falkenburg + + Reviewed by Jon Honeycutt. + + https://bugs.webkit.org/show_bug.cgi?id=30686 + Remove debug-specific def file. + Only Debug_All target uses JavaScriptCore_debug.dll naming, and since + that target is only used internally, maintaining two files just to + suppress a single link warning isn't worthwhile. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed. + +2009-10-21 Jon Honeycutt + + Screenshots of off-screen plug-ins are blank + After halting a transparent PluginView on + Windows, the transparency is applied twice + + Reviewed by Dan Bernstein. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Export WTF::deleteOwnedPtr(HDC). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Ditto. + +2009-10-20 Geoffrey Garen + + Windows build fix: updated variable name. + + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + +2009-10-20 Geoffrey Garen + + Reviewed by Mark Rowe. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the + size of a JSValue because m_jsStrings is an array of JSValues. + +2009-10-20 Geoffrey Garen + + Reviewed by Mark Rowe. + + Fixed a 64-bit regression caused by the fix for + https://bugs.webkit.org/show_bug.cgi?id=30570. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since + 64-bit pointers are eight bytes long. + +2009-10-20 Geoffrey Garen + + Reviewed by Sam Weinig. + + Refactored DateInstance::msToGregorianDateTime so that a DateInstance's + caller doesn't need to supply the DateInstance's own internal value to + the DateInstance. + + * runtime/DateInstance.cpp: + (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime". + + * runtime/DateInstance.h: + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity. + +2009-10-20 Gabor Loki + + Reviewed by Geoffrey Garen. + + The op_next_pname should use 4 bytes addressing mode in case of JSValue32 + https://bugs.webkit.org/show_bug.cgi?id=30570 + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_next_pname): + +2009-10-20 Gabor Loki + + Reviewed by Oliver Hunt. + + Move OverridesMarkChildren flag from DatePrototype to its parent class + https://bugs.webkit.org/show_bug.cgi?id=30372 + + * runtime/DateInstance.h: + (JSC::DateInstance::createStructure): + * runtime/DatePrototype.h: + 2009-10-19 Geoffrey Garen Reviewed by Oliver Hunt. diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi index 4b316c8..03c23c3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi @@ -194,6 +194,7 @@ 'runtime/DateConversion.h', 'runtime/DateInstance.cpp', 'runtime/DateInstance.h', + 'runtime/DateInstanceCache.h', 'runtime/DatePrototype.cpp', 'runtime/DatePrototype.h', 'runtime/Error.cpp', diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri index 89c483e..eb26664 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri @@ -39,10 +39,12 @@ win32-* { contains(JAVASCRIPTCORE_JIT,yes) { DEFINES+=ENABLE_JIT=1 DEFINES+=ENABLE_YARR_JIT=1 + DEFINES+=ENABLE_YARR=1 } contains(JAVASCRIPTCORE_JIT,no) { DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 + DEFINES+=ENABLE_YARR=0 } # In debug mode JIT disabled until crash fixed diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h index 078de44..02ce2e9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h @@ -407,6 +407,11 @@ register writeback class ARMv7Assembler { public: + ~ARMv7Assembler() + { + ASSERT(m_jumpsToLink.isEmpty()); + } + typedef ARMRegisters::RegisterID RegisterID; typedef ARMRegisters::FPRegisterID FPRegisterID; @@ -477,6 +482,17 @@ public: private: + struct LinkRecord { + LinkRecord(intptr_t from, intptr_t to) + : from(from) + , to(to) + { + } + + intptr_t from; + intptr_t to; + }; + // ARMv7, Appx-A.6.3 bool BadReg(RegisterID reg) { @@ -574,6 +590,7 @@ private: OP_SUB_SP_imm_T1 = 0xB080, OP_BKPT = 0xBE00, OP_IT = 0xBF00, + OP_NOP_T1 = 0xBF00, } OpcodeID; typedef enum { @@ -608,6 +625,7 @@ private: OP_MOV_imm_T3 = 0xF240, OP_SUB_imm_T4 = 0xF2A0, OP_MOVT = 0xF2C0, + OP_NOP_T2a = 0xF3AF, OP_LDRH_reg_T2 = 0xF830, OP_LDRH_imm_T3 = 0xF830, OP_STR_imm_T4 = 0xF840, @@ -626,6 +644,7 @@ private: typedef enum { OP_B_T4b = 0x9000, + OP_NOP_T2b = 0x8000, } OpcodeID2; struct FourFours { @@ -1481,6 +1500,15 @@ public: void* executableCopy(ExecutablePool* allocator) { void* copy = m_formatter.executableCopy(allocator); + + unsigned jumpCount = m_jumpsToLink.size(); + for (unsigned i = 0; i < jumpCount; ++i) { + uint16_t* location = reinterpret_cast(reinterpret_cast(copy) + m_jumpsToLink[i].from); + uint16_t* target = reinterpret_cast(reinterpret_cast(copy) + m_jumpsToLink[i].to); + linkJumpAbsolute(location, target); + } + m_jumpsToLink.clear(); + ASSERT(copy); return copy; } @@ -1503,11 +1531,7 @@ public: { ASSERT(to.m_offset != -1); ASSERT(from.m_offset != -1); - - uint16_t* location = reinterpret_cast(reinterpret_cast(m_formatter.data()) + from.m_offset); - intptr_t relative = to.m_offset - from.m_offset; - - linkWithOffset(location, relative); + m_jumpsToLink.append(LinkRecord(from.m_offset, to.m_offset)); } static void linkJump(void* code, JmpSrc from, void* to) @@ -1515,9 +1539,7 @@ public: ASSERT(from.m_offset != -1); uint16_t* location = reinterpret_cast(reinterpret_cast(code) + from.m_offset); - intptr_t relative = reinterpret_cast(to) - reinterpret_cast(location); - - linkWithOffset(location, relative); + linkJumpAbsolute(location, to); } // bah, this mathod should really be static, since it is used by the LinkBuffer. @@ -1541,10 +1563,9 @@ public: ASSERT(!(reinterpret_cast(from) & 1)); ASSERT(!(reinterpret_cast(to) & 1)); - intptr_t relative = reinterpret_cast(to) - reinterpret_cast(from); - linkWithOffset(reinterpret_cast(from), relative); + linkJumpAbsolute(reinterpret_cast(from), to); - ExecutableAllocator::cacheFlush(reinterpret_cast(from) - 2, 2 * sizeof(uint16_t)); + ExecutableAllocator::cacheFlush(reinterpret_cast(from) - 5, 5 * sizeof(uint16_t)); } static void relinkCall(void* from, void* to) @@ -1613,14 +1634,14 @@ private: static void setInt32(void* code, uint32_t value) { uint16_t* location = reinterpret_cast(code); + ASSERT(isMOV_imm_T3(location - 4) && isMOVT(location - 2)); - uint16_t lo16 = value; - uint16_t hi16 = value >> 16; - - spliceHi5(location - 4, lo16); - spliceLo11(location - 3, lo16); - spliceHi5(location - 2, hi16); - spliceLo11(location - 1, hi16); + ARMThumbImmediate lo16 = ARMThumbImmediate::makeUInt16(static_cast(value)); + ARMThumbImmediate hi16 = ARMThumbImmediate::makeUInt16(static_cast(value >> 16)); + location[-4] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOV_imm_T3, lo16); + location[-3] = twoWordOp5i6Imm4Reg4EncodedImmSecond((location[-3] >> 8) & 0xf, lo16); + location[-2] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOVT, hi16); + location[-1] = twoWordOp5i6Imm4Reg4EncodedImmSecond((location[-1] >> 8) & 0xf, hi16); ExecutableAllocator::cacheFlush(location - 4, 4 * sizeof(uint16_t)); } @@ -1630,41 +1651,89 @@ private: setInt32(code, reinterpret_cast(value)); } - // Linking & patching: - // This method assumes that the JmpSrc being linked is a T4 b instruction. - static void linkWithOffset(uint16_t* instruction, intptr_t relative) - { - // Currently branches > 16m = mostly deathy. - if (((relative << 7) >> 7) != relative) { - // FIXME: This CRASH means we cannot turn the JIT on by default on arm-v7. - fprintf(stderr, "Error: Cannot link T4b.\n"); - CRASH(); - } - - // ARM encoding for the top two bits below the sign bit is 'peculiar'. - if (relative >= 0) - relative ^= 0xC00000; + static bool isB(void* address) + { + uint16_t* instruction = static_cast(address); + return ((instruction[0] & 0xf800) == OP_B_T4a) && ((instruction[1] & 0xd000) == OP_B_T4b); + } + + static bool isBX(void* address) + { + uint16_t* instruction = static_cast(address); + return (instruction[0] & 0xff87) == OP_BX; + } - // All branch offsets should be an even distance. - ASSERT(!(relative & 1)); + static bool isMOV_imm_T3(void* address) + { + uint16_t* instruction = static_cast(address); + return ((instruction[0] & 0xFBF0) == OP_MOV_imm_T3) && ((instruction[1] & 0x8000) == 0); + } - int word1 = ((relative & 0x1000000) >> 14) | ((relative & 0x3ff000) >> 12); - int word2 = ((relative & 0x800000) >> 10) | ((relative & 0x400000) >> 11) | ((relative & 0xffe) >> 1); + static bool isMOVT(void* address) + { + uint16_t* instruction = static_cast(address); + return ((instruction[0] & 0xFBF0) == OP_MOVT) && ((instruction[1] & 0x8000) == 0); + } - instruction[-2] = OP_B_T4a | word1; - instruction[-1] = OP_B_T4b | word2; + static bool isNOP_T1(void* address) + { + uint16_t* instruction = static_cast(address); + return instruction[0] == OP_NOP_T1; } - // These functions can be used to splice 16-bit immediates back into previously generated instructions. - static void spliceHi5(uint16_t* where, uint16_t what) + static bool isNOP_T2(void* address) { - uint16_t pattern = (what >> 12) | ((what & 0x0800) >> 1); - *where = (*where & 0xFBF0) | pattern; + uint16_t* instruction = static_cast(address); + return (instruction[0] == OP_NOP_T2a) && (instruction[1] == OP_NOP_T2b); } - static void spliceLo11(uint16_t* where, uint16_t what) + + static void linkJumpAbsolute(uint16_t* instruction, void* target) { - uint16_t pattern = ((what & 0x0700) << 4) | (what & 0x00FF); - *where = (*where & 0x8F00) | pattern; + // FIMXE: this should be up in the MacroAssembler layer. :-( + const uint16_t JUMP_TEMPORARY_REGISTER = ARMRegisters::ip; + + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + + ASSERT( (isMOV_imm_T3(instruction - 5) && isMOVT(instruction - 3) && isBX(instruction - 1)) + || (isNOP_T1(instruction - 5) && isNOP_T2(instruction - 4) && isB(instruction - 2)) ); + + intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + if (((relative << 7) >> 7) == relative) { + // ARM encoding for the top two bits below the sign bit is 'peculiar'. + if (relative >= 0) + relative ^= 0xC00000; + + // All branch offsets should be an even distance. + ASSERT(!(relative & 1)); + // There may be a better way to fix this, but right now put the NOPs first, since in the + // case of an conditional branch this will be coming after an ITTT predicating *three* + // instructions! Looking backwards to modify the ITTT to an IT is not easy, due to + // variable wdith encoding - the previous instruction might *look* like an ITTT but + // actually be the second half of a 2-word op. + instruction[-5] = OP_NOP_T1; + instruction[-4] = OP_NOP_T2a; + instruction[-3] = OP_NOP_T2b; + instruction[-2] = OP_B_T4a | ((relative & 0x1000000) >> 14) | ((relative & 0x3ff000) >> 12); + instruction[-1] = OP_B_T4b | ((relative & 0x800000) >> 10) | ((relative & 0x400000) >> 11) | ((relative & 0xffe) >> 1); + } else { + ARMThumbImmediate lo16 = ARMThumbImmediate::makeUInt16(static_cast(reinterpret_cast(target) + 1)); + ARMThumbImmediate hi16 = ARMThumbImmediate::makeUInt16(static_cast(reinterpret_cast(target) >> 16)); + instruction[-5] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOV_imm_T3, lo16); + instruction[-4] = twoWordOp5i6Imm4Reg4EncodedImmSecond(JUMP_TEMPORARY_REGISTER, lo16); + instruction[-3] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOVT, hi16); + instruction[-2] = twoWordOp5i6Imm4Reg4EncodedImmSecond(JUMP_TEMPORARY_REGISTER, hi16); + instruction[-1] = OP_BX | (JUMP_TEMPORARY_REGISTER << 3); + } + } + + static uint16_t twoWordOp5i6Imm4Reg4EncodedImmFirst(uint16_t op, ARMThumbImmediate imm) + { + return op | (imm.m_value.i << 10) | imm.m_value.imm4; + } + static uint16_t twoWordOp5i6Imm4Reg4EncodedImmSecond(uint16_t rd, ARMThumbImmediate imm) + { + return (imm.m_value.imm3 << 12) | (rd << 8) | imm.m_value.imm8; } class ARMInstructionFormatter { @@ -1723,8 +1792,11 @@ private: void twoWordOp5i6Imm4Reg4EncodedImm(OpcodeID1 op, int imm4, RegisterID rd, ARMThumbImmediate imm) { - m_buffer.putShort(op | (imm.m_value.i << 10) | imm4); - m_buffer.putShort((imm.m_value.imm3 << 12) | (rd << 8) | imm.m_value.imm8); + ARMThumbImmediate newImm = imm; + newImm.m_value.imm4 = imm4; + + m_buffer.putShort(ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst(op, newImm)); + m_buffer.putShort(ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond(rd, newImm)); } void twoWordOp12Reg4Reg4Imm12(OpcodeID1 op, RegisterID reg1, RegisterID reg2, uint16_t imm) @@ -1749,6 +1821,8 @@ private: private: AssemblerBuffer m_buffer; } m_formatter; + + Vector m_jumpsToLink; }; } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h index aa8cbb0..7a72b06 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h @@ -65,6 +65,7 @@ public: }; static const RegisterID stackPointerRegister = ARMRegisters::sp; + static const RegisterID linkRegister = ARMRegisters::lr; static const Scale ScalePtr = TimesFour; @@ -530,7 +531,7 @@ public: void ret() { - pop(ARMRegisters::pc); + m_assembler.mov_r(ARMRegisters::pc, linkRegister); } void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) @@ -746,11 +747,9 @@ protected: void prepareCall() { - ensureSpace(3 * sizeof(ARMWord), sizeof(ARMWord)); + ensureSpace(2 * sizeof(ARMWord), sizeof(ARMWord)); - // S0 might be used for parameter passing - m_assembler.add_r(ARMRegisters::S1, ARMRegisters::pc, ARMAssembler::OP2_IMM | 0x4); - m_assembler.push_r(ARMRegisters::S1); + m_assembler.mov_r(linkRegister, ARMRegisters::pc); } void call32(RegisterID base, int32_t offset) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h index a549604..c479517 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h @@ -990,13 +990,15 @@ public: protected: ARMv7Assembler::JmpSrc makeJump() { - return m_assembler.b(); + moveFixedWidthEncoding(Imm32(0), dataTempRegister); + return m_assembler.bx(dataTempRegister); } ARMv7Assembler::JmpSrc makeBranch(ARMv7Assembler::Condition cond) { - m_assembler.it(cond); - return m_assembler.b(); + m_assembler.it(cond, true, true); + moveFixedWidthEncoding(Imm32(0), dataTempRegister); + return m_assembler.bx(dataTempRegister); } ARMv7Assembler::JmpSrc makeBranch(Condition cond) { return makeBranch(armV7Condition(cond)); } ARMv7Assembler::JmpSrc makeBranch(DoubleCondition cond) { return makeBranch(armV7Condition(cond)); } diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp index 18ca2ae..c915934 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp @@ -824,6 +824,16 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& printf("[%4d] get_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); break; } + case op_get_by_pname: { + int r0 = (++it)->u.operand; + int r1 = (++it)->u.operand; + int r2 = (++it)->u.operand; + int r3 = (++it)->u.operand; + int r4 = (++it)->u.operand; + int r5 = (++it)->u.operand; + printf("[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), registerName(r3).c_str(), registerName(r4).c_str(), registerName(r5).c_str()); + break; + } case op_put_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; @@ -1015,14 +1025,17 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& break; } case op_get_pnames: { - int r0 = it[0].u.operand; - int r1 = it[1].u.operand; - printf("[%4d] get_pnames\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str()); + int r0 = it[1].u.operand; + int r1 = it[2].u.operand; + int r2 = it[3].u.operand; + int r3 = it[4].u.operand; + int offset = it[5].u.operand; + printf("[%4d] get_pnames\t %s, %s, %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), registerName(r3).c_str(), offset, location + offset); it += OPCODE_LENGTH(op_get_pnames) - 1; break; } case op_next_pname: { - int dest = it[0].u.operand; + int dest = it[1].u.operand; int iter = it[4].u.operand; int offset = it[5].u.operand; printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(dest).c_str(), registerName(iter).c_str(), offset, location + offset); diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h index 8968252..4facbef 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h @@ -113,6 +113,7 @@ namespace JSC { macro(op_put_by_id_generic, 8) \ macro(op_del_by_id, 4) \ macro(op_get_by_val, 4) \ + macro(op_get_by_pname, 7) \ macro(op_put_by_val, 4) \ macro(op_del_by_val, 4) \ macro(op_put_by_index, 4) \ diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 41b5c39..04dae15 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -1281,6 +1281,19 @@ RegisterID* BytecodeGenerator::emitDeleteById(RegisterID* dst, RegisterID* base, RegisterID* BytecodeGenerator::emitGetByVal(RegisterID* dst, RegisterID* base, RegisterID* property) { + for (size_t i = m_forInContextStack.size(); i > 0; i--) { + ForInContext& context = m_forInContextStack[i - 1]; + if (context.propertyRegister == property) { + emitOpcode(op_get_by_pname); + instructions().append(dst->index()); + instructions().append(base->index()); + instructions().append(property->index()); + instructions().append(context.expectedSubscriptRegister->index()); + instructions().append(context.iterRegister->index()); + instructions().append(context.indexRegister->index()); + return dst; + } + } emitOpcode(op_get_by_val); instructions().append(dst->index()); instructions().append(base->index()); diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h index 61de173..4648fb5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h @@ -61,6 +61,13 @@ namespace JSC { FinallyContext finallyContext; }; + struct ForInContext { + RefPtr expectedSubscriptRegister; + RefPtr iterRegister; + RefPtr indexRegister; + RefPtr propertyRegister; + }; + class BytecodeGenerator : public FastAllocBase { public: typedef DeclarationStacks::VarStack VarStack; @@ -331,6 +338,17 @@ namespace JSC { void pushFinallyContext(Label* target, RegisterID* returnAddrDst); void popFinallyContext(); + void pushOptimisedForIn(RegisterID* expectedBase, RegisterID* iter, RegisterID* index, RegisterID* propertyRegister) + { + ForInContext context = { expectedBase, iter, index, propertyRegister }; + m_forInContextStack.append(context); + } + + void popOptimisedForIn() + { + m_forInContextStack.removeLast(); + } + LabelScope* breakTarget(const Identifier&); LabelScope* continueTarget(const Identifier&); @@ -467,6 +485,7 @@ namespace JSC { Vector m_scopeContextStack; Vector m_switchContextStack; + Vector m_forInContextStack; int m_nextGlobalIndex; int m_nextParameterIndex; diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index 53964ad..c77a0f1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -2417,6 +2417,33 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi vPC += OPCODE_LENGTH(op_del_by_id); NEXT_INSTRUCTION(); } + DEFINE_OPCODE(op_get_by_pname) { + int dst = vPC[1].u.operand; + int base = vPC[2].u.operand; + int property = vPC[3].u.operand; + int expected = vPC[4].u.operand; + int iter = vPC[5].u.operand; + int i = vPC[6].u.operand; + + JSValue baseValue = callFrame->r(base).jsValue(); + JSPropertyNameIterator* it = callFrame->r(iter).propertyNameIterator(); + JSValue subscript = callFrame->r(property).jsValue(); + JSValue expectedSubscript = callFrame->r(expected).jsValue(); + int index = callFrame->r(i).i() - 1; + JSValue result; + int offset = 0; + if (subscript == expectedSubscript && baseValue.isCell() && (baseValue.asCell()->structure() == it->cachedStructure()) && it->getOffset(index, offset)) { + callFrame->r(dst) = asObject(baseValue)->getDirectOffset(offset); + vPC += OPCODE_LENGTH(op_get_by_pname); + NEXT_INSTRUCTION(); + } + Identifier propertyName(callFrame, subscript.toString(callFrame)); + result = baseValue.get(callFrame, propertyName); + CHECK_FOR_EXCEPTION(); + callFrame->r(dst) = result; + vPC += OPCODE_LENGTH(op_get_by_pname); + NEXT_INSTRUCTION(); + } DEFINE_OPCODE(op_get_by_val) { /* get_by_val dst(r) base(r) property(r) diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h index 1d15ef0..5c43eeb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h @@ -189,6 +189,22 @@ public: sys_dcache_flush(code, size); sys_icache_invalidate(code, size); } +#elif PLATFORM(ARM_THUMB2) && PLATFORM(LINUX) + static void cacheFlush(void* code, size_t size) + { + asm volatile ( + "push {r7}\n" + "mov r0, %0\n" + "mov r1, %1\n" + "movw r7, #0x2\n" + "movt r7, #0xf\n" + "movs r2, #0x0\n" + "svc 0x0\n" + "pop {r7}\n" + : + : "r" (code), "r" (reinterpret_cast(code) + size) + : "r0", "r1"); + } #elif PLATFORM(SYMBIAN) static void cacheFlush(void* code, size_t size) { diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp index fa0ac2e..000e4b8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp @@ -239,6 +239,7 @@ void JIT::privateCompileMainPass() DEFINE_OP(op_eq_null) DEFINE_OP(op_get_by_id) DEFINE_OP(op_get_by_val) + DEFINE_OP(op_get_by_pname) DEFINE_OP(op_get_global_var) DEFINE_OP(op_get_pnames) DEFINE_OP(op_get_scoped_var) @@ -385,6 +386,7 @@ void JIT::privateCompileSlowCases() DEFINE_SLOWCASE_OP(op_eq) DEFINE_SLOWCASE_OP(op_get_by_id) DEFINE_SLOWCASE_OP(op_get_by_val) + DEFINE_SLOWCASE_OP(op_get_by_pname) DEFINE_SLOWCASE_OP(op_instanceof) DEFINE_SLOWCASE_OP(op_jfalse) DEFINE_SLOWCASE_OP(op_jnless) diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h index 9406d1f..e19ea17 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h @@ -38,6 +38,8 @@ #define JIT_CLASS_ALIGNMENT #endif +#define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast(actual), static_cast(expected)); + #include "CodeBlock.h" #include "Interpreter.h" #include "JITCode.h" @@ -249,7 +251,6 @@ namespace JSC { static const RegisterID timeoutCheckRegister = ARMRegisters::r5; static const RegisterID callFrameRegister = ARMRegisters::r4; - static const RegisterID ctiReturnRegister = ARMRegisters::r6; static const RegisterID regT0 = ARMRegisters::r0; static const RegisterID regT1 = ARMRegisters::r1; @@ -427,6 +428,7 @@ namespace JSC { #endif void compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, Structure* structure, size_t cachedOffset); void compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID resultTag, RegisterID resultPayload, size_t cachedOffset); + void compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID structure, RegisterID offset); void compilePutDirectOffset(RegisterID base, RegisterID valueTag, RegisterID valuePayload, Structure* structure, size_t cachedOffset); // Arithmetic opcode helpers @@ -528,6 +530,7 @@ namespace JSC { #endif void compileGetDirectOffset(RegisterID base, RegisterID result, Structure* structure, size_t cachedOffset); void compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID result, size_t cachedOffset); + void compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID structure, RegisterID offset, RegisterID scratch); void compilePutDirectOffset(RegisterID base, RegisterID value, Structure* structure, size_t cachedOffset); #if PLATFORM(X86_64) @@ -583,26 +586,26 @@ namespace JSC { #elif PLATFORM(ARM_THUMB2) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 10; - static const int patchOffsetPutByIdExternalLoad = 20; + static const int patchOffsetPutByIdExternalLoad = 26; static const int patchLengthPutByIdExternalLoad = 12; - static const int patchOffsetPutByIdPropertyMapOffset = 40; + static const int patchOffsetPutByIdPropertyMapOffset = 46; // These architecture specific value are used to enable patching - see comment on op_get_by_id. static const int patchOffsetGetByIdStructure = 10; - static const int patchOffsetGetByIdBranchToSlowCase = 20; - static const int patchOffsetGetByIdExternalLoad = 20; + static const int patchOffsetGetByIdBranchToSlowCase = 26; + static const int patchOffsetGetByIdExternalLoad = 26; static const int patchLengthGetByIdExternalLoad = 12; - static const int patchOffsetGetByIdPropertyMapOffset = 40; - static const int patchOffsetGetByIdPutResult = 44; + static const int patchOffsetGetByIdPropertyMapOffset = 46; + static const int patchOffsetGetByIdPutResult = 50; #if ENABLE(OPCODE_SAMPLING) static const int patchOffsetGetByIdSlowCaseCall = 0; // FIMXE #else static const int patchOffsetGetByIdSlowCaseCall = 28; #endif - static const int patchOffsetOpCallCompareToJump = 10; + static const int patchOffsetOpCallCompareToJump = 16; - static const int patchOffsetMethodCheckProtoObj = 18; - static const int patchOffsetMethodCheckProtoStruct = 28; - static const int patchOffsetMethodCheckPutFunction = 46; + static const int patchOffsetMethodCheckProtoObj = 24; + static const int patchOffsetMethodCheckProtoStruct = 34; + static const int patchOffsetMethodCheckPutFunction = 58; #elif PLATFORM(ARM_TRADITIONAL) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 4; @@ -619,7 +622,7 @@ namespace JSC { #if ENABLE(OPCODE_SAMPLING) #error "OPCODE_SAMPLING is not yet supported" #else - static const int patchOffsetGetByIdSlowCaseCall = 36; + static const int patchOffsetGetByIdSlowCaseCall = 28; #endif static const int patchOffsetOpCallCompareToJump = 12; @@ -640,7 +643,7 @@ namespace JSC { static const int sequenceGetByIdHotPathInstructionSpace = 28; static const int sequenceGetByIdHotPathConstantSpace = 3; // sequenceGetByIdSlowCase - static const int sequenceGetByIdSlowCaseInstructionSpace = 40; + static const int sequenceGetByIdSlowCaseInstructionSpace = 32; static const int sequenceGetByIdSlowCaseConstantSpace = 2; // sequencePutById static const int sequencePutByIdInstructionSpace = 28; @@ -682,6 +685,7 @@ namespace JSC { void emit_op_eq_null(Instruction*); void emit_op_get_by_id(Instruction*); void emit_op_get_by_val(Instruction*); + void emit_op_get_by_pname(Instruction*); void emit_op_get_global_var(Instruction*); void emit_op_get_scoped_var(Instruction*); void emit_op_init_arguments(Instruction*); @@ -771,6 +775,7 @@ namespace JSC { void emitSlow_op_eq(Instruction*, Vector::iterator&); void emitSlow_op_get_by_id(Instruction*, Vector::iterator&); void emitSlow_op_get_by_val(Instruction*, Vector::iterator&); + void emitSlow_op_get_by_pname(Instruction*, Vector::iterator&); void emitSlow_op_instanceof(Instruction*, Vector::iterator&); void emitSlow_op_jfalse(Instruction*, Vector::iterator&); void emitSlow_op_jnless(Instruction*, Vector::iterator&); diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITCall.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITCall.cpp index cfaa69f..f7fcc0a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITCall.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITCall.cpp @@ -614,7 +614,7 @@ void JIT::compileOpCall(OpcodeID opcodeID, Instruction* instruction, unsigned ca END_UNINTERRUPTED_SEQUENCE(sequenceOpCall); addSlowCase(jumpToSlow); - ASSERT(differenceBetween(addressOfLinkedFunctionCheck, jumpToSlow) == patchOffsetOpCallCompareToJump); + ASSERT_JIT_OFFSET(differenceBetween(addressOfLinkedFunctionCheck, jumpToSlow), patchOffsetOpCallCompareToJump); m_callStructureStubCompilationInfo[callLinkInfoIndex].hotPathBegin = addressOfLinkedFunctionCheck; // The following is the fast case, only used whan a callee can be linked. diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h index f26457a..93d6ce7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h @@ -144,7 +144,7 @@ ALWAYS_INLINE void JIT::endUninterruptedSequence(int insnSpace, int constSpace) #endif -#if PLATFORM(ARM_THUMB2) +#if PLATFORM(ARM) ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg) { @@ -161,7 +161,7 @@ ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(Address address) loadPtr(address, linkRegister); } -#else // PLATFORM(X86) || PLATFORM(X86_64) || PLATFORM(ARM_TRADITIONAL) +#else // PLATFORM(X86) || PLATFORM(X86_64) ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg) { @@ -191,16 +191,13 @@ ALWAYS_INLINE void JIT::restoreArgumentReference() { move(stackPointerRegister, firstArgumentRegister); poke(callFrameRegister, OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof (void*)); -#if PLATFORM(ARM_TRADITIONAL) - move(ctiReturnRegister, ARMRegisters::lr); -#endif } ALWAYS_INLINE void JIT::restoreArgumentReferenceForTrampoline() { #if PLATFORM(X86) // Within a trampoline the return address will be on the stack at this point. addPtr(Imm32(sizeof(void*)), stackPointerRegister, firstArgumentRegister); -#elif PLATFORM(ARM_THUMB2) +#elif PLATFORM(ARM) move(stackPointerRegister, firstArgumentRegister); #endif // In the trampoline on x86-64, the first argument register is not overwritten. diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp index e10d105..14736cf 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp @@ -1792,7 +1792,6 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr* executable // Setup arg4: This is a plain hack move(stackPointerRegister, ARMRegisters::S0); - move(ctiReturnRegister, ARMRegisters::lr); call(Address(regT1, OBJECT_OFFSETOF(JSFunction, m_data))); addPtr(Imm32(sizeof(ArgList)), stackPointerRegister); @@ -2500,7 +2499,13 @@ void JIT::emit_op_next_pname(Instruction* currentInstruction) // Grab key @ i loadPtr(addressFor(it), regT1); loadPtr(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStrings)), regT2); + +#if USE(JSVALUE64) loadPtr(BaseIndex(regT2, regT0, TimesEight), regT2); +#else + loadPtr(BaseIndex(regT2, regT0, TimesFour), regT2); +#endif + emitPutVirtualRegister(dst, regT2); // Increment i diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp index 4241111..bf367a6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp @@ -33,6 +33,7 @@ #include "JITStubCall.h" #include "JSArray.h" #include "JSFunction.h" +#include "JSPropertyNameIterator.h" #include "Interpreter.h" #include "LinkBuffer.h" #include "RepatchBuffer.h" @@ -934,6 +935,69 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str #endif // !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) +void JIT::compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID structure, RegisterID offset) +{ + ASSERT(sizeof(((Structure*)0)->m_propertyStorageCapacity) == sizeof(int32_t)); + ASSERT(sizeof(JSObject::inlineStorageCapacity) == sizeof(int32_t)); + ASSERT(sizeof(JSValue) == 8); + + Jump notUsingInlineStorage = branch32(NotEqual, Address(structure, OBJECT_OFFSETOF(Structure, m_propertyStorageCapacity)), Imm32(JSObject::inlineStorageCapacity)); + loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSObject, m_inlineStorage)+OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); + loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSObject, m_inlineStorage)+OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); + Jump finishedLoad = jump(); + notUsingInlineStorage.link(this); + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); + loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); + loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); + finishedLoad.link(this); +} + +void JIT::emit_op_get_by_pname(Instruction* currentInstruction) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + unsigned expected = currentInstruction[4].u.operand; + unsigned iter = currentInstruction[5].u.operand; + unsigned i = currentInstruction[6].u.operand; + + emitLoad2(property, regT1, regT0, base, regT3, regT2); + emitJumpSlowCaseIfNotJSCell(property, regT1); + addSlowCase(branchPtr(NotEqual, regT0, payloadFor(expected))); + // Property registers are now available as the property is known + emitJumpSlowCaseIfNotJSCell(base, regT3); + emitLoadPayload(iter, regT1); + + // Test base's structure + loadPtr(Address(regT2, OBJECT_OFFSETOF(JSCell, m_structure)), regT0); + addSlowCase(branchPtr(NotEqual, regT0, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))); + load32(addressFor(i), regT3); + sub32(Imm32(1), regT3); + addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots)))); + compileGetDirectOffset(regT2, regT1, regT0, regT0, regT3); + + emitStore(dst, regT1, regT0); + map(m_bytecodeIndex + OPCODE_LENGTH(op_get_by_pname), dst, regT1, regT0); +} + +void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector::iterator& iter) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + + linkSlowCaseIfNotJSCell(iter, property); + linkSlowCase(iter); + linkSlowCaseIfNotJSCell(iter, base); + linkSlowCase(iter); + linkSlowCase(iter); + + JITStubCall stubCall(this, cti_op_get_by_val); + stubCall.addArgument(base); + stubCall.addArgument(property); + stubCall.call(dst); +} + #else // USE(JSVALUE32_64) void JIT::emit_op_get_by_val(Instruction* currentInstruction) @@ -967,6 +1031,48 @@ void JIT::emit_op_get_by_val(Instruction* currentInstruction) emitPutVirtualRegister(dst); } +void JIT::emit_op_get_by_pname(Instruction* currentInstruction) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + unsigned expected = currentInstruction[4].u.operand; + unsigned iter = currentInstruction[5].u.operand; + unsigned i = currentInstruction[6].u.operand; + + emitGetVirtualRegister(property, regT0); + addSlowCase(branchPtr(NotEqual, regT0, addressFor(expected))); + emitGetVirtualRegisters(base, regT0, iter, regT1); + emitJumpSlowCaseIfNotJSCell(regT0, base); + + // Test base's structure + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2); + addSlowCase(branchPtr(NotEqual, regT2, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))); + load32(addressFor(i), regT3); + sub32(Imm32(1), regT3); + addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots)))); + compileGetDirectOffset(regT0, regT0, regT2, regT3, regT1); + + emitPutVirtualRegister(dst, regT0); +} + +void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector::iterator& iter) +{ + unsigned dst = currentInstruction[1].u.operand; + unsigned base = currentInstruction[2].u.operand; + unsigned property = currentInstruction[3].u.operand; + + linkSlowCase(iter); + linkSlowCaseIfNotJSCell(iter, base); + linkSlowCase(iter); + linkSlowCase(iter); + + JITStubCall stubCall(this, cti_op_get_by_val); + stubCall.addArgument(base, regT2); + stubCall.addArgument(property, regT2); + stubCall.call(dst); +} + void JIT::emit_op_put_by_val(Instruction* currentInstruction) { unsigned base = currentInstruction[1].u.operand; @@ -1132,9 +1238,9 @@ void JIT::emit_op_method_check(Instruction* currentInstruction) Jump match = jump(); - ASSERT(differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj); - ASSERT(differenceBetween(info.structureToCompare, protoStructureToCompare) == patchOffsetMethodCheckProtoStruct); - ASSERT(differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction); + ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoObj), patchOffsetMethodCheckProtoObj); + ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoStructureToCompare), patchOffsetMethodCheckProtoStruct); + ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, putFunction), patchOffsetMethodCheckPutFunction); // Link the failure cases here. notCell.link(this); @@ -1201,22 +1307,22 @@ void JIT::compileGetByIdHotPath(int, int baseVReg, Identifier*, unsigned propert DataLabelPtr structureToCompare; Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast(patchGetByIdDefaultStructure))); addSlowCase(structureCheck); - ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetGetByIdStructure); - ASSERT(differenceBetween(hotPathBegin, structureCheck) == patchOffsetGetByIdBranchToSlowCase); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetGetByIdStructure); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureCheck), patchOffsetGetByIdBranchToSlowCase) Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); Label externalLoadComplete(this); - ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetGetByIdExternalLoad); - ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthGetByIdExternalLoad); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, externalLoad), patchOffsetGetByIdExternalLoad); + ASSERT_JIT_OFFSET(differenceBetween(externalLoad, externalLoadComplete), patchLengthGetByIdExternalLoad); DataLabel32 displacementLabel = loadPtrWithAddressOffsetPatch(Address(regT0, patchGetByIdDefaultOffset), regT0); - ASSERT(differenceBetween(hotPathBegin, displacementLabel) == patchOffsetGetByIdPropertyMapOffset); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel), patchOffsetGetByIdPropertyMapOffset); Label putResult(this); END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); - ASSERT(differenceBetween(hotPathBegin, putResult) == patchOffsetGetByIdPutResult); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, putResult), patchOffsetGetByIdPutResult); } void JIT::emitSlow_op_get_by_id(Instruction* currentInstruction, Vector::iterator& iter) @@ -1251,7 +1357,7 @@ void JIT::compileGetByIdSlowCase(int resultVReg, int baseVReg, Identifier* ident END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); - ASSERT(differenceBetween(coldPathBegin, call) == patchOffsetGetByIdSlowCaseCall); + ASSERT_JIT_OFFSET(differenceBetween(coldPathBegin, call), patchOffsetGetByIdSlowCaseCall); // Track the location of the call; this will be used to recover patch information. m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].callReturnLocation = call; @@ -1282,19 +1388,19 @@ void JIT::emit_op_put_by_id(Instruction* currentInstruction) // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over. DataLabelPtr structureToCompare; addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast(patchGetByIdDefaultStructure)))); - ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetPutByIdStructure); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetPutByIdStructure); // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used. Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); Label externalLoadComplete(this); - ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetPutByIdExternalLoad); - ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthPutByIdExternalLoad); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, externalLoad), patchOffsetPutByIdExternalLoad); + ASSERT_JIT_OFFSET(differenceBetween(externalLoad, externalLoadComplete), patchLengthPutByIdExternalLoad); DataLabel32 displacementLabel = storePtrWithAddressOffsetPatch(regT1, Address(regT0, patchGetByIdDefaultOffset)); END_UNINTERRUPTED_SEQUENCE(sequencePutById); - ASSERT(differenceBetween(hotPathBegin, displacementLabel) == patchOffsetPutByIdPropertyMapOffset); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel), patchOffsetPutByIdPropertyMapOffset); } void JIT::emitSlow_op_put_by_id(Instruction* currentInstruction, Vector::iterator& iter) @@ -1351,6 +1457,20 @@ void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID res } } +void JIT::compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID structure, RegisterID offset, RegisterID scratch) +{ + ASSERT(sizeof(((Structure*)0)->m_propertyStorageCapacity) == sizeof(int32_t)); + ASSERT(sizeof(JSObject::inlineStorageCapacity) == sizeof(int32_t)); + + Jump notUsingInlineStorage = branch32(NotEqual, Address(structure, OBJECT_OFFSETOF(Structure, m_propertyStorageCapacity)), Imm32(JSObject::inlineStorageCapacity)); + loadPtr(BaseIndex(base, offset, ScalePtr, OBJECT_OFFSETOF(JSObject, m_inlineStorage)), result); + Jump finishedLoad = jump(); + notUsingInlineStorage.link(this); + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), scratch); + loadPtr(BaseIndex(scratch, offset, ScalePtr, 0), result); + finishedLoad.link(this); +} + void JIT::testPrototype(Structure* structure, JumpList& failureCases) { if (structure->m_prototype.isNull()) diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index 457518c..c999618 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -75,25 +75,12 @@ namespace JSC { #define THUMB_FUNC_PARAM(name) #endif -#if PLATFORM(LINUX) && (PLATFORM(X86_64) || PLATFORM(X86)) +#if PLATFORM(LINUX) && PLATFORM(X86_64) #define SYMBOL_STRING_RELOCATION(name) #name "@plt" #else #define SYMBOL_STRING_RELOCATION(name) SYMBOL_STRING(name) #endif -#if PLATFORM(DARWIN) - // Mach-O platform -#define HIDE_SYMBOL(name) ".private_extern _" #name -#elif PLATFORM(AIX) - // IBM's own file format -#define HIDE_SYMBOL(name) ".lglobl " #name -#elif PLATFORM(LINUX) || PLATFORM(FREEBSD) || PLATFORM(OPENBSD) || PLATFORM(SOLARIS) || (PLATFORM(HPUX) && PLATFORM(IA64)) || PLATFORM(SYMBIAN) || PLATFORM(NETBSD) - // ELF platform -#define HIDE_SYMBOL(name) ".hidden " #name -#else -#define HIDE_SYMBOL(name) -#endif - #if USE(JSVALUE32_64) #if COMPILER(GCC) && PLATFORM(X86) @@ -106,9 +93,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x50, JITStackFrame_code_offset_matches_ctiTrampoline); asm volatile ( -".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushl %ebp" "\n" "movl %esp, %ebp" "\n" @@ -129,7 +114,6 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" #if !USE(JIT_STUB_ARGUMENT_VA_LIST) "movl %esp, %ecx" "\n" @@ -145,7 +129,6 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addl $0x3c, %esp" "\n" "popl %ebx" "\n" @@ -170,7 +153,6 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x80, JITStackFrame_code_ asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushq %rbp" "\n" "movq %rsp, %rbp" "\n" @@ -197,7 +179,6 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "movq %rsp, %rdi" "\n" "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" @@ -213,7 +194,6 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addq $0x48, %rsp" "\n" "popq %rbx" "\n" @@ -235,7 +215,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" @@ -262,7 +241,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" @@ -368,9 +346,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x30, JITStackFrame_code_ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x1c, JITStackFrame_stub_argument_space_matches_ctiTrampoline); asm volatile ( -".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushl %ebp" "\n" "movl %esp, %ebp" "\n" @@ -391,7 +367,6 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" #if !USE(JIT_STUB_ARGUMENT_VA_LIST) "movl %esp, %ecx" "\n" @@ -407,7 +382,6 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addl $0x1c, %esp" "\n" "popl %ebx" "\n" @@ -430,9 +404,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x48, JITStackFrame_code_ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x78, JITStackFrame_stub_argument_space_matches_ctiTrampoline); asm volatile ( -".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushq %rbp" "\n" "movq %rsp, %rbp" "\n" @@ -466,7 +438,6 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "movq %rsp, %rdi" "\n" "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" @@ -482,7 +453,6 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addq $0x78, %rsp" "\n" "popq %rbx" "\n" @@ -504,7 +474,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" @@ -531,7 +500,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" @@ -549,7 +517,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" @@ -564,45 +531,31 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" #elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL) asm volatile ( -".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "stmdb sp!, {r1-r3}" "\n" "stmdb sp!, {r4-r8, lr}" "\n" - "mov r6, pc" "\n" - "add r6, r6, #40" "\n" - "sub sp, sp, #32" "\n" - "ldr r4, [sp, #60]" "\n" + "sub sp, sp, #36" "\n" + "mov r4, r2" "\n" "mov r5, #512" "\n" - // r0 contains the code - "add r8, pc, #4" "\n" - "str r8, [sp, #-4]!" "\n" + "mov lr, pc" "\n" "mov pc, r0" "\n" - "add sp, sp, #32" "\n" + "add sp, sp, #36" "\n" "ldmia sp!, {r4-r8, lr}" "\n" "add sp, sp, #12" "\n" "mov pc, lr" "\n" - - // the return instruction - "ldr pc, [sp], #4" "\n" ); asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "mov r0, sp" "\n" - "mov lr, r6" "\n" - "add r8, pc, #4" "\n" - "str r8, [sp, #-4]!" "\n" - "b " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" + "bl " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" // Both has the same return sequence ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" - "add sp, sp, #32" "\n" + "add sp, sp, #36" "\n" "ldmia sp!, {r4-r8, lr}" "\n" "add sp, sp, #12" "\n" "mov pc, lr" "\n" @@ -935,7 +888,6 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD ".text" "\n" \ ".align 2" "\n" \ ".globl " SYMBOL_STRING(cti_##op) "\n" \ - HIDE_SYMBOL(cti_##op) "\n" \ ".thumb" "\n" \ ".thumb_func " THUMB_FUNC_PARAM(cti_##op) "\n" \ SYMBOL_STRING(cti_##op) ":" "\n" \ @@ -946,6 +898,22 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD ); \ rtype JITStubThunked_##op(STUB_ARGS_DECLARATION) \ +#elif PLATFORM(ARM_TRADITIONAL) && COMPILER(GCC) + +#define DEFINE_STUB_FUNCTION(rtype, op) \ + extern "C" { \ + rtype JITStubThunked_##op(STUB_ARGS_DECLARATION); \ + }; \ + asm volatile ( \ + ".globl " SYMBOL_STRING(cti_##op) "\n" \ + SYMBOL_STRING(cti_##op) ":" "\n" \ + "str lr, [sp, #32]" "\n" \ + "bl " SYMBOL_STRING(JITStubThunked_##op) "\n" \ + "ldr lr, [sp, #32]" "\n" \ + "mov pc, lr" "\n" \ + ); \ + rtype JITStubThunked_##op(STUB_ARGS_DECLARATION) + #else #define DEFINE_STUB_FUNCTION(rtype, op) rtype JIT_STUB cti_##op(STUB_ARGS_DECLARATION) #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h index ccbcd2a..69776cb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h @@ -163,6 +163,8 @@ namespace JSC { JITStubArg padding; // Unused JITStubArg args[7]; + ReturnAddressPtr thunkReturnAddress; + void* preservedR4; void* preservedR5; void* preservedR6; @@ -173,11 +175,13 @@ namespace JSC { RegisterFile* registerFile; CallFrame* callFrame; JSValue* exception; + + // These arguments passed on the stack. Profiler** enabledProfilerReference; JSGlobalData* globalData; // When JIT code makes a call, it pushes its return address just below the rest of the stack. - ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast(this) - 1; } + ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; } }; #else #error "JITStackFrame not defined for this platform." diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp index b1e317e..45009dc 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp @@ -1477,6 +1477,7 @@ RegisterID* ForInNode::emitBytecode(BytecodeGenerator& generator, RegisterID* ds generator.emitNode(base.get(), m_expr); RefPtr i = generator.newTemporary(); RefPtr size = generator.newTemporary(); + RefPtr expectedSubscript; RefPtr iter = generator.emitGetPropertyNames(generator.newTemporary(), base.get(), i.get(), size.get(), scope->breakTarget()); generator.emitJump(scope->continueTarget()); @@ -1484,6 +1485,7 @@ RegisterID* ForInNode::emitBytecode(BytecodeGenerator& generator, RegisterID* ds generator.emitLabel(loopStart.get()); RegisterID* propertyName; + bool optimizedForinAccess = false; if (m_lexpr->isResolveNode()) { const Identifier& ident = static_cast(m_lexpr)->identifier(); propertyName = generator.registerFor(ident); @@ -1494,6 +1496,10 @@ RegisterID* ForInNode::emitBytecode(BytecodeGenerator& generator, RegisterID* ds generator.emitExpressionInfo(divot(), startOffset(), endOffset()); generator.emitPutById(base, ident, propertyName); + } else { + expectedSubscript = generator.emitMove(generator.newTemporary(), propertyName); + generator.pushOptimisedForIn(expectedSubscript.get(), iter.get(), i.get(), propertyName); + optimizedForinAccess = true; } } else if (m_lexpr->isDotAccessorNode()) { DotAccessorNode* assignNode = static_cast(m_lexpr); @@ -1518,6 +1524,9 @@ RegisterID* ForInNode::emitBytecode(BytecodeGenerator& generator, RegisterID* ds generator.emitNode(dst, m_statement); + if (optimizedForinAccess) + generator.popOptimisedForIn(); + generator.emitLabel(scope->continueTarget()); generator.emitNextPropertyName(propertyName, base.get(), i.get(), size.get(), iter.get(), loopStart.get()); generator.emitDebugHook(WillExecuteStatement, firstLine(), lastLine()); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp index a69115c..b885049 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp @@ -240,9 +240,7 @@ void Heap::destroy() template NEVER_INLINE CollectorBlock* Heap::allocateBlock() { - // Disable the use of vm_map for the Qt build on Darwin, because when compiled on 10.4 - // it crashes on 10.5 -#if PLATFORM(DARWIN) && !PLATFORM(QT) +#if PLATFORM(DARWIN) vm_address_t address = 0; // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: . 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); @@ -334,9 +332,7 @@ NEVER_INLINE void Heap::freeBlock(size_t block) NEVER_INLINE void Heap::freeBlock(CollectorBlock* block) { - // Disable the use of vm_deallocate for the Qt build on Darwin, because when compiled on 10.4 - // it crashes on 10.5 -#if PLATFORM(DARWIN) && !PLATFORM(QT) +#if PLATFORM(DARWIN) vm_deallocate(current_task(), reinterpret_cast(block), BLOCK_SIZE); #elif PLATFORM(SYMBIAN) userChunk->Free(reinterpret_cast(block)); @@ -1291,6 +1287,10 @@ static const char* typeName(JSCell* cell) #endif if (cell->isGetterSetter()) return "gettersetter"; + if (cell->isAPIValueWrapper()) + return "value wrapper"; + if (cell->isPropertyNameIterator()) + return "for-in iterator"; ASSERT(cell->isObject()); const ClassInfo* info = cell->classInfo(); return info ? info->className : "Object"; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/DateConstructor.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/DateConstructor.cpp index f9b7d84..9908fef 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/DateConstructor.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/DateConstructor.cpp @@ -112,9 +112,7 @@ JSObject* constructDate(ExecState* exec, const ArgList& args) } } - DateInstance* result = new (exec) DateInstance(exec->lexicalGlobalObject()->dateStructure()); - result->setInternalValue(jsNumber(exec, timeClip(value))); - return result; + return new (exec) DateInstance(exec, value); } static JSObject* constructWithDateConstructor(ExecState* exec, JSObject*, const ArgList& args) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp index 4cd58f5..d4c9ef7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp @@ -32,95 +32,43 @@ using namespace WTF; namespace JSC { -struct DateInstance::Cache { - double m_gregorianDateTimeCachedForMS; - GregorianDateTime m_cachedGregorianDateTime; - double m_gregorianDateTimeUTCCachedForMS; - GregorianDateTime m_cachedGregorianDateTimeUTC; -}; - const ClassInfo DateInstance::info = {"Date", 0, 0, 0}; -DateInstance::DateInstance(NonNullPassRefPtr structure) +DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr structure) : JSWrapperObject(structure) - , m_cache(0) { + setInternalValue(jsNaN(exec)); } DateInstance::DateInstance(ExecState* exec, double time) : JSWrapperObject(exec->lexicalGlobalObject()->dateStructure()) - , m_cache(0) { setInternalValue(jsNumber(exec, timeClip(time))); } -DateInstance::~DateInstance() +bool DateInstance::getGregorianDateTime(ExecState* exec, bool outputIsUTC, GregorianDateTime& t) const { - delete m_cache; -} + double milli = internalNumber(); + if (isnan(milli)) + return false; -void DateInstance::msToGregorianDateTime(double milli, bool outputIsUTC, GregorianDateTime& t) const -{ - if (!m_cache) { - m_cache = new Cache; - m_cache->m_gregorianDateTimeCachedForMS = NaN; - m_cache->m_gregorianDateTimeUTCCachedForMS = NaN; - } + if (!m_data) + m_data = exec->globalData().dateInstanceCache.add(milli); if (outputIsUTC) { - if (m_cache->m_gregorianDateTimeUTCCachedForMS != milli) { - WTF::msToGregorianDateTime(milli, true, m_cache->m_cachedGregorianDateTimeUTC); - m_cache->m_gregorianDateTimeUTCCachedForMS = milli; + if (m_data->m_gregorianDateTimeUTCCachedForMS != milli) { + WTF::msToGregorianDateTime(internalNumber(), true, m_data->m_cachedGregorianDateTimeUTC); + m_data->m_gregorianDateTimeUTCCachedForMS = milli; } - t.copyFrom(m_cache->m_cachedGregorianDateTimeUTC); + t.copyFrom(m_data->m_cachedGregorianDateTimeUTC); } else { - if (m_cache->m_gregorianDateTimeCachedForMS != milli) { - WTF::msToGregorianDateTime(milli, false, m_cache->m_cachedGregorianDateTime); - m_cache->m_gregorianDateTimeCachedForMS = milli; + if (m_data->m_gregorianDateTimeCachedForMS != milli) { + WTF::msToGregorianDateTime(internalNumber(), false, m_data->m_cachedGregorianDateTime); + m_data->m_gregorianDateTimeCachedForMS = milli; } - t.copyFrom(m_cache->m_cachedGregorianDateTime); + t.copyFrom(m_data->m_cachedGregorianDateTime); } -} -bool DateInstance::getTime(GregorianDateTime& t, int& offset) const -{ - double milli = internalNumber(); - if (isnan(milli)) - return false; - - msToGregorianDateTime(milli, false, t); - offset = gmtoffset(t); - return true; -} - -bool DateInstance::getUTCTime(GregorianDateTime& t) const -{ - double milli = internalNumber(); - if (isnan(milli)) - return false; - - msToGregorianDateTime(milli, true, t); - return true; -} - -bool DateInstance::getTime(double& milli, int& offset) const -{ - milli = internalNumber(); - if (isnan(milli)) - return false; - - GregorianDateTime t; - msToGregorianDateTime(milli, false, t); - offset = gmtoffset(t); - return true; -} - -bool DateInstance::getUTCTime(double& milli) const -{ - milli = internalNumber(); - if (isnan(milli)) - return false; - return true; } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.h b/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.h index 36d90b1..38b321c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.h @@ -32,27 +32,26 @@ namespace JSC { class DateInstance : public JSWrapperObject { public: DateInstance(ExecState*, double); - explicit DateInstance(NonNullPassRefPtr); - virtual ~DateInstance(); + explicit DateInstance(ExecState*, NonNullPassRefPtr); double internalNumber() const { return internalValue().uncheckedGetNumber(); } - bool getTime(WTF::GregorianDateTime&, int& offset) const; - bool getUTCTime(WTF::GregorianDateTime&) const; - bool getTime(double& milliseconds, int& offset) const; - bool getUTCTime(double& milliseconds) const; - static JS_EXPORTDATA const ClassInfo info; - void msToGregorianDateTime(double, bool outputIsUTC, WTF::GregorianDateTime&) const; + bool getGregorianDateTime(ExecState*, bool outputIsUTC, WTF::GregorianDateTime&) const; + + static PassRefPtr createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags)); + } + + protected: + static const unsigned StructureFlags = OverridesMarkChildren | JSWrapperObject::StructureFlags; private: virtual const ClassInfo* classInfo() const { return &info; } - using JSWrapperObject::internalValue; - - struct Cache; - mutable Cache* m_cache; + mutable RefPtr m_data; }; DateInstance* asDateInstance(JSValue); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstanceCache.h b/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstanceCache.h new file mode 100644 index 0000000..b626c1d --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstanceCache.h @@ -0,0 +1,89 @@ +/* + * 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 DateInstanceCache_h +#define DateInstanceCache_h + +#include +#include +#include +#include + +namespace JSC { + + extern const double NaN; + + class DateInstanceData : public RefCounted { + public: + static PassRefPtr create() { return adoptRef(new DateInstanceData); } + + double m_gregorianDateTimeCachedForMS; + WTF::GregorianDateTime m_cachedGregorianDateTime; + double m_gregorianDateTimeUTCCachedForMS; + WTF::GregorianDateTime m_cachedGregorianDateTimeUTC; + + private: + DateInstanceData() + : m_gregorianDateTimeCachedForMS(NaN) + , m_gregorianDateTimeUTCCachedForMS(NaN) + { + } + }; + + class DateInstanceCache { + public: + DateInstanceCache() + { + for (size_t i = 0; i < cacheSize; ++i) + m_cache[i].key = NaN; + } + + DateInstanceData* add(double d) + { + CacheEntry& entry = lookup(d); + if (d == entry.key) + return entry.value.get(); + + entry.key = d; + entry.value = DateInstanceData::create(); + return entry.value.get(); + } + + private: + static const size_t cacheSize = 64; + + struct CacheEntry { + double key; + RefPtr value; + }; + + CacheEntry& lookup(double d) { return m_cache[WTF::FloatHash::hash(d) & (cacheSize - 1)]; } + + CacheEntry m_cache[cacheSize]; + }; + +} // namespace JSC + +#endif // DateInstanceCache_h diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.cpp index e46ab67..3f3e1f9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.cpp @@ -251,11 +251,12 @@ static JSCell* formatLocaleDate(ExecState* exec, const GregorianDateTime& gdt, L return jsNontrivialString(exec, timebuffer); } -static JSCell* formatLocaleDate(ExecState* exec, DateInstance* dateObject, double timeInMilliseconds, LocaleDateTimeFormat format, const ArgList&) +static JSCell* formatLocaleDate(ExecState* exec, DateInstance* dateObject, double, LocaleDateTimeFormat format, const ArgList&) { GregorianDateTime gregorianDateTime; - const bool notUTC = false; - dateObject->msToGregorianDateTime(timeInMilliseconds, notUTC, gregorianDateTime); + const bool outputIsUTC = false; + if (!dateObject->getGregorianDateTime(exec, outputIsUTC, gregorianDateTime)) + return jsNontrivialString(exec, "Invalid Date"); return formatLocaleDate(exec, gregorianDateTime, format); } @@ -396,9 +397,8 @@ const ClassInfo DatePrototype::info = {"Date", &DateInstance::info, 0, ExecState // ECMA 15.9.4 DatePrototype::DatePrototype(ExecState* exec, NonNullPassRefPtr structure) - : DateInstance(structure) + : DateInstance(exec, structure) { - setInternalValue(jsNaN(exec)); // The constructor will be added later, after DateConstructor has been built. } @@ -420,16 +420,14 @@ JSValue JSC_HOST_CALL dateProtoFuncToString(ExecState* exec, JSObject*, JSValue if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNontrivialString(exec, "Invalid Date"); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); - return jsNontrivialString(exec, formatDate(t) + " " + formatTime(t, utc)); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNontrivialString(exec, "Invalid Date"); + return jsNontrivialString(exec, formatDate(t) + " " + formatTime(t, outputIsUTC)); } JSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) @@ -437,16 +435,14 @@ JSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState* exec, JSObject*, JSVal if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNontrivialString(exec, "Invalid Date"); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); - return jsNontrivialString(exec, formatDateUTCVariant(t) + " " + formatTime(t, utc)); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNontrivialString(exec, "Invalid Date"); + return jsNontrivialString(exec, formatDateUTCVariant(t) + " " + formatTime(t, outputIsUTC)); } JSValue JSC_HOST_CALL dateProtoFuncToISOString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) @@ -454,19 +450,17 @@ JSValue JSC_HOST_CALL dateProtoFuncToISOString(ExecState* exec, JSObject*, JSVal if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (!isfinite(milli)) - return jsNontrivialString(exec, "Invalid Date"); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNontrivialString(exec, "Invalid Date"); // Maximum amount of space we need in buffer: 6 (max. digits in year) + 2 * 5 (2 characters each for month, day, hour, minute, second) + 4 (. + 3 digits for milliseconds) // 6 for formatting and one for null termination = 27. We add one extra character to allow us to force null termination. char buffer[28]; - snprintf(buffer, sizeof(buffer) - 1, "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ", 1900 + t.year, t.month + 1, t.monthDay, t.hour, t.minute, t.second, static_cast(fmod(milli, 1000))); + snprintf(buffer, sizeof(buffer) - 1, "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ", 1900 + t.year, t.month + 1, t.monthDay, t.hour, t.minute, t.second, static_cast(fmod(thisDateObj->internalNumber(), 1000))); buffer[sizeof(buffer) - 1] = 0; return jsNontrivialString(exec, buffer); } @@ -476,15 +470,13 @@ JSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState* exec, JSObject*, JSVa if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNontrivialString(exec, "Invalid Date"); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNontrivialString(exec, "Invalid Date"); return jsNontrivialString(exec, formatDate(t)); } @@ -493,16 +485,14 @@ JSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState* exec, JSObject*, JSVa if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNontrivialString(exec, "Invalid Date"); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); - return jsNontrivialString(exec, formatTime(t, utc)); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNontrivialString(exec, "Invalid Date"); + return jsNontrivialString(exec, formatTime(t, outputIsUTC)); } JSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -511,11 +501,7 @@ JSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState* exec, JSObject*, JS return throwError(exec, TypeError); DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNontrivialString(exec, "Invalid Date"); - - return formatLocaleDate(exec, thisDateObj, milli, LocaleDateAndTime, args); + return formatLocaleDate(exec, thisDateObj, thisDateObj->internalNumber(), LocaleDateAndTime, args); } JSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -524,11 +510,7 @@ JSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState* exec, JSObject* return throwError(exec, TypeError); DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNontrivialString(exec, "Invalid Date"); - - return formatLocaleDate(exec, thisDateObj, milli, LocaleDate, args); + return formatLocaleDate(exec, thisDateObj, thisDateObj->internalNumber(), LocaleDate, args); } JSValue JSC_HOST_CALL dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) @@ -537,11 +519,7 @@ JSValue JSC_HOST_CALL dateProtoFuncToLocaleTimeString(ExecState* exec, JSObject* return throwError(exec, TypeError); DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNontrivialString(exec, "Invalid Date"); - - return formatLocaleDate(exec, thisDateObj, milli, LocaleTime, args); + return formatLocaleDate(exec, thisDateObj, thisDateObj->internalNumber(), LocaleTime, args); } JSValue JSC_HOST_CALL dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) @@ -549,12 +527,7 @@ JSValue JSC_HOST_CALL dateProtoFuncGetTime(ExecState* exec, JSObject*, JSValue t if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); - - return jsNumber(exec, milli); + return asDateInstance(thisValue)->internalValue(); } JSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) @@ -562,15 +535,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState* exec, JSObject*, JSVal if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, 1900 + t.year); } @@ -579,15 +550,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState* exec, JSObject*, JS if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, 1900 + t.year); } @@ -596,16 +565,14 @@ JSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec, JSObject*, JSVal if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNontrivialString(exec, "Invalid Date"); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); - return jsNontrivialString(exec, formatDateUTCVariant(t) + " " + formatTime(t, utc)); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNontrivialString(exec, "Invalid Date"); + return jsNontrivialString(exec, formatDateUTCVariant(t) + " " + formatTime(t, outputIsUTC)); } JSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValue thisValue, const ArgList&) @@ -613,15 +580,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState* exec, JSObject*, JSValue if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.month); } @@ -630,15 +595,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState* exec, JSObject*, JSVal if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.month); } @@ -647,15 +610,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState* exec, JSObject*, JSValue t if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.monthDay); } @@ -664,15 +625,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState* exec, JSObject*, JSValu if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.monthDay); } @@ -681,15 +640,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState* exec, JSObject*, JSValue th if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.weekDay); } @@ -698,15 +655,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState* exec, JSObject*, JSValue if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.weekDay); } @@ -715,15 +670,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState* exec, JSObject*, JSValue if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.hour); } @@ -732,15 +685,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState* exec, JSObject*, JSVal if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.hour); } @@ -749,15 +700,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState* exec, JSObject*, JSValu if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.minute); } @@ -766,15 +715,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState* exec, JSObject*, JSV if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.minute); } @@ -783,15 +730,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState* exec, JSObject*, JSValu if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.second); } @@ -800,15 +745,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState* exec, JSObject*, JSV if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = true; + const bool outputIsUTC = true; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, t.second); } @@ -847,15 +790,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec, JSObject*, if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); return jsNumber(exec, -gmtoffset(t) / minutesPerHour); } @@ -890,7 +831,7 @@ static JSValue setNewValueFromTimeArgs(ExecState* exec, JSValue thisValue, const double ms = milli - secs * msPerSecond; GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, inputIsUTC, t); + thisDateObj->getGregorianDateTime(exec, inputIsUTC, t); if (!fillStructuresUsingTimeArgs(exec, args, numArgsToUse, &ms, &t)) { JSValue result = jsNaN(exec); @@ -922,11 +863,11 @@ static JSValue setNewValueFromDateArgs(ExecState* exec, JSValue thisValue, const if (numArgsToUse == 3 && isnan(milli)) // Based on ECMA 262 15.9.5.40 - .41 (set[UTC]FullYear) // the time must be reset to +0 if it is NaN. - thisDateObj->msToGregorianDateTime(0, true, t); + WTF::msToGregorianDateTime(0, true, t); else { double secs = floor(milli / msPerSecond); ms = milli - secs * msPerSecond; - thisDateObj->msToGregorianDateTime(milli, inputIsUTC, t); + thisDateObj->getGregorianDateTime(exec, inputIsUTC, t); } if (!fillStructuresUsingDateArgs(exec, args, numArgsToUse, &ms, &t)) { @@ -1029,7 +970,7 @@ JSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue t if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); if (args.isEmpty()) { @@ -1045,11 +986,11 @@ JSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue t if (isnan(milli)) // Based on ECMA 262 B.2.5 (setYear) // the time must be reset to +0 if it is NaN. - thisDateObj->msToGregorianDateTime(0, true, t); + WTF::msToGregorianDateTime(0, true, t); else { double secs = floor(milli / msPerSecond); ms = milli - secs * msPerSecond; - thisDateObj->msToGregorianDateTime(milli, utc, t); + thisDateObj->getGregorianDateTime(exec, outputIsUTC, t); } bool ok = true; @@ -1061,7 +1002,7 @@ JSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue t } t.year = (year > 99 || year < 0) ? year - 1900 : year; - JSValue result = jsNumber(exec, gregorianDateTimeToMS(t, ms, utc)); + JSValue result = jsNumber(exec, gregorianDateTimeToMS(t, ms, outputIsUTC)); thisDateObj->setInternalValue(result); return result; } @@ -1071,15 +1012,13 @@ JSValue JSC_HOST_CALL dateProtoFuncGetYear(ExecState* exec, JSObject*, JSValue t if (!thisValue.inherits(&DateInstance::info)) return throwError(exec, TypeError); - const bool utc = false; + const bool outputIsUTC = false; DateInstance* thisDateObj = asDateInstance(thisValue); - double milli = thisDateObj->internalNumber(); - if (isnan(milli)) - return jsNaN(exec); GregorianDateTime t; - thisDateObj->msToGregorianDateTime(milli, utc, t); + if (!thisDateObj->getGregorianDateTime(exec, outputIsUTC, t)) + return jsNaN(exec); // NOTE: IE returns the full year even in getYear. return jsNumber(exec, t.year); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.h b/src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.h index 5fe4f47..f565775 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.h @@ -43,7 +43,7 @@ namespace JSC { } protected: - static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesMarkChildren | DateInstance::StructureFlags; + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | DateInstance::StructureFlags; }; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h index 16a5131..722ae33 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h @@ -59,6 +59,7 @@ namespace JSC { virtual bool isGetterSetter() const; bool inherits(const ClassInfo*) const; virtual bool isAPIValueWrapper() const { return false; } + virtual bool isPropertyNameIterator() const { return false; } Structure* structure() const; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSFunction.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSFunction.h index b4356c4..fcac9aa 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSFunction.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSFunction.h @@ -66,7 +66,7 @@ namespace JSC { NativeFunction nativeFunction() { - return *reinterpret_cast(m_data); + return *WTF::bitwise_cast(m_data); } virtual ConstructType getConstructData(ConstructData&); @@ -97,7 +97,7 @@ namespace JSC { ScopeChain& scopeChain() { ASSERT(!isHostFunctionNonInline()); - return *reinterpret_cast(m_data); + return *WTF::bitwise_cast(m_data); } void clearScopeChain() { @@ -112,11 +112,11 @@ namespace JSC { void setScopeChain(const ScopeChain& sc) { ASSERT(!isHostFunctionNonInline()); - *reinterpret_cast(m_data) = sc; + *WTF::bitwise_cast(m_data) = sc; } void setNativeFunction(NativeFunction func) { - *reinterpret_cast(m_data) = func; + *WTF::bitwise_cast(m_data) = func; } unsigned char m_data[sizeof(void*)]; }; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h index 3ad90ad..d2aa2da 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h @@ -30,6 +30,7 @@ #define JSGlobalData_h #include "Collector.h" +#include "DateInstanceCache.h" #include "ExecutableAllocator.h" #include "JITStubs.h" #include "JSValue.h" @@ -116,7 +117,8 @@ namespace JSC { const MarkedArgumentBuffer* emptyList; // Lists are supposed to be allocated on the stack to have their elements properly marked, which is not the case here - but this list has nothing to mark. SmallStrings smallStrings; NumericStrings numericStrings; - + DateInstanceCache dateInstanceCache; + #if ENABLE(ASSEMBLER) ExecutableAllocator executableAllocator; #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h index 1dbab94..5a89c40 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h @@ -202,8 +202,8 @@ namespace JSC { void allocatePropertyStorageInline(size_t oldSize, size_t newSize); bool isUsingInlineStorage() const { return m_structure->isUsingInlineStorage(); } - static const size_t inlineStorageCapacity = sizeof(EncodedJSValue) == 2 * sizeof(void*) ? 4 : 3; - static const size_t nonInlineBaseStorageCapacity = 16; + static const unsigned inlineStorageCapacity = sizeof(EncodedJSValue) == 2 * sizeof(void*) ? 4 : 3; + static const unsigned nonInlineBaseStorageCapacity = 16; static PassRefPtr createStructure(JSValue prototype) { diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.cpp index 2cd9f75..6fd0344 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.cpp @@ -43,7 +43,12 @@ JSPropertyNameIterator* JSPropertyNameIterator::create(ExecState* exec, JSObject PropertyNameArray propertyNames(exec); o->getPropertyNames(exec, propertyNames); - JSPropertyNameIterator* jsPropertyNameIterator = new (exec) JSPropertyNameIterator(exec, propertyNames.data()); + size_t numCacheableSlots = 0; + if (!o->structure()->hasNonEnumerableProperties() && !o->structure()->hasAnonymousSlots() && + !o->structure()->isUncacheableDictionary() && !o->structure()->typeInfo().overridesGetPropertyNames()) + numCacheableSlots = o->structure()->propertyStorageSize(); + + JSPropertyNameIterator* jsPropertyNameIterator = new (exec) JSPropertyNameIterator(exec, propertyNames.data(), numCacheableSlots); if (o->structure()->isDictionary()) return jsPropertyNameIterator; diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.h index 0559e0b..529ae8b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.h @@ -50,8 +50,18 @@ namespace JSC { return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren)); } + virtual bool isPropertyNameIterator() const { return true; } + virtual void markChildren(MarkStack&); + bool getOffset(size_t i, int& offset) + { + if (i >= m_numCacheableSlots) + return false; + offset = i; + return true; + } + JSValue get(ExecState*, JSObject*, size_t i); size_t size() { return m_jsStringsSize; } @@ -62,17 +72,19 @@ namespace JSC { StructureChain* cachedPrototypeChain() { return m_cachedPrototypeChain.get(); } private: - JSPropertyNameIterator(ExecState*, PropertyNameArrayData* propertyNameArrayData); + JSPropertyNameIterator(ExecState*, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlot); Structure* m_cachedStructure; RefPtr m_cachedPrototypeChain; - size_t m_jsStringsSize; + uint32_t m_numCacheableSlots; + uint32_t m_jsStringsSize; OwnArrayPtr m_jsStrings; }; -inline JSPropertyNameIterator::JSPropertyNameIterator(ExecState* exec, PropertyNameArrayData* propertyNameArrayData) +inline JSPropertyNameIterator::JSPropertyNameIterator(ExecState* exec, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlots) : JSCell(exec->globalData().propertyNameIteratorStructure.get()) , m_cachedStructure(0) + , m_numCacheableSlots(numCacheableSlots) , m_jsStringsSize(propertyNameArrayData->propertyNameVector().size()) , m_jsStrings(new JSValue[m_jsStringsSize]) { diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp index a11050f..65b62f9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp @@ -375,6 +375,7 @@ PassRefPtr Structure::addPropertyTransition(Structure* structure, con transition->m_specificValueInPrevious = specificValue; transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; + transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; if (structure->m_propertyTable) { if (structure->m_isPinnedPropertyTable) @@ -417,6 +418,7 @@ PassRefPtr Structure::changePrototypeTransition(Structure* structure, transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; + transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; // Don't set m_offset, as one can not transition to this. @@ -433,6 +435,7 @@ PassRefPtr Structure::despecifyFunctionTransition(Structure* structur transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; + transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; // Don't set m_offset, as one can not transition to this. @@ -464,6 +467,7 @@ PassRefPtr Structure::addAnonymousSlotsTransition(Structure* structur transition->m_specificValueInPrevious = 0; transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; + transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; if (structure->m_propertyTable) { if (structure->m_isPinnedPropertyTable) @@ -492,6 +496,7 @@ PassRefPtr Structure::getterSetterTransition(Structure* structure) RefPtr transition = create(structure->storedPrototype(), structure->typeInfo()); transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; transition->m_hasGetterSetterProperties = transition->m_hasGetterSetterProperties; + transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; // Don't set m_offset, as one can not transition to this. @@ -510,6 +515,7 @@ PassRefPtr Structure::toDictionaryTransition(Structure* structure, Di transition->m_dictionaryKind = kind; transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; + transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; structure->materializePropertyMapIfNecessary(); transition->m_propertyTable = structure->copyPropertyTable(); @@ -550,6 +556,9 @@ size_t Structure::addPropertyWithoutTransition(const Identifier& propertyName, u materializePropertyMapIfNecessary(); m_isPinnedPropertyTable = true; + if (attributes & DontEnum) + m_hasNonEnumerableProperties = true; + size_t offset = put(propertyName, attributes, specificValue); if (propertyStorageSize() > propertyStorageCapacity()) growPropertyStorageCapacity(); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h index 2496c1b..f355c53 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h @@ -95,8 +95,8 @@ namespace JSC { Structure* previousID() const { return m_previous.get(); } void growPropertyStorageCapacity(); - size_t propertyStorageCapacity() const { return m_propertyStorageCapacity; } - size_t propertyStorageSize() const { return m_propertyTable ? m_propertyTable->keyCount + m_propertyTable->anonymousSlotCount + (m_propertyTable->deletedOffsets ? m_propertyTable->deletedOffsets->size() : 0) : m_offset + 1; } + unsigned propertyStorageCapacity() const { return m_propertyStorageCapacity; } + unsigned propertyStorageSize() const { return m_propertyTable ? m_propertyTable->keyCount + m_propertyTable->anonymousSlotCount + (m_propertyTable->deletedOffsets ? m_propertyTable->deletedOffsets->size() : 0) : m_offset + 1; } bool isUsingInlineStorage() const; size_t get(const Identifier& propertyName); @@ -119,6 +119,10 @@ namespace JSC { bool hasGetterSetterProperties() const { return m_hasGetterSetterProperties; } void setHasGetterSetterProperties(bool hasGetterSetterProperties) { m_hasGetterSetterProperties = hasGetterSetterProperties; } + bool hasNonEnumerableProperties() const { return m_hasNonEnumerableProperties; } + + bool hasAnonymousSlots() const { return m_propertyTable && m_propertyTable->anonymousSlotCount; } + bool isEmpty() const { return m_propertyTable ? !m_propertyTable->keyCount : m_offset == noOffset; } JSCell* specificValue() { return m_specificValueInPrevious; } @@ -190,12 +194,13 @@ namespace JSC { PropertyMapHashTable* m_propertyTable; - size_t m_propertyStorageCapacity; + uint32_t m_propertyStorageCapacity; signed char m_offset; unsigned m_dictionaryKind : 2; bool m_isPinnedPropertyTable : 1; bool m_hasGetterSetterProperties : 1; + bool m_hasNonEnumerableProperties : 1; #if COMPILER(WINSCW) // Workaround for Symbian WINSCW compiler that cannot resolve unsigned type of the declared // bitfield, when used as argument in make_pair() function calls in structure.ccp. diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/CurrentTime.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/CurrentTime.cpp index a3d5290..b36cae5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/CurrentTime.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/CurrentTime.cpp @@ -63,6 +63,10 @@ extern "C" time_t mktime(struct tm *t); #include #endif +#if PLATFORM(CHROMIUM) +#error Chromium uses a different timer implementation +#endif + namespace WTF { const double msPerSecond = 1000.0; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp index 0386494..2110432 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp @@ -501,13 +501,13 @@ double gregorianDateTimeToMS(const GregorianDateTime& t, double milliSeconds, bo return result; } +// input is UTC void msToGregorianDateTime(double ms, bool outputIsUTC, GregorianDateTime& tm) { - // input is UTC double dstOff = 0.0; - const double utcOff = getUTCOffset(); - - if (!outputIsUTC) { // convert to local time + double utcOff = 0.0; + if (!outputIsUTC) { + utcOff = getUTCOffset(); dstOff = getDSTOffset(ms, utcOff); ms += dstOff + utcOff; } @@ -522,8 +522,7 @@ void msToGregorianDateTime(double ms, bool outputIsUTC, GregorianDateTime& tm) tm.month = monthFromDayInYear(tm.yearDay, isLeapYear(year)); tm.year = year - 1900; tm.isDST = dstOff != 0.0; - - tm.utcOffset = outputIsUTC ? 0 : static_cast((dstOff + utcOff) / msPerSecond); + tm.utcOffset = static_cast((dstOff + utcOff) / msPerSecond); tm.timeZone = NULL; } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h index ca0961c..541b05d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h @@ -26,13 +26,19 @@ #include #include +#if COMPILER(GCC) +#define WTF_FAST_MALLOC_EXPORT __attribute__((visibility("default"))) +#else +#define WTF_FAST_MALLOC_EXPORT +#endif + namespace WTF { // These functions call CRASH() if an allocation fails. - void* fastMalloc(size_t); + void* fastMalloc(size_t) WTF_FAST_MALLOC_EXPORT; void* fastZeroedMalloc(size_t); - void* fastCalloc(size_t numElements, size_t elementSize); - void* fastRealloc(void*, size_t); + void* fastCalloc(size_t numElements, size_t elementSize) WTF_FAST_MALLOC_EXPORT; + void* fastRealloc(void*, size_t) WTF_FAST_MALLOC_EXPORT; struct TryMallocReturnValue { TryMallocReturnValue(void* data) @@ -71,7 +77,7 @@ namespace WTF { TryMallocReturnValue tryFastCalloc(size_t n_elements, size_t element_size); TryMallocReturnValue tryFastRealloc(void* p, size_t n); - void fastFree(void*); + void fastFree(void*) WTF_FAST_MALLOC_EXPORT; #ifndef NDEBUG void fastMallocForbid(); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h index 12291cc..9c9a4a7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h @@ -55,9 +55,13 @@ namespace WTF { bool waitForMessage(DataType&); template MessageQueueWaitResult waitForMessageFilteredWithTimeout(DataType&, Predicate&, double absoluteTime); - void kill(); + + template + void removeIf(Predicate&); bool tryGetMessage(DataType&); + + void kill(); bool killed() const; // The result of isEmpty() is only valid if no other thread is manipulating the queue at the same time. @@ -149,6 +153,17 @@ namespace WTF { } template + template + inline void MessageQueue::removeIf(Predicate& predicate) + { + MutexLocker lock(m_mutex); + DequeConstIterator found = m_queue.end(); + while ((found = m_queue.findIf(predicate)) != m_queue.end()) { + m_queue.remove(found); + } + } + + template inline bool MessageQueue::isEmpty() { MutexLocker lock(m_mutex); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index 7151b514..7632435 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -466,6 +466,7 @@ #if PLATFORM(MAC) && !PLATFORM(IPHONE) #define WTF_PLATFORM_CF 1 #define WTF_USE_PTHREADS 1 +#define HAVE_PTHREAD_RWLOCK 1 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER) && defined(__x86_64__) #define WTF_USE_PLUGIN_HOST_PROCESS 1 #endif @@ -482,6 +483,7 @@ #if PLATFORM(CHROMIUM) && PLATFORM(DARWIN) #define WTF_PLATFORM_CF 1 #define WTF_USE_PTHREADS 1 +#define HAVE_PTHREAD_RWLOCK 1 #endif #if PLATFORM(IPHONE) @@ -498,6 +500,7 @@ #define HAVE_READLINE 1 #define WTF_PLATFORM_CF 1 #define WTF_USE_PTHREADS 1 +#define HAVE_PTHREAD_RWLOCK 1 #endif #if PLATFORM(WIN) @@ -511,6 +514,7 @@ #if PLATFORM(GTK) #if HAVE(PTHREAD_H) #define WTF_USE_PTHREADS 1 +#define HAVE_PTHREAD_RWLOCK 1 #endif #endif @@ -518,6 +522,7 @@ #define HAVE_POSIX_MEMALIGN 1 #define WTF_USE_CURL 1 #define WTF_USE_PTHREADS 1 +#define HAVE_PTHREAD_RWLOCK 1 #define USE_SYSTEM_MALLOC 1 #define ENABLE_NETSCAPE_PLUGIN_API 0 #endif @@ -698,7 +703,7 @@ #endif #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64) -#if PLATFORM(X86_64) && (PLATFORM(DARWIN) || PLATFORM(LINUX)) +#if PLATFORM(X86_64) && (PLATFORM(DARWIN) || PLATFORM(LINUX) || PLATFORM(WIN_OS)) #define WTF_USE_JSVALUE64 1 #elif PLATFORM(ARM) || PLATFORM(PPC64) #define WTF_USE_JSVALUE32 1 @@ -725,8 +730,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ #define ENABLE_JIT 1 #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1 #elif PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE) - /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ - #define ENABLE_JIT 0 + #define ENABLE_JIT 1 #define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 0 /* The JIT is tested & working on x86 Windows */ #elif PLATFORM(X86) && PLATFORM(WIN) @@ -792,8 +796,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ /* YARR supports x86 & x86-64, and has been tested on Mac and Windows. */ #if (PLATFORM(X86) && PLATFORM(MAC)) \ || (PLATFORM(X86_64) && PLATFORM(MAC)) \ - /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ \ - || (PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE) && 0) \ + || (PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE)) \ || (PLATFORM(X86) && PLATFORM(WIN)) #define ENABLE_YARR 1 #define ENABLE_YARR_JIT 1 diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/StdLibExtras.h b/src/3rdparty/webkit/JavaScriptCore/wtf/StdLibExtras.h index d21d1ff..c9b5742 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/StdLibExtras.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/StdLibExtras.h @@ -32,6 +32,7 @@ // Use these to declare and define a static local variable (static T;) so that // it is leaked so that its destructors are not called at exit. Using this // macro also allows workarounds a compiler bug present in Apple's version of GCC 4.0.1. +#ifndef DEFINE_STATIC_LOCAL #if COMPILER(GCC) && defined(__APPLE_CC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 1 #define DEFINE_STATIC_LOCAL(type, name, arguments) \ static type* name##Ptr = new type arguments; \ @@ -40,6 +41,7 @@ #define DEFINE_STATIC_LOCAL(type, name, arguments) \ static type& name = *new type arguments #endif +#endif // OBJECT_OFFSETOF: Like the C++ offsetof macro, but you can use it with classes. // The magic number 0x4000 is insignificant. We use it to avoid using NULL, since diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp index 56bf438..1d4185c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp @@ -51,7 +51,7 @@ static void* threadEntryPoint(void* contextData) setThreadNameInternal(context->name); - // Block until our creating thread has completed any extra setup work + // Block until our creating thread has completed any extra setup work. { MutexLocker locker(context->creationMutex); } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h index 5154545..71c9402 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h @@ -128,7 +128,11 @@ void detachThread(ThreadIdentifier); #if USE(PTHREADS) typedef pthread_mutex_t PlatformMutex; +#if HAVE(PTHREAD_RWLOCK) typedef pthread_rwlock_t PlatformReadWriteLock; +#else +typedef void* PlatformReadWriteLock; +#endif typedef pthread_cond_t PlatformCondition; #elif PLATFORM(GTK) typedef GOwnPtr PlatformMutex; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp index e4fb419..6cad5e3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp @@ -167,6 +167,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con if (pthread_create(&threadHandle, 0, runThreadWithRegistration, static_cast(threadData))) { LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data); + delete threadData; return 0; } return establishIdentifierForPthreadHandle(threadHandle); @@ -270,7 +271,7 @@ void Mutex::unlock() ASSERT_UNUSED(result, !result); } - +#if HAVE(PTHREAD_RWLOCK) ReadWriteLock::ReadWriteLock() { pthread_rwlock_init(&m_readWriteLock, NULL); @@ -324,6 +325,7 @@ void ReadWriteLock::unlock() int result = pthread_rwlock_unlock(&m_readWriteLock); ASSERT_UNUSED(result, !result); } +#endif // HAVE(PTHREAD_RWLOCK) ThreadCondition::ThreadCondition() { diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp index aafea3c..d088086 100644 --- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp @@ -1490,7 +1490,7 @@ public: closeBodyAlternative(); } - void alterantiveBodyDisjunction() + void alternativeBodyDisjunction() { int newAlternativeIndex = m_bodyDisjunction->terms.size(); m_bodyDisjunction->terms[m_currentAlternativeIndex].alternative.next = newAlternativeIndex - m_currentAlternativeIndex; @@ -1499,7 +1499,7 @@ public: m_currentAlternativeIndex = newAlternativeIndex; } - void alterantiveDisjunction() + void alternativeDisjunction() { int newAlternativeIndex = m_bodyDisjunction->terms.size(); m_bodyDisjunction->terms[m_currentAlternativeIndex].alternative.next = newAlternativeIndex - m_currentAlternativeIndex; @@ -1515,9 +1515,9 @@ public: if (alt) { if (disjunction == m_pattern.m_body) - alterantiveBodyDisjunction(); + alternativeBodyDisjunction(); else - alterantiveDisjunction(); + alternativeDisjunction(); } PatternAlternative* alternative = disjunction->m_alternatives[alt]; diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp index b635a45..5ce579a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp @@ -1264,7 +1264,7 @@ class RegexGenerator : private MacroAssembler { // complex here in compilation, and in the common case we should end up coallescing the checks. // // FIXME: a nice improvement here may be to stop trying to match sooner, based on the least - // of the minimum-alterantive-lengths. E.g. if I have two alternatives of length 200 and 150, + // of the minimum-alternative-lengths. E.g. if I have two alternatives of length 200 and 150, // and a string of length 100, we'll end up looping index from 0 to 100, checking whether there // is sufficient input to run either alternative (constantly failing). If there had been only // one alternative, or if the shorter alternative had come first, we would have terminated @@ -1309,9 +1309,6 @@ class RegexGenerator : private MacroAssembler { loadPtr(Address(X86Registers::ebp, 2 * sizeof(void*)), output); #endif #elif PLATFORM(ARM) -#if PLATFORM(ARM_TRADITIONAL) - push(ARMRegisters::lr); -#endif push(ARMRegisters::r4); push(ARMRegisters::r5); push(ARMRegisters::r6); diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 488c6a0..98f007c 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-22102009 branch/tag + qtwebkit-4.6-snapshot-20091003 branch/tag and has the sha1 checksum - 0639bb8e812c8923287cd5523248ca64fa5f7a50 + 8f810287200d21aded375664cc0a6ac0476dbdea diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 4e5dff8..2b36014 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,4260 @@ +2009-11-02 Tor Arne Vestbø + + Rubber-stamped by Antti Koivisto. + + [Qt] Build fix for Windows CE + + * plugins/PluginDatabase.cpp: + +2009-11-02 Jocelyn Turcotte + + Reviewed by Tor Arne Vestbø. + + [Qt] Fix Qt build on Windows. + https://bugs.webkit.org/show_bug.cgi?id=30905 + + * WebCore.pro: + * platform/graphics/BitmapImage.h: + * platform/graphics/qt/ImageQt.cpp: + (WebCore::BitmapImage::BitmapImage): + (WebCore::BitmapImage::create): + +2009-10-28 Adam Barth + + Reviewed by Eric Seidel. + + Don't run JavaScript URLs in view source mode + https://bugs.webkit.org/show_bug.cgi?id=30881 + + Just say no. + + Test: http/tests/security/view-source-no-javascript-url.html + + * bindings/ScriptControllerBase.cpp: + (WebCore::ScriptController::executeIfJavaScriptURL): + +2009-10-29 Gustavo Noronha Silva + + Unreviewed. Fixes style problems pointed out by Evan Martin. + + * platform/gtk/Language.cpp: + (WebCore::defaultLanguage): + +2009-10-29 Dan Bernstein + + Rubber-stamped by Mark Rowe. + + 64-bit Leopard build fix after r50259 + + * platform/graphics/mac/ComplexTextControllerATSUI.cpp: + Declared ATSUTextInserted in 64-bit. + (WebCore::fontHasMirroringInfo): Use %d format and cast to int. + (WebCore::disableLigatures): Ditto. + (WebCore::initializeATSUStyle): Ditto. + (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Ditto. + +2009-10-29 Dan Bernstein + + Tiger build fix after r50259 + + * platform/graphics/mac/ComplexTextController.h: + * platform/graphics/mac/ComplexTextControllerATSUI.cpp: + +2009-10-29 Dan Bernstein + + Attempted Tiger build fix after r50259 + + * platform/graphics/mac/ComplexTextControllerATSUI.cpp: + +2009-10-28 Steve Falkenburg + + Rubber stamped by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=30899 + WebKit fails to build release on 32-bit Windows systems + + * WebCore.vcproj/WebCore.vcproj: Excluded files from project. + * bindings/js/JSBindingsAllInOne.cpp: Added. + +2009-10-28 Dan Bernstein + + Reviewed by Jon Honeycutt. + + Fixed typos in color names. + + * inspector/front-end/Color.js: + +2009-10-28 Dan Bernstein + + Reviewed by Sam Weinig. + + Share code between the ATSUI- and Core Text-based Font implementations by doing the + following: + - Generalize CoreTextController as ComplexTextController, keeping the Core Text-specific + parts in ComplexTextControllerCoreText.cpp. + - Generalize FontMacCoreText as FontComplexTextMac using ComplexTextController + - Implement ATSUI-specific parts of ComplexTextController in ComplexTextControllerATSUI. + - Remove FontMacATSUI. + + * WebCore.xcodeproj/project.pbxproj: Removed CoreTextController.{cpp,h}, FontMacATSUI.mm, + and FontMacCoreText.cpp, and added ComplexTextController.{cpp,h}, + ComplexTextControllerATSUI.cpp, ComplexTextControllerCoreText.cpp, and + FontComplexTextMac.cpp. + + * platform/graphics/mac/ComplexTextController.cpp: Copied from CoreTextController.cpp and + kept the non-Core Text-specific bits. + (WebCore::ComplexTextController::ComplexTextController): Updated for renames, including + its own. + (WebCore::ComplexTextController::offsetForPosition): Updated for renames and for + m_complexTextRuns holding references instead of objects. + (WebCore::ComplexTextController::collectComplexTextRuns): Updated for renames, including + its own. + (WebCore::ComplexTextController::advance): Updated for renames. + (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Updated for renames and for + m_complexTextRuns holding references instead of objects, and changed to use the glyphs() + and advances() accessors. + + * platform/graphics/mac/ComplexTextController.h: Copied from CoreTextController.h and + renamed CoreTextController to ComplexTextController and CoreTextRun to ComplexTextRun. Made + the latter RefCounted, added ATSUI-specific members to it, and made some other members + Core Text-specific. Renamed m_coreTextRuns to m_complexTextRuns and made it hold references + rather than objects. + (WebCore::ComplexTextController::ComplexTextRun::create): + (WebCore::ComplexTextController::ComplexTextRun::glyphs): + (WebCore::ComplexTextController::ComplexTextRun::advances): + + * platform/graphics/mac/ComplexTextControllerATSUI.cpp: Added. Includes ATSUI-specific + parts of the ComplexTextController implementation. + (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): This ATSUI + callback populates the ComplexTextRun’s glyphs, advances and indices vectors. It is invoked + when the ComplexTextRun constructor calls ATSUGetGlyphBounds(). + (WebCore::isArabicLamWithAlefLigature): Helper function, copied from FontMacATSUI.mm. + (WebCore::shapeArabic): Helper function, adapted from FontMacATSUI.mm. + (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Sets up the + ATSUTextLayout, substituting the text buffer if necessary for things like shaping Arabic, + mirroring glyphs or directionality overrides, then calls ATSUGetGlyphBounds() in order to + get the glyphs, advances and indices vectors populated. + (WebCore::fontHasMirroringInfo): Helper function, copied from FontMacATSUI.mm. + (WebCore::disableLigatures): Ditto. + (WebCore::initializeATSUStyle): Ditto, somewhat cleaned up and simplified. + (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Constructs + ComplexTextRuns, either missing-glyphs ones or ATSUTextLayout-based ones. + + * platform/graphics/mac/ComplexTextControllerCoreText.cpp: Copied from + CoreTextController.cpp and kept the Core Text-specific bits. + (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Updated for renames, + including its own, and moved the code to initialize m_glyphs and m_advances here. Previously + this was done in adjustGlyphsAndAdvances(). + (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Updated for renames, + including its own. + * platform/graphics/mac/CoreTextController.cpp: Removed. + * platform/graphics/mac/CoreTextController.h: Removed. + * platform/graphics/mac/FontComplexTextMac.cpp: Renamed FontMacCoreText.cpp to this. + (WebCore::Font::selectionRectForComplexText): Changed to use ComplexTextController instead + of CoreTextController. + (WebCore::Font::drawComplexText): Ditto. + (WebCore::Font::floatWidthForComplexText): Ditto. + (WebCore::Font::offsetForPositionForComplexText): Ditto. + * platform/graphics/mac/FontMacATSUI.mm: Removed. + * platform/graphics/mac/FontMacCoreText.cpp: Removed. + +2009-10-27 Chris Fleizach + + Reviewed by Darin Adler. + + WAI-ARIA: add support for 'option' role + https://bugs.webkit.org/show_bug.cgi?id=30843 + + Test: accessibility/aria-option-role.html + + * accessibility/AccessibilityListBoxOption.h: + (WebCore::AccessibilityListBoxOption::canHaveChildren): + * accessibility/AccessibilityRenderObject.cpp: + (WebCore::RoleEntry::): + (WebCore::AccessibilityRenderObject::canHaveChildren): + +2009-10-28 Jens Alfke + + Reviewed by Eric Seidel. + + Fix GCC compiler warnings in WebCore, and enable -Wall and -Werror for Chromium build. + https://bugs.webkit.org/show_bug.cgi?id=30716 + + * WebCore.gyp/WebCore.gyp: Enable "chromium_code" flag, just on Mac build for now. + * accessibility/AccessibilityRenderObject.cpp: + (WebCore::createARIARoleMap): Fix struct visibiity warning. + * bindings/v8/ScriptCallStack.h: Fix out-of-order member initialization warning. + * bindings/v8/V8Collection.h: + (WebCore::getV8Object): Function in header should not be 'static' (fixes unused-static warning.) + * bindings/v8/V8DOMWrapper.cpp: + (WebCore::V8DOMWrapper::convertNewNodeToV8Object): Fix signed/unsigned comparison warning. + * bindings/v8/V8GCController.cpp: + (WebCore::ObjectGrouperVisitor::applyGrouping): Fix unused-variable warning. + * css/CSSPrimitiveValueMappings.h: + (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Enable ListButtonPart case to avoid + warning about missing cases in 'switch' statement. + * editing/EditorCommand.cpp: + (WebCore::createCommandMap): Fix struct visibiity warning. + * platform/graphics/skia/PlatformContextSkia.cpp: + (PlatformContextSkia::State::State): Fix out-of-order member initialization warning. + * rendering/RenderMediaControlsChromium.cpp: + (WebCore::RenderMediaControlsChromium::shouldRenderMediaControlPart): Add empty 'default' case in + 'switch' statement to avoid missing-case warning. + (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Ditto. + * xml/XPathFunctions.cpp: + (WebCore::XPath::createFunctionMap): Fix struct visibiity warning. + +2009-10-29 Adam Barth + + Reviewed by Darin Adler. + + REGRESSION: crashes in WebCore::RedirectScheduler::timerFired(WebCore::Timer*) + https://bugs.webkit.org/show_bug.cgi?id=30839 + + Added null check for the case when the frame is detached from the page. + + * loader/RedirectScheduler.cpp: + (WebCore::RedirectScheduler::timerFired): + +2009-10-28 Joanmarie Diggs + + Reviewed by Xan Lopez. + + https://bugs.webkit.org/show_bug.cgi?id=30817 + Use parentObjectUnignored instead of parentObject in webkit_accessible_get_parent + + Also removes the hack I had originally added to solve bug 25411, because + the fix here is what I should have done in the first place. + + * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: + (webkit_accessible_get_parent): + +2009-10-28 Dmitry Titov + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=30805 + Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue. + Existing Database tests cover this, no change in functionality. + + * storage/DatabaseThread.cpp: + (WebCore::SameDatabasePredicate::SameDatabasePredicate): Added predicate that flags the tasks belonging to a specified database. + (WebCore::SameDatabasePredicate::operator()): + (WebCore::DatabaseThread::unscheduleDatabaseTasks): changed to use the new removeIf method. + +2009-10-28 Pavel Feldman + + Reviewed by Timothy Hatcher. + + Web Inspector: Glue subsequent timeline records with same category + and title together. + + https://bugs.webkit.org/show_bug.cgi?id=30885 + + * English.lproj/localizedStrings.js: + * inspector/front-end/TimelinePanel.js: + (WebInspector.TimelinePanel.prototype.addRecordToTimeline): + (WebInspector.TimelinePanel.prototype._formatRecord): + (WebInspector.TimelineRecordTreeElement.prototype.onattach): + (WebInspector.TimelineRecordTreeElement.prototype.refresh): + +2009-10-28 Gustavo Noronha Silva + + Reviewed by Xan Lopez. + + [GTK] Fails new test fast/js/navigator-language.html + https://bugs.webkit.org/show_bug.cgi?id=30440 + + Reimplement WebCore::defaultLanguage to account for changes in + locale done by setLocale. + + Already existing test: fast/js/navigator-language.html + + * platform/gtk/Language.cpp: + (WebCore::defaultLanguage): + +2009-10-28 Eric Carlson + + Reviewed by Simon Fraser. + + + Can't exit full screen mode or restart movie after pressing command -R. + + * html/HTMLMediaElement.cpp: + (WebCore::HTMLMediaElement::removedFromDocument): + (WebCore::HTMLMediaElement::documentWillBecomeInactive): + Exit from fullscreen if necessary. + * html/HTMLMediaElement.h: + +2009-10-28 Alexey Proskuryakov + + Unreviewed - a trivial fix to get Windows bots running. + + https://bugs.webkit.org/show_bug.cgi?id=30841 + WebKit should not pass Referer header through a redirect to a non-secure site + + * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::setHeaderFields): Don't try to + access empty vector's data. + +2009-10-28 Joanmarie Diggs + + Reviewed by Xan Lopez. + + https://bugs.webkit.org/show_bug.cgi?id=25897 + [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries + + Remove the extraneous object of ROLE_PANEL. + + * accessibility/gtk/AccessibilityObjectAtk.cpp: + (AccessibilityObject::accessibilityPlatformIncludesObject): + +2009-10-28 Jonathan Dixon + + Reviewed by Eric Seidel. + + Bug 30547: (Chromium) searchbox not rendered properly due to the css property -webkit-border-radius + https://bugs.webkit.org/show_bug.cgi?id=30547 + + Test: fast/css/text-input-with-webkit-border-radius.html + + * rendering/RenderThemeChromiumWin.cpp: + (WebCore::RenderThemeChromiumWin::paintTextFieldInternal): + Implemented rounded border rendering in Chromium Windows theme renderer. + +2009-10-28 Pavel Feldman + + Reviewed by Timothy Hatcher. + + Web Inspector: Pull items collections from resources panel and + timeline panel into AbstractTimelinePanel. + + https://bugs.webkit.org/show_bug.cgi?id=30875 + + * inspector/front-end/AbstractTimelinePanel.js: + (WebInspector.AbstractTimelinePanel): + (WebInspector.AbstractTimelinePanel.prototype.populateSidebar): + (WebInspector.AbstractTimelinePanel.prototype.createItemTreeElement): + (WebInspector.AbstractTimelinePanel.prototype.createItemGraph): + (WebInspector.AbstractTimelinePanel.prototype._showCategory): + (WebInspector.AbstractTimelinePanel.prototype._hideCategory): + (WebInspector.AbstractTimelinePanel.prototype.filter): + (WebInspector.AbstractTimelinePanel.prototype._createGraph): + (WebInspector.AbstractTimelinePanel.prototype.updateMainViewWidth): + (WebInspector.AbstractTimelinePanel.prototype.refresh): + (WebInspector.AbstractTimelinePanel.prototype.reset): + (WebInspector.AbstractTimelinePanel.prototype.get calculator): + (WebInspector.AbstractTimelinePanel.prototype.set calculator): + (WebInspector.AbstractTimelinePanel.prototype.addItem): + (WebInspector.AbstractTimelinePanel.prototype.removeItem): + (WebInspector.AbstractTimelinePanel.prototype.refreshItem): + (WebInspector.AbstractTimelinePanel.prototype.revealAndSelectItem): + (WebInspector.AbstractTimelinePanel.prototype.sortItems): + (WebInspector.AbstractTimelinePanel.prototype.adjustScrollPosition): + (WebInspector.AbstractTimelineCategory): + (WebInspector.AbstractTimelineCategory.prototype.toString): + * inspector/front-end/ResourceCategory.js: + (WebInspector.ResourceCategory): + * inspector/front-end/ResourcesPanel.js: + (WebInspector.ResourcesPanel): + (WebInspector.ResourcesPanel.prototype.createItemTreeElement): + (WebInspector.ResourcesPanel.prototype.createItemGraph): + (WebInspector.ResourcesPanel.prototype.isCategoryVisible): + (WebInspector.ResourcesPanel.prototype.populateSidebar): + (WebInspector.ResourcesPanel.prototype.get searchableViews): + (WebInspector.ResourcesPanel.prototype.get searchResultsSortFunction.sortFuction): + (WebInspector.ResourcesPanel.prototype.get searchResultsSortFunction): + (WebInspector.ResourcesPanel.prototype.searchMatchFound): + (WebInspector.ResourcesPanel.prototype.searchCanceled): + (WebInspector.ResourcesPanel.prototype.performSearch): + (WebInspector.ResourcesPanel.prototype.refresh): + (WebInspector.ResourcesPanel.prototype.reset): + (WebInspector.ResourcesPanel.prototype.removeResource): + (WebInspector.ResourcesPanel.prototype.addMessageToResource): + (WebInspector.ResourcesPanel.prototype.clearMessages): + (WebInspector.ResourcesPanel.prototype.refreshResource): + (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded): + (WebInspector.ResourcesPanel.prototype.showResource): + (WebInspector.ResourcesPanel.prototype._sortResourcesIfNeeded): + (WebInspector.ResourcesPanel.prototype._toggleLargerResources): + (WebInspector.ResourcesPanel.prototype._toggleResourceTracking): + (WebInspector.ResourcesPanel.prototype.get _resources): + (WebInspector.ResourceTimeCalculator.prototype._upperBound): + * inspector/front-end/TimelinePanel.js: + (WebInspector.TimelinePanel): + (WebInspector.TimelinePanel.prototype.get categories): + (WebInspector.TimelinePanel.prototype.populateSidebar): + (WebInspector.TimelinePanel.prototype.addRecordToTimeline): + (WebInspector.TimelinePanel.prototype.createItemTreeElement): + (WebInspector.TimelinePanel.prototype.createItemGraph): + (WebInspector.TimelinePanel.prototype._formatRecord): + (WebInspector.TimelineCategory): + * inspector/front-end/inspector.css: + * inspector/front-end/inspector.html: + +2009-10-28 Kelly Norton + + Reviewed by Pavel Feldman. + + Resets InspectorFrontend in InspectorTimelineAgent instead of removing it so + that it remains active on refreshs and page transitions. + https://bugs.webkit.org/show_bug.cgi?id=30874 + + * inspector/InspectorController.cpp: + (WebCore::InspectorController::setFrontendProxyObject): + * inspector/InspectorTimelineAgent.cpp: + (WebCore::InspectorTimelineAgent::resetFrontendProxyObject): + * inspector/InspectorTimelineAgent.h: + +2009-10-27 Shinichiro Hamaji + + Reviewed by Darin Adler. + + Provide a way to get counter values with layoutTestContoller + https://bugs.webkit.org/show_bug.cgi?id=30555 + + Expose WebCore::counterValueForElement as a WebCore API. + + * WebCore.base.exp: + * rendering/RenderTreeAsText.cpp: + (WebCore::writeCounterValuesFromChildren): + (WebCore::counterValueForElement): + * rendering/RenderTreeAsText.h: + +2009-10-28 Nate Chapin + + Unreviewed, Chromium build fix for r50225. + + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::defaultObjectContentType): + +2009-10-28 Eric Z. Ayers + + Reviewed by Pavel Feldman. + + Adds InspectorTimelineAgent instrumentation for encountering a + . Check if it has the // expected value in all cases. // See smart window.open policy for where this is used. - ExecState* exec = m_windowShell->window()->globalExec(); + JSDOMWindowShell* shell = windowShell(world); + ExecState* exec = shell->window()->globalExec(); const String* savedSourceURL = m_sourceURL; m_sourceURL = &sourceURL; @@ -107,9 +117,9 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode) RefPtr protect = m_frame; - m_windowShell->window()->globalData()->timeoutChecker.start(); - Completion comp = JSC::evaluate(exec, exec->dynamicGlobalObject()->globalScopeChain(), jsSourceCode, m_windowShell); - m_windowShell->window()->globalData()->timeoutChecker.stop(); + exec->globalData().timeoutChecker.start(); + Completion comp = WebCore::evaluateInWorld(exec, exec->dynamicGlobalObject()->globalScopeChain(), jsSourceCode, shell, world); + exec->globalData().timeoutChecker.stop(); // Evaluating the JavaScript could cause the frame to be deallocated // so we start the keep alive timer here. @@ -127,52 +137,114 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode) return JSValue(); } -void ScriptController::evaluateInIsolatedWorld(unsigned /* worldID */, const Vector& sourceCode) +ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode) +{ + return evaluateInWorld(sourceCode, mainThreadNormalWorld()); +} + +// An DOMWrapperWorld other than the thread's normal world. +class IsolatedWorld : public DOMWrapperWorld { +public: + IsolatedWorld(JSGlobalData* globalData) + : DOMWrapperWorld(globalData) + { + JSGlobalData::ClientData* clientData = globalData->clientData; + ASSERT(clientData); + static_cast(clientData)->rememberWorld(this); + } + + static PassRefPtr create(JSGlobalData* globalData) { return adoptRef(new IsolatedWorld(globalData)); } +}; + +static PassRefPtr findWorld(unsigned worldID) +{ + if (!worldID) + return IsolatedWorld::create(JSDOMWindow::commonJSGlobalData()); + + typedef HashMap > WorldMap; + DEFINE_STATIC_LOCAL(WorldMap, isolatedWorlds, ()); + + WorldMap::iterator iter = isolatedWorlds.find(worldID); + if (iter != isolatedWorlds.end()) + return iter->second; + + RefPtr newWorld = IsolatedWorld::create(JSDOMWindow::commonJSGlobalData()); + isolatedWorlds.add(worldID, newWorld); + return newWorld; +} + +JSDOMWindow* ScriptController::globalObject(unsigned worldID) +{ + RefPtr world = findWorld(worldID); + return windowShell(world.get())->window(); +} + +ScriptValue ScriptController::evaluateInIsolatedWorld(unsigned worldID, const ScriptSourceCode& sourceCode) +{ + RefPtr world = findWorld(worldID); + return evaluateInWorld(sourceCode, world.get()); +} + +void ScriptController::evaluateInIsolatedWorld(unsigned worldID, const Vector& sourceCode) { - // FIXME: Actually support isolated worlds! + RefPtr world = findWorld(worldID); + unsigned size = sourceCode.size(); for (unsigned i = 0; i < size; ++i) - evaluate(sourceCode[i]); + evaluateInWorld(sourceCode[i], world.get()); } void ScriptController::clearWindowShell() { - if (!m_windowShell) + if (m_windowShells.isEmpty()) return; JSLock lock(SilenceAssertionsOnly); // Clear the debugger from the current window before setting the new window. + DOMWrapperWorld* debugWorld = debuggerWorld(); attachDebugger(0); - m_windowShell->window()->willRemoveFromWindowShell(); - m_windowShell->setWindow(m_frame->domWindow()); + for (ShellMap::iterator iter = m_windowShells.begin(); iter != m_windowShells.end(); ++iter) { + DOMWrapperWorld* world = iter->first; + JSDOMWindowShell* windowShell = iter->second; + windowShell->window()->willRemoveFromWindowShell(); + windowShell->setWindow(m_frame->domWindow()); - if (Page* page = m_frame->page()) { - attachDebugger(page->debugger()); - m_windowShell->window()->setProfileGroup(page->group().identifier()); + if (Page* page = m_frame->page()) { + if (world == debugWorld) + attachDebugger(page->debugger()); + windowShell->window()->setProfileGroup(page->group().identifier()); + } } // There is likely to be a lot of garbage now. gcController().garbageCollectSoon(); } -void ScriptController::initScript() +JSDOMWindowShell* ScriptController::initScript(DOMWrapperWorld* world) { - if (m_windowShell) - return; + ASSERT(!m_windowShells.contains(world)); JSLock lock(SilenceAssertionsOnly); - m_windowShell = new JSDOMWindowShell(m_frame->domWindow()); - m_windowShell->window()->updateDocument(); + JSDOMWindowShell* windowShell = new JSDOMWindowShell(m_frame->domWindow()); + m_windowShells.add(world, windowShell); + world->rememberScriptController(this); + windowShell->window()->updateDocument(world); if (Page* page = m_frame->page()) { - attachDebugger(page->debugger()); - m_windowShell->window()->setProfileGroup(page->group().identifier()); + if (world == debuggerWorld()) + attachDebugger(page->debugger()); + windowShell->window()->setProfileGroup(page->group().identifier()); + } + + { + EnterDOMWrapperWorld worldEntry(*JSDOMWindow::commonJSGlobalData(), world); + m_frame->loader()->dispatchWindowObjectAvailable(); } - m_frame->loader()->dispatchWindowObjectAvailable(); + return windowShell; } bool ScriptController::processingUserGesture() const @@ -182,10 +254,11 @@ bool ScriptController::processingUserGesture() const bool ScriptController::processingUserGestureEvent() const { - if (!m_windowShell) + JSDOMWindowShell* shell = existingWindowShell(mainThreadNormalWorld()); + if (!shell) return false; - if (Event* event = m_windowShell->window()->currentEvent()) { + if (Event* event = shell->window()->currentEvent()) { if (event->createdByDOM()) return false; @@ -243,13 +316,16 @@ bool ScriptController::isEnabled() void ScriptController::attachDebugger(JSC::Debugger* debugger) { - if (!m_windowShell) + // FIXME: Should be able to debug isolated worlds. + JSDOMWindowShell* shell = existingWindowShell(debuggerWorld()); + if (!shell) return; + JSDOMWindow* globalObject = shell->window(); if (debugger) - debugger->attach(m_windowShell->window()); - else if (JSC::Debugger* currentDebugger = m_windowShell->window()->debugger()) - currentDebugger->detach(m_windowShell->window()); + debugger->attach(globalObject); + else if (JSC::Debugger* currentDebugger = globalObject->debugger()) + currentDebugger->detach(globalObject); } void ScriptController::updateDocument() @@ -258,8 +334,8 @@ void ScriptController::updateDocument() return; JSLock lock(SilenceAssertionsOnly); - if (m_windowShell) - m_windowShell->window()->updateDocument(); + for (ShellMap::iterator iter = m_windowShells.begin(); iter != m_windowShells.end(); ++iter) + iter->second->window()->updateDocument(iter->first); } void ScriptController::updateSecurityOrigin() @@ -274,7 +350,7 @@ Bindings::RootObject* ScriptController::bindingRootObject() if (!m_bindingRootObject) { JSLock lock(SilenceAssertionsOnly); - m_bindingRootObject = Bindings::RootObject::create(0, globalObject()); + m_bindingRootObject = Bindings::RootObject::create(0, globalObject(pluginWorld())); } return m_bindingRootObject.get(); } @@ -285,7 +361,7 @@ PassRefPtr ScriptController::createRootObject(void* native if (it != m_rootObjects.end()) return it->second; - RefPtr rootObject = Bindings::RootObject::create(nativeHandle, globalObject()); + RefPtr rootObject = Bindings::RootObject::create(nativeHandle, globalObject(pluginWorld())); m_rootObjects.set(nativeHandle, rootObject); return rootObject.release(); @@ -300,7 +376,7 @@ NPObject* ScriptController::windowScriptNPObject() // JavaScript is enabled, so there is a JavaScript window object. // Return an NPObject bound to the window object. JSC::JSLock lock(SilenceAssertionsOnly); - JSObject* win = windowShell()->window(); + JSObject* win = windowShell(pluginWorld())->window(); ASSERT(win); Bindings::RootObject* root = bindingRootObject(); m_windowScriptNPObject = _NPN_CreateScriptObject(0, win, root); @@ -334,8 +410,9 @@ JSObject* ScriptController::jsObjectForPluginElement(HTMLPlugInElement* plugin) // Create a JSObject bound to this element JSLock lock(SilenceAssertionsOnly); - ExecState* exec = globalObject()->globalExec(); - JSValue jsElementValue = toJS(exec, globalObject(), plugin); + JSDOMWindow* globalObj = globalObject(pluginWorld()); + // FIXME: is normal okay? - used for NP plugins? + JSValue jsElementValue = toJS(globalObj->globalExec(), globalObj, plugin); if (!jsElementValue || !jsElementValue.isObject()) return 0; @@ -391,4 +468,44 @@ void ScriptController::clearScriptObjects() #endif } +ScriptValue ScriptController::executeScriptInIsolatedWorld(unsigned worldID, const String& script, bool forceUserGesture) +{ + ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url()); + + if (!isEnabled() || isPaused()) + return ScriptValue(); + + bool wasInExecuteScript = m_inExecuteScript; + m_inExecuteScript = true; + + ScriptValue result = evaluateInIsolatedWorld(worldID, sourceCode); + + if (!wasInExecuteScript) { + m_inExecuteScript = false; + Document::updateStyleForAllDocuments(); + } + + return result; +} + +ScriptValue ScriptController::executeScriptInIsolatedWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture) +{ + ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url()); + + if (!isEnabled() || isPaused()) + return ScriptValue(); + + bool wasInExecuteScript = m_inExecuteScript; + m_inExecuteScript = true; + + ScriptValue result = evaluateInWorld(sourceCode, world); + + if (!wasInExecuteScript) { + m_inExecuteScript = false; + Document::updateStyleForAllDocuments(); + } + + return result; +} + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.h b/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.h index bd4b65e..f2a497d 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptController.h @@ -63,31 +63,49 @@ class XSSAuditor; typedef HashMap > RootObjectMap; class ScriptController { + typedef WTF::HashMap > ShellMap; + public: ScriptController(Frame*); ~ScriptController(); - bool haveWindowShell() const { return m_windowShell; } - JSDOMWindowShell* windowShell() + JSDOMWindowShell* windowShell(DOMWrapperWorld* world) + { + ShellMap::iterator iter = m_windowShells.find(world); + return (iter != m_windowShells.end()) ? iter->second.get() : initScript(world); + } + JSDOMWindowShell* existingWindowShell(DOMWrapperWorld* world) const + { + ShellMap::const_iterator iter = m_windowShells.find(world); + return (iter != m_windowShells.end()) ? iter->second.get() : 0; + } + JSDOMWindow* globalObject(DOMWrapperWorld* world) { - initScriptIfNeeded(); - return m_windowShell; + return windowShell(world)->window(); } + JSDOMWindow* globalObject(unsigned worldID); - JSDOMWindow* globalObject() + void forgetWorld(DOMWrapperWorld* world) { - initScriptIfNeeded(); - return m_windowShell->window(); + m_windowShells.remove(world); } ScriptValue executeScript(const ScriptSourceCode&); ScriptValue executeScript(const String& script, bool forceUserGesture = false); + ScriptValue executeScriptInIsolatedWorld(unsigned worldID, const String& script, bool forceUserGesture = false); + ScriptValue executeScriptInIsolatedWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture = false); // Returns true if argument is a JavaScript URL. bool executeIfJavaScriptURL(const KURL&, bool userGesture = false, bool replaceDocument = true); + // This function must be called from the main thread. It is safe to call it repeatedly. + // Darwin is an exception to this rule: it is OK to call this function from any thread, even reentrantly. + static void initializeThreading(); + ScriptValue evaluate(const ScriptSourceCode&); - void evaluateInIsolatedWorld(unsigned worldID, const Vector&); + ScriptValue evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld*); + ScriptValue evaluateInIsolatedWorld(unsigned /*worldID*/, const ScriptSourceCode&); + void evaluateInIsolatedWorld(unsigned /*worldID*/, const Vector&); void setEventHandlerLineNumber(int lineno) { m_handlerLineNumber = lineno; } int eventHandlerLineNumber() { return m_handlerLineNumber; } @@ -144,19 +162,14 @@ public: XSSAuditor* xssAuditor() { return m_XSSAuditor.get(); } private: - void initScriptIfNeeded() - { - if (!m_windowShell) - initScript(); - } - void initScript(); + JSDOMWindowShell* initScript(DOMWrapperWorld* world); void disconnectPlatformScriptObjects(); bool processingUserGestureEvent() const; bool isJavaScriptAnchorNavigation() const; - JSC::ProtectedPtr m_windowShell; + ShellMap m_windowShells; Frame* m_frame; int m_handlerLineNumber; const String* m_sourceURL; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm b/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm index e6a654f..21ec0f2 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm @@ -114,7 +114,7 @@ WebScriptObject* ScriptController::windowScriptObject() if (!m_windowScriptObject) { JSC::JSLock lock(JSC::SilenceAssertionsOnly); JSC::Bindings::RootObject* root = bindingRootObject(); - m_windowScriptObject = [WebScriptObject scriptObjectForJSObject:toRef(windowShell()) originRootObject:root rootObject:root]; + m_windowScriptObject = [WebScriptObject scriptObjectForJSObject:toRef(windowShell(pluginWorld())) originRootObject:root rootObject:root]; } ASSERT([m_windowScriptObject.get() isKindOfClass:[DOMAbstractView class]]); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptEventListener.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptEventListener.cpp index 0b0047b..8399c7a 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptEventListener.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptEventListener.cpp @@ -71,7 +71,7 @@ PassRefPtr createAttributeEventListener(Node* node, Attribu sourceURL = node->document()->url().string(); } - return JSLazyEventListener::create(attr->localName().string(), eventParameterName(node->isSVGElement()), attr->value(), node, sourceURL, lineNumber); + return JSLazyEventListener::create(attr->localName().string(), eventParameterName(node->isSVGElement()), attr->value(), node, sourceURL, lineNumber, mainThreadNormalWorld()); } PassRefPtr createAttributeEventListener(Frame* frame, Attribute* attr) @@ -93,7 +93,7 @@ PassRefPtr createAttributeEventListener(Frame* frame, Attri lineNumber = scriptController->eventHandlerLineNumber(); sourceURL = frame->document()->url().string(); - return JSLazyEventListener::create(attr->localName().string(), eventParameterName(frame->document()->isSVGDocument()), attr->value(), 0, sourceURL, lineNumber); + return JSLazyEventListener::create(attr->localName().string(), eventParameterName(frame->document()->isSVGDocument()), attr->value(), 0, sourceURL, lineNumber, mainThreadNormalWorld()); } String getEventListenerHandlerBody(ScriptExecutionContext* context, ScriptState* scriptState, EventListener* eventListener) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptFunctionCall.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptFunctionCall.cpp index 46e80ac..91b2a57 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptFunctionCall.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptFunctionCall.cpp @@ -123,7 +123,8 @@ ScriptValue ScriptFunctionCall::call(bool& hadException, bool reportExceptions) if (callType == CallTypeNone) return ScriptValue(); - JSValue result = JSC::call(m_exec, function, callType, callData, thisObject, m_arguments); + // FIXME: Should this function take a worldID? - only used by inspector? + JSValue result = callInWorld(m_exec, function, callType, callData, thisObject, m_arguments, debuggerWorld()); if (m_exec->hadException()) { if (reportExceptions) reportException(m_exec, m_exec->exception()); @@ -161,7 +162,8 @@ ScriptObject ScriptFunctionCall::construct(bool& hadException, bool reportExcept if (constructType == ConstructTypeNone) return ScriptObject(); - JSValue result = JSC::construct(m_exec, constructor, constructType, constructData, m_arguments); + // FIXME: Currently this method constructs objects in debuggerWorld(). We could use the current world, or pass a worldID to this function? + JSValue result = constructInWorld(m_exec, constructor, constructType, constructData, m_arguments, debuggerWorld()); if (m_exec->hadException()) { if (reportExceptions) reportException(m_exec, m_exec->exception()); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp index b48556e..313530f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp @@ -72,7 +72,7 @@ bool getQuarantinedScriptObject(Database* database, ScriptObject& quarantinedObj if (!frame) return false; - JSDOMGlobalObject* globalObject = toJSDOMWindow(frame); + JSDOMGlobalObject* globalObject = toJSDOMWindow(frame, debuggerWorld()); ExecState* exec = globalObject->globalExec(); JSLock lock(SilenceAssertionsOnly); @@ -89,7 +89,7 @@ bool getQuarantinedScriptObject(Storage* storage, ScriptObject& quarantinedObjec Frame* frame = storage->frame(); ASSERT(frame); - JSDOMGlobalObject* globalObject = toJSDOMWindow(frame); + JSDOMGlobalObject* globalObject = toJSDOMWindow(frame, debuggerWorld()); ExecState* exec = globalObject->globalExec(); JSLock lock(SilenceAssertionsOnly); @@ -116,7 +116,7 @@ bool getQuarantinedScriptObject(DOMWindow* domWindow, ScriptObject& quarantinedO { ASSERT(domWindow); - JSDOMWindow* window = toJSDOMWindow(domWindow->frame()); + JSDOMWindow* window = toJSDOMWindow(domWindow->frame(), debuggerWorld()); ExecState* exec = window->globalExec(); JSLock lock(SilenceAssertionsOnly); diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h b/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h index 1b05ded..32d6298 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h @@ -44,6 +44,7 @@ public: ScriptSourceCode(const String& source, const KURL& url = KURL(), int startLine = 1) : m_provider(StringSourceProvider::create(source, url.isNull() ? String() : url.string())) , m_code(m_provider, startLine) + , m_url(url) { } @@ -59,10 +60,17 @@ public: const String& source() const { return m_provider->source(); } + int startLine() const { return m_code.firstLine(); } + + const KURL& url() const { return m_url; } + private: RefPtr m_provider; JSC::SourceCode m_code; + + KURL m_url; + }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptState.cpp b/src/3rdparty/webkit/WebCore/bindings/js/ScriptState.cpp index 8bfa33d..60ba2a0 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptState.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptState.cpp @@ -32,6 +32,7 @@ #include "ScriptState.h" #include "Frame.h" +#include "JSDOMWindowBase.h" #include "Node.h" #include "Page.h" @@ -49,12 +50,12 @@ ScriptState* scriptStateFromNode(Node* node) return 0; if (!frame->script()->isEnabled()) return 0; - return frame->script()->globalObject()->globalExec(); + return frame->script()->globalObject(mainThreadCurrentWorld())->globalExec(); } ScriptState* scriptStateFromPage(Page* page) { - return page->mainFrame()->script()->globalObject()->globalExec(); + return page->mainFrame()->script()->globalObject(mainThreadCurrentWorld())->globalExec(); } } diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptState.h b/src/3rdparty/webkit/WebCore/bindings/js/ScriptState.h index fa5c4a8..279234e 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptState.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptState.h @@ -35,6 +35,7 @@ #include "JSDOMBinding.h" namespace WebCore { + class DOMWrapperWorld; class Node; class Page; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp b/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp index 3590dad..b66b0e8 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp @@ -52,6 +52,7 @@ WorkerScriptController::WorkerScriptController(WorkerContext* workerContext) , m_workerContext(workerContext) , m_executionForbidden(false) { + m_globalData->clientData = new WebCoreJSClientData(m_globalData.get()); } WorkerScriptController::~WorkerScriptController() @@ -122,7 +123,7 @@ ScriptValue WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode, ExecState* exec = m_workerContextWrapper->globalExec(); m_workerContextWrapper->globalData()->timeoutChecker.start(); - Completion comp = JSC::evaluate(exec, exec->dynamicGlobalObject()->globalScopeChain(), sourceCode.jsSourceCode(), m_workerContextWrapper); + Completion comp = evaluateInWorld(exec, exec->dynamicGlobalObject()->globalScopeChain(), sourceCode.jsSourceCode(), m_workerContextWrapper, currentWorld(exec)); m_workerContextWrapper->globalData()->timeoutChecker.stop(); if (comp.complType() == Normal || comp.complType() == ReturnValue) diff --git a/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h b/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h index bb33f60..c820cd9 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h @@ -62,6 +62,9 @@ namespace WebCore { void setException(ScriptValue); void forbidExecution(); + + JSC::JSGlobalData* globalData() { return m_globalData.get(); } + private: void initScriptIfNeeded() { diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm index ff7b52f..d8367ac 100644 --- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm +++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm @@ -292,7 +292,7 @@ sub GenerateGetOwnPropertySlotBody my @getOwnPropertySlotImpl = (); - if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection") { + if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") { push(@getOwnPropertySlotImpl, " ${namespaceMaybe}JSValue proto = prototype();\n"); push(@getOwnPropertySlotImpl, " if (proto.isObject() && static_cast<${namespaceMaybe}JSObject*>(asObject(proto))->hasProperty(exec, propertyName))\n"); push(@getOwnPropertySlotImpl, " return false;\n\n"); @@ -369,7 +369,7 @@ sub GenerateGetOwnPropertyDescriptorBody my @getOwnPropertyDescriptorImpl = (); - if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection") { + if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") { push(@getOwnPropertyDescriptorImpl, " ${namespaceMaybe}JSValue proto = prototype();\n"); push(@getOwnPropertyDescriptorImpl, " if (proto.isObject() && static_cast<${namespaceMaybe}JSObject*>(asObject(proto))->hasProperty(exec, propertyName))\n"); push(@getOwnPropertyDescriptorImpl, " return false;\n\n"); @@ -658,6 +658,12 @@ sub GenerateHeader # Custom lookupSetter function push(@headerContent, " virtual JSC::JSValue lookupSetter(JSC::ExecState*, const JSC::Identifier& propertyName);\n") if $dataNode->extendedAttributes->{"CustomLookupSetter"}; + # Override toBoolean to return false for objects that want to 'MasqueradesAsUndefined'. + if ($dataNode->extendedAttributes->{"MasqueradesAsUndefined"}) { + push(@headerContent, " virtual bool toBoolean(JSC::ExecState*) const { return false; };\n"); + $structureFlags{"JSC::MasqueradesAsUndefined"} = 1; + } + # Constructor object getter push(@headerContent, " static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);\n") if $dataNode->extendedAttributes->{"GenerateConstructor"}; @@ -1188,19 +1194,21 @@ sub GenerateImplementation push(@implContent, " impl()->invalidateEventListeners();\n"); } - if ($interfaceName eq "Node") { - push(@implContent, " forgetDOMNode(impl()->document(), impl());\n"); - } else { - if ($podType) { - my $animatedType = $implClassName; - $animatedType =~ s/SVG/SVGAnimated/; + if (!$dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"}) { + if ($interfaceName eq "Node") { + push(@implContent, " forgetDOMNode(this, impl(), impl()->document());\n"); + } else { + if ($podType) { + my $animatedType = $implClassName; + $animatedType =~ s/SVG/SVGAnimated/; - # Special case for JSSVGNumber - if ($codeGenerator->IsSVGAnimatedType($animatedType) and $podType ne "float") { - push(@implContent, " JSSVGDynamicPODTypeWrapperCache<$podType, $animatedType>::forgetWrapper(m_impl.get());\n"); + # Special case for JSSVGNumber + if ($codeGenerator->IsSVGAnimatedType($animatedType) and $podType ne "float") { + push(@implContent, " JSSVGDynamicPODTypeWrapperCache<$podType, $animatedType>::forgetWrapper(m_impl.get());\n"); + } } + push(@implContent, " forgetDOMObject(this, impl());\n"); } - push(@implContent, " forgetDOMObject(*Heap::heap(this)->globalData(), impl());\n"); } push(@implContent, "}\n\n"); @@ -1210,7 +1218,7 @@ sub GenerateImplementation # its own special handling rather than relying on the caching that Node normally does. if ($interfaceName eq "Document") { push(@implContent, "${className}::~$className()\n"); - push(@implContent, "{\n forgetDOMObject(*Heap::heap(this)->globalData(), static_cast<${implClassName}*>(impl()));\n}\n\n"); + push(@implContent, "{\n forgetDOMObject(this, static_cast<${implClassName}*>(impl()));\n}\n\n"); } if ($needsMarkChildren && !$dataNode->extendedAttributes->{"CustomMarkFunction"}) { @@ -1476,7 +1484,7 @@ sub GenerateImplementation } else { $implIncludes{"Frame.h"} = 1; $implIncludes{"JSDOMGlobalObject.h"} = 1; - push(@implContent, " JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext());\n"); + push(@implContent, " JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec);\n"); push(@implContent, " if (!globalObject)\n"); push(@implContent, " return;\n"); } @@ -1700,7 +1708,7 @@ sub GenerateImplementation push(@implContent, " return toJS(exec, thisObj->globalObject(), static_cast<$implClassName*>(thisObj->impl())->item(slot.index()));\n"); } push(@implContent, "}\n"); - if ($interfaceName eq "HTMLCollection") { + if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") { $implIncludes{"JSNode.h"} = 1; $implIncludes{"Node.h"} = 1; } @@ -1711,7 +1719,7 @@ sub GenerateImplementation push(@implContent, "{\n"); push(@implContent, " return jsNumber(exec, static_cast<$implClassName*>(impl())->item(index));\n"); push(@implContent, "}\n"); - if ($interfaceName eq "HTMLCollection") { + if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") { $implIncludes{"JSNode.h"} = 1; $implIncludes{"Node.h"} = 1; } diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm index 28562f1..95b2aa2 100644 --- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm +++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm @@ -215,7 +215,6 @@ sub AddClassForwardIfNeeded sub GetImplementationFileName { my $iface = shift; - return "HTMLCollection.h" if $iface eq "HTMLAllCollection"; return "Event.h" if $iface eq "DOMTimeStamp"; return "NamedAttrMap.h" if $iface eq "NamedNodeMap"; return "NameNodeList.h" if $iface eq "NodeList"; @@ -307,7 +306,7 @@ sub GenerateSetDOMException my $indent = shift; my $result = ""; - $result .= $indent . "if (ec) {\n"; + $result .= $indent . "if (UNLIKELY(ec)) {\n"; $result .= $indent . " V8Proxy::setDOMException(ec);\n"; $result .= $indent . " return v8::Handle();\n"; $result .= $indent . "}\n"; @@ -622,15 +621,17 @@ END push(@implContentDecls, " if (!imp->document())\n"); push(@implContentDecls, " return v8::Undefined();\n"); } - push(@implContentDecls, " $nativeType v = "); - - push(@implContentDecls, "$getterString;\n"); if ($useExceptions) { + push(@implContentDecls, " $nativeType v = "); + push(@implContentDecls, "$getterString;\n"); push(@implContentDecls, GenerateSetDOMException(" ")); + $result = "v"; + $result .= ".release()" if (IsRefPtrType($returnType)); + } else { + # Can inline the function call into the return statement to avoid overhead of using a Ref<> temporary + $result = $getterString; } - - $result = "v"; } if (IsSVGTypeNeedingContextParameter($attrType) && !$skipContext) { @@ -646,7 +647,6 @@ END my $classIndex = uc($attrType); push(@implContentDecls, " return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, wrapper.release());\n"); } else { - $result .= ".release()" if (IsRefPtrType($attrType)); push(@implContentDecls, " " . ReturnNativeToJSValue($attribute->signature, $result, " ").";\n"); } @@ -784,7 +784,8 @@ END } if ($useExceptions) { - push(@implContentDecls, " V8Proxy::setDOMException(ec);\n"); + push(@implContentDecls, " if (UNLIKELY(ec))\n"); + push(@implContentDecls, " V8Proxy::setDOMException(ec);\n"); } if ($isPodType) { @@ -917,7 +918,7 @@ END if (TypeCanFailConversion($parameter)) { $implIncludes{"ExceptionCode.h"} = 1; push(@implContentDecls, -" if (!$parameterName" . (BasicTypeCanFailConversion($parameter) ? "Ok" : "") . ") {\n" . +" if (UNLIKELY(!$parameterName" . (BasicTypeCanFailConversion($parameter) ? "Ok" : "") . ")) {\n" . " V8Proxy::setDOMException(TYPE_MISMATCH_ERR);\n" . " return v8::Handle();\n" . " }\n"); @@ -926,7 +927,7 @@ END if ($parameter->extendedAttributes->{"IsIndex"}) { $implIncludes{"ExceptionCode.h"} = 1; push(@implContentDecls, -" if ($parameterName < 0) {\n" . +" if (UNLIKELY($parameterName < 0)) {\n" . " V8Proxy::setDOMException(INDEX_SIZE_ERR);\n" . " return v8::Handle();\n" . " }\n"); @@ -1322,6 +1323,13 @@ END $template = "instance"; } + my $conditional = ""; + if ($attrExt->{"EnabledAtRuntime"}) { + # Only call Set()/SetAccessor() if this method should be enabled + $enable_function = $interfaceName . $codeGenerator->WK_ucfirst($function->signature->name); + $conditional = "if (V8Custom::v8${enable_function}Enabled())\n"; + } + if ($attrExt->{"DoNotCheckDomainSecurity"} && ($dataNode->extendedAttributes->{"CheckDomainSecurity"} || $interfaceName eq "DOMWindow")) { # Mark the accessor as ReadOnly and set it on the proto object so @@ -1342,7 +1350,7 @@ END push(@implContent, <SetAccessor( + $conditional $template->SetAccessor( v8::String::New("$name"), ${interfaceName}Internal::${name}AttrGetter, 0, @@ -1370,7 +1378,7 @@ END push(@implContent, <Set( + $conditional ${template}->Set( v8::String::New("$name"), $templateFunction, static_cast($property_attributes)); @@ -1388,7 +1396,7 @@ END } # Set the class name. This is used when printing objects. - push(@implContent, " desc->SetClassName(v8::String::New(\"" . GetClassName(${interfaceName}) . "\"));\n"); + push(@implContent, " desc->SetClassName(v8::String::New(\"${interfaceName}\"));\n"); if ($has_constants) { push(@implContent, < > result = $functionString;\n"; - } else { + } elsif (@{$function->raisesExceptions} or $returnsPodType or $isPodType or IsSVGTypeNeedingContextParameter($returnType)) { $result .= $indent . $nativeReturnType . " result = $functionString;\n"; + } else { + # Can inline the function call into the return statement to avoid overhead of using a Ref<> temporary + $return = $functionString; + $returnIsRef = 0; } if (@{$function->raisesExceptions}) { $result .= GenerateSetDOMException($indent); } - my $return = "result"; - # If the return type is a POD type, separate out the wrapper generation if ($returnsListItemPodType) { $result .= $indent . "RefPtr > wrapper = "; @@ -1602,7 +1615,7 @@ sub GenerateFunctionCallString() my $classIndex = uc($returnType); $result .= $indent . "return V8DOMWrapper::convertToV8Object(V8ClassIndex::$classIndex, wrapper.release());\n"; } else { - $return .= ".release()" if (IsRefPtrType($returnType)); + $return .= ".release()" if ($returnIsRef); $result .= $indent . ReturnNativeToJSValue($function->signature, $return, $indent) . ";\n"; } @@ -1610,15 +1623,6 @@ sub GenerateFunctionCallString() } -# Get the class name used for printing javascript DOM-object wrappers. -sub GetClassName -{ - my $type = shift; - return "HTMLCollection" if $type eq "HTMLAllCollection"; - return $type; -} - - sub GetTypeFromSignature { my $signature = shift; @@ -1696,6 +1700,7 @@ sub IsRefPtrType return 1 if $type eq "EventListener"; return 1 if $type eq "FileList"; return 1 if $type eq "HTMLCollection"; + return 1 if $type eq "HTMLAllCollection"; return 1 if $type eq "HTMLDocument"; return 1 if $type eq "HTMLElement"; return 1 if $type eq "HTMLOptionsCollection"; @@ -2147,7 +2152,11 @@ sub ReturnNativeToJSValue # special case for non-DOM node interfaces if (IsDOMNodeType($type)) { - return "return V8DOMWrapper::convertNodeToV8Object($value)"; + if ($signature->extendedAttributes->{"ReturnsNew"}) { + return "return V8DOMWrapper::convertNewNodeToV8Object($value)"; + } else { + return "return V8DOMWrapper::convertNodeToV8Object($value)"; + } } if ($type eq "EventTarget" or $type eq "SVGElementInstance") { @@ -2159,7 +2168,7 @@ sub ReturnNativeToJSValue } if ($type eq "EventListener") { - return "return V8DOMWrapper::convertEventListenerToV8Object($value)"; + return "return V8DOMWrapper::convertEventListenerToV8Object(imp->scriptExecutionContext(), $value)"; } if ($type eq "SerializedScriptValue") { diff --git a/src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp b/src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp index 006f17f..6a89652 100644 --- a/src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp @@ -34,6 +34,7 @@ #include "c_utility.h" #include "c_instance.h" #include "IdentifierRep.h" +#include "JSDOMBinding.h" #include "npruntime_impl.h" #include "npruntime_priv.h" #include "runtime_root.h" @@ -123,7 +124,7 @@ bool _NPN_InvokeDefault(NPP, NPObject* o, const NPVariant* args, uint32_t argCou getListFromVariantArgs(exec, args, argCount, rootObject, argList); ProtectedPtr globalObject = rootObject->globalObject(); globalObject->globalData()->timeoutChecker.start(); - JSValue resultV = call(exec, function, callType, callData, function, argList); + JSValue resultV = callInWorld(exec, function, callType, callData, function, argList, pluginWorld()); globalObject->globalData()->timeoutChecker.stop(); // Convert and return the result of the function call. @@ -173,7 +174,7 @@ bool _NPN_Invoke(NPP npp, NPObject* o, NPIdentifier methodName, const NPVariant* getListFromVariantArgs(exec, args, argCount, rootObject, argList); ProtectedPtr globalObject = rootObject->globalObject(); globalObject->globalData()->timeoutChecker.start(); - JSValue resultV = call(exec, function, callType, callData, obj->imp, argList); + JSValue resultV = callInWorld(exec, function, callType, callData, obj->imp, argList, pluginWorld()); globalObject->globalData()->timeoutChecker.stop(); // Convert and return the result of the function call. @@ -203,7 +204,7 @@ bool _NPN_Evaluate(NPP, NPObject* o, NPString* s, NPVariant* variant) String scriptString = convertNPStringToUTF16(s); ProtectedPtr globalObject = rootObject->globalObject(); globalObject->globalData()->timeoutChecker.start(); - Completion completion = JSC::evaluate(globalObject->globalExec(), globalObject->globalScopeChain(), makeSource(scriptString)); + Completion completion = evaluateInWorld(globalObject->globalExec(), globalObject->globalScopeChain(), makeSource(scriptString), JSC::JSValue(), pluginWorld()); globalObject->globalData()->timeoutChecker.stop(); ComplType type = completion.complType(); @@ -443,7 +444,7 @@ bool _NPN_Construct(NPP, NPObject* o, const NPVariant* args, uint32_t argCount, getListFromVariantArgs(exec, args, argCount, rootObject, argList); ProtectedPtr globalObject = rootObject->globalObject(); globalObject->globalData()->timeoutChecker.start(); - JSValue resultV = construct(exec, constructor, constructType, constructData, argList); + JSValue resultV = constructInWorld(exec, constructor, constructType, constructData, argList, pluginWorld()); globalObject->globalData()->timeoutChecker.stop(); // Convert and return the result. diff --git a/src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm b/src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm index eb4a6bd..cc28a75 100644 --- a/src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm +++ b/src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm @@ -29,6 +29,7 @@ #if ENABLE(MAC_JAVA_BRIDGE) #include "Frame.h" +#include "JSDOMBinding.h" #include "ScriptController.h" #include "StringSourceProvider.h" #include "WebCoreFrameView.h" @@ -302,7 +303,7 @@ jobject JavaJSObject::call(jstring methodName, jobjectArray args) const MarkedArgumentBuffer argList; getListFromJArray(exec, args, argList); rootObject->globalObject()->globalData()->timeoutChecker.start(); - JSValue result = JSC::call(exec, function, callType, callData, _imp, argList); + JSValue result = WebCore::callInWorld(exec, function, callType, callData, _imp, argList, WebCore::pluginWorld()); rootObject->globalObject()->globalData()->timeoutChecker.stop(); return convertValueToJObject(result); @@ -321,7 +322,7 @@ jobject JavaJSObject::eval(jstring script) const return 0; rootObject->globalObject()->globalData()->timeoutChecker.start(); - Completion completion = JSC::evaluate(rootObject->globalObject()->globalExec(), rootObject->globalObject()->globalScopeChain(), makeSource(JavaString(script))); + Completion completion = WebCore::evaluateInWorld(rootObject->globalObject()->globalExec(), rootObject->globalObject()->globalScopeChain(), makeSource(JavaString(script)), JSC::JSValue(), WebCore::pluginWorld()); rootObject->globalObject()->globalData()->timeoutChecker.stop(); ComplType type = completion.complType(); diff --git a/src/3rdparty/webkit/WebCore/bridge/npapi.h b/src/3rdparty/webkit/WebCore/bridge/npapi.h index 5d48b0d..c6cd557 100644 --- a/src/3rdparty/webkit/WebCore/bridge/npapi.h +++ b/src/3rdparty/webkit/WebCore/bridge/npapi.h @@ -56,6 +56,12 @@ # endif /* XP_WIN */ #endif /* _WIN32 */ +#ifdef __SYMBIAN32__ +# ifndef XP_SYMBIAN +# define XP_SYMBIAN 1 +# endif +#endif /* __SYMBIAN32__ */ + #ifdef __MWERKS__ # define _declspec __declspec # ifdef macintosh @@ -64,22 +70,15 @@ # endif /* XP_MAC */ # endif /* macintosh */ # ifdef __INTEL__ -# ifndef __SYMBIAN32__ +# ifndef XP_SYMBIAN # undef NULL -# endif -# ifndef XP_WIN -# define XP_WIN 1 -# endif /* __INTEL__ */ -# endif /* XP_PC */ +# ifndef XP_WIN +# define XP_WIN 1 +# endif /* XP_WIN */ +# endif /* XP_SYMBIAN */ +# endif /* __INTEL__ */ #endif /* __MWERKS__ */ -#ifdef __SYMBIAN32__ -# ifndef XP_SYMBIAN -# define XP_SYMBIAN 1 -# undef XP_WIN -# endif -#endif /* __SYMBIAN32__ */ - #if defined(__APPLE_CC__) && !defined(__MACOS_CLASSIC__) && !defined(XP_UNIX) # define XP_MACOSX #endif diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp index 3cb2156..6887325 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp @@ -458,7 +458,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type if (type == Date) { DateInstance* date = static_cast(object); WTF::GregorianDateTime gdt; - date->getUTCTime(gdt); + WTF::msToGregorianDateTime(date->internalNumber(), true, gdt); if (hint == QMetaType::QDateTime) { ret = QDateTime(QDate(gdt.year + 1900, gdt.month + 1, gdt.monthDay), QTime(gdt.hour, gdt.minute, gdt.second), Qt::UTC); dist = 0; @@ -834,9 +834,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr root, con dt.isDST = -1; double ms = WTF::gregorianDateTimeToMS(dt, time.msec(), /*inputIsUTC*/ false); - DateInstance* instance = new (exec) DateInstance(exec->lexicalGlobalObject()->dateStructure()); - instance->setInternalValue(jsNumber(exec, trunc(ms))); - return instance; + return new (exec) DateInstance(exec, trunc(ms)); } if (type == QMetaType::QByteArray) { diff --git a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp index 4e067ce..b8769f9 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp @@ -157,6 +157,7 @@ static const int computedProperties[] = { CSSPropertyWebkitBackgroundClip, CSSPropertyWebkitBackgroundComposite, CSSPropertyWebkitBackgroundOrigin, + CSSPropertyWebkitBackgroundSize, CSSPropertyWebkitBorderFit, CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyWebkitBorderImage, @@ -260,30 +261,13 @@ static const int computedProperties[] = { CSSPropertyTextAnchor, CSSPropertyWritingMode, CSSPropertyGlyphOrientationHorizontal, - CSSPropertyGlyphOrientationVertical + CSSPropertyGlyphOrientationVertical, + CSSPropertyWebkitShadow #endif }; const unsigned numComputedProperties = sizeof(computedProperties) / sizeof(computedProperties[0]); -static PassRefPtr valueForShadow(const ShadowData* shadow, CSSPropertyID propertyID) -{ - if (!shadow) - return CSSPrimitiveValue::createIdentifier(CSSValueNone); - - RefPtr list = CSSValueList::createCommaSeparated(); - for (const ShadowData* s = shadow; s; s = s->next) { - RefPtr x = CSSPrimitiveValue::create(s->x, CSSPrimitiveValue::CSS_PX); - RefPtr y = CSSPrimitiveValue::create(s->y, CSSPrimitiveValue::CSS_PX); - RefPtr blur = CSSPrimitiveValue::create(s->blur, CSSPrimitiveValue::CSS_PX); - RefPtr spread = propertyID == CSSPropertyTextShadow ? 0 : CSSPrimitiveValue::create(s->spread, CSSPrimitiveValue::CSS_PX); - RefPtr style = propertyID == CSSPropertyTextShadow || s->style == Normal ? 0 : CSSPrimitiveValue::createIdentifier(CSSValueInset); - RefPtr color = CSSPrimitiveValue::createColor(s->color.rgb()); - list->prepend(ShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release())); - } - return list.release(); -} - static int valueForRepeatRule(int rule) { switch (rule) { @@ -571,6 +555,26 @@ PassRefPtr CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringK return CSSPrimitiveValue::create(style->fontDescription().computedPixelSize(), CSSPrimitiveValue::CSS_PX); } +PassRefPtr CSSComputedStyleDeclaration::valueForShadow(const ShadowData* shadow, int id) const +{ + if (!shadow) + return CSSPrimitiveValue::createIdentifier(CSSValueNone); + + CSSPropertyID propertyID = static_cast(id); + + RefPtr list = CSSValueList::createCommaSeparated(); + for (const ShadowData* s = shadow; s; s = s->next) { + RefPtr x = CSSPrimitiveValue::create(s->x, CSSPrimitiveValue::CSS_PX); + RefPtr y = CSSPrimitiveValue::create(s->y, CSSPrimitiveValue::CSS_PX); + RefPtr blur = CSSPrimitiveValue::create(s->blur, CSSPrimitiveValue::CSS_PX); + RefPtr spread = propertyID == CSSPropertyTextShadow ? 0 : CSSPrimitiveValue::create(s->spread, CSSPrimitiveValue::CSS_PX); + RefPtr style = propertyID == CSSPropertyTextShadow || s->style == Normal ? 0 : CSSPrimitiveValue::createIdentifier(CSSValueInset); + RefPtr color = CSSPrimitiveValue::createColor(s->color.rgb()); + list->prepend(ShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release())); + } + return list.release(); +} + PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(int propertyID) const { return getPropertyCSSValue(propertyID, UpdateLayout); @@ -676,7 +680,8 @@ PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(int proper if (style->backgroundImage()) return style->backgroundImage()->cssValue(); return CSSPrimitiveValue::createIdentifier(CSSValueNone); - case CSSPropertyBackgroundSize: { + case CSSPropertyBackgroundSize: + case CSSPropertyWebkitBackgroundSize: { EFillSizeType size = style->backgroundSizeType(); if (size == Contain) return CSSPrimitiveValue::createIdentifier(CSSValueContain); @@ -777,7 +782,7 @@ PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case CSSPropertyWebkitBoxReflect: return valueForReflection(style->boxReflect()); case CSSPropertyWebkitBoxShadow: - return valueForShadow(style->boxShadow(), static_cast(propertyID)); + return valueForShadow(style->boxShadow(), propertyID); case CSSPropertyCaptionSide: return CSSPrimitiveValue::create(style->captionSide()); case CSSPropertyClear: @@ -1061,7 +1066,7 @@ PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case CSSPropertyTextIndent: return CSSPrimitiveValue::create(style->textIndent()); case CSSPropertyTextShadow: - return valueForShadow(style->textShadow(), static_cast(propertyID)); + return valueForShadow(style->textShadow(), propertyID); case CSSPropertyTextRendering: return CSSPrimitiveValue::create(style->fontDescription().textRenderingMode()); case CSSPropertyTextOverflow: diff --git a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h index c1f34c3..842a995 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h +++ b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h @@ -27,6 +27,7 @@ namespace WebCore { class CSSMutableStyleDeclaration; +class ShadowData; enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; @@ -66,6 +67,8 @@ private: virtual String removeProperty(int propertyID, ExceptionCode&); virtual void setProperty(int propertyId, const String& value, bool important, ExceptionCode&); + PassRefPtr valueForShadow(const ShadowData*, int) const; + RefPtr m_node; }; diff --git a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp index 10949dd..6024a5b 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp @@ -873,6 +873,7 @@ bool CSSParser::parseValue(int propId, bool important) case CSSPropertyBackgroundPositionX: case CSSPropertyBackgroundPositionY: case CSSPropertyBackgroundSize: + case CSSPropertyWebkitBackgroundSize: case CSSPropertyBackgroundRepeat: case CSSPropertyBackgroundRepeatX: case CSSPropertyBackgroundRepeatY: @@ -1726,6 +1727,15 @@ void CSSParser::addFillValue(RefPtr& lval, PassRefPtr rval) lval = rval; } +static bool parseBackgroundClip(CSSParserValue* parserValue, RefPtr& cssValue) +{ + if (parserValue->id == CSSValueBorderBox || parserValue->id == CSSValuePaddingBox || parserValue->id == CSSValueWebkitText) { + cssValue = CSSPrimitiveValue::createIdentifier(parserValue->id); + return true; + } + return false; +} + const int cMaxFillProperties = 9; bool CSSParser::parseFillShorthand(int propId, const int* properties, int numProperties, bool important) @@ -1777,6 +1787,7 @@ bool CSSParser::parseFillShorthand(int propId, const int* properties, int numPro RefPtr val1; RefPtr val2; int propId1, propId2; + CSSParserValue* parserValue = m_valueList->current(); if (parseFillProperty(properties[i], propId1, propId2, val1, val2)) { parsedProperty[i] = found = true; addFillValue(values[i], val1.release()); @@ -1786,7 +1797,7 @@ bool CSSParser::parseFillShorthand(int propId, const int* properties, int numPro addFillValue(repeatYValue, 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)) + if (parseBackgroundClip(parserValue, val1)) 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. @@ -2319,7 +2330,7 @@ void CSSParser::parseFillRepeat(RefPtr& value1, RefPtr& valu } } -PassRefPtr CSSParser::parseFillSize(bool& allowComma) +PassRefPtr CSSParser::parseFillSize(int propId, bool& allowComma) { allowComma = true; CSSParserValue* value = m_valueList->current(); @@ -2328,7 +2339,7 @@ PassRefPtr CSSParser::parseFillSize(bool& allowComma) return CSSPrimitiveValue::createIdentifier(value->id); RefPtr parsedValue1; - + if (value->id == CSSValueAuto) parsedValue1 = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_UNKNOWN); else { @@ -2336,8 +2347,9 @@ PassRefPtr CSSParser::parseFillSize(bool& allowComma) return 0; parsedValue1 = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit); } - - RefPtr parsedValue2 = parsedValue1; + + CSSPropertyID property = static_cast(propId); + RefPtr parsedValue2; if ((value = m_valueList->next())) { if (value->id == CSSValueAuto) parsedValue2 = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_UNKNOWN); @@ -2349,7 +2361,13 @@ PassRefPtr CSSParser::parseFillSize(bool& allowComma) parsedValue2 = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit); } } - + if (!parsedValue2) { + if (property == CSSPropertyWebkitBackgroundSize || property == CSSPropertyWebkitMaskSize) + parsedValue2 = parsedValue1; + else + parsedValue2 = CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_UNKNOWN); + } + return CSSPrimitiveValue::create(Pair::create(parsedValue1.release(), parsedValue2.release())); } @@ -2425,10 +2443,8 @@ bool CSSParser::parseFillProperty(int propId, int& propId1, int& propId2, } break; case CSSPropertyBackgroundClip: - if (val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueWebkitText) { - currValue = CSSPrimitiveValue::createIdentifier(val->id); + if (parseBackgroundClip(val, currValue)) m_valueList->next(); - } break; case CSSPropertyBackgroundOrigin: if (val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox) { @@ -2470,8 +2486,9 @@ bool CSSParser::parseFillProperty(int propId, int& propId1, int& propId2, // parseFillRepeat advances the m_valueList pointer break; case CSSPropertyBackgroundSize: + case CSSPropertyWebkitBackgroundSize: case CSSPropertyWebkitMaskSize: { - currValue = parseFillSize(allowComma); + currValue = parseFillSize(propId, allowComma); if (currValue) m_valueList->next(); break; @@ -3736,7 +3753,11 @@ bool CSSParser::parseShadow(int propId, bool important) // Other operators aren't legal or we aren't done with the current shadow // value. Treat as invalid. return false; - +#if ENABLE(SVG) + // -webkit-shadow does not support multiple values. + if (static_cast(propId) == CSSPropertyWebkitShadow) + return false; +#endif // The value is good. Commit it. context.commitValue(); } else if (validUnit(val, FLength, true)) { @@ -5182,11 +5203,6 @@ static int cssPropertyID(const UChar* propertyName, unsigned length) const char* const opacity = "opacity"; name = opacity; length = strlen(opacity); - } else if (strcmp(buffer, "-webkit-background-size") == 0) { - // CSS Backgrounds/Borders. -webkit-background-size worked in Safari 4 and earlier. - const char* const backgroundSize = "background-size"; - name = backgroundSize; - length = strlen(backgroundSize); } else if (hasPrefix(buffer + 7, length - 7, "-border-")) { // -webkit-border-*-*-radius worked in Safari 4 and earlier. -webkit-border-radius syntax // differs from border-radius, so it is remains as a distinct property. diff --git a/src/3rdparty/webkit/WebCore/css/CSSParser.h b/src/3rdparty/webkit/WebCore/css/CSSParser.h index 1a156da..6d1bb32 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSParser.h +++ b/src/3rdparty/webkit/WebCore/css/CSSParser.h @@ -83,7 +83,7 @@ namespace WebCore { PassRefPtr parseFillPositionXY(bool& xFound, bool& yFound); void parseFillPosition(RefPtr&, RefPtr&); void parseFillRepeat(RefPtr&, RefPtr&); - PassRefPtr parseFillSize(bool &allowComma); + PassRefPtr parseFillSize(int propId, bool &allowComma); bool parseFillProperty(int propId, int& propId1, int& propId2, RefPtr&, RefPtr&); bool parseFillShorthand(int propId, const int* properties, int numProperties, bool important); diff --git a/src/3rdparty/webkit/WebCore/css/CSSParserValues.h b/src/3rdparty/webkit/WebCore/css/CSSParserValues.h index 242cda8..1e9767a 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSParserValues.h +++ b/src/3rdparty/webkit/WebCore/css/CSSParserValues.h @@ -88,7 +88,7 @@ private: unsigned m_variablesCount; }; -struct CSSParserFunction { +struct CSSParserFunction : FastAllocBase { CSSParserString name; CSSParserValueList* args; diff --git a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h index 3616aa5..6f89df9 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h +++ b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h @@ -200,11 +200,11 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e) case ListboxPart: m_value.ident = CSSValueListbox; break; -#if ENABLE(DATALIST) case ListButtonPart: +#if ENABLE(DATALIST) m_value.ident = CSSValueListButton; - break; #endif + break; case ListItemPart: m_value.ident = CSSValueListitem; break; @@ -378,6 +378,7 @@ template<> inline CSSPrimitiveValue::operator EFillBox() const case CSSValueContentBox: return ContentFillBox; case CSSValueText: + case CSSValueWebkitText: return TextFillBox; default: ASSERT_NOT_REACHED(); diff --git a/src/3rdparty/webkit/WebCore/css/CSSProperty.h b/src/3rdparty/webkit/WebCore/css/CSSProperty.h index 7af8348..b5635d0 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSProperty.h +++ b/src/3rdparty/webkit/WebCore/css/CSSProperty.h @@ -29,7 +29,7 @@ namespace WebCore { -class CSSProperty { +class CSSProperty : public FastAllocBase { public: CSSProperty(int propID, PassRefPtr value, bool important = false, int shorthandID = 0, bool implicit = false) : m_id(propID) diff --git a/src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in b/src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in index 5ef6605..48a18e7 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in +++ b/src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in @@ -160,6 +160,10 @@ zoom -webkit-background-clip -webkit-background-composite -webkit-background-origin +# -webkit-background-size differs from background-size only in the interpretation of +# a single value: -webkit-background-size: l; is equivalent to background-size: l l; +# whereas background-size: l; is equivalent to background-size: l auto; +-webkit-background-size -webkit-binding -webkit-border-fit -webkit-border-horizontal-spacing diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp index 181e480..40627cf 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp @@ -2961,6 +2961,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) HANDLE_BACKGROUND_VALUE(origin, Origin, value) return; case CSSPropertyBackgroundSize: + case CSSPropertyWebkitBackgroundSize: HANDLE_BACKGROUND_VALUE(size, Size, value) return; case CSSPropertyWebkitMaskAttachment: diff --git a/src/3rdparty/webkit/WebCore/css/SVGCSSComputedStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/css/SVGCSSComputedStyleDeclaration.cpp index e8492d4..1f19983 100644 --- a/src/3rdparty/webkit/WebCore/css/SVGCSSComputedStyleDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/css/SVGCSSComputedStyleDeclaration.cpp @@ -166,6 +166,8 @@ PassRefPtr CSSComputedStyleDeclaration::getSVGPropertyCSSValue(int pro return 0; } + case CSSPropertyWebkitShadow: + return valueForShadow(svgStyle->shadow(), propertyID); case CSSPropertyMarker: case CSSPropertyEnableBackground: case CSSPropertyColorProfile: diff --git a/src/3rdparty/webkit/WebCore/css/SVGCSSParser.cpp b/src/3rdparty/webkit/WebCore/css/SVGCSSParser.cpp index 0ae9fbc..8730e49 100644 --- a/src/3rdparty/webkit/WebCore/css/SVGCSSParser.cpp +++ b/src/3rdparty/webkit/WebCore/css/SVGCSSParser.cpp @@ -257,6 +257,11 @@ bool CSSParser::parseSVGValue(int propId, bool important) m_valueList->next(); } break; + case CSSPropertyWebkitShadow: + if (id == CSSValueNone) + valid_primitive = true; + else + return parseShadow(propId, important); /* shorthand properties */ case CSSPropertyMarker: diff --git a/src/3rdparty/webkit/WebCore/css/SVGCSSPropertyNames.in b/src/3rdparty/webkit/WebCore/css/SVGCSSPropertyNames.in index e400ffe..809eabe 100644 --- a/src/3rdparty/webkit/WebCore/css/SVGCSSPropertyNames.in +++ b/src/3rdparty/webkit/WebCore/css/SVGCSSPropertyNames.in @@ -46,3 +46,5 @@ glyph-orientation-vertical kerning text-anchor writing-mode + +-webkit-shadow diff --git a/src/3rdparty/webkit/WebCore/css/SVGCSSStyleSelector.cpp b/src/3rdparty/webkit/WebCore/css/SVGCSSStyleSelector.cpp index b81b4f2..7e4483f 100644 --- a/src/3rdparty/webkit/WebCore/css/SVGCSSStyleSelector.cpp +++ b/src/3rdparty/webkit/WebCore/css/SVGCSSStyleSelector.cpp @@ -37,6 +37,7 @@ #include "CSSPropertyNames.h" #include "CSSValueList.h" #include "Document.h" +#include "ShadowValue.h" #include "SVGColor.h" #include "SVGNames.h" #include "SVGPaint.h" @@ -526,6 +527,35 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value) // Silently ignoring this property for now // http://bugs.webkit.org/show_bug.cgi?id=6022 break; + case CSSPropertyWebkitShadow: { + if (isInherit) + return svgstyle->setShadow(m_parentStyle->svgStyle()->shadow() ? new ShadowData(*m_parentStyle->svgStyle()->shadow()) : 0); + if (isInitial || primitiveValue) // initial | none + return svgstyle->setShadow(0); + + if (!value->isValueList()) + return; + + float zoomFactor = m_style->effectiveZoom(); + + CSSValueList *list = static_cast(value); + ASSERT(list->length() == 1); + ShadowValue* item = static_cast(list->itemWithoutBoundsCheck(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; + Color color; + if (item->color) + color = getColorFromPrimitiveValue(item->color.get()); + + // -webkit-shadow does should not have a spread or style + ASSERT(!item->spread); + ASSERT(!item->style); + + ShadowData* shadowData = new ShadowData(x, y, blur, 0, Normal, color.isValid() ? color : Color::transparent); + svgstyle->setShadow(shadowData); + return; + } default: // If you crash here, it's because you added a css property and are not handling it // in either this switch statement or the one in CSSStyleSelector::applyProperty diff --git a/src/3rdparty/webkit/WebCore/dom/Document.cpp b/src/3rdparty/webkit/WebCore/dom/Document.cpp index 475a8c1..4eb44f7 100644 --- a/src/3rdparty/webkit/WebCore/dom/Document.cpp +++ b/src/3rdparty/webkit/WebCore/dom/Document.cpp @@ -58,6 +58,7 @@ #include "FrameLoader.h" #include "FrameTree.h" #include "FrameView.h" +#include "HTMLAllCollection.h" #include "HTMLAnchorElement.h" #include "HTMLBodyElement.h" #include "HTMLCanvasElement.h" @@ -511,6 +512,16 @@ Document::~Document() m_styleSheets->documentDestroyed(); } +Document::JSWrapperCache* Document::createWrapperCache(DOMWrapperWorld* world) +{ + JSWrapperCache* wrapperCache = new JSWrapperCache(); + m_wrapperCacheMap.set(world, wrapperCache); +#if USE(JSC) + world->rememberDocument(this); +#endif + return wrapperCache; +} + void Document::resetLinkColor() { m_linkColor = Color(0, 0, 238); @@ -943,7 +954,7 @@ Element* Document::elementFromPoint(int x, int y) const return 0; float zoomFactor = frame->pageZoomFactor(); - IntPoint point = roundedIntPoint(FloatPoint((x + view()->scrollX()) * zoomFactor, (y + view()->scrollY()) * zoomFactor)); + IntPoint point = roundedIntPoint(FloatPoint(x * zoomFactor + view()->scrollX(), y * zoomFactor + view()->scrollY())); if (!frameView->visibleContentRect().contains(point)) return 0; @@ -973,7 +984,7 @@ PassRefPtr Document::caretRangeFromPoint(int x, int y) return 0; float zoomFactor = frame->pageZoomFactor(); - IntPoint point = roundedIntPoint(FloatPoint((x + view()->scrollX()) * zoomFactor, (y + view()->scrollY()) * zoomFactor)); + IntPoint point = roundedIntPoint(FloatPoint(x * zoomFactor + view()->scrollX(), y * zoomFactor + view()->scrollY())); if (!frameView->visibleContentRect().contains(point)) return 0; @@ -3988,9 +3999,9 @@ PassRefPtr Document::anchors() return HTMLCollection::create(this, DocAnchors); } -PassRefPtr Document::all() +PassRefPtr Document::all() { - return HTMLCollection::create(this, DocAll); + return HTMLAllCollection::create(this); } PassRefPtr Document::windowNamedItems(const String &name) diff --git a/src/3rdparty/webkit/WebCore/dom/Document.h b/src/3rdparty/webkit/WebCore/dom/Document.h index 09bba58..0632be1 100644 --- a/src/3rdparty/webkit/WebCore/dom/Document.h +++ b/src/3rdparty/webkit/WebCore/dom/Document.h @@ -71,6 +71,7 @@ namespace WebCore { class HitTestRequest; class HTMLCanvasElement; class HTMLCollection; + class HTMLAllCollection; class HTMLDocument; class HTMLElement; class HTMLFormElement; @@ -79,6 +80,7 @@ namespace WebCore { class HTMLMapElement; class InspectorTimelineAgent; class IntPoint; + class DOMWrapperWorld; class JSNode; class MouseEventWithHitTestResults; class NodeFilter; @@ -315,12 +317,13 @@ public: PassRefPtr links(); PassRefPtr forms(); PassRefPtr anchors(); - PassRefPtr all(); PassRefPtr objects(); PassRefPtr scripts(); PassRefPtr windowNamedItems(const String& name); PassRefPtr documentNamedItems(const String& name); + PassRefPtr all(); + // Find first anchor with the given name. // First searches for an element with the given ID, but if that fails, then looks // for an anchor with the given name. ID matching is always case sensitive, but @@ -819,7 +822,15 @@ public: virtual void postTask(PassRefPtr); // Executes the task on context's thread asynchronously. typedef HashMap JSWrapperCache; - JSWrapperCache& wrapperCache() { return m_wrapperCache; } + typedef HashMap JSWrapperCacheMap; + JSWrapperCacheMap& wrapperCacheMap() { return m_wrapperCacheMap; } + JSWrapperCache* getWrapperCache(DOMWrapperWorld* world) + { + if (JSWrapperCache* wrapperCache = m_wrapperCacheMap.get(world)) + return wrapperCache; + return createWrapperCache(world); + } + JSWrapperCache* createWrapperCache(DOMWrapperWorld*); virtual void finishedParsing(); @@ -1137,7 +1148,7 @@ private: unsigned m_numNodeListCaches; - JSWrapperCache m_wrapperCache; + JSWrapperCacheMap m_wrapperCacheMap; #if ENABLE(DATABASE) RefPtr m_databaseThread; diff --git a/src/3rdparty/webkit/WebCore/dom/Element.cpp b/src/3rdparty/webkit/WebCore/dom/Element.cpp index 621c63a..9edde25 100644 --- a/src/3rdparty/webkit/WebCore/dom/Element.cpp +++ b/src/3rdparty/webkit/WebCore/dom/Element.cpp @@ -1414,7 +1414,7 @@ KURL Element::getURLAttribute(const QualifiedName& name) const ASSERT(isURLAttribute(attribute)); } #endif - return document()->completeURL(getAttribute(name)); + return document()->completeURL(deprecatedParseURL(getAttribute(name))); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp b/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp index ceb5221..694e78a 100644 --- a/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp +++ b/src/3rdparty/webkit/WebCore/dom/EventTarget.cpp @@ -192,9 +192,16 @@ bool EventTarget::removeEventListener(const AtomicString& eventType, EventListen // Notify firing events planning to invoke the listener at 'index' that // they have one less listener to invoke. - for (size_t i = 0; i < d->firingEventEndIterators.size(); ++i) { - if (eventType == *d->firingEventEndIterators[i].eventType && index < *d->firingEventEndIterators[i].value) - --*d->firingEventEndIterators[i].value; + for (size_t i = 0; i < d->firingEventIterators.size(); ++i) { + if (eventType != d->firingEventIterators[i].eventType) + continue; + + if (index >= d->firingEventIterators[i].end) + continue; + + --d->firingEventIterators[i].end; + if (index <= d->firingEventIterators[i].iterator) + --d->firingEventIterators[i].iterator; } return true; @@ -232,6 +239,10 @@ bool EventTarget::dispatchEvent(PassRefPtr event, ExceptionCode& ec) ec = EventException::UNSPECIFIED_EVENT_TYPE_ERR; return false; } + + if (!scriptExecutionContext()) + return false; + return dispatchEvent(event); } @@ -259,9 +270,15 @@ bool EventTarget::fireEventListeners(Event* event) RefPtr protect = this; + // Fire all listeners registered for this event. Don't fire listeners removed + // during event dispatch. Also, don't fire event listeners added during event + // dispatch. Conveniently, all new event listeners will be added after 'end', + // so iterating to 'end' naturally excludes new event listeners. + + size_t i = 0; size_t end = entry.size(); - d->firingEventEndIterators.append(FiringEventEndIterator(&event->type(), &end)); - for (size_t i = 0; i < end; ++i) { + d->firingEventIterators.append(FiringEventIterator(event->type(), i, end)); + for ( ; i < end; ++i) { RegisteredEventListener& registeredListener = entry[i]; if (event->eventPhase() == Event::CAPTURING_PHASE && !registeredListener.useCapture) continue; @@ -271,7 +288,7 @@ bool EventTarget::fireEventListeners(Event* event) // event listeners, even though that violates some versions of the DOM spec. registeredListener.listener->handleEvent(scriptExecutionContext(), event); } - d->firingEventEndIterators.removeLast(); + d->firingEventIterators.removeLast(); return !event->defaultPrevented(); } @@ -298,8 +315,10 @@ void EventTarget::removeAllEventListeners() // Notify firing events planning to invoke the listener at 'index' that // they have one less listener to invoke. - for (size_t i = 0; i < d->firingEventEndIterators.size(); ++i) - *d->firingEventEndIterators[i].value = 0; + for (size_t i = 0; i < d->firingEventIterators.size(); ++i) { + d->firingEventIterators[i].iterator = 0; + d->firingEventIterators[i].end = 0; + } } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/dom/EventTarget.h b/src/3rdparty/webkit/WebCore/dom/EventTarget.h index 2d612e1..9a1975c 100644 --- a/src/3rdparty/webkit/WebCore/dom/EventTarget.h +++ b/src/3rdparty/webkit/WebCore/dom/EventTarget.h @@ -61,24 +61,26 @@ namespace WebCore { typedef int ExceptionCode; - struct FiringEventEndIterator { - FiringEventEndIterator(const AtomicString* eventType, size_t* value) + struct FiringEventIterator { + FiringEventIterator(const AtomicString& eventType, size_t& iterator, size_t& end) : eventType(eventType) - , value(value) + , iterator(iterator) + , end(end) { } - - const AtomicString* eventType; - size_t* value; + + const AtomicString& eventType; + size_t& iterator; + size_t& end; }; - typedef Vector FiringEventEndIteratorVector; + typedef Vector FiringEventIteratorVector; typedef Vector EventListenerVector; typedef HashMap EventListenerMap; struct EventTargetData { EventListenerMap eventListenerMap; - FiringEventEndIteratorVector firingEventEndIterators; + FiringEventIteratorVector firingEventIterators; }; class EventTarget { @@ -209,7 +211,7 @@ namespace WebCore { EventTargetData* d = eventTargetData(); if (!d) return false; - return d->firingEventEndIterators.size() != 0; + return d->firingEventIterators.size() != 0; } inline bool EventTarget::hasEventListeners() diff --git a/src/3rdparty/webkit/WebCore/dom/HTMLAllCollection.idl b/src/3rdparty/webkit/WebCore/dom/HTMLAllCollection.idl deleted file mode 100644 index dee365f..0000000 --- a/src/3rdparty/webkit/WebCore/dom/HTMLAllCollection.idl +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2008, 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 html { - - // This interface is used for undetectable HTMLCollections. - // An undetectable HTMLCollection behaves like an HTMLCollection - // when used, but the 'typeof' operator returns undefined and - // ToBoolean returns false. - interface HTMLAllCollection : HTMLCollection { - }; - -} diff --git a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.cpp b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.cpp index 45d4e23..f7046e3 100644 --- a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.cpp +++ b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.cpp @@ -36,6 +36,10 @@ #include #include +#if USE(JSC) +#include "JSDOMWindow.h" +#endif + namespace WebCore { class ProcessMessagesSoonTask : public ScriptExecutionContext::Task { @@ -195,4 +199,20 @@ ScriptExecutionContext::Task::~Task() { } +#if USE(JSC) +JSC::JSGlobalData* ScriptExecutionContext::globalData() +{ + if (isDocument()) + return JSDOMWindow::commonJSGlobalData(); + +#if ENABLE(WORKERS) + if (isWorkerContext()) + return static_cast(this)->script()->globalData(); +#endif + + ASSERT_NOT_REACHED(); + return 0; +} +#endif + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h index bb78b6f..398afec 100644 --- a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h +++ b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h @@ -104,6 +104,10 @@ namespace WebCore { void removeTimeout(int timeoutId); DOMTimer* findTimeout(int timeoutId); +#if USE(JSC) + JSC::JSGlobalData* globalData(); +#endif + protected: // Explicitly override the security origin for this script context. // Note: It is dangerous to change the security origin of a script context diff --git a/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp b/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp index 49713ba..3d2a549 100644 --- a/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp +++ b/src/3rdparty/webkit/WebCore/dom/SelectElement.cpp @@ -479,12 +479,14 @@ bool SelectElement::appendFormData(SelectElementData& data, Element* element, Fo // We return the first one if it was a combobox select if (!successful && !data.multiple() && data.size() <= 1 && items.size()) { OptionElement* optionElement = toOptionElement(items[0]); - const AtomicString& value = optionElement->value(); - if (value.isNull()) - list.appendData(name, optionElement->text().stripWhiteSpace()); - else - list.appendData(name, value); - successful = true; + if (optionElement) { + const AtomicString& value = optionElement->value(); + if (value.isNull()) + list.appendData(name, optionElement->text().stripWhiteSpace()); + else + list.appendData(name, value); + successful = true; + } } return successful; @@ -874,13 +876,19 @@ void SelectElement::typeAheadFind(SelectElementData& data, Element* element, Key int index = (optionToListIndex(data, element, selected >= 0 ? selected : 0) + searchStartOffset) % itemCount; ASSERT(index >= 0); + // Compute a case-folded copy of the prefix string before beginning the search for + // a matching element. This code uses foldCase to work around the fact that + // String::startWith does not fold non-ASCII characters. This code can be changed + // to use startWith once that is fixed. + String prefixWithCaseFolded(prefix.foldCase()); for (int i = 0; i < itemCount; ++i, index = (index + 1) % itemCount) { OptionElement* optionElement = toOptionElement(items[index]); if (!optionElement || items[index]->disabled()) continue; + // Fold the option string and check if its prefix is equal to the folded prefix. String text = optionElement->textIndentedToRespectGroupLabel(); - if (stripLeadingWhiteSpace(text).startsWith(prefix, false)) { + if (stripLeadingWhiteSpace(text).foldCase().startsWith(prefixWithCaseFolded)) { setSelectedIndex(data, element, listToOptionIndex(data, element, index)); if (!data.usesMenuList()) listBoxOnChange(data, element); diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp index 543927d..30d39e0 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp @@ -79,15 +79,41 @@ bool XMLTokenizer::isWMLDocument() const } #endif -void XMLTokenizer::setCurrentNode(Node* n) +void XMLTokenizer::pushCurrentNode(Node* n) { - bool nodeNeedsReference = n && n != m_doc; - if (nodeNeedsReference) - n->ref(); - if (m_currentNodeIsReferenced) - m_currentNode->deref(); + ASSERT(n); + ASSERT(m_currentNode); + if (n != m_doc) + n->ref(); + m_currentNodeStack.append(m_currentNode); m_currentNode = n; - m_currentNodeIsReferenced = nodeNeedsReference; +} + +void XMLTokenizer::popCurrentNode() +{ + ASSERT(m_currentNode); + ASSERT(m_currentNodeStack.size()); + + if (m_currentNode != m_doc) + m_currentNode->deref(); + + m_currentNode = m_currentNodeStack.last(); + m_currentNodeStack.removeLast(); +} + +void XMLTokenizer::clearCurrentNodeStack() +{ + if (m_currentNode && m_currentNode != m_doc) + m_currentNode->deref(); + m_currentNode = 0; + + if (m_currentNodeStack.size()) { // Aborted parsing. + for (size_t i = m_currentNodeStack.size() - 1; i != 0; --i) + m_currentNodeStack[i]->deref(); + if (m_currentNodeStack[0] && m_currentNodeStack[0] != m_doc) + m_currentNodeStack[0]->deref(); + m_currentNodeStack.clear(); + } } void XMLTokenizer::write(const SegmentedString& s, bool /*appendData*/) @@ -143,7 +169,7 @@ bool XMLTokenizer::enterText() RefPtr newNode = Text::create(m_doc, ""); if (!m_currentNode->addChild(newNode.get())) return false; - setCurrentNode(newNode.get()); + pushCurrentNode(newNode.get()); return true; } @@ -173,10 +199,7 @@ void XMLTokenizer::exitText() if (m_view && m_currentNode && !m_currentNode->attached()) m_currentNode->attach(); - // FIXME: What's the right thing to do if the parent is really 0? - // Just leaving the current node set to the text node doesn't make much sense. - if (Node* par = m_currentNode->parentNode()) - setCurrentNode(par); + popCurrentNode(); } void XMLTokenizer::end() @@ -190,7 +213,7 @@ void XMLTokenizer::end() m_doc->updateStyleSelector(); } - setCurrentNode(0); + clearCurrentNodeStack(); if (!m_parsingFragment) m_doc->finishedParsing(); } diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h b/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h index 019a831..e1ee09f 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h @@ -124,7 +124,10 @@ public: friend bool parseXMLDocumentFragment(const String& chunk, DocumentFragment* fragment, Element* parent); void initializeParserContext(const char* chunk = 0); - void setCurrentNode(Node*); + + void pushCurrentNode(Node*); + void popCurrentNode(); + void clearCurrentNodeStack(); void insertErrorMessageBlock(); @@ -148,7 +151,7 @@ public: Vector m_bufferedText; #endif Node* m_currentNode; - bool m_currentNodeIsReferenced; + Vector m_currentNodeStack; bool m_sawError; bool m_sawXSLTransform; diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp index 6cc0a0c..9aa0961 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp @@ -530,7 +530,6 @@ XMLTokenizer::XMLTokenizer(Document* _doc, FrameView* _view) , m_context(0) , m_pendingCallbacks(new PendingCallbacks) , m_currentNode(_doc) - , m_currentNodeIsReferenced(false) , m_sawError(false) , m_sawXSLTransform(false) , m_sawFirstElement(false) @@ -557,7 +556,6 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement) , m_context(0) , m_pendingCallbacks(new PendingCallbacks) , m_currentNode(fragment) - , m_currentNodeIsReferenced(fragment) , m_sawError(false) , m_sawXSLTransform(false) , m_sawFirstElement(false) @@ -576,8 +574,7 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement) , m_scriptStartLine(0) , m_parsingFragment(true) { - if (fragment) - fragment->ref(); + fragment->ref(); if (m_doc) m_doc->ref(); @@ -614,7 +611,7 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement) XMLTokenizer::~XMLTokenizer() { - setCurrentNode(0); + clearCurrentNodeStack(); if (m_parsingFragment && m_doc) m_doc->deref(); if (m_pendingScript) @@ -801,7 +798,7 @@ void XMLTokenizer::startElementNs(const xmlChar* xmlLocalName, const xmlChar* xm return; } - setCurrentNode(newElement.get()); + pushCurrentNode(newElement.get()); if (m_view && !newElement->attached()) newElement->attach(); @@ -822,22 +819,29 @@ void XMLTokenizer::endElementNs() exitText(); Node* n = m_currentNode; - RefPtr parent = n->parentNode(); n->finishParsingChildren(); if (!n->isElementNode() || !m_view) { - setCurrentNode(parent.get()); + popCurrentNode(); return; } Element* element = static_cast(n); + + // The element's parent may have already been removed from document. + // Parsing continues in this case, but scripts aren't executed. + if (!element->inDocument()) { + popCurrentNode(); + return; + } + ScriptElement* scriptElement = toScriptElement(element); if (!scriptElement) { - setCurrentNode(parent.get()); + popCurrentNode(); return; } - // don't load external scripts for standalone documents (for now) + // Don't load external scripts for standalone documents (for now). ASSERT(!m_pendingScript); m_requestingScript = true; @@ -865,7 +869,7 @@ void XMLTokenizer::endElementNs() m_view->frame()->script()->executeScript(ScriptSourceCode(scriptElement->scriptContent(), m_doc->url(), m_scriptStartLine)); } m_requestingScript = false; - setCurrentNode(parent.get()); + popCurrentNode(); } void XMLTokenizer::characters(const xmlChar* s, int len) diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp index 65cbc21..c6e73ba 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp @@ -85,7 +85,6 @@ XMLTokenizer::XMLTokenizer(Document* _doc, FrameView* _view) , m_view(_view) , m_wroteText(false) , m_currentNode(_doc) - , m_currentNodeIsReferenced(false) , m_sawError(false) , m_sawXSLTransform(false) , m_sawFirstElement(false) @@ -114,7 +113,6 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement) , m_view(0) , m_wroteText(false) , m_currentNode(fragment) - , m_currentNodeIsReferenced(fragment) , m_sawError(false) , m_sawXSLTransform(false) , m_sawFirstElement(false) @@ -133,8 +131,7 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement) , m_scriptStartLine(0) , m_parsingFragment(true) { - if (fragment) - fragment->ref(); + fragment->ref(); if (m_doc) m_doc->ref(); @@ -188,7 +185,7 @@ XMLTokenizer::XMLTokenizer(DocumentFragment* fragment, Element* parentElement) XMLTokenizer::~XMLTokenizer() { - setCurrentNode(0); + clearCurrentNodeStack(); if (m_parsingFragment && m_doc) m_doc->deref(); if (m_pendingScript) @@ -569,7 +566,7 @@ void XMLTokenizer::parseStartElement() return; } - setCurrentNode(newElement.get()); + pushCurrentNode(newElement.get()); if (m_view && !newElement->attached()) newElement->attach(); @@ -582,18 +579,26 @@ void XMLTokenizer::parseEndElement() exitText(); Node* n = m_currentNode; - RefPtr parent = n->parentNode(); n->finishParsingChildren(); if (!n->isElementNode() || !m_view) { - setCurrentNode(parent.get()); + if (!m_currentNodeStack.isEmpty()) + popCurrentNode(); return; } Element* element = static_cast(n); + + // The element's parent may have already been removed from document. + // Parsing continues in this case, but scripts aren't executed. + if (!element->inDocument()) { + popCurrentNode(); + return; + } + ScriptElement* scriptElement = toScriptElement(element); if (!scriptElement) { - setCurrentNode(parent.get()); + popCurrentNode(); return; } @@ -625,7 +630,7 @@ void XMLTokenizer::parseEndElement() m_view->frame()->script()->executeScript(ScriptSourceCode(scriptElement->scriptContent(), m_doc->url(), m_scriptStartLine)); } m_requestingScript = false; - setCurrentNode(parent.get()); + popCurrentNode(); } void XMLTokenizer::parseCharacters() diff --git a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp index 89d862f..7a8f025 100644 --- a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp @@ -334,6 +334,38 @@ static void diffTextDecorations(CSSMutableStyleDeclaration* style, int propertID setTextDecorationProperty(style, newTextDecoration.get(), propertID); } +static bool fontWeightIsBold(CSSStyleDeclaration* style) +{ + ASSERT(style); + RefPtr fontWeight = style->getPropertyCSSValue(CSSPropertyFontWeight); + + if (!fontWeight) + return false; + if (!fontWeight->isPrimitiveValue()) + return false; + + // Because b tag can only bold text, there are only two states in plain html: bold and not bold. + // Collapse all other values to either one of these two states for editing purposes. + switch (static_cast(fontWeight.get())->getIdent()) { + case CSSValue100: + case CSSValue200: + case CSSValue300: + case CSSValue400: + case CSSValue500: + case CSSValueNormal: + return false; + case CSSValueBold: + case CSSValue600: + case CSSValue700: + case CSSValue800: + case CSSValue900: + return true; + } + + ASSERT_NOT_REACHED(); // For CSSValueBolder and CSSValueLighter + return false; // Make compiler happy +} + RefPtr getPropertiesNotInComputedStyle(CSSStyleDeclaration* style, CSSComputedStyleDeclaration* computedStyle) { ASSERT(style); @@ -345,6 +377,9 @@ RefPtr getPropertiesNotInComputedStyle(CSSStyleDecla diffTextDecorations(result.get(), CSSPropertyTextDecoration, computedTextDecorationsInEffect.get()); diffTextDecorations(result.get(), CSSPropertyWebkitTextDecorationsInEffect, computedTextDecorationsInEffect.get()); + if (fontWeightIsBold(result.get()) == fontWeightIsBold(computedStyle)) + result->removeProperty(CSSPropertyFontWeight); + return result; } @@ -352,7 +387,6 @@ RefPtr getPropertiesNotInComputedStyle(CSSStyleDecla // e.g. when a user inserts a new paragraph, all properties listed here must be copied to the new paragraph. // FIXME: The current editingStyleProperties contains all inheritableProperties but we may not need to preserve all inheritable properties static const int editingStyleProperties[] = { - CSSPropertyBackgroundColor, // CSS inheritable properties CSSPropertyBorderCollapse, CSSPropertyColor, diff --git a/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp b/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp index 0496a8f..1617be8 100644 --- a/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp @@ -20,7 +20,7 @@ * 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. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -71,7 +71,7 @@ namespace WebCore { using namespace HTMLNames; -CompositeEditCommand::CompositeEditCommand(Document *document) +CompositeEditCommand::CompositeEditCommand(Document *document) : EditCommand(document) { } @@ -396,7 +396,7 @@ void CompositeEditCommand::rebalanceWhitespaceAt(const Position& position) Node* node = position.node(); if (!node || !node->isTextNode()) return; - Text* textNode = static_cast(node); + Text* textNode = static_cast(node); if (textNode->length() == 0) return; @@ -739,6 +739,129 @@ void CompositeEditCommand::pushPartiallySelectedAnchorElementsDown() setEndingSelection(originalSelection); } +// Clone the paragraph between start and end under blockElement, +// preserving the hierarchy up to outerNode. + +void CompositeEditCommand::cloneParagraphUnderNewElement(Position& start, Position& end, Node* outerNode, Element* blockElement) +{ + // First we clone the outerNode + + RefPtr lastNode = outerNode->cloneNode(isTableElement(outerNode)); + appendNode(lastNode, blockElement); + + if (start.node() != outerNode) { + Vector > ancestors; + + // Insert each node from innerNode to outerNode (excluded) in a list. + for (Node* n = start.node(); n && n != outerNode; n = n->parentNode()) + ancestors.append(n); + + // Clone every node between start.node() and outerBlock. + + for (size_t i = ancestors.size(); i != 0; --i) { + Node* item = ancestors[i - 1].get(); + RefPtr child = item->cloneNode(isTableElement(item)); + appendNode(child, static_cast(lastNode.get())); + lastNode = child.release(); + } + } + + // Handle the case of paragraphs with more than one node, + // cloning all the siblings until end.node() is reached. + + if (start.node() != end.node()) { + for (Node* n = start.node()->nextSibling(); n != NULL; n = n->nextSibling()) { + RefPtr clonedNode = n->cloneNode(true); + insertNodeAfter(clonedNode, lastNode); + lastNode = clonedNode.release(); + if (n == end.node()) + break; + } + } +} + + +// There are bugs in deletion when it removes a fully selected table/list. +// It expands and removes the entire table/list, but will let content +// before and after the table/list collapse onto one line. +// Deleting a paragraph will leave a placeholder. Remove it (and prune +// empty or unrendered parents). + +void CompositeEditCommand::cleanupAfterDeletion() +{ + VisiblePosition caretAfterDelete = endingSelection().visibleStart(); + if (isStartOfParagraph(caretAfterDelete) && isEndOfParagraph(caretAfterDelete)) { + // Note: We want the rightmost candidate. + Position position = caretAfterDelete.deepEquivalent().downstream(); + Node* node = position.node(); + // Normally deletion will leave a br as a placeholder. + if (node->hasTagName(brTag)) + removeNodeAndPruneAncestors(node); + // If the selection to move was empty and in an empty block that + // doesn't require a placeholder to prop itself open (like a bordered + // div or an li), remove it during the move (the list removal code + // expects this behavior). + else if (isBlock(node)) + removeNodeAndPruneAncestors(node); + else if (lineBreakExistsAtPosition(position)) { + // There is a preserved '\n' at caretAfterDelete. + // We can safely assume this is a text node. + Text* textNode = static_cast(node); + if (textNode->length() == 1) + removeNodeAndPruneAncestors(node); + else + deleteTextFromNode(textNode, position.deprecatedEditingOffset(), 1); + } + } +} + +// This is a version of moveParagraph that preserves style by keeping the original markup +// It is currently used only by IndentOutdentCommand but it is meant to be used in the +// future by several other commands such as InsertList and the align commands. +// The blockElement parameter is the element to move the paragraph to, +// outerNode is the top element of the paragraph hierarchy. + +void CompositeEditCommand::moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, Element* blockElement, Node* outerNode) +{ + ASSERT(outerNode); + ASSERT(blockElement); + + VisiblePosition beforeParagraph = startOfParagraphToMove.previous(); + VisiblePosition afterParagraph(endOfParagraphToMove.next()); + + // We upstream() the end and downstream() the start so that we don't include collapsed whitespace in the move. + // When we paste a fragment, spaces after the end and before the start are treated as though they were rendered. + Position start = startOfParagraphToMove.deepEquivalent().downstream(); + Position end = endOfParagraphToMove.deepEquivalent().upstream(); + + cloneParagraphUnderNewElement(start, end, outerNode, blockElement); + + setEndingSelection(VisibleSelection(start, end, DOWNSTREAM)); + deleteSelection(false, false, false, false); + + // There are bugs in deletion when it removes a fully selected table/list. + // It expands and removes the entire table/list, but will let content + // before and after the table/list collapse onto one line. + + cleanupAfterDeletion(); + + // Add a br if pruning an empty block level element caused a collapse. For example: + // foo^ + //
bar
+ // baz + // Imagine moving 'bar' to ^. 'bar' will be deleted and its div pruned. That would + // cause 'baz' to collapse onto the line with 'foobar' unless we insert a br. + // Must recononicalize these two VisiblePositions after the pruning above. + beforeParagraph = VisiblePosition(beforeParagraph.deepEquivalent()); + afterParagraph = VisiblePosition(afterParagraph.deepEquivalent()); + + if (beforeParagraph.isNotNull() && !isTableElement(beforeParagraph.deepEquivalent().node()) && (!isEndOfParagraph(beforeParagraph) || beforeParagraph == afterParagraph)) { + // FIXME: Trim text between beforeParagraph and afterParagraph if they aren't equal. + insertNodeAt(createBreakElement(document()), beforeParagraph.deepEquivalent()); + } +} + + // This moves a paragraph preserving its style. void CompositeEditCommand::moveParagraph(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, const VisiblePosition& destination, bool preserveSelection, bool preserveStyle) { @@ -784,7 +907,7 @@ void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagrap VisiblePosition afterParagraph(endOfParagraphToMove.next()); // We upstream() the end and downstream() the start so that we don't include collapsed whitespace in the move. - // When we paste a fragment, spaces after the end and before the start are treated as though they were rendered. + // When we paste a fragment, spaces after the end and before the start are treated as though they were rendered. Position start = startOfParagraphToMove.deepEquivalent().downstream(); Position end = endOfParagraphToMove.deepEquivalent().upstream(); @@ -793,7 +916,7 @@ void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagrap Position endRangeCompliant = rangeCompliantEquivalent(end); RefPtr range = Range::create(document(), startRangeCompliant.node(), startRangeCompliant.deprecatedEditingOffset(), endRangeCompliant.node(), endRangeCompliant.deprecatedEditingOffset()); - // FIXME: This is an inefficient way to preserve style on nodes in the paragraph to move. It + // FIXME: This is an inefficient way to preserve style on nodes in the paragraph to move. It // shouldn't matter though, since moved paragraphs will usually be quite small. RefPtr fragment = startOfParagraphToMove != endOfParagraphToMove ? createFragmentFromMarkup(document(), createMarkup(range.get(), 0, DoNotAnnotateForInterchange, true), "") : 0; @@ -813,42 +936,14 @@ void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagrap deleteSelection(false, false, false, false); ASSERT(destination.deepEquivalent().node()->inDocument()); - - // There are bugs in deletion when it removes a fully selected table/list. - // It expands and removes the entire table/list, but will let content - // before and after the table/list collapse onto one line. - - // Deleting a paragraph will leave a placeholder. Remove it (and prune - // empty or unrendered parents). - VisiblePosition caretAfterDelete = endingSelection().visibleStart(); - if (isStartOfParagraph(caretAfterDelete) && isEndOfParagraph(caretAfterDelete)) { - // Note: We want the rightmost candidate. - Position position = caretAfterDelete.deepEquivalent().downstream(); - Node* node = position.node(); - // Normally deletion will leave a br as a placeholder. - if (node->hasTagName(brTag)) - removeNodeAndPruneAncestors(node); - // If the selection to move was empty and in an empty block that - // doesn't require a placeholder to prop itself open (like a bordered - // div or an li), remove it during the move (the list removal code - // expects this behavior). - else if (isBlock(node)) - removeNodeAndPruneAncestors(node); - else if (lineBreakExistsAtVisiblePosition(caretAfterDelete)) { - // There is a preserved '\n' at caretAfterDelete. - Text* textNode = static_cast(node); - if (textNode->length() == 1) - removeNodeAndPruneAncestors(node); - else - deleteTextFromNode(textNode, position.deprecatedEditingOffset(), 1); - } - } - // Add a br if pruning an empty block level element caused a collapse. For example: + cleanupAfterDeletion(); + + // Add a br if pruning an empty block level element caused a collapse. For example: // foo^ //
bar
// baz - // Imagine moving 'bar' to ^. 'bar' will be deleted and its div pruned. That would + // Imagine moving 'bar' to ^. 'bar' will be deleted and its div pruned. That would // cause 'baz' to collapse onto the line with 'foobar' unless we insert a br. // Must recononicalize these two VisiblePositions after the pruning above. beforeParagraph = VisiblePosition(beforeParagraph.deepEquivalent()); @@ -912,7 +1007,7 @@ bool CompositeEditCommand::breakOutOfEmptyListItem() removeNodePreservingChildren(listNode->parentNode()); newBlock = createListItemElement(document()); } - // If listNode does NOT appear at the end of the outer list item, then behave as if in a regular paragraph. + // If listNode does NOT appear at the end of the outer list item, then behave as if in a regular paragraph. } else if (blockEnclosingList->hasTagName(olTag) || blockEnclosingList->hasTagName(ulTag)) newBlock = createListItemElement(document()); } @@ -971,7 +1066,7 @@ bool CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph() // to hold the caret before the highest blockquote. insertNodeBefore(br, highestBlockquote); VisiblePosition atBR(Position(br.get(), 0)); - // If the br we inserted collapsed, for example foo
...
, insert + // If the br we inserted collapsed, for example foo
...
, insert // a second one. if (!isStartOfParagraph(atBR)) insertNodeBefore(createBreakElement(document()), br); @@ -1002,7 +1097,7 @@ bool CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph() return true; } -// Operations use this function to avoid inserting content into an anchor when at the start or the end of +// Operations use this function to avoid inserting content into an anchor when at the start or the end of // that anchor, as in NSTextView. // FIXME: This is only an approximation of NSTextViews insertion behavior, which varies depending on how // the caret was made. @@ -1022,7 +1117,7 @@ Position CompositeEditCommand::positionAvoidingSpecialElementBoundary(const Posi if (enclosingAnchor && !isBlock(enclosingAnchor)) { VisiblePosition firstInAnchor(firstDeepEditingPositionForNode(enclosingAnchor)); VisiblePosition lastInAnchor(lastDeepEditingPositionForNode(enclosingAnchor)); - // If visually just after the anchor, insert *inside* the anchor unless it's the last + // If visually just after the anchor, insert *inside* the anchor unless it's the last // VisiblePosition in the document, to match NSTextView. if (visiblePos == lastInAnchor) { // Make sure anchors are pushed down before avoiding them so that we don't diff --git a/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.h b/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.h index 2c6403e..0cceaaa 100644 --- a/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.h +++ b/src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.h @@ -102,6 +102,9 @@ protected: void moveParagraph(const VisiblePosition&, const VisiblePosition&, const VisiblePosition&, bool preserveSelection = false, bool preserveStyle = true); void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const VisiblePosition&, bool preserveSelection = false, bool preserveStyle = true); + void moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, Element* blockElement, Node* outerNode); + void cloneParagraphUnderNewElement(Position& start, Position& end, Node* outerNode, Element* blockElement); + void cleanupAfterDeletion(); bool breakOutOfEmptyListItem(); bool breakOutOfEmptyMailBlockquotedParagraph(); diff --git a/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp b/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp index abd0174..3379b3c 100644 --- a/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp @@ -1291,10 +1291,10 @@ static String valueForeColor(Frame* frame, Event*) // Map of functions +struct CommandEntry { const char* name; EditorInternalCommand command; }; + static const CommandMap& createCommandMap() { - struct CommandEntry { const char* name; EditorInternalCommand command; }; - static const CommandEntry commands[] = { { "AlignCenter", { executeJustifyCenter, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, { "AlignJustified", { executeJustifyFull, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, diff --git a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp index 84fa147..808a2f8 100644 --- a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp @@ -67,37 +67,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 IndentOutdentCommand::prepareBlockquoteLevelForInsertion(const VisiblePosition& currentParagraph, RefPtr& lastBlockquote) -{ - int currentBlockquoteLevel = 0; - int lastBlockquoteLevel = 0; - Node* node = currentParagraph.deepEquivalent().node(); - while ((node = enclosingNodeWithTag(Position(node->parentNode(), 0), blockquoteTag))) - currentBlockquoteLevel++; - node = lastBlockquote.get(); - while ((node = enclosingNodeWithTag(Position(node->parentNode(), 0), blockquoteTag))) - lastBlockquoteLevel++; - while (currentBlockquoteLevel > lastBlockquoteLevel) { - RefPtr newBlockquote = createIndentBlockquoteElement(document()); - appendNode(newBlockquote, lastBlockquote); - lastBlockquote = newBlockquote; - lastBlockquoteLevel++; - } - while (currentBlockquoteLevel < lastBlockquoteLevel) { - lastBlockquote = static_cast(enclosingNodeWithTag(Position(lastBlockquote->parentNode(), 0), blockquoteTag)); - lastBlockquoteLevel--; - } - RefPtr 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. @@ -117,13 +86,9 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const VisiblePosition& endOfCu Element* nextList = selectedListItem->nextElementSibling(); RefPtr newList = document()->createElement(listNode->tagQName(), false); - RefPtr newListItem = selectedListItem->cloneElementWithoutChildren(); - RefPtr placeholder = createBreakElement(document()); insertNodeBefore(newList, selectedListItem); - appendNode(newListItem, newList); - appendNode(placeholder, newListItem); - moveParagraph(startOfParagraph(endOfCurrentParagraph), endOfCurrentParagraph, VisiblePosition(Position(placeholder, 0)), true); + moveParagraphWithClones(startOfParagraph(endOfCurrentParagraph), endOfCurrentParagraph, newList.get(), selectedListItem); if (canMergeLists(previousList, newList.get())) mergeIdenticalElements(previousList, newList); @@ -137,25 +102,31 @@ void IndentOutdentCommand::indentIntoBlockquote(const VisiblePosition& endOfCurr { Node* enclosingCell = 0; + Position start = startOfParagraph(endOfCurrentParagraph).deepEquivalent(); + enclosingCell = enclosingNodeOfType(start, &isTableCell); + Node* nodeToSplitTo; + if (enclosingCell) + nodeToSplitTo = enclosingCell; + else if (enclosingList(start.node())) + nodeToSplitTo = enclosingBlock(start.node()); + else + nodeToSplitTo = editableRootForPosition(start); + + RefPtr outerBlock = splitTreeToNode(start.node(), nodeToSplitTo); + if (!targetBlockquote) { // Create a new blockquote and insert it as a child of the root editable 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 startOfNewBlock = splitTreeToNode(start.node(), nodeToSplitTo); - insertNodeBefore(targetBlockquote, startOfNewBlock); + insertNodeBefore(targetBlockquote, outerBlock); } - RefPtr insertionPoint = prepareBlockquoteLevelForInsertion(endOfCurrentParagraph, targetBlockquote); - + moveParagraphWithClones(startOfParagraph(endOfCurrentParagraph), endOfCurrentParagraph, targetBlockquote.get(), outerBlock.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); } void IndentOutdentCommand::indentRegion() @@ -191,8 +162,6 @@ void IndentOutdentCommand::indentRegion() blockquoteForNextIndent = 0; else indentIntoBlockquote(endOfCurrentParagraph, endOfNextParagraph, blockquoteForNextIndent); - // blockquoteForNextIndent maybe updated - // this is due to the way prepareBlockquoteLevelForInsertion was designed. // 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()) { diff --git a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h index 419f832f..817b4c8 100644 --- a/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h +++ b/src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h @@ -49,7 +49,6 @@ private: void indentRegion(); void outdentRegion(); void outdentParagraph(); - PassRefPtr prepareBlockquoteLevelForInsertion(const VisiblePosition&, RefPtr&); bool tryIndentingAsListItem(const VisiblePosition&); void indentIntoBlockquote(const VisiblePosition&, const VisiblePosition&, RefPtr&); diff --git a/src/3rdparty/webkit/WebCore/editing/ReplaceNodeWithSpanCommand.cpp b/src/3rdparty/webkit/WebCore/editing/ReplaceNodeWithSpanCommand.cpp index 21ca924..0874201 100644 --- a/src/3rdparty/webkit/WebCore/editing/ReplaceNodeWithSpanCommand.cpp +++ b/src/3rdparty/webkit/WebCore/editing/ReplaceNodeWithSpanCommand.cpp @@ -57,7 +57,9 @@ static void swapInNodePreservingAttributesAndChildren(Node* newNode, Node* nodeT parentNode->insertBefore(newNode, nodeToReplace, ec); ASSERT(!ec); - for (Node* child = nodeToReplace->firstChild(); child; child = child->nextSibling()) { + Node* nextChild; + for (Node* child = nodeToReplace->firstChild(); child; child = nextChild) { + nextChild = child->nextSibling(); newNode->appendChild(child, ec); ASSERT(!ec); } diff --git a/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp b/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp index 7d99916..00672f2 100644 --- a/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp +++ b/src/3rdparty/webkit/WebCore/editing/SelectionController.cpp @@ -725,6 +725,8 @@ bool SelectionController::modify(EAlteration alter, int verticalDistance, bool u if (userTriggered) m_frame->setSelectionGranularity(CharacterGranularity); + m_lastChangeWasHorizontalExtension = alter == EXTEND; + return true; } diff --git a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp index 8780c36..919eb24 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp +++ b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp @@ -226,7 +226,7 @@ findProp (register const char *str, register unsigned int len) { enum { - TOTAL_KEYWORDS = 278, + TOTAL_KEYWORDS = 280, MIN_WORD_LENGTH = 3, MAX_WORD_LENGTH = 43, MIN_HASH_VALUE = 6, @@ -241,67 +241,67 @@ findProp (register const char *str, register unsigned int len) {"zoom", CSSPropertyZoom}, #line 23 "CSSPropertyNames.gperf" {"border", CSSPropertyBorder}, -#line 267 "CSSPropertyNames.gperf" +#line 268 "CSSPropertyNames.gperf" {"marker", CSSPropertyMarker}, #line 24 "CSSPropertyNames.gperf" {"border-bottom", CSSPropertyBorderBottom}, -#line 269 "CSSPropertyNames.gperf" +#line 270 "CSSPropertyNames.gperf" {"marker-mid", CSSPropertyMarkerMid}, #line 78 "CSSPropertyNames.gperf" {"margin", CSSPropertyMargin}, -#line 285 "CSSPropertyNames.gperf" +#line 286 "CSSPropertyNames.gperf" {"kerning", CSSPropertyKerning}, -#line 268 "CSSPropertyNames.gperf" +#line 269 "CSSPropertyNames.gperf" {"marker-end", CSSPropertyMarkerEnd}, #line 79 "CSSPropertyNames.gperf" {"margin-bottom", CSSPropertyMarginBottom}, -#line 251 "CSSPropertyNames.gperf" +#line 252 "CSSPropertyNames.gperf" {"mask", CSSPropertyMask}, -#line 272 "CSSPropertyNames.gperf" +#line 273 "CSSPropertyNames.gperf" {"stroke", CSSPropertyStroke}, #line 111 "CSSPropertyNames.gperf" {"size", CSSPropertySize}, #line 144 "CSSPropertyNames.gperf" {"word-break", CSSPropertyWordBreak}, -#line 287 "CSSPropertyNames.gperf" +#line 288 "CSSPropertyNames.gperf" {"writing-mode", CSSPropertyWritingMode}, -#line 162 "CSSPropertyNames.gperf" +#line 163 "CSSPropertyNames.gperf" {"-webkit-binding", CSSPropertyWebkitBinding}, #line 109 "CSSPropertyNames.gperf" {"resize", CSSPropertyResize}, -#line 266 "CSSPropertyNames.gperf" +#line 267 "CSSPropertyNames.gperf" {"image-rendering", CSSPropertyImageRendering}, #line 149 "CSSPropertyNames.gperf" {"-webkit-animation", CSSPropertyWebkitAnimation}, -#line 165 "CSSPropertyNames.gperf" +#line 166 "CSSPropertyNames.gperf" {"-webkit-border-image", CSSPropertyWebkitBorderImage}, -#line 205 "CSSPropertyNames.gperf" +#line 206 "CSSPropertyNames.gperf" {"-webkit-mask", CSSPropertyWebkitMask}, #line 136 "CSSPropertyNames.gperf" {"top", CSSPropertyTop}, #line 142 "CSSPropertyNames.gperf" {"widows", CSSPropertyWidows}, -#line 270 "CSSPropertyNames.gperf" +#line 271 "CSSPropertyNames.gperf" {"marker-start", CSSPropertyMarkerStart}, #line 154 "CSSPropertyNames.gperf" {"-webkit-animation-name", CSSPropertyWebkitAnimationName}, #line 102 "CSSPropertyNames.gperf" {"page", CSSPropertyPage}, -#line 210 "CSSPropertyNames.gperf" +#line 211 "CSSPropertyNames.gperf" {"-webkit-mask-image", CSSPropertyWebkitMaskImage}, #line 43 "CSSPropertyNames.gperf" {"border-top", CSSPropertyBorderTop}, #line 97 "CSSPropertyNames.gperf" {"padding", CSSPropertyPadding}, -#line 240 "CSSPropertyNames.gperf" +#line 241 "CSSPropertyNames.gperf" {"-webkit-transition", CSSPropertyWebkitTransition}, -#line 211 "CSSPropertyNames.gperf" +#line 212 "CSSPropertyNames.gperf" {"-webkit-mask-origin", CSSPropertyWebkitMaskOrigin}, #line 98 "CSSPropertyNames.gperf" {"padding-bottom", CSSPropertyPaddingBottom}, #line 82 "CSSPropertyNames.gperf" {"margin-top", CSSPropertyMarginTop}, -#line 197 "CSSPropertyNames.gperf" +#line 198 "CSSPropertyNames.gperf" {"-webkit-margin-start", CSSPropertyWebkitMarginStart}, #line 55 "CSSPropertyNames.gperf" {"content", CSSPropertyContent}, @@ -309,35 +309,35 @@ findProp (register const char *str, register unsigned int len) {"position", CSSPropertyPosition}, #line 59 "CSSPropertyNames.gperf" {"direction", CSSPropertyDirection}, -#line 218 "CSSPropertyNames.gperf" +#line 219 "CSSPropertyNames.gperf" {"-webkit-mask-size", CSSPropertyWebkitMaskSize}, #line 112 "CSSPropertyNames.gperf" {"src", CSSPropertySrc}, #line 146 "CSSPropertyNames.gperf" {"word-wrap", CSSPropertyWordWrap}, -#line 220 "CSSPropertyNames.gperf" +#line 221 "CSSPropertyNames.gperf" {"-webkit-nbsp-mode", CSSPropertyWebkitNbspMode}, #line 105 "CSSPropertyNames.gperf" {"page-break-inside", CSSPropertyPageBreakInside}, -#line 215 "CSSPropertyNames.gperf" +#line 216 "CSSPropertyNames.gperf" {"-webkit-mask-repeat", CSSPropertyWebkitMaskRepeat}, #line 101 "CSSPropertyNames.gperf" {"padding-top", CSSPropertyPaddingTop}, -#line 221 "CSSPropertyNames.gperf" +#line 222 "CSSPropertyNames.gperf" {"-webkit-padding-start", CSSPropertyWebkitPaddingStart}, #line 151 "CSSPropertyNames.gperf" {"-webkit-animation-direction", CSSPropertyWebkitAnimationDirection}, -#line 212 "CSSPropertyNames.gperf" +#line 213 "CSSPropertyNames.gperf" {"-webkit-mask-position", CSSPropertyWebkitMaskPosition}, -#line 193 "CSSPropertyNames.gperf" +#line 194 "CSSPropertyNames.gperf" {"-webkit-line-break", CSSPropertyWebkitLineBreak}, -#line 277 "CSSPropertyNames.gperf" +#line 278 "CSSPropertyNames.gperf" {"stroke-miterlimit", CSSPropertyStrokeMiterlimit}, -#line 226 "CSSPropertyNames.gperf" +#line 227 "CSSPropertyNames.gperf" {"-webkit-rtl-ordering", CSSPropertyWebkitRtlOrdering}, -#line 276 "CSSPropertyNames.gperf" +#line 277 "CSSPropertyNames.gperf" {"stroke-linejoin", CSSPropertyStrokeLinejoin}, -#line 282 "CSSPropertyNames.gperf" +#line 283 "CSSPropertyNames.gperf" {"dominant-baseline", CSSPropertyDominantBaseline}, #line 51 "CSSPropertyNames.gperf" {"caption-side", CSSPropertyCaptionSide}, @@ -357,25 +357,25 @@ findProp (register const char *str, register unsigned int len) {"word-spacing", CSSPropertyWordSpacing}, #line 31 "CSSPropertyNames.gperf" {"border-color", CSSPropertyBorderColor}, -#line 199 "CSSPropertyNames.gperf" +#line 200 "CSSPropertyNames.gperf" {"-webkit-marquee", CSSPropertyWebkitMarquee}, #line 25 "CSSPropertyNames.gperf" {"border-bottom-color", CSSPropertyBorderBottomColor}, #line 152 "CSSPropertyNames.gperf" {"-webkit-animation-duration", CSSPropertyWebkitAnimationDuration}, -#line 245 "CSSPropertyNames.gperf" +#line 246 "CSSPropertyNames.gperf" {"-webkit-user-drag", CSSPropertyWebkitUserDrag}, -#line 166 "CSSPropertyNames.gperf" +#line 167 "CSSPropertyNames.gperf" {"-webkit-border-radius", CSSPropertyWebkitBorderRadius}, -#line 209 "CSSPropertyNames.gperf" +#line 210 "CSSPropertyNames.gperf" {"-webkit-mask-composite", CSSPropertyWebkitMaskComposite}, -#line 262 "CSSPropertyNames.gperf" +#line 263 "CSSPropertyNames.gperf" {"color-rendering", CSSPropertyColorRendering}, #line 137 "CSSPropertyNames.gperf" {"unicode-bidi", CSSPropertyUnicodeBidi}, #line 53 "CSSPropertyNames.gperf" {"clip", CSSPropertyClip}, -#line 242 "CSSPropertyNames.gperf" +#line 243 "CSSPropertyNames.gperf" {"-webkit-transition-duration", CSSPropertyWebkitTransitionDuration}, #line 157 "CSSPropertyNames.gperf" {"-webkit-appearance", CSSPropertyWebkitAppearance}, @@ -395,33 +395,35 @@ findProp (register const char *str, register unsigned int len) {"background-origin", CSSPropertyBackgroundOrigin}, #line 57 "CSSPropertyNames.gperf" {"counter-reset", CSSPropertyCounterReset}, -#line 257 "CSSPropertyNames.gperf" +#line 258 "CSSPropertyNames.gperf" {"stop-color", CSSPropertyStopColor}, -#line 280 "CSSPropertyNames.gperf" +#line 281 "CSSPropertyNames.gperf" {"alignment-baseline", CSSPropertyAlignmentBaseline}, #line 22 "CSSPropertyNames.gperf" {"background-size", CSSPropertyBackgroundSize}, -#line 202 "CSSPropertyNames.gperf" +#line 203 "CSSPropertyNames.gperf" {"-webkit-marquee-repetition", CSSPropertyWebkitMarqueeRepetition}, -#line 275 "CSSPropertyNames.gperf" +#line 276 "CSSPropertyNames.gperf" {"stroke-linecap", CSSPropertyStrokeLinecap}, #line 161 "CSSPropertyNames.gperf" {"-webkit-background-origin", CSSPropertyWebkitBackgroundOrigin}, #line 72 "CSSPropertyNames.gperf" {"letter-spacing", CSSPropertyLetterSpacing}, -#line 203 "CSSPropertyNames.gperf" +#line 204 "CSSPropertyNames.gperf" {"-webkit-marquee-speed", CSSPropertyWebkitMarqueeSpeed}, -#line 208 "CSSPropertyNames.gperf" +#line 209 "CSSPropertyNames.gperf" {"-webkit-mask-clip", CSSPropertyWebkitMaskClip}, #line 153 "CSSPropertyNames.gperf" {"-webkit-animation-iteration-count", CSSPropertyWebkitAnimationIterationCount}, -#line 200 "CSSPropertyNames.gperf" - {"-webkit-marquee-direction", CSSPropertyWebkitMarqueeDirection}, #line 201 "CSSPropertyNames.gperf" + {"-webkit-marquee-direction", CSSPropertyWebkitMarqueeDirection}, +#line 162 "CSSPropertyNames.gperf" + {"-webkit-background-size", CSSPropertyWebkitBackgroundSize}, +#line 202 "CSSPropertyNames.gperf" {"-webkit-marquee-increment", CSSPropertyWebkitMarqueeIncrement}, #line 19 "CSSPropertyNames.gperf" {"background-repeat", CSSPropertyBackgroundRepeat}, -#line 222 "CSSPropertyNames.gperf" +#line 223 "CSSPropertyNames.gperf" {"-webkit-perspective", CSSPropertyWebkitPerspective}, #line 110 "CSSPropertyNames.gperf" {"right", CSSPropertyRight}, @@ -433,7 +435,7 @@ findProp (register const char *str, register unsigned int len) {"background-position", CSSPropertyBackgroundPosition}, #line 86 "CSSPropertyNames.gperf" {"min-width", CSSPropertyMinWidth}, -#line 223 "CSSPropertyNames.gperf" +#line 224 "CSSPropertyNames.gperf" {"-webkit-perspective-origin", CSSPropertyWebkitPerspectiveOrigin}, #line 37 "CSSPropertyNames.gperf" {"border-right", CSSPropertyBorderRight}, @@ -445,18 +447,20 @@ findProp (register const char *str, register unsigned int len) {"margin-right", CSSPropertyMarginRight}, #line 29 "CSSPropertyNames.gperf" {"border-bottom-width", CSSPropertyBorderBottomWidth}, -#line 252 "CSSPropertyNames.gperf" +#line 253 "CSSPropertyNames.gperf" {"enable-background", CSSPropertyEnableBackground}, -#line 279 "CSSPropertyNames.gperf" +#line 280 "CSSPropertyNames.gperf" {"stroke-width", CSSPropertyStrokeWidth}, -#line 189 "CSSPropertyNames.gperf" +#line 190 "CSSPropertyNames.gperf" {"-webkit-columns", CSSPropertyWebkitColumns}, -#line 194 "CSSPropertyNames.gperf" +#line 195 "CSSPropertyNames.gperf" {"-webkit-line-clamp", CSSPropertyWebkitLineClamp}, -#line 259 "CSSPropertyNames.gperf" +#line 260 "CSSPropertyNames.gperf" {"color-interpolation", CSSPropertyColorInterpolation}, -#line 163 "CSSPropertyNames.gperf" +#line 164 "CSSPropertyNames.gperf" {"-webkit-border-fit", CSSPropertyWebkitBorderFit}, +#line 289 "CSSPropertyNames.gperf" + {"-webkit-shadow", CSSPropertyWebkitShadow}, #line 65 "CSSPropertyNames.gperf" {"font-size", CSSPropertyFontSize}, #line 30 "CSSPropertyNames.gperf" @@ -467,11 +471,11 @@ findProp (register const char *str, register unsigned int len) {"z-index", CSSPropertyZIndex}, #line 139 "CSSPropertyNames.gperf" {"vertical-align", CSSPropertyVerticalAlign}, -#line 181 "CSSPropertyNames.gperf" +#line 182 "CSSPropertyNames.gperf" {"-webkit-column-break-inside", CSSPropertyWebkitColumnBreakInside}, #line 100 "CSSPropertyNames.gperf" {"padding-right", CSSPropertyPaddingRight}, -#line 247 "CSSPropertyNames.gperf" +#line 248 "CSSPropertyNames.gperf" {"-webkit-user-select", CSSPropertyWebkitUserSelect}, #line 48 "CSSPropertyNames.gperf" {"border-top-width", CSSPropertyBorderTopWidth}, @@ -479,49 +483,49 @@ findProp (register const char *str, register unsigned int len) {"text-rendering", CSSPropertyTextRendering}, #line 88 "CSSPropertyNames.gperf" {"orphans", CSSPropertyOrphans}, -#line 174 "CSSPropertyNames.gperf" +#line 175 "CSSPropertyNames.gperf" {"-webkit-box-orient", CSSPropertyWebkitBoxOrient}, -#line 234 "CSSPropertyNames.gperf" +#line 235 "CSSPropertyNames.gperf" {"-webkit-transform", CSSPropertyWebkitTransform}, -#line 183 "CSSPropertyNames.gperf" +#line 184 "CSSPropertyNames.gperf" {"-webkit-column-gap", CSSPropertyWebkitColumnGap}, -#line 196 "CSSPropertyNames.gperf" +#line 197 "CSSPropertyNames.gperf" {"-webkit-margin-collapse", CSSPropertyWebkitMarginCollapse}, #line 160 "CSSPropertyNames.gperf" {"-webkit-background-composite", CSSPropertyWebkitBackgroundComposite}, -#line 195 "CSSPropertyNames.gperf" +#line 196 "CSSPropertyNames.gperf" {"-webkit-margin-bottom-collapse", CSSPropertyWebkitMarginBottomCollapse}, #line 13 "CSSPropertyNames.gperf" {"background-color", CSSPropertyBackgroundColor}, -#line 231 "CSSPropertyNames.gperf" +#line 232 "CSSPropertyNames.gperf" {"-webkit-text-stroke", CSSPropertyWebkitTextStroke}, -#line 271 "CSSPropertyNames.gperf" +#line 272 "CSSPropertyNames.gperf" {"shape-rendering", CSSPropertyShapeRendering}, #line 104 "CSSPropertyNames.gperf" {"page-break-before", CSSPropertyPageBreakBefore}, -#line 235 "CSSPropertyNames.gperf" +#line 236 "CSSPropertyNames.gperf" {"-webkit-transform-origin", CSSPropertyWebkitTransformOrigin}, #line 103 "CSSPropertyNames.gperf" {"page-break-after", CSSPropertyPageBreakAfter}, #line 90 "CSSPropertyNames.gperf" {"outline-color", CSSPropertyOutlineColor}, -#line 207 "CSSPropertyNames.gperf" +#line 208 "CSSPropertyNames.gperf" {"-webkit-mask-box-image", CSSPropertyWebkitMaskBoxImage}, -#line 178 "CSSPropertyNames.gperf" +#line 179 "CSSPropertyNames.gperf" {"-webkit-box-sizing", CSSPropertyWebkitBoxSizing}, #line 71 "CSSPropertyNames.gperf" {"left", CSSPropertyLeft}, -#line 238 "CSSPropertyNames.gperf" +#line 239 "CSSPropertyNames.gperf" {"-webkit-transform-origin-z", CSSPropertyWebkitTransformOriginZ}, #line 68 "CSSPropertyNames.gperf" {"font-variant", CSSPropertyFontVariant}, #line 62 "CSSPropertyNames.gperf" {"float", CSSPropertyFloat}, -#line 253 "CSSPropertyNames.gperf" +#line 254 "CSSPropertyNames.gperf" {"filter", CSSPropertyFilter}, #line 32 "CSSPropertyNames.gperf" {"border-left", CSSPropertyBorderLeft}, -#line 206 "CSSPropertyNames.gperf" +#line 207 "CSSPropertyNames.gperf" {"-webkit-mask-attachment", CSSPropertyWebkitMaskAttachment}, #line 115 "CSSPropertyNames.gperf" {"text-decoration", CSSPropertyTextDecoration}, @@ -529,31 +533,31 @@ findProp (register const char *str, register unsigned int len) {"margin-left", CSSPropertyMarginLeft}, #line 12 "CSSPropertyNames.gperf" {"background-clip", CSSPropertyBackgroundClip}, -#line 198 "CSSPropertyNames.gperf" +#line 199 "CSSPropertyNames.gperf" {"-webkit-margin-top-collapse", CSSPropertyWebkitMarginTopCollapse}, -#line 167 "CSSPropertyNames.gperf" +#line 168 "CSSPropertyNames.gperf" {"-webkit-border-vertical-spacing", CSSPropertyWebkitBorderVerticalSpacing}, -#line 250 "CSSPropertyNames.gperf" +#line 251 "CSSPropertyNames.gperf" {"clip-rule", CSSPropertyClipRule}, -#line 169 "CSSPropertyNames.gperf" +#line 170 "CSSPropertyNames.gperf" {"-webkit-box-direction", CSSPropertyWebkitBoxDirection}, #line 141 "CSSPropertyNames.gperf" {"white-space", CSSPropertyWhiteSpace}, #line 114 "CSSPropertyNames.gperf" {"text-align", CSSPropertyTextAlign}, -#line 216 "CSSPropertyNames.gperf" +#line 217 "CSSPropertyNames.gperf" {"-webkit-mask-repeat-x", CSSPropertyWebkitMaskRepeatX}, #line 159 "CSSPropertyNames.gperf" {"-webkit-background-clip", CSSPropertyWebkitBackgroundClip}, -#line 217 "CSSPropertyNames.gperf" +#line 218 "CSSPropertyNames.gperf" {"-webkit-mask-repeat-y", CSSPropertyWebkitMaskRepeatY}, -#line 168 "CSSPropertyNames.gperf" +#line 169 "CSSPropertyNames.gperf" {"-webkit-box-align", CSSPropertyWebkitBoxAlign}, -#line 213 "CSSPropertyNames.gperf" +#line 214 "CSSPropertyNames.gperf" {"-webkit-mask-position-x", CSSPropertyWebkitMaskPositionX}, #line 99 "CSSPropertyNames.gperf" {"padding-left", CSSPropertyPaddingLeft}, -#line 190 "CSSPropertyNames.gperf" +#line 191 "CSSPropertyNames.gperf" {"-webkit-font-size-delta", CSSPropertyWebkitFontSizeDelta}, #line 27 "CSSPropertyNames.gperf" {"border-bottom-right-radius", CSSPropertyBorderBottomRightRadius}, @@ -561,61 +565,61 @@ findProp (register const char *str, register unsigned int len) {"opacity", CSSPropertyOpacity}, #line 38 "CSSPropertyNames.gperf" {"border-right-color", CSSPropertyBorderRightColor}, -#line 175 "CSSPropertyNames.gperf" +#line 176 "CSSPropertyNames.gperf" {"-webkit-box-pack", CSSPropertyWebkitBoxPack}, -#line 172 "CSSPropertyNames.gperf" +#line 173 "CSSPropertyNames.gperf" {"-webkit-box-lines", CSSPropertyWebkitBoxLines}, #line 42 "CSSPropertyNames.gperf" {"border-style", CSSPropertyBorderStyle}, -#line 214 "CSSPropertyNames.gperf" +#line 215 "CSSPropertyNames.gperf" {"-webkit-mask-position-y", CSSPropertyWebkitMaskPositionY}, #line 94 "CSSPropertyNames.gperf" {"overflow", CSSPropertyOverflow}, #line 28 "CSSPropertyNames.gperf" {"border-bottom-style", CSSPropertyBorderBottomStyle}, -#line 263 "CSSPropertyNames.gperf" +#line 264 "CSSPropertyNames.gperf" {"fill", CSSPropertyFill}, #line 150 "CSSPropertyNames.gperf" {"-webkit-animation-delay", CSSPropertyWebkitAnimationDelay}, -#line 278 "CSSPropertyNames.gperf" +#line 279 "CSSPropertyNames.gperf" {"stroke-opacity", CSSPropertyStrokeOpacity}, #line 123 "CSSPropertyNames.gperf" {"text-overline", CSSPropertyTextOverline}, -#line 182 "CSSPropertyNames.gperf" +#line 183 "CSSPropertyNames.gperf" {"-webkit-column-count", CSSPropertyWebkitColumnCount}, #line 125 "CSSPropertyNames.gperf" {"text-overline-mode", CSSPropertyTextOverlineMode}, #line 46 "CSSPropertyNames.gperf" {"border-top-right-radius", CSSPropertyBorderTopRightRadius}, -#line 241 "CSSPropertyNames.gperf" +#line 242 "CSSPropertyNames.gperf" {"-webkit-transition-delay", CSSPropertyWebkitTransitionDelay}, #line 60 "CSSPropertyNames.gperf" {"display", CSSPropertyDisplay}, #line 93 "CSSPropertyNames.gperf" {"outline-width", CSSPropertyOutlineWidth}, -#line 243 "CSSPropertyNames.gperf" +#line 244 "CSSPropertyNames.gperf" {"-webkit-transition-property", CSSPropertyWebkitTransitionProperty}, #line 47 "CSSPropertyNames.gperf" {"border-top-style", CSSPropertyBorderTopStyle}, -#line 184 "CSSPropertyNames.gperf" +#line 185 "CSSPropertyNames.gperf" {"-webkit-column-rule", CSSPropertyWebkitColumnRule}, #line 140 "CSSPropertyNames.gperf" {"visibility", CSSPropertyVisibility}, -#line 249 "CSSPropertyNames.gperf" +#line 250 "CSSPropertyNames.gperf" {"clip-path", CSSPropertyClipPath}, -#line 258 "CSSPropertyNames.gperf" +#line 259 "CSSPropertyNames.gperf" {"stop-opacity", CSSPropertyStopOpacity}, -#line 248 "CSSPropertyNames.gperf" +#line 249 "CSSPropertyNames.gperf" {"-webkit-variable-declaration-block", CSSPropertyWebkitVariableDeclarationBlock}, -#line 230 "CSSPropertyNames.gperf" +#line 231 "CSSPropertyNames.gperf" {"-webkit-text-size-adjust", CSSPropertyWebkitTextSizeAdjust}, -#line 232 "CSSPropertyNames.gperf" +#line 233 "CSSPropertyNames.gperf" {"-webkit-text-stroke-color", CSSPropertyWebkitTextStrokeColor}, -#line 256 "CSSPropertyNames.gperf" +#line 257 "CSSPropertyNames.gperf" {"lighting-color", CSSPropertyLightingColor}, #line 70 "CSSPropertyNames.gperf" {"height", CSSPropertyHeight}, -#line 254 "CSSPropertyNames.gperf" +#line 255 "CSSPropertyNames.gperf" {"flood-color", CSSPropertyFloodColor}, #line 156 "CSSPropertyNames.gperf" {"-webkit-animation-timing-function", CSSPropertyWebkitAnimationTimingFunction}, @@ -635,21 +639,21 @@ findProp (register const char *str, register unsigned int len) {"border-left-color", CSSPropertyBorderLeftColor}, #line 74 "CSSPropertyNames.gperf" {"list-style", CSSPropertyListStyle}, -#line 164 "CSSPropertyNames.gperf" +#line 165 "CSSPropertyNames.gperf" {"-webkit-border-horizontal-spacing", CSSPropertyWebkitBorderHorizontalSpacing}, -#line 244 "CSSPropertyNames.gperf" +#line 245 "CSSPropertyNames.gperf" {"-webkit-transition-timing-function", CSSPropertyWebkitTransitionTimingFunction}, #line 75 "CSSPropertyNames.gperf" {"list-style-image", CSSPropertyListStyleImage}, #line 40 "CSSPropertyNames.gperf" {"border-right-width", CSSPropertyBorderRightWidth}, -#line 188 "CSSPropertyNames.gperf" +#line 189 "CSSPropertyNames.gperf" {"-webkit-column-width", CSSPropertyWebkitColumnWidth}, #line 20 "CSSPropertyNames.gperf" {"background-repeat-x", CSSPropertyBackgroundRepeatX}, #line 69 "CSSPropertyNames.gperf" {"font-weight", CSSPropertyFontWeight}, -#line 261 "CSSPropertyNames.gperf" +#line 262 "CSSPropertyNames.gperf" {"color-profile", CSSPropertyColorProfile}, #line 45 "CSSPropertyNames.gperf" {"border-top-left-radius", CSSPropertyBorderTopLeftRadius}, @@ -659,21 +663,21 @@ findProp (register const char *str, register unsigned int len) {"background-position-x", CSSPropertyBackgroundPositionX}, #line 84 "CSSPropertyNames.gperf" {"max-width", CSSPropertyMaxWidth}, -#line 224 "CSSPropertyNames.gperf" +#line 225 "CSSPropertyNames.gperf" {"-webkit-perspective-origin-x", CSSPropertyWebkitPerspectiveOriginX}, -#line 180 "CSSPropertyNames.gperf" +#line 181 "CSSPropertyNames.gperf" {"-webkit-column-break-before", CSSPropertyWebkitColumnBreakBefore}, -#line 179 "CSSPropertyNames.gperf" +#line 180 "CSSPropertyNames.gperf" {"-webkit-column-break-after", CSSPropertyWebkitColumnBreakAfter}, #line 18 "CSSPropertyNames.gperf" {"background-position-y", CSSPropertyBackgroundPositionY}, -#line 191 "CSSPropertyNames.gperf" +#line 192 "CSSPropertyNames.gperf" {"-webkit-font-smoothing", CSSPropertyWebkitFontSmoothing}, -#line 173 "CSSPropertyNames.gperf" +#line 174 "CSSPropertyNames.gperf" {"-webkit-box-ordinal-group", CSSPropertyWebkitBoxOrdinalGroup}, -#line 204 "CSSPropertyNames.gperf" +#line 205 "CSSPropertyNames.gperf" {"-webkit-marquee-style", CSSPropertyWebkitMarqueeStyle}, -#line 225 "CSSPropertyNames.gperf" +#line 226 "CSSPropertyNames.gperf" {"-webkit-perspective-origin-y", CSSPropertyWebkitPerspectiveOriginY}, #line 129 "CSSPropertyNames.gperf" {"text-shadow", CSSPropertyTextShadow}, @@ -683,13 +687,13 @@ findProp (register const char *str, register unsigned int len) {"list-style-position", CSSPropertyListStylePosition}, #line 113 "CSSPropertyNames.gperf" {"table-layout", CSSPropertyTableLayout}, -#line 177 "CSSPropertyNames.gperf" +#line 178 "CSSPropertyNames.gperf" {"-webkit-box-shadow", CSSPropertyWebkitBoxShadow}, #line 124 "CSSPropertyNames.gperf" {"text-overline-color", CSSPropertyTextOverlineColor}, #line 61 "CSSPropertyNames.gperf" {"empty-cells", CSSPropertyEmptyCells}, -#line 233 "CSSPropertyNames.gperf" +#line 234 "CSSPropertyNames.gperf" {"-webkit-text-stroke-width", CSSPropertyWebkitTextStrokeWidth}, #line 130 "CSSPropertyNames.gperf" {"text-transform", CSSPropertyTextTransform}, @@ -697,25 +701,25 @@ findProp (register const char *str, register unsigned int len) {"font-stretch", CSSPropertyFontStretch}, #line 92 "CSSPropertyNames.gperf" {"outline-style", CSSPropertyOutlineStyle}, -#line 286 "CSSPropertyNames.gperf" +#line 287 "CSSPropertyNames.gperf" {"text-anchor", CSSPropertyTextAnchor}, -#line 185 "CSSPropertyNames.gperf" +#line 186 "CSSPropertyNames.gperf" {"-webkit-column-rule-color", CSSPropertyWebkitColumnRuleColor}, -#line 273 "CSSPropertyNames.gperf" +#line 274 "CSSPropertyNames.gperf" {"stroke-dasharray", CSSPropertyStrokeDasharray}, #line 35 "CSSPropertyNames.gperf" {"border-left-width", CSSPropertyBorderLeftWidth}, -#line 265 "CSSPropertyNames.gperf" +#line 266 "CSSPropertyNames.gperf" {"fill-rule", CSSPropertyFillRule}, -#line 236 "CSSPropertyNames.gperf" +#line 237 "CSSPropertyNames.gperf" {"-webkit-transform-origin-x", CSSPropertyWebkitTransformOriginX}, -#line 281 "CSSPropertyNames.gperf" +#line 282 "CSSPropertyNames.gperf" {"baseline-shift", CSSPropertyBaselineShift}, #line 132 "CSSPropertyNames.gperf" {"text-underline-color", CSSPropertyTextUnderlineColor}, -#line 237 "CSSPropertyNames.gperf" +#line 238 "CSSPropertyNames.gperf" {"-webkit-transform-origin-y", CSSPropertyWebkitTransformOriginY}, -#line 260 "CSSPropertyNames.gperf" +#line 261 "CSSPropertyNames.gperf" {"color-interpolation-filters", CSSPropertyColorInterpolationFilters}, #line 39 "CSSPropertyNames.gperf" {"border-right-style", CSSPropertyBorderRightStyle}, @@ -727,63 +731,63 @@ findProp (register const char *str, register unsigned int len) {"overflow-x", CSSPropertyOverflowX}, #line 122 "CSSPropertyNames.gperf" {"text-overflow", CSSPropertyTextOverflow}, -#line 176 "CSSPropertyNames.gperf" +#line 177 "CSSPropertyNames.gperf" {"-webkit-box-reflect", CSSPropertyWebkitBoxReflect}, -#line 246 "CSSPropertyNames.gperf" +#line 247 "CSSPropertyNames.gperf" {"-webkit-user-modify", CSSPropertyWebkitUserModify}, -#line 187 "CSSPropertyNames.gperf" +#line 188 "CSSPropertyNames.gperf" {"-webkit-column-rule-width", CSSPropertyWebkitColumnRuleWidth}, #line 96 "CSSPropertyNames.gperf" {"overflow-y", CSSPropertyOverflowY}, -#line 239 "CSSPropertyNames.gperf" +#line 240 "CSSPropertyNames.gperf" {"-webkit-transform-style", CSSPropertyWebkitTransformStyle}, #line 91 "CSSPropertyNames.gperf" {"outline-offset", CSSPropertyOutlineOffset}, #line 135 "CSSPropertyNames.gperf" {"text-underline-width", CSSPropertyTextUnderlineWidth}, -#line 255 "CSSPropertyNames.gperf" +#line 256 "CSSPropertyNames.gperf" {"flood-opacity", CSSPropertyFloodOpacity}, #line 34 "CSSPropertyNames.gperf" {"border-left-style", CSSPropertyBorderLeftStyle}, #line 83 "CSSPropertyNames.gperf" {"max-height", CSSPropertyMaxHeight}, -#line 229 "CSSPropertyNames.gperf" +#line 230 "CSSPropertyNames.gperf" {"-webkit-text-security", CSSPropertyWebkitTextSecurity}, -#line 192 "CSSPropertyNames.gperf" +#line 193 "CSSPropertyNames.gperf" {"-webkit-highlight", CSSPropertyWebkitHighlight}, -#line 264 "CSSPropertyNames.gperf" +#line 265 "CSSPropertyNames.gperf" {"fill-opacity", CSSPropertyFillOpacity}, -#line 274 "CSSPropertyNames.gperf" +#line 275 "CSSPropertyNames.gperf" {"stroke-dashoffset", CSSPropertyStrokeDashoffset}, #line 126 "CSSPropertyNames.gperf" {"text-overline-style", CSSPropertyTextOverlineStyle}, #line 77 "CSSPropertyNames.gperf" {"list-style-type", CSSPropertyListStyleType}, -#line 219 "CSSPropertyNames.gperf" +#line 220 "CSSPropertyNames.gperf" {"-webkit-match-nearest-mail-blockquote-color", CSSPropertyWebkitMatchNearestMailBlockquoteColor}, -#line 186 "CSSPropertyNames.gperf" +#line 187 "CSSPropertyNames.gperf" {"-webkit-column-rule-style", CSSPropertyWebkitColumnRuleStyle}, #line 158 "CSSPropertyNames.gperf" {"-webkit-backface-visibility", CSSPropertyWebkitBackfaceVisibility}, -#line 228 "CSSPropertyNames.gperf" +#line 229 "CSSPropertyNames.gperf" {"-webkit-text-fill-color", CSSPropertyWebkitTextFillColor}, #line 134 "CSSPropertyNames.gperf" {"text-underline-style", CSSPropertyTextUnderlineStyle}, -#line 284 "CSSPropertyNames.gperf" +#line 285 "CSSPropertyNames.gperf" {"glyph-orientation-vertical", CSSPropertyGlyphOrientationVertical}, #line 64 "CSSPropertyNames.gperf" {"font-family", CSSPropertyFontFamily}, -#line 170 "CSSPropertyNames.gperf" +#line 171 "CSSPropertyNames.gperf" {"-webkit-box-flex", CSSPropertyWebkitBoxFlex}, #line 117 "CSSPropertyNames.gperf" {"text-line-through", CSSPropertyTextLineThrough}, #line 119 "CSSPropertyNames.gperf" {"text-line-through-mode", CSSPropertyTextLineThroughMode}, -#line 227 "CSSPropertyNames.gperf" +#line 228 "CSSPropertyNames.gperf" {"-webkit-text-decorations-in-effect", CSSPropertyWebkitTextDecorationsInEffect}, -#line 283 "CSSPropertyNames.gperf" +#line 284 "CSSPropertyNames.gperf" {"glyph-orientation-horizontal", CSSPropertyGlyphOrientationHorizontal}, -#line 171 "CSSPropertyNames.gperf" +#line 172 "CSSPropertyNames.gperf" {"-webkit-box-flex-group", CSSPropertyWebkitBoxFlexGroup}, #line 118 "CSSPropertyNames.gperf" {"text-line-through-color", CSSPropertyTextLineThroughColor}, @@ -825,113 +829,113 @@ findProp (register const char *str, register unsigned int len) -1, -1, -1, -1, -1, 80, -1, -1, -1, -1, -1, -1, -1, 81, -1, 82, 83, -1, -1, 84, 85, -1, -1, -1, 86, -1, 87, 88, -1, -1, - -1, -1, -1, 89, -1, 90, -1, -1, -1, -1, - 91, -1, -1, -1, -1, -1, -1, 92, -1, -1, - -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, - 94, -1, 95, -1, -1, 96, -1, -1, -1, 97, - -1, -1, -1, -1, 98, -1, 99, 100, -1, -1, - -1, -1, 101, -1, 102, -1, -1, 103, -1, 104, - -1, -1, -1, -1, -1, -1, -1, 105, -1, -1, - -1, -1, 106, -1, -1, -1, -1, -1, -1, -1, - 107, -1, -1, 108, 109, -1, -1, -1, 110, -1, - -1, -1, -1, -1, 111, 112, 113, 114, -1, 115, - -1, -1, -1, -1, -1, -1, -1, 116, 117, 118, - -1, 119, -1, -1, 120, -1, -1, 121, 122, -1, - -1, -1, 123, 124, -1, -1, -1, -1, 125, -1, - -1, -1, -1, 126, -1, 127, 128, -1, -1, 129, - 130, -1, 131, -1, 132, -1, 133, -1, 134, -1, - -1, -1, 135, 136, 137, -1, 138, 139, -1, -1, - 140, 141, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 142, -1, 143, -1, -1, -1, -1, -1, -1, - 144, 145, -1, -1, -1, 146, -1, 147, -1, -1, - -1, 148, -1, -1, 149, -1, 150, -1, -1, -1, - -1, 151, -1, -1, -1, 152, 153, -1, 154, -1, + -1, -1, -1, 89, -1, 90, -1, -1, 91, -1, + 92, -1, -1, -1, -1, -1, -1, 93, -1, -1, + -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, + 95, -1, 96, -1, -1, 97, -1, -1, -1, 98, + -1, -1, -1, -1, 99, -1, 100, 101, -1, -1, + -1, -1, 102, -1, 103, -1, -1, 104, -1, 105, + -1, -1, -1, -1, -1, -1, -1, 106, -1, -1, + -1, -1, 107, -1, -1, -1, -1, -1, -1, -1, + 108, -1, -1, 109, 110, -1, -1, -1, 111, 112, + -1, -1, -1, -1, 113, 114, 115, 116, -1, 117, + -1, -1, -1, -1, -1, -1, -1, 118, 119, 120, + -1, 121, -1, -1, 122, -1, -1, 123, 124, -1, + -1, -1, 125, 126, -1, -1, -1, -1, 127, -1, + -1, -1, -1, 128, -1, 129, 130, -1, -1, 131, + 132, -1, 133, -1, 134, -1, 135, -1, 136, -1, + -1, -1, 137, 138, 139, -1, 140, 141, -1, -1, + 142, 143, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 144, -1, 145, -1, -1, -1, -1, -1, -1, + 146, 147, -1, -1, -1, 148, -1, 149, -1, -1, + -1, 150, -1, -1, 151, -1, 152, -1, -1, -1, + -1, 153, -1, -1, -1, 154, 155, -1, 156, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 155, 156, 157, -1, - -1, -1, 158, 159, -1, -1, 160, 161, 162, -1, - -1, 163, 164, -1, -1, -1, -1, 165, 166, -1, - -1, -1, -1, 167, 168, -1, -1, -1, -1, 169, - -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 171, -1, -1, -1, 172, -1, - 173, -1, -1, 174, -1, -1, -1, -1, 175, 176, - -1, -1, 177, 178, -1, -1, -1, -1, -1, -1, - -1, -1, 179, -1, -1, -1, 180, -1, -1, 181, - 182, -1, -1, -1, -1, -1, -1, -1, -1, 183, - -1, -1, 184, -1, 185, -1, -1, -1, -1, 186, - 187, -1, -1, -1, 188, -1, -1, -1, -1, -1, - -1, 189, -1, -1, -1, -1, 190, -1, 191, 192, - 193, -1, -1, 194, 195, -1, -1, -1, -1, -1, - 196, 197, 198, -1, -1, 199, -1, -1, -1, -1, - -1, -1, -1, 200, 201, -1, -1, -1, -1, -1, - -1, 202, -1, 203, -1, -1, -1, -1, -1, -1, - 204, -1, -1, -1, 205, -1, 206, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 207, -1, - -1, -1, 208, -1, 209, -1, 210, -1, -1, 211, - -1, -1, -1, 212, -1, -1, -1, 213, -1, -1, - -1, 214, -1, -1, -1, -1, 215, 216, -1, -1, - 217, 218, -1, 219, -1, -1, 220, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 221, -1, -1, 222, - -1, -1, -1, -1, -1, -1, -1, 223, 224, 225, - -1, 226, -1, -1, -1, 227, -1, -1, -1, 228, - -1, -1, 229, -1, -1, -1, -1, -1, 230, -1, - -1, 231, -1, -1, -1, -1, -1, -1, -1, -1, - 232, -1, -1, -1, -1, -1, 233, 234, -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, -1, -1, 237, - 238, 239, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 157, 158, 159, -1, + -1, -1, 160, 161, -1, -1, 162, 163, 164, -1, + -1, 165, 166, -1, -1, -1, -1, 167, 168, -1, + -1, -1, -1, 169, 170, -1, -1, -1, -1, 171, + -1, -1, -1, 172, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 173, -1, -1, -1, 174, -1, + 175, -1, -1, 176, -1, -1, -1, -1, 177, 178, + -1, -1, 179, 180, -1, -1, -1, -1, -1, -1, + -1, -1, 181, -1, -1, -1, 182, -1, -1, 183, + 184, -1, -1, -1, -1, -1, -1, -1, -1, 185, + -1, -1, 186, -1, 187, -1, -1, -1, -1, 188, + 189, -1, -1, -1, 190, -1, -1, -1, -1, -1, + -1, 191, -1, -1, -1, -1, 192, -1, 193, 194, + 195, -1, -1, 196, 197, -1, -1, -1, -1, -1, + 198, 199, 200, -1, -1, 201, -1, -1, -1, -1, + -1, -1, -1, 202, 203, -1, -1, -1, -1, -1, + -1, 204, -1, 205, -1, -1, -1, -1, -1, -1, + 206, -1, -1, -1, 207, -1, 208, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 209, -1, + -1, -1, 210, -1, 211, -1, 212, -1, -1, 213, + -1, -1, -1, 214, -1, -1, -1, 215, -1, -1, + -1, 216, -1, -1, -1, -1, 217, 218, -1, -1, + 219, 220, -1, 221, -1, -1, 222, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 223, -1, -1, 224, + -1, -1, -1, -1, -1, -1, -1, 225, 226, 227, + -1, 228, -1, -1, -1, 229, -1, -1, -1, 230, + -1, -1, 231, -1, -1, -1, -1, -1, 232, -1, + -1, 233, -1, -1, -1, -1, -1, -1, -1, -1, + 234, -1, -1, -1, -1, -1, 235, 236, -1, -1, + -1, -1, -1, -1, 237, -1, -1, -1, -1, -1, + -1, 238, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 239, + 240, 241, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 240, -1, -1, -1, -1, -1, 241, -1, - -1, -1, -1, -1, -1, 242, -1, -1, -1, -1, + -1, -1, 242, -1, -1, -1, -1, -1, 243, -1, + -1, -1, -1, -1, -1, 244, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 243, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 245, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 244, -1, -1, 245, -1, -1, -1, -1, -1, 246, - -1, -1, -1, -1, 247, 248, -1, -1, -1, -1, - 249, -1, -1, 250, -1, -1, -1, -1, -1, -1, + 246, -1, -1, 247, -1, -1, -1, -1, -1, 248, + -1, -1, -1, -1, 249, 250, -1, -1, -1, -1, + 251, -1, -1, 252, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 251, - -1, -1, -1, -1, -1, 252, -1, -1, -1, -1, - -1, -1, -1, 253, -1, -1, -1, -1, -1, -1, - -1, -1, 254, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 253, + -1, -1, -1, -1, -1, 254, -1, -1, -1, -1, + -1, -1, -1, 255, -1, -1, -1, -1, -1, -1, + -1, -1, 256, -1, -1, -1, -1, -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, 257, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 256, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 257, -1, -1, -1, -1, 258, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 259, -1, 260, + -1, -1, 259, -1, -1, -1, -1, 260, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 261, -1, 262, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 261, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 262, -1, - 263, -1, -1, -1, -1, -1, -1, 264, -1, -1, - -1, -1, -1, 265, -1, -1, -1, -1, -1, -1, + 263, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 264, -1, + 265, -1, -1, -1, -1, -1, -1, 266, -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, - 266, -1, -1, -1, -1, -1, 267, -1, -1, -1, + 268, -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, 268, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 270, -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, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -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, -1, -1, -1, -1, 271, -1, -1, + -1, -1, 272, -1, -1, -1, -1, 273, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 272, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 274, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 273, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 275, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -939,10 +943,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, 274, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 276, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 275, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 277, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -956,7 +960,7 @@ 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, 276, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 278, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -976,7 +980,7 @@ 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, 277 + -1, -1, -1, 279 }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) @@ -998,9 +1002,9 @@ findProp (register const char *str, register unsigned int len) } return 0; } -#line 288 "CSSPropertyNames.gperf" +#line 290 "CSSPropertyNames.gperf" -static const char * const propertyNameStrings[278] = { +static const char * const propertyNameStrings[280] = { "background", "background-attachment", "background-clip", @@ -1153,6 +1157,7 @@ static const char * const propertyNameStrings[278] = { "-webkit-background-clip", "-webkit-background-composite", "-webkit-background-origin", +"-webkit-background-size", "-webkit-binding", "-webkit-border-fit", "-webkit-border-horizontal-spacing", @@ -1279,6 +1284,7 @@ static const char * const propertyNameStrings[278] = { "kerning", "text-anchor", "writing-mode", +"-webkit-shadow", }; const char* getPropertyName(CSSPropertyID id) { diff --git a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h index f1332e3..8957af8 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h +++ b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h @@ -157,136 +157,138 @@ enum CSSPropertyID { CSSPropertyWebkitBackgroundClip = 1150, CSSPropertyWebkitBackgroundComposite = 1151, CSSPropertyWebkitBackgroundOrigin = 1152, - CSSPropertyWebkitBinding = 1153, - CSSPropertyWebkitBorderFit = 1154, - CSSPropertyWebkitBorderHorizontalSpacing = 1155, - CSSPropertyWebkitBorderImage = 1156, - CSSPropertyWebkitBorderRadius = 1157, - CSSPropertyWebkitBorderVerticalSpacing = 1158, - CSSPropertyWebkitBoxAlign = 1159, - CSSPropertyWebkitBoxDirection = 1160, - CSSPropertyWebkitBoxFlex = 1161, - CSSPropertyWebkitBoxFlexGroup = 1162, - CSSPropertyWebkitBoxLines = 1163, - CSSPropertyWebkitBoxOrdinalGroup = 1164, - CSSPropertyWebkitBoxOrient = 1165, - CSSPropertyWebkitBoxPack = 1166, - CSSPropertyWebkitBoxReflect = 1167, - CSSPropertyWebkitBoxShadow = 1168, - CSSPropertyWebkitBoxSizing = 1169, - CSSPropertyWebkitColumnBreakAfter = 1170, - CSSPropertyWebkitColumnBreakBefore = 1171, - CSSPropertyWebkitColumnBreakInside = 1172, - CSSPropertyWebkitColumnCount = 1173, - CSSPropertyWebkitColumnGap = 1174, - CSSPropertyWebkitColumnRule = 1175, - CSSPropertyWebkitColumnRuleColor = 1176, - CSSPropertyWebkitColumnRuleStyle = 1177, - CSSPropertyWebkitColumnRuleWidth = 1178, - CSSPropertyWebkitColumnWidth = 1179, - CSSPropertyWebkitColumns = 1180, - CSSPropertyWebkitFontSizeDelta = 1181, - CSSPropertyWebkitFontSmoothing = 1182, - CSSPropertyWebkitHighlight = 1183, - CSSPropertyWebkitLineBreak = 1184, - CSSPropertyWebkitLineClamp = 1185, - CSSPropertyWebkitMarginBottomCollapse = 1186, - CSSPropertyWebkitMarginCollapse = 1187, - CSSPropertyWebkitMarginStart = 1188, - CSSPropertyWebkitMarginTopCollapse = 1189, - CSSPropertyWebkitMarquee = 1190, - CSSPropertyWebkitMarqueeDirection = 1191, - CSSPropertyWebkitMarqueeIncrement = 1192, - CSSPropertyWebkitMarqueeRepetition = 1193, - CSSPropertyWebkitMarqueeSpeed = 1194, - CSSPropertyWebkitMarqueeStyle = 1195, - CSSPropertyWebkitMask = 1196, - CSSPropertyWebkitMaskAttachment = 1197, - CSSPropertyWebkitMaskBoxImage = 1198, - CSSPropertyWebkitMaskClip = 1199, - CSSPropertyWebkitMaskComposite = 1200, - CSSPropertyWebkitMaskImage = 1201, - CSSPropertyWebkitMaskOrigin = 1202, - CSSPropertyWebkitMaskPosition = 1203, - CSSPropertyWebkitMaskPositionX = 1204, - CSSPropertyWebkitMaskPositionY = 1205, - CSSPropertyWebkitMaskRepeat = 1206, - CSSPropertyWebkitMaskRepeatX = 1207, - CSSPropertyWebkitMaskRepeatY = 1208, - CSSPropertyWebkitMaskSize = 1209, - CSSPropertyWebkitMatchNearestMailBlockquoteColor = 1210, - CSSPropertyWebkitNbspMode = 1211, - CSSPropertyWebkitPaddingStart = 1212, - CSSPropertyWebkitPerspective = 1213, - CSSPropertyWebkitPerspectiveOrigin = 1214, - CSSPropertyWebkitPerspectiveOriginX = 1215, - CSSPropertyWebkitPerspectiveOriginY = 1216, - CSSPropertyWebkitRtlOrdering = 1217, - CSSPropertyWebkitTextDecorationsInEffect = 1218, - CSSPropertyWebkitTextFillColor = 1219, - CSSPropertyWebkitTextSecurity = 1220, - CSSPropertyWebkitTextSizeAdjust = 1221, - CSSPropertyWebkitTextStroke = 1222, - CSSPropertyWebkitTextStrokeColor = 1223, - CSSPropertyWebkitTextStrokeWidth = 1224, - CSSPropertyWebkitTransform = 1225, - CSSPropertyWebkitTransformOrigin = 1226, - CSSPropertyWebkitTransformOriginX = 1227, - CSSPropertyWebkitTransformOriginY = 1228, - CSSPropertyWebkitTransformOriginZ = 1229, - CSSPropertyWebkitTransformStyle = 1230, - CSSPropertyWebkitTransition = 1231, - CSSPropertyWebkitTransitionDelay = 1232, - CSSPropertyWebkitTransitionDuration = 1233, - CSSPropertyWebkitTransitionProperty = 1234, - CSSPropertyWebkitTransitionTimingFunction = 1235, - CSSPropertyWebkitUserDrag = 1236, - CSSPropertyWebkitUserModify = 1237, - CSSPropertyWebkitUserSelect = 1238, - CSSPropertyWebkitVariableDeclarationBlock = 1239, - CSSPropertyClipPath = 1240, - CSSPropertyClipRule = 1241, - CSSPropertyMask = 1242, - CSSPropertyEnableBackground = 1243, - CSSPropertyFilter = 1244, - CSSPropertyFloodColor = 1245, - CSSPropertyFloodOpacity = 1246, - CSSPropertyLightingColor = 1247, - CSSPropertyStopColor = 1248, - CSSPropertyStopOpacity = 1249, - CSSPropertyColorInterpolation = 1250, - CSSPropertyColorInterpolationFilters = 1251, - CSSPropertyColorProfile = 1252, - CSSPropertyColorRendering = 1253, - CSSPropertyFill = 1254, - CSSPropertyFillOpacity = 1255, - CSSPropertyFillRule = 1256, - CSSPropertyImageRendering = 1257, - CSSPropertyMarker = 1258, - CSSPropertyMarkerEnd = 1259, - CSSPropertyMarkerMid = 1260, - CSSPropertyMarkerStart = 1261, - CSSPropertyShapeRendering = 1262, - CSSPropertyStroke = 1263, - CSSPropertyStrokeDasharray = 1264, - CSSPropertyStrokeDashoffset = 1265, - CSSPropertyStrokeLinecap = 1266, - CSSPropertyStrokeLinejoin = 1267, - CSSPropertyStrokeMiterlimit = 1268, - CSSPropertyStrokeOpacity = 1269, - CSSPropertyStrokeWidth = 1270, - CSSPropertyAlignmentBaseline = 1271, - CSSPropertyBaselineShift = 1272, - CSSPropertyDominantBaseline = 1273, - CSSPropertyGlyphOrientationHorizontal = 1274, - CSSPropertyGlyphOrientationVertical = 1275, - CSSPropertyKerning = 1276, - CSSPropertyTextAnchor = 1277, - CSSPropertyWritingMode = 1278, + CSSPropertyWebkitBackgroundSize = 1153, + CSSPropertyWebkitBinding = 1154, + CSSPropertyWebkitBorderFit = 1155, + CSSPropertyWebkitBorderHorizontalSpacing = 1156, + CSSPropertyWebkitBorderImage = 1157, + CSSPropertyWebkitBorderRadius = 1158, + CSSPropertyWebkitBorderVerticalSpacing = 1159, + CSSPropertyWebkitBoxAlign = 1160, + CSSPropertyWebkitBoxDirection = 1161, + CSSPropertyWebkitBoxFlex = 1162, + CSSPropertyWebkitBoxFlexGroup = 1163, + CSSPropertyWebkitBoxLines = 1164, + CSSPropertyWebkitBoxOrdinalGroup = 1165, + CSSPropertyWebkitBoxOrient = 1166, + CSSPropertyWebkitBoxPack = 1167, + CSSPropertyWebkitBoxReflect = 1168, + CSSPropertyWebkitBoxShadow = 1169, + CSSPropertyWebkitBoxSizing = 1170, + CSSPropertyWebkitColumnBreakAfter = 1171, + CSSPropertyWebkitColumnBreakBefore = 1172, + CSSPropertyWebkitColumnBreakInside = 1173, + CSSPropertyWebkitColumnCount = 1174, + CSSPropertyWebkitColumnGap = 1175, + CSSPropertyWebkitColumnRule = 1176, + CSSPropertyWebkitColumnRuleColor = 1177, + CSSPropertyWebkitColumnRuleStyle = 1178, + CSSPropertyWebkitColumnRuleWidth = 1179, + CSSPropertyWebkitColumnWidth = 1180, + CSSPropertyWebkitColumns = 1181, + CSSPropertyWebkitFontSizeDelta = 1182, + CSSPropertyWebkitFontSmoothing = 1183, + CSSPropertyWebkitHighlight = 1184, + CSSPropertyWebkitLineBreak = 1185, + CSSPropertyWebkitLineClamp = 1186, + CSSPropertyWebkitMarginBottomCollapse = 1187, + CSSPropertyWebkitMarginCollapse = 1188, + CSSPropertyWebkitMarginStart = 1189, + CSSPropertyWebkitMarginTopCollapse = 1190, + CSSPropertyWebkitMarquee = 1191, + CSSPropertyWebkitMarqueeDirection = 1192, + CSSPropertyWebkitMarqueeIncrement = 1193, + CSSPropertyWebkitMarqueeRepetition = 1194, + CSSPropertyWebkitMarqueeSpeed = 1195, + CSSPropertyWebkitMarqueeStyle = 1196, + CSSPropertyWebkitMask = 1197, + CSSPropertyWebkitMaskAttachment = 1198, + CSSPropertyWebkitMaskBoxImage = 1199, + CSSPropertyWebkitMaskClip = 1200, + CSSPropertyWebkitMaskComposite = 1201, + CSSPropertyWebkitMaskImage = 1202, + CSSPropertyWebkitMaskOrigin = 1203, + CSSPropertyWebkitMaskPosition = 1204, + CSSPropertyWebkitMaskPositionX = 1205, + CSSPropertyWebkitMaskPositionY = 1206, + CSSPropertyWebkitMaskRepeat = 1207, + CSSPropertyWebkitMaskRepeatX = 1208, + CSSPropertyWebkitMaskRepeatY = 1209, + CSSPropertyWebkitMaskSize = 1210, + CSSPropertyWebkitMatchNearestMailBlockquoteColor = 1211, + CSSPropertyWebkitNbspMode = 1212, + CSSPropertyWebkitPaddingStart = 1213, + CSSPropertyWebkitPerspective = 1214, + CSSPropertyWebkitPerspectiveOrigin = 1215, + CSSPropertyWebkitPerspectiveOriginX = 1216, + CSSPropertyWebkitPerspectiveOriginY = 1217, + CSSPropertyWebkitRtlOrdering = 1218, + CSSPropertyWebkitTextDecorationsInEffect = 1219, + CSSPropertyWebkitTextFillColor = 1220, + CSSPropertyWebkitTextSecurity = 1221, + CSSPropertyWebkitTextSizeAdjust = 1222, + CSSPropertyWebkitTextStroke = 1223, + CSSPropertyWebkitTextStrokeColor = 1224, + CSSPropertyWebkitTextStrokeWidth = 1225, + CSSPropertyWebkitTransform = 1226, + CSSPropertyWebkitTransformOrigin = 1227, + CSSPropertyWebkitTransformOriginX = 1228, + CSSPropertyWebkitTransformOriginY = 1229, + CSSPropertyWebkitTransformOriginZ = 1230, + CSSPropertyWebkitTransformStyle = 1231, + CSSPropertyWebkitTransition = 1232, + CSSPropertyWebkitTransitionDelay = 1233, + CSSPropertyWebkitTransitionDuration = 1234, + CSSPropertyWebkitTransitionProperty = 1235, + CSSPropertyWebkitTransitionTimingFunction = 1236, + CSSPropertyWebkitUserDrag = 1237, + CSSPropertyWebkitUserModify = 1238, + CSSPropertyWebkitUserSelect = 1239, + CSSPropertyWebkitVariableDeclarationBlock = 1240, + CSSPropertyClipPath = 1241, + CSSPropertyClipRule = 1242, + CSSPropertyMask = 1243, + CSSPropertyEnableBackground = 1244, + CSSPropertyFilter = 1245, + CSSPropertyFloodColor = 1246, + CSSPropertyFloodOpacity = 1247, + CSSPropertyLightingColor = 1248, + CSSPropertyStopColor = 1249, + CSSPropertyStopOpacity = 1250, + CSSPropertyColorInterpolation = 1251, + CSSPropertyColorInterpolationFilters = 1252, + CSSPropertyColorProfile = 1253, + CSSPropertyColorRendering = 1254, + CSSPropertyFill = 1255, + CSSPropertyFillOpacity = 1256, + CSSPropertyFillRule = 1257, + CSSPropertyImageRendering = 1258, + CSSPropertyMarker = 1259, + CSSPropertyMarkerEnd = 1260, + CSSPropertyMarkerMid = 1261, + CSSPropertyMarkerStart = 1262, + CSSPropertyShapeRendering = 1263, + CSSPropertyStroke = 1264, + CSSPropertyStrokeDasharray = 1265, + CSSPropertyStrokeDashoffset = 1266, + CSSPropertyStrokeLinecap = 1267, + CSSPropertyStrokeLinejoin = 1268, + CSSPropertyStrokeMiterlimit = 1269, + CSSPropertyStrokeOpacity = 1270, + CSSPropertyStrokeWidth = 1271, + CSSPropertyAlignmentBaseline = 1272, + CSSPropertyBaselineShift = 1273, + CSSPropertyDominantBaseline = 1274, + CSSPropertyGlyphOrientationHorizontal = 1275, + CSSPropertyGlyphOrientationVertical = 1276, + CSSPropertyKerning = 1277, + CSSPropertyTextAnchor = 1278, + CSSPropertyWritingMode = 1279, + CSSPropertyWebkitShadow = 1280, }; const int firstCSSProperty = 1001; -const int numCSSProperties = 278; +const int numCSSProperties = 280; const size_t maxCSSPropertyNameLength = 43; const char* getPropertyName(CSSPropertyID); diff --git a/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.cpp b/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.cpp index d472340..bee17ac 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSAbstractWorker.cpp @@ -149,7 +149,7 @@ JSAbstractWorker::JSAbstractWorker(NonNullPassRefPtr structure, JSDOM JSAbstractWorker::~JSAbstractWorker() { impl()->invalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } void JSAbstractWorker::markChildren(MarkStack& markStack) @@ -199,7 +199,7 @@ void setJSAbstractWorkerOnerror(ExecState* exec, JSObject* thisObject, JSValue v { UNUSED_PARAM(exec); AbstractWorker* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnerror(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp b/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp index 2f02580..348c086 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp @@ -76,7 +76,7 @@ JSBarInfo::JSBarInfo(NonNullPassRefPtr structure, JSDOMGlobalObject* JSBarInfo::~JSBarInfo() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSBarInfo::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp index 307b17a..8d99056 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp @@ -162,7 +162,7 @@ JSCSSRule::JSCSSRule(NonNullPassRefPtr structure, JSDOMGlobalObject* JSCSSRule::~JSCSSRule() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCSSRule::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp index e02a6ce..0bb58c2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp @@ -140,7 +140,7 @@ JSCSSRuleList::JSCSSRuleList(NonNullPassRefPtr structure, JSDOMGlobal JSCSSRuleList::~JSCSSRuleList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCSSRuleList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp index 6292b64..5fbf986 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp @@ -154,7 +154,7 @@ JSCSSStyleDeclaration::JSCSSStyleDeclaration(NonNullPassRefPtr struct JSCSSStyleDeclaration::~JSCSSStyleDeclaration() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCSSStyleDeclaration::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp index 22f6c30..1cb1b75 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp @@ -145,7 +145,7 @@ JSCSSValue::JSCSSValue(NonNullPassRefPtr structure, JSDOMGlobalObject JSCSSValue::~JSCSSValue() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCSSValue::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp index ef1d726..975d56d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp @@ -147,7 +147,7 @@ JSCSSVariablesDeclaration::JSCSSVariablesDeclaration(NonNullPassRefPtrglobalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCSSVariablesDeclaration::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasArray.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasArray.cpp index aeeeb4f..05be08c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasArray.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasArray.cpp @@ -93,7 +93,7 @@ JSCanvasArray::JSCanvasArray(NonNullPassRefPtr structure, JSDOMGlobal JSCanvasArray::~JSCanvasArray() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCanvasArray::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasArrayBuffer.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasArrayBuffer.cpp index cf1c0fe..7099ce9 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasArrayBuffer.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasArrayBuffer.cpp @@ -80,7 +80,7 @@ JSCanvasArrayBuffer::JSCanvasArrayBuffer(NonNullPassRefPtr structure, JSCanvasArrayBuffer::~JSCanvasArrayBuffer() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCanvasArrayBuffer::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp index 22de482..4d2bfa3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp @@ -74,7 +74,7 @@ JSCanvasGradient::JSCanvasGradient(NonNullPassRefPtr structure, JSDOM JSCanvasGradient::~JSCanvasGradient() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCanvasGradient::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp index 7356770..cfb521b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp @@ -61,7 +61,7 @@ JSCanvasPattern::JSCanvasPattern(NonNullPassRefPtr structure, JSDOMGl JSCanvasPattern::~JSCanvasPattern() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCanvasPattern::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext.cpp index 1d06dfe..07710a1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext.cpp @@ -126,7 +126,7 @@ JSCanvasRenderingContext::JSCanvasRenderingContext(NonNullPassRefPtr JSCanvasRenderingContext::~JSCanvasRenderingContext() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCanvasRenderingContext::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp index 175d660..48dccd3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSClientRect.cpp @@ -130,7 +130,7 @@ JSClientRect::JSClientRect(NonNullPassRefPtr structure, JSDOMGlobalOb JSClientRect::~JSClientRect() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSClientRect::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp b/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp index 143ee8c..ff9d963 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSClientRectList.cpp @@ -141,7 +141,7 @@ JSClientRectList::JSClientRectList(NonNullPassRefPtr structure, JSDOM JSClientRectList::~JSClientRectList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSClientRectList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp b/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp index f72e341..8f4a7d4 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp @@ -145,7 +145,7 @@ JSClipboard::JSClipboard(NonNullPassRefPtr structure, JSDOMGlobalObje JSClipboard::~JSClipboard() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSClipboard::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp b/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp index 4bb40c6..0657890 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSConsole.cpp @@ -104,7 +104,7 @@ JSConsole::JSConsole(NonNullPassRefPtr structure, JSDOMGlobalObject* JSConsole::~JSConsole() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSConsole::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp b/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp index 6919ad2..348bcc6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCoordinates.cpp @@ -83,7 +83,7 @@ JSCoordinates::JSCoordinates(NonNullPassRefPtr structure, JSDOMGlobal JSCoordinates::~JSCoordinates() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCoordinates::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp b/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp index d17a368..7c22959 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCounter.cpp @@ -128,7 +128,7 @@ JSCounter::JSCounter(NonNullPassRefPtr structure, JSDOMGlobalObject* JSCounter::~JSCounter() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSCounter::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp index 2b65699..17a527e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp @@ -118,7 +118,7 @@ JSDOMApplicationCache::JSDOMApplicationCache(NonNullPassRefPtr struct JSDOMApplicationCache::~JSDOMApplicationCache() { impl()->invalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } void JSDOMApplicationCache::markChildren(MarkStack& markStack) @@ -255,7 +255,7 @@ void setJSDOMApplicationCacheOnchecking(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); DOMApplicationCache* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnchecking(globalObject->createJSAttributeEventListener(value)); @@ -265,7 +265,7 @@ void setJSDOMApplicationCacheOnerror(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); DOMApplicationCache* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnerror(globalObject->createJSAttributeEventListener(value)); @@ -275,7 +275,7 @@ void setJSDOMApplicationCacheOnnoupdate(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); DOMApplicationCache* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnnoupdate(globalObject->createJSAttributeEventListener(value)); @@ -285,7 +285,7 @@ void setJSDOMApplicationCacheOndownloading(ExecState* exec, JSObject* thisObject { UNUSED_PARAM(exec); DOMApplicationCache* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndownloading(globalObject->createJSAttributeEventListener(value)); @@ -295,7 +295,7 @@ void setJSDOMApplicationCacheOnprogress(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); DOMApplicationCache* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnprogress(globalObject->createJSAttributeEventListener(value)); @@ -305,7 +305,7 @@ void setJSDOMApplicationCacheOnupdateready(ExecState* exec, JSObject* thisObject { UNUSED_PARAM(exec); DOMApplicationCache* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnupdateready(globalObject->createJSAttributeEventListener(value)); @@ -315,7 +315,7 @@ void setJSDOMApplicationCacheOncached(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); DOMApplicationCache* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncached(globalObject->createJSAttributeEventListener(value)); @@ -325,7 +325,7 @@ void setJSDOMApplicationCacheOnobsolete(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); DOMApplicationCache* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnobsolete(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp index d625e2b..ff88905 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp @@ -185,7 +185,7 @@ JSDOMCoreException::JSDOMCoreException(NonNullPassRefPtr structure, J JSDOMCoreException::~JSDOMCoreException() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSDOMCoreException::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp index 62eef6c..268647b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp @@ -148,7 +148,7 @@ JSDOMImplementation::JSDOMImplementation(NonNullPassRefPtr structure, JSDOMImplementation::~JSDOMImplementation() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSDOMImplementation::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp index 4af88cb..ecd336a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp @@ -147,7 +147,7 @@ JSDOMParser::JSDOMParser(NonNullPassRefPtr structure, JSDOMGlobalObje JSDOMParser::~JSDOMParser() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSDOMParser::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp index 45ec248..e3a69b0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp @@ -119,7 +119,7 @@ JSDOMSelection::JSDOMSelection(NonNullPassRefPtr structure, JSDOMGlob JSDOMSelection::~JSDOMSelection() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSDOMSelection::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp index dc53217..12edc42 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp @@ -92,6 +92,7 @@ #include "JSEventSource.h" #include "JSFile.h" #include "JSFileList.h" +#include "JSHTMLAllCollection.h" #include "JSHTMLAnchorElement.h" #include "JSHTMLAppletElement.h" #include "JSHTMLAreaElement.h" @@ -246,7 +247,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSDOMWindow); /* Hash table */ -static const HashTableValue JSDOMWindowTableValues[296] = +static const HashTableValue JSDOMWindowTableValues[297] = { { "screen", DontDelete|ReadOnly, (intptr_t)jsDOMWindowScreen, (intptr_t)0 }, { "history", DontDelete|ReadOnly, (intptr_t)jsDOMWindowHistory, (intptr_t)0 }, @@ -468,6 +469,7 @@ static const HashTableValue JSDOMWindowTableValues[296] = { "HTMLTitleElement", DontDelete, (intptr_t)jsDOMWindowHTMLTitleElementConstructor, (intptr_t)setJSDOMWindowHTMLTitleElementConstructor }, { "HTMLUListElement", DontDelete, (intptr_t)jsDOMWindowHTMLUListElementConstructor, (intptr_t)setJSDOMWindowHTMLUListElementConstructor }, { "HTMLCollection", DontDelete, (intptr_t)jsDOMWindowHTMLCollectionConstructor, (intptr_t)setJSDOMWindowHTMLCollectionConstructor }, + { "HTMLAllCollection", DontDelete, (intptr_t)jsDOMWindowHTMLAllCollectionConstructor, (intptr_t)setJSDOMWindowHTMLAllCollectionConstructor }, { "Image", DontDelete, (intptr_t)jsDOMWindowImageConstructor, (intptr_t)setJSDOMWindowImageConstructor }, { "Option", DontDelete, (intptr_t)jsDOMWindowOptionConstructor, (intptr_t)setJSDOMWindowOptionConstructor }, { "CanvasRenderingContext2D", DontDelete, (intptr_t)jsDOMWindowCanvasRenderingContext2DConstructor, (intptr_t)setJSDOMWindowCanvasRenderingContext2DConstructor }, @@ -666,7 +668,6 @@ JSDOMWindow::JSDOMWindow(NonNullPassRefPtr structure, PassRefPtrinvalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); } JSValue jsDOMWindowScreen(ExecState* exec, const Identifier&, const PropertySlot& slot) @@ -2846,6 +2847,14 @@ JSValue jsDOMWindowHTMLCollectionConstructor(ExecState* exec, const Identifier&, return JSHTMLCollection::getConstructor(exec, castedThis); } +JSValue jsDOMWindowHTMLAllCollectionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSDOMWindow* castedThis = static_cast(asObject(slot.slotBase())); + if (!castedThis->allowsAccessFrom(exec)) + return jsUndefined(); + return JSHTMLAllCollection::getConstructor(exec, castedThis); +} + JSValue jsDOMWindowImageConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSDOMWindow* castedThis = static_cast(asObject(slot.slotBase())); @@ -5261,6 +5270,14 @@ void setJSDOMWindowHTMLCollectionConstructor(ExecState* exec, JSObject* thisObje static_cast(thisObject)->putDirect(Identifier(exec, "HTMLCollection"), value); } +void setJSDOMWindowHTMLAllCollectionConstructor(ExecState* exec, JSObject* thisObject, JSValue value) +{ + if (!static_cast(thisObject)->allowsAccessFrom(exec)) + return; + // Shadowing a built-in constructor + static_cast(thisObject)->putDirect(Identifier(exec, "HTMLAllCollection"), value); +} + void setJSDOMWindowImageConstructor(ExecState* exec, JSObject* thisObject, JSValue value) { if (!static_cast(thisObject)->allowsAccessFrom(exec)) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h index 232c8eb..afc8106 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h +++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h @@ -577,6 +577,8 @@ JSC::JSValue jsDOMWindowHTMLUListElementConstructor(JSC::ExecState*, const JSC:: void setJSDOMWindowHTMLUListElementConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowHTMLCollectionConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSDOMWindowHTMLCollectionConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); +JSC::JSValue jsDOMWindowHTMLAllCollectionConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +void setJSDOMWindowHTMLAllCollectionConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowImageConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSDOMWindowImageConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsDOMWindowOptionConstructor(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 586edd1..42b91d1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp @@ -157,7 +157,7 @@ JSDataGridColumn::JSDataGridColumn(NonNullPassRefPtr structure, JSDOM JSDataGridColumn::~JSDataGridColumn() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSDataGridColumn::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp index 08585fe..945c257 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumnList.cpp @@ -151,7 +151,7 @@ JSDataGridColumnList::JSDataGridColumnList(NonNullPassRefPtr structur JSDataGridColumnList::~JSDataGridColumnList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSDataGridColumnList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp b/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp index 5acd5b1..c5ac44d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp @@ -95,7 +95,7 @@ JSDatabase::JSDatabase(NonNullPassRefPtr structure, JSDOMGlobalObject JSDatabase::~JSDatabase() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSDatabase::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp b/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp index 47a2936..1fb3b46 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp @@ -304,7 +304,7 @@ JSDocument::JSDocument(NonNullPassRefPtr structure, JSDOMGlobalObject JSDocument::~JSDocument() { - forgetDOMObject(*Heap::heap(this)->globalData(), static_cast(impl())); + forgetDOMObject(this, static_cast(impl())); } JSObject* JSDocument::createPrototype(ExecState* exec, JSGlobalObject* globalObject) @@ -1099,7 +1099,7 @@ void setJSDocumentOnabort(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnabort(globalObject->createJSAttributeEventListener(value)); @@ -1109,7 +1109,7 @@ void setJSDocumentOnblur(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnblur(globalObject->createJSAttributeEventListener(value)); @@ -1119,7 +1119,7 @@ void setJSDocumentOnchange(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnchange(globalObject->createJSAttributeEventListener(value)); @@ -1129,7 +1129,7 @@ void setJSDocumentOnclick(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnclick(globalObject->createJSAttributeEventListener(value)); @@ -1139,7 +1139,7 @@ void setJSDocumentOncontextmenu(ExecState* exec, JSObject* thisObject, JSValue v { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncontextmenu(globalObject->createJSAttributeEventListener(value)); @@ -1149,7 +1149,7 @@ void setJSDocumentOndblclick(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndblclick(globalObject->createJSAttributeEventListener(value)); @@ -1159,7 +1159,7 @@ void setJSDocumentOndrag(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndrag(globalObject->createJSAttributeEventListener(value)); @@ -1169,7 +1169,7 @@ void setJSDocumentOndragend(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragend(globalObject->createJSAttributeEventListener(value)); @@ -1179,7 +1179,7 @@ void setJSDocumentOndragenter(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragenter(globalObject->createJSAttributeEventListener(value)); @@ -1189,7 +1189,7 @@ void setJSDocumentOndragleave(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragleave(globalObject->createJSAttributeEventListener(value)); @@ -1199,7 +1199,7 @@ void setJSDocumentOndragover(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragover(globalObject->createJSAttributeEventListener(value)); @@ -1209,7 +1209,7 @@ void setJSDocumentOndragstart(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragstart(globalObject->createJSAttributeEventListener(value)); @@ -1219,7 +1219,7 @@ void setJSDocumentOndrop(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndrop(globalObject->createJSAttributeEventListener(value)); @@ -1229,7 +1229,7 @@ void setJSDocumentOnerror(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnerror(globalObject->createJSAttributeEventListener(value)); @@ -1239,7 +1239,7 @@ void setJSDocumentOnfocus(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnfocus(globalObject->createJSAttributeEventListener(value)); @@ -1249,7 +1249,7 @@ void setJSDocumentOninput(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOninput(globalObject->createJSAttributeEventListener(value)); @@ -1259,7 +1259,7 @@ void setJSDocumentOninvalid(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOninvalid(globalObject->createJSAttributeEventListener(value)); @@ -1269,7 +1269,7 @@ void setJSDocumentOnkeydown(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeydown(globalObject->createJSAttributeEventListener(value)); @@ -1279,7 +1279,7 @@ void setJSDocumentOnkeypress(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeypress(globalObject->createJSAttributeEventListener(value)); @@ -1289,7 +1289,7 @@ void setJSDocumentOnkeyup(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeyup(globalObject->createJSAttributeEventListener(value)); @@ -1299,7 +1299,7 @@ void setJSDocumentOnload(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnload(globalObject->createJSAttributeEventListener(value)); @@ -1309,7 +1309,7 @@ void setJSDocumentOnmousedown(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousedown(globalObject->createJSAttributeEventListener(value)); @@ -1319,7 +1319,7 @@ void setJSDocumentOnmousemove(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousemove(globalObject->createJSAttributeEventListener(value)); @@ -1329,7 +1329,7 @@ void setJSDocumentOnmouseout(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseout(globalObject->createJSAttributeEventListener(value)); @@ -1339,7 +1339,7 @@ void setJSDocumentOnmouseover(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseover(globalObject->createJSAttributeEventListener(value)); @@ -1349,7 +1349,7 @@ void setJSDocumentOnmouseup(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseup(globalObject->createJSAttributeEventListener(value)); @@ -1359,7 +1359,7 @@ void setJSDocumentOnmousewheel(ExecState* exec, JSObject* thisObject, JSValue va { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousewheel(globalObject->createJSAttributeEventListener(value)); @@ -1369,7 +1369,7 @@ void setJSDocumentOnscroll(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnscroll(globalObject->createJSAttributeEventListener(value)); @@ -1379,7 +1379,7 @@ void setJSDocumentOnselect(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnselect(globalObject->createJSAttributeEventListener(value)); @@ -1389,7 +1389,7 @@ void setJSDocumentOnsubmit(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnsubmit(globalObject->createJSAttributeEventListener(value)); @@ -1399,7 +1399,7 @@ void setJSDocumentOnbeforecut(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforecut(globalObject->createJSAttributeEventListener(value)); @@ -1409,7 +1409,7 @@ void setJSDocumentOncut(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncut(globalObject->createJSAttributeEventListener(value)); @@ -1419,7 +1419,7 @@ void setJSDocumentOnbeforecopy(ExecState* exec, JSObject* thisObject, JSValue va { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforecopy(globalObject->createJSAttributeEventListener(value)); @@ -1429,7 +1429,7 @@ void setJSDocumentOncopy(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncopy(globalObject->createJSAttributeEventListener(value)); @@ -1439,7 +1439,7 @@ void setJSDocumentOnbeforepaste(ExecState* exec, JSObject* thisObject, JSValue v { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforepaste(globalObject->createJSAttributeEventListener(value)); @@ -1449,7 +1449,7 @@ void setJSDocumentOnpaste(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnpaste(globalObject->createJSAttributeEventListener(value)); @@ -1459,7 +1459,7 @@ void setJSDocumentOnreset(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnreset(globalObject->createJSAttributeEventListener(value)); @@ -1469,7 +1469,7 @@ void setJSDocumentOnsearch(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnsearch(globalObject->createJSAttributeEventListener(value)); @@ -1479,7 +1479,7 @@ void setJSDocumentOnselectstart(ExecState* exec, JSObject* thisObject, JSValue v { UNUSED_PARAM(exec); Document* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnselectstart(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSElement.cpp index 869c23f..3d3187f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSElement.cpp @@ -897,7 +897,7 @@ void setJSElementOnabort(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnabort(globalObject->createJSAttributeEventListener(value)); @@ -907,7 +907,7 @@ void setJSElementOnblur(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnblur(globalObject->createJSAttributeEventListener(value)); @@ -917,7 +917,7 @@ void setJSElementOnchange(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnchange(globalObject->createJSAttributeEventListener(value)); @@ -927,7 +927,7 @@ void setJSElementOnclick(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnclick(globalObject->createJSAttributeEventListener(value)); @@ -937,7 +937,7 @@ void setJSElementOncontextmenu(ExecState* exec, JSObject* thisObject, JSValue va { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncontextmenu(globalObject->createJSAttributeEventListener(value)); @@ -947,7 +947,7 @@ void setJSElementOndblclick(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndblclick(globalObject->createJSAttributeEventListener(value)); @@ -957,7 +957,7 @@ void setJSElementOndrag(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndrag(globalObject->createJSAttributeEventListener(value)); @@ -967,7 +967,7 @@ void setJSElementOndragend(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragend(globalObject->createJSAttributeEventListener(value)); @@ -977,7 +977,7 @@ void setJSElementOndragenter(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragenter(globalObject->createJSAttributeEventListener(value)); @@ -987,7 +987,7 @@ void setJSElementOndragleave(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragleave(globalObject->createJSAttributeEventListener(value)); @@ -997,7 +997,7 @@ void setJSElementOndragover(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragover(globalObject->createJSAttributeEventListener(value)); @@ -1007,7 +1007,7 @@ void setJSElementOndragstart(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragstart(globalObject->createJSAttributeEventListener(value)); @@ -1017,7 +1017,7 @@ void setJSElementOndrop(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndrop(globalObject->createJSAttributeEventListener(value)); @@ -1027,7 +1027,7 @@ void setJSElementOnerror(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnerror(globalObject->createJSAttributeEventListener(value)); @@ -1037,7 +1037,7 @@ void setJSElementOnfocus(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnfocus(globalObject->createJSAttributeEventListener(value)); @@ -1047,7 +1047,7 @@ void setJSElementOninput(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOninput(globalObject->createJSAttributeEventListener(value)); @@ -1057,7 +1057,7 @@ void setJSElementOninvalid(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOninvalid(globalObject->createJSAttributeEventListener(value)); @@ -1067,7 +1067,7 @@ void setJSElementOnkeydown(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeydown(globalObject->createJSAttributeEventListener(value)); @@ -1077,7 +1077,7 @@ void setJSElementOnkeypress(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeypress(globalObject->createJSAttributeEventListener(value)); @@ -1087,7 +1087,7 @@ void setJSElementOnkeyup(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeyup(globalObject->createJSAttributeEventListener(value)); @@ -1097,7 +1097,7 @@ void setJSElementOnload(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnload(globalObject->createJSAttributeEventListener(value)); @@ -1107,7 +1107,7 @@ void setJSElementOnmousedown(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousedown(globalObject->createJSAttributeEventListener(value)); @@ -1117,7 +1117,7 @@ void setJSElementOnmousemove(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousemove(globalObject->createJSAttributeEventListener(value)); @@ -1127,7 +1127,7 @@ void setJSElementOnmouseout(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseout(globalObject->createJSAttributeEventListener(value)); @@ -1137,7 +1137,7 @@ void setJSElementOnmouseover(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseover(globalObject->createJSAttributeEventListener(value)); @@ -1147,7 +1147,7 @@ void setJSElementOnmouseup(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseup(globalObject->createJSAttributeEventListener(value)); @@ -1157,7 +1157,7 @@ void setJSElementOnmousewheel(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousewheel(globalObject->createJSAttributeEventListener(value)); @@ -1167,7 +1167,7 @@ void setJSElementOnscroll(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnscroll(globalObject->createJSAttributeEventListener(value)); @@ -1177,7 +1177,7 @@ void setJSElementOnselect(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnselect(globalObject->createJSAttributeEventListener(value)); @@ -1187,7 +1187,7 @@ void setJSElementOnsubmit(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnsubmit(globalObject->createJSAttributeEventListener(value)); @@ -1197,7 +1197,7 @@ void setJSElementOnbeforecut(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforecut(globalObject->createJSAttributeEventListener(value)); @@ -1207,7 +1207,7 @@ void setJSElementOncut(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncut(globalObject->createJSAttributeEventListener(value)); @@ -1217,7 +1217,7 @@ void setJSElementOnbeforecopy(ExecState* exec, JSObject* thisObject, JSValue val { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforecopy(globalObject->createJSAttributeEventListener(value)); @@ -1227,7 +1227,7 @@ void setJSElementOncopy(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncopy(globalObject->createJSAttributeEventListener(value)); @@ -1237,7 +1237,7 @@ void setJSElementOnbeforepaste(ExecState* exec, JSObject* thisObject, JSValue va { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforepaste(globalObject->createJSAttributeEventListener(value)); @@ -1247,7 +1247,7 @@ void setJSElementOnpaste(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnpaste(globalObject->createJSAttributeEventListener(value)); @@ -1257,7 +1257,7 @@ void setJSElementOnreset(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnreset(globalObject->createJSAttributeEventListener(value)); @@ -1267,7 +1267,7 @@ void setJSElementOnsearch(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnsearch(globalObject->createJSAttributeEventListener(value)); @@ -1277,7 +1277,7 @@ void setJSElementOnselectstart(ExecState* exec, JSObject* thisObject, JSValue va { UNUSED_PARAM(exec); Element* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnselectstart(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp b/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp index acd952f..67eefd0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSEvent.cpp @@ -199,7 +199,7 @@ JSEvent::JSEvent(NonNullPassRefPtr structure, JSDOMGlobalObject* glob JSEvent::~JSEvent() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSEvent::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp b/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp index 2246c8f..bd25734 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSEventException.cpp @@ -151,7 +151,7 @@ JSEventException::JSEventException(NonNullPassRefPtr structure, JSDOM JSEventException::~JSEventException() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSEventException::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSEventSource.cpp b/src/3rdparty/webkit/WebCore/generated/JSEventSource.cpp index dcec14e..526d8af 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSEventSource.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSEventSource.cpp @@ -120,7 +120,7 @@ JSEventSource::JSEventSource(NonNullPassRefPtr structure, JSDOMGlobal JSEventSource::~JSEventSource() { impl()->invalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } void JSEventSource::markChildren(MarkStack& markStack) @@ -205,7 +205,7 @@ void setJSEventSourceOnopen(ExecState* exec, JSObject* thisObject, JSValue value { UNUSED_PARAM(exec); EventSource* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnopen(globalObject->createJSAttributeEventListener(value)); @@ -215,7 +215,7 @@ void setJSEventSourceOnmessage(ExecState* exec, JSObject* thisObject, JSValue va { UNUSED_PARAM(exec); EventSource* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); @@ -225,7 +225,7 @@ void setJSEventSourceOnerror(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); EventSource* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnerror(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSFile.cpp b/src/3rdparty/webkit/WebCore/generated/JSFile.cpp index 2ee62ae..59192af 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSFile.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSFile.cpp @@ -128,7 +128,7 @@ JSFile::JSFile(NonNullPassRefPtr structure, JSDOMGlobalObject* global JSFile::~JSFile() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSFile::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp b/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp index 931aae4..50e1f0a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSFileList.cpp @@ -141,7 +141,7 @@ JSFileList::JSFileList(NonNullPassRefPtr structure, JSDOMGlobalObject JSFileList::~JSFileList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSFileList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp index 17a0509..be50fac 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp @@ -92,7 +92,7 @@ JSGeolocation::JSGeolocation(NonNullPassRefPtr structure, JSDOMGlobal JSGeolocation::~JSGeolocation() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSGeolocation::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp b/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp index a77413b..ab42d2b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp @@ -80,7 +80,7 @@ JSGeoposition::JSGeoposition(NonNullPassRefPtr structure, JSDOMGlobal JSGeoposition::~JSGeoposition() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSGeoposition::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAllCollection.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLAllCollection.cpp new file mode 100644 index 0000000..4a8fc83 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAllCollection.cpp @@ -0,0 +1,292 @@ +/* + 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 "JSHTMLAllCollection.h" + +#include "AtomicString.h" +#include "HTMLAllCollection.h" +#include "JSNode.h" +#include "JSNodeList.h" +#include "NameNodeList.h" +#include "Node.h" +#include "NodeList.h" +#include +#include +#include +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSHTMLAllCollection); + +/* Hash table */ + +static const HashTableValue JSHTMLAllCollectionTableValues[3] = +{ + { "length", DontDelete|ReadOnly, (intptr_t)jsHTMLAllCollectionLength, (intptr_t)0 }, + { "constructor", DontEnum|ReadOnly, (intptr_t)jsHTMLAllCollectionConstructor, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSHTMLAllCollectionTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 15, JSHTMLAllCollectionTableValues, 0 }; +#else + { 5, 3, JSHTMLAllCollectionTableValues, 0 }; +#endif + +/* Hash table for constructor */ + +static const HashTableValue JSHTMLAllCollectionConstructorTableValues[1] = +{ + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSHTMLAllCollectionConstructorTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 0, JSHTMLAllCollectionConstructorTableValues, 0 }; +#else + { 1, 0, JSHTMLAllCollectionConstructorTableValues, 0 }; +#endif + +class JSHTMLAllCollectionConstructor : public DOMConstructorObject { +public: + JSHTMLAllCollectionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSHTMLAllCollectionConstructor::createStructure(globalObject->objectPrototype()), globalObject) + { + putDirect(exec->propertyNames().prototype, JSHTMLAllCollectionPrototype::self(exec, globalObject), None); + } + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); + virtual const ClassInfo* classInfo() const { return &s_info; } + static const ClassInfo s_info; + + static PassRefPtr createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags)); + } + +protected: + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags; +}; + +const ClassInfo JSHTMLAllCollectionConstructor::s_info = { "HTMLAllCollectionConstructor", 0, &JSHTMLAllCollectionConstructorTable, 0 }; + +bool JSHTMLAllCollectionConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSHTMLAllCollectionConstructorTable, this, propertyName, slot); +} + +bool JSHTMLAllCollectionConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSHTMLAllCollectionConstructorTable, this, propertyName, descriptor); +} + +/* Hash table for prototype */ + +static const HashTableValue JSHTMLAllCollectionPrototypeTableValues[4] = +{ + { "item", DontDelete|Function, (intptr_t)jsHTMLAllCollectionPrototypeFunctionItem, (intptr_t)1 }, + { "namedItem", DontDelete|Function, (intptr_t)jsHTMLAllCollectionPrototypeFunctionNamedItem, (intptr_t)1 }, + { "tags", DontDelete|Function, (intptr_t)jsHTMLAllCollectionPrototypeFunctionTags, (intptr_t)1 }, + { 0, 0, 0, 0 } +}; + +static JSC_CONST_HASHTABLE HashTable JSHTMLAllCollectionPrototypeTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 7, JSHTMLAllCollectionPrototypeTableValues, 0 }; +#else + { 8, 7, JSHTMLAllCollectionPrototypeTableValues, 0 }; +#endif + +const ClassInfo JSHTMLAllCollectionPrototype::s_info = { "HTMLAllCollectionPrototype", 0, &JSHTMLAllCollectionPrototypeTable, 0 }; + +JSObject* JSHTMLAllCollectionPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +bool JSHTMLAllCollectionPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot(exec, &JSHTMLAllCollectionPrototypeTable, this, propertyName, slot); +} + +bool JSHTMLAllCollectionPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticFunctionDescriptor(exec, &JSHTMLAllCollectionPrototypeTable, this, propertyName, descriptor); +} + +const ClassInfo JSHTMLAllCollection::s_info = { "HTMLAllCollection", 0, &JSHTMLAllCollectionTable, 0 }; + +JSHTMLAllCollection::JSHTMLAllCollection(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : DOMObjectWithGlobalPointer(structure, globalObject) + , m_impl(impl) +{ +} + +JSHTMLAllCollection::~JSHTMLAllCollection() +{ + forgetDOMObject(this, impl()); +} + +JSObject* JSHTMLAllCollection::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSHTMLAllCollectionPrototype(JSHTMLAllCollectionPrototype::createStructure(globalObject->objectPrototype())); +} + +bool JSHTMLAllCollection::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + JSValue proto = prototype(); + if (proto.isObject() && static_cast(asObject(proto))->hasProperty(exec, propertyName)) + return false; + + const HashEntry* entry = JSHTMLAllCollectionTable.entry(exec, propertyName); + if (entry) { + slot.setCustom(this, entry->propertyGetter()); + return true; + } + bool ok; + unsigned index = propertyName.toUInt32(&ok, false); + if (ok && index < static_cast(impl())->length()) { + slot.setCustomIndex(this, index, indexGetter); + return true; + } + if (canGetItemsForName(exec, static_cast(impl()), propertyName)) { + slot.setCustom(this, nameGetter); + return true; + } + return getStaticValueSlot(exec, &JSHTMLAllCollectionTable, this, propertyName, slot); +} + +bool JSHTMLAllCollection::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + JSValue proto = prototype(); + if (proto.isObject() && static_cast(asObject(proto))->hasProperty(exec, propertyName)) + return false; + + const HashEntry* entry = JSHTMLAllCollectionTable.entry(exec, propertyName); + if (entry) { + PropertySlot slot; + slot.setCustom(this, entry->propertyGetter()); + descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes()); + return true; + } + bool ok; + unsigned index = propertyName.toUInt32(&ok, false); + if (ok && index < static_cast(impl())->length()) { + PropertySlot slot; + slot.setCustomIndex(this, index, indexGetter); + descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly); + return true; + } + if (canGetItemsForName(exec, static_cast(impl()), propertyName)) { + PropertySlot slot; + slot.setCustom(this, nameGetter); + descriptor.setDescriptor(slot.getValue(exec, propertyName), ReadOnly | DontDelete | DontEnum); + return true; + } + return getStaticValueDescriptor(exec, &JSHTMLAllCollectionTable, this, propertyName, descriptor); +} + +bool JSHTMLAllCollection::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) +{ + if (propertyName < static_cast(impl())->length()) { + slot.setCustomIndex(this, propertyName, indexGetter); + return true; + } + return getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot); +} + +JSValue jsHTMLAllCollectionLength(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSHTMLAllCollection* castedThis = static_cast(asObject(slot.slotBase())); + UNUSED_PARAM(exec); + HTMLAllCollection* imp = static_cast(castedThis->impl()); + return jsNumber(exec, imp->length()); +} + +JSValue jsHTMLAllCollectionConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSHTMLAllCollection* domObject = static_cast(asObject(slot.slotBase())); + return JSHTMLAllCollection::getConstructor(exec, domObject->globalObject()); +} +void JSHTMLAllCollection::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) +{ + for (unsigned i = 0; i < static_cast(impl())->length(); ++i) + propertyNames.add(Identifier::from(exec, i)); + Base::getOwnPropertyNames(exec, propertyNames); +} + +JSValue JSHTMLAllCollection::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor(exec, static_cast(globalObject)); +} + +JSValue JSC_HOST_CALL jsHTMLAllCollectionPrototypeFunctionItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.inherits(&JSHTMLAllCollection::s_info)) + return throwError(exec, TypeError); + JSHTMLAllCollection* castedThisObj = static_cast(asObject(thisValue)); + return castedThisObj->item(exec, args); +} + +JSValue JSC_HOST_CALL jsHTMLAllCollectionPrototypeFunctionNamedItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.inherits(&JSHTMLAllCollection::s_info)) + return throwError(exec, TypeError); + JSHTMLAllCollection* castedThisObj = static_cast(asObject(thisValue)); + return castedThisObj->namedItem(exec, args); +} + +JSValue JSC_HOST_CALL jsHTMLAllCollectionPrototypeFunctionTags(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.inherits(&JSHTMLAllCollection::s_info)) + return throwError(exec, TypeError); + JSHTMLAllCollection* castedThisObj = static_cast(asObject(thisValue)); + HTMLAllCollection* imp = static_cast(castedThisObj->impl()); + const UString& name = args.at(0).toString(exec); + + + JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->tags(name))); + return result; +} + + +JSValue JSHTMLAllCollection::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + JSHTMLAllCollection* thisObj = static_cast(asObject(slot.slotBase())); + return toJS(exec, thisObj->globalObject(), static_cast(thisObj->impl())->item(slot.index())); +} +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, HTMLAllCollection* object) +{ + return getDOMObjectWrapper(exec, globalObject, object); +} +HTMLAllCollection* toHTMLAllCollection(JSC::JSValue value) +{ + return value.inherits(&JSHTMLAllCollection::s_info) ? static_cast(asObject(value))->impl() : 0; +} + +} diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLAllCollection.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLAllCollection.h new file mode 100644 index 0000000..000986e --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLAllCollection.h @@ -0,0 +1,104 @@ +/* + 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 JSHTMLAllCollection_h +#define JSHTMLAllCollection_h + +#include "DOMObjectWithSVGContext.h" +#include "JSDOMBinding.h" +#include +#include +#include + +namespace WebCore { + +class HTMLAllCollection; + +class JSHTMLAllCollection : public DOMObjectWithGlobalPointer { + typedef DOMObjectWithGlobalPointer Base; +public: + JSHTMLAllCollection(NonNullPassRefPtr, JSDOMGlobalObject*, PassRefPtr); + virtual ~JSHTMLAllCollection(); + static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); + virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); + virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + + static PassRefPtr createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags)); + } + + virtual JSC::CallType getCallData(JSC::CallData&); + + virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); + virtual bool toBoolean(JSC::ExecState*) const { return false; }; + static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); + + // Custom functions + JSC::JSValue item(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue namedItem(JSC::ExecState*, const JSC::ArgList&); + HTMLAllCollection* impl() const { return m_impl.get(); } + +private: + RefPtr m_impl; +protected: + static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::MasqueradesAsUndefined | Base::StructureFlags; + static JSC::JSValue indexGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +private: + static bool canGetItemsForName(JSC::ExecState*, HTMLAllCollection*, const JSC::Identifier&); + static JSC::JSValue nameGetter(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +}; + +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, HTMLAllCollection*); +HTMLAllCollection* toHTMLAllCollection(JSC::JSValue); + +class JSHTMLAllCollectionPrototype : 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&); + virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); + static PassRefPtr createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags)); + } + JSHTMLAllCollectionPrototype(NonNullPassRefPtr structure) : JSC::JSObject(structure) { } +protected: + static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; +}; + +// Functions + +JSC::JSValue JSC_HOST_CALL jsHTMLAllCollectionPrototypeFunctionItem(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsHTMLAllCollectionPrototypeFunctionNamedItem(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsHTMLAllCollectionPrototypeFunctionTags(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +// Attributes + +JSC::JSValue jsHTMLAllCollectionLength(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); +JSC::JSValue jsHTMLAllCollectionConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); + +} // namespace WebCore + +#endif diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp index 920f152..5e81799 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp @@ -350,7 +350,7 @@ void setJSHTMLBodyElementOnbeforeunload(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); HTMLBodyElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforeunload(globalObject->createJSAttributeEventListener(value)); @@ -360,7 +360,7 @@ void setJSHTMLBodyElementOnhashchange(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); HTMLBodyElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnhashchange(globalObject->createJSAttributeEventListener(value)); @@ -370,7 +370,7 @@ void setJSHTMLBodyElementOnmessage(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); HTMLBodyElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); @@ -380,7 +380,7 @@ void setJSHTMLBodyElementOnoffline(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); HTMLBodyElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnoffline(globalObject->createJSAttributeEventListener(value)); @@ -390,7 +390,7 @@ void setJSHTMLBodyElementOnonline(ExecState* exec, JSObject* thisObject, JSValue { UNUSED_PARAM(exec); HTMLBodyElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnonline(globalObject->createJSAttributeEventListener(value)); @@ -400,7 +400,7 @@ void setJSHTMLBodyElementOnresize(ExecState* exec, JSObject* thisObject, JSValue { UNUSED_PARAM(exec); HTMLBodyElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnresize(globalObject->createJSAttributeEventListener(value)); @@ -410,7 +410,7 @@ void setJSHTMLBodyElementOnstorage(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); HTMLBodyElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnstorage(globalObject->createJSAttributeEventListener(value)); @@ -420,7 +420,7 @@ void setJSHTMLBodyElementOnunload(ExecState* exec, JSObject* thisObject, JSValue { UNUSED_PARAM(exec); HTMLBodyElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnunload(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp index 63c0d93..213b3c5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp @@ -24,10 +24,7 @@ #include "AtomicString.h" #include "HTMLCollection.h" #include "JSNode.h" -#include "JSNodeList.h" -#include "NameNodeList.h" #include "Node.h" -#include "NodeList.h" #include #include #include @@ -104,11 +101,10 @@ bool JSHTMLCollectionConstructor::getOwnPropertyDescriptor(ExecState* exec, cons /* Hash table for prototype */ -static const HashTableValue JSHTMLCollectionPrototypeTableValues[4] = +static const HashTableValue JSHTMLCollectionPrototypeTableValues[3] = { { "item", DontDelete|Function, (intptr_t)jsHTMLCollectionPrototypeFunctionItem, (intptr_t)1 }, { "namedItem", DontDelete|Function, (intptr_t)jsHTMLCollectionPrototypeFunctionNamedItem, (intptr_t)1 }, - { "tags", DontDelete|Function, (intptr_t)jsHTMLCollectionPrototypeFunctionTags, (intptr_t)1 }, { 0, 0, 0, 0 } }; @@ -116,7 +112,7 @@ static JSC_CONST_HASHTABLE HashTable JSHTMLCollectionPrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 7, JSHTMLCollectionPrototypeTableValues, 0 }; #else - { 8, 7, JSHTMLCollectionPrototypeTableValues, 0 }; + { 5, 3, JSHTMLCollectionPrototypeTableValues, 0 }; #endif const ClassInfo JSHTMLCollectionPrototype::s_info = { "HTMLCollectionPrototype", 0, &JSHTMLCollectionPrototypeTable, 0 }; @@ -146,7 +142,7 @@ JSHTMLCollection::JSHTMLCollection(NonNullPassRefPtr structure, JSDOM JSHTMLCollection::~JSHTMLCollection() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSHTMLCollection::createPrototype(ExecState* exec, JSGlobalObject* globalObject) @@ -260,20 +256,6 @@ JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionNamedItem(ExecState* exec return castedThisObj->namedItem(exec, args); } -JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionTags(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) -{ - UNUSED_PARAM(args); - if (!thisValue.inherits(&JSHTMLCollection::s_info)) - return throwError(exec, TypeError); - JSHTMLCollection* castedThisObj = static_cast(asObject(thisValue)); - HTMLCollection* imp = static_cast(castedThisObj->impl()); - const UString& name = args.at(0).toString(exec); - - - JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->tags(name))); - return result; -} - JSValue JSHTMLCollection::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) { diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h index 447f620..e14a2c2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h @@ -92,7 +92,6 @@ protected: JSC::JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionItem(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionNamedItem(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); -JSC::JSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionTags(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); // Attributes JSC::JSValue jsHTMLCollectionLength(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp index f336c76..9e506a0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp @@ -300,7 +300,7 @@ void setJSHTMLFrameSetElementOnbeforeunload(ExecState* exec, JSObject* thisObjec { UNUSED_PARAM(exec); HTMLFrameSetElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforeunload(globalObject->createJSAttributeEventListener(value)); @@ -310,7 +310,7 @@ void setJSHTMLFrameSetElementOnhashchange(ExecState* exec, JSObject* thisObject, { UNUSED_PARAM(exec); HTMLFrameSetElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnhashchange(globalObject->createJSAttributeEventListener(value)); @@ -320,7 +320,7 @@ void setJSHTMLFrameSetElementOnmessage(ExecState* exec, JSObject* thisObject, JS { UNUSED_PARAM(exec); HTMLFrameSetElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); @@ -330,7 +330,7 @@ void setJSHTMLFrameSetElementOnoffline(ExecState* exec, JSObject* thisObject, JS { UNUSED_PARAM(exec); HTMLFrameSetElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnoffline(globalObject->createJSAttributeEventListener(value)); @@ -340,7 +340,7 @@ void setJSHTMLFrameSetElementOnonline(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); HTMLFrameSetElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnonline(globalObject->createJSAttributeEventListener(value)); @@ -350,7 +350,7 @@ void setJSHTMLFrameSetElementOnresize(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); HTMLFrameSetElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnresize(globalObject->createJSAttributeEventListener(value)); @@ -360,7 +360,7 @@ void setJSHTMLFrameSetElementOnstorage(ExecState* exec, JSObject* thisObject, JS { UNUSED_PARAM(exec); HTMLFrameSetElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnstorage(globalObject->createJSAttributeEventListener(value)); @@ -370,7 +370,7 @@ void setJSHTMLFrameSetElementOnunload(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); HTMLFrameSetElement* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnunload(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp b/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp index 5331441..02be6ba 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSHistory.cpp @@ -92,7 +92,7 @@ JSHistory::JSHistory(NonNullPassRefPtr structure, JSDOMGlobalObject* JSHistory::~JSHistory() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSHistory::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp b/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp index a21fb87..1de3c43 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSImageData.cpp @@ -126,7 +126,7 @@ JSImageData::JSImageData(NonNullPassRefPtr structure, JSDOMGlobalObje JSImageData::~JSImageData() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSImageData::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp index 8da82cc..f72baaa 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp @@ -214,7 +214,7 @@ JSInspectorBackend::JSInspectorBackend(NonNullPassRefPtr structure, J JSInspectorBackend::~JSInspectorBackend() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSInspectorBackend::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp b/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp index 798d540..2acd1af 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp @@ -101,7 +101,7 @@ JSJavaScriptCallFrame::JSJavaScriptCallFrame(NonNullPassRefPtr struct JSJavaScriptCallFrame::~JSJavaScriptCallFrame() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSJavaScriptCallFrame::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp index ca21205..bb4d56c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSLocation.cpp @@ -108,7 +108,7 @@ JSLocation::JSLocation(NonNullPassRefPtr structure, JSDOMGlobalObject JSLocation::~JSLocation() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSLocation::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp b/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp index b7d4c19..93cde9f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp @@ -138,7 +138,7 @@ JSMedia::JSMedia(NonNullPassRefPtr structure, JSDOMGlobalObject* glob JSMedia::~JSMedia() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSMedia::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp b/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp index 97e35e0..534a585 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp @@ -146,7 +146,7 @@ JSMediaError::JSMediaError(NonNullPassRefPtr structure, JSDOMGlobalOb JSMediaError::~JSMediaError() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSMediaError::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp b/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp index 93a17b4..e7b758e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp @@ -142,7 +142,7 @@ JSMediaList::JSMediaList(NonNullPassRefPtr structure, JSDOMGlobalObje JSMediaList::~JSMediaList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSMediaList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp b/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp index 4fdac64..8ba6f01 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp @@ -87,7 +87,7 @@ JSMessageChannel::JSMessageChannel(NonNullPassRefPtr structure, JSDOM JSMessageChannel::~JSMessageChannel() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSMessageChannel::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp b/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp index 28e1492..a65091c 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp @@ -158,7 +158,7 @@ JSMessagePort::JSMessagePort(NonNullPassRefPtr structure, JSDOMGlobal JSMessagePort::~JSMessagePort() { impl()->invalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSMessagePort::createPrototype(ExecState* exec, JSGlobalObject* globalObject) @@ -202,7 +202,7 @@ void setJSMessagePortOnmessage(ExecState* exec, JSObject* thisObject, JSValue va { UNUSED_PARAM(exec); MessagePort* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp b/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp index f797df2..c91aaeb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp @@ -131,7 +131,7 @@ JSMimeType::JSMimeType(NonNullPassRefPtr structure, JSDOMGlobalObject JSMimeType::~JSMimeType() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSMimeType::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp b/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp index 0384539..3c7b740 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp @@ -142,7 +142,7 @@ JSMimeTypeArray::JSMimeTypeArray(NonNullPassRefPtr structure, JSDOMGl JSMimeTypeArray::~JSMimeTypeArray() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSMimeTypeArray::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp index e3cc8d2..e9c79a1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp @@ -147,7 +147,7 @@ JSNamedNodeMap::JSNamedNodeMap(NonNullPassRefPtr structure, JSDOMGlob JSNamedNodeMap::~JSNamedNodeMap() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSNamedNodeMap::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp b/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp index 6dcda62..1c8e190 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp @@ -108,7 +108,7 @@ JSNavigator::JSNavigator(NonNullPassRefPtr structure, JSDOMGlobalObje JSNavigator::~JSNavigator() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSNavigator::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSNode.cpp b/src/3rdparty/webkit/WebCore/generated/JSNode.cpp index e132829..e3a2006 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNode.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNode.cpp @@ -221,7 +221,7 @@ JSNode::JSNode(NonNullPassRefPtr structure, JSDOMGlobalObject* global JSNode::~JSNode() { impl()->invalidateEventListeners(); - forgetDOMNode(impl()->document(), impl()); + forgetDOMNode(this, impl(), impl()->document()); } JSObject* JSNode::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp index 141a060..22726f6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp @@ -167,7 +167,7 @@ JSNodeFilter::JSNodeFilter(NonNullPassRefPtr structure, JSDOMGlobalOb JSNodeFilter::~JSNodeFilter() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSNodeFilter::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp index cf85e40..8570d24 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp @@ -148,7 +148,7 @@ JSNodeIterator::JSNodeIterator(NonNullPassRefPtr structure, JSDOMGlob JSNodeIterator::~JSNodeIterator() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSNodeIterator::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp b/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp index 01ee9ac..3f3131e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp @@ -142,7 +142,7 @@ JSNodeList::JSNodeList(NonNullPassRefPtr structure, JSDOMGlobalObject JSNodeList::~JSNodeList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSNodeList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp b/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp index 035a352..1c7b6ec 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp @@ -147,7 +147,7 @@ JSPlugin::JSPlugin(NonNullPassRefPtr structure, JSDOMGlobalObject* gl JSPlugin::~JSPlugin() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSPlugin::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp b/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp index bd0b579..38a9346 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp @@ -143,7 +143,7 @@ JSPluginArray::JSPluginArray(NonNullPassRefPtr structure, JSDOMGlobal JSPluginArray::~JSPluginArray() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSPluginArray::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp b/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp index e178bd9..fffa0c1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp @@ -146,7 +146,7 @@ JSPositionError::JSPositionError(NonNullPassRefPtr structure, JSDOMGl JSPositionError::~JSPositionError() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSPositionError::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSRGBColor.cpp b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.cpp index 0dff99a..e45ce66 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRGBColor.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSRGBColor.cpp @@ -128,7 +128,7 @@ JSRGBColor::JSRGBColor(NonNullPassRefPtr structure, JSDOMGlobalObject JSRGBColor::~JSRGBColor() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSRGBColor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSRange.cpp b/src/3rdparty/webkit/WebCore/generated/JSRange.cpp index cc59119..bc9979b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRange.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSRange.cpp @@ -194,7 +194,7 @@ JSRange::JSRange(NonNullPassRefPtr structure, JSDOMGlobalObject* glob JSRange::~JSRange() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSRange::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp b/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp index 2f8e618..bbb172d 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp @@ -145,7 +145,7 @@ JSRangeException::JSRangeException(NonNullPassRefPtr structure, JSDOM JSRangeException::~JSRangeException() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSRangeException::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSRect.cpp index 37c4669..e57d688 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSRect.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSRect.cpp @@ -129,7 +129,7 @@ JSRect::JSRect(NonNullPassRefPtr structure, JSDOMGlobalObject* global JSRect::~JSRect() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSRect::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp index a318e1d..79fdc89 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp @@ -83,7 +83,7 @@ JSSQLError::JSSQLError(NonNullPassRefPtr structure, JSDOMGlobalObject JSSQLError::~JSSQLError() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSQLError::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp index 223de95..fa85ad6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp @@ -84,7 +84,7 @@ JSSQLResultSet::JSSQLResultSet(NonNullPassRefPtr structure, JSDOMGlob JSSQLResultSet::~JSSQLResultSet() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSQLResultSet::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp index dddf0c4..090e4f7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp @@ -92,7 +92,7 @@ JSSQLResultSetRowList::JSSQLResultSetRowList(NonNullPassRefPtr struct JSSQLResultSetRowList::~JSSQLResultSetRowList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSQLResultSetRowList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp b/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp index c2c0e54..e165dad 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp @@ -76,7 +76,7 @@ JSSQLTransaction::JSSQLTransaction(NonNullPassRefPtr structure, JSDOM JSSQLTransaction::~JSSQLTransaction() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSQLTransaction::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp index 220f4a6..e6d4795 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp @@ -156,7 +156,7 @@ JSSVGAngle::JSSVGAngle(NonNullPassRefPtr structure, JSDOMGlobalObject JSSVGAngle::~JSSVGAngle() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAngle::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp index c09ce1c..599f5ca 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp @@ -81,7 +81,7 @@ JSSVGAnimatedAngle::JSSVGAnimatedAngle(NonNullPassRefPtr structure, J JSSVGAnimatedAngle::~JSSVGAnimatedAngle() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedAngle::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp index fb3f4c8..131b358 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp @@ -79,7 +79,7 @@ JSSVGAnimatedBoolean::JSSVGAnimatedBoolean(NonNullPassRefPtr structur JSSVGAnimatedBoolean::~JSSVGAnimatedBoolean() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedBoolean::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp index 8fbe43e..6a27988 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp @@ -80,7 +80,7 @@ JSSVGAnimatedEnumeration::JSSVGAnimatedEnumeration(NonNullPassRefPtr JSSVGAnimatedEnumeration::~JSSVGAnimatedEnumeration() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedEnumeration::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp index f52a51b..86c388b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp @@ -80,7 +80,7 @@ JSSVGAnimatedInteger::JSSVGAnimatedInteger(NonNullPassRefPtr structur JSSVGAnimatedInteger::~JSSVGAnimatedInteger() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedInteger::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp index 50826a7..f5fff5e 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp @@ -80,7 +80,7 @@ JSSVGAnimatedLength::JSSVGAnimatedLength(NonNullPassRefPtr structure, JSSVGAnimatedLength::~JSSVGAnimatedLength() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedLength::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp index b0c3743..5525640 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp @@ -81,7 +81,7 @@ JSSVGAnimatedLengthList::JSSVGAnimatedLengthList(NonNullPassRefPtr st JSSVGAnimatedLengthList::~JSSVGAnimatedLengthList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedLengthList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp index ef16117..69f1490 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp @@ -80,7 +80,7 @@ JSSVGAnimatedNumber::JSSVGAnimatedNumber(NonNullPassRefPtr structure, JSSVGAnimatedNumber::~JSSVGAnimatedNumber() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedNumber::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp index af11dbd..0fa8afa 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp @@ -81,7 +81,7 @@ JSSVGAnimatedNumberList::JSSVGAnimatedNumberList(NonNullPassRefPtr st JSSVGAnimatedNumberList::~JSSVGAnimatedNumberList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedNumberList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp index 53f0b60..b64ee3a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp @@ -81,7 +81,7 @@ JSSVGAnimatedPreserveAspectRatio::JSSVGAnimatedPreserveAspectRatio(NonNullPassRe JSSVGAnimatedPreserveAspectRatio::~JSSVGAnimatedPreserveAspectRatio() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedPreserveAspectRatio::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp index 432a4d5..0db579b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp @@ -81,7 +81,7 @@ JSSVGAnimatedRect::JSSVGAnimatedRect(NonNullPassRefPtr structure, JSD JSSVGAnimatedRect::~JSSVGAnimatedRect() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedRect::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp index c3ccd92..a26a070 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp @@ -82,7 +82,7 @@ JSSVGAnimatedString::JSSVGAnimatedString(NonNullPassRefPtr structure, JSSVGAnimatedString::~JSSVGAnimatedString() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedString::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp index 52b2395..62c3121 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp @@ -81,7 +81,7 @@ JSSVGAnimatedTransformList::JSSVGAnimatedTransformList(NonNullPassRefPtrglobalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGAnimatedTransformList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp index 10d375d..1bb0736 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp @@ -153,7 +153,7 @@ JSSVGElementInstance::JSSVGElementInstance(NonNullPassRefPtr structur JSSVGElementInstance::~JSSVGElementInstance() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGElementInstance::createPrototype(ExecState* exec, JSGlobalObject* globalObject) @@ -724,7 +724,7 @@ void setJSSVGElementInstanceOnabort(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnabort(globalObject->createJSAttributeEventListener(value)); @@ -734,7 +734,7 @@ void setJSSVGElementInstanceOnblur(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnblur(globalObject->createJSAttributeEventListener(value)); @@ -744,7 +744,7 @@ void setJSSVGElementInstanceOnchange(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnchange(globalObject->createJSAttributeEventListener(value)); @@ -754,7 +754,7 @@ void setJSSVGElementInstanceOnclick(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnclick(globalObject->createJSAttributeEventListener(value)); @@ -764,7 +764,7 @@ void setJSSVGElementInstanceOncontextmenu(ExecState* exec, JSObject* thisObject, { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncontextmenu(globalObject->createJSAttributeEventListener(value)); @@ -774,7 +774,7 @@ void setJSSVGElementInstanceOndblclick(ExecState* exec, JSObject* thisObject, JS { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndblclick(globalObject->createJSAttributeEventListener(value)); @@ -784,7 +784,7 @@ void setJSSVGElementInstanceOnerror(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnerror(globalObject->createJSAttributeEventListener(value)); @@ -794,7 +794,7 @@ void setJSSVGElementInstanceOnfocus(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnfocus(globalObject->createJSAttributeEventListener(value)); @@ -804,7 +804,7 @@ void setJSSVGElementInstanceOninput(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOninput(globalObject->createJSAttributeEventListener(value)); @@ -814,7 +814,7 @@ void setJSSVGElementInstanceOnkeydown(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeydown(globalObject->createJSAttributeEventListener(value)); @@ -824,7 +824,7 @@ void setJSSVGElementInstanceOnkeypress(ExecState* exec, JSObject* thisObject, JS { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeypress(globalObject->createJSAttributeEventListener(value)); @@ -834,7 +834,7 @@ void setJSSVGElementInstanceOnkeyup(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnkeyup(globalObject->createJSAttributeEventListener(value)); @@ -844,7 +844,7 @@ void setJSSVGElementInstanceOnload(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnload(globalObject->createJSAttributeEventListener(value)); @@ -854,7 +854,7 @@ void setJSSVGElementInstanceOnmousedown(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousedown(globalObject->createJSAttributeEventListener(value)); @@ -864,7 +864,7 @@ void setJSSVGElementInstanceOnmousemove(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousemove(globalObject->createJSAttributeEventListener(value)); @@ -874,7 +874,7 @@ void setJSSVGElementInstanceOnmouseout(ExecState* exec, JSObject* thisObject, JS { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseout(globalObject->createJSAttributeEventListener(value)); @@ -884,7 +884,7 @@ void setJSSVGElementInstanceOnmouseover(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseover(globalObject->createJSAttributeEventListener(value)); @@ -894,7 +894,7 @@ void setJSSVGElementInstanceOnmouseup(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmouseup(globalObject->createJSAttributeEventListener(value)); @@ -904,7 +904,7 @@ void setJSSVGElementInstanceOnmousewheel(ExecState* exec, JSObject* thisObject, { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmousewheel(globalObject->createJSAttributeEventListener(value)); @@ -914,7 +914,7 @@ void setJSSVGElementInstanceOnbeforecut(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforecut(globalObject->createJSAttributeEventListener(value)); @@ -924,7 +924,7 @@ void setJSSVGElementInstanceOncut(ExecState* exec, JSObject* thisObject, JSValue { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncut(globalObject->createJSAttributeEventListener(value)); @@ -934,7 +934,7 @@ void setJSSVGElementInstanceOnbeforecopy(ExecState* exec, JSObject* thisObject, { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforecopy(globalObject->createJSAttributeEventListener(value)); @@ -944,7 +944,7 @@ void setJSSVGElementInstanceOncopy(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOncopy(globalObject->createJSAttributeEventListener(value)); @@ -954,7 +954,7 @@ void setJSSVGElementInstanceOnbeforepaste(ExecState* exec, JSObject* thisObject, { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnbeforepaste(globalObject->createJSAttributeEventListener(value)); @@ -964,7 +964,7 @@ void setJSSVGElementInstanceOnpaste(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnpaste(globalObject->createJSAttributeEventListener(value)); @@ -974,7 +974,7 @@ void setJSSVGElementInstanceOndragenter(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragenter(globalObject->createJSAttributeEventListener(value)); @@ -984,7 +984,7 @@ void setJSSVGElementInstanceOndragover(ExecState* exec, JSObject* thisObject, JS { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragover(globalObject->createJSAttributeEventListener(value)); @@ -994,7 +994,7 @@ void setJSSVGElementInstanceOndragleave(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragleave(globalObject->createJSAttributeEventListener(value)); @@ -1004,7 +1004,7 @@ void setJSSVGElementInstanceOndrop(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndrop(globalObject->createJSAttributeEventListener(value)); @@ -1014,7 +1014,7 @@ void setJSSVGElementInstanceOndragstart(ExecState* exec, JSObject* thisObject, J { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragstart(globalObject->createJSAttributeEventListener(value)); @@ -1024,7 +1024,7 @@ void setJSSVGElementInstanceOndrag(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndrag(globalObject->createJSAttributeEventListener(value)); @@ -1034,7 +1034,7 @@ void setJSSVGElementInstanceOndragend(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOndragend(globalObject->createJSAttributeEventListener(value)); @@ -1044,7 +1044,7 @@ void setJSSVGElementInstanceOnreset(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnreset(globalObject->createJSAttributeEventListener(value)); @@ -1054,7 +1054,7 @@ void setJSSVGElementInstanceOnresize(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnresize(globalObject->createJSAttributeEventListener(value)); @@ -1064,7 +1064,7 @@ void setJSSVGElementInstanceOnscroll(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnscroll(globalObject->createJSAttributeEventListener(value)); @@ -1074,7 +1074,7 @@ void setJSSVGElementInstanceOnsearch(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnsearch(globalObject->createJSAttributeEventListener(value)); @@ -1084,7 +1084,7 @@ void setJSSVGElementInstanceOnselect(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnselect(globalObject->createJSAttributeEventListener(value)); @@ -1094,7 +1094,7 @@ void setJSSVGElementInstanceOnselectstart(ExecState* exec, JSObject* thisObject, { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnselectstart(globalObject->createJSAttributeEventListener(value)); @@ -1104,7 +1104,7 @@ void setJSSVGElementInstanceOnsubmit(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnsubmit(globalObject->createJSAttributeEventListener(value)); @@ -1114,7 +1114,7 @@ void setJSSVGElementInstanceOnunload(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); SVGElementInstance* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnunload(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp index 8bc5bc0..893cc76 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp @@ -94,7 +94,7 @@ JSSVGElementInstanceList::JSSVGElementInstanceList(NonNullPassRefPtr JSSVGElementInstanceList::~JSSVGElementInstanceList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGElementInstanceList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp index 039182f..8906774 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp @@ -150,7 +150,7 @@ JSSVGException::JSSVGException(NonNullPassRefPtr structure, JSDOMGlob JSSVGException::~JSSVGException() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGException::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp index f97df89..0bcf836 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp @@ -169,7 +169,7 @@ JSSVGLength::JSSVGLength(NonNullPassRefPtr structure, JSDOMGlobalObje JSSVGLength::~JSSVGLength() { JSSVGDynamicPODTypeWrapperCache::forgetWrapper(m_impl.get()); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGLength::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp index 952a5f0..a984bd1 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp @@ -100,7 +100,7 @@ JSSVGLengthList::JSSVGLengthList(NonNullPassRefPtr structure, JSDOMGl JSSVGLengthList::~JSSVGLengthList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGLengthList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp index ba8dfe8..d46ce6f 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp @@ -107,7 +107,7 @@ JSSVGMatrix::JSSVGMatrix(NonNullPassRefPtr structure, JSDOMGlobalObje JSSVGMatrix::~JSSVGMatrix() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGMatrix::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp index 2bfe658..8ba2042 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp @@ -79,7 +79,7 @@ JSSVGNumber::JSSVGNumber(NonNullPassRefPtr structure, JSDOMGlobalObje JSSVGNumber::~JSSVGNumber() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGNumber::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp index dc6f5a4..fa0e3cf 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp @@ -99,7 +99,7 @@ JSSVGNumberList::JSSVGNumberList(NonNullPassRefPtr structure, JSDOMGl JSSVGNumberList::~JSSVGNumberList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGNumberList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp index 2f1ecbd..767098b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp @@ -181,7 +181,7 @@ JSSVGPathSeg::JSSVGPathSeg(NonNullPassRefPtr structure, JSDOMGlobalOb JSSVGPathSeg::~JSSVGPathSeg() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGPathSeg::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp index 0043533..9a35c1b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp @@ -99,7 +99,7 @@ JSSVGPathSegList::JSSVGPathSegList(NonNullPassRefPtr structure, JSDOM JSSVGPathSegList::~JSSVGPathSegList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGPathSegList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp index e4c2415..67c35e2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp @@ -94,7 +94,7 @@ JSSVGPoint::JSSVGPoint(NonNullPassRefPtr structure, JSDOMGlobalObject JSSVGPoint::~JSSVGPoint() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGPoint::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp index 4a22ff9..6968c80 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp @@ -98,7 +98,7 @@ JSSVGPointList::JSSVGPointList(NonNullPassRefPtr structure, JSDOMGlob JSSVGPointList::~JSSVGPointList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGPointList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp index 0f3329c..578cd34 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp @@ -167,7 +167,7 @@ JSSVGPreserveAspectRatio::JSSVGPreserveAspectRatio(NonNullPassRefPtr JSSVGPreserveAspectRatio::~JSSVGPreserveAspectRatio() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGPreserveAspectRatio::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp index 8360b4b..e60a309 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp @@ -83,7 +83,7 @@ JSSVGRect::JSSVGRect(NonNullPassRefPtr structure, JSDOMGlobalObject* JSSVGRect::~JSSVGRect() { JSSVGDynamicPODTypeWrapperCache::forgetWrapper(m_impl.get()); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGRect::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp index b484fbf..1793c23 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp @@ -148,7 +148,7 @@ JSSVGRenderingIntent::JSSVGRenderingIntent(NonNullPassRefPtr structur JSSVGRenderingIntent::~JSSVGRenderingIntent() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGRenderingIntent::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp index d4a6935..591ca64 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp @@ -100,7 +100,7 @@ JSSVGStringList::JSSVGStringList(NonNullPassRefPtr structure, JSDOMGl JSSVGStringList::~JSSVGStringList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGStringList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp index 82cddb6..2f51e56 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp @@ -162,7 +162,7 @@ JSSVGTransform::JSSVGTransform(NonNullPassRefPtr structure, JSDOMGlob JSSVGTransform::~JSSVGTransform() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGTransform::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp index 51c0cca..8ce9342 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp @@ -103,7 +103,7 @@ JSSVGTransformList::JSSVGTransformList(NonNullPassRefPtr structure, J JSSVGTransformList::~JSSVGTransformList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGTransformList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp b/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp index 452fc9c..fb3321a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp @@ -142,7 +142,7 @@ JSSVGUnitTypes::JSSVGUnitTypes(NonNullPassRefPtr structure, JSDOMGlob JSSVGUnitTypes::~JSSVGUnitTypes() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSSVGUnitTypes::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp b/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp index 574f44c..7ccffa3 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSScreen.cpp @@ -84,7 +84,7 @@ JSScreen::JSScreen(NonNullPassRefPtr structure, JSDOMGlobalObject* gl JSScreen::~JSScreen() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSScreen::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp b/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp index 998b8cf..e0ae01b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSStorage.cpp @@ -147,7 +147,7 @@ JSStorage::JSStorage(NonNullPassRefPtr structure, JSDOMGlobalObject* JSStorage::~JSStorage() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSStorage::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp b/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp index ae7011d..b84ab6b 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp @@ -136,7 +136,7 @@ JSStyleSheet::JSStyleSheet(NonNullPassRefPtr structure, JSDOMGlobalOb JSStyleSheet::~JSStyleSheet() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSStyleSheet::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp b/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp index 5d07cc1..db3d083 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp @@ -141,7 +141,7 @@ JSStyleSheetList::JSStyleSheetList(NonNullPassRefPtr structure, JSDOM JSStyleSheetList::~JSStyleSheetList() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSStyleSheetList::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp b/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp index 627ad3b..940498a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp @@ -125,7 +125,7 @@ JSTextMetrics::JSTextMetrics(NonNullPassRefPtr structure, JSDOMGlobal JSTextMetrics::~JSTextMetrics() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSTextMetrics::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp b/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp index 825ca1b..1306ccb 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp @@ -93,7 +93,7 @@ JSTimeRanges::JSTimeRanges(NonNullPassRefPtr structure, JSDOMGlobalOb JSTimeRanges::~JSTimeRanges() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSTimeRanges::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp b/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp index a26425e..10645db 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp @@ -151,7 +151,7 @@ JSTreeWalker::JSTreeWalker(NonNullPassRefPtr structure, JSDOMGlobalOb JSTreeWalker::~JSTreeWalker() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSTreeWalker::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp b/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp index b355874..7616c58 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSValidityState.cpp @@ -84,7 +84,7 @@ JSValidityState::JSValidityState(NonNullPassRefPtr structure, JSDOMGl JSValidityState::~JSValidityState() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSValidityState::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp b/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp index a084949..94ad1c5 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp @@ -73,7 +73,7 @@ JSVoidCallback::JSVoidCallback(NonNullPassRefPtr structure, JSDOMGlob JSVoidCallback::~JSVoidCallback() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSVoidCallback::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp index bcf8286..0bb2267 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitCSSMatrix.cpp @@ -120,7 +120,7 @@ JSWebKitCSSMatrix::JSWebKitCSSMatrix(NonNullPassRefPtr structure, JSD JSWebKitCSSMatrix::~JSWebKitCSSMatrix() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSWebKitCSSMatrix::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp index 255df0a..ea88682 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebKitPoint.cpp @@ -78,7 +78,7 @@ JSWebKitPoint::JSWebKitPoint(NonNullPassRefPtr structure, JSDOMGlobal JSWebKitPoint::~JSWebKitPoint() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSWebKitPoint::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSWebSocket.cpp b/src/3rdparty/webkit/WebCore/generated/JSWebSocket.cpp index ea8ff3d..7e48815 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWebSocket.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWebSocket.cpp @@ -122,7 +122,7 @@ JSWebSocket::JSWebSocket(NonNullPassRefPtr structure, JSDOMGlobalObje JSWebSocket::~JSWebSocket() { impl()->invalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } void JSWebSocket::markChildren(MarkStack& markStack) @@ -215,7 +215,7 @@ void setJSWebSocketOnopen(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); WebSocket* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnopen(globalObject->createJSAttributeEventListener(value)); @@ -225,7 +225,7 @@ void setJSWebSocketOnmessage(ExecState* exec, JSObject* thisObject, JSValue valu { UNUSED_PARAM(exec); WebSocket* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); @@ -235,7 +235,7 @@ void setJSWebSocketOnclose(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); WebSocket* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnclose(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp index 42cc502..14153e2 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWorker.cpp @@ -129,7 +129,7 @@ void setJSWorkerOnmessage(ExecState* exec, JSObject* thisObject, JSValue value) { UNUSED_PARAM(exec); Worker* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnmessage(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp index e29cb32..5b7b105 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp @@ -129,7 +129,6 @@ JSWorkerContext::JSWorkerContext(NonNullPassRefPtr structure, PassRef JSWorkerContext::~JSWorkerContext() { impl()->invalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); } bool JSWorkerContext::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp index e24d0d6..6046aa6 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp @@ -156,7 +156,7 @@ JSWorkerLocation::JSWorkerLocation(NonNullPassRefPtr structure, JSDOM JSWorkerLocation::~JSWorkerLocation() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSWorkerLocation::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp b/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp index 8efab1e..29c2364 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp @@ -93,7 +93,7 @@ JSWorkerNavigator::JSWorkerNavigator(NonNullPassRefPtr structure, JSD JSWorkerNavigator::~JSWorkerNavigator() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSWorkerNavigator::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp index 9927f5e..d81c689 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp @@ -137,7 +137,7 @@ JSXMLHttpRequest::JSXMLHttpRequest(NonNullPassRefPtr structure, JSDOM JSXMLHttpRequest::~JSXMLHttpRequest() { impl()->invalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXMLHttpRequest::createPrototype(ExecState* exec, JSGlobalObject* globalObject) @@ -294,7 +294,7 @@ void setJSXMLHttpRequestOnabort(ExecState* exec, JSObject* thisObject, JSValue v { UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnabort(globalObject->createJSAttributeEventListener(value)); @@ -304,7 +304,7 @@ void setJSXMLHttpRequestOnerror(ExecState* exec, JSObject* thisObject, JSValue v { UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnerror(globalObject->createJSAttributeEventListener(value)); @@ -314,7 +314,7 @@ void setJSXMLHttpRequestOnload(ExecState* exec, JSObject* thisObject, JSValue va { UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnload(globalObject->createJSAttributeEventListener(value)); @@ -324,7 +324,7 @@ void setJSXMLHttpRequestOnloadstart(ExecState* exec, JSObject* thisObject, JSVal { UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnloadstart(globalObject->createJSAttributeEventListener(value)); @@ -334,7 +334,7 @@ void setJSXMLHttpRequestOnprogress(ExecState* exec, JSObject* thisObject, JSValu { UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnprogress(globalObject->createJSAttributeEventListener(value)); @@ -344,7 +344,7 @@ void setJSXMLHttpRequestOnreadystatechange(ExecState* exec, JSObject* thisObject { UNUSED_PARAM(exec); XMLHttpRequest* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnreadystatechange(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp index 30e0d72..6de17c7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp @@ -153,7 +153,7 @@ JSXMLHttpRequestException::JSXMLHttpRequestException(NonNullPassRefPtrglobalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXMLHttpRequestException::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp index bc5fff9..9ca7972 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp @@ -158,7 +158,7 @@ JSXMLHttpRequestUpload::JSXMLHttpRequestUpload(NonNullPassRefPtr stru JSXMLHttpRequestUpload::~JSXMLHttpRequestUpload() { impl()->invalidateEventListeners(); - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXMLHttpRequestUpload::createPrototype(ExecState* exec, JSGlobalObject* globalObject) @@ -250,7 +250,7 @@ void setJSXMLHttpRequestUploadOnabort(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); XMLHttpRequestUpload* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnabort(globalObject->createJSAttributeEventListener(value)); @@ -260,7 +260,7 @@ void setJSXMLHttpRequestUploadOnerror(ExecState* exec, JSObject* thisObject, JSV { UNUSED_PARAM(exec); XMLHttpRequestUpload* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnerror(globalObject->createJSAttributeEventListener(value)); @@ -270,7 +270,7 @@ void setJSXMLHttpRequestUploadOnload(ExecState* exec, JSObject* thisObject, JSVa { UNUSED_PARAM(exec); XMLHttpRequestUpload* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnload(globalObject->createJSAttributeEventListener(value)); @@ -280,7 +280,7 @@ void setJSXMLHttpRequestUploadOnloadstart(ExecState* exec, JSObject* thisObject, { UNUSED_PARAM(exec); XMLHttpRequestUpload* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnloadstart(globalObject->createJSAttributeEventListener(value)); @@ -290,7 +290,7 @@ void setJSXMLHttpRequestUploadOnprogress(ExecState* exec, JSObject* thisObject, { UNUSED_PARAM(exec); XMLHttpRequestUpload* imp = static_cast(static_cast(thisObject)->impl()); - JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext()); + JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(imp->scriptExecutionContext(), exec); if (!globalObject) return; imp->setOnprogress(globalObject->createJSAttributeEventListener(value)); diff --git a/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp b/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp index e6cdd6b..2fd7e29 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp @@ -147,7 +147,7 @@ JSXMLSerializer::JSXMLSerializer(NonNullPassRefPtr structure, JSDOMGl JSXMLSerializer::~JSXMLSerializer() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXMLSerializer::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp index e25be26..aa8840a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp @@ -158,7 +158,7 @@ JSXPathEvaluator::JSXPathEvaluator(NonNullPassRefPtr structure, JSDOM JSXPathEvaluator::~JSXPathEvaluator() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXPathEvaluator::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp index 3894ac2..fb6a00a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp @@ -148,7 +148,7 @@ JSXPathException::JSXPathException(NonNullPassRefPtr structure, JSDOM JSXPathException::~JSXPathException() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXPathException::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp index 9464146..af059df 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp @@ -141,7 +141,7 @@ JSXPathExpression::JSXPathExpression(NonNullPassRefPtr structure, JSD JSXPathExpression::~JSXPathExpression() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXPathExpression::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp index c3bdef1..7ba29c0 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp @@ -79,7 +79,7 @@ JSXPathNSResolver::JSXPathNSResolver(NonNullPassRefPtr structure, JSD JSXPathNSResolver::~JSXPathNSResolver() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXPathNSResolver::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp b/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp index 337f473..d70ad29 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp @@ -171,7 +171,7 @@ JSXPathResult::JSXPathResult(NonNullPassRefPtr structure, JSDOMGlobal JSXPathResult::~JSXPathResult() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXPathResult::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/JSXSLTProcessor.cpp b/src/3rdparty/webkit/WebCore/generated/JSXSLTProcessor.cpp index 7dcd9c9..add8a84 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSXSLTProcessor.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSXSLTProcessor.cpp @@ -86,7 +86,7 @@ JSXSLTProcessor::JSXSLTProcessor(NonNullPassRefPtr structure, JSDOMGl JSXSLTProcessor::~JSXSLTProcessor() { - forgetDOMObject(*Heap::heap(this)->globalData(), impl()); + forgetDOMObject(this, impl()); } JSObject* JSXSLTProcessor::createPrototype(ExecState* exec, JSGlobalObject* globalObject) diff --git a/src/3rdparty/webkit/WebCore/generated/WebKitVersion.h b/src/3rdparty/webkit/WebCore/generated/WebKitVersion.h index 11e6af2..568670b 100644 --- a/src/3rdparty/webkit/WebCore/generated/WebKitVersion.h +++ b/src/3rdparty/webkit/WebCore/generated/WebKitVersion.h @@ -31,6 +31,6 @@ #define WebKitVersion_h #define WEBKIT_MAJOR_VERSION 532 -#define WEBKIT_MINOR_VERSION 3 +#define WEBKIT_MINOR_VERSION 4 #endif //WebKitVersion_h diff --git a/src/3rdparty/webkit/WebCore/history/qt/HistoryItemQt.cpp b/src/3rdparty/webkit/WebCore/history/qt/HistoryItemQt.cpp index 098a786..c5fb069 100644 --- a/src/3rdparty/webkit/WebCore/history/qt/HistoryItemQt.cpp +++ b/src/3rdparty/webkit/WebCore/history/qt/HistoryItemQt.cpp @@ -23,10 +23,13 @@ #include "CString.h" #include "FormData.h" -bool WebCore::HistoryItem::restoreState(QDataStream& in, int /*version*/) +bool WebCore::HistoryItem::restoreState(QDataStream& in, int version) { - // there is no different version right now - // switch (version) { + // we only support version 1 for now + + if (version != 1) + return false; + WebCore::String url; WebCore::String title; WebCore::String altTitle; @@ -87,10 +90,12 @@ bool WebCore::HistoryItem::restoreState(QDataStream& in, int /*version*/) return in.status() == QDataStream::Ok; } -QDataStream& WebCore::HistoryItem::saveState(QDataStream& out, int /*version*/) const +QDataStream& WebCore::HistoryItem::saveState(QDataStream& out, int version) const { - // there is no different version right now - // switch (version) { + // we only support version 1 for now. + if (version != 1) + return out; + out << urlString() << title() << alternateTitle() << lastVisitedTime(); out << originalURLString() << referrer() << target() << parent(); out << lastVisitWasHTTPNonGet() << lastVisitWasFailure() << isTargetItem(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.cpp b/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.cpp new file mode 100644 index 0000000..dbfed28 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.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 "HTMLAllCollection.h" + +#include "Node.h" + +namespace WebCore { + +PassRefPtr HTMLAllCollection::create(PassRefPtr base) +{ + return adoptRef(new HTMLAllCollection(base)); +} + +HTMLAllCollection::HTMLAllCollection(PassRefPtr base) + : HTMLCollection(base, DocAll) +{ +} + +HTMLAllCollection::~HTMLAllCollection() +{ +} + +} // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.h b/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.h new file mode 100644 index 0000000..1dd3ede --- /dev/null +++ b/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.h @@ -0,0 +1,44 @@ +/* + * 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 HTMLAllCollection_h +#define HTMLAllCollection_h + +#include "HTMLCollection.h" + +namespace WebCore { + +class HTMLAllCollection : public HTMLCollection { +public: + static PassRefPtr create(PassRefPtr); + virtual ~HTMLAllCollection(); + +private: + HTMLAllCollection(PassRefPtr); +}; + +} // namespace WebCore + +#endif // HTMLAllCollection_h diff --git a/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.idl b/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.idl new file mode 100644 index 0000000..d36f41e --- /dev/null +++ b/src/3rdparty/webkit/WebCore/html/HTMLAllCollection.idl @@ -0,0 +1,43 @@ +/* + * 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. + */ + +module html { + + interface [ + GenerateConstructor, + HasIndexGetter, + HasNameGetter, + CustomCall, + MasqueradesAsUndefined + ] HTMLAllCollection { + readonly attribute unsigned long length; + [Custom] Node item(in unsigned long index); + [Custom] Node namedItem(in DOMString name); + + // FIXME: This should return an HTMLAllCollection. + NodeList tags(in DOMString name); + }; + +} diff --git a/src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp index 335b20f..7bae6e3 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp @@ -172,10 +172,11 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type) if (m_context && !m_context->is3d()) return 0; if (!m_context) { - m_context = new CanvasRenderingContext3D(this); - - // Need to make sure a RenderLayer and compositing layer get created for the Canvas - setNeedsStyleRecalc(SyntheticStyleChange); + m_context = CanvasRenderingContext3D::create(this); + if (m_context) { + // Need to make sure a RenderLayer and compositing layer get created for the Canvas + setNeedsStyleRecalc(SyntheticStyleChange); + } } return m_context.get(); } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLCollection.h b/src/3rdparty/webkit/WebCore/html/HTMLCollection.h index b04bcbc..eea1777 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLCollection.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLCollection.h @@ -64,6 +64,7 @@ public: protected: HTMLCollection(PassRefPtr base, CollectionType, CollectionCache*); + HTMLCollection(PassRefPtr base, CollectionType); CollectionCache* info() const { return m_info; } void resetCollectionInfo() const; @@ -71,8 +72,6 @@ protected: mutable bool m_idsDone; // for nextNamedItem() private: - HTMLCollection(PassRefPtr base, CollectionType); - virtual Element* itemAfter(Element*) const; virtual unsigned calcLength() const; virtual void updateNameCache() const; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLCollection.idl b/src/3rdparty/webkit/WebCore/html/HTMLCollection.idl index 1ba5ec7..45d1127 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLCollection.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLCollection.idl @@ -34,8 +34,9 @@ module html { [Custom] Node item(in unsigned long index); [Custom] Node namedItem(in DOMString name); - // Extensions +#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C NodeList tags(in DOMString name); +#endif }; } diff --git a/src/3rdparty/webkit/WebCore/html/HTMLDocument.idl b/src/3rdparty/webkit/WebCore/html/HTMLDocument.idl index 3dd7a07..d250741 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLDocument.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLDocument.idl @@ -39,7 +39,7 @@ module html { #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT // FIXME: This should eventually be available (if they are wanted) for all languages. - attribute [Custom, Deletable] HTMLCollection all; + attribute [Custom, Deletable] HTMLAllCollection all; #endif void clear(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp index ed3405a..f25c908 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp @@ -1549,9 +1549,16 @@ void HTMLInputElement::defaultEventHandler(Event* evt) if (r && r->isTextField()) toRenderTextControl(r)->setEdited(false); } - // Form may never have been present, or may have been destroyed by the change event. - if (form()) - form()->submitClick(evt); + + RefPtr formForSubmission = form(); + // If there is no form and the element is an , then create a temporary form just to be used for submission. + if (!formForSubmission && inputType() == ISINDEX) + formForSubmission = createTemporaryFormForIsIndex(); + + // Form may never have been present, or may have been destroyed by code responding to the change event. + if (formForSubmission) + formForSubmission->submitClick(evt); + evt->setDefaultHandled(); return; } @@ -1569,6 +1576,19 @@ void HTMLInputElement::defaultEventHandler(Event* evt) HTMLFormControlElementWithState::defaultEventHandler(evt); } +PassRefPtr HTMLInputElement::createTemporaryFormForIsIndex() +{ + RefPtr form = new HTMLFormElement(formTag, document()); + form->registerFormElement(this); + form->setMethod("GET"); + if (!document()->baseURL().isEmpty()) { + // We treat the href property of the element as the form action, as per section 7.5 + // "Queries and Indexes" of the HTML 2.0 spec. . + form->setAction(document()->baseURL().string()); + } + return form.release(); +} + bool HTMLInputElement::isURLAttribute(Attribute *attr) const { return (attr->name() == srcAttr); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h index 799d92c..0e2da32 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h @@ -256,6 +256,8 @@ private: virtual bool isOptionalFormControl() const { return !isRequiredFormControl(); } virtual bool isRequiredFormControl() const; + PassRefPtr createTemporaryFormForIsIndex(); + #if ENABLE(DATALIST) HTMLDataListElement* dataList() const; #endif diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp index 11ca3ba..729aceb 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp @@ -247,16 +247,12 @@ void HTMLMediaElement::insertedIntoDocument() scheduleLoad(); } -void HTMLMediaElement::willRemove() -{ - if (m_isFullscreen) - exitFullscreen(); - HTMLElement::willRemove(); -} void HTMLMediaElement::removedFromDocument() { if (m_networkState > NETWORK_EMPTY) pause(); + if (m_isFullscreen) + exitFullscreen(); HTMLElement::removedFromDocument(); } @@ -1678,6 +1674,9 @@ void HTMLMediaElement::userCancelledLoad() void HTMLMediaElement::documentWillBecomeInactive() { + if (m_isFullscreen) + exitFullscreen(); + m_inActiveDocument = false; userCancelledLoad(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h index 0005e07..405f013 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h +++ b/src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h @@ -57,7 +57,6 @@ public: virtual bool rendererIsNeeded(RenderStyle*); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); virtual void insertedIntoDocument(); - virtual void willRemove(); virtual void removedFromDocument(); virtual void attach(); virtual void recalcStyle(StyleChange); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLOptionsCollection.idl b/src/3rdparty/webkit/WebCore/html/HTMLOptionsCollection.idl index 5f85fcb..a7e191a 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLOptionsCollection.idl +++ b/src/3rdparty/webkit/WebCore/html/HTMLOptionsCollection.idl @@ -21,7 +21,6 @@ module html { // FIXME: The W3C spec says that HTMLOptionsCollection should not have a parent class. - interface [ GenerateNativeConverter, HasCustomIndexSetter, @@ -36,9 +35,9 @@ module html { raises (DOMException); [Custom] void remove(in unsigned long index); -#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT - Node item(in unsigned long index); - Node namedItem(in DOMString name); +#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C + Node item(in unsigned long index); + Node namedItem(in DOMString name); #endif }; diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp index 33af997..91285d9 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp @@ -416,13 +416,13 @@ HTMLTokenizer::State HTMLTokenizer::parseNonHTMLText(SegmentedString& src, State return state; } - + HTMLTokenizer::State HTMLTokenizer::scriptHandler(State state) { // We are inside a + @@ -44,6 +45,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + @@ -69,7 +72,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - @@ -94,6 +96,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + @@ -110,7 +113,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-
+
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js index 17b02a1..c24d589 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js @@ -143,8 +143,11 @@ var WebInspector = { this.panels.profiles = new WebInspector.ProfilesPanel(); this.panels.profiles.registerProfileType(new WebInspector.CPUProfileType()); } + if (hiddenPanels.indexOf("timeline") === -1 && hiddenPanels.indexOf("timeline") === -1) + this.panels.timeline = new WebInspector.TimelinePanel(); + if (hiddenPanels.indexOf("storage") === -1 && hiddenPanels.indexOf("databases") === -1) - this.panels.storage = new WebInspector.StoragePanel(); + this.panels.storage = new WebInspector.StoragePanel(); }, _loadPreferences: function() @@ -369,6 +372,7 @@ WebInspector.loaded = function() document.body.addStyleClass("platform-" + platform); this._loadPreferences(); + this.pendingDispatches = 0; this.drawer = new WebInspector.Drawer(); this.console = new WebInspector.ConsoleView(this.drawer); @@ -379,13 +383,13 @@ WebInspector.loaded = function() this.domAgent = new WebInspector.DOMAgent(); this.resourceCategories = { - documents: new WebInspector.ResourceCategory(WebInspector.UIString("Documents"), "documents"), - stylesheets: new WebInspector.ResourceCategory(WebInspector.UIString("Stylesheets"), "stylesheets"), - images: new WebInspector.ResourceCategory(WebInspector.UIString("Images"), "images"), - scripts: new WebInspector.ResourceCategory(WebInspector.UIString("Scripts"), "scripts"), - xhr: new WebInspector.ResourceCategory(WebInspector.UIString("XHR"), "xhr"), - fonts: new WebInspector.ResourceCategory(WebInspector.UIString("Fonts"), "fonts"), - other: new WebInspector.ResourceCategory(WebInspector.UIString("Other"), "other") + documents: new WebInspector.ResourceCategory("documents", WebInspector.UIString("Documents"), "rgb(47,102,236)"), + stylesheets: new WebInspector.ResourceCategory("stylesheets", WebInspector.UIString("Stylesheets"), "rgb(157,231,119)"), + images: new WebInspector.ResourceCategory("images", WebInspector.UIString("Images"), "rgb(164,60,255)"), + scripts: new WebInspector.ResourceCategory("scripts", WebInspector.UIString("Scripts"), "rgb(255,121,0)"), + xhr: new WebInspector.ResourceCategory("xhr", WebInspector.UIString("XHR"), "rgb(231,231,10)"), + fonts: new WebInspector.ResourceCategory("fonts", WebInspector.UIString("Fonts"), "rgb(255,82,62)"), + other: new WebInspector.ResourceCategory("other", WebInspector.UIString("Other"), "rgb(186,186,186)") }; this.panels = {}; @@ -456,8 +460,6 @@ WebInspector.loaded = function() // this._updateErrorAndWarningCounts(); var searchField = document.getElementById("search"); - searchField.addEventListener("keydown", this.searchKeyDown.bind(this), false); - searchField.addEventListener("keyup", this.searchKeyUp.bind(this), false); searchField.addEventListener("search", this.performSearch.bind(this), false); // when the search is emptied toolbarElement.addEventListener("mousedown", this.toolbarDragStart, true); @@ -494,7 +496,9 @@ WebInspector.dispatch = function() { function delayDispatch() { WebInspector[methodName].apply(WebInspector, parameters); + WebInspector.pendingDispatches--; } + WebInspector.pendingDispatches++; setTimeout(delayDispatch, 0); } @@ -511,13 +515,19 @@ WebInspector.windowResize = function(event) WebInspector.windowFocused = function(event) { - if (event.target.nodeType === Node.DOCUMENT_NODE) + // Fires after blur, so when focusing on either the main inspector + // or an