diff options
author | Alexis Menard <alexis.menard@trolltech.com> | 2011-06-20 14:12:23 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@trolltech.com> | 2011-06-20 14:12:23 (GMT) |
commit | 20ec7b41ac600fe670c3c8e6305cc12b10440c30 (patch) | |
tree | 281ac97e64bddd0a9a4c3492ec643a34af73ed7f | |
parent | fbdd5d5ad67535a47aa1ef3c08fdb6bb7a755671 (diff) | |
download | Qt-20ec7b41ac600fe670c3c8e6305cc12b10440c30.zip Qt-20ec7b41ac600fe670c3c8e6305cc12b10440c30.tar.gz Qt-20ec7b41ac600fe670c3c8e6305cc12b10440c30.tar.bz2 |
Updated WebKit to 0de6fbe7d7714e4d2520f84a7d7e0c5ed9a55114
61 files changed, 1556 insertions, 1682 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 83f3aac..df6e857 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -cbc99535043a2abc98d6701943595f52fbaf5b19 +0de6fbe7d7714e4d2520f84a7d7e0c5ed9a55114 diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index 1453e64..d09494e 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,15 @@ +2011-06-07 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Fix Symbian build with RVCT 2.x + https://bugs.webkit.org/show_bug.cgi?id=62205 + + RVCT 2.x doesn't support (or need) the --signed_bitfields command-line + option, so restrict it to version 4.x of the compiler. + + * Source/WebKit.pri: + 2011-06-03 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Benjamin Poulain. diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/COPYING.LIB b/src/3rdparty/webkit/Source/JavaScriptCore/COPYING.LIB deleted file mode 100644 index 87c4a33..0000000 --- a/src/3rdparty/webkit/Source/JavaScriptCore/COPYING.LIB +++ /dev/null @@ -1,488 +0,0 @@ - - -NOTE! The LGPL below is copyrighted by the Free Software Foundation, but -the instance of code that it refers to (the kde libraries) are copyrighted -by the authors who actually wrote it. - ---------------------------------------------------------------------------- - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor - Boston, MA 02110-1301, USA. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog index 7ec90f2..fbd4469 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,70 @@ +2011-06-09 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 62405 - Fix integer overflow in Array.prototype.push + + Fix geoff's review comments re static_cast. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncPush): + +2011-06-09 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 62405 - Fix integer overflow in Array.prototype.push + + There are three integer overflows here, leading to safe (not a security risk) + but incorrect (non-spec-compliant) behaviour. + + Two overflows occur when calculating the new length after pushing (one in the + fast version of push in JSArray, one in the generic version in ArrayPrototype). + The other occurs calculating indices to write to when multiple items are pushed. + + These errors result in three test-262 failures. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncPush): + * runtime/JSArray.cpp: + (JSC::JSArray::put): + (JSC::JSArray::push): + +2011-06-08 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> + + Reviewed by Andreas Kling. + + Webkit on SPARC Solaris has wrong endian + https://bugs.webkit.org/show_bug.cgi?id=29407 + + Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but + there are more ocurrences of the same code pattern in webkit. + + This patch includes the check on these other parts of the code. + + This is a speculative fix, I don't have a sparc machine to test and + don't know which kind of test would trigger a crash (but it's quite + obvious that it's the same code duplicated in different files). + + * runtime/UString.h: + (JSC::UStringHash::equal): + * wtf/text/StringHash.h: + (WTF::StringHash::equal): + +2011-06-08 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Build fix for building QtWebKit inside of Qt. + https://bugs.webkit.org/show_bug.cgi?id=62280 + + Remove CONFIG=staticlib, because it causes the configure script to add -ljavascriptcore + into QtWebKit.prl. + + No new tests, as this is just a build fix. + + * JavaScriptCore.pri: + 2011-06-03 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Benjamin Poulain. diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri index ed4cf2e..f6d064f 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri @@ -99,6 +99,7 @@ defineTest(prependJavaScriptCoreLib) { # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit and QtScript # statically in applications (which isn't used often because, among other things, of licensing obstacles). CONFIG -= explicitlib + CONFIG -= staticlib export(QMAKE_LIBDIR) export(LIBS) diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/ArrayPrototype.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/ArrayPrototype.cpp index 29caece..ef5f00e 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/ArrayPrototype.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/ArrayPrototype.cpp @@ -401,11 +401,19 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncPush(ExecState* exec) if (exec->hadException()) return JSValue::encode(jsUndefined()); - for (unsigned n = 0; n < exec->argumentCount(); n++) - thisObj->put(exec, length + n, exec->argument(n)); - length += exec->argumentCount(); - putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(length)); - return JSValue::encode(jsNumber(length)); + for (unsigned n = 0; n < exec->argumentCount(); n++) { + // Check for integer overflow; where safe we can do a fast put by index. + if (length + n >= length) + thisObj->put(exec, length + n, exec->argument(n)); + else { + PutPropertySlot slot; + Identifier propertyName(exec, JSValue(static_cast<int64_t>(length) + static_cast<int64_t>(n)).toString(exec)); + thisObj->put(exec, propertyName, exec->argument(n), slot); + } + } + JSValue newLength(static_cast<int64_t>(length) + static_cast<int64_t>(exec->argumentCount())); + putProperty(exec, thisObj, exec->propertyNames().length, newLength); + return JSValue::encode(newLength); } EncodedJSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState* exec) diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSArray.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSArray.cpp index b0ae89a..ff4ce75 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSArray.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSArray.cpp @@ -330,7 +330,7 @@ void JSArray::put(ExecState* exec, const Identifier& propertyName, JSValue value if (propertyName == exec->propertyNames().length) { unsigned newLength = value.toUInt32(exec); if (value.toNumber(exec) != static_cast<double>(newLength)) { - throwError(exec, createRangeError(exec, "Invalid array length.")); + throwError(exec, createRangeError(exec, "Invalid array length")); return; } setLength(newLength); @@ -736,6 +736,12 @@ void JSArray::push(ExecState* exec, JSValue value) ArrayStorage* storage = m_storage; + if (UNLIKELY(storage->m_length == 0xFFFFFFFFu)) { + put(exec, storage->m_length, value); + throwError(exec, createRangeError(exec, "Invalid array length")); + return; + } + if (storage->m_length < m_vectorLength) { storage->m_vector[storage->m_length].set(exec->globalData(), this, value); ++storage->m_numValuesInVector; diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h index b98e7b4..2d76809 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h @@ -202,7 +202,7 @@ struct UStringHash { // FIXME: perhaps we should have a more abstract macro that indicates when // going 4 bytes at a time is unsafe -#if CPU(ARM) || CPU(SH4) || CPU(MIPS) +#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC) const UChar* aChars = a->characters(); const UChar* bChars = b->characters(); for (unsigned i = 0; i != aLength; ++i) { diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringHash.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringHash.h index c47c1d8..4637c3d 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringHash.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringHash.h @@ -55,7 +55,7 @@ namespace WTF { // FIXME: perhaps we should have a more abstract macro that indicates when // going 4 bytes at a time is unsafe -#if CPU(ARM) || CPU(SH4) || CPU(MIPS) +#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC) const UChar* aChars = a->characters(); const UChar* bChars = b->characters(); for (unsigned i = 0; i != aLength; ++i) { diff --git a/src/3rdparty/webkit/Source/WebCore/ChangeLog b/src/3rdparty/webkit/Source/WebCore/ChangeLog index 419d10e..b27d3aa 100644 --- a/src/3rdparty/webkit/Source/WebCore/ChangeLog +++ b/src/3rdparty/webkit/Source/WebCore/ChangeLog @@ -1,3 +1,334 @@ +2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r88796. + http://trac.webkit.org/changeset/88796 + https://bugs.webkit.org/show_bug.cgi?id=62790 + + It made fast/dom/nodesFromRect-basic.html time out on Qt, + 64-bit, debug mode (Requested by Ossy on #webkit). + + * bridge/qt/qt_runtime.cpp: + (JSC::Bindings::convertValueToQVariant): + +2011-06-13 Jeffrey Pfau <jpfau@apple.com> + + Reviewed by Darin Adler. + + Crash in WebCore::RenderMathMLUnderOver::layout() + https://bugs.webkit.org/show_bug.cgi?id=57900 + + Add more null checks so that removing children in MathML elements does not cause crashes. + Note that this only half fixes the third repro in the Bugzilla bug, as another bug will + still crash that repro. + + Test: mathml/munderover-remove-children.html + + * rendering/mathml/RenderMathMLSubSup.cpp: + (WebCore::RenderMathMLSubSup::stretchToHeight): + * rendering/mathml/RenderMathMLUnderOver.cpp: + (WebCore::RenderMathMLUnderOver::layout): + (WebCore::RenderMathMLUnderOver::nonOperatorHeight): + +2011-06-13 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Dan Bernstein. + + REGRESSION (r81518): Crash in makeRange() when invoking the dictionary panel over a file input + https://bugs.webkit.org/show_bug.cgi?id=62544 + + Fixed the crash by adding null pointer checks. + + No new tests since there's no way to open dictionary panel. + + * dom/Position.cpp: + (WebCore::Position::parentAnchoredEquivalent): + * editing/VisiblePosition.cpp: + (WebCore::makeRange): + * page/Frame.cpp: + (WebCore::Frame::rangeForPoint): + +2011-06-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + Reviewed by Andreas Kling. + + [Qt] tst_QWebFrame::overloadedSlots() fails + https://bugs.webkit.org/show_bug.cgi?id=37319 + + Increase the likeness that JSElements are converted to QWebElements. When hinted + with QWebElement metatype, we qualify the conversion from JSElement as a "perfect + match". + + The test was failing because the wrong slot was called, since the QWebElement + match was taken as equal to the others and not chosen when the metacall happened. + + We also remove the implicit conversion between JSDocument (which is not an + element) to QWebElement. The conversion only worked for calling slots, while + without hint it returned a QVariantMap (as can be seen in domCycles test). It was + added for supporting DRT, but since this change we can use it as QVariantMap and + get the value for "documentElement". + + This patch is based on Noam Rosenthal original patch in the same bug. + + * bridge/qt/qt_runtime.cpp: + (JSC::Bindings::hintForRealType): + Extracted function to choose the metatype hint based on the JSValue type. Add + QWebElement metatype as a hint for JSElement objects, this way if no hint is + provided, JSElement objects will always be converted to QWebElements. + + (JSC::Bindings::convertValueToQVariant): + Use previous function. Identify the conversion between JSElement to QWebElement + as a "perfect match" (dist = 0). And remove the implicit conversion when the hint + is QWebElement metatype and we have a JSDocument. Changed from JSHTMLElement to + JSElement to cover the 'documentElement'. + +2011-06-12 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/9513180> REGRESSION (r84166): recalcStyle for display:inline to display:none transition has complexity N^2 where N is the number of child Text nodes + https://bugs.webkit.org/show_bug.cgi?id=61557 + + Replaced the fix for bug 58500 with a refined version. + + * rendering/RenderText.cpp: + (WebCore::RenderText::clippedOverflowRectForRepaint): Use the containing block unless it is + across a layer boundary. + +2011-06-10 Abhishek Arya <inferno@chromium.org> + + Reviewed by Simon Fraser. + + Null parent element sheet pointers in CSSMutableStyleDeclaration consumers + when removed from document, set them when reinserted into document. + https://bugs.webkit.org/show_bug.cgi?id=62230 + + When a HTMLBodyElement, StyledElement are removed from document, + we didn't clear out the parent pointers from their link, style declarations. + These parent pointers pointed to the document's element sheet which will + get removed when document is getting destroyed. It does make sense to + clear out parent pointers when we are getting removed from document and + readd them when we get inserted again. + + Tests: fast/dom/body-link-decl-parent-crash.html + fast/dom/styled-inline-style-decl-parent-crash.html + + * dom/StyledElement.cpp: + (WebCore::StyledElement::insertedIntoDocument): + (WebCore::StyledElement::removedFromDocument): + * dom/StyledElement.h: + * html/HTMLBodyElement.cpp: + (WebCore::HTMLBodyElement::parseMappedAttribute): + (WebCore::HTMLBodyElement::insertedIntoDocument): + (WebCore::HTMLBodyElement::removedFromDocument): + (WebCore::HTMLBodyElement::didMoveToNewOwnerDocument): + * html/HTMLBodyElement.h: + +2011-06-10 James Simonsen <simonjam@chromium.org> + + Reviewed by Tony Gentilcore. + + Don't execute scripts in shadow SVG. + https://bugs.webkit.org/show_bug.cgi?id=62225 + + Test: svg/dom/use-style-recalc-script-execute-crash.html + + * dom/ScriptElement.cpp: + (WebCore::ScriptElement::prepareScript): + +2011-06-09 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + Calling WebKitBlobBuilder.append with null argument should not crash + https://bugs.webkit.org/show_bug.cgi?id=62419 + + Test: fast/files/blob-builder-crash.html + + * fileapi/WebKitBlobBuilder.cpp: + (WebCore::WebKitBlobBuilder::append): + +2011-06-09 Julien Chaffraix <jchaffraix@codeaurora.org> + + Reviewed by Antti Koivisto. + + REGRESSION(84329): Stylesheets on some pages do not load + https://bugs.webkit.org/show_bug.cgi?id=61400 + + Test: fast/css/link-disabled-attr.html + + Fixed r84329: the change did not take into account the fact + that HTMLLinkElement did already contain the disabled information + and the 2 information were not linked as they should have! + + The new logic pushes the information to the stylesheet as this + is what the spec mandates and what FF is doing. Also it keeps + one bit of information (that JS enabled the stylesheet) as it + is needed for the recalcStyleSelector logic. + + * dom/Document.cpp: + (WebCore::Document::recalcStyleSelector): s/isDisabled/disabled. + + * html/HTMLLinkElement.cpp: + (WebCore::HTMLLinkElement::HTMLLinkElement): Removed m_disabledState, + replaced by m_isEnabledViaScript. + (WebCore::HTMLLinkElement::setDisabled): Updated the logic after + m_disabledState removal. It also matches the spec by forwarding + the disabled state to our stylesheet if we have one. + (WebCore::HTMLLinkElement::parseMappedAttribute): Removed harmful + handling of the disabledAttr. + (WebCore::HTMLLinkElement::process): Updated after m_disabledState removal. + * html/HTMLLinkElement.h: + (WebCore::HTMLLinkElement::isEnabledViaScript): Ditto. + (WebCore::HTMLLinkElement::isAlternate): Ditto. + +2011-06-09 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Darin Adler. + + Crashes in RenderLayerBacking::paintingGoesToWindow + https://bugs.webkit.org/show_bug.cgi?id=61159 + + Speculative fix for unreproducible crash that can occur when RenderObject::repaintUsingContainer() + finds a repaintContainer that is not the RenderView, but that is also not + composited (for unknown reasons), by checking to see if the layer is + compositing before using backing(). An assertion remains to try to catch + this in debug builds. + + * rendering/RenderLayer.cpp: + (WebCore::RenderLayer::setBackingNeedsRepaintInRect): + +2011-06-09 Julien Chaffraix <jchaffraix@webkit.org> + + Reviewed by Darin Adler. + + WebCore::WebKitCSSKeyframesRuleInternal::nameAttrSetter() - crash + https://bugs.webkit.org/show_bug.cgi?id=62384 + + Test: fast/css/webkit-keyframes-crash.html + + * css/WebKitCSSKeyframesRule.cpp: + (WebCore::WebKitCSSKeyframesRule::setName): stylesheet() is never garanteed + to return a non-null pointer. Thus null-check here like the rest of the code. + +2011-06-08 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + constructTreeFromToken can re-enter parser, causing ASSERTs + https://bugs.webkit.org/show_bug.cgi?id=62160 + + This patch clears the HTMLToken before constructing the tree from the + token, putting the HTMLDocumentParser in a good state to be re-entered. + + Tests: fast/parser/document-write-onload-nesting.html + fast/parser/document-write-onload-ordering.html + + * html/parser/HTMLDocumentParser.cpp: + (WebCore::HTMLDocumentParser::pumpTokenizer): + * html/parser/HTMLToken.h: + (WebCore::HTMLToken::isUninitialized): + * html/parser/HTMLTreeBuilder.cpp: + (WebCore::HTMLTreeBuilder::constructTreeFromToken): + +2011-06-08 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Build fix for building QtWebKit inside of Qt. + https://bugs.webkit.org/show_bug.cgi?id=62280 + + Remove CONFIG=staticlib, because it causes the configure script to add -lwebcore + into QtWebKit.prl. + + No new tests, as this is just a build fix. + + * WebCore.pri: + +2011-06-08 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Laszlo Gombos. + + [Symbian] Float{32,64}Array and Int16Array fail to build. + https://bugs.webkit.org/show_bug.cgi?id=62219 + + For some reason, RVCT 2.x is moaning about "class member designated by + a using-declaration must be visible in a direct base class". + Apply same fix as r69122 and r76592. + + * html/canvas/Float32Array.h: + (WebCore::Float32Array::set): + * html/canvas/Float64Array.h: + (WebCore::Float64Array::set): + * html/canvas/Int16Array.h: + (WebCore::Int16Array::set): + +2011-06-07 Yi Shen <yi.4.shen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix the error code for media resource failures when using QtMobility + https://bugs.webkit.org/show_bug.cgi?id=55901 + + To indicate the media resource failures, set the network state to + MediaPlayer::FormatError when receives QMediaPlayer::InvalidMedia or + QMediaPlayer::ResourceError. + + * platform/graphics/qt/MediaPlayerPrivateQt.cpp: + (WebCore::MediaPlayerPrivateQt::updateStates): + +2011-06-05 Igor Oliveira <igor.oliveira@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + fast/viewport/viewport-45.html fails in GTK+/Qt + https://bugs.webkit.org/show_bug.cgi?id=47481 + + computeViewportAttributes does many math operations with float point arithmetic + and in some cases there is loss of precision making tests have incorrect values. + + * dom/ViewportArguments.cpp: + (WebCore::computeViewportAttributes): + +2011-06-04 Abhishek Arya <inferno@chromium.org> + + Reviewed by Kent Tamura. + + Add some asserts for array boundary checks in TextRun. Fix + an integer issue in linux text controller code. + https://bugs.webkit.org/show_bug.cgi?id=62085 + + Testing ComplexTextControllerLinux change requires a testcase + > 32 kb which is not feasible. All other changes are tested by + existing layouttests. + + * platform/graphics/TextRun.h: + (WebCore::TextRun::operator[]): add assert. + (WebCore::TextRun::data): add assert. + * platform/graphics/WidthIterator.cpp: + (WebCore::WidthIterator::advance): bail early and prevent access + to one byte across the text run boundary. + * platform/graphics/chromium/ComplexTextControllerLinux.cpp: + (WebCore::ComplexTextController::getNormalizedTextRun): wrong + int16 vs int comparison. + * rendering/svg/SVGTextRunRenderingContext.cpp: + (WebCore::SVGTextRunWalker::walk): bail early when from and to + is outside the text run boundary. this hit easily after adding + the assert when from = to = end and read in run.data(from). + +2011-06-04 Jeffrey Pfau <jpfau@apple.com> + + Reviewed by Beth Dakin. + + Crash in WebCore::RenderMathMLSubSup::baselinePosition() + https://bugs.webkit.org/show_bug.cgi?id=57897 + + Simple patch adding NULL checks in each function. + Test: mathml/msubsup-remove-children.xhtml + + * rendering/mathml/RenderMathMLSubSup.cpp: + (WebCore::RenderMathMLSubSup::stretchToHeight): + (WebCore::RenderMathMLSubSup::baselinePosition): + 2011-06-03 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Andreas Kling. diff --git a/src/3rdparty/webkit/Source/WebCore/WebCore.pri b/src/3rdparty/webkit/Source/WebCore/WebCore.pri index 85ca1d5..4f5d723 100644 --- a/src/3rdparty/webkit/Source/WebCore/WebCore.pri +++ b/src/3rdparty/webkit/Source/WebCore/WebCore.pri @@ -369,6 +369,7 @@ defineTest(prependWebCoreLib) { } CONFIG -= explicitlib + CONFIG -= staticlib export(QMAKE_LIBDIR) export(POST_TARGETDEPS) export(CONFIG) diff --git a/src/3rdparty/webkit/Source/WebCore/WebCore.pro b/src/3rdparty/webkit/Source/WebCore/WebCore.pro index 83c1702..03cdf4e 100644 --- a/src/3rdparty/webkit/Source/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/Source/WebCore/WebCore.pro @@ -2613,15 +2613,6 @@ contains(DEFINES, ENABLE_SQLITE=1) { # Build sqlite3 into WebCore from source # somewhat copied from $$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite/sqlite.pro SOURCES += $${SQLITE3SRCDIR}/sqlite3.c - } else { - # Use sqlite3 from the underlying OS - CONFIG(QTDIR_build) { - QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE - LIBS *= $$QT_LFLAGS_SQLITE - } else { - INCLUDEPATH += $${SQLITE3SRCDIR} - LIBS += -lsqlite3 - } } SOURCES += \ diff --git a/src/3rdparty/webkit/Source/WebCore/css/WebKitCSSKeyframesRule.cpp b/src/3rdparty/webkit/Source/WebCore/css/WebKitCSSKeyframesRule.cpp index 3b41f43..497bd19 100644 --- a/src/3rdparty/webkit/Source/WebCore/css/WebKitCSSKeyframesRule.cpp +++ b/src/3rdparty/webkit/Source/WebCore/css/WebKitCSSKeyframesRule.cpp @@ -66,7 +66,8 @@ void WebKitCSSKeyframesRule::setName(const String& name) // Since the name is used in the keyframe map list in CSSStyleSelector, we need // to recompute the style sheet to get the updated name. - stylesheet()->styleSheetChanged(); + if (stylesheet()) + stylesheet()->styleSheetChanged(); } unsigned WebKitCSSKeyframesRule::length() const diff --git a/src/3rdparty/webkit/Source/WebCore/dom/Document.cpp b/src/3rdparty/webkit/Source/WebCore/dom/Document.cpp index 4d6220d..1c231ce 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/Document.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/Document.cpp @@ -3037,7 +3037,7 @@ void Document::recalcStyleSelector() if (e->hasLocalName(linkTag)) { // <LINK> element HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(n); - if (linkElement->isDisabled()) + if (linkElement->disabled()) continue; enabledViaScript = linkElement->isEnabledViaScript(); if (linkElement->isLoading()) { diff --git a/src/3rdparty/webkit/Source/WebCore/dom/Position.cpp b/src/3rdparty/webkit/Source/WebCore/dom/Position.cpp index 1b58a42..ab6bce4 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/Position.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/Position.cpp @@ -169,7 +169,8 @@ Position Position::parentAnchoredEquivalent() const return firstPositionInOrBeforeNode(m_anchorNode.get()); } if (!m_anchorNode->offsetInCharacters() && (m_anchorType == PositionIsAfterAnchor || static_cast<unsigned>(m_offset) == m_anchorNode->childNodeCount()) - && (editingIgnoresContent(m_anchorNode.get()) || isTableElement(m_anchorNode.get()))) { + && (editingIgnoresContent(m_anchorNode.get()) || isTableElement(m_anchorNode.get())) + && containerNode()) { return positionInParentAfterNode(m_anchorNode.get()); } diff --git a/src/3rdparty/webkit/Source/WebCore/dom/ScriptElement.cpp b/src/3rdparty/webkit/Source/WebCore/dom/ScriptElement.cpp index f29c42d..fab2461 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/ScriptElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/ScriptElement.cpp @@ -202,6 +202,14 @@ bool ScriptElement::prepareScript(const TextPosition1& scriptStartPosition, Lega if (!m_element->document()->frame()->script()->canExecuteScripts(AboutToExecuteScript)) return false; + // FIXME: This is non-standard. Remove this after https://bugs.webkit.org/show_bug.cgi?id=62412. + Node* ancestor = m_element->parentNode(); + while (ancestor) { + if (ancestor->isSVGShadowRoot()) + return false; + ancestor = ancestor->parentNode(); + } + if (!isScriptForEventSupported()) return false; diff --git a/src/3rdparty/webkit/Source/WebCore/dom/StyledElement.cpp b/src/3rdparty/webkit/Source/WebCore/dom/StyledElement.cpp index b45ff9f..bd9543d 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/StyledElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/StyledElement.cpp @@ -439,6 +439,21 @@ void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const style->addSubresourceStyleURLs(urls); } +void StyledElement::insertedIntoDocument() +{ + Element::insertedIntoDocument(); + + if (m_inlineStyleDecl) + m_inlineStyleDecl->setParent(document()->elementSheet()); +} + +void StyledElement::removedFromDocument() +{ + if (m_inlineStyleDecl) + m_inlineStyleDecl->setParent(0); + + Element::removedFromDocument(); +} void StyledElement::didMoveToNewOwnerDocument() { diff --git a/src/3rdparty/webkit/Source/WebCore/dom/StyledElement.h b/src/3rdparty/webkit/Source/WebCore/dom/StyledElement.h index 32fc4c2..5bf3ed1 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/StyledElement.h +++ b/src/3rdparty/webkit/Source/WebCore/dom/StyledElement.h @@ -84,6 +84,8 @@ protected: // svgAttributeChanged (called when element.className.baseValue is set) void classAttributeChanged(const AtomicString& newClassString); + virtual void insertedIntoDocument(); + virtual void removedFromDocument(); virtual void didMoveToNewOwnerDocument(); private: diff --git a/src/3rdparty/webkit/Source/WebCore/dom/ViewportArguments.cpp b/src/3rdparty/webkit/Source/WebCore/dom/ViewportArguments.cpp index 49c94d7..71f1682 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/ViewportArguments.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/ViewportArguments.cpp @@ -164,8 +164,8 @@ ViewportAttributes computeViewportAttributes(ViewportArguments args, int desktop // Extend width and height to fill the visual viewport for the resolved initial-scale. width = max(width, availableWidth / result.initialScale); height = max(height, availableHeight / result.initialScale); - result.layoutSize.setWidth(width); - result.layoutSize.setHeight(height); + result.layoutSize.setWidth(static_cast<int>(roundf(width))); + result.layoutSize.setHeight(static_cast<int>(roundf(height))); // Update minimum scale factor, to never allow zooming out more than viewport result.minimumScale = max(result.minimumScale, max(availableWidth / width, availableHeight / height)); diff --git a/src/3rdparty/webkit/Source/WebCore/editing/VisiblePosition.cpp b/src/3rdparty/webkit/Source/WebCore/editing/VisiblePosition.cpp index cfaec47..8a37da5 100644 --- a/src/3rdparty/webkit/Source/WebCore/editing/VisiblePosition.cpp +++ b/src/3rdparty/webkit/Source/WebCore/editing/VisiblePosition.cpp @@ -632,6 +632,9 @@ PassRefPtr<Range> makeRange(const VisiblePosition &start, const VisiblePosition Position s = start.deepEquivalent().parentAnchoredEquivalent(); Position e = end.deepEquivalent().parentAnchoredEquivalent(); + if (s.isNull() || e.isNull()) + return 0; + return Range::create(s.containerNode()->document(), s.containerNode(), s.offsetInContainerNode(), e.containerNode(), e.offsetInContainerNode()); } diff --git a/src/3rdparty/webkit/Source/WebCore/fileapi/WebKitBlobBuilder.cpp b/src/3rdparty/webkit/Source/WebCore/fileapi/WebKitBlobBuilder.cpp index 2f40db7..0671e05 100644 --- a/src/3rdparty/webkit/Source/WebCore/fileapi/WebKitBlobBuilder.cpp +++ b/src/3rdparty/webkit/Source/WebCore/fileapi/WebKitBlobBuilder.cpp @@ -88,6 +88,8 @@ void WebKitBlobBuilder::append(const String& text, ExceptionCode& ec) #if ENABLE(BLOB) void WebKitBlobBuilder::append(ArrayBuffer* arrayBuffer) { + if (!arrayBuffer) + return; Vector<char>& buffer = getBuffer(); size_t oldSize = buffer.size(); buffer.append(static_cast<const char*>(arrayBuffer->data()), arrayBuffer->byteLength()); @@ -97,6 +99,8 @@ void WebKitBlobBuilder::append(ArrayBuffer* arrayBuffer) void WebKitBlobBuilder::append(Blob* blob) { + if (!blob) + return; if (blob->isFile()) { // If the blob is file that is not snapshoted, capture the snapshot now. // FIXME: This involves synchronous file operation. We need to figure out how to make it asynchronous. diff --git a/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.cpp b/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.cpp index fc43fcd..a57ff6b 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.cpp @@ -1,22 +1,24 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program 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 General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -27,7 +29,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -45,7 +47,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.3" +#define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -53,109 +55,17 @@ /* Pure parsers. */ #define YYPURE 1 -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ -#define yyparse cssyyparse -#define yylex cssyylex -#define yyerror cssyyerror -#define yylval cssyylval -#define yychar cssyychar -#define yydebug cssyydebug -#define yynerrs cssyynerrs - - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 1 "../Source/WebCore/css/CSSGrammar.y" - - -/* - * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) - * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. - * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) - * Copyright (C) 2008 Eric Seidel <eric@webkit.org> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "config.h" - -#include "CSSMediaRule.h" -#include "CSSParser.h" -#include "CSSPrimitiveValue.h" -#include "CSSPropertyNames.h" -#include "CSSRuleList.h" -#include "CSSSelector.h" -#include "CSSStyleSheet.h" -#include "Document.h" -#include "HTMLNames.h" -#include "MediaList.h" -#include "MediaQueryExp.h" -#include "WebKitCSSKeyframeRule.h" -#include "WebKitCSSKeyframesRule.h" -#include <wtf/FastMalloc.h> -#include <stdlib.h> -#include <string.h> - -using namespace WebCore; -using namespace HTMLNames; - -#define YYMALLOC fastMalloc -#define YYFREE fastFree - -#define YYENABLE_NLS 0 -#define YYLTYPE_IS_TRIVIAL 1 -#define YYMAXDEPTH 10000 -#define YYDEBUG 0 - -// FIXME: Replace with %parse-param { CSSParser* parser } once we can depend on bison 2.x -#define YYPARSE_PARAM parser -#define YYLEX_PARAM parser - - - -/* Line 189 of yacc.c */ -#line 141 "/Source/WebCore/generated/CSSGrammar.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif +#define yyparse cssyyparse +#define yylex cssyylex +#define yyerror cssyyerror +#define yylval cssyylval +#define yychar cssyychar +#define yydebug cssyydebug +#define yynerrs cssyynerrs /* Tokens. */ @@ -246,16 +156,175 @@ using namespace HTMLNames; UNICODERANGE = 336 }; #endif +/* Tokens. */ +#define TOKEN_EOF 0 +#define LOWEST_PREC 258 +#define UNIMPORTANT_TOK 259 +#define WHITESPACE 260 +#define SGML_CD 261 +#define INCLUDES 262 +#define DASHMATCH 263 +#define BEGINSWITH 264 +#define ENDSWITH 265 +#define CONTAINS 266 +#define STRING 267 +#define IDENT 268 +#define NTH 269 +#define HEX 270 +#define IDSEL 271 +#define IMPORT_SYM 272 +#define PAGE_SYM 273 +#define MEDIA_SYM 274 +#define FONT_FACE_SYM 275 +#define CHARSET_SYM 276 +#define NAMESPACE_SYM 277 +#define WEBKIT_RULE_SYM 278 +#define WEBKIT_DECLS_SYM 279 +#define WEBKIT_KEYFRAME_RULE_SYM 280 +#define WEBKIT_KEYFRAMES_SYM 281 +#define WEBKIT_VALUE_SYM 282 +#define WEBKIT_MEDIAQUERY_SYM 283 +#define WEBKIT_SELECTOR_SYM 284 +#define TOPLEFTCORNER_SYM 285 +#define TOPLEFT_SYM 286 +#define TOPCENTER_SYM 287 +#define TOPRIGHT_SYM 288 +#define TOPRIGHTCORNER_SYM 289 +#define BOTTOMLEFTCORNER_SYM 290 +#define BOTTOMLEFT_SYM 291 +#define BOTTOMCENTER_SYM 292 +#define BOTTOMRIGHT_SYM 293 +#define BOTTOMRIGHTCORNER_SYM 294 +#define LEFTTOP_SYM 295 +#define LEFTMIDDLE_SYM 296 +#define LEFTBOTTOM_SYM 297 +#define RIGHTTOP_SYM 298 +#define RIGHTMIDDLE_SYM 299 +#define RIGHTBOTTOM_SYM 300 +#define ATKEYWORD 301 +#define IMPORTANT_SYM 302 +#define MEDIA_ONLY 303 +#define MEDIA_NOT 304 +#define MEDIA_AND 305 +#define REMS 306 +#define QEMS 307 +#define EMS 308 +#define EXS 309 +#define PXS 310 +#define CMS 311 +#define MMS 312 +#define INS 313 +#define PTS 314 +#define PCS 315 +#define DEGS 316 +#define RADS 317 +#define GRADS 318 +#define TURNS 319 +#define MSECS 320 +#define SECS 321 +#define HERTZ 322 +#define KHERTZ 323 +#define DIMEN 324 +#define INVALIDDIMEN 325 +#define PERCENTAGE 326 +#define FLOATTOKEN 327 +#define INTEGER 328 +#define URI 329 +#define FUNCTION 330 +#define ANYFUNCTION 331 +#define NOTFUNCTION 332 +#define CALCFUNCTION 333 +#define MINFUNCTION 334 +#define MAXFUNCTION 335 +#define UNICODERANGE 336 + + + + +/* Copy the first part of user declarations. */ +#line 1 "../Source/WebCore/css/CSSGrammar.y" +/* + * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) + * Copyright (C) 2008 Eric Seidel <eric@webkit.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "config.h" + +#include "CSSMediaRule.h" +#include "CSSParser.h" +#include "CSSPrimitiveValue.h" +#include "CSSPropertyNames.h" +#include "CSSRuleList.h" +#include "CSSSelector.h" +#include "CSSStyleSheet.h" +#include "Document.h" +#include "HTMLNames.h" +#include "MediaList.h" +#include "MediaQueryExp.h" +#include "WebKitCSSKeyframeRule.h" +#include "WebKitCSSKeyframesRule.h" +#include <wtf/FastMalloc.h> +#include <stdlib.h> +#include <string.h> + +using namespace WebCore; +using namespace HTMLNames; + +#define YYMALLOC fastMalloc +#define YYFREE fastFree + +#define YYENABLE_NLS 0 +#define YYLTYPE_IS_TRIVIAL 1 +#define YYMAXDEPTH 10000 +#define YYDEBUG 0 + +// FIXME: Replace with %parse-param { CSSParser* parser } once we can depend on bison 2.x +#define YYPARSE_PARAM parser +#define YYLEX_PARAM parser + + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ #line 63 "../Source/WebCore/css/CSSGrammar.y" - +{ bool boolean; char character; int integer; @@ -278,21 +347,18 @@ typedef union YYSTYPE WebKitCSSKeyframeRule* keyframeRule; WebKitCSSKeyframesRule* keyframesRule; float val; - - - -/* Line 214 of yacc.c */ -#line 286 "/Source/WebCore/generated/CSSGrammar.tab.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 +} +/* Line 193 of yacc.c. */ +#line 353 "/Source/WebCore/generated/CSSGrammar.tab.c" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif -/* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ +/* Copy the second part of user declarations. */ #line 88 "../Source/WebCore/css/CSSGrammar.y" @@ -308,8 +374,8 @@ static int cssyylex(YYSTYPE* yylval, void* parser) -/* Line 264 of yacc.c */ -#line 313 "/Source/WebCore/generated/CSSGrammar.tab.c" +/* Line 216 of yacc.c. */ +#line 379 "/Source/WebCore/generated/CSSGrammar.tab.c" #ifdef short # undef short @@ -384,14 +450,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int yyi) +YYID (int i) #else static int -YYID (yyi) - int yyi; +YYID (i) + int i; #endif { - return yyi; + return i; } #endif @@ -472,9 +538,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; + yytype_int16 yyss; + YYSTYPE yyvs; + }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -508,12 +574,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -790,7 +856,7 @@ static const char *const yytname[] = "maybe_media_restrictor", "media_query", "maybe_media_list", "media_list", "media", "medium", "keyframes", "keyframe_name", "keyframes_rule", "keyframe_rule", "key_list", "key", "page", - "page_selector", "declarations_and_margins", "margin_box", "$@1", + "page_selector", "declarations_and_margins", "margin_box", "@1", "margin_sym", "font_face", "combinator", "maybe_unary_operator", "unary_operator", "maybe_space_before_declaration", "before_ruleset", "before_rule_opening_brace", "ruleset", "selector_list", @@ -1471,18 +1537,9 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ + Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -1650,20 +1707,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -1697,11 +1751,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF (stderr, " $%d = ", yyi + 1); + fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - YYFPRINTF (stderr, "\n"); + fprintf (stderr, "\n"); } } @@ -1981,8 +2035,10 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } + /* Prevent warnings from -Wmissing-prototypes. */ + #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -2001,9 +2057,10 @@ int yyparse (); -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ + +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -2027,46 +2084,22 @@ yyparse () #endif #endif { -/* The lookahead symbol. */ + /* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; +/* Number of syntax errors so far. */ +int yynerrs; + int yystate; int yyn; int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; @@ -2074,28 +2107,51 @@ YYSTYPE yylval; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ + yyssp = yyss; yyvsp = yyvs; @@ -2125,6 +2181,7 @@ YYSTYPE yylval; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; + /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -2132,6 +2189,7 @@ YYSTYPE yylval; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); yyss = yyss1; @@ -2154,8 +2212,9 @@ YYSTYPE yylval; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -2166,6 +2225,7 @@ YYSTYPE yylval; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; + YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -2175,9 +2235,6 @@ YYSTYPE yylval; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - YYACCEPT; - goto yybackup; /*-----------. @@ -2186,16 +2243,16 @@ YYSTYPE yylval; yybackup: /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ + look-ahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -2227,16 +2284,20 @@ yybackup: goto yyreduce; } + if (yyn == YYFINAL) + YYACCEPT; + /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the lookahead token. */ + /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token. */ - yychar = YYEMPTY; + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -2276,8 +2337,6 @@ yyreduce: switch (yyn) { case 9: - -/* Line 1464 of yacc.c */ #line 303 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_rule = (yyvsp[(4) - (6)].rule); @@ -2285,8 +2344,6 @@ yyreduce: break; case 10: - -/* Line 1464 of yacc.c */ #line 309 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_keyframe = (yyvsp[(4) - (6)].keyframeRule); @@ -2294,8 +2351,6 @@ yyreduce: break; case 11: - -/* Line 1464 of yacc.c */ #line 315 "../Source/WebCore/css/CSSGrammar.y" { /* can be empty */ @@ -2303,8 +2358,6 @@ yyreduce: break; case 12: - -/* Line 1464 of yacc.c */ #line 321 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2320,8 +2373,6 @@ yyreduce: break; case 13: - -/* Line 1464 of yacc.c */ #line 335 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2330,8 +2381,6 @@ yyreduce: break; case 14: - -/* Line 1464 of yacc.c */ #line 342 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(4) - (5)].selectorList)) { @@ -2343,16 +2392,12 @@ yyreduce: break; case 21: - -/* Line 1464 of yacc.c */ #line 364 "../Source/WebCore/css/CSSGrammar.y" { ;} break; case 24: - -/* Line 1464 of yacc.c */ #line 374 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2363,24 +2408,18 @@ yyreduce: break; case 25: - -/* Line 1464 of yacc.c */ #line 380 "../Source/WebCore/css/CSSGrammar.y" { ;} break; case 26: - -/* Line 1464 of yacc.c */ #line 382 "../Source/WebCore/css/CSSGrammar.y" { ;} break; case 27: - -/* Line 1464 of yacc.c */ #line 387 "../Source/WebCore/css/CSSGrammar.y" { // Ignore any @charset rule not at the beginning of the style sheet. @@ -2389,8 +2428,6 @@ yyreduce: break; case 29: - -/* Line 1464 of yacc.c */ #line 395 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2400,8 +2437,6 @@ yyreduce: break; case 30: - -/* Line 1464 of yacc.c */ #line 403 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = (yyvsp[(2) - (2)].rule); @@ -2409,8 +2444,6 @@ yyreduce: break; case 37: - -/* Line 1464 of yacc.c */ #line 415 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_hadSyntacticallyValidCSSRule = true; @@ -2418,15 +2451,11 @@ yyreduce: break; case 41: - -/* Line 1464 of yacc.c */ #line 424 "../Source/WebCore/css/CSSGrammar.y" { (yyval.ruleList) = 0; ;} break; case 42: - -/* Line 1464 of yacc.c */ #line 425 "../Source/WebCore/css/CSSGrammar.y" { (yyval.ruleList) = (yyvsp[(1) - (3)].ruleList); @@ -2439,8 +2468,6 @@ yyreduce: break; case 53: - -/* Line 1464 of yacc.c */ #line 453 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createImportRule((yyvsp[(3) - (6)].string), (yyvsp[(5) - (6)].mediaList)); @@ -2448,8 +2475,6 @@ yyreduce: break; case 54: - -/* Line 1464 of yacc.c */ #line 456 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2457,8 +2482,6 @@ yyreduce: break; case 55: - -/* Line 1464 of yacc.c */ #line 459 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2466,8 +2489,6 @@ yyreduce: break; case 56: - -/* Line 1464 of yacc.c */ #line 462 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2475,8 +2496,6 @@ yyreduce: break; case 57: - -/* Line 1464 of yacc.c */ #line 468 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->addNamespace((yyvsp[(3) - (6)].string), (yyvsp[(4) - (6)].string)); @@ -2485,8 +2504,6 @@ yyreduce: break; case 58: - -/* Line 1464 of yacc.c */ #line 472 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2494,8 +2511,6 @@ yyreduce: break; case 59: - -/* Line 1464 of yacc.c */ #line 475 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2503,8 +2518,6 @@ yyreduce: break; case 60: - -/* Line 1464 of yacc.c */ #line 478 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2512,22 +2525,16 @@ yyreduce: break; case 61: - -/* Line 1464 of yacc.c */ #line 484 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string).characters = 0; ;} break; case 62: - -/* Line 1464 of yacc.c */ #line 485 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 65: - -/* Line 1464 of yacc.c */ #line 494 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); @@ -2535,8 +2542,6 @@ yyreduce: break; case 66: - -/* Line 1464 of yacc.c */ #line 500 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; @@ -2544,8 +2549,6 @@ yyreduce: break; case 67: - -/* Line 1464 of yacc.c */ #line 503 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = (yyvsp[(3) - (4)].valueList); @@ -2553,8 +2556,6 @@ yyreduce: break; case 68: - -/* Line 1464 of yacc.c */ #line 509 "../Source/WebCore/css/CSSGrammar.y" { (yyvsp[(3) - (7)].string).lower(); @@ -2563,8 +2564,6 @@ yyreduce: break; case 69: - -/* Line 1464 of yacc.c */ #line 516 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2574,8 +2573,6 @@ yyreduce: break; case 70: - -/* Line 1464 of yacc.c */ #line 521 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryExpList) = (yyvsp[(1) - (5)].mediaQueryExpList); @@ -2584,8 +2581,6 @@ yyreduce: break; case 71: - -/* Line 1464 of yacc.c */ #line 528 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryExpList) = static_cast<CSSParser*>(parser)->createFloatingMediaQueryExpList(); @@ -2593,8 +2588,6 @@ yyreduce: break; case 72: - -/* Line 1464 of yacc.c */ #line 531 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryExpList) = (yyvsp[(3) - (3)].mediaQueryExpList); @@ -2602,8 +2595,6 @@ yyreduce: break; case 73: - -/* Line 1464 of yacc.c */ #line 537 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::None; @@ -2611,8 +2602,6 @@ yyreduce: break; case 74: - -/* Line 1464 of yacc.c */ #line 540 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::Only; @@ -2620,8 +2609,6 @@ yyreduce: break; case 75: - -/* Line 1464 of yacc.c */ #line 543 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::Not; @@ -2629,8 +2616,6 @@ yyreduce: break; case 76: - -/* Line 1464 of yacc.c */ #line 549 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2639,8 +2624,6 @@ yyreduce: break; case 77: - -/* Line 1464 of yacc.c */ #line 554 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2650,8 +2633,6 @@ yyreduce: break; case 78: - -/* Line 1464 of yacc.c */ #line 562 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaList) = static_cast<CSSParser*>(parser)->createMediaList(); @@ -2659,8 +2640,6 @@ yyreduce: break; case 80: - -/* Line 1464 of yacc.c */ #line 569 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2670,8 +2649,6 @@ yyreduce: break; case 81: - -/* Line 1464 of yacc.c */ #line 574 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaList) = (yyvsp[(1) - (4)].mediaList); @@ -2681,8 +2658,6 @@ yyreduce: break; case 82: - -/* Line 1464 of yacc.c */ #line 579 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaList) = 0; @@ -2690,8 +2665,6 @@ yyreduce: break; case 83: - -/* Line 1464 of yacc.c */ #line 585 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule((yyvsp[(3) - (7)].mediaList), (yyvsp[(6) - (7)].ruleList)); @@ -2699,8 +2672,6 @@ yyreduce: break; case 84: - -/* Line 1464 of yacc.c */ #line 588 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule(0, (yyvsp[(5) - (6)].ruleList)); @@ -2708,8 +2679,6 @@ yyreduce: break; case 85: - -/* Line 1464 of yacc.c */ #line 594 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); @@ -2717,8 +2686,6 @@ yyreduce: break; case 86: - -/* Line 1464 of yacc.c */ #line 600 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = (yyvsp[(7) - (8)].keyframesRule); @@ -2727,15 +2694,11 @@ yyreduce: break; case 89: - -/* Line 1464 of yacc.c */ #line 612 "../Source/WebCore/css/CSSGrammar.y" { (yyval.keyframesRule) = static_cast<CSSParser*>(parser)->createKeyframesRule(); ;} break; case 90: - -/* Line 1464 of yacc.c */ #line 613 "../Source/WebCore/css/CSSGrammar.y" { (yyval.keyframesRule) = (yyvsp[(1) - (3)].keyframesRule); @@ -2745,8 +2708,6 @@ yyreduce: break; case 91: - -/* Line 1464 of yacc.c */ #line 621 "../Source/WebCore/css/CSSGrammar.y" { (yyval.keyframeRule) = static_cast<CSSParser*>(parser)->createKeyframeRule((yyvsp[(1) - (6)].valueList)); @@ -2754,8 +2715,6 @@ yyreduce: break; case 92: - -/* Line 1464 of yacc.c */ #line 627 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2765,8 +2724,6 @@ yyreduce: break; case 93: - -/* Line 1464 of yacc.c */ #line 632 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2777,15 +2734,11 @@ yyreduce: break; case 94: - -/* Line 1464 of yacc.c */ #line 641 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (1)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 95: - -/* Line 1464 of yacc.c */ #line 642 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; @@ -2800,8 +2753,6 @@ yyreduce: break; case 96: - -/* Line 1464 of yacc.c */ #line 656 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2817,8 +2768,6 @@ yyreduce: break; case 97: - -/* Line 1464 of yacc.c */ #line 667 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2826,8 +2775,6 @@ yyreduce: break; case 98: - -/* Line 1464 of yacc.c */ #line 670 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2835,8 +2782,6 @@ yyreduce: break; case 99: - -/* Line 1464 of yacc.c */ #line 676 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2847,8 +2792,6 @@ yyreduce: break; case 100: - -/* Line 1464 of yacc.c */ #line 682 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2861,8 +2804,6 @@ yyreduce: break; case 101: - -/* Line 1464 of yacc.c */ #line 690 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -2872,8 +2813,6 @@ yyreduce: break; case 102: - -/* Line 1464 of yacc.c */ #line 695 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2883,8 +2822,6 @@ yyreduce: break; case 105: - -/* Line 1464 of yacc.c */ #line 708 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->startDeclarationsForMarginBox(); @@ -2892,8 +2829,6 @@ yyreduce: break; case 106: - -/* Line 1464 of yacc.c */ #line 710 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMarginAtRule((yyvsp[(1) - (7)].marginBox)); @@ -2901,8 +2836,6 @@ yyreduce: break; case 107: - -/* Line 1464 of yacc.c */ #line 716 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopLeftCornerMarginBox; @@ -2910,8 +2843,6 @@ yyreduce: break; case 108: - -/* Line 1464 of yacc.c */ #line 719 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopLeftMarginBox; @@ -2919,8 +2850,6 @@ yyreduce: break; case 109: - -/* Line 1464 of yacc.c */ #line 722 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopCenterMarginBox; @@ -2928,8 +2857,6 @@ yyreduce: break; case 110: - -/* Line 1464 of yacc.c */ #line 725 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopRightMarginBox; @@ -2937,8 +2864,6 @@ yyreduce: break; case 111: - -/* Line 1464 of yacc.c */ #line 728 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopRightCornerMarginBox; @@ -2946,8 +2871,6 @@ yyreduce: break; case 112: - -/* Line 1464 of yacc.c */ #line 731 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomLeftCornerMarginBox; @@ -2955,8 +2878,6 @@ yyreduce: break; case 113: - -/* Line 1464 of yacc.c */ #line 734 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomLeftMarginBox; @@ -2964,8 +2885,6 @@ yyreduce: break; case 114: - -/* Line 1464 of yacc.c */ #line 737 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomCenterMarginBox; @@ -2973,8 +2892,6 @@ yyreduce: break; case 115: - -/* Line 1464 of yacc.c */ #line 740 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomRightMarginBox; @@ -2982,8 +2899,6 @@ yyreduce: break; case 116: - -/* Line 1464 of yacc.c */ #line 743 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomRightCornerMarginBox; @@ -2991,8 +2906,6 @@ yyreduce: break; case 117: - -/* Line 1464 of yacc.c */ #line 746 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::LeftTopMarginBox; @@ -3000,8 +2913,6 @@ yyreduce: break; case 118: - -/* Line 1464 of yacc.c */ #line 749 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::LeftMiddleMarginBox; @@ -3009,8 +2920,6 @@ yyreduce: break; case 119: - -/* Line 1464 of yacc.c */ #line 752 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::LeftBottomMarginBox; @@ -3018,8 +2927,6 @@ yyreduce: break; case 120: - -/* Line 1464 of yacc.c */ #line 755 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::RightTopMarginBox; @@ -3027,8 +2934,6 @@ yyreduce: break; case 121: - -/* Line 1464 of yacc.c */ #line 758 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::RightMiddleMarginBox; @@ -3036,8 +2941,6 @@ yyreduce: break; case 122: - -/* Line 1464 of yacc.c */ #line 761 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::RightBottomMarginBox; @@ -3045,8 +2948,6 @@ yyreduce: break; case 123: - -/* Line 1464 of yacc.c */ #line 768 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createFontFaceRule(); @@ -3054,8 +2955,6 @@ yyreduce: break; case 124: - -/* Line 1464 of yacc.c */ #line 771 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3063,8 +2962,6 @@ yyreduce: break; case 125: - -/* Line 1464 of yacc.c */ #line 774 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3072,57 +2969,41 @@ yyreduce: break; case 126: - -/* Line 1464 of yacc.c */ #line 780 "../Source/WebCore/css/CSSGrammar.y" { (yyval.relation) = CSSSelector::DirectAdjacent; ;} break; case 127: - -/* Line 1464 of yacc.c */ #line 781 "../Source/WebCore/css/CSSGrammar.y" { (yyval.relation) = CSSSelector::IndirectAdjacent; ;} break; case 128: - -/* Line 1464 of yacc.c */ #line 782 "../Source/WebCore/css/CSSGrammar.y" { (yyval.relation) = CSSSelector::Child; ;} break; case 129: - -/* Line 1464 of yacc.c */ #line 786 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; case 130: - -/* Line 1464 of yacc.c */ #line 787 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = 1; ;} break; case 131: - -/* Line 1464 of yacc.c */ #line 791 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = -1; ;} break; case 132: - -/* Line 1464 of yacc.c */ #line 792 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = 1; ;} break; case 133: - -/* Line 1464 of yacc.c */ #line 796 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3131,8 +3012,6 @@ yyreduce: break; case 134: - -/* Line 1464 of yacc.c */ #line 803 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3141,8 +3020,6 @@ yyreduce: break; case 135: - -/* Line 1464 of yacc.c */ #line 810 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3151,8 +3028,6 @@ yyreduce: break; case 136: - -/* Line 1464 of yacc.c */ #line 817 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3161,8 +3036,6 @@ yyreduce: break; case 137: - -/* Line 1464 of yacc.c */ #line 824 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].selector)) { @@ -3176,8 +3049,6 @@ yyreduce: break; case 138: - -/* Line 1464 of yacc.c */ #line 833 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (4)].selectorList) && (yyvsp[(4) - (4)].selector)) { @@ -3191,8 +3062,6 @@ yyreduce: break; case 139: - -/* Line 1464 of yacc.c */ #line 842 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selectorList) = 0; @@ -3200,8 +3069,6 @@ yyreduce: break; case 140: - -/* Line 1464 of yacc.c */ #line 848 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (2)].selector); @@ -3209,8 +3076,6 @@ yyreduce: break; case 141: - -/* Line 1464 of yacc.c */ #line 854 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -3218,8 +3083,6 @@ yyreduce: break; case 142: - -/* Line 1464 of yacc.c */ #line 858 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -3227,8 +3090,6 @@ yyreduce: break; case 143: - -/* Line 1464 of yacc.c */ #line 862 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); @@ -3246,8 +3107,6 @@ yyreduce: break; case 144: - -/* Line 1464 of yacc.c */ #line 875 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(3) - (3)].selector); @@ -3265,8 +3124,6 @@ yyreduce: break; case 145: - -/* Line 1464 of yacc.c */ #line 888 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = 0; @@ -3274,29 +3131,21 @@ yyreduce: break; case 146: - -/* Line 1464 of yacc.c */ #line 894 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string).characters = 0; (yyval.string).length = 0; ;} break; case 147: - -/* Line 1464 of yacc.c */ #line 895 "../Source/WebCore/css/CSSGrammar.y" { static UChar star = '*'; (yyval.string).characters = ☆ (yyval.string).length = 1; ;} break; case 148: - -/* Line 1464 of yacc.c */ #line 896 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 149: - -/* Line 1464 of yacc.c */ #line 900 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3306,8 +3155,6 @@ yyreduce: break; case 150: - -/* Line 1464 of yacc.c */ #line 905 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); @@ -3317,8 +3164,6 @@ yyreduce: break; case 151: - -/* Line 1464 of yacc.c */ #line 910 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -3328,8 +3173,6 @@ yyreduce: break; case 152: - -/* Line 1464 of yacc.c */ #line 915 "../Source/WebCore/css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(1) - (2)].string); @@ -3344,8 +3187,6 @@ yyreduce: break; case 153: - -/* Line 1464 of yacc.c */ #line 925 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(3) - (3)].selector); @@ -3355,8 +3196,6 @@ yyreduce: break; case 154: - -/* Line 1464 of yacc.c */ #line 930 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); @@ -3366,8 +3205,6 @@ yyreduce: break; case 155: - -/* Line 1464 of yacc.c */ #line 938 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].selector)) { @@ -3380,8 +3217,6 @@ yyreduce: break; case 156: - -/* Line 1464 of yacc.c */ #line 946 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (5)].selectorList) && (yyvsp[(5) - (5)].selector)) { @@ -3394,8 +3229,6 @@ yyreduce: break; case 157: - -/* Line 1464 of yacc.c */ #line 954 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selectorList) = 0; @@ -3403,8 +3236,6 @@ yyreduce: break; case 158: - -/* Line 1464 of yacc.c */ #line 960 "../Source/WebCore/css/CSSGrammar.y" { CSSParserString& str = (yyvsp[(1) - (1)].string); @@ -3417,8 +3248,6 @@ yyreduce: break; case 159: - -/* Line 1464 of yacc.c */ #line 968 "../Source/WebCore/css/CSSGrammar.y" { static UChar star = '*'; @@ -3428,8 +3257,6 @@ yyreduce: break; case 160: - -/* Line 1464 of yacc.c */ #line 976 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -3437,8 +3264,6 @@ yyreduce: break; case 161: - -/* Line 1464 of yacc.c */ #line 979 "../Source/WebCore/css/CSSGrammar.y" { if (!(yyvsp[(2) - (2)].selector)) @@ -3449,8 +3274,6 @@ yyreduce: break; case 162: - -/* Line 1464 of yacc.c */ #line 985 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = 0; @@ -3458,8 +3281,6 @@ yyreduce: break; case 163: - -/* Line 1464 of yacc.c */ #line 991 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3472,8 +3293,6 @@ yyreduce: break; case 164: - -/* Line 1464 of yacc.c */ #line 999 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].string).characters[0] >= '0' && (yyvsp[(1) - (1)].string).characters[0] <= '9') { @@ -3490,8 +3309,6 @@ yyreduce: break; case 168: - -/* Line 1464 of yacc.c */ #line 1017 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3504,8 +3321,6 @@ yyreduce: break; case 169: - -/* Line 1464 of yacc.c */ #line 1028 "../Source/WebCore/css/CSSGrammar.y" { CSSParserString& str = (yyvsp[(1) - (2)].string); @@ -3518,8 +3333,6 @@ yyreduce: break; case 170: - -/* Line 1464 of yacc.c */ #line 1039 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3529,8 +3342,6 @@ yyreduce: break; case 171: - -/* Line 1464 of yacc.c */ #line 1044 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3541,8 +3352,6 @@ yyreduce: break; case 172: - -/* Line 1464 of yacc.c */ #line 1050 "../Source/WebCore/css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(3) - (5)].string); @@ -3555,8 +3364,6 @@ yyreduce: break; case 173: - -/* Line 1464 of yacc.c */ #line 1058 "../Source/WebCore/css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(3) - (9)].string); @@ -3570,8 +3377,6 @@ yyreduce: break; case 174: - -/* Line 1464 of yacc.c */ #line 1070 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Exact; @@ -3579,8 +3384,6 @@ yyreduce: break; case 175: - -/* Line 1464 of yacc.c */ #line 1073 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::List; @@ -3588,8 +3391,6 @@ yyreduce: break; case 176: - -/* Line 1464 of yacc.c */ #line 1076 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Hyphen; @@ -3597,8 +3398,6 @@ yyreduce: break; case 177: - -/* Line 1464 of yacc.c */ #line 1079 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Begin; @@ -3606,8 +3405,6 @@ yyreduce: break; case 178: - -/* Line 1464 of yacc.c */ #line 1082 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::End; @@ -3615,8 +3412,6 @@ yyreduce: break; case 179: - -/* Line 1464 of yacc.c */ #line 1085 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Contain; @@ -3624,8 +3419,6 @@ yyreduce: break; case 182: - -/* Line 1464 of yacc.c */ #line 1096 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3639,8 +3432,6 @@ yyreduce: break; case 183: - -/* Line 1464 of yacc.c */ #line 1107 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3654,8 +3445,6 @@ yyreduce: break; case 184: - -/* Line 1464 of yacc.c */ #line 1116 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3668,8 +3457,6 @@ yyreduce: break; case 185: - -/* Line 1464 of yacc.c */ #line 1129 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(4) - (6)].selectorList)) { @@ -3688,8 +3475,6 @@ yyreduce: break; case 186: - -/* Line 1464 of yacc.c */ #line 1144 "../Source/WebCore/css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3704,8 +3489,6 @@ yyreduce: break; case 187: - -/* Line 1464 of yacc.c */ #line 1155 "../Source/WebCore/css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3720,8 +3503,6 @@ yyreduce: break; case 188: - -/* Line 1464 of yacc.c */ #line 1166 "../Source/WebCore/css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3744,8 +3525,6 @@ yyreduce: break; case 189: - -/* Line 1464 of yacc.c */ #line 1185 "../Source/WebCore/css/CSSGrammar.y" { if (!(yyvsp[(4) - (6)].selector) || !(yyvsp[(4) - (6)].selector)->isSimple()) @@ -3766,8 +3545,6 @@ yyreduce: break; case 190: - -/* Line 1464 of yacc.c */ #line 1204 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); @@ -3775,8 +3552,6 @@ yyreduce: break; case 191: - -/* Line 1464 of yacc.c */ #line 1207 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); @@ -3786,8 +3561,6 @@ yyreduce: break; case 192: - -/* Line 1464 of yacc.c */ #line 1212 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); @@ -3795,8 +3568,6 @@ yyreduce: break; case 193: - -/* Line 1464 of yacc.c */ #line 1215 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3804,8 +3575,6 @@ yyreduce: break; case 194: - -/* Line 1464 of yacc.c */ #line 1218 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3813,8 +3582,6 @@ yyreduce: break; case 195: - -/* Line 1464 of yacc.c */ #line 1221 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); @@ -3822,8 +3589,6 @@ yyreduce: break; case 196: - -/* Line 1464 of yacc.c */ #line 1224 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); @@ -3831,8 +3596,6 @@ yyreduce: break; case 197: - -/* Line 1464 of yacc.c */ #line 1230 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3842,8 +3605,6 @@ yyreduce: break; case 198: - -/* Line 1464 of yacc.c */ #line 1235 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3851,8 +3612,6 @@ yyreduce: break; case 199: - -/* Line 1464 of yacc.c */ #line 1238 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3860,8 +3619,6 @@ yyreduce: break; case 200: - -/* Line 1464 of yacc.c */ #line 1241 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3871,8 +3628,6 @@ yyreduce: break; case 201: - -/* Line 1464 of yacc.c */ #line 1246 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3880,8 +3635,6 @@ yyreduce: break; case 202: - -/* Line 1464 of yacc.c */ #line 1249 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3893,8 +3646,6 @@ yyreduce: break; case 203: - -/* Line 1464 of yacc.c */ #line 1256 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3904,8 +3655,6 @@ yyreduce: break; case 204: - -/* Line 1464 of yacc.c */ #line 1261 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3915,8 +3664,6 @@ yyreduce: break; case 205: - -/* Line 1464 of yacc.c */ #line 1269 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3938,8 +3685,6 @@ yyreduce: break; case 206: - -/* Line 1464 of yacc.c */ #line 1287 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3947,8 +3692,6 @@ yyreduce: break; case 207: - -/* Line 1464 of yacc.c */ #line 1291 "../Source/WebCore/css/CSSGrammar.y" { /* The default movable type template has letter-spacing: .none; Handle this by looking for @@ -3961,8 +3704,6 @@ yyreduce: break; case 208: - -/* Line 1464 of yacc.c */ #line 1300 "../Source/WebCore/css/CSSGrammar.y" { /* When we encounter something like p {color: red !important fail;} we should drop the declaration */ @@ -3973,8 +3714,6 @@ yyreduce: break; case 209: - -/* Line 1464 of yacc.c */ #line 1307 "../Source/WebCore/css/CSSGrammar.y" { /* Handle this case: div { text-align: center; !important } Just reduce away the stray !important. */ @@ -3983,8 +3722,6 @@ yyreduce: break; case 210: - -/* Line 1464 of yacc.c */ #line 1312 "../Source/WebCore/css/CSSGrammar.y" { /* div { font-family: } Just reduce away this property with no value. */ @@ -3995,8 +3732,6 @@ yyreduce: break; case 211: - -/* Line 1464 of yacc.c */ #line 1319 "../Source/WebCore/css/CSSGrammar.y" { /* if we come across rules with invalid values like this case: p { weight: *; }, just discard the rule */ @@ -4007,8 +3742,6 @@ yyreduce: break; case 212: - -/* Line 1464 of yacc.c */ #line 1326 "../Source/WebCore/css/CSSGrammar.y" { /* if we come across: div { color{;color:maroon} }, ignore everything within curly brackets */ @@ -4017,8 +3750,6 @@ yyreduce: break; case 213: - -/* Line 1464 of yacc.c */ #line 1333 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = cssPropertyID((yyvsp[(1) - (2)].string)); @@ -4026,22 +3757,16 @@ yyreduce: break; case 214: - -/* Line 1464 of yacc.c */ #line 1339 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = true; ;} break; case 215: - -/* Line 1464 of yacc.c */ #line 1340 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; ;} break; case 216: - -/* Line 1464 of yacc.c */ #line 1344 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4051,8 +3776,6 @@ yyreduce: break; case 217: - -/* Line 1464 of yacc.c */ #line 1349 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4071,8 +3794,6 @@ yyreduce: break; case 218: - -/* Line 1464 of yacc.c */ #line 1363 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; @@ -4080,8 +3801,6 @@ yyreduce: break; case 219: - -/* Line 1464 of yacc.c */ #line 1366 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; @@ -4089,8 +3808,6 @@ yyreduce: break; case 220: - -/* Line 1464 of yacc.c */ #line 1369 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; @@ -4098,8 +3815,6 @@ yyreduce: break; case 221: - -/* Line 1464 of yacc.c */ #line 1375 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '/'; @@ -4107,8 +3822,6 @@ yyreduce: break; case 222: - -/* Line 1464 of yacc.c */ #line 1378 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = ','; @@ -4116,8 +3829,6 @@ yyreduce: break; case 223: - -/* Line 1464 of yacc.c */ #line 1381 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = 0; @@ -4125,29 +3836,21 @@ yyreduce: break; case 224: - -/* Line 1464 of yacc.c */ #line 1387 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); ;} break; case 225: - -/* Line 1464 of yacc.c */ #line 1388 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); ;} break; case 226: - -/* Line 1464 of yacc.c */ #line 1389 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_STRING; ;} break; case 227: - -/* Line 1464 of yacc.c */ #line 1390 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = cssValueKeywordID((yyvsp[(1) - (2)].string)); @@ -4157,50 +3860,36 @@ yyreduce: break; case 228: - -/* Line 1464 of yacc.c */ #line 1396 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;} break; case 229: - -/* Line 1464 of yacc.c */ #line 1397 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(2) - (3)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;} break; case 230: - -/* Line 1464 of yacc.c */ #line 1398 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_URI; ;} break; case 231: - -/* Line 1464 of yacc.c */ #line 1399 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; ;} break; case 232: - -/* Line 1464 of yacc.c */ #line 1400 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;} break; case 233: - -/* Line 1464 of yacc.c */ #line 1401 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = CSSParserString(); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;} break; case 234: - -/* Line 1464 of yacc.c */ #line 1403 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); @@ -4208,8 +3897,6 @@ yyreduce: break; case 235: - -/* Line 1464 of yacc.c */ #line 1406 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); @@ -4217,8 +3904,6 @@ yyreduce: break; case 236: - -/* Line 1464 of yacc.c */ #line 1409 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); @@ -4226,8 +3911,6 @@ yyreduce: break; case 237: - -/* Line 1464 of yacc.c */ #line 1412 "../Source/WebCore/css/CSSGrammar.y" { /* Handle width: %; */ (yyval.value).id = 0; (yyval.value).unit = 0; @@ -4235,148 +3918,106 @@ yyreduce: break; case 238: - -/* Line 1464 of yacc.c */ #line 1418 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = true; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 239: - -/* Line 1464 of yacc.c */ #line 1419 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 240: - -/* Line 1464 of yacc.c */ #line 1420 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PERCENTAGE; ;} break; case 241: - -/* Line 1464 of yacc.c */ #line 1421 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PX; ;} break; case 242: - -/* Line 1464 of yacc.c */ #line 1422 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_CM; ;} break; case 243: - -/* Line 1464 of yacc.c */ #line 1423 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MM; ;} break; case 244: - -/* Line 1464 of yacc.c */ #line 1424 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_IN; ;} break; case 245: - -/* Line 1464 of yacc.c */ #line 1425 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PT; ;} break; case 246: - -/* Line 1464 of yacc.c */ #line 1426 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PC; ;} break; case 247: - -/* Line 1464 of yacc.c */ #line 1427 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_DEG; ;} break; case 248: - -/* Line 1464 of yacc.c */ #line 1428 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_RAD; ;} break; case 249: - -/* Line 1464 of yacc.c */ #line 1429 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_GRAD; ;} break; case 250: - -/* Line 1464 of yacc.c */ #line 1430 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_TURN; ;} break; case 251: - -/* Line 1464 of yacc.c */ #line 1431 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MS; ;} break; case 252: - -/* Line 1464 of yacc.c */ #line 1432 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_S; ;} break; case 253: - -/* Line 1464 of yacc.c */ #line 1433 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_HZ; ;} break; case 254: - -/* Line 1464 of yacc.c */ #line 1434 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_KHZ; ;} break; case 255: - -/* Line 1464 of yacc.c */ #line 1435 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EMS; ;} break; case 256: - -/* Line 1464 of yacc.c */ #line 1436 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSParserValue::Q_EMS; ;} break; case 257: - -/* Line 1464 of yacc.c */ #line 1437 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EXS; ;} break; case 258: - -/* Line 1464 of yacc.c */ #line 1438 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; @@ -4389,8 +4030,6 @@ yyreduce: break; case 259: - -/* Line 1464 of yacc.c */ #line 1449 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4404,8 +4043,6 @@ yyreduce: break; case 260: - -/* Line 1464 of yacc.c */ #line 1458 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4419,22 +4056,16 @@ yyreduce: break; case 261: - -/* Line 1464 of yacc.c */ #line 1470 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); ;} break; case 262: - -/* Line 1464 of yacc.c */ #line 1471 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); ;} break; case 263: - -/* Line 1464 of yacc.c */ #line 1475 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '+'; @@ -4442,8 +4073,6 @@ yyreduce: break; case 264: - -/* Line 1464 of yacc.c */ #line 1478 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '-'; @@ -4451,8 +4080,6 @@ yyreduce: break; case 265: - -/* Line 1464 of yacc.c */ #line 1481 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '*'; @@ -4460,8 +4087,6 @@ yyreduce: break; case 266: - -/* Line 1464 of yacc.c */ #line 1484 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '/'; @@ -4469,8 +4094,6 @@ yyreduce: break; case 267: - -/* Line 1464 of yacc.c */ #line 1487 "../Source/WebCore/css/CSSGrammar.y" { if (equalIgnoringCase("mod", (yyvsp[(1) - (2)].string).characters, (yyvsp[(1) - (2)].string).length)) @@ -4481,8 +4104,6 @@ yyreduce: break; case 268: - -/* Line 1464 of yacc.c */ #line 1496 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(3) - (6)].valueList)) { @@ -4500,8 +4121,6 @@ yyreduce: break; case 269: - -/* Line 1464 of yacc.c */ #line 1511 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4511,8 +4130,6 @@ yyreduce: break; case 270: - -/* Line 1464 of yacc.c */ #line 1516 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4531,8 +4148,6 @@ yyreduce: break; case 271: - -/* Line 1464 of yacc.c */ #line 1530 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (3)].valueList) && (yyvsp[(2) - (3)].character) && (yyvsp[(3) - (3)].valueList)) { @@ -4549,8 +4164,6 @@ yyreduce: break; case 273: - -/* Line 1464 of yacc.c */ #line 1543 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; @@ -4558,8 +4171,6 @@ yyreduce: break; case 274: - -/* Line 1464 of yacc.c */ #line 1549 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = (yyvsp[(1) - (1)].valueList); @@ -4567,8 +4178,6 @@ yyreduce: break; case 275: - -/* Line 1464 of yacc.c */ #line 1552 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (4)].valueList) && (yyvsp[(4) - (4)].valueList)) { @@ -4585,8 +4194,6 @@ yyreduce: break; case 276: - -/* Line 1464 of yacc.c */ #line 1567 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4600,8 +4207,6 @@ yyreduce: break; case 277: - -/* Line 1464 of yacc.c */ #line 1576 "../Source/WebCore/css/CSSGrammar.y" { YYERROR; @@ -4609,8 +4214,6 @@ yyreduce: break; case 278: - -/* Line 1464 of yacc.c */ #line 1583 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (1)].string); @@ -4618,8 +4221,6 @@ yyreduce: break; case 279: - -/* Line 1464 of yacc.c */ #line 1586 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (1)].string); @@ -4627,8 +4228,6 @@ yyreduce: break; case 280: - -/* Line 1464 of yacc.c */ #line 1592 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4642,8 +4241,6 @@ yyreduce: break; case 281: - -/* Line 1464 of yacc.c */ #line 1601 "../Source/WebCore/css/CSSGrammar.y" { YYERROR; @@ -4651,8 +4248,6 @@ yyreduce: break; case 282: - -/* Line 1464 of yacc.c */ #line 1609 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -4660,8 +4255,6 @@ yyreduce: break; case 283: - -/* Line 1464 of yacc.c */ #line 1612 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -4669,8 +4262,6 @@ yyreduce: break; case 284: - -/* Line 1464 of yacc.c */ #line 1618 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -4678,8 +4269,6 @@ yyreduce: break; case 285: - -/* Line 1464 of yacc.c */ #line 1621 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -4687,8 +4276,6 @@ yyreduce: break; case 286: - -/* Line 1464 of yacc.c */ #line 1627 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; @@ -4696,8 +4283,6 @@ yyreduce: break; case 287: - -/* Line 1464 of yacc.c */ #line 1645 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->invalidBlockHit(); @@ -4705,8 +4290,6 @@ yyreduce: break; case 288: - -/* Line 1464 of yacc.c */ #line 1648 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->invalidBlockHit(); @@ -4714,9 +4297,8 @@ yyreduce: break; - -/* Line 1464 of yacc.c */ -#line 4720 "/Source/WebCore/generated/CSSGrammar.tab.c" +/* Line 1267 of yacc.c. */ +#line 4302 "/Source/WebCore/generated/CSSGrammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4727,6 +4309,7 @@ yyreduce: *++yyvsp = yyval; + /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -4791,7 +4374,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -4808,7 +4391,7 @@ yyerrlab: } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -4865,6 +4448,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + if (yyn == YYFINAL) + YYACCEPT; + *++yyvsp = yylval; @@ -4889,7 +4475,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -4900,7 +4486,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEMPTY) + if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -4926,8 +4512,6 @@ yyreturn: } - -/* Line 1684 of yacc.c */ #line 1658 "../Source/WebCore/css/CSSGrammar.y" diff --git a/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.h b/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.h index 2953e0d..22670ba 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.h +++ b/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.h @@ -1,24 +1,26 @@ #ifndef CSSGRAMMAR_H #define CSSGRAMMAR_H -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program 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 General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,11 +31,10 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ - /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -122,16 +123,95 @@ UNICODERANGE = 336 }; #endif +/* Tokens. */ +#define TOKEN_EOF 0 +#define LOWEST_PREC 258 +#define UNIMPORTANT_TOK 259 +#define WHITESPACE 260 +#define SGML_CD 261 +#define INCLUDES 262 +#define DASHMATCH 263 +#define BEGINSWITH 264 +#define ENDSWITH 265 +#define CONTAINS 266 +#define STRING 267 +#define IDENT 268 +#define NTH 269 +#define HEX 270 +#define IDSEL 271 +#define IMPORT_SYM 272 +#define PAGE_SYM 273 +#define MEDIA_SYM 274 +#define FONT_FACE_SYM 275 +#define CHARSET_SYM 276 +#define NAMESPACE_SYM 277 +#define WEBKIT_RULE_SYM 278 +#define WEBKIT_DECLS_SYM 279 +#define WEBKIT_KEYFRAME_RULE_SYM 280 +#define WEBKIT_KEYFRAMES_SYM 281 +#define WEBKIT_VALUE_SYM 282 +#define WEBKIT_MEDIAQUERY_SYM 283 +#define WEBKIT_SELECTOR_SYM 284 +#define TOPLEFTCORNER_SYM 285 +#define TOPLEFT_SYM 286 +#define TOPCENTER_SYM 287 +#define TOPRIGHT_SYM 288 +#define TOPRIGHTCORNER_SYM 289 +#define BOTTOMLEFTCORNER_SYM 290 +#define BOTTOMLEFT_SYM 291 +#define BOTTOMCENTER_SYM 292 +#define BOTTOMRIGHT_SYM 293 +#define BOTTOMRIGHTCORNER_SYM 294 +#define LEFTTOP_SYM 295 +#define LEFTMIDDLE_SYM 296 +#define LEFTBOTTOM_SYM 297 +#define RIGHTTOP_SYM 298 +#define RIGHTMIDDLE_SYM 299 +#define RIGHTBOTTOM_SYM 300 +#define ATKEYWORD 301 +#define IMPORTANT_SYM 302 +#define MEDIA_ONLY 303 +#define MEDIA_NOT 304 +#define MEDIA_AND 305 +#define REMS 306 +#define QEMS 307 +#define EMS 308 +#define EXS 309 +#define PXS 310 +#define CMS 311 +#define MMS 312 +#define INS 313 +#define PTS 314 +#define PCS 315 +#define DEGS 316 +#define RADS 317 +#define GRADS 318 +#define TURNS 319 +#define MSECS 320 +#define SECS 321 +#define HERTZ 322 +#define KHERTZ 323 +#define DIMEN 324 +#define INVALIDDIMEN 325 +#define PERCENTAGE 326 +#define FLOATTOKEN 327 +#define INTEGER 328 +#define URI 329 +#define FUNCTION 330 +#define ANYFUNCTION 331 +#define NOTFUNCTION 332 +#define CALCFUNCTION 333 +#define MINFUNCTION 334 +#define MAXFUNCTION 335 +#define UNICODERANGE 336 + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -{ - -/* Line 1685 of yacc.c */ #line 63 "../Source/WebCore/css/CSSGrammar.y" - +{ bool boolean; char character; int integer; @@ -154,18 +234,15 @@ typedef union YYSTYPE WebKitCSSKeyframeRule* keyframeRule; WebKitCSSKeyframesRule* keyframesRule; float val; - - - -/* Line 1685 of yacc.c */ -#line 160 "/Source/WebCore/generated/CSSGrammar.tab.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 +} +/* Line 1529 of yacc.c. */ +#line 238 "/Source/WebCore/generated/CSSGrammar.tab.h" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif - #endif diff --git a/src/3rdparty/webkit/Source/WebCore/generated/CSSPropertyNames.cpp b/src/3rdparty/webkit/Source/WebCore/generated/CSSPropertyNames.cpp index 945ba7d..1294a34 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/CSSPropertyNames.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/CSSPropertyNames.cpp @@ -1,4 +1,4 @@ -/* C++ code produced by gperf version 3.0.4 */ +/* C++ code produced by gperf version 3.0.3 */ /* Command-line: gperf --key-positions='*' -D -n -s 2 CSSPropertyNames.gperf */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ diff --git a/src/3rdparty/webkit/Source/WebCore/generated/CSSValueKeywords.cpp b/src/3rdparty/webkit/Source/WebCore/generated/CSSValueKeywords.cpp index 92c7541..081d323 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/CSSValueKeywords.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/CSSValueKeywords.cpp @@ -1,4 +1,4 @@ -/* C++ code produced by gperf version 3.0.4 */ +/* C++ code produced by gperf version 3.0.3 */ /* Command-line: gperf --key-positions='*' -D -n -s 2 CSSValueKeywords.gperf */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ diff --git a/src/3rdparty/webkit/Source/WebCore/generated/ColorData.cpp b/src/3rdparty/webkit/Source/WebCore/generated/ColorData.cpp index da31ef8..3b09b89 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/ColorData.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/ColorData.cpp @@ -1,4 +1,4 @@ -/* C++ code produced by gperf version 3.0.4 */ +/* C++ code produced by gperf version 3.0.3 */ /* Command-line: gperf --key-positions='*' -D -s 2 /Source/WebCore/platform/ColorData.gperf */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ diff --git a/src/3rdparty/webkit/Source/WebCore/generated/DocTypeStrings.cpp b/src/3rdparty/webkit/Source/WebCore/generated/DocTypeStrings.cpp index 5667009..e0a2b4f 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/DocTypeStrings.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/DocTypeStrings.cpp @@ -1,4 +1,4 @@ -/* C++ code produced by gperf version 3.0.4 */ +/* C++ code produced by gperf version 3.0.3 */ /* Command-line: gperf --key-positions='*' -s 2 /Source/WebCore/html/DocTypeStrings.gperf */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ diff --git a/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.cpp b/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.cpp index 768d802..4e8b9c4 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.cpp @@ -1,22 +1,24 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program 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 General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -27,7 +29,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -45,7 +47,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.3" +#define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -53,28 +55,69 @@ /* Pure parsers. */ #define YYPURE 1 -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ -#define yyparse xpathyyparse -#define yylex xpathyylex -#define yyerror xpathyyerror -#define yylval xpathyylval -#define yychar xpathyychar -#define yydebug xpathyydebug -#define yynerrs xpathyynerrs +#define yyparse xpathyyparse +#define yylex xpathyylex +#define yyerror xpathyyerror +#define yylval xpathyylval +#define yychar xpathyychar +#define yydebug xpathyydebug +#define yynerrs xpathyynerrs -/* Copy the first part of user declarations. */ +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + MULOP = 258, + RELOP = 259, + EQOP = 260, + MINUS = 261, + PLUS = 262, + AND = 263, + OR = 264, + AXISNAME = 265, + NODETYPE = 266, + PI = 267, + FUNCTIONNAME = 268, + LITERAL = 269, + VARIABLEREFERENCE = 270, + NUMBER = 271, + DOTDOT = 272, + SLASHSLASH = 273, + NAMETEST = 274, + XPATH_ERROR = 275 + }; +#endif +/* Tokens. */ +#define MULOP 258 +#define RELOP 259 +#define EQOP 260 +#define MINUS 261 +#define PLUS 262 +#define AND 263 +#define OR 264 +#define AXISNAME 265 +#define NODETYPE 266 +#define PI 267 +#define FUNCTIONNAME 268 +#define LITERAL 269 +#define VARIABLEREFERENCE 270 +#define NUMBER 271 +#define DOTDOT 272 +#define SLASHSLASH 273 +#define NAMETEST 274 +#define XPATH_ERROR 275 + -/* Line 189 of yacc.c */ + + +/* Copy the first part of user declarations. */ #line 28 "../Source/WebCore/xml/XPathGrammar.y" @@ -105,9 +148,6 @@ using namespace XPath; -/* Line 189 of yacc.c */ -#line 110 "/Source/WebCore/generated/XPathGrammar.tab.c" - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -126,43 +166,10 @@ using namespace XPath; # define YYTOKEN_TABLE 0 #endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - MULOP = 258, - RELOP = 259, - EQOP = 260, - MINUS = 261, - PLUS = 262, - AND = 263, - OR = 264, - AXISNAME = 265, - NODETYPE = 266, - PI = 267, - FUNCTIONNAME = 268, - LITERAL = 269, - VARIABLEREFERENCE = 270, - NUMBER = 271, - DOTDOT = 272, - SLASHSLASH = 273, - NAMETEST = 274, - XPATH_ERROR = 275 - }; -#endif - - - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ #line 60 "../Source/WebCore/xml/XPathGrammar.y" - +{ Step::Axis axis; Step::NodeTest* nodeTest; NumericOp::Opcode numop; @@ -173,21 +180,18 @@ typedef union YYSTYPE Vector<Expression*>* argList; Step* step; LocationPath* locationPath; - - - -/* Line 214 of yacc.c */ -#line 181 "/Source/WebCore/generated/XPathGrammar.tab.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 +} +/* Line 193 of yacc.c. */ +#line 186 "/Source/WebCore/generated/XPathGrammar.tab.c" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif -/* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ +/* Copy the second part of user declarations. */ #line 73 "../Source/WebCore/xml/XPathGrammar.y" @@ -196,8 +200,8 @@ static void xpathyyerror(const char*) { } -/* Line 264 of yacc.c */ -#line 201 "/Source/WebCore/generated/XPathGrammar.tab.c" +/* Line 216 of yacc.c. */ +#line 205 "/Source/WebCore/generated/XPathGrammar.tab.c" #ifdef short # undef short @@ -272,14 +276,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int yyi) +YYID (int i) #else static int -YYID (yyi) - int yyi; +YYID (i) + int i; #endif { - return yyi; + return i; } #endif @@ -360,9 +364,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; + yytype_int16 yyss; + YYSTYPE yyvs; + }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -396,12 +400,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -684,18 +688,9 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ + Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -863,20 +858,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -910,11 +902,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF (stderr, " $%d = ", yyi + 1); + fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - YYFPRINTF (stderr, "\n"); + fprintf (stderr, "\n"); } } @@ -1194,8 +1186,10 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } + /* Prevent warnings from -Wmissing-prototypes. */ + #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1214,9 +1208,10 @@ int yyparse (); -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ + +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1240,46 +1235,22 @@ yyparse () #endif #endif { -/* The lookahead symbol. */ + /* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; +/* Number of syntax errors so far. */ +int yynerrs; + int yystate; int yyn; int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; @@ -1287,28 +1258,51 @@ YYSTYPE yylval; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ + yyssp = yyss; yyvsp = yyvs; @@ -1338,6 +1332,7 @@ YYSTYPE yylval; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; + /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1345,6 +1340,7 @@ YYSTYPE yylval; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); yyss = yyss1; @@ -1367,8 +1363,9 @@ YYSTYPE yylval; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1379,6 +1376,7 @@ YYSTYPE yylval; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; + YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1388,9 +1386,6 @@ YYSTYPE yylval; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - YYACCEPT; - goto yybackup; /*-----------. @@ -1399,16 +1394,16 @@ YYSTYPE yylval; yybackup: /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ + look-ahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1440,16 +1435,20 @@ yybackup: goto yyreduce; } + if (yyn == YYFINAL) + YYACCEPT; + /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the lookahead token. */ + /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token. */ - yychar = YYEMPTY; + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1489,8 +1488,6 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1464 of yacc.c */ #line 122 "../Source/WebCore/xml/XPathGrammar.y" { PARSER->m_topExpr = (yyvsp[(1) - (1)].expr); @@ -1498,8 +1495,6 @@ yyreduce: break; case 3: - -/* Line 1464 of yacc.c */ #line 129 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(false); @@ -1507,8 +1502,6 @@ yyreduce: break; case 4: - -/* Line 1464 of yacc.c */ #line 134 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(true); @@ -1516,8 +1509,6 @@ yyreduce: break; case 5: - -/* Line 1464 of yacc.c */ #line 141 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; @@ -1526,8 +1517,6 @@ yyreduce: break; case 6: - -/* Line 1464 of yacc.c */ #line 147 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); @@ -1535,8 +1524,6 @@ yyreduce: break; case 7: - -/* Line 1464 of yacc.c */ #line 152 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); @@ -1546,8 +1533,6 @@ yyreduce: break; case 8: - -/* Line 1464 of yacc.c */ #line 161 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; @@ -1558,8 +1543,6 @@ yyreduce: break; case 9: - -/* Line 1464 of yacc.c */ #line 169 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(3) - (3)].step)); @@ -1568,8 +1551,6 @@ yyreduce: break; case 10: - -/* Line 1464 of yacc.c */ #line 175 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(2) - (3)].step)); @@ -1580,8 +1561,6 @@ yyreduce: break; case 11: - -/* Line 1464 of yacc.c */ #line 185 "../Source/WebCore/xml/XPathGrammar.y" { if ((yyvsp[(2) - (2)].predList)) { @@ -1595,8 +1574,6 @@ yyreduce: break; case 12: - -/* Line 1464 of yacc.c */ #line 196 "../Source/WebCore/xml/XPathGrammar.y" { String localName; @@ -1617,8 +1594,6 @@ yyreduce: break; case 13: - -/* Line 1464 of yacc.c */ #line 214 "../Source/WebCore/xml/XPathGrammar.y" { if ((yyvsp[(3) - (3)].predList)) { @@ -1632,8 +1607,6 @@ yyreduce: break; case 14: - -/* Line 1464 of yacc.c */ #line 225 "../Source/WebCore/xml/XPathGrammar.y" { String localName; @@ -1654,8 +1627,6 @@ yyreduce: break; case 17: - -/* Line 1464 of yacc.c */ #line 249 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.axis) = Step::AttributeAxis; @@ -1663,8 +1634,6 @@ yyreduce: break; case 18: - -/* Line 1464 of yacc.c */ #line 256 "../Source/WebCore/xml/XPathGrammar.y" { if (*(yyvsp[(1) - (3)].str) == "node") @@ -1680,8 +1649,6 @@ yyreduce: break; case 19: - -/* Line 1464 of yacc.c */ #line 269 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest); @@ -1691,8 +1658,6 @@ yyreduce: break; case 20: - -/* Line 1464 of yacc.c */ #line 276 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, (yyvsp[(3) - (4)].str)->stripWhiteSpace()); @@ -1703,8 +1668,6 @@ yyreduce: break; case 21: - -/* Line 1464 of yacc.c */ #line 286 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.predList) = 0; @@ -1712,8 +1675,6 @@ yyreduce: break; case 23: - -/* Line 1464 of yacc.c */ #line 295 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.predList) = new Vector<Predicate*>; @@ -1724,8 +1685,6 @@ yyreduce: break; case 24: - -/* Line 1464 of yacc.c */ #line 303 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.predList)->append(new Predicate((yyvsp[(2) - (2)].expr))); @@ -1734,8 +1693,6 @@ yyreduce: break; case 25: - -/* Line 1464 of yacc.c */ #line 311 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); @@ -1743,8 +1700,6 @@ yyreduce: break; case 26: - -/* Line 1464 of yacc.c */ #line 318 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.step) = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1753,8 +1708,6 @@ yyreduce: break; case 27: - -/* Line 1464 of yacc.c */ #line 326 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.step) = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1763,8 +1716,6 @@ yyreduce: break; case 28: - -/* Line 1464 of yacc.c */ #line 332 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.step) = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1773,8 +1724,6 @@ yyreduce: break; case 29: - -/* Line 1464 of yacc.c */ #line 340 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new VariableReference(*(yyvsp[(1) - (1)].str)); @@ -1784,8 +1733,6 @@ yyreduce: break; case 30: - -/* Line 1464 of yacc.c */ #line 347 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); @@ -1793,8 +1740,6 @@ yyreduce: break; case 31: - -/* Line 1464 of yacc.c */ #line 352 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new StringExpression(*(yyvsp[(1) - (1)].str)); @@ -1804,8 +1749,6 @@ yyreduce: break; case 32: - -/* Line 1464 of yacc.c */ #line 359 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new Number((yyvsp[(1) - (1)].str)->toDouble()); @@ -1815,8 +1758,6 @@ yyreduce: break; case 34: - -/* Line 1464 of yacc.c */ #line 370 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (3)].str)); @@ -1828,8 +1769,6 @@ yyreduce: break; case 35: - -/* Line 1464 of yacc.c */ #line 379 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (4)].str), *(yyvsp[(3) - (4)].argList)); @@ -1842,8 +1781,6 @@ yyreduce: break; case 36: - -/* Line 1464 of yacc.c */ #line 391 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.argList) = new Vector<Expression*>; @@ -1854,8 +1791,6 @@ yyreduce: break; case 37: - -/* Line 1464 of yacc.c */ #line 399 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.argList)->append((yyvsp[(3) - (3)].expr)); @@ -1864,8 +1799,6 @@ yyreduce: break; case 40: - -/* Line 1464 of yacc.c */ #line 413 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new Union; @@ -1878,8 +1811,6 @@ yyreduce: break; case 41: - -/* Line 1464 of yacc.c */ #line 425 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(1) - (1)].locationPath); @@ -1887,8 +1818,6 @@ yyreduce: break; case 43: - -/* Line 1464 of yacc.c */ #line 432 "../Source/WebCore/xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->setAbsolute(true); @@ -1900,8 +1829,6 @@ yyreduce: break; case 44: - -/* Line 1464 of yacc.c */ #line 441 "../Source/WebCore/xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->insertFirstStep((yyvsp[(2) - (3)].step)); @@ -1915,8 +1842,6 @@ yyreduce: break; case 46: - -/* Line 1464 of yacc.c */ #line 456 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new Filter((yyvsp[(1) - (2)].expr), *(yyvsp[(2) - (2)].predList)); @@ -1927,8 +1852,6 @@ yyreduce: break; case 48: - -/* Line 1464 of yacc.c */ #line 468 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new LogicalOp(LogicalOp::OP_Or, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1939,8 +1862,6 @@ yyreduce: break; case 50: - -/* Line 1464 of yacc.c */ #line 480 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new LogicalOp(LogicalOp::OP_And, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1951,8 +1872,6 @@ yyreduce: break; case 52: - -/* Line 1464 of yacc.c */ #line 492 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1963,8 +1882,6 @@ yyreduce: break; case 54: - -/* Line 1464 of yacc.c */ #line 504 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1975,8 +1892,6 @@ yyreduce: break; case 56: - -/* Line 1464 of yacc.c */ #line 516 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new NumericOp(NumericOp::OP_Add, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1987,8 +1902,6 @@ yyreduce: break; case 57: - -/* Line 1464 of yacc.c */ #line 524 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new NumericOp(NumericOp::OP_Sub, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1999,8 +1912,6 @@ yyreduce: break; case 59: - -/* Line 1464 of yacc.c */ #line 536 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new NumericOp((yyvsp[(2) - (3)].numop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -2011,8 +1922,6 @@ yyreduce: break; case 61: - -/* Line 1464 of yacc.c */ #line 548 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new Negative; @@ -2023,9 +1932,8 @@ yyreduce: break; - -/* Line 1464 of yacc.c */ -#line 2029 "/Source/WebCore/generated/XPathGrammar.tab.c" +/* Line 1267 of yacc.c. */ +#line 1937 "/Source/WebCore/generated/XPathGrammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2036,6 +1944,7 @@ yyreduce: *++yyvsp = yyval; + /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2100,7 +2009,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -2117,7 +2026,7 @@ yyerrlab: } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -2174,6 +2083,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + if (yyn == YYFINAL) + YYACCEPT; + *++yyvsp = yylval; @@ -2198,7 +2110,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2209,7 +2121,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEMPTY) + if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -2235,8 +2147,6 @@ yyreturn: } - -/* Line 1684 of yacc.c */ #line 556 "../Source/WebCore/xml/XPathGrammar.y" diff --git a/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.h b/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.h index 8df6585..6788183 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.h +++ b/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.h @@ -1,22 +1,24 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ +/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program 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 General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -27,11 +29,10 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ - /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -58,16 +59,33 @@ XPATH_ERROR = 275 }; #endif +/* Tokens. */ +#define MULOP 258 +#define RELOP 259 +#define EQOP 260 +#define MINUS 261 +#define PLUS 262 +#define AND 263 +#define OR 264 +#define AXISNAME 265 +#define NODETYPE 266 +#define PI 267 +#define FUNCTIONNAME 268 +#define LITERAL 269 +#define VARIABLEREFERENCE 270 +#define NUMBER 271 +#define DOTDOT 272 +#define SLASHSLASH 273 +#define NAMETEST 274 +#define XPATH_ERROR 275 + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -{ - -/* Line 1685 of yacc.c */ #line 60 "../Source/WebCore/xml/XPathGrammar.y" - +{ Step::Axis axis; Step::NodeTest* nodeTest; NumericOp::Opcode numop; @@ -78,17 +96,14 @@ typedef union YYSTYPE Vector<Expression*>* argList; Step* step; LocationPath* locationPath; - - - -/* Line 1685 of yacc.c */ -#line 86 "/Source/WebCore/generated/XPathGrammar.tab.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 +} +/* Line 1529 of yacc.c. */ +#line 102 "/Source/WebCore/generated/XPathGrammar.tab.h" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif - diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLBodyElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLBodyElement.cpp index 5e6fd82..e85a311 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/HTMLBodyElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLBodyElement.cpp @@ -115,6 +115,13 @@ void HTMLBodyElement::parseMappedAttribute(Attribute* attr) } else if (attr->name() == vlinkAttr || attr->name() == alinkAttr || attr->name() == linkAttr) { + // This tells us that we are removed from document. If our document is later destroyed + // (not deleted since we hold a guardRef), our stylesheet list will be null causing a crash + // later in document()->styleSelector(). So, we bail out early because we shouldn't be + // modifying anything in that document. See webkit bug 62230. + if (m_linkDecl && !m_linkDecl->parent()) + return; + if (attr->isNull()) { if (attr->name() == linkAttr) document()->resetLinkColor(); @@ -201,6 +208,25 @@ void HTMLBodyElement::insertedIntoDocument() if (document() && document()->page()) document()->page()->updateViewportArguments(); + + if (m_linkDecl) + m_linkDecl->setParent(document()->elementSheet()); +} + +void HTMLBodyElement::removedFromDocument() +{ + if (m_linkDecl) + m_linkDecl->setParent(0); + + HTMLElement::removedFromDocument(); +} + +void HTMLBodyElement::didMoveToNewOwnerDocument() +{ + if (m_linkDecl) + m_linkDecl->setParent(document()->elementSheet()); + + HTMLElement::didMoveToNewOwnerDocument(); } bool HTMLBodyElement::isURLAttribute(Attribute *attr) const @@ -344,16 +370,4 @@ void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const addSubresourceURL(urls, document()->completeURL(getAttribute(backgroundAttr))); } -void HTMLBodyElement::didMoveToNewOwnerDocument() -{ - // When moving body elements between documents, we should have to reset the parent sheet for any - // link style declarations. If we don't we might crash later. - // In practice I can't reproduce this theoretical problem. - // webarchive/adopt-attribute-styled-body-webarchive.html tries to make sure this crash won't surface. - if (m_linkDecl) - m_linkDecl->setParent(document()->elementSheet()); - - HTMLElement::didMoveToNewOwnerDocument(); -} - } // namespace WebCore diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLBodyElement.h b/src/3rdparty/webkit/Source/WebCore/html/HTMLBodyElement.h index cd8a38f..884522c 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/HTMLBodyElement.h +++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLBodyElement.h @@ -74,6 +74,8 @@ private: virtual void parseMappedAttribute(Attribute*); virtual void insertedIntoDocument(); + virtual void removedFromDocument(); + virtual void didMoveToNewOwnerDocument(); void createLinkDecl(); @@ -91,8 +93,6 @@ private: virtual int scrollWidth() const; virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; - - virtual void didMoveToNewOwnerDocument(); RefPtr<CSSMutableStyleDeclaration> m_linkDecl; }; diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.cpp index ea8e6fe..633dd1e 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.cpp @@ -55,8 +55,8 @@ inline HTMLLinkElement::HTMLLinkElement(const QualifiedName& tagName, Document* #if ENABLE(LINK_PREFETCH) , m_onloadTimer(this, &HTMLLinkElement::onloadTimerFired) #endif - , m_disabledState(Unset) , m_loading(false) + , m_isEnabledViaScript(false) , m_createdByParser(createdByParser) , m_isInShadowTree(false) , m_pendingSheetType(None) @@ -85,40 +85,43 @@ HTMLLinkElement::~HTMLLinkElement() #endif } -void HTMLLinkElement::setDisabledState(bool _disabled) +void HTMLLinkElement::setDisabled(bool disabled) { - DisabledState oldDisabledState = m_disabledState; - m_disabledState = _disabled ? Disabled : EnabledViaScript; - if (oldDisabledState != m_disabledState) { - // If we change the disabled state while the sheet is still loading, then we have to - // perform three checks: - if (isLoading()) { - // Check #1: The sheet becomes disabled while loading. - if (m_disabledState == Disabled) - removePendingSheet(); - - // Check #2: An alternate sheet becomes enabled while it is still loading. - if (m_relAttribute.m_isAlternate && m_disabledState == EnabledViaScript) - addPendingSheet(Blocking); - - // Check #3: A main sheet becomes enabled while it was still loading and - // after it was disabled via script. It takes really terrible code to make this - // happen (a double toggle for no reason essentially). This happens on - // virtualplastic.net, which manages to do about 12 enable/disables on only 3 - // sheets. :) - if (!m_relAttribute.m_isAlternate && m_disabledState == EnabledViaScript && oldDisabledState == Disabled) - addPendingSheet(Blocking); - - // If the sheet is already loading just bail. - return; - } + if (!m_sheet) + return; + + bool wasDisabled = m_sheet->disabled(); + if (wasDisabled == disabled) + return; + + m_sheet->setDisabled(disabled); + m_isEnabledViaScript = !disabled; + + // If we change the disabled state while the sheet is still loading, then we have to + // perform three checks: + if (isLoading()) { + // Check #1: The sheet becomes disabled while loading. + if (disabled) + removePendingSheet(); + + // Check #2: An alternate sheet becomes enabled while it is still loading. + if (m_relAttribute.m_isAlternate && !disabled) + addPendingSheet(Blocking); - // Load the sheet, since it's never been loaded before. - if (!m_sheet && m_disabledState == EnabledViaScript) - process(); - else - document()->styleSelectorChanged(DeferRecalcStyle); // Update the style selector. + // Check #3: A main sheet becomes enabled while it was still loading and + // after it was disabled via script. It takes really terrible code to make this + // happen (a double toggle for no reason essentially). This happens on + // virtualplastic.net, which manages to do about 12 enable/disables on only 3 + // sheets. :) + if (!m_relAttribute.m_isAlternate && !disabled && wasDisabled) + addPendingSheet(Blocking); + + // If the sheet is already loading just bail. + return; } + + if (!disabled) + process(); } StyleSheet* HTMLLinkElement::sheet() const @@ -140,9 +143,7 @@ void HTMLLinkElement::parseMappedAttribute(Attribute* attr) } else if (attr->name() == mediaAttr) { m_media = attr->value().string().lower(); process(); - } else if (attr->name() == disabledAttr) - setDisabledState(!attr->isNull()); - else if (attr->name() == onbeforeloadAttr) + } else if (attr->name() == onbeforeloadAttr) setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attr)); #if ENABLE(LINK_PREFETCH) else if (attr->name() == onloadAttr) @@ -264,7 +265,7 @@ void HTMLLinkElement::process() bool acceptIfTypeContainsTextCSS = document()->page() && document()->page()->settings() && document()->page()->settings()->treatsAnyTextCSSLinkAsStylesheet(); - if (m_disabledState != Disabled && (m_relAttribute.m_isStyleSheet || (acceptIfTypeContainsTextCSS && type.contains("text/css"))) + if (!disabled() && (m_relAttribute.m_isStyleSheet || (acceptIfTypeContainsTextCSS && type.contains("text/css"))) && document()->frame() && m_url.isValid()) { String charset = getAttribute(charsetAttr); @@ -530,11 +531,4 @@ bool HTMLLinkElement::disabled() const return m_sheet && m_sheet->disabled(); } -void HTMLLinkElement::setDisabled(bool disabled) -{ - if (!m_sheet) - return; - m_sheet->setDisabled(disabled); -} - } diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.h b/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.h index fc0f47c..cbc0fc9 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.h +++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.h @@ -73,10 +73,9 @@ public: StyleSheet* sheet() const; + // FIXME: This should be remaned isStyleSheetLoading as this is only used for stylesheets. bool isLoading() const; - - bool isDisabled() const { return m_disabledState == Disabled; } - bool isEnabledViaScript() const { return m_disabledState == EnabledViaScript; } + bool isEnabledViaScript() const { return m_isEnabledViaScript; } bool disabled() const; void setDisabled(bool); @@ -100,10 +99,8 @@ private: #endif virtual bool sheetLoaded(); - bool isAlternate() const { return m_disabledState == Unset && m_relAttribute.m_isAlternate; } + bool isAlternate() const { return m_relAttribute.m_isAlternate; } - void setDisabledState(bool _disabled); - virtual bool isURLAttribute(Attribute*) const; public: @@ -121,12 +118,6 @@ private: private: HTMLLinkElement(const QualifiedName&, Document*, bool createdByParser); - enum DisabledState { - Unset, - EnabledViaScript, - Disabled - }; - CachedResourceHandle<CachedCSSStyleSheet> m_cachedSheet; RefPtr<CSSStyleSheet> m_sheet; #if ENABLE(LINK_PREFETCH) @@ -136,9 +127,9 @@ private: KURL m_url; String m_type; String m_media; - DisabledState m_disabledState; RelAttribute m_relAttribute; bool m_loading; + bool m_isEnabledViaScript; bool m_createdByParser; bool m_isInShadowTree; diff --git a/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp b/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp index 3bc7641..0ecd44f 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLDocumentParser.cpp @@ -274,7 +274,7 @@ void HTMLDocumentParser::pumpTokenizer(SynchronousMode mode) } m_treeBuilder->constructTreeFromToken(m_token); - m_token.clear(); + ASSERT(m_token.isUninitialized()); } // Ensure we haven't been totally deref'ed after pumping. Any caller of this diff --git a/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLToken.h b/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLToken.h index 49ec312..59f7ed4 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLToken.h +++ b/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLToken.h @@ -73,6 +73,8 @@ public: m_data.clear(); } + bool isUninitialized() { return m_type == Uninitialized; } + int startIndex() const { return m_range.m_start; } int endIndex() const { return m_range.m_end; } diff --git a/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp b/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp index 5b15cca..054f766 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp @@ -433,7 +433,26 @@ PassRefPtr<Element> HTMLTreeBuilder::takeScriptToProcess(TextPosition1& scriptSt void HTMLTreeBuilder::constructTreeFromToken(HTMLToken& rawToken) { AtomicHTMLToken token(rawToken); + + // We clear the rawToken in case constructTreeFromAtomicToken + // synchronously re-enters the parser. We don't clear the token immedately + // for Character tokens because the AtomicHTMLToken avoids copying the + // characters by keeping a pointer to the underlying buffer in the + // HTMLToken. Fortuantely, Character tokens can't cause use to re-enter + // the parser. + // + // FIXME: Top clearing the rawToken once we start running the parser off + // the main thread or once we stop allowing synchronous JavaScript + // execution from parseMappedAttribute. + if (rawToken.type() != HTMLToken::Character) + rawToken.clear(); + constructTreeFromAtomicToken(token); + + if (!rawToken.isUninitialized()) { + ASSERT(rawToken.type() == HTMLToken::Character); + rawToken.clear(); + } } void HTMLTreeBuilder::constructTreeFromAtomicToken(AtomicHTMLToken& token) diff --git a/src/3rdparty/webkit/Source/WebCore/page/Frame.cpp b/src/3rdparty/webkit/Source/WebCore/page/Frame.cpp index f0ff2d4..6128231 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/Frame.cpp +++ b/src/3rdparty/webkit/Source/WebCore/page/Frame.cpp @@ -881,8 +881,7 @@ PassRefPtr<Range> Frame::rangeForPoint(const IntPoint& framePoint) } VisiblePosition next = position.next(); - if (next.isNotNull()) { - RefPtr<Range> nextCharacterRange = makeRange(position, next); + if (RefPtr<Range> nextCharacterRange = makeRange(position, next)) { IntRect rect = editor()->firstRectForRange(nextCharacterRange.get()); if (rect.contains(framePoint)) return nextCharacterRange.release(); diff --git a/src/3rdparty/webkit/Source/WebCore/platform/graphics/TextRun.h b/src/3rdparty/webkit/Source/WebCore/platform/graphics/TextRun.h index 737adf6..78b4b6e 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/graphics/TextRun.h +++ b/src/3rdparty/webkit/Source/WebCore/platform/graphics/TextRun.h @@ -83,8 +83,8 @@ public: { } - UChar operator[](int i) const { return m_characters[i]; } - const UChar* data(int i) const { return &m_characters[i]; } + UChar operator[](int i) const { ASSERT(i >= 0 && i < m_len); return m_characters[i]; } + const UChar* data(int i) const { ASSERT(i >= 0 && i < m_len); return &m_characters[i]; } const UChar* characters() const { return m_characters; } int length() const { return m_len; } diff --git a/src/3rdparty/webkit/Source/WebCore/platform/graphics/WidthIterator.cpp b/src/3rdparty/webkit/Source/WebCore/platform/graphics/WidthIterator.cpp index 750a4ac..e396e44 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/graphics/WidthIterator.cpp +++ b/src/3rdparty/webkit/Source/WebCore/platform/graphics/WidthIterator.cpp @@ -80,6 +80,9 @@ void WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer) offset = m_end; int currentCharacter = m_currentCharacter; + if (currentCharacter >= offset) + return; + const UChar* cp = m_run.data(currentCharacter); bool rtl = m_run.rtl(); diff --git a/src/3rdparty/webkit/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp b/src/3rdparty/webkit/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp index 909c02d..8cd45ba 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp +++ b/src/3rdparty/webkit/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp @@ -488,7 +488,7 @@ void MediaPlayerPrivateQt::updateStates() if (currentError != QMediaPlayer::NoError) { m_readyState = MediaPlayer::HaveNothing; - if (currentError == QMediaPlayer::FormatError) + if (currentError == QMediaPlayer::FormatError || currentError == QMediaPlayer::ResourceError) m_networkState = MediaPlayer::FormatError; else m_networkState = MediaPlayer::NetworkError; @@ -513,7 +513,7 @@ void MediaPlayerPrivateQt::updateStates() m_networkState = MediaPlayer::Loaded; m_readyState = MediaPlayer::HaveEnoughData; } else if (currentStatus == QMediaPlayer::InvalidMedia) { - m_networkState = MediaPlayer::NetworkError; + m_networkState = MediaPlayer::FormatError; m_readyState = MediaPlayer::HaveNothing; } diff --git a/src/3rdparty/webkit/Source/WebCore/platform/win/SystemTimeWin.cpp b/src/3rdparty/webkit/Source/WebCore/platform/win/SystemTimeWin.cpp index 0449904..547decc 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/win/SystemTimeWin.cpp +++ b/src/3rdparty/webkit/Source/WebCore/platform/win/SystemTimeWin.cpp @@ -27,10 +27,6 @@ #include "SystemTime.h" #include <limits> - -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 -#endif #include <windows.h> namespace WebCore { diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.h b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.h index e27068c..68e2d80 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.h +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.h @@ -147,8 +147,8 @@ public: RenderInline* inlineElementContinuation() const; RenderBlock* blockElementContinuation() const; - RenderBoxModelObject* continuation() const { return RenderBoxModelObject::continuation(); } - void setContinuation(RenderBoxModelObject* o) { RenderBoxModelObject::setContinuation(o); } + using RenderBoxModelObject::continuation; + using RenderBoxModelObject::setContinuation; // This function is a convenience helper for creating an anonymous block that inherits its // style from this RenderBlock. diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderLayer.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderLayer.cpp index 823ad0d..3d7c6be 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderLayer.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderLayer.cpp @@ -3904,8 +3904,10 @@ void RenderLayer::setBackingNeedsRepaint() void RenderLayer::setBackingNeedsRepaintInRect(const IntRect& r) { + // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, + // so assert but check that the layer is composited. ASSERT(isComposited()); - if (backing()->paintingGoesToWindow()) { + if (!isComposited() || backing()->paintingGoesToWindow()) { // If we're trying to repaint the placeholder document layer, propagate the // repaint to the native view system. IntRect absRect(r); diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.cpp index 0fe052f..3d20df4 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.cpp @@ -1348,13 +1348,18 @@ IntRect RenderText::linesVisualOverflowBoundingBox() const IntRect RenderText::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) { - bool repaintContainerSkipped; - RenderObject* container = this->container(repaintContainer, &repaintContainerSkipped); - // The container may be an ancestor of repaintContainer, but we need to do a repaintContainer-relative repaint. - if (repaintContainerSkipped) + RenderObject* rendererToRepaint = containingBlock(); + + // Do not cross self-painting layer boundaries. + RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer(); + if (enclosingLayerRenderer != rendererToRepaint && !rendererToRepaint->isDescendantOf(enclosingLayerRenderer)) + rendererToRepaint = enclosingLayerRenderer; + + // The renderer we chose to repaint may be an ancestor of repaintContainer, but we need to do a repaintContainer-relative repaint. + if (repaintContainer && repaintContainer != rendererToRepaint && !rendererToRepaint->isDescendantOf(repaintContainer)) return repaintContainer->clippedOverflowRectForRepaint(repaintContainer); - return container->clippedOverflowRectForRepaint(repaintContainer); + return rendererToRepaint->clippedOverflowRectForRepaint(repaintContainer); } IntRect RenderText::selectionRectForRepaint(RenderBoxModelObject* repaintContainer, bool clipToVisibleContent) diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp index 0ea6667..d7a4729 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp @@ -106,10 +106,10 @@ void RenderMathMLSubSup::addChild(RenderObject* child, RenderObject* beforeChild void RenderMathMLSubSup::stretchToHeight(int height) { RenderObject* base = firstChild(); - if (!base) + if (!base || !base->firstChild()) return; - if (base->firstChild()->isRenderMathMLBlock()) { + if (base->firstChild() && base->firstChild()->isRenderMathMLBlock()) { RenderMathMLBlock* block = toRenderMathMLBlock(base->firstChild()); block->stretchToHeight(static_cast<int>(gSubSupStretch * height)); @@ -185,6 +185,9 @@ int RenderMathMLSubSup::baselinePosition(FontBaseline, bool firstLine, LineDirec switch (m_kind) { case SubSup: base = base->firstChild(); + if (!base) + break; + if (m_scripts && base->isBoxModelObject()) { RenderBoxModelObject* box = toRenderBoxModelObject(base); diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp index a3de697..a583baf 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp @@ -155,7 +155,7 @@ void RenderMathMLUnderOver::layout() if (over) { // FIXME: descending glyphs intrude into base (e.g. lowercase y over base) // FIXME: bases that ascend higher than the line box intrude into the over - if (!over->firstChild()->isBoxModelObject()) + if (!over->firstChild() || !over->firstChild()->isBoxModelObject()) break; int overSpacing = static_cast<int>(gOverSpacingAdjustment * (getOffsetHeight(over) - toRenderBoxModelObject(over->firstChild())->baselinePosition(AlphabeticBaseline, true, HorizontalLine))); @@ -183,7 +183,7 @@ void RenderMathMLUnderOver::layout() int baseHeight = getOffsetHeight(base); // actual base base = base->firstChild(); - if (!base->isBoxModelObject()) + if (!base || !base->isBoxModelObject()) break; // FIXME: We need to look at the space between a single maximum height of @@ -207,7 +207,7 @@ void RenderMathMLUnderOver::layout() if (over) { // FIXME: descending glyphs intrude into base (e.g. lowercase y over base) // FIXME: bases that ascend higher than the line box intrude into the over - if (!over->firstChild()->isBoxModelObject()) + if (!over->firstChild() || !over->firstChild()->isBoxModelObject()) break; int overSpacing = static_cast<int>(gOverSpacingAdjustment * (getOffsetHeight(over) - toRenderBoxModelObject(over->firstChild())->baselinePosition(AlphabeticBaseline, true, HorizontalLine))); @@ -224,7 +224,7 @@ void RenderMathMLUnderOver::layout() int baseHeight = getOffsetHeight(base); // actual base base = base->firstChild(); - if (!base->isBoxModelObject()) + if (!base || !base->isBoxModelObject()) break; // FIXME: We need to look at the space between a single maximum height of @@ -232,7 +232,7 @@ void RenderMathMLUnderOver::layout() int underSpacing = baseHeight - toRenderBoxModelObject(base)->baselinePosition(AlphabeticBaseline, true, HorizontalLine); RenderObject* under = lastChild(); - if (under && under->firstChild()->isRenderInline() && underSpacing > 0) + if (under && under->firstChild() && under->firstChild()->isRenderInline() && underSpacing > 0) under->style()->setMarginTop(Length(-underSpacing, Fixed)); } @@ -282,7 +282,7 @@ int RenderMathMLUnderOver::nonOperatorHeight() const { int nonOperators = 0; for (RenderObject* current = firstChild(); current; current = current->nextSibling()) { - if (current->firstChild()->isRenderMathMLBlock()) { + if (current->firstChild() && current->firstChild()->isRenderMathMLBlock()) { RenderMathMLBlock* block = toRenderMathMLBlock(current->firstChild()); if (!block->isRenderMathMLOperator()) nonOperators += getOffsetHeight(current); diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGFont.cpp b/src/3rdparty/webkit/Source/WebCore/svg/SVGFont.cpp index 06095fe..e86c82e 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGFont.cpp +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGFont.cpp @@ -90,7 +90,8 @@ struct SVGTextRunWalker { void walk(const TextRun& run, bool isVerticalText, const String& language, int from, int to) { - ASSERT(0 <= from && from <= to && to - from <= run.length()); + if (from < 0 || to < 0 || from > to || from >= run.length() || to > run.length()) + return; const String text = Font::normalizeSpaces(run.data(from), to - from); Vector<SVGGlyph::ArabicForm> chars(charactersWithArabicForm(text, run.rtl())); diff --git a/src/3rdparty/webkit/Source/WebKit.pri b/src/3rdparty/webkit/Source/WebKit.pri index bfb23a2..c556cd0 100644 --- a/src/3rdparty/webkit/Source/WebKit.pri +++ b/src/3rdparty/webkit/Source/WebKit.pri @@ -111,6 +111,8 @@ symbian|*-armcc { RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates # Make debug symbols leaner in RVCT4.x. Ignored by compiler for release builds QMAKE_CXXFLAGS.ARMCC_4_0 += --remove_unneeded_entities + # Match other compilers' (GCC, MSVC, WINSCW...) behavior regarding bitfield signedness. + # This flag is not needed for RVCT 2.x. QMAKE_CXXFLAGS.ARMCC_4_0 += --signed_bitfields } diff --git a/src/3rdparty/webkit/Source/WebKit.pro b/src/3rdparty/webkit/Source/WebKit.pro index 4e1abf6..9be0f4a 100644 --- a/src/3rdparty/webkit/Source/WebKit.pro +++ b/src/3rdparty/webkit/Source/WebKit.pro @@ -22,9 +22,7 @@ contains(QT_CONFIG, declarative) { exists($$PWD/WebKit/qt/declarative): SUBDIRS += WebKit/qt/declarative } -!symbian { - exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests -} +exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests build-qtscript { SUBDIRS += \ diff --git a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp index 5b70360..9a1e190 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp @@ -345,6 +345,13 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq) #endif page = new Page(pageClients); + // By default each page is put into their own unique page group, which affects popup windows + // and visited links. Page groups (per process only) is a feature making it possible to use + // separate settings for each group, so that for instance an integrated browser/email reader + // can use different settings for displaying HTML pages and HTML email. To make QtWebKit work + // as expected out of the box, we use a default group similar to what other ports are doing. + page->setGroupName("Default Group"); + #if ENABLE(CLIENT_BASED_GEOLOCATION) // In case running in DumpRenderTree mode set the controller to mock provider. if (QWebPagePrivate::drtRun) diff --git a/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog b/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog index f923b8a..51d57e5 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog @@ -1,3 +1,170 @@ +2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r88796. + http://trac.webkit.org/changeset/88796 + https://bugs.webkit.org/show_bug.cgi?id=62790 + + It made fast/dom/nodesFromRect-basic.html time out on Qt, + 64-bit, debug mode (Requested by Ossy on #webkit). + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::plainText): + (DumpRenderTreeSupportQt::nodesFromRect): + * WebCoreSupport/DumpRenderTreeSupportQt.h: + * tests/qwebframe/tst_qwebframe.cpp: + (tst_QWebFrame::overloadedSlots): + (tst_QWebFrame::domCycles): + +2011-06-17 Alexis Menard <alexis.menard@openbossa.org> + + Reviewed by Andreas Kling. + + [Qt] Fix wrong framework generation on MacOS when inside Qt 4.8. + https://bugs.webkit.org/show_bug.cgi?id=62815 + + Partially revert r85870 which assumed that QtWebKit will never be build inside Qt + anymore. Everything inside !QTDIR_build condition is not needed in the Qt tree because + qbase.pri is doing the job for us, i.e. using includes generated by syncqt to + setup the mac framework. It also use a correct QMAKE_LFLAGS_SONAME making possible + to actually run an application linked against QtWebKit. + + * QtWebKit.pro: + +2011-06-15 Diego Gonzalez <diegohcg@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Inconsistent behavior on a form submit request... + https://bugs.webkit.org/show_bug.cgi?id=45523 + + The inconsistency occurs when a form submission requests a new window. + Two windows are opened (instead of only one) and the first window is opened + as a blank page. + + By default each page is put into their own unique page group, which affects popup windows + and visited links. Page groups (per process only) is a feature making it possible to use + separate settings for each group, so that for instance an integrated browser/email reader + can use different settings for displaying HTML pages and HTML email. To make QtWebKit work + as expected out of the box, we use a default group similar to what other ports are doing. + + * Api/qwebpage.cpp: + +2011-06-14 Andreas Kling <kling@webkit.org> + + Reviewed by Benjamin Poulain. + + [Qt] Don't include convenience "QWebFoo" headers in WebKit code. + https://bugs.webkit.org/show_bug.cgi?id=62632 + + * WebCoreSupport/FrameNetworkingContextQt.cpp: + +2011-06-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + Reviewed by Andreas Kling. + + [Qt] tst_QWebFrame::overloadedSlots() fails + https://bugs.webkit.org/show_bug.cgi?id=37319 + + Since the implicit conversion was removed, change support functions of DRT to + expect a QVariantMap instead of a QWebElement. This matches the exposed function + in the controller, which takes 'document' and not 'document.documentElement'. + + And now that Element -> QWebElement is a perfect match, we must use QWebElement + instead of QVariantMap, like in plainText(). + + * WebCoreSupport/DumpRenderTreeSupportQt.h: + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::plainText): Fix to use QWebElement instead of + QVariantMap when getting the startContainer. Also use QVariantMap directly, + bridge will do conversion for us now. + + (getCoreDocumentFromVariantMap): Extracts the WebCore::Document* from the + QVariantMap that Qt bridge gives us when 'document' is passed from JS. + + (DumpRenderTreeSupportQt::nodesFromRect): Use helper function. + + * tests/qwebframe/tst_qwebframe.cpp: Splitted the test domCycles() into two + different tests. In practice, the original test just checked whether we could + create a QVariantMap representing 'document' without infinite looping due to + cycles in the DOM. This was more evident before since we haven't a conversion + from JSElement to QWebElement, but from JSElement to QVariantMap. + + (tst_QWebFrame::documentHasDocumentElement): Evaluates 'document' and extracts + 'documentElement' from it. Compares to QWebFrame::documentElement(). + + (tst_QWebFrame::documentAllHasDocumentElement): Look inside 'document.all' for + the documentElement. + + (tst_QWebFrame::overloadedSlots): Remove expected failure and fix wrong comment. + +2011-06-10 Andreas Kling <kling@webkit.org> + + Reviewed by Benjamin Poulain. + + [Qt] Fix 'headers' autotest when building inside Qt. + https://bugs.webkit.org/show_bug.cgi?id=62449 + + * Api/qwebkitplatformplugin.h: + +2011-06-09 Andras Becsi <abecsi@webkit.org> + + Reviewed by Andreas Kling. + + [Qt] Fix the in-tree build on Linux + https://bugs.webkit.org/show_bug.cgi?id=62378 + + In case of an in-tree build qmake generates defect prl dependencies for + the QtWebKit library, because the inclusion of qtbase.pri adds explicitlib to CONFIG. + + * QtWebKit.pro: Remove explicitlib and staticlib from CONFIG. + +2011-06-08 Andreas Kling <kling@webkit.org> + + Reviewed by Benjamin Poulain. + + [Qt] FrameLoaderClient: Check Vector::find() return value for WTF::notFound. + https://bugs.webkit.org/show_bug.cgi?id=62274 + + Vector::find() returns size_t (which is unsigned), so we should check + for WTF::notFound instead of -1. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): + +2011-06-07 Aravind Akella <aravind.akella@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt][Symbian] API test failure qdeclarativewebview + https://bugs.webkit.org/show_bug.cgi?id=59481 + + QML files cannot be loaded on Symbian due to difference + in capabilities between qmlwebkitplugin.dll and Qtwebkit.dll. + A PlatSec error that Qtwebkit.dll has "DRM AllFiles" capabilities + missing is observed when dynamically loading the QML plugin. + + * declarative/declarative.pro: Match capabilities in QtWebKit.pro. + * symbian/platformplugin/platformplugin.pro: Match capabilities with the other 2 DLLs. + Also remove TARGET.VID from platformplugin, as it's not used in any other Qt WebKit DLL, + and causes build warnings about undefined VENDOR_VID. + * tests/tests.pri: Add WriteDeviceData capability for API tests. + +2011-06-03 Rafael Brandao <rafael.lobo@openbossa.org> + + Reviewed by Andreas Kling. + + [Qt] It made two Qt API tests fail + https://bugs.webkit.org/show_bug.cgi?id=58847 + + Modified failing test's base url so it could get a valid origin + and make use of local storage. Also added another test that checks + local storage visibility in both scenarios. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::testOptionalJSObjects): + (checkLocalStorageVisibility): + (tst_QWebPage::testLocalStorageVisibility): + 2011-06-03 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Andreas Kling. diff --git a/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro b/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro index 643c32f..d3cc1cc 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro +++ b/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro @@ -297,62 +297,64 @@ contains(CONFIG, texmap) { QMAKE_EXTRA_TARGETS += install } -exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri) -WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS +!CONFIG(QTDIR_build) { + exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri) + WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS -!symbian-abld:!symbian-sbsv2 { - headers.files = $$WEBKIT_INSTALL_HEADERS + !symbian-abld:!symbian-sbsv2 { + headers.files = $$WEBKIT_INSTALL_HEADERS - !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/QtWebKit - else: headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit + !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/QtWebKit + else: headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit - !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS - else: target.path = $$[QT_INSTALL_LIBS] + !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS + else: target.path = $$[QT_INSTALL_LIBS] - INSTALLS += target headers -} else { - # INSTALLS is not implemented in qmake's mmp generators, copy headers manually - inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} - inst_headers.input = WEBKIT_INSTALL_HEADERS - inst_headers.CONFIG = no_clean + INSTALLS += target headers + } else { + # INSTALLS is not implemented in qmake's mmp generators, copy headers manually + inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} + inst_headers.input = WEBKIT_INSTALL_HEADERS + inst_headers.CONFIG = no_clean - !isEmpty(INSTALL_HEADERS): inst_headers.output = $$INSTALL_HEADERS/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} - else: inst_headers.output = $$[QT_INSTALL_HEADERS]/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} + !isEmpty(INSTALL_HEADERS): inst_headers.output = $$INSTALL_HEADERS/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} + else: inst_headers.output = $$[QT_INSTALL_HEADERS]/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} - QMAKE_EXTRA_COMPILERS += inst_headers + QMAKE_EXTRA_COMPILERS += inst_headers - install.depends += compiler_inst_headers_make_all -} + install.depends += compiler_inst_headers_make_all + } -unix { - CONFIG += create_pc create_prl - QMAKE_PKGCONFIG_LIBDIR = $$target.path - QMAKE_PKGCONFIG_INCDIR = $$headers.path - QMAKE_PKGCONFIG_DESTDIR = pkgconfig - lib_replace.match = $$re_escape($$DESTDIR) - lib_replace.replace = $$[QT_INSTALL_LIBS] - QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace -} + unix { + CONFIG += create_pc create_prl + QMAKE_PKGCONFIG_LIBDIR = $$target.path + QMAKE_PKGCONFIG_INCDIR = $$headers.path + QMAKE_PKGCONFIG_DESTDIR = pkgconfig + lib_replace.match = $$re_escape($$DESTDIR) + lib_replace.replace = $$[QT_INSTALL_LIBS] + QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace + } -mac { - !static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) { - !build_pass { - message("Building QtWebKit as a framework, as that's how Qt was built. You can") - message("override this by passing CONFIG+=webkit_no_framework to build-webkit.") + mac { + !static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) { + !build_pass { + message("Building QtWebKit as a framework, as that's how Qt was built. You can") + message("override this by passing CONFIG+=webkit_no_framework to build-webkit.") - CONFIG += build_all - } else { - isEmpty(QT_SOURCE_TREE):debug_and_release:TARGET = $$qtLibraryTarget($$TARGET) + CONFIG += build_all + } else { + isEmpty(QT_SOURCE_TREE):debug_and_release:TARGET = $$qtLibraryTarget($$TARGET) + } + + CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework + FRAMEWORK_HEADERS.version = Versions + FRAMEWORK_HEADERS.files = $${headers.files} + FRAMEWORK_HEADERS.path = Headers + QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS } - CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework - FRAMEWORK_HEADERS.version = Versions - FRAMEWORK_HEADERS.files = $${headers.files} - FRAMEWORK_HEADERS.path = Headers - QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS + QMAKE_LFLAGS_SONAME = "$${QMAKE_LFLAGS_SONAME}$${DESTDIR}$${QMAKE_DIR_SEP}" } - - QMAKE_LFLAGS_SONAME = "$${QMAKE_LFLAGS_SONAME}$${DESTDIR}$${QMAKE_DIR_SEP}" } symbian { diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h index e235ee2..c93942c 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h @@ -97,6 +97,7 @@ public: static void setSelectTrailingWhitespaceEnabled(QWebPage* page, bool enabled); static QVariantList selectedRange(QWebPage* page); static QVariantList firstRectForCharacterRange(QWebPage* page, int location, int length); + static void confirmComposition(QWebPage*, const char* text); static bool pauseAnimation(QWebFrame*, const QString& name, double time, const QString& elementId); static bool pauseTransitionOfProperty(QWebFrame*, const QString& name, double time, const QString& elementId); @@ -107,6 +108,7 @@ public: static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme); static void setFrameFlatteningEnabled(QWebPage*, bool); static void setCaretBrowsingEnabled(QWebPage* page, bool value); + static void setAuthorAndUserStylesEnabled(QWebPage*, bool); static void setMediaType(QWebFrame* qframe, const QString& type); static void setDumpRenderTreeModeEnabled(bool b); @@ -114,6 +116,7 @@ public: static void garbageCollectorCollectOnAlternateThread(bool waitUntilDone); static void setAutofilled(const QWebElement&, bool enabled); static void setJavaScriptProfilingEnabled(QWebFrame*, bool enabled); + static void setValueForUser(const QWebElement&, const QString& value); static int javaScriptObjectsCount(); static void clearScriptWorlds(); static void evaluateScriptInIsolatedWorld(QWebFrame* frame, int worldID, const QString& script); @@ -193,6 +196,8 @@ public: static void simulateDesktopNotificationClick(const QString& title); static QString viewportAsText(QWebPage*, int deviceDPI, const QSize& deviceSize, const QSize& availableSize); + static void scalePageBy(QWebFrame*, float scale, const QPoint& origin); + static QVariantList nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping); static QString responseMimeType(QWebFrame*); static void clearOpener(QWebFrame*); @@ -208,6 +213,11 @@ public: static QVariant shadowRoot(const QWebElement&); static QVariant ensureShadowRoot(const QWebElement&); static void removeShadowRoot(const QWebElement&); + static QString shadowPseudoId(const QWebElement&); + + static QString layerTreeAsText(QWebFrame*); + + static void injectInternalsObject(QWebFrame*); }; #endif diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp index 502a418..ffcbf97 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp @@ -21,10 +21,10 @@ #include "FrameNetworkingContextQt.h" +#include "qwebframe.h" +#include "qwebpage.h" #include <QNetworkAccessManager> #include <QObject> -#include <QWebFrame> -#include <QWebPage> namespace WebCore { diff --git a/src/3rdparty/webkit/Source/WebKit/qt/declarative/declarative.pro b/src/3rdparty/webkit/Source/WebKit/qt/declarative/declarative.pro index 526cf06..3552a6c 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/declarative/declarative.pro +++ b/src/3rdparty/webkit/Source/WebKit/qt/declarative/declarative.pro @@ -28,7 +28,11 @@ wince*:LIBS += $$QMAKE_LIBS_GUI symbian: { TARGET.EPOCALLOWDLLDATA=1 - TARGET.CAPABILITY = All -Tcb + CONFIG(production) { + TARGET.CAPABILITY = All -Tcb + } else { + TARGET.CAPABILITY = All -Tcb -DRM -AllFiles + } load(armcc_warnings) TARGET = $$TARGET$${QT_LIBINFIX} } diff --git a/src/3rdparty/webkit/Source/WebKit/qt/symbian/platformplugin/platformplugin.pro b/src/3rdparty/webkit/Source/WebKit/qt/symbian/platformplugin/platformplugin.pro index 6d9d1b4..fd31e1e 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/symbian/platformplugin/platformplugin.pro +++ b/src/3rdparty/webkit/Source/WebKit/qt/symbian/platformplugin/platformplugin.pro @@ -48,11 +48,14 @@ HEADERS += \ DESTDIR = $$OUTPUT_DIR/plugins/$$TARGETPATH symbian: { -# EPOCALLOWDLLDATA have to set true because Qt macros has initialised global data TARGET.EPOCALLOWDLLDATA=1 - TARGET.CAPABILITY = All -Tcb + CONFIG(production) { + TARGET.CAPABILITY = All -Tcb + } else { + TARGET.CAPABILITY = All -Tcb -DRM -AllFiles + } + TARGET.UID3 = 0x2002E674 - TARGET.VID = VID_DEFAULT TARGET = $$TARGET$${QT_LIBINFIX} LIBS += -lcone -leikcore -lavkon diff --git a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 81e1454..efe3a3f 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -89,11 +89,11 @@ public slots: private slots: void initTestCase(); void cleanupTestCase(); - void contextMenuCopy(); void acceptNavigationRequest(); void geolocationRequestJS(); void loadFinished(); + void popupFormSubmission(); void acceptNavigationRequestWithNewWindow(); void userStyleSheet(); void loadHtml5Video(); @@ -119,6 +119,7 @@ private slots: void protectBindingsRuntimeObjectsFromCollector(); void localURLSchemes(); void testOptionalJSObjects(); + void testLocalStorageVisibility(); void testEnablePersistentStorage(); void consoleOutput(); void inputMethods_data(); @@ -389,6 +390,25 @@ public: } }; +void tst_QWebPage::popupFormSubmission() +{ + TestPage page; + page.settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true); + page.mainFrame()->setHtml("<form name=form1 method=get action='' target=myNewWin>"\ + "<input type=hidden name=foo value='bar'>"\ + "</form>"); + page.mainFrame()->evaluateJavaScript("window.open('', 'myNewWin', 'width=500,height=300,toolbar=0')"); + page.mainFrame()->evaluateJavaScript("document.form1.submit();"); + + QTest::qWait(500); + // The number of popup created should be one. + QVERIFY(page.createdWindows.size() == 1); + + QString url = page.createdWindows.takeFirst()->mainFrame()->url().toString(); + // Check if the form submission was OK. + QVERIFY(url.contains("?foo=bar")); +} + void tst_QWebPage::acceptNavigationRequestWithNewWindow() { TestPage* page = new TestPage(m_view); @@ -2328,8 +2348,8 @@ void tst_QWebPage::testOptionalJSObjects() QWebPage webPage1; QWebPage webPage2; - webPage1.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl()); - webPage2.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl()); + webPage1.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("http://www.example.com/")); + webPage2.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("http://www.example.com/")); QEXPECT_FAIL("","Feature enabled/disabled checking problem. Look at bugs.webkit.org/show_bug.cgi?id=29867", Continue); QCOMPARE(testFlag(webPage1, QWebSettings::OfflineWebApplicationCacheEnabled, "applicationCache", false), false); @@ -2339,13 +2359,83 @@ void tst_QWebPage::testOptionalJSObjects() QCOMPARE(testFlag(webPage2, QWebSettings::OfflineWebApplicationCacheEnabled, "applicationCache", false), true); QCOMPARE(testFlag(webPage1, QWebSettings::LocalStorageEnabled, "localStorage", false), false); - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=61045", Continue); QCOMPARE(testFlag(webPage2, QWebSettings::LocalStorageEnabled, "localStorage", true), true); QCOMPARE(testFlag(webPage1, QWebSettings::LocalStorageEnabled, "localStorage", false), false); - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=61045", Continue); QCOMPARE(testFlag(webPage2, QWebSettings::LocalStorageEnabled, "localStorage", false), true); } +static inline bool checkLocalStorageVisibility(QWebPage& webPage, bool localStorageEnabled) +{ + webPage.settings()->setAttribute(QWebSettings::LocalStorageEnabled, localStorageEnabled); + return webPage.mainFrame()->evaluateJavaScript(QString("(window.localStorage != undefined)")).toBool(); +} + +void tst_QWebPage::testLocalStorageVisibility() +{ + // Local storage's visibility depends on its security origin, which depends on base url. + // Initially, it will test it with base urls that get a globally unique origin, which may not + // be able to use local storage even if the feature is enabled. Then later the same test is + // done but with urls that would get a valid origin, so local storage could be used. + // Before every test case it checks if local storage is not already visible. + + QWebPage webPage; + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl()); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), false); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("invalid")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), false); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("://misparsed.com")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), false); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("http://")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), false); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("about:blank")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), false); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("data:text/html,test")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), false); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("file:///")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), false); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("http://www.example.com")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), true); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("https://www.example.com")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), true); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("ftp://files.example.com")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), true); + + webPage.currentFrame()->setHtml(QString("<html><body>test</body></html>"), QUrl("file:///path/to/index.html")); + + QCOMPARE(checkLocalStorageVisibility(webPage, false), false); + QCOMPARE(checkLocalStorageVisibility(webPage, true), true); +} + void tst_QWebPage::testEnablePersistentStorage() { QWebPage webPage; diff --git a/src/3rdparty/webkit/Source/WebKit/qt/tests/tests.pri b/src/3rdparty/webkit/Source/WebKit/qt/tests/tests.pri index dfa3272..812fe93 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/tests/tests.pri +++ b/src/3rdparty/webkit/Source/WebKit/qt/tests/tests.pri @@ -26,7 +26,7 @@ contains(QT_CONFIG, declarative): QT += declarative QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR symbian { - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices + TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices WriteDeviceData } # Use the Qt Mobile theme if it is in the CONFIG diff --git a/src/3rdparty/webkit/Source/WebKit2/ChangeLog b/src/3rdparty/webkit/Source/WebKit2/ChangeLog index f25333d..b7eaf3c 100644 --- a/src/3rdparty/webkit/Source/WebKit2/ChangeLog +++ b/src/3rdparty/webkit/Source/WebKit2/ChangeLog @@ -1,3 +1,15 @@ +2011-06-08 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Build fix for building QtWebKit inside of Qt. + https://bugs.webkit.org/show_bug.cgi?id=62280 + + Remove CONFIG=staticlib, because it causes the configure script to add -lwebkit2 + into QtWebKit.prl. + + * WebKit2.pri: + 2011-05-24 Jer Noble <jer.noble@apple.com> Reviewed by Darin Adler. diff --git a/src/3rdparty/webkit/Source/WebKit2/WebKit2.pri b/src/3rdparty/webkit/Source/WebKit2/WebKit2.pri index de27da9..32c25e1 100644 --- a/src/3rdparty/webkit/Source/WebKit2/WebKit2.pri +++ b/src/3rdparty/webkit/Source/WebKit2/WebKit2.pri @@ -89,6 +89,7 @@ defineTest(prependWebKit2Lib) { # The following line is to prevent qmake from adding webkit2 to libQtWebKit's prl dependencies. CONFIG -= explicitlib + CONFIG -= staticlib export(QMAKE_LIBDIR) export(POST_TARGETDEPS) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 76a0a7f..cd81b17 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - cbc99535043a2abc98d6701943595f52fbaf5b19 + 0de6fbe7d7714e4d2520f84a7d7e0c5ed9a55114 |